:root {
  --paper: #EEF1F4;
  --panel: #FFFFFF;
  --panel-2: #F5F7F9;
  --ink: #101B2D;
  --ink-soft: #4B5768;
  --ink-faint: #8996A6;
  --line: #D7DCE3;
  --line-strong: #B9C1CC;
  --teal: #0B6E63;
  --teal-dim: #E4F1EF;
  --amber: #C9821F;
  --amber-dim: #FBF0DF;
  --red: #B23A2E;
  --red-dim: #FAE7E4;
  --indigo: #2B4C7E;
  --indigo-dim: #E7ECF4;
  --radius: 5px;
  --disp: 'Anek Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: 'Anek Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, "SF Mono", "Cascadia Code", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.tricolor-strip {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #D97706 0 33.3%, #FFFFFF 33.3% 66.6%, #0B6E63 66.6% 100%);
}

/* ---------- Letterhead ---------- */
header.letterhead {
  background: var(--ink);
  color: #EDEFF3;
  padding: 18px 28px 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 3px solid var(--teal);
}

.lh-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lh-eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9FB3C8;
}

.lh-title {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 30px;
  color: #FFFFFF;
  line-height: 1.15;
}

.lh-title small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 14px;
  color: #B7C3D1;
  margin-top: 3px;
  line-height: 1.4;
}

.lh-tagline {
  font-family: var(--sans);
  font-size: 14px;
  color: #C6D0DC;
}

.lh-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-sample {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--amber);
  color: #FBCF8B;
  background: rgba(201, 130, 31, .14);
  padding: 6px 10px;
  border-radius: 2px;
  white-space: nowrap;
}

.badge-sample b {
  color: #FFD48A;
}

/* ---------- Top bar (home + breadcrumb) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #0C1626;
  border-bottom: 1px solid #1E2C42;
  padding: 11px 20px;
}

.home-btn {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 15px;
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
}

.home-btn:hover {
  background: #095950;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #9FB3C8;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 22px 80px;
}

.panel {
  display: none;
  animation: fadein .25s ease;
}

.panel.active {
  display: block;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-back {
  margin-bottom: 16px;
}

h2.panel-title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 25px;
  margin: 2px 0 5px;
  color: var(--ink);
}

p.panel-sub {
  color: var(--ink-soft);
  font-size: 14.8px;
  margin: 0 0 14px;
  max-width: 760px;
  line-height: 1.6;
}

.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
  display: block;
}

/* ---------- Embedded Department AI Sahayak Card ---------- */
.sahayak-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 0;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.sahayak-copilot-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 12px;
}

.sahayak-copilot-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sahayak-copilot-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #10b981;
  overflow: visible;
  flex-shrink: 0;
}

.sahayak-copilot-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sahayak-live-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f172a;
}

.sahayak-copilot-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.sahayak-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sahayak-copilot-desc {
  margin: 3px 0 0 0;
  font-size: 12.5px;
  color: #94a3b8;
}

.sahayak-status-pill {
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Quick Topic Chips */
.sahayak-quick-chips-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  overflow-x: auto;
}

.sahayak-chips-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.sahayak-chips-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sahayak-chips-scroll::-webkit-scrollbar { display: none; }

.sahayak-topic-chip {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sahayak-topic-chip:hover {
  background: #0B6E63;
  color: #FFFFFF;
  border-color: #0B6E63;
  transform: translateY(-1px);
}

/* Answers Stream */
.sahayak-answers {
  min-height: 280px;
  max-height: 440px;
  overflow-y: auto;
  background: #F8FAFC;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: none;
  border-radius: 0;
}

/* Welcome Box when Empty */
.sahayak-welcome-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  margin: auto;
  padding: 20px 10px;
}

.sw-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid #0B6E63;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(11, 110, 99, 0.25);
}

.sw-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sahayak-welcome-box h4 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.sahayak-welcome-box p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.sw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 768px) {
  .sw-grid { grid-template-columns: 1fr; }
}

.sw-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sw-card:hover {
  border-color: #0B6E63;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 110, 99, 0.12);
}

.sw-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.sw-card strong {
  font-size: 13.5px;
  color: #0f172a;
  font-weight: 700;
}

.sw-card span {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

/* Chat Message Rows */
.sahayak-msg-row {
  display: flex;
  width: 100%;
}
.sahayak-msg-row.user {
  justify-content: flex-end;
}
.sahayak-msg-row.bot {
  justify-content: flex-start;
  gap: 10px;
}

.sahayak-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid #0B6E63;
  margin-top: 2px;
}
.sahayak-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sahayak-msg-bubble {
  padding: 14px 18px;
  line-height: 1.55;
  font-size: 14.5px;
  max-width: 82%;
  word-break: break-word;
}

.sahayak-msg-bubble.user {
  background: #1E3A5F;
  color: #FFFFFF;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.15);
}

.sahayak-msg-bubble.bot {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.sahayak-bot-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 6px;
}

.sahayak-msg-sender {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sahayak-msg-bubble.user .sahayak-msg-sender {
  color: #93c5fd;
  display: block;
  margin-bottom: 4px;
}

.sahayak-tts-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  color: #0B6E63;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.sahayak-tts-btn:hover {
  background: #0B6E63;
  color: #FFFFFF;
}

/* Integrated Input Capsule */
.sahayak-input-group {
  padding: 16px 24px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
}

.sahayak-input-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 30px;
  padding: 4px 6px 4px 16px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.sahayak-input-capsule:focus-within {
  border-color: #0B6E63;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(11, 110, 99, 0.15);
}

.sahayak-input-icon {
  font-size: 18px;
  color: #94a3b8;
}

.sahayak-input-capsule input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14.5px;
  color: #0f172a;
  padding: 8px 4px;
  font-family: var(--sans);
}

.sahayak-voice-inline {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #0f172a;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sahayak-voice-inline:hover {
  background: #E4F1EF;
  border-color: #0B6E63;
}
.sahayak-voice-inline.listening {
  background: #dc2626;
  color: #FFFFFF;
  border-color: #dc2626;
  animation: sahayakMicPulse 0.9s infinite;
}
@keyframes sahayakMicPulse {
  0%,100%{ box-shadow:0 0 0 0 rgba(220,38,38,0.45); }
  50%{ box-shadow:0 0 0 10px rgba(220,38,38,0); }
}

.sahayak-submit-btn {
  background: #0B6E63;
  color: #FFFFFF;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.sahayak-submit-btn:hover {
  background: #08524a;
  transform: scale(1.02);
}

/* Actions Bar below Capsule */
.sahayak-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px 14px;
  background: #FFFFFF;
}

.sahayak-clear-link {
  background: none;
  border: none;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.sahayak-clear-link:hover {
  color: #dc2626;
  text-decoration: underline;
}

.sahayak-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.sahayak-avatar-btn:hover {
  background: #E2E8F0;
  border-color: #94a3b8;
}

.sahayak-voice-status {
  font-size: 12.5px;
  color: var(--amber);
  text-align: center;
}

.sahayak-samples-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.sahayak-samples-title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
}

.sahayak-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sahayak-chip {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
  user-select: none;
  text-align: left;
}

.sahayak-chip:hover {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal);
}

.sahayak-chip.active {
  border: 2px solid var(--teal);
  background: var(--teal-dim);
  color: var(--teal);
  font-weight: 600;
}

/* ---------- Generic panel/card system ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width:860px) {
  .grid2 {
    grid-template-columns: 1fr;
  }

  .grid3 {
    grid-template-columns: 1fr;
  }
}

.section-label {
  font-family: var(--disp);
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- signal dots ---------- */
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.dot-green {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.dot-amber {
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}

.dot-red {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 3px var(--red-dim);
  }

  50% {
    box-shadow: 0 0 0 6px var(--red-dim);
  }

  100% {
    box-shadow: 0 0 0 3px var(--red-dim);
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--ink-soft);
}

.pill.green {
  border-color: #BFE1D9;
  background: var(--teal-dim);
  color: #0A5A51;
}

.pill.amber {
  border-color: #EAD1A3;
  background: var(--amber-dim);
  color: #8C5F14;
}

.pill.red {
  border-color: #E7B9B3;
  background: var(--red-dim);
  color: #8F2C22;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.3px;
}

thead th {
  text-align: left;
  font-family: var(--disp);
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-strong);
  padding: 0 10px 8px;
  font-weight: 600;
}

tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:hover {
  background: var(--panel-2);
}

td.mono,
span.mono {
  font-family: var(--mono);
  font-size: 12.8px;
}

.btn {
  font-family: var(--disp);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover {
  background: #233450;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn.ghost:hover {
  background: var(--panel-2);
}

.btn.teal {
  background: var(--teal);
}

.btn.teal:hover {
  background: #095950;
}

input[type=text],
textarea,
select {
  font-family: var(--sans);
  font-size: 14.5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
  background: #fff;
  color: var(--ink);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat .n {
  font-family: var(--disp);
  font-size: 27px;
  font-weight: 700;
  color: var(--ink);
}

.stat .l {
  font-family: var(--sans);
  font-size: 12.8px;
  color: var(--ink-faint);
}

footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 40px;
  color: var(--ink-faint);
  font-size: 12.5px;
  font-family: var(--sans);
}

/* ---------- Home ---------- */
.hero {
  padding: 6px 0 22px;
}

.hero h1 {
  font-family: var(--disp);
  font-weight: 800;
  font-size: 26px;
  margin: 0 0 8px;
  color: var(--ink);
}

.hero p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 820px;
  margin: 0 0 18px;
  line-height: 1.65;
}

.portal-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 19px;
  margin: 30px 0 4px;
}

.portal-heading.dept {
  color: var(--indigo);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 10px;
}

@media (max-width:900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  position: relative;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  font-family: var(--sans);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 27, 45, .09);
  border-color: var(--line-strong);
}

.fc-icon {
  font-size: 26px;
  line-height: 1;
}

.fc-title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 16.5px;
  color: var(--ink);
}

.fc-desc {
  font-size: 13.4px;
  color: var(--ink-soft);
  line-height: 1.5;
  flex: 1;
}

.fc-cta {
  font-family: var(--disp);
  font-size: 12.8px;
  font-weight: 600;
  color: var(--teal);
  margin-top: 4px;
}

.fc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.fc-avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #0b6e63 0%, #0d9488 100%);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(11,110,99,0.2);
  transition: all 0.2s ease;
}

.fc-avatar-pill:hover {
  background: linear-gradient(135deg, #08524a 0%, #0f766e 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(11,110,99,0.3);
}

.fc-avatar-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ffffff;
}

/* Road safety */
.district-scroll {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.district-scroll table {
  margin: 0;
}

.district-scroll thead th {
  position: sticky;
  top: 0;
  background: #fff;
}

/* VLTD / ANPR */
.vltd-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.vltd-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.vltd-table-wrap thead th {
  position: sticky;
  top: 0;
  background: #fff;
}

.anpr-box {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.anpr-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.compliance-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.compliance-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink);
  color: #fff;
}

.compliance-head .reg {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .03em;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.compliance-item {
  background: #fff;
  padding: 12px 14px;
}

.compliance-item .k {
  font-family: var(--sans);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--ink-faint);
  margin-bottom: 5px;
}

.compliance-item .v {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

.scroll-x {
  overflow-x: auto;
}

.muted {
  color: var(--ink-faint);
  font-size: 12.2px;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.lang-toggle button {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: #B7C3D1;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--teal);
  color: #fff;
}

/* Document Copilot */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 70px;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 13.4px;
}

.field-row .k {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12.2px;
}

.field-row .v {
  font-family: var(--mono);
}

.conf-bar {
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.conf-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
}

.flag-box {
  margin-top: 14px;
  border: 1px solid #EAD1A3;
  background: var(--amber-dim);
  border-radius: 6px;
  padding: 11px 13px;
  font-size: 13.2px;
  color: #7A4E10;
}

/* ---------- Inline AI Chatbot for Department Modules ---------- */
.department-ai-chat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 22px 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.department-ai-head {
  background: #0C1626;
  color: #FFFFFF;
  padding: 14px 18px;
  border-bottom: 3px solid var(--teal);
}

.department-ai-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.department-ai-bot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex: none;
}

.department-ai-title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 18px;
  color: #FFFFFF;
  line-height: 1.2;
}

.department-ai-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #9FB3C8;
  margin-top: 2px;
}

.department-ai-answers {
  min-height: 220px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* User Question */
.department-ai-question {
  align-self: flex-end;
  max-width: 80%;
  background: #E7ECF4;
  color: #1E3A6D;
  border: 1px solid #B9C7DD;
  border-radius: 12px 12px 2px 12px;
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}


/* AI Answer */
.department-ai-answer {
  align-self: flex-start;
  max-width: 85%;
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 2px;
  padding: 10px 13px;
  font-size: 14px;
  line-height: 1.6;
}

.dai-answer-text {
  word-break: break-word;
}

.dai-answer-controls {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dai-tts-btn {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 4px 10px;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.dai-tts-btn:hover {
  background: #dcfce7;
  border-color: #86efac;
  transform: translateY(-1px);
}

.dai-tts-btn.playing {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  animation: pulse 1.2s infinite;
}

.department-ai-placeholder {
  text-align: center;
  color: var(--ink-faint);
  font-style: italic;
  font-size: 14.5px;
  margin: auto 0;
}

.department-ai-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 0;
}

.department-ai-label {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.department-ai-input {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.department-ai-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 2px rgba(43, 76, 126, .18);
}

/* Inline AI input + microphone + search */
.department-ai-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding: 14px 16px 0;
}

.department-ai-input-row .department-ai-input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.department-ai-voice-inline,
.department-ai-search-inline {
  width: 46px;
  min-width: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}

.department-ai-voice-inline:hover,
.department-ai-search-inline:hover:not(:disabled) {
  border-color: var(--teal);
}

.department-ai-voice-inline.listening {
  background: var(--red-dim);
  border-color: var(--red);
  color: var(--red);
}

.department-ai-search-inline {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.department-ai-search-inline:disabled {
  background: var(--line-strong);
  color: var(--ink-faint);
  border-color: var(--line-strong);
  cursor: not-allowed;
}

.department-ai-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 4px;
}

.department-ai-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #0b6e63 0%, #0d9488 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(11, 110, 99, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.department-ai-avatar-btn:hover {
  background: linear-gradient(135deg, #08524a 0%, #0f766e 100%);
  box-shadow: 0 4px 14px rgba(11, 110, 99, 0.35);
  transform: translateY(-1px);
}

.department-ai-avatar-btn:active {
  transform: translateY(0);
}

.department-ai-action-btn,
.department-ai-clear-btn,
button[data-ai-clear] {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.department-ai-action-btn:hover,
.department-ai-clear-btn:hover,
button[data-ai-clear]:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

.department-ai-voice-status {
  min-height: 18px;
  padding: 4px 16px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--amber);


}

/* Next Related Question */
.department-ai-next-question{
  margin: 10px 0 0;
  padding: 14px 20px;
  border-radius: 12px;
  background: #FAFBFD;
  width: 100%;
}

.department-ai-next-title{
  font-family: var(--disp);
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

.department-ai-next-btn{
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--indigo);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 8px 10px;
  cursor: pointer;
}

.department-ai-next-btn:hover{
  background: var(--indigo-dim);
  border-color: var(--indigo);
}

.department-ai-next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.department-ai-next-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  line-height: 1.4;
  font-family: var(--sans);
  text-decoration: none;
}

.department-ai-next-pill:hover {
  border-color: #0B6E63;
  background: #E4F1EF;
  color: #0B6E63;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 110, 99, 0.12);
}

.next-pill-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.next-pill-text {
  flex: 1;
}

.next-pill-arrow {
  font-size: 14px;
  color: #0B6E63;
  font-weight: bold;
  flex-shrink: 0;
}

.department-ai-samples {
  padding: 12px 16px 16px;
}

.department-ai-samples-title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.department-ai-samples-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.department-ai-sample {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 7px 13px;
  cursor: pointer;
  line-height: 1.4;
  text-align: left;
  transition: all .15s ease;
}

.department-ai-sample:hover {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal);
}\n.sahayak-action-btn.listening {\n  background: var(--red-dim) !important;\n  border-color: var(--red) !important;\n  color: var(--red) !important;\n}\n
/* Microphone active pulse animation */
@keyframes micPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(178, 58, 46, 0.5);
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(178, 58, 46, 0);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(178, 58, 46, 0);
    transform: scale(1);
  }
}

.sahayak-action-btn.listening {
  background: var(--red-dim) !important;
  border-color: var(--red) !important;
  color: var(--red) !important;
  animation: micPulse 1.5s infinite !important;
}

.department-ai-voice-inline.listening {
  background: var(--red-dim) !important;
  border-color: var(--red) !important;
  color: var(--red) !important;
  animation: micPulse 1.5s infinite !important;
}

/* Modal Styles */
.card-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 27, 36, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card-modal-backdrop.active {
  display: flex;
  opacity: 1;
}
.card-modal-content {
  background: #ffffff;
  border-radius: 24px;
  width: 96%;
  max-width: 600px;
  height: 85vh;
  max-height: 800px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transform: scale(0.95) translateY(15px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-modal-backdrop.active .card-modal-content {
  transform: scale(1) translateY(0);
}
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2010;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  transform: rotate(90deg);
  border-color: #dc2626;
}
.modal-card-body {
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

/* ── Inline card avatar UI (inside modalCardBody) ── */
.modal-card-body.card-avatar-active { padding:0; flex:1; height:100%; overflow:hidden; }
.card-avatar-ui { display:flex; flex-direction:column; height:100%; padding:20px 20px 16px; gap:14px; box-sizing:border-box; overflow-y:auto; }
.card-avatar-face { display:flex; flex-direction:column; align-items:center; gap:6px; flex-shrink:0; }
.card-avatar-pulse {
  position:relative; width:140px; height:140px; border-radius:50%;
  background:linear-gradient(135deg,#1e3a5f,#3b82f6);
  display:flex; align-items:center; justify-content:center; font-size:44px;
  overflow:hidden; transition:box-shadow 0.3s; flex-shrink:0;
}
.card-avatar-pulse video {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; border-radius:50%;
}
.card-avatar-pulse .ca-connect-btn {
  position:absolute; bottom:6px; left:50%; transform:translateX(-50%);
  background:rgba(0,0,0,0.55); color:#fff; border:none; border-radius:10px;
  padding:3px 10px; font-size:11px; cursor:pointer; white-space:nowrap; z-index:2;
}
.card-avatar-pulse .ca-emoji { position:relative; z-index:1; }
.card-avatar-pulse.speaking { animation:cardAvatarPulse 0.9s ease-in-out infinite; }
@keyframes cardAvatarPulse {
  0%,100%{ box-shadow:0 0 0 0 rgba(30,58,95,.45); }
  50%    { box-shadow:0 0 0 18px rgba(30,58,95,0); }
}
.card-avatar-dname { font-weight:700; font-size:15px; color:#0f172a; text-align:center; }
.card-avatar-status { font-size:12px; color:#6B7488; text-align:center; }
.card-avatar-chat {
  flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:8px;
  padding:4px 0; min-height:0;
}
.card-avatar-bubble-user {
  align-self:flex-end; background:#1e3a5f; color:#fff;
  padding:8px 14px; border-radius:18px 18px 4px 18px;
  max-width:82%; font-size:13.5px; line-height:1.4; word-break:break-word;
}
.card-avatar-bubble-bot {
  align-self:flex-start; background:#f1f5f9; color:#0f172a;
  padding:8px 14px; border-radius:18px 18px 18px 4px;
  max-width:82%; font-size:13.5px; line-height:1.4; word-break:break-word;
}
.card-avatar-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0 4px;
  width: 100%;
}
.card-avatar-input {
  flex: 1;
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 10px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 24px;
  outline: none;
  background: #ffffff;
  color: #1e293b;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card-avatar-input:focus {
  border-color: #0b6e63;
  box-shadow: 0 0 0 3px rgba(11,110,99,0.15);
}
.card-avatar-send-btn {
  background: linear-gradient(135deg, #0b6e63 0%, #0d9488 100%);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 24px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.card-avatar-send-btn:hover {
  background: linear-gradient(135deg, #08524a 0%, #0f766e 100%);
  transform: translateY(-1px);
}
.card-avatar-mic {
  background: #0b6e63;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.card-avatar-mic:hover {
  background: #08524a;
  transform: scale(1.05);
}
.card-avatar-mic.listening {
  background: #dc2626;
  animation: cardMicPulse 0.9s ease-in-out infinite;
}
@keyframes cardMicPulse {
  0%,100%{ box-shadow:0 0 0 0 rgba(220,38,38,.4); }
  50%    { box-shadow:0 0 0 12px rgba(220,38,38,0); }
}
.card-avatar-mic-stop {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #dc2626;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.card-avatar-mic-stop:hover {
  background: #dc2626;
  color: #fff;
}

.meta-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}
.meta-line {
  display: flex;
  gap: 8px;
  font-size: 13px;
}
.meta-label {
  font-weight: 700;
  color: #475569;
}
.meta-val {
  color: #64748b;
}
.similar-cases {
  margin-top: 14px;
}
.similar-cases-heading {
  font-weight: 700;
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
}
.similar-cases-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #1e3a5f;
}
.similar-cases-list li {
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 6px;
  cursor: pointer;
}
.similar-cases-list li:hover {
  background: #f1f5f9;
}

/* Comprehensive Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
  header.letterhead {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .lh-title {
    font-size: 20px;
  }
  .lh-title small {
    font-size: 11px;
  }
  .lh-tagline {
    font-size: 12px;
  }
  .topbar {
    padding: 8px 14px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }
  .home-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
  .lang-toggle {
    flex-shrink: 0;
  }
  main#app {
    padding: 12px 14px 30px;
  }
  .table-responsive, .vltd-table-wrap, .district-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .hero h1 {
    font-size: 20px;
  }
  .hero p {
    font-size: 13px;
  }
  .stat .n {
    font-size: 24px;
  }
  .fc-title {
    font-size: 15px;
  }
  .grid2, .grid3 {
    grid-template-columns: 1fr !important;
  }
  input, select, textarea {
    font-size: 16px !important;
  }
}
