/* ================================================================
   Road ESG  –  Margdarshak Color Scheme
   Sidebar: Dark Navy  #1a1f2e
   Accent:  Gold       #C9A227 / #B8860B
   ================================================================ */



/* ─── CSS Variables ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Page */
  --bg:        #f4f5f7;
  --bg2:       #ffffff;
  --bg3:       #f0f1f4;
  --border:    #e2e4e9;
  --text:      #1a1f2e;
  --text-muted:#6b7280;

  /* Brand accent – Gold/Amber (Margdarshak) */
  --gold:      #C9A227;
  --gold-dark: #B8860B;
  --gold-dim:  rgba(201,162,39,.12);
  --gold-border:rgba(201,162,39,.25);

  /* Sidebar */
  --sidebar-bg:    #1a1f2e;
  --sidebar-dark:  #141824;
  --sidebar-text:  rgba(255,255,255,.60);
  --sidebar-hover: rgba(255,255,255,.06);
  --sidebar-active-bg:  rgba(201,162,39,.10);
  --sidebar-active-border: #C9A227;
  --sidebar-active-text:   #C9A227;
  --sidebar-label: rgba(255,255,255,.30);
  --sidebar-divider:rgba(255,255,255,.07);

  /* Semantic colors (keep original names for compat) */
  --green:     #16a34a;
  --green-dim: #dcfce7;
  --amber:     #B8860B;
  --amber-dim: rgba(201,162,39,.12);
  --blue:      #2563eb;
  --blue-dim:  #dbeafe;
  --red:       #dc2626;
  --red-dim:   #fee2e2;
  --purple:    #9333ea;
  --cyan:      #0891b2;

  --font: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --mono: 'Consolas', 'Courier New', monospace;
  --radius:    8px;
  --shadow:    0 4px 16px rgba(0,0,0,.08);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.01em;
}
a { color: var(--gold-dark); text-decoration: none; }

/* ─── Layout ─────────────────────────────────────────────────── */
.app-layout { display: flex; height: 100vh; overflow: hidden; }
.main-wrap  { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.page-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ─── SIDEBAR ────────────────────────────────────────────────── */
/* ─── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: 225px;
  min-width: 225px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow-y: overlay;   /* scrollable but no layout shift */
  overflow-x: hidden;
  flex-shrink: 0;
  position: relative;
  box-shadow: 2px 0 12px rgba(0,0,0,.2);
  transition: width .22s ease, min-width .22s ease;
}
/* Always-visible thin scrollbar */
.sidebar::-webkit-scrollbar          { width: 5px; }
.sidebar::-webkit-scrollbar-track    { background: rgba(255,255,255,.04); }
.sidebar::-webkit-scrollbar-thumb    { background: rgba(255,255,255,.18); border-radius: 99px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.35); }
.sidebar                             { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }

/* ─── COLLAPSED ────────────────────────────────────────────── */
.sidebar.sb-collapsed { width: 58px; min-width: 58px; }

.sidebar.sb-collapsed .sb-hide      { display: none !important; }
.sidebar.sb-collapsed .sidebar-brand { padding: 14px 0; justify-content: center; gap: 0; }
.sidebar.sb-collapsed .nav-item     { padding: 10px 0; justify-content: center; }
.sidebar.sb-collapsed .nav-icon     { width: 100%; text-align: center; font-size: 17px; }
.sidebar.sb-collapsed .sidebar-footer { padding: 10px 0; align-items: center; }

/* Tooltip when collapsed */
.sidebar.sb-collapsed .nav-item     { position: relative; }
.sidebar.sb-collapsed .nav-item:hover::after {
  content: attr(data-label);
  position: absolute; left: 62px; top: 50%;
  transform: translateY(-50%);
  background: #0f172a; color: #fff;
  padding: 5px 12px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap; z-index: 9999;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  pointer-events: none;
}

/* ─── COLLAPSE TOGGLE BUTTON ───────────────────────────────── */
.sb-toggle {
  position: absolute; top: 18px; right: -13px;
  width: 26px; height: 26px;
  background: var(--gold); color: #1a1f2e;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; cursor: pointer; z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  transition: transform .22s, background .15s;
  line-height: 1;
}
.sb-toggle:hover              { background: var(--gold-dark); color: #fff; }
.sidebar.sb-collapsed .sb-toggle { transform: rotate(180deg); }

/* Brand */
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  background: var(--sidebar-dark);
  border-bottom: 1px solid var(--sidebar-divider);
  min-height: 66px; flex-shrink: 0;
}
.brand-icon {
  font-size: 20px;
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(201,162,39,.35);
  flex-shrink: 0;
}
.brand-name { font-weight: 800; font-size: 14px; color: #ffffff; }
.brand-sub  { font-size: 10px; color: rgba(255,255,255,.4); margin-top: 2px; }

/* Nav section labels */
.nav-section-label {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--sidebar-label);
  padding: 14px 16px 4px;
}

/* Sidebar nav */
.sidebar-nav { flex: 1; padding: 4px 0; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px;
  border-left: 3px solid transparent;
  border-radius: 0;
  color: var(--sidebar-text);
  font-size: 13px;
  transition: all .15s;
  cursor: pointer;
  margin-bottom: 1px;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
  border-left-color: rgba(201,162,39,.35);
}
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left-color: var(--sidebar-active-border);
  font-weight: 600;
}
.nav-icon { font-size: 14px; width: 18px; text-align: center; opacity: .9; flex-shrink: 0; }
.nav-item.active .nav-icon { opacity: 1; }

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-divider);
  flex-shrink: 0;
}
.sidebar-footer-text { font-size: 10px; color: rgba(255,255,255,.25); line-height: 1.6; }

/* ─── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
  height: 54px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex; align-items: center;
  padding: 0 22px; gap: 12px;
  flex-shrink: 0;
}
.hamburger {
  background: none; border: none;
  color: var(--text-muted); font-size: 18px;
  cursor: pointer; display: none; padding: 4px;
  border-radius: 6px;
}
.hamburger:hover { background: var(--bg3); }
.topbar-title {
  font-weight: 700; font-size: 15px;
  flex: 1; color: var(--text);
  letter-spacing: -.01em;
}

/* FY badge – gold instead of green */
.fy-badge {
  background: var(--gold-dim);
  color: var(--gold-dark);
  border: 1px solid var(--gold-border);
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
}

/* User pill */
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px 4px 4px;
  cursor: pointer; font-size: 12px;
  position: relative;
}
.topbar-user:hover { background: #e8eaed; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold);
  color: #1a1f2e;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
.user-name { color: var(--text); font-weight: 600; }
.user-role { color: var(--text-muted); font-size: 11px; }

/* Dropdown */
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
  display: none; overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dd-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; font-size: 13px;
  color: var(--text-muted);
  cursor: pointer; transition: background .12s;
  text-decoration: none;
}
.user-dd-item:hover { background: var(--bg3); color: var(--text); }
.user-dd-item.danger { color: var(--red); }
.user-dd-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ─── KPI CARDS ──────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.kpi-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow .2s;
}
.kpi-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09); }
.kpi-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em;
}
.kpi-value {
  font-size: 24px; font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
}
.kpi-unit  { font-size: 11px; color: var(--text-muted); }

/* Gold as primary (was green) */
.kpi-card.green  { border-top-color: var(--gold); }
.kpi-card.green  .kpi-value { color: var(--gold-dark); }
.kpi-card.amber  { border-top-color: var(--gold); }
.kpi-card.amber  .kpi-value { color: var(--gold-dark); }
.kpi-card.blue   { border-top-color: var(--blue); }
.kpi-card.blue   .kpi-value { color: var(--blue); }
.kpi-card.red    { border-top-color: var(--red); }
.kpi-card.red    .kpi-value { color: var(--red); }
.kpi-card.purple { border-top-color: var(--purple); }
.kpi-card.purple .kpi-value { color: var(--purple); }
.kpi-card.cyan   { border-top-color: var(--cyan); }
.kpi-card.cyan   .kpi-value { color: var(--cyan); }

/* ─── SCOPE BOXES ────────────────────────────────────────────── */
.scope-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px; margin-bottom: 22px;
}
.scope-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px; text-align: center;
  transition: box-shadow .2s;
}
.scope-box:hover { box-shadow: 0 4px 14px rgba(0,0,0,.09); }
.scope-box.s1    { border-top: 4px solid var(--gold); }
.scope-box.s2    { border-top: 4px solid var(--blue); }
.scope-box.total { border-top: 4px solid var(--green); }
.scope-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted);
}
.scope-value {
  font-size: 32px; font-weight: 800;
  font-family: var(--mono);
  margin: 10px 0 5px; line-height: 1;
}
.scope-box.s1    .scope-value { color: var(--gold-dark); }
.scope-box.s2    .scope-value { color: var(--blue); }
.scope-box.total .scope-value { color: var(--green); }
.scope-unit { font-size: 12px; color: var(--text-muted); }

/* ─── SECTION HEADERS ────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.section-title { font-size: 14px; font-weight: 600; color: var(--text); }
.section-sub   { font-size: 12px; color: var(--text-muted); }

/* ─── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; margin-bottom: 18px;
}
.card-title {
  font-size: 12px; font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
}

/* ─── TABLES ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: #fafbfc;
  color: var(--text-muted); font-weight: 700;
  padding: 9px 12px; text-align: left;
  border-bottom: 2px solid var(--border);
  font-size: 10px; text-transform: uppercase;
  letter-spacing: .06em; white-space: nowrap;
}
tbody tr { border-bottom: 1px solid #f0f1f4; transition: background .1s; }
tbody tr:hover { background: #fafbfc; }
tbody td { padding: 9px 12px; vertical-align: middle; }
.num { text-align: right; font-family: var(--mono); }

/* tco2e values – gold */
.tco2e { color: var(--gold-dark); font-weight: 600; }

.highlight-row td { background: var(--bg3); font-weight: 600; }
.total-row td {
  background: #fafbfc; font-weight: 700;
  border-top: 2px solid var(--border);
}

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
input, select, textarea {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px; font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,.12);
  background: #fff;
}
input[readonly] { color: var(--gold-dark); font-family: var(--mono); font-weight: 600; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  padding: 8px 18px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
  transition: opacity .15s, transform .1s, background .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover  { opacity: .88; }
.btn:active { transform: scale(.97); }

/* Primary = Gold */
.btn-green  { background: var(--gold);  color: #1a1f2e; }
.btn-amber  { background: var(--gold);  color: #1a1f2e; }
.btn-blue   { background: var(--blue);  color: #fff; }
.btn-red    { background: var(--red);   color: #fff; }
.btn-ghost  { background: var(--bg3);   color: var(--text); border: 1px solid var(--border); }
.btn-sm     { padding: 4px 10px; font-size: 12px; }

/* ─── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
}
.filter-bar .form-group { min-width: 140px; }

/* ─── BAR CHART ──────────────────────────────────────────────── */
.chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 0 4px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar {
  width: 100%; background: var(--gold);
  border-radius: 3px 3px 0 0; min-height: 2px; transition: height .5s;
}
.chart-bar.blue   { background: var(--blue); }
.chart-bar.amber  { background: var(--gold); }
.chart-bar.green  { background: var(--green); }
.chart-label { font-size: 9px; color: var(--text-muted); text-align: center; }
.chart-val   { font-size: 9px; color: var(--text-muted); font-family: var(--mono); }

/* ─── PROGRESS BARS ──────────────────────────────────────────── */
.progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.progress-label { width: 90px; font-size: 12px; color: var(--text-muted); }
.progress-bar-bg { flex: 1; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 4px; transition: width .6s; }
.progress-val { width: 70px; text-align: right; font-size: 12px; font-family: var(--mono); color: var(--text-muted); }

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 9px;
  border-radius: 12px; font-size: 11px; font-weight: 600;
}
.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-amber  { background: var(--gold-dim);   color: var(--gold-dark); }
.badge-blue   { background: var(--blue-dim);   color: var(--blue); }
.badge-red    { background: var(--red-dim);    color: var(--red); }

/* ─── TABS ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.tab {
  padding: 8px 16px; font-size: 13px;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .15s;
}
/* Active tab = gold underline */
.tab.active { color: var(--gold-dark); border-bottom-color: var(--gold); font-weight: 600; }
.tab:hover  { color: var(--text); }

/* ─── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  z-index: 1000; transition: opacity .3s;
  box-shadow: var(--shadow);
}
.toast.success { background: var(--gold);  color: #1a1f2e; }
.toast.error   { background: var(--red);   color: #fff; }
.toast.hidden  { display: none; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,31,46,.55);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%; max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 14px; font-weight: 700; }
.modal-close {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 16px;
  padding: 2px 6px; border-radius: 6px;
}
.modal-close:hover { background: var(--bg3); }
.modal-body { padding: 18px; }

/* ─── GRID HELPERS ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── EF TABLE ───────────────────────────────────────────────── */
.ef-table td:first-child { font-weight: 500; }
.ef-table thead th { background: rgba(201,162,39,.06); color: var(--gold-dark); }
.ef-table tbody tr:hover { background: rgba(201,162,39,.04); }

/* ─── LOGIN ──────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: var(--sidebar-bg);
}
.login-card {
  background: #222840;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 40px 36px; width: 400px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo-icon {
  width: 56px; height: 56px;
  background: var(--gold);
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 14px rgba(201,162,39,.35);
  margin-bottom: 12px;
}
.login-logo-name { font-size: 18px; font-weight: 800; color: var(--gold); }
.login-logo-sub  { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 3px; }
.login-title { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.8); margin-bottom: 20px; }
.login-card label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.45); }
.login-card input {
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  color: #fff; border-radius: var(--radius);
  padding: 10px 13px; font-size: 13px; font-family: var(--font);
  outline: none; transition: border-color .15s; width: 100%;
}
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.18); }
.login-card input::placeholder { color: rgba(255,255,255,.25); }
.login-error {
  background: rgba(220,38,38,.15);
  border: 1px solid rgba(220,38,38,.3);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 13px; color: #fca5a5; margin-bottom: 16px;
}
.login-btn {
  width: 100%; padding: 11px;
  border-radius: var(--radius);
  background: var(--gold); color: #1a1f2e;
  font-weight: 700; font-size: 14px;
  border: none; cursor: pointer;
  transition: background .15s; margin-top: 4px;
}
.login-btn:hover { background: var(--gold-dark); color: #fff; }

/* ─── USER MANAGEMENT ────────────────────────────────────────── */
.um-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.um-title  { font-size: 18px; font-weight: 700; }
.role-badge-admin   { background: rgba(168,85,247,.12); color: var(--purple); border: 1px solid rgba(168,85,247,.25); }
.role-badge-manager { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(59,130,246,.25); }
.role-badge-viewer  { background: var(--bg3);         color: var(--text-muted); border: 1px solid var(--border); }
.status-active   { background: var(--green-dim); color: var(--green); }
.status-inactive { background: var(--red-dim);   color: var(--red); }

/* ─── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -230px; top: 0; height: 100vh; z-index: 200; transition: left .25s; }
  .sidebar.open { left: 0; }
  .hamburger { display: block; }
  .scope-row  { grid-template-columns: 1fr; }
  .kpi-grid   { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ─── UTILITY ────────────────────────────────────────────────── */
.mt-0{margin-top:0}.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.mb-0{margin-bottom:0}.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}
.text-right{text-align:right}.text-center{text-align:center}
.text-muted{color:var(--text-muted)}.text-green{color:var(--green)}
.text-amber{color:var(--gold-dark)}.text-blue{color:var(--blue)}.text-red{color:var(--red)}
.fw-600{font-weight:600}.fw-700{font-weight:700}
.mono{font-family:var(--mono)}
.hidden{display:none!important}

/* ─── TOOLTIPS ─────────────────────────────────────────── */
[data-tip] { position: relative; cursor: help; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: #0f172a; color: #fff;
  padding: 5px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 500;
  white-space: nowrap; z-index: 9999;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  pointer-events: none; font-family: var(--font);
}
[data-tip]:hover::before {
  content: '';
  position: absolute; bottom: calc(100% + 1px); left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
  z-index: 9999; pointer-events: none;
}

/* ─── COLOR LEGEND BADGE ───────────────────────────────── */
.color-legend {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-muted);
  margin-bottom: 12px; padding: 8px 14px;
  background: var(--bg3); border-radius: 8px;
  border: 1px solid var(--border);
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── NUMBER CONSISTENCY ────────────────────────────────── */
.num-scope1 { color: #d97706; font-weight: 600; }  /* Scope 1 - amber */
.num-scope2 { color: #2563eb; font-weight: 500; }  /* Scope 2 - blue  */
.num-total  { color: #0f172a; font-weight: 700; }  /* Total   - dark  */
