:root {
  --primary: #0e7490;
  --primary-dark: #155e75;
  --accent: #2563eb;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --whatsapp: #25d366;
  --sidebar-bg: #0f2a43;
  --sidebar-bg-hover: #163a5c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================= Public site: top info bar ================= */
.top-bar { background: var(--primary-dark); color: #e0f2fe; font-size: 13px; }
.top-bar-inner {
  max-width: 1200px; margin: 0 auto; padding: 8px 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 20px;
}
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.top-bar-item { white-space: nowrap; }
.top-bar-item a { color: #e0f2fe; }
.whatsapp-btn {
  background: var(--whatsapp); color: #fff !important; padding: 5px 14px; border-radius: 20px;
  font-weight: 600; text-decoration: none !important; white-space: nowrap;
}

/* ================= Public site: main nav ================= */
.site-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 24px;
  background: var(--card-bg); border-bottom: 1px solid var(--border); position: relative;
  flex-wrap: wrap; max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-link { display: flex; align-items: center; }
.brand-logo-img { max-height: 42px; }
.brand-text-logo { font-size: 28px; }
.brand-text { color: inherit; display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 700; font-size: 17px; color: var(--primary-dark); }
.brand-tagline { font-size: 11px; color: var(--muted); }

.nav-collapsible { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-collapsible a { padding: 8px 12px; border-radius: 6px; color: var(--text); font-size: 14px; font-weight: 500; }
.nav-collapsible a.active, .nav-collapsible a:hover { background: var(--bg); color: var(--primary-dark); text-decoration: none; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-search-icon { font-size: 18px; color: var(--text); padding: 6px; }
.book-test-btn {
  background: var(--primary-dark); color: #fff !important; padding: 9px 20px; border-radius: 6px;
  font-weight: 600; font-size: 14px; text-decoration: none !important; white-space: nowrap;
}
.book-test-btn:hover { background: var(--primary); }

/* ================= Homepage: hero ================= */
.hero-new {
  max-width: 1200px; margin: 0 auto; padding: 48px 24px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
}
.hero-text h1 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; color: var(--text); }
.hero-text h1 span { color: var(--primary-dark); }
.hero-text p { color: var(--muted); font-size: 16px; margin-bottom: 20px; max-width: 480px; }
.hero-badges { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-badge { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.hero-badge .dot {
  width: 30px; height: 30px; border-radius: 50%; background: #e0f2fe; color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-buttons .btn-primary { background: var(--primary-dark); color: #fff; padding: 13px 28px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.hero-buttons .btn-primary:hover { background: var(--primary); }
.hero-buttons .btn-outline { border: 1.5px solid var(--primary-dark); color: var(--primary-dark); padding: 13px 28px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.hero-image-wrap {
  border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #0e7490, #2563eb);
  min-height: 320px; display: flex; align-items: center; justify-content: center; position: relative;
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(255,255,255,0.85); border: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 20px; cursor: pointer; color: var(--text); display: flex; align-items: center; justify-content: center;
}
.hero-slider-arrow.prev { left: 12px; }
.hero-slider-arrow.next { right: 12px; }
.hero-slider-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.hero-slider-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.55); cursor: pointer; }
.hero-slider-dot.active { background: #fff; }
.hero-image-placeholder { color: #fff; text-align: center; padding: 40px; font-size: 60px; }

/* Show only one of the two hero sliders per screen size */
.desktop-only { display: flex; }
.mobile-only { display: none; }

/* ================= Stats bar + Why Choose Us ================= */
.stats-bar {
  max-width: 1200px; margin: 0 auto; padding: 0 24px 40px; display: grid;
  grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center;
}
.stats-bar .stat { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px 10px; }
.stats-bar .num { font-size: 26px; font-weight: 800; color: var(--primary-dark); }
.stats-bar .label { font-size: 12px; color: var(--muted); margin-top: 4px; }

.why-choose-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-choose-card { display: flex; gap: 14px; }
.why-choose-card .icon-circle {
  width: 46px; height: 46px; border-radius: 12px; background: #e0f2fe; color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.why-choose-card h4 { margin: 0 0 4px; font-size: 15px; }
.why-choose-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ================= Feature strip ================= */
.feature-strip { max-width: 1200px; margin: 0 auto; padding: 0 24px 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; align-items: center; gap: 12px; }
.feature-card .icon-circle { width: 42px; height: 42px; border-radius: 50%; background: #ecfdf5; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.feature-card .title { font-weight: 700; font-size: 14px; }
.feature-card .subtitle { color: var(--muted); font-size: 12px; }

/* ================= Section wrapper + heading row ================= */
.public-section { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.section-title-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.section-title-row h2 { margin: 0 0 4px; font-size: 24px; }
.section-title-row p { margin: 0; color: var(--muted); font-size: 14px; }
.view-all-link { border: 1px solid var(--border); padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ================= Doctors ================= */
.doctors-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.doctor-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; text-align: center; }
.doctor-avatar {
  width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #0e7490, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin: 0 auto 12px;
}
.doctor-card .name { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.doctor-card .qualification { color: var(--primary-dark); font-size: 12px; margin-bottom: 2px; }
.doctor-card .specialty { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.doctor-card .view-profile-btn { display: inline-block; border: 1px solid var(--border); padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; }

/* ================= Promo banners ================= */
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promo-card { border-radius: 12px; padding: 22px; background: #eef6ff; border: 1px solid #dbeafe; }
.promo-card h3 { margin: 0 0 6px; font-size: 17px; }
.promo-card .price { font-size: 26px; font-weight: 800; color: var(--danger); margin: 6px 0 14px; }
.promo-card .promo-btn { display: inline-block; background: var(--primary-dark); color: #fff; padding: 9px 18px; border-radius: 6px; font-weight: 600; font-size: 13px; }
.promo-card .promo-btn:hover { background: var(--primary); text-decoration: none; }

/* ================= Test categories ================= */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.category-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px 10px; text-align: center; color: var(--text); }
.category-card:hover { border-color: var(--primary); text-decoration: none; }
.category-card .icon { font-size: 26px; margin-bottom: 8px; }
.category-card .label { font-size: 13px; font-weight: 600; }

/* ================= Mobile bottom app-style nav (public site) ================= */
.mobile-bottom-nav { display: none; }

/* ---- Login page ---- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-form { background: var(--card-bg); padding: 40px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); width: 320px; }
.login-form label { display: block; margin-top: 14px; font-size: 14px; }
.login-form input { width: 100%; padding: 10px; margin-top: 6px; border: 1px solid var(--border); border-radius: 6px; }
.login-form button { width: 100%; margin-top: 20px; padding: 10px; background: var(--primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.login-form button:hover { background: var(--primary-dark); }

.error { color: var(--danger); font-size: 14px; }
.notice { color: var(--primary-dark); font-size: 14px; }

.site-footer { text-align: center; padding: 24px; color: var(--muted); }

/* ================= Full professional footer ================= */
.site-footer-full { background: #0f2a43; color: #cbd5e1; margin-top: 20px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 44px 24px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px;
}
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-col a { display: block; color: #94a3b8; font-size: 13px; margin-bottom: 10px; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-brand img { max-height: 32px; }
.footer-brand span { color: #fff; font-weight: 700; font-size: 15px; }
.footer-tagline { font-size: 12px; color: #94a3b8; margin: 0 0 16px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.footer-social a:hover { background: rgba(255,255,255,0.18); text-decoration: none; }
.footer-contact-item { font-size: 13px; color: #94a3b8; margin-bottom: 10px; line-height: 1.5; }
.footer-contact-item a { display: inline; color: #94a3b8; margin: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding: 16px 24px; max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #7d95ad;
}
.footer-bottom a { color: #cbd5e1; }

/* ================================================================
   PANEL APP SHELL: sidebar + topbar
   (admin / receptionist / technician / pathologist / phlebotomist)
   ================================================================ */
.app-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px;
  background: var(--sidebar-bg); color: #cbd5e1;
  overflow-y: auto; z-index: 80;
  transition: transform 0.25s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand img { max-height: 34px; border-radius: 6px; }
.sidebar-brand-icon { font-size: 24px; }
.sidebar-brand-name { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.3; }
.sidebar-brand-sub { color: #7d95ad; font-size: 11px; }

.sidebar-nav { padding: 10px 10px 24px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
  color: #cbd5e1; font-size: 14px; font-weight: 500;
}
.sidebar-nav a:hover { background: var(--sidebar-bg-hover); text-decoration: none; color: #fff; }
.sidebar-nav a.active { background: var(--primary); color: #fff; }
.sidebar-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-overlay { display: none; }

.app-topbar {
  position: fixed; top: 0; left: 240px; right: 0; height: 64px; z-index: 70;
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
}
.sidebar-toggle-btn {
  display: none; background: none; border: none; font-size: 20px; cursor: pointer; padding: 6px;
}
.topbar-search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 14px; color: var(--muted); font-size: 13px;
}
.topbar-search input {
  border: none; background: transparent; outline: none; flex: 1; font-size: 13px; color: var(--text); min-width: 0;
}
.topbar-right { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.topbar-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #0e7490, #2563eb);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.topbar-user-text { line-height: 1.3; white-space: nowrap; }
.topbar-user-name { font-size: 13px; font-weight: 700; color: var(--text); }
.topbar-user-role { font-size: 11px; color: var(--muted); }
.topbar-logout { font-size: 12px; margin-left: 4px; white-space: nowrap; }

/* ---- Error pages ---- */
.error-page { text-align: center; padding: 100px 20px; }

/* ================= Dashboard widgets (shared across panels) ================= */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; padding: 24px 32px 8px; }

.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
}
.stat-card-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.stat-trend { font-size: 12px; font-weight: 700; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-sub { font-size: 11px; color: var(--muted); }

.stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.orange { background: #ffedd5; color: #c2410c; }
.stat-icon.red { background: #fee2e2; color: #b91c1c; }
.stat-icon.purple { background: #f3e8ff; color: #7e22ce; }

.dash-panels { padding: 8px 32px 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.dash-panel.span-2 { grid-column: span 2; }
.dash-panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dash-panel-title h3 { margin: 0; font-size: 15px; }
.dash-panel-title a { font-size: 12px; }

.chart-donut-wrap { position: relative; display: flex; justify-content: center; }
.chart-donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.chart-donut-center .num { font-size: 26px; font-weight: 800; color: var(--text); }
.chart-donut-center .label { font-size: 11px; color: var(--muted); }

.legend-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-item .val { margin-left: auto; color: var(--muted); }

.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 12px; }
.mini-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.status-pill { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; display: inline-block; }
.status-pill.paid, .status-pill.completed, .status-pill.approved, .status-pill.final { background: #dcfce7; color: #15803d; }
.status-pill.due, .status-pill.rejected { background: #fee2e2; color: #b91c1c; }
.status-pill.pending, .status-pill.draft { background: #ffedd5; color: #c2410c; }
.status-pill.progress, .status-pill.submitted, .status-pill.under_review, .status-pill.partial { background: #dbeafe; color: #1d4ed8; }

.activity-list { display: flex; flex-direction: column; gap: 14px; }
.activity-item { display: flex; gap: 10px; align-items: flex-start; }
.activity-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.activity-text { font-size: 13px; }
.activity-text .main { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--muted); }

.welcome-bar { padding: 24px 32px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.welcome-bar h1 { margin: 0 0 4px; font-size: 22px; }
.welcome-bar p { margin: 0; color: var(--muted); font-size: 14px; }
.new-patient-btn { background: var(--primary-dark); color: #fff; padding: 11px 22px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.new-patient-btn:hover { background: var(--primary); text-decoration: none; }

/* ==== Hamburger button (public site only) ==== */
.nav-toggle-btn { display: none; }

/* ==== Responsive: mobile & small tablets ==== */
@media (max-width: 900px) {
  .hero-new { grid-template-columns: 1fr; }
  .hero-image-wrap { min-height: 220px; order: -1; }
  .promo-grid { grid-template-columns: 1fr 1fr; }
  .dash-panels { grid-template-columns: 1fr; }
  .dash-panel.span-2 { grid-column: span 1; }
}

@media (max-width: 768px) {
  .top-bar {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  .site-header { padding: 12px 60px 12px 16px; }
  .brand-tagline { display: none; }
  .nav-actions { display: none; }

  .nav-toggle-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px;
    background: none; border: none; cursor: pointer; padding: 6px; position: absolute; top: 50%; right: 14px;
    transform: translateY(-50%); z-index: 60;
  }
  .nav-toggle-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
  .nav-toggle-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-btn.active span:nth-child(2) { opacity: 0; }
  .nav-toggle-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-collapsible { display: none; }
  .nav-collapsible.open { display: flex; flex-direction: column; width: 100%; order: 10; margin-top: 14px; gap: 2px; }
  .nav-collapsible.open a { margin-left: 0; padding: 14px 12px; border-bottom: 1px solid var(--border); white-space: normal; border-radius: 8px; }
  .nav-collapsible.open a.active, .nav-collapsible.open a:hover { background: var(--primary); color: #fff; }

  .hero-text h1 { font-size: 28px; }
  .hero-text p { font-size: 14px; }
  .hero-badges { gap: 12px; }
  .hero-buttons .btn-primary, .hero-buttons .btn-outline { padding: 12px 20px; font-size: 14px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .why-choose-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; padding: 30px 16px 20px; }
  .footer-bottom { flex-direction: column; text-align: center; padding: 14px 16px; }
  .promo-grid { grid-template-columns: 1fr; }
  .doctors-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .category-card .icon { font-size: 22px; }
  .category-card .label { font-size: 11px; }
  .public-section { padding: 24px 16px; }

  /* ---- Sidebar becomes an off-canvas drawer on mobile ---- */
  .app-sidebar { transform: translateX(-100%); box-shadow: 4px 0 20px rgba(0,0,0,0.2); }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 75;
  }
  .app-topbar { left: 0; padding: 0 12px; gap: 8px; }
  .sidebar-toggle-btn { display: block; }
  .topbar-search { padding: 8px 10px; }
  .topbar-search input { font-size: 13px; }
  .topbar-date { display: none; }
  .topbar-user-text { display: none; }
  .topbar-logout { display: none; }

  body:has(.app-sidebar) { padding-left: 0 !important; }

  section { padding: 16px !important; }
  .welcome-bar { padding: 16px 16px 0; }
  .dashboard-grid { padding: 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
  .dash-panels { padding: 8px 16px 16px; }
  .stat-value { font-size: 20px; }

  .login-form { width: 100%; max-width: 340px; padding: 28px 24px; }

  table:not(.mini-table) { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .form-grid { grid-template-columns: 1fr !important; }
  input, select, textarea, button { font-size: 16px; }

  .mobile-bottom-nav {
    display: flex !important; position: fixed !important; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
    background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(0,0,0,0.06); z-index: 100; padding: 4px 0 6px;
  }
  .mobile-bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); padding: 6px 2px; font-size: 10px; }
  .mobile-bottom-nav-item .icon { font-size: 19px; }
  .mobile-bottom-nav-item.active { color: var(--primary-dark); font-weight: 700; }
  .mobile-bottom-nav-item:hover { text-decoration: none; }
  body:has(.mobile-bottom-nav) { padding-bottom: 62px; }
}

@media (max-width: 420px) {
  .hero-text h1 { font-size: 24px; }
  .stat-card { padding: 14px; }
  .feature-strip { grid-template-columns: 1fr; }
}
