/* Ferraggio Gestão — Dark ERP Theme */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

:root {
  --bg-app:       #3A3A38;
  --bg-subtle:    #313130;
  --surface:      #2E2E2C;
  --surface-2:    #272725;
  --surface-hover:#393937;
  --border:       #4A4A47;
  --border-strong:#5A5A57;

  --fg:           #FFFFFF;
  --fg-muted:     #A0A09E;
  --fg-subtle:    #767674;
  --fg-faint:     #4A4A47;

  --accent:       #E8621A;
  --accent-hover: #D4561A;
  --accent-press: #BF4C18;
  --accent-tint:  rgba(232,98,26,.12);
  --accent-tint-2:rgba(232,98,26,.22);

  --success:      #4CAF82;
  --success-tint: rgba(76,175,130,.13);
  --warning:      #D4A017;
  --warning-tint: rgba(212,160,23,.13);
  --danger:       #E05252;
  --danger-tint:  rgba(224,82,82,.13);
  --info:         #4A90D9;
  --info-tint:    rgba(74,144,217,.13);

  --font-display: 'Sora', ui-sans-serif, sans-serif;
  --font-sans:    'Plus Jakarta Sans', ui-sans-serif, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --r-xs:4px; --r-sm:6px; --r-md:10px; --r-lg:14px; --r-xl:20px; --r-full:999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.25);
  --shadow-md:  0 4px 12px rgba(0,0,0,.40),0 2px 4px rgba(0,0,0,.25);
  --shadow-lg:  0 12px 28px rgba(0,0,0,.50),0 4px 8px rgba(0,0,0,.30);
  --shadow-pop: 0 16px 40px rgba(0,0,0,.65);
}

body { font-family:var(--font-sans); background:var(--bg-app); color:var(--fg); -webkit-font-smoothing:antialiased; }
#root { height:100%; }
button,input,select,textarea { font-family:inherit; }
button { cursor:pointer; border:none; background:none; }
input,select,textarea { color:var(--fg); }

::-webkit-scrollbar { width:7px; height:7px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:99px; }
::-webkit-scrollbar-thumb:hover { background:var(--border-strong); }

/* ── App Shell ── */
.app { display:flex; height:100%; overflow:hidden; }
.main { flex:1; display:flex; flex-direction:column; min-width:0; overflow:hidden; }
.canvas { flex:1; overflow-y:auto; padding:22px 26px 60px; }

/* ── Sidebar ── */
.sidebar {
  width:240px; flex-shrink:0; background:var(--surface);
  border-right:1px solid var(--border); display:flex; flex-direction:column;
  transition:width .2s cubic-bezier(.2,0,0,1);
}
.sidebar.collapsed { width:64px; }
.sb-brand {
  display:flex; align-items:center; gap:10px;
  padding:14px 14px 12px; height:60px; border-bottom:1px solid var(--border);
}
.sb-brand img { height:26px; width:auto; flex-shrink:0; }
.sb-brand .wordmark { font-family:var(--font-display); font-weight:700; font-size:16px; letter-spacing:-.02em; color:#fff; white-space:nowrap; }
.sidebar.collapsed .wordmark { display:none; }
.sb-section { font-size:9.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--fg-faint); padding:12px 14px 4px; }
.sidebar.collapsed .sb-section { display:none; }
.sb-nav { flex:1; padding:6px 8px; display:flex; flex-direction:column; gap:1px; overflow-y:auto; }
.nav-item {
  display:flex; align-items:center; gap:10px; padding:8px 9px;
  border-radius:var(--r-sm); color:var(--fg-muted); font-size:13px; font-weight:500;
  position:relative; transition:background .12s,color .12s; width:100%; text-align:left; white-space:nowrap;
}
.nav-item svg { width:16px; height:16px; flex-shrink:0; stroke-width:1.75; }
.sidebar.collapsed .nav-item { justify-content:center; padding:9px; }
.nav-item:hover { background:var(--surface-hover); color:var(--fg); }
.nav-item.active { background:var(--accent-tint); color:var(--accent); font-weight:600; }
.nav-item.active::before { content:""; position:absolute; left:0; top:20%; bottom:20%; width:3px; border-radius:0 3px 3px 0; background:var(--accent); }
.sidebar.collapsed .nav-item.active::before { display:none; }
.nav-label { flex:1; }
.sidebar.collapsed .nav-label,.sidebar.collapsed .nav-badge { display:none; }
.nav-badge { font-size:10px; font-weight:700; background:var(--accent); color:#fff; border-radius:99px; min-width:16px; height:16px; padding:0 4px; display:flex; align-items:center; justify-content:center; }
/* ── Module nav ── */
.nav-module { display:flex; flex-direction:column; gap:1px; }
.nav-item.parent-active { color:var(--fg); }
.nav-item.parent-active > svg:first-of-type { color:var(--accent); }
.nav-sub { display:flex; flex-direction:column; gap:1px; margin:1px 0 3px; padding-left:11px; position:relative; }
.nav-sub::before { content:""; position:absolute; left:15px; top:2px; bottom:6px; width:1px; background:var(--border); }
.nav-sub-item { padding-left:18px; font-weight:450; }
.nav-sub-item .nav-label { white-space:normal; line-height:1.25; }
.sidebar.collapsed .nav-sub { display:none; }
.sb-foot { border-top:1px solid var(--border); padding:8px; }
.sb-user { display:flex; align-items:center; gap:9px; padding:6px 7px; border-radius:var(--r-sm); cursor:pointer; }
.sb-user:hover { background:var(--surface-hover); }
.sb-user-meta .nm { font-size:12.5px; font-weight:600; color:var(--fg); }
.sb-user-meta .em { font-size:11px; color:var(--fg-subtle); }
.sidebar.collapsed .sb-user-meta { display:none; }
.avatar { width:28px; height:28px; border-radius:50%; background:var(--accent); color:#fff; font-weight:700; font-size:11px; display:flex; align-items:center; justify-content:center; flex-shrink:0; user-select:none; }

/* ── Topbar ── */
.topbar {
  height:60px; flex-shrink:0;
  background:rgba(46,46,44,.93); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:10px;
  padding:0 22px; position:sticky; top:0; z-index:40;
}
.tb-selector {
  display:flex; align-items:center; gap:7px;
  background:var(--bg-subtle); border:1px solid var(--border); border-radius:var(--r-sm);
  padding:6px 10px; color:var(--fg); font-size:12.5px; font-weight:500; cursor:pointer; transition:border-color .12s;
}
.tb-selector:hover { border-color:var(--border-strong); }
.tb-selector svg { width:13px; height:13px; color:var(--fg-muted); }
.tb-divider { width:1px; height:22px; background:var(--border); }
.breadcrumb { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--fg-subtle); }
.breadcrumb .bc-sep { color:var(--fg-faint); }
.breadcrumb .bc-current { color:var(--fg); font-weight:600; }
.icon-btn { width:32px; height:32px; border-radius:var(--r-sm); display:flex; align-items:center; justify-content:center; color:var(--fg-muted); position:relative; transition:background .12s,color .12s; }
.icon-btn:hover { background:var(--surface-hover); color:var(--fg); }
.icon-btn svg { width:17px; height:17px; stroke-width:1.75; }
.icon-btn .dot { position:absolute; top:7px; right:7px; width:7px; height:7px; background:var(--accent); border-radius:50%; border:1.5px solid var(--surface); }

/* ── Buttons ── */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  font-size:12.5px; font-weight:600; border-radius:var(--r-sm);
  padding:7px 13px; transition:all .12s; white-space:nowrap; cursor:pointer;
}
.btn svg { width:14px; height:14px; stroke-width:2; }
.btn:active { transform:translateY(1px); }
.btn-primary { background:var(--accent); color:#fff; border:none; }
.btn-primary:hover { background:var(--accent-hover); }
.btn-secondary { background:var(--bg-subtle); color:var(--fg); border:1px solid var(--border); }
.btn-secondary:hover { border-color:var(--border-strong); background:var(--surface-hover); }
.btn-ghost { background:none; color:var(--fg-muted); border:1px solid var(--border); }
.btn-ghost:hover { color:var(--fg); background:var(--surface-hover); }
.btn-danger { background:var(--danger); color:#fff; border:none; }
.btn-danger:hover { background:#cc3f3f; }
.btn-success { background:var(--success); color:#fff; border:none; }
.btn-success:hover { background:#3d9a6e; }
.btn-sm { padding:5px 9px; font-size:11.5px; }
.btn-sm svg { width:12px; height:12px; }
.btn-xs { padding:3px 7px; font-size:11px; }

/* ── Cards ── */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; }
.card-pad { padding:16px 18px; }
.card-head { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; border-bottom:1px solid var(--border); }
.card-title { font-size:13.5px; font-weight:600; color:var(--fg); display:flex; align-items:center; gap:8px; }
.card-title svg { width:15px; height:15px; color:var(--fg-muted); stroke-width:1.75; }
.card-link { font-size:12px; font-weight:600; color:var(--accent); display:inline-flex; align-items:center; gap:3px; cursor:pointer; }
.card-link:hover { color:var(--accent-hover); }

/* ── KPI Cards ── */
.kpi-card { background:var(--surface); border:1px solid var(--border); border-left:3px solid var(--accent); border-radius:var(--r-lg); padding:14px 16px; }
.kpi-label-row { display:flex; align-items:center; justify-content:space-between; }
.kpi-lbl { font-size:11px; font-weight:700; color:var(--fg-muted); text-transform:uppercase; letter-spacing:.07em; }
.kpi-lbl svg { width:14px; height:14px; vertical-align:middle; margin-right:4px; }
.kpi-val { font-family:var(--font-mono); font-feature-settings:'tnum' 1; font-size:21px; font-weight:600; color:var(--fg); letter-spacing:-.02em; margin:8px 0 4px; }
.kpi-footer { display:flex; align-items:center; gap:6px; }
.kpi-sub { font-size:11px; color:var(--fg-subtle); }
.delta { display:inline-flex; align-items:center; gap:2px; font-size:11.5px; font-weight:700; border-radius:var(--r-full); padding:2px 7px; }
.delta svg { width:12px; height:12px; }
.delta.up { background:var(--success-tint); color:var(--success); }
.delta.dn { background:var(--danger-tint); color:var(--danger); }

/* ── Badges ── */
.badge { display:inline-flex; align-items:center; gap:4px; font-size:10.5px; font-weight:700; border-radius:var(--r-full); padding:3px 8px; white-space:nowrap; }
.b-pago      { background:var(--success-tint); color:var(--success); }
.b-pendente  { background:var(--warning-tint); color:var(--warning); }
.b-atrasado  { background:var(--danger-tint);  color:var(--danger); }
.b-aprovado  { background:var(--info-tint);    color:var(--info); }
.b-reprovado { background:rgba(224,82,82,.18); color:#ff7575; }
.b-alcada1   { background:var(--accent-tint);  color:var(--accent); }
.b-alcada2   { background:rgba(139,92,246,.14);color:#a78bfa; }

/* ── Tables ── */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; }
thead tr { background:var(--bg-subtle); }
thead th { padding:9px 13px; text-align:left; font-size:10.5px; font-weight:700; color:var(--fg-subtle); letter-spacing:.07em; text-transform:uppercase; cursor:pointer; user-select:none; white-space:nowrap; border-bottom:1px solid var(--border); }
thead th:hover { color:var(--fg-muted); }
tbody tr { border-bottom:1px solid rgba(74,74,71,.35); transition:background .1s; cursor:pointer; }
tbody tr:nth-child(even) { background:rgba(49,49,48,.3); }
tbody tr:hover { background:var(--accent-tint) !important; }
tbody tr.row-today { border-left:2px solid var(--accent); }
tbody td { padding:10px 13px; vertical-align:middle; }
td.mono { font-family:var(--font-mono); font-feature-settings:'tnum' 1; font-size:12.5px; }
td.num  { font-family:var(--font-mono); font-feature-settings:'tnum' 1; font-size:12.5px; text-align:right; }
.tbl-action { width:26px; height:26px; border-radius:var(--r-xs); display:inline-flex; align-items:center; justify-content:center; color:var(--fg-subtle); transition:background .1s,color .1s; }
.tbl-action:hover { background:var(--surface-hover); color:var(--fg); }
.tbl-action svg { width:13px; height:13px; }

/* ── Pagination ── */
.pagination { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; border-top:1px solid var(--border); font-size:12px; color:var(--fg-muted); }
.pag-btns { display:flex; gap:3px; }
.pag-btn { min-width:28px; height:28px; border-radius:var(--r-xs); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:500; background:none; border:1px solid var(--border); color:var(--fg-muted); cursor:pointer; transition:.1s; padding:0 6px; }
.pag-btn:hover { background:var(--surface-hover); color:var(--fg); }
.pag-btn.active { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:700; }
.pag-btn:disabled { opacity:.35; cursor:default; pointer-events:none; }

/* ── Filters ── */
.filters-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.f-select { background:var(--bg-subtle); border:1px solid var(--border); border-radius:var(--r-sm); padding:6px 9px; color:var(--fg); font-size:12.5px; cursor:pointer; }
.f-select:focus { outline:none; border-color:var(--accent); }
.f-input  { background:var(--bg-subtle); border:1px solid var(--border); border-radius:var(--r-sm); padding:6px 9px; color:var(--fg); font-size:12.5px; flex:1; min-width:160px; }
.f-input:focus { outline:none; border-color:var(--accent); }
.f-spacer { flex:1; }

/* ── Drawer ── */
.drawer-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:100; display:flex; justify-content:flex-end; animation:fadeIn .17s ease; }
.drawer { width:480px; height:100%; background:var(--surface); border-left:1px solid var(--border); display:flex; flex-direction:column; animation:slideIn .22s cubic-bezier(.2,0,0,1); overflow:hidden; }
.drawer-head { display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--border); flex-shrink:0; }
.drawer-title { font-family:var(--font-display); font-size:15px; font-weight:700; }
.drawer-body { flex:1; overflow-y:auto; padding:18px; }
.drawer-foot { border-top:1px solid var(--border); padding:12px 18px; display:flex; gap:8px; flex-shrink:0; }
.drawer-section { margin-bottom:18px; }
.drawer-section-title { font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--fg-subtle); margin-bottom:10px; }
.drawer-row { display:flex; justify-content:space-between; align-items:flex-start; padding:7px 0; border-bottom:1px solid rgba(74,74,71,.3); font-size:12.5px; }
.drawer-row:last-child { border-bottom:none; }
.drawer-row .dr-label { color:var(--fg-muted); flex:1; }
.drawer-row .dr-val   { color:var(--fg); font-weight:500; text-align:right; }

/* ── Modal ── */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.62); z-index:200; display:flex; align-items:center; justify-content:center; animation:fadeIn .17s ease; }
.modal { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-xl); width:560px; max-width:95vw; max-height:90vh; display:flex; flex-direction:column; box-shadow:var(--shadow-pop); animation:slideUp .22s cubic-bezier(.2,0,0,1); }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--border); flex-shrink:0; }
.modal-title { font-family:var(--font-display); font-size:16px; font-weight:700; }
.modal-body { flex:1; overflow-y:auto; padding:20px; }
.modal-foot { border-top:1px solid var(--border); padding:12px 20px; display:flex; gap:8px; justify-content:flex-end; flex-shrink:0; }
.form-row  { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-row3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }
.form-group { margin-bottom:14px; }
.form-label { display:block; font-size:11px; font-weight:700; color:var(--fg-muted); text-transform:uppercase; letter-spacing:.07em; margin-bottom:5px; }
.form-input { width:100%; padding:8px 11px; background:var(--bg-subtle); border:1px solid var(--border); border-radius:var(--r-sm); color:var(--fg); font-size:13px; transition:border-color .12s; }
.form-input:focus { outline:none; border-color:var(--accent); }

/* ── Notifications ── */
.notif-panel { position:fixed; top:60px; right:14px; width:340px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); box-shadow:var(--shadow-lg); z-index:80; animation:slideDown .2s cubic-bezier(.2,0,0,1); overflow:hidden; }
.notif-head { padding:12px 14px; border-bottom:1px solid var(--border); font-weight:700; font-size:13.5px; display:flex; justify-content:space-between; align-items:center; }
.notif-item { display:flex; gap:10px; padding:10px 14px; border-bottom:1px solid rgba(74,74,71,.35); cursor:pointer; transition:background .1s; }
.notif-item:last-child { border-bottom:none; }
.notif-item:hover { background:var(--surface-hover); }
.notif-icon { width:30px; height:30px; border-radius:var(--r-sm); flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.notif-icon svg { width:15px; height:15px; }
.notif-text { font-size:12.5px; color:var(--fg); line-height:1.4; }
.notif-time { font-size:10.5px; color:var(--fg-subtle); margin-top:2px; }

/* ── Skeleton ── */
.skel { background:linear-gradient(90deg,var(--bg-subtle) 25%,var(--surface-hover) 50%,var(--bg-subtle) 75%); background-size:200% 100%; animation:shimmer 1.4s infinite; border-radius:var(--r-xs); }

/* ── Keyframes ── */
@keyframes fadeIn   { from{opacity:0}    to{opacity:1} }
@keyframes slideIn  { from{transform:translateX(100%)} to{transform:translateX(0)} }
@keyframes slideUp  { from{transform:translateY(14px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes slideDown{ from{transform:translateY(-8px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes shimmer  { to{background-position:-200% 0} }

/* ── Layout helpers ── */
.page-wrap { max-width:100%; }
.row-muted { opacity:.55; }
.row-muted:hover { opacity:.85; }
.page-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; flex-wrap:wrap; gap:10px; }
.page-title  { font-family:var(--font-display); font-size:19px; font-weight:700; color:var(--fg); margin:0; }
.grid-5 { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.grid-2-1 { display:grid; grid-template-columns:2fr 1fr; gap:12px; }
.grid-1-2 { display:grid; grid-template-columns:1fr 2fr; gap:12px; }
.mt-3{margin-top:12px} .mt-4{margin-top:16px} .mb-3{margin-bottom:12px} .mb-4{margin-bottom:16px}
.flex{display:flex} .flex-col{display:flex;flex-direction:column}
.gap-2{gap:8px} .gap-3{gap:12px} .gap-4{gap:16px}
.items-center{align-items:center} .justify-between{justify-content:space-between}
.text-muted{color:var(--fg-muted)} .text-subtle{color:var(--fg-subtle)} .text-accent{color:var(--accent)}
.text-success{color:var(--success)} .text-danger{color:var(--danger)} .text-warning{color:var(--warning)}
.text-sm{font-size:12.5px} .text-xs{font-size:11px} .font-600{font-weight:600} .font-700{font-weight:700}
.font-mono{font-family:var(--font-mono);font-feature-settings:'tnum' 1}
.hr{border:none;border-top:1px solid var(--border);margin:14px 0}

/* ── Alert strip ── */
.alert-strip { border-radius:var(--r-sm); padding:9px 12px; display:flex; align-items:flex-start; gap:10px; font-size:12.5px; }
.alert-strip svg { width:15px; height:15px; flex-shrink:0; margin-top:1px; }
.alert-danger  { background:var(--danger-tint);  color:var(--danger); border:1px solid rgba(224,82,82,.25); }
.alert-warning { background:var(--warning-tint); color:var(--warning); border:1px solid rgba(212,160,23,.25); }
.alert-info    { background:var(--info-tint);    color:var(--info);   border:1px solid rgba(74,144,217,.25); }

/* ── Progress bar ── */
.progress-track { height:6px; background:var(--bg-subtle); border-radius:99px; overflow:hidden; }
.progress-fill  { height:100%; border-radius:99px; transition:width .4s ease; }
.progress-orange{ background:var(--accent); }
.progress-green { background:var(--success); }

/* ── Section label ── */
.section-eyebrow { font-size:10px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--fg-subtle); margin-bottom:6px; }

/* ── Heatmap cell ── */
.hm-cell { border-radius:3px; display:flex; align-items:center; justify-content:center; font-size:9.5px; font-weight:600; cursor:pointer; transition:transform .1s; }
.hm-cell:hover { transform:scale(1.1); }

/* ── Tree item ── */
.tree-item { display:flex; align-items:center; gap:8px; padding:7px 10px; border-radius:var(--r-sm); cursor:pointer; transition:background .1s; font-size:13px; }
.tree-item:hover { background:var(--surface-hover); }
.tree-item.active { background:var(--accent-tint); color:var(--accent); font-weight:600; }
.tree-item svg { width:14px; height:14px; flex-shrink:0; }

/* ── Approval card ── */
.aprov-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:16px 18px; transition:border-color .15s; }
.aprov-card:hover { border-color:var(--border-strong); }
.aprov-value { font-family:var(--font-mono); font-feature-settings:'tnum' 1; font-size:22px; font-weight:700; color:var(--fg); letter-spacing:-.02em; }
.approver-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid rgba(74,74,71,.3); }
.approver-row:last-child { border-bottom:none; }

/* ── DRE table ── */
.dre-table table { font-size:12.5px; }
.dre-table thead th { font-size:10px; }
.dre-table tbody td { padding:7px 10px; }
.dre-row-total td { background:rgba(232,98,26,.08); font-weight:700; border-top:1px solid var(--border); }
.dre-row-total td:first-child { color:var(--accent); }
.dre-row-header td { background:var(--bg-subtle); font-weight:700; font-size:11.5px; color:var(--fg-muted); text-transform:uppercase; letter-spacing:.06em; }
.dre-neg { color:var(--danger); }
.dre-pos { color:var(--success); }

/* ── Waterfall chart fixes ── */
.wf-label { font-size:9px; fill:var(--fg-subtle); }

/* ── Tab strip ── */
.tab-strip { display:flex; border-bottom:1px solid var(--border); margin-bottom:14px; }
.tab-btn { padding:9px 14px; font-size:13px; font-weight:500; color:var(--fg-muted); cursor:pointer; border-bottom:2px solid transparent; transition:color .12s,border-color .12s; margin-bottom:-1px; background:none; }
.tab-btn:hover { color:var(--fg); }
.tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); font-weight:600; }

/* ── Segmented tabs (compact, in-card header) ── */
.seg-tabs { display:flex; gap:2px; background:var(--bg-subtle); padding:3px; border-radius:var(--r-md); }
.seg-tab { display:flex; align-items:center; gap:6px; padding:6px 12px; font-size:12.5px; font-weight:500; color:var(--fg-muted); border-radius:var(--r-sm); cursor:pointer; transition:background .12s,color .12s; white-space:nowrap; }
.seg-tab:hover { color:var(--fg); }
.seg-tab.active { background:var(--surface); color:var(--accent); font-weight:600; box-shadow:var(--shadow-sm); }
.seg-count { font-size:10.5px; font-weight:700; background:var(--border); color:var(--fg-muted); border-radius:99px; min-width:16px; height:16px; padding:0 5px; display:flex; align-items:center; justify-content:center; }
.seg-tab.active .seg-count { background:var(--accent-tint); color:var(--accent); }

/* ── Totals row ── */
.totals-row td { background:rgba(232,98,26,.08); font-weight:700; color:var(--accent); font-family:var(--font-mono); font-feature-settings:'tnum' 1; }
