:root,
[data-theme="blue"],
[data-theme="emerald"] {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --emerald-tint: #eff6ff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-border: #bfdbfe;
  --accent-amber: #ea580c;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(37, 99, 235, 0.12);
  --radius: 14px;
}

[data-theme="orange"] {
  --bg: #fffaf5;
  --surface: #ffffff;
  --surface-alt: #fff7ed;
  --emerald-tint: #ffedd5;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-border: #fed7aa;
  --accent-amber: #2563eb;
  --border: #fed7aa;
  --shadow: 0 4px 20px rgba(234, 88, 12, 0.07);
  --shadow-lg: 0 12px 32px rgba(234, 88, 12, 0.14);
}

[data-theme="green"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --emerald-tint: #ecfdf5;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-border: #a7f3d0;
  --accent-amber: #d97706;
  --border: #e2e8f0;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.09);
}

[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-alt: #1e293b;
  --emerald-tint: rgba(59, 130, 246, 0.15);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-border: rgba(59, 130, 246, 0.35);
  --accent-amber: #f59e0b;
  --border: #1f2937;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================================================
   TOP NAVBAR & 6 SEPARATE TABS
   =================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.brand-title {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}

.brand-sub {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.theme-btn:hover {
  border-color: var(--primary);
}

/* ===================================================================
   SEPARATE TAB PAGES
   =================================================================== */
.main-wrapper {
  flex: 1;
  padding: 26px 0 60px;
}

.tab-page {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--emerald-tint);
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--primary-border);
  margin-bottom: 8px;
}

/* ===================================================================
   TAB 1: CAMPUS NAVIGATOR HERO & ROUTE FINDER
   =================================================================== */
.navigator-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.navigator-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.navigator-hero-top h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--text);
}

.navigator-hero-top p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 620px;
}

.instant-search-box {
  position: relative;
  min-width: 340px;
  flex: 1;
  max-width: 440px;
}

.instant-search-box label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.instant-search-box input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 2px solid var(--primary-border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
}

.instant-search-box input:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  max-height: 300px;
  overflow-y: auto;
}

.search-dropdown.hidden {
  display: none;
}

.search-result-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-result-item:hover {
  background: var(--emerald-tint);
}

.search-result-item strong {
  font-size: 0.88rem;
  color: var(--primary);
}

.search-result-item span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ROUTE PLANNER BAR (FROM -> TO) */
.route-planner-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 12px;
  align-items: end;
  padding-top: 16px;
}

.route-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.route-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.route-field select:focus {
  border-color: var(--primary);
}

.swap-route-btn {
  height: 40px;
  width: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

.swap-route-btn:hover {
  background: var(--emerald-tint);
  border-color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.18s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* QUICK STUDENT TASK SHORTCUT PILLS */
.quick-help-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.quick-help-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
}

.quick-help-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.help-chip {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.help-chip strong {
  color: var(--primary);
}

.help-chip:hover {
  border-color: var(--primary);
  background: var(--emerald-tint);
}

/* LIVE ROUTE RESULT BANNER */
.route-result-banner {
  background: var(--emerald-tint);
  border: 1px solid var(--primary-border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.route-main-info {
  flex: 1;
  min-width: 280px;
}

.route-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.route-title-line h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.route-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.route-badge.amber {
  background: var(--accent-amber);
}

.route-steps-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.route-steps-text strong {
  color: var(--text);
}

/* ===================================================================
   MAP + INSPECTOR WORKSPACE
   =================================================================== */
.navigator-workspace {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
  align-items: start;
}

.map-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.map-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-pill {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-pill.active {
  background: var(--primary-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
}

.map-layer-switch {
  display: flex;
  gap: 4px;
  background: var(--surface-alt);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.layer-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.layer-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.campus-map-canvas {
  width: 100%;
  height: 575px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
  z-index: 1;
}

/* Custom Compact Labeled Block Pin on Map */
.lpu-map-pin {
  position: relative;
  background: #2563eb;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.35);
  white-space: nowrap;
  text-align: center;
  transform: translate(-50%, -100%);
  transition: transform 0.15s ease, background 0.15s ease;
}

.lpu-map-pin::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 4px 0 4px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

.lpu-map-pin:hover,
.lpu-map-pin.active-pin {
  background: #0f172a !important;
  border-color: #f59e0b;
  transform: translate(-50%, -105%) scale(1.18);
  z-index: 999 !important;
}

.lpu-map-pin.cat-Hostels {
  background: #7c3aed;
}

.lpu-map-pin.cat-Admin {
  background: #059669;
}

.lpu-map-pin.cat-Mall {
  background: #ea580c;
}

.lpu-map-pin.cat-Gates {
  background: #e11d48;
}

.route-endpoint-badge {
  background: #0f172a;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transform: translate(-50%, -135%);
}

.route-endpoint-badge.start-badge {
  background: #059669;
}

.route-endpoint-badge.end-badge {
  background: #dc2626;
}

/* Google Maps Style Turn-by-Turn Navigation Header */
.gmap-nav-hud {
  background: linear-gradient(135deg, #0d652d 0%, #137333 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 6px 18px rgba(13, 101, 45, 0.28);
}

.gmap-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}

.gmap-turn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
}

.gmap-nav-step {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.gmap-nav-sub {
  font-size: 0.75rem;
  color: #ceead6;
  margin-top: 2px;
  font-weight: 600;
}

.gmap-nav-actions {
  display: flex;
  gap: 6px;
}

.gmap-live-btn,
.gmap-gps-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #ffffff;
  color: #0d652d;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gmap-live-btn.active-sim {
  background: #dc2626;
  color: #ffffff;
  border-color: #ffffff;
}

.gmap-gps-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Google Maps Floating White ETA Callout Bubble on Route Line */
.gmap-eta-bubble {
  background: #ffffff;
  color: #1a73e8;
  border: 2px solid #1a73e8;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -120%);
}

.gmap-eta-bubble span {
  color: #475569;
  font-weight: 700;
}

/* Google Maps Pulsing Live Blue GPS Dot */
.gmap-live-blue-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a73e8;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.32), 0 3px 8px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
  animation: gmapPulse 1.6s infinite ease-in-out;
}

@keyframes gmapPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.55), 0 3px 8px rgba(0, 0, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(26, 115, 232, 0), 0 3px 8px rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 115, 232, 0), 0 3px 8px rgba(0, 0, 0, 0.4);
  }
}

/* Rich Map Popup Card */
.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 220px !important;
}

.lpu-popup-card img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  display: block;
}

.lpu-popup-body {
  padding: 10px 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.lpu-popup-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 7px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.lpu-popup-body strong {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 4px;
}

.lpu-popup-body p {
  font-size: 11px;
  color: #475569;
  margin: 0 0 8px 0 !important;
}

.lpu-popup-body button {
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* RIGHT COLUMN: SELECTED BLOCK INSPECTOR & SCROLL LIST */
.inspector-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.selected-block-card {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.selected-block-banner {
  position: relative;
  height: 150px;
  overflow: hidden;
}

.selected-block-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selected-block-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.15));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  color: #ffffff;
}

.selected-block-code {
  display: inline-block;
  align-self: flex-start;
  background: #10b981;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.selected-block-overlay h3 {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
}

.selected-block-body {
  padding: 16px;
}

.nav-quick-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.fact-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.fact-row strong {
  color: var(--text);
  min-width: 95px;
}

.fact-row span {
  color: var(--text-muted);
}

.inside-floors-box h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 6px;
}

.inside-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.inside-list li {
  font-size: 0.81rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 6px 10px;
  border-radius: 7px;
  border-left: 3px solid var(--primary);
}

.inspector-actions {
  display: flex;
  gap: 8px;
}

.inspector-actions a,
.inspector-actions button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline-emerald {
  border: 1px solid var(--primary);
  background: var(--emerald-tint);
  color: var(--primary);
  font-family: inherit;
}

.btn-outline-emerald:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Scrollable Quick List */
.sidebar-list-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.sidebar-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sidebar-list-header h4 {
  font-size: 0.92rem;
  font-weight: 800;
}

.sidebar-list-header span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--emerald-tint);
  padding: 3px 8px;
  border-radius: 99px;
}

.map-locations-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 235px;
  overflow-y: auto;
  padding-right: 4px;
}

.map-loc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-loc-item:hover,
.map-loc-item.active {
  border-color: var(--primary);
  background: var(--emerald-tint);
}

.map-loc-item strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text);
}

.map-loc-item small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.loc-code-pill {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ===================================================================
   TAB 2: COMPLETE BLOCK & DEPARTMENT DIRECTORY
   =================================================================== */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.search-input {
  padding: 11px 16px;
  border-radius: 10px;
  border: 2px solid var(--primary-border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 320px;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
}

.filter-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--surface);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.pill-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.83rem;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}

.pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.blocks-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dir-block-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.dir-block-img {
  position: relative;
  height: 165px;
}

.dir-block-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dir-code-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 7px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.dir-zone-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.dir-block-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dir-block-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.dir-landmark {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.dir-walk {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dir-floors {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  flex: 1;
}

.dir-floors li {
  font-size: 0.79rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 6px 9px;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.dir-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.dir-card-actions button {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

/* ===================================================================
   TAB 3 & TAB 4: HOSTELS, ROOMS & MESS MENU
   =================================================================== */
.hostels-grid,
.rooms-grid,
.dishes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hostel-card,
.room-card,
.dish-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hostel-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hostel-badge {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--emerald-tint);
  color: var(--primary);
  margin-bottom: 8px;
}

.hostel-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.hostel-meta-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 0.84rem;
}

.hostel-meta-rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 5px;
}

.hostel-meta-rows span {
  color: var(--text-muted);
}

.hostel-meta-rows strong {
  text-align: right;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag-chip {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--text-muted);
}

.subsection-block {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.subsection-header {
  margin-bottom: 18px;
}

.subsection-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.subsection-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.room-card img,
.dish-card img {
  width: 100%;
  height: 185px;
  object-fit: cover;
}

.room-body,
.dish-body {
  padding: 18px;
}

.room-price {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

/* MESS styles */
.mess-summary-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.day-tab {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.day-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.meals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.meal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.meal-time {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--emerald-tint);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}

.meal-card h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.meal-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: auto;
}

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

.footer-inner p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links button {
  background: none;
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 1080px) {
  .navigator-workspace {
    grid-template-columns: 1fr;
  }
  .route-planner-bar {
    grid-template-columns: 1fr;
  }
  .swap-route-btn {
    display: none;
  }
  .blocks-directory-grid,
  .hostels-grid,
  .rooms-grid,
  .dishes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .meals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .blocks-directory-grid,
  .hostels-grid,
  .rooms-grid,
  .dishes-grid,
  .meals-grid {
    grid-template-columns: 1fr;
  }
  .day-tabs {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===================================================================
   UNIVERSITY PRESENTATION ENHANCEMENTS: AI ASSISTANT, VOICE/GPS & MODAL
   =================================================================== */
.hidden,
.ai-assistant-panel.hidden,
.project-modal-backdrop.hidden {
  display: none !important;
}

.ai-nav-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 8px 15px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ai-nav-btn:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.hero-stats-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

.stat-pill strong {
  color: var(--primary);
  font-weight: 800;
}

.stat-pill-ai {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}

.search-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.search-label-row label {
  margin-bottom: 0 !important;
}

.search-tool-btns {
  display: flex;
  gap: 6px;
}

.mini-tool-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-tool-btn:hover,
.mini-tool-btn.listening {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Floating AI Button */
.floating-ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  background: var(--primary);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.38);
  transition: transform 0.18s ease;
}

.floating-ai-fab:hover {
  transform: translateY(-2px) scale(1.03);
}

/* AI Assistant Floating Panel */
.ai-assistant-panel {
  position: fixed;
  right: 22px;
  bottom: 80px;
  width: 390px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.28);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-panel-header {
  background: var(--primary);
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-panel-header strong {
  display: block;
  font-size: 0.95rem;
}

.ai-panel-header span {
  font-size: 0.72rem;
  opacity: 0.9;
}

.ai-close-btn {
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
}

.ai-quick-prompts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.ai-quick-prompts button {
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.ai-quick-prompts button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ai-messages-box {
  height: 270px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-msg {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.ai-msg-bot {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
}

.ai-msg-user {
  background: var(--primary);
  color: #ffffff;
  align-self: flex-end;
  font-weight: 600;
}

.ai-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.ai-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
}

/* Official Project Modal */
.project-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.project-modal-card {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.project-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-modal-body {
  padding: 20px 22px;
}

.dev-profile-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.dev-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dev-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.dev-social-links a {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.modal-sec-title {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--primary);
}

.algo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.algo-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.algo-box strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.algo-box p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 680px) {
  .algo-grid {
    grid-template-columns: 1fr;
  }
  .dev-profile-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}