/* =====================================================================
   MBI ESG & Sustainability – design system
   Tokens first; every component below consumes them.
   ===================================================================== */
:root {
  /* colour */
  --c-green-900: #14532D;      /* primary deep green */
  --c-green-700: #166534;
  --c-emerald: #059669;        /* secondary */
  --c-emerald-600: #047857;
  --c-mint: #D1FAE5;           /* accent */
  --c-mint-50: #ECFDF5;
  --c-navy: #0F172A;
  --c-navy-800: #1E293B;
  --c-navy-700: #334155;
  --c-text: #1E293B;
  --c-text-2: #64748B;
  --c-text-3: #94A3B8;
  --c-bg: #F5F7F8;
  --c-card: #FFFFFF;
  --c-border: #E2E8F0;
  --c-border-2: #EEF2F6;
  --c-hover: #F8FAFC;
  --c-success: #15803D;  --c-success-bg: #DCFCE7;
  --c-warning: #D97706;  --c-warning-bg: #FEF3C7;  --c-warning-ink: #92400E;
  --c-danger: #DC2626;   --c-danger-bg: #FEE2E2;   --c-danger-ink: #991B1B;
  --c-info: #2563EB;     --c-info-bg: #DBEAFE;     --c-info-ink: #1E40AF;
  --c-violet: #6D28D9;   --c-violet-bg: #EDE9FE;
  --c-neutral-bg: #F1F5F9;

  /* typography */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 11px; --fs-sm: 12px; --fs-base: 13.5px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 22px; --fs-kpi: 26px; --fs-kpi-sm: 20px;
  --fw-medium: 500; --fw-semi: 600; --fw-bold: 700;
  --tracking-label: .06em;

  /* spacing (4px scale) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

  /* shape & depth */
  --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-2: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .05);
  --shadow-pop: 0 10px 30px rgba(15, 23, 42, .12);

  /* controls */
  --ctl-h: 34px; --ctl-h-sm: 30px;
  --focus: 0 0 0 3px rgba(5, 150, 105, .18);

  /* layout */
  --sidebar-w: 256px; --sidebar-w-collapsed: 68px; --topbar-h: 56px; --content-max: 1600px;
  --chart-h: 280px; --chart-h-sm: 220px; --chart-h-lg: 330px;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { background: var(--c-bg); color: var(--c-text); }
body { font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--c-emerald-600); text-decoration: none; }
a:hover { color: var(--c-green-900); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--c-navy); letter-spacing: -.01em; }
code { color: var(--c-navy-700); background: var(--c-neutral-bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.text-emerald { color: var(--c-emerald) !important; }
.text-muted { color: var(--c-text-2) !important; }
.num, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------------------------------------------------------------- buttons */
.btn { font-weight: var(--fw-medium); border-radius: var(--r-md); font-size: var(--fs-base); height: var(--ctl-h); padding: 0 var(--s-3); display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn-sm { height: var(--ctl-h-sm); font-size: var(--fs-sm); padding: 0 10px; }
.btn-link { height: auto; padding: 0; }
.btn-emerald { background: var(--c-green-900); border: 1px solid var(--c-green-900); color: #fff; }
.btn-emerald:hover, .btn-emerald:focus { background: var(--c-green-700); border-color: var(--c-green-700); color: #fff; }
.btn-outline-emerald { border: 1px solid var(--c-border); color: var(--c-text); background: #fff; }
.btn-outline-emerald:hover { border-color: var(--c-emerald); color: var(--c-green-900); background: var(--c-mint-50); }
.btn-light { background: #fff; border: 1px solid var(--c-border); color: var(--c-text); }
.btn-light:hover { background: var(--c-hover); border-color: #CBD5E1; }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--c-text-2); }
.btn-ghost:hover { background: var(--c-neutral-bg); color: var(--c-text); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--r-md); color: var(--c-text-2); background: transparent; border: 0; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.btn-icon:hover { background: var(--c-neutral-bg); color: var(--c-text); }
.btn-outline-danger { height: var(--ctl-h-sm); }

/* ---------------------------------------------------------------- forms */
.form-control, .form-select { border-color: var(--c-border); border-radius: var(--r-md); font-size: var(--fs-base); min-height: var(--ctl-h); color: var(--c-text); }
.form-control-sm, .form-select-sm { min-height: var(--ctl-h-sm); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.form-control:focus, .form-select:focus { border-color: var(--c-emerald); box-shadow: var(--focus); }
.form-label { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--c-navy-700); margin-bottom: var(--s-1); }
.form-text { font-size: var(--fs-xs); color: var(--c-text-2); }
.form-check-input:checked { background-color: var(--c-emerald); border-color: var(--c-emerald); }
.field-hint { font-size: var(--fs-xs); color: var(--c-text-2); }

/* ---------------------------------------------------------------- shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--c-navy); color: #CBD5E1; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 1040; transition: width .18s ease, transform .18s ease; }
.brand { display: flex; gap: var(--s-3); align-items: center; height: var(--topbar-h); padding: 0 var(--s-4); border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.brand img { flex-shrink: 0; }
.brand-name { color: #fff; font-weight: var(--fw-bold); font-size: 14px; line-height: 1.2; white-space: nowrap; }
.brand-sub { font-size: 10.5px; color: #7DD3B0; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; }
.nav-list { padding: var(--s-2) var(--s-2) var(--s-4); flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.nav-section { font-size: 10px; font-weight: var(--fw-semi); letter-spacing: .12em; text-transform: uppercase; color: #64748B; padding: var(--s-4) var(--s-3) var(--s-1); white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: var(--s-3); height: 36px; padding: 0 var(--s-3); border-radius: var(--r-md); color: #CBD5E1; font-weight: var(--fw-medium); white-space: nowrap; position: relative; border: 0; background: none; width: 100%; text-align: left; font-size: var(--fs-base); }
.nav-item > i { font-size: 16px; width: 18px; text-align: center; color: #94A3B8; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(5,150,105,.16); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #34D399; }
.nav-item.active > i { color: #6EE7B7; }
.nav-item .chev { margin-left: auto; font-size: 11px; transition: transform .15s; color: #64748B; }
.nav-item[aria-expanded="true"] .chev { transform: rotate(90deg); }
.nav-sub { padding: 2px 0 var(--s-1) 30px; }
.nav-sub a { display: block; padding: 5px var(--s-3); color: #94A3B8; font-size: var(--fs-sm); border-radius: var(--r-sm); white-space: nowrap; }
.nav-sub a:hover { color: #fff; background: rgba(255,255,255,.04); text-decoration: none; }
.nav-sub a.active { color: #6EE7B7; font-weight: var(--fw-semi); }
.sidebar-foot { padding: var(--s-2); border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-foot .nav-item { color: #94A3B8; height: 34px; }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; transition: margin-left .18s ease; display: flex; flex-direction: column; }
body.sb-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.sb-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
body.sb-collapsed .nav-item span, body.sb-collapsed .brand-text, body.sb-collapsed .nav-item .chev, body.sb-collapsed .nav-sub { display: none !important; }
body.sb-collapsed .nav-section { font-size: 0; padding: var(--s-3) 0 0; border-top: 1px solid rgba(255,255,255,.06); margin: 0 var(--s-2); }
body.sb-collapsed .nav-item { justify-content: center; padding: 0; }
body.sb-collapsed .sidebar-foot .bi-layout-sidebar-inset { transform: scaleX(-1); }
.sidebar-backdrop { display: none; }

.topbar { position: sticky; top: 0; z-index: 1020; height: var(--topbar-h); background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-6); }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-text-2); white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--c-text-2); }
.crumbs .sep { color: var(--c-text-3); font-size: 10px; }
.crumbs .current { color: var(--c-navy); font-weight: var(--fw-semi); overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: var(--s-1); }
.btn-user { display: flex; align-items: center; gap: var(--s-2); border: 0; background: transparent; color: var(--c-text); font-weight: var(--fw-medium); padding: 4px 6px; border-radius: var(--r-md); height: 40px; }
.btn-user:hover { background: var(--c-neutral-bg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--c-green-900); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: var(--fw-semi); font-size: 12px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-meta small { color: var(--c-text-2); font-size: var(--fs-xs); font-weight: 400; }
.badge-dot { position: absolute; top: 4px; right: 3px; background: var(--c-danger); color: #fff; border-radius: var(--r-pill); font-size: 9.5px; font-weight: var(--fw-bold); padding: 1px 4px; line-height: 1.3; min-width: 16px; text-align: center; }
.dropdown-menu { border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); font-size: var(--fs-base); padding: var(--s-1); }
.dropdown-item { border-radius: var(--r-sm); padding: 7px var(--s-3); }
.dropdown-item:active { background: var(--c-mint); color: var(--c-green-900); }
.dropdown-header { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--c-text-3); }
.notif-menu { width: 380px; max-height: 440px; overflow-y: auto; padding: 0; }
.notif-head { padding: var(--s-3) var(--s-4); font-weight: var(--fw-semi); border-bottom: 1px solid var(--c-border); display: flex; justify-content: space-between; }
.notif-item { display: flex; gap: var(--s-3); white-space: normal; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--c-border-2); border-radius: 0; font-size: var(--fs-sm); }
.notif-item i { margin-top: 2px; }

.content { padding: var(--s-6); flex: 1; width: 100%; max-width: var(--content-max); }
.app-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-5) 0 var(--s-2); border-top: 1px solid var(--c-border); margin-top: var(--s-8); font-size: var(--fs-xs); color: var(--c-text-3); }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-4); }
.page-head h1 { font-size: var(--fs-xl); font-weight: var(--fw-bold); margin: 0; }
.page-head .subtitle { color: var(--c-text-2); margin: 2px 0 0; font-size: var(--fs-base); max-width: 860px; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--c-text-2); }
.page-meta .meta { display: inline-flex; align-items: center; gap: 6px; }
.page-meta .meta i { color: var(--c-text-3); }
.page-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.period-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--c-mint); color: var(--c-green-900); border-radius: var(--r-pill); padding: 2px 10px; font-weight: var(--fw-semi); font-size: var(--fs-sm); white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--c-text-3); }
.status-dot.ok { background: var(--c-success); } .status-dot.warn { background: var(--c-warning); } .status-dot.bad { background: var(--c-danger); }
.page-sub { color: var(--c-text-2); margin: -4px 0 var(--s-4); max-width: 980px; }
.page-note { font-size: var(--fs-sm); color: var(--c-text-2); background: var(--c-card); border: 1px solid var(--c-border); border-left: 3px solid var(--c-emerald); border-radius: var(--r-md); padding: var(--s-2) var(--s-3); margin-bottom: var(--s-4); }

/* ---------------------------------------------------------------- filter toolbar */
.filterbar { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-5); }
.filterbar-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); }
.fgroup { display: flex; flex-direction: column; gap: 3px; min-width: 116px; }
.fgroup label { font-size: 10.5px; text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--c-text-2); font-weight: var(--fw-semi); }
.fgroup .form-select, .fgroup .form-control { min-height: var(--ctl-h-sm); height: var(--ctl-h-sm); padding-top: 2px; padding-bottom: 2px; font-size: var(--fs-sm); }
.fgroup.is-active .form-select, .fgroup.is-active .form-control { border-color: var(--c-emerald); background-color: var(--c-mint-50); }
.fgroup-actions { flex-direction: row; gap: var(--s-2); margin-left: auto; min-width: 0; }
.filter-summary { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px dashed var(--c-border); font-size: var(--fs-sm); color: var(--c-text-2); }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); padding: 1px 9px; font-size: var(--fs-xs); font-weight: var(--fw-semi); background: var(--c-neutral-bg); color: var(--c-navy-700); border: 1px solid var(--c-border); }
.chip.active { background: var(--c-mint); color: var(--c-green-900); border-color: #A7F3D0; }
.filter-toggle { display: none; }

/* ---------------------------------------------------------------- cards & sections */
.card-esg { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--s-4) var(--s-5); }
.card-esg > .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.card-head h2, .card-head h3 { font-size: var(--fs-md); font-weight: var(--fw-semi); margin: 0; color: var(--c-navy); line-height: 1.35; }
.card-head .sub { font-size: var(--fs-sm); color: var(--c-text-2); margin-top: 1px; }
.card-head > a.small, .card-head .card-link { font-size: var(--fs-sm); white-space: nowrap; font-weight: var(--fw-medium); }
.section-title { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--c-text-2); font-weight: var(--fw-bold); margin: var(--s-8) 0 var(--s-3); }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }

/* ---------------------------------------------------------------- KPI (primary) */
.kpi-card { display: flex; flex-direction: column; gap: var(--s-2); position: relative; padding: var(--s-4); border-top: 3px solid var(--kpi-accent, var(--c-emerald)); }
.kpi-head { display: flex; align-items: center; gap: var(--s-2); }
.kpi-icon { width: 30px; height: 30px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; background: var(--kpi-accent-bg, var(--c-mint-50)); color: var(--kpi-accent, var(--c-emerald)); font-size: 15px; flex-shrink: 0; }
.kpi-title { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--c-navy-700); line-height: 1.3; flex: 1; min-width: 0; }
.kpi-title .bi-info-circle { font-size: 11px; color: var(--c-text-3); cursor: help; }
.kpi-sub { font-size: var(--fs-xs); color: var(--c-text-3); font-weight: 400; line-height: 1.3; margin-top: 1px; }
.kpi-main { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.kpi-value { font-size: var(--fs-kpi); font-weight: var(--fw-bold); color: var(--c-navy); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-unit { color: var(--c-text-2); font-weight: var(--fw-medium); font-size: var(--fs-sm); }
.kpi-nodata { color: var(--c-text-2); font-size: var(--fs-sm); line-height: 1.4; }
.kpi-compare { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-xs); color: var(--c-text-2); }
.kpi-prev { font-size: var(--fs-xs); color: var(--c-text-3); }
.kpi-period { font-size: var(--fs-xs); color: var(--c-text-2); }
.kpi-foot { margin-top: auto; padding-top: var(--s-2); border-top: 1px solid var(--c-border-2); display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--c-text-3); }
.kpi-drill { color: var(--c-text-3); font-size: 13px; }
.kpi-drill:hover { color: var(--c-emerald); }

/* secondary metric tiles */
.metric-tile { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); height: 100%; display: flex; flex-direction: column; gap: 2px; }
.metric-tile .mt-label { font-size: var(--fs-xs); font-weight: var(--fw-semi); color: var(--c-text-2); text-transform: uppercase; letter-spacing: var(--tracking-label); display: flex; align-items: center; gap: 6px; }
.metric-tile .mt-value { font-size: var(--fs-kpi-sm); font-weight: var(--fw-bold); color: var(--c-navy); font-variant-numeric: tabular-nums; line-height: 1.2; }
.metric-tile .mt-value small { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-text-2); }
.metric-tile .mt-sub { font-size: var(--fs-xs); color: var(--c-text-2); line-height: 1.4; }

/* trend chips (direction-aware, neutral when no preferred direction) */
.trend { font-weight: var(--fw-semi); font-size: var(--fs-xs); border-radius: var(--r-sm); padding: 1px 6px; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.trend-good { background: var(--c-success-bg); color: var(--c-success); }
.trend-watch { background: var(--c-warning-bg); color: var(--c-warning-ink); }
.trend-neutral { background: var(--c-neutral-bg); color: var(--c-navy-700); }
.trend-na { background: var(--c-neutral-bg); color: var(--c-text-3); }

/* status badges */
.status-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: var(--fw-semi); border-radius: var(--r-pill); padding: 1px 8px; letter-spacing: .01em; white-space: nowrap; line-height: 1.6; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.st-actual { background: var(--c-success-bg); color: var(--c-success); }
.st-estimated { background: var(--c-warning-bg); color: var(--c-warning-ink); }
.st-baseline { background: var(--c-violet-bg); color: var(--c-violet); }
.st-calculated { background: var(--c-info-bg); color: var(--c-info-ink); }
.st-pending { background: #FEF9C3; color: #854D0E; }
.st-missing { background: var(--c-danger-bg); color: var(--c-danger-ink); }
.st-na { background: var(--c-neutral-bg); color: var(--c-text-2); }

/* ---------------------------------------------------------------- charts */
.chart-wrap { position: relative; width: 100%; }
.chart-legend-note { font-size: var(--fs-xs); color: var(--c-text-2); margin-top: var(--s-2); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); min-height: 160px; padding: var(--s-8) var(--s-4); color: var(--c-text-2); text-align: center; font-size: var(--fs-sm); background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(148,163,184,.06) 8px 16px); border-radius: var(--r-md); border: 1px dashed var(--c-border); }
.empty-state i { font-size: 22px; color: var(--c-text-3); }

/* ---------------------------------------------------------------- tables */
.table-esg { font-size: var(--fs-sm); margin: 0; --bs-table-bg: transparent; --bs-table-hover-bg: var(--c-hover); color: var(--c-text); }
.table-esg thead th { background: #F8FAFC; color: var(--c-text-2); font-weight: var(--fw-semi); font-size: 10.5px; text-transform: uppercase; letter-spacing: var(--tracking-label); border-bottom: 1px solid var(--c-border); white-space: nowrap; padding: 8px 10px; vertical-align: bottom; }
.table-esg td { vertical-align: middle; border-color: var(--c-border-2); padding: 7px 10px; }
.table-esg tbody tr:last-child td { border-bottom: 0; }
.table-esg .num { text-align: right; white-space: nowrap; }
.table-esg th.sortable { cursor: pointer; user-select: none; }
.table-esg th.sortable::after { content: "\2195"; opacity: .3; margin-left: 4px; font-size: 10px; }
.table-esg th.sort-asc::after { content: "\2191"; opacity: .9; }
.table-esg th.sort-desc::after { content: "\2193"; opacity: .9; }
.table-scroll { max-height: 600px; overflow: auto; }
.table-scroll thead th { position: sticky; top: 0; z-index: 2; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-2); flex-wrap: wrap; }
.table-tools .form-control { max-width: 260px; min-height: var(--ctl-h-sm); height: var(--ctl-h-sm); font-size: var(--fs-sm); padding-left: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E") no-repeat 10px center; }
.table-tools .count { font-size: var(--fs-xs); color: var(--c-text-2); }
.table-responsive { border-radius: var(--r-md); }
.pagination .page-link { color: var(--c-text); border-color: var(--c-border); font-size: var(--fs-sm); }
.pagination .active .page-link { background: var(--c-green-900); border-color: var(--c-green-900); color: #fff; }

/* ---------------------------------------------------------------- insights / DQ */
.insight { display: flex; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--c-border-2); border-radius: var(--r-md); background: #FCFDFD; color: var(--c-text); font-size: var(--fs-sm); margin-bottom: var(--s-2); align-items: flex-start; }
.insight > i { width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--c-mint-50); color: var(--c-emerald); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; }
.insight.warn > i { background: var(--c-warning-bg); color: var(--c-warning); }
.insight .kind { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--c-text-3); font-weight: var(--fw-semi); margin-bottom: 1px; }
.dq-item { display: flex; gap: var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--c-border-2); font-size: var(--fs-sm); align-items: flex-start; }
.dq-item:last-child { border-bottom: 0; }
.dq-sev { flex: 0 0 auto; font-size: 9.5px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .04em; border-radius: var(--r-sm); padding: 2px 6px; margin-top: 1px; }
.sev-high { background: var(--c-danger-bg); color: var(--c-danger-ink); }
.sev-medium { background: var(--c-warning-bg); color: var(--c-warning-ink); }
.sev-low { background: var(--c-info-bg); color: var(--c-info-ink); }
.sev-info { background: var(--c-neutral-bg); color: var(--c-text-2); }
.dq-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); margin-bottom: var(--s-3); }
.dq-stat { border: 1px solid var(--c-border-2); border-radius: var(--r-md); padding: var(--s-2) var(--s-3); background: #FCFDFD; }
.dq-stat .l { font-size: 10.5px; color: var(--c-text-2); text-transform: uppercase; letter-spacing: var(--tracking-label); font-weight: var(--fw-semi); }
.dq-stat .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dq-stat .v { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--c-navy); font-variant-numeric: tabular-nums; }
.dq-stat .d { font-size: var(--fs-xs); color: var(--c-text-3); }
.progress-thin { height: 6px; border-radius: var(--r-pill); background: var(--c-neutral-bg); }
.progress-thin .progress-bar { background: var(--c-emerald); border-radius: var(--r-pill); }
.callout { border: 1px solid #FDE68A; border-left: 3px solid var(--c-warning); background: #FFFBEB; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); color: var(--c-warning-ink); font-size: var(--fs-sm); }
.callout-info { border-color: #BFDBFE; border-left-color: var(--c-info); background: #EFF6FF; color: var(--c-info-ink); }
.alert { border-radius: var(--r-md); font-size: var(--fs-sm); padding: var(--s-2) var(--s-3); }
.alert-dismissible .btn-close { padding: 11px; }

/* ---------------------------------------------------------------- tabs */
.nav-tabs-esg { border-bottom: 1px solid var(--c-border); gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: var(--s-4) !important; }
.nav-tabs-esg::-webkit-scrollbar { display: none; }
.nav-tabs-esg .nav-link { border: 0; color: var(--c-text-2); font-weight: var(--fw-medium); padding: var(--s-2) var(--s-3); white-space: nowrap; font-size: var(--fs-base); border-radius: 0; }
.nav-tabs-esg .nav-link:hover { color: var(--c-navy); text-decoration: none; }
.nav-tabs-esg .nav-link.active { color: var(--c-green-900); box-shadow: inset 0 -2px 0 var(--c-emerald); background: transparent; font-weight: var(--fw-semi); }

/* ---------------------------------------------------------------- import wizard */
.wizard-steps { display: flex; gap: 0; margin-bottom: var(--s-5); background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); overflow-x: auto; }
.wizard-steps .ws { display: flex; align-items: center; gap: var(--s-2); color: var(--c-text-3); font-size: var(--fs-sm); font-weight: var(--fw-semi); white-space: nowrap; flex: 1; }
.wizard-steps .ws:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--c-border); margin: 0 var(--s-3); min-width: 16px; }
.wizard-steps .ws b { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--c-border); font-size: 11px; background: #fff; color: var(--c-text-2); flex-shrink: 0; }
.wizard-steps .ws.done { color: var(--c-green-900); }
.wizard-steps .ws.done b { background: var(--c-mint); border-color: var(--c-emerald); color: var(--c-green-900); }
.wizard-steps .ws.now { color: var(--c-navy); }
.wizard-steps .ws.now b { background: var(--c-green-900); border-color: var(--c-green-900); color: #fff; }
.dropzone { border: 1.5px dashed #CBD5E1; border-radius: var(--r-lg); background: #FAFCFB; padding: var(--s-8) var(--s-4); text-align: center; color: var(--c-text-2); transition: border-color .15s, background .15s; position: relative; }
.dropzone.dragover, .dropzone:hover { border-color: var(--c-emerald); background: var(--c-mint-50); }
.dropzone i { font-size: 30px; color: var(--c-emerald); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .fname { font-weight: var(--fw-semi); color: var(--c-navy); margin-top: var(--s-2); }
.sheet-grid { font-size: var(--fs-xs); }
.sheet-grid th { background: #F1F5F9; position: sticky; top: 0; font-weight: var(--fw-semi); color: var(--c-text-2); }
.sheet-grid td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sheet-grid tr.hdr td { background: #FEF9C3; font-weight: var(--fw-semi); }
.row-ok { background: #F7FDF9; } .row-warn { background: #FFFBEB; } .row-err { background: #FEF2F2; } .row-skip { color: var(--c-text-3); }
.count-card { background: var(--c-card); border: 1px solid var(--c-border); border-left: 3px solid var(--cc, var(--c-border)); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); }
.count-card .l { font-size: var(--fs-xs); color: var(--c-text-2); font-weight: var(--fw-semi); }
.count-card .v { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--c-navy); }

/* ---------------------------------------------------------------- modal */
.modal-content { border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.modal-header { border-bottom: 1px solid var(--c-border); padding: var(--s-4) var(--s-5); }
.modal-title { font-size: var(--fs-md); font-weight: var(--fw-semi); }
.modal-body { padding: var(--s-5); }
.modal-footer { border-top: 1px solid var(--c-border); padding: var(--s-3) var(--s-5); }

/* ---------------------------------------------------------------- auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--c-card); }
.auth-brand { background: var(--c-navy); color: #CBD5E1; padding: var(--s-10); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(5,150,105,.12); }
.auth-brand h2 { color: #fff; font-size: 28px; font-weight: var(--fw-bold); line-height: 1.25; max-width: 460px; }
.auth-brand .pill { display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-sm); color: #A7F3D0; background: rgba(5,150,105,.14); border-radius: var(--r-pill); padding: 3px 12px; }
.auth-points { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-3); max-width: 440px; }
.auth-points li { display: flex; gap: var(--s-3); font-size: var(--fs-base); }
.auth-points i { color: #34D399; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: var(--s-8) var(--s-4); background: var(--c-bg); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .card-esg { padding: var(--s-6); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1199.98px) { :root { --fs-kpi: 24px; } }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; box-shadow: var(--shadow-pop); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1030; }
  .main, body.sb-collapsed .main { margin-left: 0; }
  body.sb-collapsed .nav-item span, body.sb-collapsed .brand-text { display: inline !important; }
  body.sb-collapsed .nav-section { font-size: 10px; padding: var(--s-4) var(--s-3) var(--s-1); border: 0; }
  body.sb-collapsed .nav-item { justify-content: flex-start; padding: 0 var(--s-3); }
  .sidebar-foot { display: none; }
  .topbar { padding: 0 var(--s-4); }
  .content { padding: var(--s-4); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .user-meta { display: none; }
}
@media (max-width: 575.98px) {
  :root { --fs-kpi: 22px; --fs-xl: 19px; }
  .dq-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-toggle { display: inline-flex; }
  .filterbar:not(.open) .filterbar-row { display: none; }
  .filterbar .filter-summary { border-top: 0; margin-top: 0; padding-top: 0; }
  .filterbar.open .filter-summary { border-top: 1px dashed var(--c-border); margin-top: var(--s-2); padding-top: var(--s-2); }
  .fgroup { min-width: calc(50% - 6px); flex: 1 1 calc(50% - 6px); }
  .fgroup-actions { flex: 1 1 100%; }
  .notif-menu { width: 310px; }
  .card-esg { padding: var(--s-3) var(--s-4); }
  .wizard-steps .ws span { display: none; }
}
@media print {
  .sidebar, .topbar, .filterbar, .app-foot, .page-actions { display: none !important; }
  .main { margin: 0 !important; }
  .card-esg { box-shadow: none; break-inside: avoid; }
}
