:root {
  color-scheme: dark;
  --bg: #041321;
  --bg-2: #071b2f;
  --panel: rgba(7, 31, 54, 0.82);
  --panel-strong: rgba(7, 35, 62, 0.96);
  --glass: rgba(9, 42, 72, 0.72);
  --line: rgba(111, 184, 255, 0.24);
  --line-strong: rgba(109, 199, 255, 0.46);
  --text: #f3f8ff;
  --muted: #a9c3df;
  --soft: #7092b9;
  --cyan: #22d3ee;
  --green: #19f29a;
  --blue: #3d86ff;
  --purple: #8a5cff;
  --amber: #ffb92e;
  --red: #ff485c;
  --shadow: 0 18px 60px rgba(0, 8, 18, 0.42);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eef6fb;
  --bg-2: #dbeaf4;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --glass: rgba(242, 249, 255, 0.86);
  --line: rgba(48, 112, 168, 0.22);
  --line-strong: rgba(27, 129, 184, 0.42);
  --text: #0b1830;
  --muted: #415975;
  --soft: #63809e;
  --shadow: 0 18px 50px rgba(22, 53, 80, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 18% -8%, rgba(69, 99, 255, 0.28), transparent 28rem),
    radial-gradient(circle at 78% 4%, rgba(22, 211, 238, 0.18), transparent 25rem),
    linear-gradient(145deg, var(--bg), var(--bg-2));
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
}

.landing {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(2, 9, 22, 0.9), rgba(2, 9, 22, 0.52)),
    radial-gradient(circle at 76% 42%, rgba(37, 242, 154, 0.14), transparent 22rem),
    linear-gradient(160deg, #11152a 0%, #061a2d 50%, #311d36 100%);
}

.landing-nav,
.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 42px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.mark {
  width: 60px;
  height: 34px;
  position: relative;
  flex: 0 0 auto;
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  inset: 2px 27px 2px 0;
  border: 8px solid var(--purple);
  border-right-color: var(--cyan);
  border-radius: 50%;
  transform: rotate(40deg);
}

.mark::after {
  inset: 2px 0 2px 27px;
  border-color: var(--cyan);
  border-left-color: var(--purple);
  transform: rotate(-40deg);
}

.brand-title {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.landing-links button,
.nav-item,
.tab-button,
.mode-button,
.scenario-card {
  color: var(--muted);
  background: transparent;
  border: 0;
}

.landing-links button {
  padding: 12px 0;
}

.landing-links button.active {
  color: var(--text);
  border-bottom: 3px solid var(--blue);
}

.landing-actions,
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill,
.data-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 38px;
}

.mini-pill {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.76rem;
  border-radius: 999px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(520px, 1.05fr);
  gap: 42px;
  align-items: center;
  padding: 28px 42px 0;
}

.sih-badge {
  display: inline-flex;
  gap: 10px;
  border: 1px solid rgba(34, 211, 238, 0.55);
  border-radius: 999px;
  padding: 8px 16px;
  color: #b7d8ff;
  background: rgba(36, 64, 135, 0.34);
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 10px;
  max-width: 760px;
  font-size: clamp(2.6rem, 5.3vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(92deg, #74d7ff, #1ff59d);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.hero p {
  color: #d7e8fa;
  font-size: 1.04rem;
  line-height: 1.55;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 30px 0 34px;
}

.primary,
.secondary,
.icon-btn {
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 46px;
  color: #fff;
  font-weight: 850;
}

.primary {
  padding: 0 24px;
  background: linear-gradient(100deg, var(--purple), var(--cyan));
  box-shadow: 0 12px 30px rgba(28, 196, 230, 0.22);
}

.secondary {
  padding: 0 22px;
  background: rgba(7, 25, 46, 0.64);
  border-color: rgba(205, 227, 255, 0.44);
}

.icon-btn {
  width: 42px;
  padding: 0;
  background: var(--glass);
  border-color: var(--line);
}

.hero-benefits,
.feature-band,
.metric-grid,
.summary-row,
.usecase-tabs {
  display: grid;
  gap: 14px;
}

.hero-benefits {
  grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.benefit strong {
  display: block;
  margin: 6px 0 2px;
}

.benefit span,
.tiny {
  color: var(--muted);
  font-size: 0.82rem;
}

.map-card,
.panel,
.stat-card,
.sidebar,
.topbar,
.image-strip {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero .map-card {
  padding: 18px;
  background: rgba(7, 31, 54, 0.88);
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

.field,
.search-field {
  border: 1px solid var(--line-strong);
  background: rgba(4, 22, 40, 0.72);
  color: var(--text);
  border-radius: var(--radius);
  min-height: 44px;
  padding: 0 14px;
  width: 100%;
}

[data-theme="light"] .field,
[data-theme="light"] .search-field {
  background: #fff;
}

.feature-section {
  margin-top: 40px;
  padding: 24px 40px;
  background: rgba(245, 250, 255, 0.96);
  color: #09162b;
  border-radius: 10px 10px 0 0;
}

.feature-section h2 {
  margin: 0 0 8px;
  font-size: 1.9rem;
}

.feature-section p {
  color: #33455d;
}

.feature-band {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  margin-top: 20px;
}

.feature-tile {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
}

.feature-section .feature-tile {
  background: #fff;
  border-color: #dce6f2;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 10px;
  overflow: hidden;
}

.sidebar .brand {
  padding: 0 8px 20px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--radius);
  text-align: left;
  font-weight: 750;
}

.nav-item.active,
.nav-item:hover,
.tab-button.active,
.mode-button.active {
  color: #fff;
  background: linear-gradient(105deg, rgba(61, 134, 255, 0.9), rgba(74, 50, 202, 0.82));
  box-shadow: inset 3px 0 0 rgba(178, 214, 255, 0.84);
}

.sidebar-art {
  margin-top: auto;
  padding: 18px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(to top, rgba(3, 12, 27, 0.96), transparent),
    linear-gradient(130deg, rgba(34, 211, 238, 0.14), rgba(138, 92, 255, 0.18)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(38, 177, 255, 0.16) 18px 20px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.sidebar-art p {
  margin: 0 0 14px;
  color: #e7f2ff;
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.35;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 82px;
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  background: rgba(3, 16, 31, 0.92);
  backdrop-filter: blur(16px);
}

[data-theme="light"] .topbar {
  background: rgba(244, 250, 255, 0.92);
}

.top-search {
  width: min(640px, 100%);
  justify-self: center;
}

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

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f6c6a4, #4c78c9);
  font-weight: 900;
}

.content {
  padding: 20px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.page-head h1,
.panel h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.page-head h1 {
  font-size: clamp(1.8rem, 2.8vw, 2.45rem);
}

.page-head p,
.panel p {
  color: var(--muted);
  margin: 7px 0 0;
}

.grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid {
  grid-template-columns: 360px minmax(480px, 1fr) 350px;
}

.find-grid {
  grid-template-columns: 390px minmax(520px, 1fr) 360px;
}

.network-grid {
  grid-template-columns: minmax(620px, 1fr) 360px;
}

.comparison-grid {
  grid-template-columns: minmax(620px, 1fr) 320px;
}

.simulation-grid {
  grid-template-columns: minmax(620px, 1fr) 380px 320px;
}

.usecase-grid {
  grid-template-columns: 360px minmax(560px, 1fr) 360px;
}

.settings-grid,
.about-grid {
  grid-template-columns: repeat(3, minmax(280px, 1fr));
}

.panel {
  padding: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.metric-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.stat-card {
  min-height: 94px;
  padding: 16px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(145deg, rgba(28, 67, 108, 0.72), rgba(4, 24, 43, 0.86));
}

[data-theme="light"] .stat-card {
  background: var(--panel-strong);
}

.stat-icon,
.tile-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: rgba(61, 134, 255, 0.2);
}

.stat-card b {
  display: block;
  margin-top: 4px;
  font-size: 1.28rem;
}

.form-stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 760;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-wrap {
  display: grid;
  grid-template-columns: 34px 1fr 45px;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.segmented,
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-button,
.mode-button,
.scenario-card {
  border: 1px solid var(--line);
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--glass);
}

.scenario-card {
  text-align: left;
}

.map-shell {
  position: relative;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(rgba(85, 153, 215, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 153, 215, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, rgba(61, 134, 255, 0.18), transparent 18rem),
    #061b2f;
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.map-shell.large {
  min-height: 545px;
}

.map-shell.network {
  min-height: 610px;
}

.city-map {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
}

.map-overlay {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
  background: rgba(4, 18, 33, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.map-controls {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  gap: 8px;
}

.legend-line {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.legend-swatch {
  height: 5px;
  border-radius: 999px;
}

.road {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.94;
}

.road.closed {
  stroke-dasharray: 9 10;
  opacity: 0.65;
}

.road-hit {
  stroke: transparent;
  stroke-width: 20;
  cursor: pointer;
}

.route {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(25, 242, 154, 0.9));
}

.route.qpso {
  stroke: var(--green);
  stroke-width: 12;
}

.route.dijkstra {
  stroke: var(--blue);
  stroke-width: 7;
  stroke-dasharray: 12 10;
}

.route.astar {
  stroke: var(--purple);
  stroke-width: 6;
  stroke-dasharray: 6 12;
}

.route.pso {
  stroke: var(--amber);
  stroke-width: 6;
  stroke-dasharray: 12 8;
}

.node circle {
  fill: #08233e;
  stroke: #8abfff;
  stroke-width: 3;
}

.node text,
.edge-label {
  fill: #eaf5ff;
  stroke: #041321;
  stroke-width: 5;
  paint-order: stroke;
  font-weight: 850;
  font-size: 13px;
}

.node.source circle {
  fill: var(--green);
  stroke: #dfffee;
}

.node.destination circle {
  fill: var(--red);
  stroke: #ffd9df;
}

.node.hospital circle {
  stroke: var(--cyan);
}

.marker-label {
  fill: #fff;
  font-size: 18px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
}

.table th,
.table td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  color: var(--muted);
}

.table th {
  color: var(--text);
  background: rgba(16, 50, 84, 0.54);
}

.table tr.best td {
  color: var(--text);
  background: rgba(25, 242, 154, 0.12);
}

.route-list,
.alerts,
.check-list,
.insight-list {
  display: grid;
  gap: 10px;
}

.route-card,
.alert-row,
.check-row,
.insight-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 31, 54, 0.55);
  padding: 12px;
}

[data-theme="light"] .route-card,
[data-theme="light"] .alert-row,
[data-theme="light"] .check-row,
[data-theme="light"] .insight-row {
  background: rgba(255, 255, 255, 0.7);
}

.route-card.best {
  border-color: rgba(25, 242, 154, 0.76);
  background: linear-gradient(145deg, rgba(25, 242, 154, 0.18), rgba(7, 31, 54, 0.62));
}

.route-path {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.chart {
  width: 100%;
  height: 220px;
  display: block;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
}

.donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--green) 0 62%, var(--amber) 62% 84%, var(--red) 84% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  background: var(--bg);
  border-radius: 50%;
}

.donut b {
  position: relative;
  z-index: 1;
  font-size: 1.6rem;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.banner,
.image-strip {
  min-height: 170px;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(90deg, rgba(2, 11, 25, 0.82), rgba(2, 11, 25, 0.25)),
    linear-gradient(120deg, rgba(138, 92, 255, 0.38), rgba(25, 242, 154, 0.18)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 3px, transparent 3px 56px);
}

.banner h1 {
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  margin: 0;
}

.about-hero-banner {
  position: relative;
  min-height: 190px;
  border-radius: 14px !important;
  margin-bottom: 16px;
  padding: 30px 36px;
  overflow: hidden;
  background-color: #020b19;
  background-image:
    linear-gradient(90deg, rgba(2, 11, 25, 0.95) 0%, rgba(2, 11, 25, 0.82) 42%, rgba(2, 11, 25, 0.35) 100%),
    url('./Codex Image Sep 6, 2026, 07_12_04 PM.png');
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65), inset 0 0 50px rgba(0, 240, 255, 0.08);
}


.architecture {
  display: grid;
  gap: 9px;
}

.arch-step {
  border: 1px solid var(--line-strong);
  background: rgba(25, 242, 154, 0.08);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  border: 1px solid rgba(25, 242, 154, 0.55);
  background: rgba(3, 19, 34, 0.96);
  color: #fff;
  border-radius: var(--radius);
  padding: 13px 16px;
  box-shadow: var(--shadow);
}

.mobile-menu {
  display: none;
}

.footer {
  margin-top: 18px;
  padding: 14px 4px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

@media (max-width: 1280px) {

  .dashboard-grid,
  .find-grid,
  .network-grid,
  .comparison-grid,
  .simulation-grid,
  .usecase-grid,
  .settings-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: fixed;
    z-index: 10;
    width: 278px;
    transform: translateX(-110%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-grid;
    place-items: center;
  }

  .topbar {
    grid-template-columns: auto 1fr;
    height: auto;
  }

  .top-search,
  .landing-links,
  .profile p,
  .sidebar-art {
    display: none;
  }

  .content {
    padding: 12px;
  }

  .landing-nav {
    padding: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 14px 18px 0;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }

  .feature-band,
  .hero-benefits,
  .impact-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .map-shell,
  .map-shell.large,
  .map-shell.network {
    min-height: 420px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==========================================================================
   ENHANCED COMPONENTS FOR ALL 9 SCREENS (SIH-26137)
   ========================================================================== */

/* Optimization Stepper (Algorithm Comparison) */
.optimization-process {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius);
  background: rgba(4, 20, 36, 0.45);
  border: 1px solid rgba(111, 184, 255, 0.1);
  transition: all 0.25s ease;
}

.process-step.done {
  color: #fff;
  border-color: rgba(25, 242, 154, 0.35);
  background: rgba(25, 242, 154, 0.08);
}

.process-step.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}

.process-step .step-icon {
  font-size: 1rem;
  line-height: 1;
}

.step-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(34, 211, 238, 0.3);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Emergency Mode Badge & Siren Animation */
.emergency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(255, 72, 92, 0.25), rgba(180, 20, 40, 0.45));
  border: 1px solid var(--red);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.5px;
  box-shadow: 0 0 16px rgba(255, 72, 92, 0.5);
  animation: pulse-siren 1.5s infinite alternate ease-in-out;
}

@keyframes pulse-siren {
  0% {
    box-shadow: 0 0 10px rgba(255, 72, 92, 0.4);
  }

  100% {
    box-shadow: 0 0 25px rgba(255, 72, 92, 0.85);
  }
}

/* Edge Inspector Panel (Network View) */
.edge-inspector-card {
  display: grid;
  gap: 12px;
}

.edge-thumb {
  width: 100%;
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #102a45, #08182b);
}

.edge-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edge-meta-table {
  width: 100%;
  font-size: 0.86rem;
  border-collapse: collapse;
}

.edge-meta-table tr {
  border-bottom: 1px solid var(--line);
}

.edge-meta-table td {
  padding: 7px 4px;
}

.edge-meta-table td:first-child {
  color: var(--muted);
}

.edge-meta-table td:last-child {
  font-weight: 700;
  text-align: right;
  color: var(--text);
}

.edge-advisory {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 185, 46, 0.12);
  border: 1px solid rgba(255, 185, 46, 0.4);
  border-radius: var(--radius);
  color: #ffe6a6;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Route Metrics Bar Chart */
.bar-chart-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: flex-end;
  height: 180px;
  padding: 14px 10px 4px;
  margin-top: 10px;
  border-bottom: 1px solid var(--line);
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.bar-val {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text);
}

.bar-track-vert {
  width: 100%;
  max-width: 44px;
  height: 120px;
  background: rgba(111, 184, 255, 0.1);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.bar-fill-vert {
  width: 100%;
  transition: height 0.4s ease;
  border-radius: 6px 6px 0 0;
}

.bar-label {
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

/* Incident Marker Pins on SVG / Map */
.incident-marker {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.incident-marker:hover {
  transform: scale(1.2);
}

.incident-marker circle {
  stroke-width: 2;
}

/* Notification Drawer */
.notifications-dropdown {
  position: absolute;
  top: 72px;
  right: 180px;
  width: 320px;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 50;
  padding: 12px;
  display: none;
  animation: fadeIn 0.2s ease;
}

.notifications-dropdown.open {
  display: block;
}

.notifications-dropdown h4 {
  margin: 0 0 10px;
  font-size: 0.94rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  cursor: pointer;
}

.notif-item:hover {
  background: var(--glass);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-title {
  font-weight: 700;
  color: var(--text);
}

.notif-time {
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 2px;
}

/* Team Grid (About Page) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.team-card {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  text-align: center;
}

.team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
}

/* Architecture Flowchart (About Page) */
.arch-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.arch-flow-node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 0.88rem;
}

.arch-flow-node b {
  color: var(--text);
  display: block;
}

.arch-flow-node span {
  color: var(--muted);
  font-size: 0.78rem;
}

.arch-arrow {
  text-align: center;
  color: var(--cyan);
  font-size: 1.1rem;
  line-height: 0.8;
}

/* Toast alert notification */
.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--green);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-box.show {
  opacity: 1;
  transform: translateY(0);
}

.animated-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Brand Logo & Phonetics */
.brand-logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.45));
  flex: 0 0 auto;
}

.phonetic-badge {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 240, 255, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 999px;
  padding: 3px 8px;
  margin-left: 8px;
  vertical-align: middle;
  display: inline-block;
}

/* Animated Media Icons (.mp4 micro-animations): Stable by default, animated on hover */
.nav-anim-icon,
.header-anim-icon,
.card-anim-icon,
.preset-anim-icon {
  border-radius: 6px;
  object-fit: cover;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.25));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
  vertical-align: middle;
}

.nav-anim-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.header-anim-icon {
  width: 24px;
  height: 24px;
}

.card-anim-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.preset-anim-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

/* Hover-activated smooth highlight */
button:hover .nav-anim-icon,
.nav-item:hover .nav-anim-icon,
.icon-btn:hover .header-anim-icon,
.stat-card:hover .card-anim-icon,
.scenario-card:hover .preset-anim-icon,
.feature-tile:hover .card-anim-icon,
.benefit:hover .card-anim-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
}

.anim-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Leaflet Real Map Styles */
.leaflet-map-container {
  width: 100%;
  height: 520px;
  min-height: 440px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: #020b19;
  border: 1px solid var(--line);
}

.leaflet-container {
  font-family: inherit;
}

/* Dark Theme Leaflet integration */
[data-theme="dark"] .leaflet-container {
  background: #020b19;
}

[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
  background: #07192e;
  color: #fff;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}

[data-theme="light"] .leaflet-popup-content-wrapper,
[data-theme="light"] .leaflet-popup-tip {
  background: #ffffff;
  color: #1a202c;
  border: 1px solid #cbd5e1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

.leaflet-popup-content {
  margin: 12px 16px;
  line-height: 1.4;
  font-size: 0.88rem;
}

.map-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 999;
  display: flex;
  gap: 8px;
  background: rgba(4, 19, 33, 0.88);
  backdrop-filter: blur(8px);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

[data-theme="light"] .map-toolbar {
  background: rgba(255, 255, 255, 0.92);
}

.map-tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.map-tool-btn:hover,
.map-tool-btn.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.35);
}

.map-legend-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 999;
  background: rgba(4, 19, 33, 0.88);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.76rem;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

[data-theme="light"] .map-legend-overlay {
  background: rgba(255, 255, 255, 0.92);
}

.legend-chip {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Custom Marker Styling */
.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.marker-pulse-ring {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  animation: marker-pulse 2s infinite ease-out;
}

@keyframes marker-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.pin-core {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

.pin-core.origin {
  background: #19f29a;
  color: #020b19;
  box-shadow: 0 0 16px rgba(25, 242, 154, 0.8);
}

.pin-core.destination {
  background: #ff485c;
  box-shadow: 0 0 16px rgba(255, 72, 92, 0.8);
}

.pin-core.hospital {
  background: #00f0ff;
  color: #020b19;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.8);
}

.pin-core.junction {
  background: #102a45;
  border-color: rgba(111, 184, 255, 0.4);
  width: 12px;
  height: 12px;
}

.pin-core.incident {
  background: #ffaa00;
  box-shadow: 0 0 16px rgba(255, 170, 0, 0.8);
}

.marker-tag-label {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(4, 19, 33, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}