/* =============================================
   SMART CITY TASHKENT — Global Styles
   ============================================= */

:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-glow: rgba(59,130,246,0.3);
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #0a0f1e;
  --bg-card: #111827;
  --bg-card2: #1a2234;
  --border: rgba(255,255,255,0.08);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  --font: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* === CONTAINER === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === NAVBAR === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 68px;
  background: rgba(10,15,30,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.nav-brand i {
  color: var(--primary);
  font-size: 1.5rem;
}

.nav-brand em {
  color: var(--primary);
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-glow);
  color: var(--primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === HERO === */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 80px 32px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 50%, rgba(59,130,246,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(139,92,246,0.08) 0%, transparent 60%),
    linear-gradient(135deg, #050810 0%, #0a0f1e 50%, #0f172a 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-glow);
  border: 1px solid rgba(59,130,246,0.4);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 60%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  opacity: 0.07;
}

.city-graphic i {
  font-size: 22rem;
  color: var(--primary);
}

/* === TICKER === */
.ticker-section {
  display: flex;
  align-items: center;
  gap: 0;
  background: #0d1420;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 44px;
}

.ticker-label {
  flex-shrink: 0;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-content {
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  animation: ticker-scroll 35s linear infinite;
  padding-left: 100%;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* === SECTION === */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* === SERVICE CARDS === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow), transparent);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(59,130,246,0.15);
}

.service-card:hover::before { opacity: 1; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.transport-icon { background: rgba(59,130,246,0.15); color: var(--primary); }
.weather-icon   { background: rgba(6,182,212,0.15);  color: var(--accent); }
.map-icon       { background: rgba(16,185,129,0.15); color: var(--success); }
.news-icon      { background: rgba(245,158,11,0.15); color: var(--warning); }
.emergency-icon { background: rgba(239,68,68,0.15);  color: var(--danger); }
.admin-icon     { background: rgba(139,92,246,0.15); color: var(--secondary); }

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.service-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

/* === PAGE HEADER (for sub-pages) === */
.page-header {
  background: linear-gradient(135deg, #050810, #0a0f1e, #0f172a);
  border-bottom: 1px solid var(--border);
  padding: 60px 32px 40px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(59,130,246,0.3);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* === STATUS BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--danger); }
.badge-info    { background: rgba(59,130,246,0.15); color: var(--primary); }

/* === GRID LAYOUTS === */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* === FORM === */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* === TABLE === */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th {
  background: var(--bg-card2);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-card2); }

/* === FOOTER === */
.footer {
  background: #060c18;
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand i {
  font-size: 2rem;
  color: var(--primary);
}

.footer-brand span {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 260px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links ul { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-dim);
  transition: var(--transition);
}

.footer-links a:hover { color: var(--primary); }

.footer-contact p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.footer-contact i { color: var(--primary); width: 16px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* === LANGUAGE SWITCHER === */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

#langBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

#langBtn:hover {
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.5);
  color: var(--primary);
}

#langBtn .lang-globe {
  font-size: 1rem;
  color: var(--primary);
}

#langCode {
  color: var(--primary);
  font-size: 0.78rem;
}

/* Dropdown menu */
#langMenu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  max-height: 380px;
  overflow-y: auto;
  background: rgba(14,20,38,0.97);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(59,130,246,0.08);
  backdrop-filter: blur(24px);
  padding: 8px;
  z-index: 999;
  animation: langDrop 0.2s cubic-bezier(0.4,0,0.2,1) both;
}

#langMenu.lang-open { display: block; }

#langMenu::-webkit-scrollbar { width: 4px; }
#langMenu::-webkit-scrollbar-track { background: transparent; }
#langMenu::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.3); border-radius: 2px; }

@keyframes langDrop {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.lang-option:hover {
  background: rgba(59,130,246,0.1);
  color: var(--text);
}

.lang-option.lang-active {
  background: rgba(59,130,246,0.15);
  color: var(--primary);
  font-weight: 600;
}

.lo-flag { font-size: 1.2rem; flex-shrink: 0; }
.lo-name { flex: 1; }

@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  /* Hamburger — eng CHAPDA (birinchi) */
  .hamburger {
    display: flex;
    order: 0;
    flex-shrink: 0;
  }

  /* Brand — chapdan keyin, bo'sh joyni egallaydi */
  .nav-brand {
    order: 1;
    flex: 1;
  }

  /* Auth area (user button) — o'ngda */
  #nav-auth-area {
    order: 2;
    flex-shrink: 0;
  }

  /* Language switcher — eng o'ngda */
  .lang-switcher {
    order: 3;
    flex-shrink: 0;
  }

  /* Nav-links — hamburger bosilganda pastdan tushadi */
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10,15,30,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    order: 99;
    z-index: 200;
  }

  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 16px; }

  /* Mobile da foydalanuvchi nomi yashiriladi, faqat avatar ko'rinadi */
  .nav-username { display: none !important; }

  .hero { padding: 60px 20px; min-height: auto; }
  .hero-visual { display: none; }
  .hero-stats { gap: 20px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-2, .grid-3, .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}

/* =============================================
   LIGHT THEME OVERRIDES
   ============================================= */
[data-theme="light"] {
  --bg:       #f0f4f8;
  --bg-card:  #ffffff;
  --bg-card2: #f1f5f9;
  --border:   rgba(0,0,0,0.09);
  --text:     #0f172a;
  --text-muted: #475569;
  --text-dim:   #94a3b8;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
}

[data-theme="light"] body   { background: var(--bg); }
[data-theme="light"] .navbar { background: rgba(240,244,248,0.92); border-bottom-color: var(--border); }
[data-theme="light"] #langBtn { background: rgba(59,130,246,0.07); }
[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 60% 50%, rgba(59,130,246,0.07) 0%, transparent 70%),
    linear-gradient(135deg, #dbe8ff 0%, #f0f4f8 60%);
}
[data-theme="light"] .ticker-section { background: #e8edf4; }
[data-theme="light"] .footer { background: #e2e8f0; }
[data-theme="light"] #langMenu { background: rgba(248,250,252,0.98); border-color: rgba(59,130,246,0.15); }
[data-theme="light"] .lang-option { color: var(--text-muted); }
[data-theme="light"] .lang-option:hover { background: rgba(59,130,246,0.08); color: var(--text); }
[data-theme="light"] .ag-gate {
  background: radial-gradient(ellipse at 60% 40%, #dbeafe 0%, #f0f4f8 70%) !important;
}
[data-theme="light"] #ag-card {
  background: rgba(255,255,255,0.85) !important;
  border-color: rgba(59,130,246,0.2) !important;
}
[data-theme="light"] .ag-field input { background: #f8fafc; border-color: #e2e8f0; color: #0f172a; }
[data-theme="light"] .ag-tab { color: #64748b; }
[data-theme="light"] #ag-toast { background: rgba(248,250,252,0.98); color: #0f172a; }

/* =============================================
   THEME TOGGLE BUTTON
   ============================================= */
.theme-toggle-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.22s ease;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: rgba(59,130,246,0.18);
  color: var(--primary);
  border-color: rgba(59,130,246,0.4);
  transform: rotate(15deg) scale(1.05);
}

/* =============================================
   DASHBOARD WIDGETS
   ============================================= */
.widgets-section {
  padding: 40px 0 0;
}
.widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.widget-card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.widget-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
}
.widget-card.w-weather::after  { background: linear-gradient(90deg, #06b6d4, #3b82f6); }
.widget-card.w-transport::after{ background: linear-gradient(90deg, #3b82f6, #6366f1); }
.widget-card.w-news::after     { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.widget-card.w-emergency::after{ background: linear-gradient(90deg, #ef4444, #8b5cf6); }

.widget-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.widget-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.wi-weather  { background: rgba(6,182,212,0.15);  color: var(--accent); }
.wi-transport{ background: rgba(59,130,246,0.15); color: var(--primary); }
.wi-news     { background: rgba(245,158,11,0.15); color: var(--warning); }
.wi-emergency{ background: rgba(239,68,68,0.15);  color: var(--danger); }

.widget-title {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
}
.widget-link {
  font-size: 0.75rem; font-weight: 600;
  color: var(--primary); text-decoration: none;
  opacity: 0.7; transition: opacity 0.2s;
}
.widget-link:hover { opacity: 1; }

.widget-value {
  font-size: 2.2rem; font-weight: 800;
  color: var(--text); line-height: 1; margin-bottom: 4px;
}
.widget-desc { font-size: 0.82rem; color: var(--text-muted); }

.widget-list { list-style: none; padding: 0; margin: 0; }
.widget-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.widget-list li:last-child { border-bottom: none; }
.widget-list li i { width: 16px; text-align: center; }

.widget-emergency-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 4px;
}
.emer-quick {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 6px;
  text-decoration: none;
  transition: var(--transition);
  gap: 4px;
}
.emer-quick:hover { border-color: var(--danger); background: rgba(239,68,68,0.06); }
.emer-quick .eq-num { font-size: 1.4rem; font-weight: 800; color: var(--danger); line-height: 1; }
.emer-quick .eq-label { font-size: 0.7rem; color: var(--text-dim); text-align: center; }

/* =============================================
   PWA INSTALL BANNER
   ============================================= */
#pwa-banner {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(15,22,42,0.97);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(.22,.68,0,1.1);
  min-width: 280px; max-width: 420px;
}
#pwa-banner.show { transform: translateX(-50%) translateY(0); }
.pwa-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; flex-shrink: 0;
}
.pwa-info { flex: 1; }
.pwa-info strong { display: block; font-size: 0.88rem; font-weight: 700; color: #fff; }
.pwa-info span { font-size: 0.75rem; color: #94a3b8; }
.pwa-install-btn {
  padding: 8px 16px; border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff; font-size: 0.8rem; font-weight: 700;
  border: none; cursor: pointer; font-family: var(--font);
  white-space: nowrap;
}
.pwa-dismiss {
  background: none; border: none;
  color: #64748b; cursor: pointer; font-size: 1rem; padding: 4px;
}
.pwa-dismiss:hover { color: #94a3b8; }

/* Responsive banner */
@media(max-width:480px) {
  #pwa-banner { min-width: calc(100vw - 32px); bottom: 12px; }
}

