/* ═══════════════════════════════════════════════════════════
   GIZ-GRAPE II SME Hub Nepal — Design System v4.0
   Clean rebuild · Light/Dark theme · Bilingual EN/NP
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Mukta:wght@400;500;600;700&display=swap');

/* ── 1. THEME TOKENS ──────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg:           #ffffff;
  --bg-subtle:    #f8fafc;
  --bg-muted:     #f1f5f9;

  /* Surfaces */
  --surface:      #ffffff;
  --surface-2:    #f8fafc;

  /* Borders */
  --border:       #e2e8f0;
  --border-focus: #2e75b6;

  /* Text */
  --text-1:       #0f172a;
  --text-2:       #475569;
  --text-3:       #94a3b8;

  /* Brand */
  --brand:        #1f4e79;
  --brand-mid:    #2e75b6;
  --brand-light:  #eff6ff;
  --brand-border: #bfdbfe;

  /* Accent */
  --accent:       #ed7d31;
  --accent-light: #fff7ed;

  /* Semantic */
  --success:      #16a34a;
  --success-bg:   #f0fdf4;
  --warning:      #d97706;
  --warning-bg:   #fffbeb;
  --danger:       #dc2626;
  --danger-bg:    #fef2f2;
  --info:         #0284c7;
  --info-bg:      #f0f9ff;

  /* Nav */
  --nav-bg:       #1f4e79;
  --nav-text:     rgba(255,255,255,0.92);
  --nav-hover:    rgba(255,255,255,0.12);
  --nav-border:   rgba(255,255,255,0.12);

  /* Admin sidebar */
  --sidebar-bg:   #0f172a;
  --sidebar-text: rgba(255,255,255,0.75);
  --sidebar-active: rgba(255,255,255,0.12);

  /* Elevation */
  --shadow-xs:    0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:    0 1px 4px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);

  /* Shape */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;

  /* Motion */
  --ease:  0.16s ease;

  /* ── Legacy aliases ──────────────────────────────────────
     Many page-level <style> blocks were written against an
     older token set (--primary, --gray-50…800) that was never
     added to this file. Since they were undefined, the browser
     fell back to "unset" — invisible/transparent text, borders,
     and backgrounds, worst in dark mode. Aliasing them to the
     real v4 tokens fixes contrast everywhere without touching
     every page, and they auto-flip with the tokens above under
     [data-theme="dark"] since var() resolves at used-value time. */
  --primary:   var(--brand);
  --dark:      var(--text-1);
  --light:     var(--bg-subtle);
  --shadow:    var(--shadow-sm);
  --surface-1: var(--surface);
  --gray-50:   var(--bg-subtle);
  --gray-100:  var(--bg-muted);
  --gray-200:  var(--border);
  --gray-300:  var(--border);
  --gray-400:  var(--text-3);
  --gray-500:  var(--text-2);
  --gray-600:  var(--text-2);
  --gray-700:  var(--text-1);
  --gray-800:  var(--text-1);
}

[data-theme="dark"] {
  --bg:           #0f172a;
  --bg-subtle:    #1e293b;
  --bg-muted:     #334155;

  --surface:      #1e293b;
  --surface-2:    #273548;

  --border:       #334155;
  --border-focus: #60a5fa;

  --text-1:       #f1f5f9;
  --text-2:       #94a3b8;
  --text-3:       #475569;

  --brand:        #60a5fa;
  --brand-mid:    #93c5fd;
  --brand-light:  #1e3a5f;
  --brand-border: #1e40af;

  --accent:       #fb923c;
  --accent-light: #431407;

  --success:      #4ade80;
  --success-bg:   #052e16;
  --warning:      #fbbf24;
  --warning-bg:   #1c1000;
  --danger:       #f87171;
  --danger-bg:    #1f0000;
  --info:         #38bdf8;
  --info-bg:      #0c1a2e;

  --nav-bg:       #0f172a;
  --nav-text:     rgba(255,255,255,0.9);
  --nav-hover:    rgba(255,255,255,0.08);
  --nav-border:   rgba(255,255,255,0.08);

  --sidebar-bg:   #020917;
  --sidebar-text: rgba(255,255,255,0.65);
  --sidebar-active: rgba(255,255,255,0.10);

  --shadow-xs:    0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:    0 1px 4px rgba(0,0,0,.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.6);
}

/* ── 2. RESET & BASE ─────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Mukta', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-1);
  background: var(--bg);
  min-height: 100vh;
  transition: background var(--ease), color var(--ease);
}

/* Nepali font fallback */
:lang(ne), [lang="ne"], .np-text {
  font-family: 'Mukta', 'Inter', sans-serif;
}

img { display: block; max-width: 100%; }
a { color: var(--brand-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ── 3. PUBLIC NAV ───────────────────────────────────────── */

.pub-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  display: flex;
  align-items: center;
  gap: 0;
  height: 58px;
  padding: 0 20px;
  box-shadow: var(--shadow-md);
}

.pub-nav-brand {
  font-size: 17px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  margin-right: 24px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -.01em;
}
.pub-nav-brand span { color: #FFD966; }

/* Mega-nav container */
.mega-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}

.mega-nav-item {
  position: relative;
}

.mega-nav-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-text);
  background: none;
  border: none;
  border-radius: var(--r-sm);
  text-decoration: none !important;
  white-space: nowrap;
  transition: background var(--ease);
}
.mega-nav-btn:hover,
.mega-nav-item.open > .mega-nav-btn {
  background: var(--nav-hover);
  color: #fff;
}
.mega-nav-btn .arrow {
  font-size: 9px;
  opacity: .7;
  transition: transform var(--ease);
}
.mega-nav-item.open .arrow { transform: rotate(180deg); }

/* Dropdown panel */
.mega-dropdown {
  display: none;
  position: fixed;
  top: 58px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 24px 24px 24px 240px;
  z-index: 300;
  animation: ddIn .15s ease;
}
.mega-dropdown.open { display: flex; gap: 0; }

@keyframes ddIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mega-dd-col {
  flex: 1;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.mega-dd-col:first-child { padding-left: 0; }
.mega-dd-col:last-child  { border-right: none; }

.mega-dd-col-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.mega-dd-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--r-sm);
  text-decoration: none !important;
  color: var(--text-1);
  transition: background var(--ease);
  margin-bottom: 2px;
}
.mega-dd-link:hover { background: var(--bg-subtle); }
.mega-dd-link .dd-ico { font-size: 1.25rem; flex-shrink: 0; margin-top: 1px; }
.mega-dd-link strong  { display: block; font-size: 13px; font-weight: 600; color: var(--text-1); }
.mega-dd-link small   { display: block; font-size: 11px; color: var(--text-2); line-height: 1.4; margin-top: 1px; }

/* Right side of nav */
.mega-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--nav-hover);
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
  font-size: 16px;
  transition: background var(--ease);
}
.theme-toggle:hover { background: rgba(255,255,255,.2); }

/* Lang toggle button */
.lang-toggle {
  padding: 5px 12px;
  border-radius: var(--r-sm);
  background: var(--nav-hover);
  border: 1px solid var(--nav-border);
  color: var(--nav-text);
  font-size: 12px;
  font-weight: 600;
  transition: background var(--ease);
}
.lang-toggle:hover { background: rgba(255,255,255,.2); }

/* ── 4. MOBILE NAV ───────────────────────────────────────── */

.mob-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  z-index: 200;
  height: 56px;
}
.mob-bottom-bar-inner {
  display: flex;
  height: 100%;
}
.mob-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--nav-text);
  background: none;
  border: none;
  text-decoration: none !important;
  opacity: .7;
  transition: opacity var(--ease), background var(--ease);
}
.mob-tab:hover, .mob-tab.active { opacity: 1; background: var(--nav-hover); }
.mob-tab .ico { font-size: 1.2rem; }

/* Mobile slide-up sheet */
.mob-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
}
.mob-sheet.open { display: block; }
.mob-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.mob-sheet-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px 16px 40px;
  animation: sheetUp .22s ease;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mob-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.mob-menu-group { margin-bottom: 16px; }
.mob-menu-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 6px;
  padding: 0 4px;
}
.mob-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background var(--ease);
}
.mob-menu-link:hover { background: var(--bg-subtle); }
.mob-menu-link .ico { font-size: 1.15rem; width: 22px; text-align: center; }

@media (max-width: 768px) {
  .mega-nav, .mega-nav-right { display: none; }
  .mob-bottom-bar { display: flex; }
  body { padding-bottom: 56px; }
}

/* ── 5. PAGE LAYOUT ──────────────────────────────────────── */

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

.page-header {
  margin-bottom: 32px;
}
.page-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-mid);
  margin-bottom: 6px;
}
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.25;
  margin-bottom: 8px;
}
.page-desc {
  font-size: 14px;
  color: var(--text-2);
  max-width: 600px;
  line-height: 1.65;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 100%);
  color: #fff;
  padding: 52px 0 44px;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
.hero-title span { color: #FFD966; }
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.8);
  margin-bottom: 28px;
  max-width: 560px;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-hero {
  padding: 11px 24px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  transition: all var(--ease);
}
.btn-hero-primary { background: var(--accent); color: #fff; }
.btn-hero-primary:hover { background: #d96b20; transform: translateY(-1px); }
.btn-hero-outline {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.22); }

/* ── 6. CARDS ────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--ease), border-color var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-body { padding: 20px; }

/* Info card variants */
.card-info   { border-left: 3px solid var(--info);    background: var(--info-bg); }
.card-warn   { border-left: 3px solid var(--warning); background: var(--warning-bg); }
.card-success{ border-left: 3px solid var(--success); background: var(--success-bg); }
.card-danger { border-left: 3px solid var(--danger);  background: var(--danger-bg); }

/* Step card */
.step-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: box-shadow var(--ease);
}
.step-card:hover { box-shadow: var(--shadow-sm); }
.step-num {
  width: 32px;
  height: 32px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-body { flex: 1; min-width: 0; }
.step-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.step-desc  { font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* Icon card */
.icon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
  transition: all var(--ease);
  text-decoration: none !important;
  color: inherit;
  display: block;
}
.icon-card:hover {
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.icon-card .ico { font-size: 2rem; margin-bottom: 10px; }
.icon-card .ico-title { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 4px; }
.icon-card .ico-sub   { font-size: 12px; color: var(--text-2); line-height: 1.4; }

/* ── 7. GRIDS ────────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: repeat(2,1fr); }
  .page-wrap { padding: 20px 16px; }
  .hero-title { font-size: 1.6rem; }
}

/* ── 8. TABS ─────────────────────────────────────────────── */

.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  margin-bottom: 24px;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--ease);
}
.tab-btn:hover { color: var(--text-1); }
.tab-btn.active { color: var(--brand-mid); border-bottom-color: var(--brand-mid); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── 9. BUTTONS ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: all var(--ease);
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-mid);
  color: #fff;
  border-color: var(--brand-mid);
}
.btn-primary:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-1px); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: #d96b20; }

.btn-secondary {
  background: var(--surface);
  color: var(--text-1);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--brand-mid); color: var(--brand-mid); }

.btn-ghost {
  background: none;
  color: var(--brand-mid);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--brand-light); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ── 10. FORM ELEMENTS ───────────────────────────────────── */

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-1);
  font-family: inherit;
  transition: border-color var(--ease);
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.form-input::placeholder { color: var(--text-3); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* Search bar */
.search-bar {
  position: relative;
}
.search-bar input {
  padding-left: 38px;
}
.search-bar::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}

/* ── 11. TABLES ──────────────────────────────────────────── */

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-subtle); }

/* ── 12. BADGES ──────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-blue    { background: var(--brand-light); color: var(--brand); border: 1px solid var(--brand-border); }
.badge-green   { background: var(--success-bg); color: var(--success); }
.badge-orange  { background: var(--accent-light); color: var(--accent); }
.badge-yellow  { background: var(--warning-bg); color: var(--warning); }
.badge-red     { background: var(--danger-bg); color: var(--danger); }
.badge-gray    { background: var(--bg-muted); color: var(--text-2); }

/* ── 13. ACCORDION ───────────────────────────────────────── */

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 8px;
}
.accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
  transition: background var(--ease);
}
.accordion-btn:hover { background: var(--bg-subtle); }
.accordion-btn .acc-arrow { transition: transform var(--ease); font-size: 12px; color: var(--text-3); }
.accordion-item.open .acc-arrow { transform: rotate(180deg); }
.accordion-body {
  display: none;
  padding: 16px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
}
.accordion-item.open .accordion-body { display: block; }

/* ── 14. CHIP / TAG ──────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-muted);
  color: var(--text-2);
  border: 1px solid var(--border);
  text-decoration: none !important;
  transition: all var(--ease);
}
.chip:hover { border-color: var(--brand-mid); color: var(--brand-mid); background: var(--brand-light); }
.chip-active { background: var(--brand-light); color: var(--brand-mid); border-color: var(--brand-border); }

/* Quick strip */
.chip-strip {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  gap: 8px;
  scrollbar-width: none;
}
.chip-strip::-webkit-scrollbar { display: none; }

/* ── 15. KPI TILES ───────────────────────────────────────── */

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border-radius: var(--r-lg); overflow: hidden; }
.kpi-tile {
  background: var(--surface);
  padding: 18px 20px;
}
.kpi-val { font-size: 1.6rem; font-weight: 800; color: var(--text-1); line-height: 1; margin-bottom: 4px; }
.kpi-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.kpi-delta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kpi-delta.up   { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* ── 16. MODAL ───────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-1); }
.modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: var(--bg-muted);
  border: none;
  font-size: 16px;
  color: var(--text-2);
  transition: background var(--ease);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── 17. TOAST / ALERT ───────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.alert-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info); }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.alert-warn    { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger); }
.alert-ico { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert strong { display: block; font-weight: 700; margin-bottom: 2px; }

/* ── 18. WIZARD ──────────────────────────────────────────── */

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.wiz-step {
  flex: 1;
  text-align: center;
  position: relative;
}
.wiz-step::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.wiz-step:last-child::after { display: none; }
.wiz-step.done::after, .wiz-step.active::after { background: var(--brand-mid); }
.wiz-step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  position: relative;
  z-index: 1;
  transition: all var(--ease);
}
.wiz-step.active .wiz-step-num  { background: var(--brand-mid); color: #fff; }
.wiz-step.done   .wiz-step-num  { background: var(--success); color: #fff; }
.wiz-step-label { font-size: 11px; font-weight: 500; color: var(--text-3); }
.wiz-step.active .wiz-step-label { color: var(--brand-mid); font-weight: 700; }
.wiz-step.done   .wiz-step-label { color: var(--success); }

.wiz-page { display: none; }
.wiz-page.active { display: block; }

.choice-card {
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--ease);
  background: var(--surface);
  user-select: none;
}
.choice-card:hover { border-color: var(--brand-mid); }
.choice-card.selected { border-color: var(--brand-mid); background: var(--brand-light); }
.choice-card .cc-ico { font-size: 1.5rem; flex-shrink: 0; }
.choice-card .cc-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.choice-card .cc-sub   { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ── 19. ADMIN LAYOUT ────────────────────────────────────── */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.admin-sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 8px;
}
.admin-sidebar-logo h2 { font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.admin-sidebar-logo p  { font-size: 10px; color: rgba(255,255,255,.4); margin-top: 2px; }

.admin-nav-group { margin-bottom: 4px; padding: 0 8px; }
.admin-nav-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.3);
  padding: 8px 8px 4px;
}
.admin-nav-group a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none !important;
  transition: all var(--ease);
}
.admin-nav-group a:hover { background: var(--sidebar-active); color: #fff; }
.admin-nav-group a.active { background: var(--sidebar-active); color: #fff; }
.admin-nav-group a span:first-child { font-size: 15px; }

.admin-main {
  flex: 1;
  margin-left: 220px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar h2 { font-size: 18px; font-weight: 700; color: var(--text-1); }

.admin-content { padding: 24px; flex: 1; }

/* ── 20. SECTION DIVIDER ─────────────────────────────────── */

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── 21. PROGRESS BAR ────────────────────────────────────── */

.progress-bar {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--brand-mid);
  border-radius: 4px;
  transition: width .4s ease;
}

/* ── 22. LANGUAGE TRANSITION ─────────────────────────────── */

[data-en], [data-np] {
  transition: opacity .15s ease;
}

/* ── 23. UTILITY CLASSES ─────────────────────────────────── */

.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.text-1  { color: var(--text-1); }
.text-2  { color: var(--text-2); }
.text-3  { color: var(--text-3); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-600  { font-weight: 600; }
.fw-700  { font-weight: 700; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
