/* portal.it2go.mx · estilos base (bloque 1 de su index.html) */

/* ========================================================
   IT2GO PORTAL V2.7 — Big Sur / Apple Design Language
   ======================================================== */
:root {
  --sb-w: 240px;
  --sb-w-col: 64px;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.4,0,.2,1);
  --dur: .28s;
  /* Colors */
  --navy: #012640;
  --brand: #00836F;
  --brand-light: rgba(0,131,111,.1);
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --surface-2: #F5F5F7;
  --surface-3: #E8E8ED;
  --border: rgba(0,0,0,.08);
  --border-soft: rgba(0,0,0,.05);
  --text: #1D1D1F;
  --text-2: #3D3D3F;
  --text-dim: #6E6E73;
  --text-faint: #AEAEB2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 16px rgba(0,0,0,.08),0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12),0 8px 20px rgba(0,0,0,.06);
  --glass: rgba(255,255,255,.72);
  --glass-border: rgba(255,255,255,.5);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); overflow-x: hidden; }

/* ==================== LAYOUT ==================== */
.app { display: flex; min-height: 100vh; }

/* ==================== SIDEBAR ==================== */
.sb {
  width: var(--sb-w);
  min-height: 100vh;
  background: var(--navy);
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 300;
  display: flex; flex-direction: column;
  transition: width var(--dur) var(--ease);
  overflow: hidden;
}
.sb.col { width: var(--sb-w-col); }

/* Logo */
.sb-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--dur);
}
.sb-logo:hover { background: rgba(255,255,255,.04); }
.sb-logo-img { height: 28px; object-fit: contain; flex-shrink: 0; }
.sb-logo-txt { flex: 1; min-width: 0; }
.sb-logo-name { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; }
.sb-logo-sub { color: rgba(255,255,255,.35); font-size: 10px; text-transform: uppercase; letter-spacing: .8px; white-space: nowrap; margin-top: 1px; }
.sb-toggle {
  background: transparent; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); padding: 6px; border-radius: 6px;
  display: flex; align-items: center; transition: color var(--dur); flex-shrink: 0;
}
.sb-toggle:hover { color: #fff; }

/* Filters */
.sb-filters {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; gap: 5px;
  flex-shrink: 0; overflow: hidden;
}
.sb-filter-lbl { color: rgba(255,255,255,.3); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.sb-row { display: flex; gap: 4px; }
.sb-sel {
  flex: 1; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff; padding: 6px 8px; border-radius: 8px;
  font-size: 12px; font-family: inherit; cursor: pointer; outline: none;
  transition: border-color var(--dur);
}
.sb-sel:focus { border-color: var(--brand); }
.sb-sel option { background: #012640; color: #fff; }

/* Nav */
.sb-nav { flex: 1; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.sb-nav::-webkit-scrollbar { width: 0; }
.sb-sec-lbl {
  color: rgba(255,255,255,.25); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  padding: 10px 8px 3px; white-space: nowrap;
  overflow: hidden;
}
.ni {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  cursor: pointer; border: none; background: transparent;
  color: rgba(255,255,255,.5); font-family: inherit; font-size: 13px; font-weight: 500;
  width: 100%; text-align: left; white-space: nowrap;
  transition: all var(--dur);
}
.ni:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.ni.on { background: rgba(0,131,111,.25); color: #fff; font-weight: 600; }
.ni.on .ni-ico { opacity: 1; color: #5EEAD4; }
.ni-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .6; transition: opacity var(--dur); }
.ni:hover .ni-ico { opacity: .9; }
.ni-lbl { flex: 1; }
.ni-badge {
  background: rgba(255,255,255,.15); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 99px; min-width: 18px; text-align: center; flex-shrink: 0;
}
.ni.on .ni-badge { background: rgba(255,255,255,.2); }
.ni-badge.amber { background: rgba(251,191,36,.3); color: #FDE68A; }
.ni-badge.red { background: rgba(239,68,68,.3); color: #FCA5A5; }
.sb-div { height: 1px; background: rgba(255,255,255,.06); margin: 5px 8px; }

/* User */
.sb-user {
  padding: 12px; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--dur);
}
.sb-user:hover { background: rgba(255,255,255,.04); }
.sb-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg,var(--brand),#0D9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; overflow: hidden; flex-shrink: 0;
}
.sb-av img { width: 100%; height: 100%; object-fit: cover; }
.sb-ui { flex: 1; min-width: 0; overflow: hidden; }
.sb-uname { color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-urole { color: rgba(255,255,255,.35); font-size: 10px; text-transform: uppercase; letter-spacing: .3px; }
.sb-foot { padding: 8px 14px 10px; font-size: 10.5px; text-align: center; flex-shrink: 0; display:flex; flex-direction:column; gap:1px; }
.sb-ver { color: rgba(255,255,255,.72); font-weight:600; }
.sb-cop { color: rgba(255,255,255,.45); }
.sb-cop sup { font-size:7px; }

/* Collapsed sidebar */
.sb.col .sb-logo-txt, .sb.col .sb-sec-lbl, .sb.col .sb-filters,
.sb.col .ni-lbl, .sb.col .ni-badge, .sb.col .sb-ui, .sb.col .sb-foot { display: none !important; }
.sb.col .ni { justify-content: center; padding: 10px; }
.sb.col .sb-user { justify-content: center; }
.sb.col .sb-logo { padding: 16px 0; justify-content: center; }

/* ==================== MAIN ==================== */
.main {
  margin-left: var(--sb-w);
  flex: 1; min-height: 100vh; display: flex; flex-direction: column;
  transition: margin-left var(--dur) var(--ease);
}
.main.exp { margin-left: var(--sb-w-col); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar-l { min-width: 0; }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }
.topbar-sub { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.topbar-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sync-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 11px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; font-size: 12px; color: var(--text-dim);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #22C55E; animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:.3} }

/* Content */
.pc { flex: 1; padding: 20px 24px; max-width: 1480px; width: 100%; }

/* ==================== COMPONENTS ==================== */

/* Spinner */
.pg-spin { display: flex; align-items: center; justify-content: center; padding: 80px; }
.spin { width: 32px; height: 32px; border: 3px solid var(--surface-3); border-top-color: var(--brand); border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to{transform:rotate(360deg)} }

/* Period banner */
.period-bar {
  background: rgba(2,132,199,.07); border: 1px solid rgba(2,132,199,.2);
  border-radius: 10px; padding: 9px 16px; margin-bottom: 14px;
  font-size: 13px; color: #0369A1;
  display: flex; align-items: center; justify-content: space-between;
}

/* Hero */
.hero {
  background: linear-gradient(135deg,var(--brand) 0%,var(--navy) 100%);
  border-radius: var(--radius); padding: 24px 28px; color: #fff;
  margin-bottom: 16px; position: relative; overflow: hidden;
}
.hero::before {
  content:''; position: absolute; top: -30%; right: -8%; width: 50%; height: 200%;
  background: radial-gradient(circle,rgba(255,255,255,.07) 0%,transparent 60%);
  pointer-events: none;
}
.hero-date { font-size: 12px; font-weight: 500; opacity: .65; margin-bottom: 4px; letter-spacing: .2px; }
.hero-title { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 6px; }
.hero-sub { font-size: 14px; opacity: .85; font-weight: 400; }
.hero-sub strong { font-weight: 700; }

/* KPI Grid */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  transition: box-shadow var(--dur), transform var(--dur);
  box-shadow: var(--shadow-sm);
}
.kpi:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi-lbl { font-size: 11px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.kpi-val { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: -.5px; line-height: 1; }
.kpi-meta { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.kpi.green .kpi-val { color: var(--brand); }
.kpi.amber .kpi-val { color: #D97706; }
.kpi.red .kpi-val { color: #DC2626; }
.kpi.purple .kpi-val { color: #7C3AED; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-soft);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: -.2px; }
.card-meta { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.card-body { padding: 16px 20px; }

/* Grid */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.g1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
@media (max-width: 1024px) { .g2,.g3,.g1-2 { grid-template-columns: 1fr; } }

/* Chart card */
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-ttl { font-size: 13px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.chart-val { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.4px; }
.chart-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* D3 charts */
.d3-chart { width: 100%; overflow: visible; }
.d3-chart .axis path, .d3-chart .axis line { stroke: var(--border); }
.d3-chart .axis text { fill: var(--text-dim); font-size: 11px; font-family: inherit; }
.d3-chart .grid line { stroke: var(--border-soft); stroke-dasharray: 3,3; }
.d3-chart .area { fill-opacity: .12; }
.d3-chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.d3-chart .dot { stroke: var(--surface); stroke-width: 2; cursor: pointer; transition: r .15s; }
.d3-chart .bar { transition: opacity .15s; cursor: pointer; }
.d3-chart .bar:hover { opacity: .8; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.dl-item { display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; }
.dl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dl-name { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dl-val { color: var(--text-dim); font-weight: 600; font-family: monospace; flex-shrink: 0; }

/* Horizontal bars */
.hb-list { display: flex; flex-direction: column; gap: 11px; }
.hb-item { display: flex; flex-direction: column; gap: 4px; }
.hb-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.hb-name { color: var(--text); font-weight: 600; max-width: 68%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-val { color: var(--brand); font-weight: 700; font-family: monospace; font-size: 12px; }
.hb-track { height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 99px; transition: width .6s var(--ease); }
.hb-fill.teal { background: linear-gradient(90deg,var(--brand),#14B8A6); }
.hb-fill.red { background: linear-gradient(90deg,#EF4444,#F97316); }
.hb-fill.blue { background: linear-gradient(90deg,#2563EB,#60A5FA); }
.hb-fill.purple { background: linear-gradient(90deg,#7C3AED,#A855F7); }

/* Mexico Map */
.mapa-container {
  position: relative; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg,#F0FDF9,#F0F9FF);
  border: 1px solid var(--border-soft);
}
.mapa-container svg { width: 100%; height: auto; display: block; }
.estado-path {
  cursor: pointer; transition: opacity .15s, filter .15s;
  stroke: #fff; stroke-width: 0.5;
}
.estado-path:hover { opacity: .75; filter: brightness(1.1); }
.mapa-tooltip {
  position: fixed; background: var(--navy); color: #fff;
  padding: 8px 12px; border-radius: 9px; font-size: 12px;
  pointer-events: none; z-index: 1000; white-space: nowrap;
  box-shadow: var(--shadow-lg); display: none;
  border: 1px solid rgba(255,255,255,.1);
}
.mapa-lbl { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--text-dim); }
.mapa-lbl-bar { flex: 1; height: 6px; border-radius: 99px; background: linear-gradient(90deg,rgba(0,131,111,.1),var(--brand)); }

/* Pipeline funnel */
.funnel { display: flex; flex-direction: column; gap: 5px; }
.funnel-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; background: var(--surface-2); border-radius: 9px;
  border-left: 3px solid var(--brand); transition: background var(--dur);
}
.funnel-row:hover { background: var(--bg); }
.funnel-row.won { border-color: #22C55E; }
.funnel-row.lost { border-color: #EF4444; opacity: .6; }
.f-name { font-size: 12px; font-weight: 600; flex: 1; color: var(--text); }
.f-ct { font-size: 11px; color: var(--text-dim); min-width: 50px; text-align: right; }
.f-val { font-size: 12px; font-weight: 700; color: var(--brand); font-family: monospace; min-width: 95px; text-align: right; }

/* Meta progress */
.meta-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.meta-row:last-child { border: none; }
.meta-l { min-width: 170px; }
.meta-name { font-size: 13px; font-weight: 600; color: var(--navy); }
.meta-nums { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.meta-trk { flex: 1; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meta-fill { height: 100%; border-radius: 99px; transition: width .7s var(--ease); }
.meta-pct { font-size: 13px; font-weight: 700; min-width: 52px; text-align: right; }

/* Table */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t thead th {
  padding: 10px 16px; font-size: 11px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--surface); position: sticky; top: 0;
}
table.t tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
table.t tbody tr:last-child td { border: none; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t.sm tbody td { padding: 7px 12px; font-size: 12px; }
.mono { font-family: ui-monospace, monospace; }
.folio { font-family: ui-monospace,monospace; font-weight: 700; color: var(--navy); font-size: 12px; }
.amt { font-family: ui-monospace,monospace; font-weight: 700; font-size: 14px; color: var(--navy); }
.amt-sm { font-family: ui-monospace,monospace; font-weight: 600; }
.tr { text-align: right; }
.tc { text-align: center; }
.bold { font-weight: 700; }
.dim { color: var(--text-dim); }
.green { color: var(--brand); }
.amber { color: #D97706; }
.red { color: #DC2626; }
.purple { color: #7C3AED; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: .2px;
}
.b-paid { background: rgba(34,197,94,.1); color: #166534; }
.b-over { background: rgba(239,68,68,.1); color: #991B1B; }
.b-sent { background: rgba(59,130,246,.1); color: #1E40AF; }
.b-void { background: rgba(100,116,139,.1); color: #475569; }
.b-brand { background: rgba(0,131,111,.12); color: #00836F; }
.b-ms { background: rgba(37,99,235,.1); color: #1D4ED8; }
.b-ks { background: rgba(34,197,94,.1); color: #166534; }
.b-gen { background: rgba(124,58,237,.1); color: #6D28D9; }
.b-warn { background: rgba(245,158,11,.1); color: #92400E; }
.b-info { background: rgba(2,132,199,.1); color: #0369A1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: 9px; padding: 9px 17px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all var(--dur); white-space: nowrap;
  letter-spacing: -.1px;
}
.btn-p { background: var(--brand); color: #fff; }
.btn-p:hover { background: #006B5A; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,131,111,.3); }
.btn-g { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-g:hover { border-color: var(--brand); color: var(--brand); }
.btn-d { background: transparent; border: 1px solid #FCA5A5; color: #DC2626; }
.btn-d:hover { background: #DC2626; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Forms */
.fld { margin-bottom: 14px; }
.flbl { display: block; font-size: 11px; color: var(--text-dim); font-weight: 700; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .3px; }
.finput {
  width: 100%; padding: 10px 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 13px; font-family: inherit;
  transition: border-color var(--dur), box-shadow var(--dur); outline: none;
}
.finput:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,131,111,.1); }
.finput:disabled { background: var(--surface-2); color: var(--text-faint); cursor: not-allowed; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Presupuestos table */
.ppto-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; max-height: 58vh; overflow-y: auto; }
.ppto-tbl { width: 100%; border-collapse: collapse; min-width: 900px; font-size: 12px; }
.ppto-tbl thead th {
  position: sticky; top: 0; background: #1E3A8A; color: #fff;
  padding: 8px 10px; font-size: 10px; font-weight: 700; text-align: center;
  border: 1px solid #1E40AF; white-space: nowrap; letter-spacing: .3px;
}
.ppto-tbl thead th.main { background: #2563EB; }
.ppto-tbl tbody td {
  padding: 6px 10px; border: 1px solid var(--border-soft);
  text-align: right; white-space: nowrap; font-family: monospace;
}
.ppto-tbl .td-mes { text-align: left; font-weight: 700; font-family: inherit; color: var(--navy); background: var(--surface-2); }
.ppto-tbl .q1 { border-left: 3px solid var(--brand); }
.ppto-tbl .q2 { border-left: 3px solid #2563EB; }
.ppto-tbl .q3 { border-left: 3px solid #7C3AED; }
.ppto-tbl .q4 { border-left: 3px solid #F59E0B; }
.ppto-tbl .row-act { background: rgba(0,131,111,.04); }
.ppto-tbl .row-tot { background: linear-gradient(180deg,#F0FDF4,#DCFCE7); font-weight: 700; border-top: 2px solid var(--brand); }
.cel-in {
  width: 100%; border: 1px solid rgba(34,197,94,.2);
  background: rgba(34,197,94,.05); border-radius: 5px;
  padding: 4px 6px; font-family: monospace; font-size: 12px;
  text-align: right; color: var(--navy); font-weight: 600; outline: none;
}
.cel-in:focus { border-color: var(--brand); background: var(--surface); }
.cel-in.cm { background: rgba(245,158,11,.07); border-color: rgba(245,158,11,.25); }
.cel-ro { background: transparent; color: var(--text-dim); }
.cel-sum { background: rgba(2,132,199,.05); font-weight: 700; color: var(--navy); }
.cel-trim { background: rgba(124,58,237,.05); font-weight: 600; color: var(--navy); vertical-align: middle; }
.ppto-tabs { display: flex; gap: 3px; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.pt { flex: 1; background: transparent; border: none; padding: 8px 12px; font-size: 12px; font-weight: 600; color: var(--text-dim); cursor: pointer; font-family: inherit; border-radius: 8px; transition: all var(--dur); }
.pt.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

/* Panel */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); backdrop-filter: blur(4px); z-index: 400; opacity: 0; pointer-events: none; transition: opacity var(--dur); }
.overlay.on { opacity: 1; pointer-events: auto; }
.panel {
  position: fixed; top: 0; left: 0; bottom: 0; width: 100%; max-width: 860px;
  background: var(--bg); z-index: 500;
  transform: translateX(-100%); transition: transform var(--dur) var(--ease);
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-areas: "hd hd" "hero hero" "menu body";
  grid-template-rows: auto auto 1fr; grid-template-columns: 230px 1fr; overflow: hidden;
}
.panel.on { transform: translateX(0); }
.panel-hd { grid-area: hd; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.panel-hero { grid-area: hero; padding: 22px 20px; background: linear-gradient(135deg,var(--brand),var(--navy)); color: #fff; display: flex; align-items: center; gap: 14px; }
.panel-av { width: 66px; height: 66px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #fff; overflow: hidden; border: 3px solid rgba(255,255,255,.3); flex-shrink: 0; }
.panel-av img { width: 100%; height: 100%; object-fit: cover; }
.pmenu { grid-area: menu; background: var(--surface); border-right: 1px solid var(--border); padding: 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.pm-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: transparent; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; font-family: inherit; text-align: left; width: 100%; transition: all var(--dur); }
.pm-item:hover { background: var(--surface-2); color: var(--brand); }
.pm-item.on { background: var(--brand-light); color: var(--brand); border-left: 3px solid var(--brand); padding-left: 9px; }
.pm-item.out { color: #DC2626; }
.pm-item.out:hover { background: rgba(220,38,38,.08); }
.p-body { grid-area: body; overflow-y: auto; padding: 26px 28px; }
.p-sec h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.p-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.sync-card { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 13px 16px; margin-bottom: 12px; }
.sync-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.sync-row:last-child { border: none; }

.meta-fill.brand { background: linear-gradient(90deg,var(--brand),#14B8A6); }
.meta-fill.purple { background: linear-gradient(90deg,#7C3AED,#A855F7); }
.meta-fill.teal { background: linear-gradient(90deg,#0D9488,#06B6D4); }
.meta-fill.navy { background: var(--navy); }
/* D3 axis styles */
.axis text { font-family: 'Inter',sans-serif; fill: #6E6E73; font-size: 11px; }
.axis path, .axis line { stroke: rgba(0,0,0,.08); }
