/* ============================================================
   Explainable Credit Ledger — Ultra-Modern Fintech Design System
   Palette: Indian-Govt Deep Sapphire Navy + Saffron / Emerald accents,
   Frosted Glassmorphism, Luxury Gradients, and Crisp Typography.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Merriweather:wght@700&display=swap');

:root {
  --navy-950: #061224;
  --navy-900: #0b2038;
  --navy-800: #0f2c4a;
  --navy-700: #1a3f66;
  --navy-600: #2a527c;
  --teal-accent: #0d9488;
  --teal-deep: #0f766e;
  --teal-glow: rgba(13, 148, 136, 0.2);
  --saffron: #ff9933;
  --saffron-glow: rgba(255, 153, 51, 0.25);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.2);
  
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(224, 231, 255, 0.5) 0px, transparent 50%),
                 radial-gradient(at 100% 0%, rgba(204, 251, 241, 0.4) 0px, transparent 50%),
                 radial-gradient(at 50% 100%, rgba(241, 245, 249, 0.8) 0px, transparent 50%),
                 #f8fafc;
                 
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --border: #e2e8f0;
  --border-light: rgba(226, 232, 240, 0.8);
  --border-focus: #0d9488;
  
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --band-a: #10b981;
  --band-b: #059669;
  --band-c: #d97706;
  --band-d: #ea580c;
  --band-e: #dc2626;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.07), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 25px rgba(13, 148, 136, 0.25);
  
  --font-display: "Outfit", "Merriweather", -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", "Inter", -apple-system, sans-serif;
  --container: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-gradient);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 .5em; color: var(--navy-900); letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: var(--teal-deep); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--navy-900); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy-900); color: #fff;
  padding: 10px 20px; z-index: 999; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--teal-accent); outline-offset: 2px; }

/* Top Tricolor Strip */
.tricolor-bar { height: 4px; background: linear-gradient(90deg, var(--saffron) 0 33.3%, #ffffff 33.3% 66.6%, var(--green) 66.6% 100%); }

/* Indian Government Official Masthead */
.masthead {
  background: var(--navy-950);
  color: #cbd5e1;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.masthead .container { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.masthead-gov { display: flex; align-items: center; gap: 10px; }
.emblem { width: 22px; height: 22px; flex: none; filter: drop-shadow(0 0 4px rgba(255, 153, 51, 0.4)); }
.masthead-gov .lines { line-height: 1.3; }
.masthead-gov .lines strong { display: block; color: #fff; font-weight: 600; letter-spacing: 0.02em; }

/* Sticky Header & Navbar */
.site-header {
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  transition: all .2s ease;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand .badge {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--saffron); font-family: var(--font-display); font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 10px rgba(11, 32, 56, 0.2);
  border: 1px solid rgba(255, 153, 51, 0.3);
  flex-shrink: 0;
}
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand .brand-text .name {
  font-family: var(--font-display); font-weight: 800; color: var(--navy-900); font-size: 15.5px;
  letter-spacing: -0.01em; white-space: nowrap;
}
.brand .brand-text .sub { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

.main-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; flex-wrap: nowrap; }
.main-nav a, .main-nav button.nav-link {
  color: var(--text-muted); text-decoration: none; padding: 7px 11px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; background: none; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
  transition: all .15s cubic-bezier(0.4, 0, 0.2, 1);
}
.main-nav a:hover, .main-nav button.nav-link:hover {
  color: var(--navy-900); background: rgba(241, 245, 249, 0.9); transform: translateY(-1px);
}
.main-nav a[aria-current="page"], .main-nav a.active {
  color: var(--teal-deep); background: #f0fdfa; font-weight: 700;
  border-color: rgba(13, 148, 136, 0.3);
}

.officer-chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px 4px 6px;
  font-size: 12px; font-weight: 600; color: var(--navy-900); margin-left: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.officer-chip .avatar {
  width: 22px; height: 22px; border-radius: 50%; background: var(--navy-900); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700;
}

.queue-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10.5px; font-weight: 700; margin-left: 4px; line-height: 1;
}

/* Chart Grid & Canvas Containers */
.chart-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; margin-bottom: 24px; }
.chart-container { position: relative; width: 100%; height: 240px; }

/* History & Dashboard Tables */
table.hist-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
table.hist-table th {
  background: var(--surface-alt); padding: 11px 16px; text-align: left; font-weight: 700;
  color: var(--navy-900); border-bottom: 1px solid var(--border); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em;
}
table.hist-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.hist-table tr:hover td { background: #f8fafc; }
table.hist-table .row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }

/* Empty States */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .emoji { font-size: 36px; margin-bottom: 8px; }
.empty-state h3 { font-size: 18px; color: var(--navy-900); margin: 0 0 4px; }
.empty-state p { font-size: 14px; margin: 0; }

/* Premium Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; padding: 10px 20px;
  cursor: pointer; border: 1.5px solid transparent; text-decoration: none;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #fff; border: 1px solid rgba(255,255,255,0.1);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%); color: #fff; }
.btn-outline {
  background: var(--surface); border-color: var(--border); color: var(--navy-900);
}
.btn-outline:hover { background: var(--surface-alt); border-color: var(--navy-700); }
.btn-saffron {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.15); border: none;
}
.btn-saffron:hover { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); color: #fff; }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }

/* Glassmorphism Section Cards */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.section-card:hover {
  box-shadow: var(--shadow-md);
}
.section-card h2 { font-size: 18px; margin-bottom: 4px; color: var(--navy-900); }
.section-card p.desc { color: var(--text-muted); font-size: 13.5px; margin-bottom: 18px; }

/* Dashboard KPI Strip */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 28px; }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--teal-accent);
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-card.good::before { background: var(--success); }
.kpi-card.warn::before { background: var(--warning); }
.kpi-card.danger::before { background: var(--danger); }
.kpi-card .label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.kpi-card .value { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--navy-900); margin-top: 6px; letter-spacing: -0.02em; }
.kpi-card.good .value { color: var(--success); }
.kpi-card.warn .value { color: var(--warning); }
.kpi-card.danger .value { color: var(--danger); }

/* Landing Page Hero */
.hero {
  background: radial-gradient(circle at 80% 20%, rgba(204, 251, 241, 0.6) 0%, transparent 40%),
              radial-gradient(circle at 10% 80%, rgba(254, 243, 199, 0.4) 0%, transparent 40%),
              linear-gradient(180deg, #f0fdfa 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-top: 68px; padding-bottom: 68px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--teal-deep); background: #ccfbf1; padding: 6px 14px; border-radius: 20px; margin-bottom: 20px;
  border: 1px solid rgba(13, 148, 136, 0.2);
}
.hero h1 { font-size: 44px; line-height: 1.15; letter-spacing: -.03em; color: var(--navy-950); }
.hero .lede { font-size: 17.5px; color: var(--text-muted); max-width: 54ch; line-height: 1.65; }
.hero-ctas { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 44px; }
.hero-stats .stat .value { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--navy-900); }
.hero-stats .stat .label { font-size: 13px; color: var(--text-muted); max-width: 14ch; font-weight: 500; }

.gauge-card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg);
  position: relative;
}
.gauge-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.4), transparent 60%);
  z-index: -1;
}
.gauge-title { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; text-align: center; }
.gauge-wrap { position: relative; width: 220px; margin: 12px auto; text-align: center; }
.gauge-value { position: absolute; bottom: 30px; left: 0; right: 0; font-family: var(--font-display); font-size: 46px; font-weight: 800; color: var(--navy-900); }
.gauge-band-pill { display: inline-block; background: #ecfdf5; color: #065f46; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 12px; border: 1px solid #a7f3d0; margin-top: 6px; }
.gauge-factors { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.gauge-factor { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-muted); }
.gauge-factor .bar { width: 100px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.gauge-factor .bar i { display: block; height: 100%; background: var(--teal-accent); border-radius: 3px; }

/* Grid Sections */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: all .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(13, 148, 136, 0.4); }
.card .icon { font-size: 32px; margin-bottom: 14px; width: 52px; height: 52px; border-radius: 14px; background: #f0fdfa; display: flex; align-items: center; justify-content: center; }
.card h3 { font-size: 17px; margin-bottom: 8px; color: var(--navy-900); }
.card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.6; }

.block { padding: 72px 0; }
.block.band-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: 32px; letter-spacing: -0.02em; }
.section-head p { font-size: 16px; color: var(--text-muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.step { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; position: relative; }
.step .num { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-900); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 16px; }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* Score Breakdown Hero */
.score-hero {
  background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 28px; margin-bottom: 24px; display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: center;
  box-shadow: var(--shadow-sm);
}
.score-circle-wrap { text-align: center; position: relative; }
.score-num { position: absolute; top: 38px; left: 0; right: 0; font-family: var(--font-display); font-size: 48px; font-weight: 800; color: var(--navy-900); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.kpi { background: var(--surface-alt); border-radius: var(--radius-md); padding: 16px 20px; border: 1px solid var(--border); }
.kpi .label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi .value { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--navy-900); margin-top: 4px; }

/* Pills & Badges */
.band-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.band-A { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.band-B { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.band-C { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.band-D { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.band-E { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.fraud-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.fraud-Low { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.fraud-Medium { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.fraud-High { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.badge-pill { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.badge-pill.good { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-pill.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-pill.danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Factor Lists */
.factors-list { display: flex; flex-direction: column; gap: 10px; }
.factor-row {
  display: grid; grid-template-columns: 200px 1fr 90px; gap: 20px; align-items: center;
  background: var(--surface-alt); padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.factor-row .name { font-weight: 700; font-size: 14px; color: var(--navy-900); }
.factor-row .detail { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.factor-row .bar { height: 7px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.factor-row .bar i { display: block; height: 100%; border-radius: 4px; }
.factor-row .pts { text-align: right; font-weight: 700; font-size: 14px; color: var(--navy-900); }

/* Decision Banners */
.decision-banner {
  border-radius: var(--radius-md); padding: 22px 26px; margin-bottom: 24px;
  display: flex; gap: 18px; align-items: flex-start; border: 1px solid transparent;
}
.decision-banner .icon { font-size: 28px; line-height: 1; flex: none; }
.decision-banner h2 { margin: 0 0 4px; font-size: 20px; }
.decision-banner p { margin: 0; font-size: 14px; line-height: 1.5; }
.decision-approved { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.decision-referred { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.decision-fraud { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* Structuring & Inputs */
.structuring-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin-bottom: 24px; }
.control-row { margin-bottom: 16px; }
.control-row label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--navy-900); }
.control-row input[type="range"] { width: 100%; height: 6px; accent-color: var(--teal-accent); cursor: pointer; }
.toggle-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
.switch {
  width: 44px; height: 24px; background: #cbd5e1; border-radius: 12px; border: none; cursor: pointer;
  position: relative; transition: background .2s ease;
}
.switch::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: transform .2s ease;
}
.switch.on { background: var(--teal-accent); }
.switch.on::after { transform: translateX(20px); }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
table.schedule-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.schedule-table th { background: var(--surface-alt); padding: 12px 16px; text-align: left; font-weight: 700; color: var(--navy-900); border-bottom: 1px solid var(--border); }
table.schedule-table td { padding: 11px 16px; border-bottom: 1px solid #f1f5f9; }
table.schedule-table tr:hover td { background: #f8fafc; }
table.schedule-table tr.phase-moratorium td { background: #fefce8; }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.form-section-title { font-size: 16px; font-weight: 700; margin: 28px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); color: var(--navy-900); }
.form-section-title:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--navy-900); }
.field input, .field select, .field textarea {
  padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  font-size: 14px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal-accent); outline: none; box-shadow: 0 0 0 4px var(--teal-glow);
}
.segmented { display: flex; background: var(--surface-alt); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.seg-btn { flex: 1; border: none; background: transparent; padding: 8px 10px; font-size: 12.5px; font-weight: 600; border-radius: 6px; cursor: pointer; color: var(--text-muted); transition: all .15s ease; }
.seg-btn.active { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-xs); font-weight: 700; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }

/* OCR Scanner */
.ocr-scanner-box { background: var(--surface); border: 1.5px dashed #94a3b8; border-radius: var(--radius-md); padding: 22px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.ocr-scanner-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.ocr-icon { width: 42px; height: 42px; border-radius: 10px; background: #e0f2fe; color: #0284c7; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ocr-dropzone { border: 2px dashed #cbd5e1; background: var(--surface-alt); border-radius: var(--radius-sm); padding: 26px 16px; text-align: center; margin-top: 14px; cursor: pointer; transition: all .2s ease; }
.ocr-dropzone:hover, .ocr-dropzone.dragover { border-color: var(--teal-accent); background: #f0fdfa; }

/* Bharat Voice AI Card */
.voice-explainer-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 24px; margin-top: 24px; box-shadow: var(--shadow-sm); }
.voice-card-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.voice-avatar-icon { width: 42px; height: 42px; border-radius: 50%; background: #fef3c7; color: #d97706; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.lang-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-pill-btn { border: 1px solid var(--border); background: var(--surface-alt); color: var(--navy-900); padding: 6px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.lang-pill-btn:hover { background: #e2e8f0; }
.lang-pill-btn.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* Stress Tester */
.stress-test-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 26px; margin-top: 24px; box-shadow: var(--shadow-sm); }

/* Agentic AI Copilot Widget */
.copilot-fab {
  position: fixed; bottom: 28px; right: 28px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff; border: 2px solid #818cf8; border-radius: 30px; padding: 12px 22px;
  font-size: 14.5px; font-weight: 700; box-shadow: 0 10px 30px rgba(30, 27, 75, 0.4);
  display: flex; align-items: center; gap: 10px; cursor: pointer; z-index: 999;
  transition: transform .2s ease, box-shadow .2s ease;
}
.copilot-fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 36px rgba(30, 27, 75, 0.5); }
.copilot-fab-icon { font-size: 20px; }

.copilot-drawer {
  position: fixed; bottom: 88px; right: 28px; width: 440px; max-width: calc(100vw - 36px);
  height: 600px; max-height: calc(100vh - 120px); background: #ffffff;
  border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; z-index: 1000; overflow: hidden; animation: copilotSlideUp .25s ease-out;
}
@keyframes copilotSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.copilot-drawer-header {
  background: linear-gradient(135deg, #0b2038 0%, #1e1b4b 100%); color: #fff;
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: center;
}
.copilot-avatar { width: 36px; height: 36px; border-radius: 50%; background: #4338ca; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.copilot-close-btn { background: none; border: none; color: #cbd5e1; font-size: 26px; cursor: pointer; line-height: 1; }
.copilot-close-btn:hover { color: #fff; }

.copilot-drawer-body { flex: 1; overflow-y: auto; padding: 18px; background: #f8fafc; display: flex; flex-direction: column; gap: 12px; }
.copilot-msg { display: flex; flex-direction: column; max-width: 92%; }
.copilot-msg.assistant { align-self: flex-start; }
.copilot-msg.user { align-self: flex-end; }
.copilot-msg .msg-bubble { padding: 11px 16px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.copilot-msg.assistant .msg-bubble { background: #ffffff; color: var(--navy-900); border: 1px solid #e2e8f0; border-top-left-radius: 3px; box-shadow: var(--shadow-xs); }
.copilot-msg.user .msg-bubble { background: var(--navy-900); color: #ffffff; border-top-right-radius: 3px; }

.copilot-chips-wrap { padding: 10px 16px; background: #f1f5f9; display: flex; gap: 8px; overflow-x: auto; border-top: 1px solid #e2e8f0; }
.copilot-chip { background: #fff; border: 1px solid #cbd5e1; border-radius: 16px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--navy-700); white-space: nowrap; cursor: pointer; transition: all .15s ease; }
.copilot-chip:hover { background: #e0e7ff; border-color: #818cf8; color: #3730a3; }

.copilot-drawer-footer { padding: 14px 16px; background: #ffffff; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.copilot-drawer-footer input { flex: 1; border: 1.5px solid var(--border); border-radius: 24px; padding: 9px 16px; font-size: 13.5px; outline: none; }
.copilot-drawer-footer input:focus { border-color: #4338ca; }
.copilot-drawer-footer button { background: #4338ca; color: #fff; border: none; border-radius: 24px; padding: 9px 18px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.copilot-drawer-footer button:hover { background: #3730a3; }

/* Radar Alerts & Feed */
.radar-alert-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: all .15s ease; }
.radar-alert-item:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.radar-alert-item.alert-high { border-left: 4px solid var(--danger); background: #fff8f8; }
.radar-alert-item.alert-medium { border-left: 4px solid var(--warning); background: #fffdf5; }

/* Report Header & Controls */
.report-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 14px; }
.report-actions { display: flex; gap: 10px; }

.decision-controls { background: var(--surface-alt); border-radius: var(--radius-lg); padding: 24px; margin-top: 24px; border: 1px solid var(--border); }
.decision-controls textarea {
  width: 100%; min-height: 86px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  font-family: inherit; font-size: 14px; resize: vertical; margin-bottom: 12px;
}
.decision-controls textarea:focus { border-color: var(--teal-accent); outline: none; box-shadow: 0 0 0 4px var(--teal-glow); }
.decision-controls .actions { display: flex; gap: 12px; justify-content: flex-end; }

/* Toast Notifications */
.toast-container { position: fixed; bottom: 28px; left: 28px; display: flex; flex-direction: column; gap: 8px; z-index: 10000; }
.toast {
  background: var(--navy-950); color: #fff; padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toastFadeIn .2s ease;
}
@keyframes toastFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Footer */
.site-footer {
  background: var(--navy-950); color: #94a3b8; padding: 48px 0; font-size: 13.5px;
  border-top: 1px solid rgba(255,255,255,0.08); margin-top: 64px;
}
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.site-footer strong { color: #fff; font-size: 15px; }

/* Responsive Media Queries */
@media (max-width: 1120px) {
  .brand .brand-text .sub { display: none; }
  .main-nav { gap: 2px; }
  .main-nav a, .main-nav button.nav-link { padding: 6px 9px; font-size: 12.5px; }
}

@media (max-width: 980px) {
  .chart-grid { grid-template-columns: 1fr; }
  .score-hero { grid-template-columns: 1fr; }
  .structuring-grid { grid-template-columns: 1fr; }
  .factor-row { grid-template-columns: 1fr; }
  .hero .container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .site-header { height: auto; padding: 10px 0 8px; }
  .site-header .container { flex-direction: column; align-items: stretch; height: auto; gap: 8px; }
  .brand { justify-content: flex-start; gap: 8px; }
  .brand .brand-text .sub { display: none; }
  .brand .brand-text .name { font-size: 15px; }
  
  .main-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    gap: 6px;
    padding: 2px 2px 6px 2px;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a, .main-nav button.nav-link {
    padding: 6px 12px;
    font-size: 12.5px;
    background: var(--surface-alt);
    border-radius: 20px;
    border: 1px solid var(--border);
    flex-shrink: 0;
  }
  .main-nav a[aria-current="page"], .main-nav a.active {
    background: var(--navy-900);
    color: #ffffff !important;
    border-color: var(--navy-900);
  }
  .officer-chip {
    padding: 4px 8px;
    font-size: 11.5px;
    flex-shrink: 0;
  }

  .copilot-fab {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 12.5px;
  }
  .copilot-drawer {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 85vh;
    max-height: 85vh;
    border-radius: 18px 18px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .masthead .container { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hero h1 { font-size: 30px; }
}
