/* Neutreeno Q1 2026 CRM Report — dashboard styles */
:root {
  --teal: #008578;
  --teal-700: #045c54;
  --teal-300: #4db3a8;
  --teal-tint: #dbeeed;
  --ink: #0f1c1a;
  --muted: #5b6b69;
  --line: #e3eceb;
  --row-alt: #f1f6f8;
  --bg: #f6f9f9;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(16,28,26,.06), 0 8px 24px rgba(16,28,26,.06);
  --radius: 14px;
  --red: #d64545;
  --amber: #e0a106;
  --green: #1f9d6b;
  --gray: #98a6a4;
  --pos: #1f9d6b;
  --neg: #d64545;
  /* chart palette */
  --c1: #008578; --c2: #4db3a8; --c3: #f0a202; --c4: #2563eb;
  --c5: #9333ea; --c6: #e0567a; --c7: #14b8a6; --c8: #64748b;
}
[data-theme="dark"] {
  --ink: #e8f1f0; --muted: #9fb2b0; --line: #21302e; --row-alt: #16201f;
  --bg: #0c1413; --card: #111b1a; --teal-tint: #103631;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); }
h1,h2,h3 { line-height: 1.2; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: var(--card);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.topbar .logo { height: 30px; width: auto; }
.topbar .brand { display: flex; flex-direction: column; line-height: 1.1; }
.topbar .brand b { font-size: 16px; letter-spacing: .2px; }
.topbar .brand span { font-size: 12px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .pill {
  font-size: 12px; color: var(--teal-700); background: var(--teal-tint);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.iconbtn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 16px;
  display: grid; place-items: center; transition: background .15s;
}
.iconbtn:hover { background: var(--row-alt); }

/* ---------- Section nav ---------- */
.nav {
  position: sticky; top: 64px; z-index: 40;
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.nav a {
  flex: 0 0 auto; text-decoration: none; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  white-space: nowrap; transition: all .15s;
}
.nav a:hover { color: var(--ink); background: var(--row-alt); }
.nav a.active { color: #fff; background: var(--teal); }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px; }
.section { margin: 38px 0; scroll-margin-top: 120px; }
.section > h2 {
  font-size: 20px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px;
}
.section > h2::before {
  content: ""; width: 5px; height: 22px; background: var(--teal); border-radius: 3px;
}
.section .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px 15px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px;
}
.card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 0 14px; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid.cols-2,.grid.cols-3,.grid.cols-4{ grid-template-columns: 1fr; } }

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px){ .kpis { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 520px){ .kpis { grid-template-columns: 1fr;} }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; position: relative; overflow: hidden;
}
.kpi::after { content:""; position:absolute; inset:0 auto 0 0; width:4px; background:var(--teal); }
.kpi .label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.kpi .value { font-size: 30px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Stat list (exec summary) ---------- */
.statlist { display: grid; gap: 0; }
.statlist .row {
  display: flex; justify-content: space-between; gap: 16px; padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.statlist .row:last-child { border-bottom: 0; }
.statlist .row.sub { padding-left: 22px; color: var(--muted); font-size: 14px; }
.statlist .row .k { color: var(--muted); }
.statlist .row.total { font-weight: 700; border-top: 2px solid var(--teal); }
.statlist .v { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  background: var(--teal); color: #fff; text-align: left; font-weight: 600;
  padding: 10px 12px; white-space: nowrap; position: sticky; top: 0;
}
thead th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr:hover { background: var(--teal-tint); }
tfoot td { padding: 11px 12px; font-weight: 700; border-top: 2px solid var(--teal); background: var(--card); }
td.strong { font-weight: 600; }

/* badges */
.badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; display: inline-block; }
.badge.Red, .badge.neg { background: #fbe3e3; color: #a32424; }
.badge.Amber { background: #fdf0cf; color: #8a6300; }
.badge.Green, .badge.pos { background: #ddf3e8; color: #15603f; }
.badge.cat-Pipeline { background: var(--teal-tint); color: var(--teal-700); }
.badge.cat-BestCase { background: #fdf0cf; color: #8a6300; }
.badge.cat-Uncat { background: #eceff1; color: #5b6b69; }
[data-theme="dark"] .badge.Red,[data-theme="dark"] .badge.neg{background:#3a1a1a;color:#f1a3a3;}
[data-theme="dark"] .badge.Amber{background:#3a2f10;color:#f0c869;}
[data-theme="dark"] .badge.Green,[data-theme="dark"] .badge.pos{background:#10301f;color:#7fd8a8;}
[data-theme="dark"] .badge.cat-Uncat{background:#1c2625;color:#9fb2b0;}

.delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.pos { color: var(--pos); }
.delta.neg { color: var(--neg); }

/* ---------- Charts ---------- */
.chartbox { position: relative; height: 320px; }
.chartbox.tall { height: 380px; }
.chartbox.short { height: 260px; }

/* ---------- Notes ---------- */
.note {
  font-size: 13px; color: var(--muted); background: var(--row-alt);
  border-left: 3px solid var(--teal-300); padding: 10px 14px; border-radius: 0 8px 8px 0; margin-top: 14px;
}
.note b { color: var(--ink); }

/* search box */
.search {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font-size: 14px; margin-bottom: 12px;
}
.search:focus { outline: 2px solid var(--teal-300); border-color: var(--teal); }

.footer { color: var(--muted); font-size: 12px; text-align: center; padding: 30px 0 50px; }

/* ---------- Print ---------- */
@media print {
  .nav, .topbar .iconbtn, .search { display: none !important; }
  body { background: #fff; }
  .topbar { position: static; box-shadow: none; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .section { break-inside: avoid-page; }
  .chartbox { height: 280px; }
}
