@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=Noto+Serif:wght@400;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Government palette: deep navy + saffron + white */
  --navy:         #0D2C54;
  --navy-dark:    #081B35;
  --navy-mid:     #1A3F6F;
  --navy-light:   #EBF0F8;
  --saffron:      #E07B2A;
  --saffron-dark: #B85E18;
  --saffron-light:#FDF0E4;
  --green:        #1B6B3A;
  --green-light:  #E4F4EC;
  --crimson:      #C0392B;
  --crimson-light:#FDEDEB;
  --amber:        #D4780A;
  --amber-light:  #FEF5E4;
  --teal:         #1A6B8A;
  --teal-light:   #E3F2F8;
  --violet:       #6C3483;
  --violet-light: #F4ECF7;

  /* Escalation level colours */
  --esc-l0:       #6b7280;
  --esc-l1:       #D4780A;
  --esc-l2:       #E07B2A;
  --esc-l3:       #C0392B;
  --esc-l4:       #6C3483;

  /* Neutral */
  --text:         #0D1B2A;
  --text-muted:   #5D6D7E;
  --text-light:   #9CA3AF;
  --bg:           #F5F6FA;
  --bg-white:     #FFFFFF;
  --border:       #DDE3ED;
  --border-dark:  #B8C5D6;

  /* Layout */
  --sidebar-w:    256px;
  --header-h:     64px;

  /* Geometry */
  --radius:       8px;
  --radius-lg:    12px;
  --radius-xl:    18px;

  /* Elevation */
  --shadow-xs:    0 1px 2px rgba(13,44,84,0.06);
  --shadow-sm:    0 2px 6px rgba(13,44,84,0.08);
  --shadow:       0 4px 16px rgba(13,44,84,0.10);
  --shadow-md:    0 8px 28px rgba(13,44,84,0.13);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
}
a { color: var(--navy-mid); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--saffron-dark); }
img { max-width: 100%; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy-dark);
  color: #fff;
  position: fixed; top: 0; left: 0; height: 100vh;
  display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
  border-right: 3px solid var(--saffron);
}

.sidebar-brand {
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-emblem {
  width: 38px; height: 38px;
  background: var(--saffron);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-emblem svg { width: 22px; height: 22px; fill: white; }
.brand-name {
  font-family: 'Noto Serif', serif;
  font-size: 13px; font-weight: 700;
  color: #fff; line-height: 1.25;
  letter-spacing: 0.01em;
}
.brand-sub { font-size: 10px; color: rgba(255,255,255,0.45); letter-spacing: 0.06em; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-section {
  padding: 16px 16px 4px;
  font-size: 9.5px; font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 18px;
  color: rgba(255,255,255,0.62);
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); text-decoration: none; }
.nav-item.active { color: #fff; background: rgba(224,123,42,0.18); border-left-color: var(--saffron); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .75; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--crimson);
  color: #fff; font-size: 10px; font-weight: 600;
  border-radius: 10px; padding: 1px 7px;
  min-width: 20px; text-align: center;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
}
.sidebar-footer a {
  color: rgba(255,255,255,0.45);
  display: flex; align-items: center; gap: 8px;
  transition: color .15s;
}
.sidebar-footer a:hover { color: #fff; text-decoration: none; }
.sidebar-footer a svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ── MAIN ─────────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-xs);
}
.topbar-title {
  font-family: 'Noto Serif', serif;
  font-size: 17px; font-weight: 600;
  color: var(--navy);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-muted); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy-light);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  border: 2px solid var(--saffron);
}
.topbar-link {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--saffron);
  color: #fff;
  border-radius: var(--radius);
  font-size: 12.5px; font-weight: 600;
  transition: background .15s;
}
.topbar-link:hover { background: var(--saffron-dark); color: #fff; text-decoration: none; }
.topbar-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── CONTENT ─────────────────────────────────────────────── */
.content { flex: 1; padding: 28px; }

/* ── FLASH / ALERTS ──────────────────────────────────────── */
.alert {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; margin: 0 28px 0;
  font-size: 13.5px; font-weight: 500;
  border-left: 4px solid; border-radius: 0 var(--radius) var(--radius) 0;
  transition: opacity .4s;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; }
.alert-success { background: var(--green-light); border-color: var(--green); color: var(--green); }
.alert-error   { background: var(--crimson-light); border-color: var(--crimson); color: var(--crimson); }
.alert-warning { background: var(--amber-light); border-color: var(--amber); color: var(--amber); }
.alert-info    { background: var(--teal-light); border-color: var(--teal); color: var(--teal); }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-header-left h1 {
  font-family: 'Noto Serif', serif;
  font-size: 22px; font-weight: 700;
  color: var(--navy);
}
.page-header-left p { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title {
  font-family: 'Noto Serif', serif;
  font-size: 15px; font-weight: 600; color: var(--navy);
}
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── KPI STAT CARDS ──────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.navy::before    { background: var(--navy); }
.stat-card.saffron::before { background: var(--saffron); }
.stat-card.green::before   { background: var(--green); }
.stat-card.crimson::before { background: var(--crimson); }
.stat-card.teal::before    { background: var(--teal); }
.stat-card.amber::before   { background: var(--amber); }
.stat-card.violet::before  { background: var(--violet); }

.stat-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.stat-icon.navy   { background: var(--navy-light); color: var(--navy); }
.stat-icon.saffron{ background: var(--saffron-light); color: var(--saffron-dark); }
.stat-icon.green  { background: var(--green-light); color: var(--green); }
.stat-icon.crimson{ background: var(--crimson-light); color: var(--crimson); }
.stat-icon.teal   { background: var(--teal-light); color: var(--teal); }
.stat-icon.amber  { background: var(--amber-light); color: var(--amber); }
.stat-icon.violet { background: var(--violet-light); color: var(--violet); }

.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 4px; font-family: 'IBM Plex Mono', monospace; }
.stat-sub   { font-size: 11.5px; color: var(--text-muted); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  text-decoration: none; transition: all .15s; white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.btn-primary    { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-mid); color: #fff; text-decoration: none; }
.btn-saffron    { background: var(--saffron); color: #fff; border-color: var(--saffron); }
.btn-saffron:hover { background: var(--saffron-dark); color: #fff; text-decoration: none; }
.btn-secondary  { background: var(--bg-white); color: var(--text); border-color: var(--border-dark); }
.btn-secondary:hover { background: var(--bg); text-decoration: none; }
.btn-danger     { background: var(--crimson); color: #fff; border-color: var(--crimson); }
.btn-danger:hover { opacity: .9; color: #fff; text-decoration: none; }
.btn-success    { background: var(--green); color: #fff; border-color: var(--green); }
.btn-success:hover { opacity: .9; color: #fff; text-decoration: none; }
.btn-ghost      { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.btn-sm         { padding: 6px 14px; font-size: 12.5px; }
.btn-xs         { padding: 4px 10px; font-size: 11.5px; border-radius: 5px; }
.btn-outline    { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy-light); text-decoration: none; }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
  white-space: nowrap; letter-spacing: 0.02em;
}
.badge-open        { background: var(--navy-light); color: var(--navy); }
.badge-responded   { background: var(--teal-light); color: var(--teal); }
.badge-resolved    { background: var(--green-light); color: var(--green); }
.badge-closed      { background: #f3f4f6; color: var(--text-muted); }
.badge-secondary   { background: #f3f4f6; color: var(--text-muted); }
.badge-new  { background: var(--navy-light); color: var(--navy); }
.badge-l1   { background: var(--amber-light); color: var(--amber); }
.badge-l2   { background: var(--saffron-light); color: var(--saffron-dark); }
.badge-l3   { background: var(--crimson-light); color: var(--crimson); }
.badge-l4   { background: var(--violet-light); color: var(--violet); }

/* Priority badges */
.badge-low      { background: var(--green-light); color: var(--green); }
.badge-normal   { background: var(--navy-light); color: var(--navy); }
.badge-high     { background: var(--amber-light); color: var(--amber); }
.badge-critical { background: var(--crimson-light); color: var(--crimson); }

/* ── FORMS ───────────────────────────────────────────────── */
.form-group   { margin-bottom: 20px; }
.form-label   { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-label .required { color: var(--crimson); margin-left: 2px; }
.form-control {
  width: 100%; padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  color: var(--text); background: var(--bg-white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus { border-color: var(--navy-mid); box-shadow: 0 0 0 3px rgba(26,63,111,0.1); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--crimson); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-section { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 24px; }
.form-section-title {
  font-family: 'Noto Serif', serif;
  font-size: 14px; font-weight: 700;
  color: var(--navy); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.form-section-title svg { width: 16px; height: 16px; stroke: var(--saffron); fill: none; stroke-width: 2; }

/* File upload */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.file-upload:hover { border-color: var(--navy-mid); background: var(--navy-light); }
.file-upload input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-upload-icon { width: 36px; height: 36px; stroke: var(--text-muted); fill: none; stroke-width: 1.5; margin: 0 auto 10px; }
.file-upload-label { font-size: 13px; color: var(--text-muted); }
.file-upload-label strong { color: var(--navy-mid); }

/* ── TABLES ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 11px 14px; text-align: left; white-space: nowrap;
}
.table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.table tbody tr:hover td { background: var(--navy-light); }
.table tbody tr:last-child td { border-bottom: none; }
.table-mono { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--text-muted); }

/* Actions cluster */
.actions { display: flex; align-items: center; gap: 5px; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state svg { width: 56px; height: 56px; stroke: var(--border-dark); fill: none; stroke-width: 1.2; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; color: var(--text-muted); font-weight: 500; }
.empty-state p  { font-size: 13px; color: var(--text-light); margin-top: 6px; }

/* ── GRS ID CHIP ─────────────────────────────────────────── */
.grs-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; font-weight: 500;
  background: var(--navy-light); color: var(--navy);
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap;
}

/* ── GRIEVANCE DETAIL ─────────────────────────────────────── */
.grievance-photo img {
  width: 100%; max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.escalation-track {
  display: flex; align-items: center;
  gap: 0; margin-bottom: 32px;
  overflow-x: auto;
}
.esc-step {
  flex: 1; min-width: 120px;
  text-align: center;
  position: relative;
}
.esc-step::after {
  content: '';
  position: absolute; top: 17px; left: 50%; right: -50%;
  height: 2px; background: var(--border);
  z-index: 0;
}
.esc-step:last-child::after { display: none; }
.esc-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; position: relative; z-index: 1;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600;
  color: var(--text-muted);
}
.esc-dot.active  { border-color: var(--saffron); background: var(--saffron); color: #fff; }
.esc-dot.done    { border-color: var(--green); background: var(--green); color: #fff; }
.esc-dot.critical{ border-color: var(--crimson); background: var(--crimson); color: #fff; }
.esc-label { font-size: 11px; font-weight: 600; color: var(--text-muted); line-height: 1.3; }
.esc-label.active  { color: var(--saffron-dark); }
.esc-label.done    { color: var(--green); }
.esc-label.critical{ color: var(--crimson); }

/* ── TIMELINE (responses) ────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-dot {
  position: absolute; left: -24px; top: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--navy-mid);
  z-index: 1;
}
.timeline-dot.resolved { border-color: var(--green); background: var(--green); }
.timeline-dot.escalated{ border-color: var(--amber); background: var(--amber); }
.timeline-dot.filed    { border-color: var(--navy); background: var(--navy); }
.timeline-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}
.timeline-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.timeline-who { font-size: 13px; font-weight: 600; color: var(--text); }
.timeline-when { font-size: 11.5px; color: var(--text-muted); font-family: 'IBM Plex Mono', monospace; }
.timeline-text { font-size: 13.5px; color: var(--text-muted); line-height: 1.65; }
.timeline-photo { margin-top: 12px; }
.timeline-photo img { max-width: 260px; border-radius: var(--radius); border: 1px solid var(--border); }

/* ── GEO TABLE ───────────────────────────────────────────── */
.geo-table td .progress-wrap { width: 100%; }
.progress-bar {
  height: 5px; border-radius: 3px;
  background: var(--border); margin-top: 5px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: var(--green); transition: width .4s;
}

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; stroke: var(--text-muted); fill: none; stroke-width: 2; }
.search-input-wrap input { padding-left: 36px; }

/* ── PUBLIC PORTAL STYLES ────────────────────────────────── */
.portal-header {
  background: var(--navy-dark);
  border-bottom: 4px solid var(--saffron);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.portal-brand { display: flex; align-items: center; gap: 14px; }
.portal-brand-text h1 { font-family: 'Noto Serif', serif; font-size: 18px; color: #fff; }
.portal-brand-text p  { font-size: 11px; color: rgba(255,255,255,0.5); }
.portal-nav { display: flex; align-items: center; gap: 14px; }
.portal-nav a { color: rgba(255,255,255,0.7); font-size: 13.5px; font-weight: 500; transition: color .15s; }
.portal-nav a:hover { color: #fff; text-decoration: none; }
.portal-nav a.active { color: var(--saffron); }

.portal-body { max-width: 780px; margin: 40px auto; padding: 0 20px; }
.portal-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.portal-title {
  font-family: 'Noto Serif', serif;
  font-size: 22px; font-weight: 700;
  color: var(--navy); margin-bottom: 6px;
}
.portal-subtitle { font-size: 13.5px; color: var(--text-muted); margin-bottom: 28px; }
.portal-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* Confirm page */
.confirm-box {
  text-align: center; padding: 40px;
}
.confirm-check {
  width: 72px; height: 72px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.confirm-check svg { width: 38px; height: 38px; stroke: var(--green); fill: none; stroke-width: 2.5; }
.confirm-grs-id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px; font-weight: 700;
  color: var(--navy);
  background: var(--navy-light);
  padding: 12px 28px;
  border-radius: var(--radius);
  display: inline-block; margin: 16px 0;
  border: 2px dashed var(--navy-mid);
  letter-spacing: 0.06em;
}
.info-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 24px; text-align: left;
}
.info-item label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); display: block; margin-bottom: 2px; }
.info-item span  { font-size: 14px; color: var(--text); }

/* ── FILTER PILLS ────────────────────────────────────────── */
.filter-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border-radius: 20px; border: 1.5px solid var(--border);
  font-size: 12.5px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; transition: all .15s; text-decoration: none;
}
.filter-pill:hover { border-color: var(--navy-mid); color: var(--navy); text-decoration: none; }
.filter-pill.active { border-color: var(--navy); background: var(--navy); color: #fff; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--navy-dark);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent 0px, transparent 40px,
    rgba(224,123,42,0.04) 40px, rgba(224,123,42,0.04) 41px
  );
}
.login-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  width: 420px; max-width: calc(100vw - 40px);
  box-shadow: var(--shadow-md);
  position: relative; z-index: 1;
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-emblem {
  width: 60px; height: 60px;
  background: var(--navy);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  border: 3px solid var(--saffron);
}
.login-emblem svg { width: 32px; height: 32px; fill: white; }
.login-title { font-family: 'Noto Serif', serif; font-size: 20px; font-weight: 700; color: var(--navy); }
.login-sub   { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: var(--text-muted); }

/* ── DASHBOARD GEO CARDS ──────────────────────────────────── */
.geo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.section-title {
  font-family: 'Noto Serif', serif;
  font-size: 16px; font-weight: 700; color: var(--navy);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.section-title svg { width: 17px; height: 17px; stroke: var(--saffron); fill: none; stroke-width: 2; }

/* ── SLA TIMER ─────────────────────────────────────────────── */
.sla-block {
  background: var(--amber-light); border: 1px solid var(--amber);
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.sla-block.breach { background: var(--crimson-light); border-color: var(--crimson); }
.sla-block svg { width: 20px; height: 20px; stroke: var(--amber); fill: none; stroke-width: 2; flex-shrink: 0; }
.sla-block.breach svg { stroke: var(--crimson); }
.sla-text { font-size: 13px; color: var(--amber); }
.sla-block.breach .sla-text { color: var(--crimson); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .geo-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .portal-card { padding: 24px 20px; }
  .login-card { padding: 28px 22px; }
  .content { padding: 16px; }
}

@media print {
  .sidebar, .topbar, .btn, .search-bar { display: none !important; }
  .main { margin-left: 0 !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
