body {
  border: 5px solid red !important;
}
/* === ZEEAE.COM — Global Stylesheet === */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  --blue-950: #030c1c;
  --blue-900: #041630;
  --blue-800: #062148;
  --blue-700: #0a3166;
  --blue-600: #1048a0;
  --blue-500: #1a5fd4;
  --blue-400: #3b7ef0;
  --blue-300: #6fa4f7;
  --blue-200: #aac8fb;
  --blue-100: #ddeafd;
  --blue-50:  #f0f6ff;

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #06b6d4;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 16px rgba(10,49,102,.10);
  --shadow-lg: 0 12px 40px rgba(10,49,102,.16);
  --shadow-xl: 0 24px 64px rgba(10,49,102,.22);

  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --font-head: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --sidebar-w:     260px;
  --topbar-h:       64px;
  --bottom-nav-h:   60px;
  --transition:     .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-800);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-body); border: none; outline: none; }
input, select, textarea { font-family: var(--font-body); outline: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--blue-300); border-radius: 99px; }

/* ══════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════ */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
}
.auth-brand {
  background: linear-gradient(145deg, var(--blue-800) 0%, var(--blue-600) 50%, var(--blue-400) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px; position: relative; overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.auth-brand .brand-logo {
  font-family: var(--font-head); font-size: 2.8rem; font-weight: 800;
  color: var(--white); letter-spacing: -1px; position: relative;
  text-shadow: 0 2px 20px rgba(0,0,0,.2);
}
.auth-brand .brand-logo span { color: var(--blue-200); }
.auth-brand .brand-tagline {
  color: var(--blue-100); font-size: .95rem; margin-top: 12px;
  font-weight: 400; text-align: center; max-width: 280px; line-height: 1.6;
}
.auth-brand .brand-illustration {
  margin-top: 48px; width: 100%; max-width: 340px;
  background: rgba(255,255,255,.08); border-radius: var(--radius-xl);
  padding: 32px; border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
}
.auth-brand .stat-row { display: flex; gap: 16px; margin-top: 24px; }
.auth-brand .stat {
  flex: 1; background: rgba(255,255,255,.1); border-radius: var(--radius);
  padding: 16px; text-align: center; border: 1px solid rgba(255,255,255,.12);
}
.auth-brand .stat-num { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: #fff; }
.auth-brand .stat-label { font-size: .75rem; color: var(--blue-200); margin-top: 2px; }

.auth-form-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 56px; overflow-y: auto;
}
.auth-form-side .form-header { width: 100%; max-width: 420px; margin-bottom: 36px; }
.auth-form-side .form-header h1 {
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 700;
  color: var(--gray-900); line-height: 1.2;
}
.auth-form-side .form-header p { color: var(--gray-500); margin-top: 8px; font-size: .95rem; }
.auth-form { width: 100%; max-width: 420px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--gray-600); margin-bottom: 7px; letter-spacing: .02em; text-transform: uppercase;
}
.form-control {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .95rem; color: var(--gray-800); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(26,95,212,.12);
}
.form-control::placeholder { color: var(--gray-400); }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 44px; }
.input-icon-wrap .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 1rem; pointer-events: none;
}
.input-icon-wrap .toggle-pw {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); cursor: pointer; font-size: 1rem;
  transition: color var(--transition);
}
.input-icon-wrap .toggle-pw:hover { color: var(--blue-500); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .95rem; transition: all var(--transition); letter-spacing: .01em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: var(--white); box-shadow: 0 4px 14px rgba(26,95,212,.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
  box-shadow: 0 6px 20px rgba(26,95,212,.45); transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-outline {
  background: transparent; color: var(--blue-600); border: 1.5px solid var(--blue-200);
}
.btn-outline:hover { background: var(--blue-50); border-color: var(--blue-400); }

.auth-divider { text-align: center; margin: 20px 0; color: var(--gray-400); font-size: .85rem; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: calc(50% - 30px);
  height: 1px; background: var(--gray-200);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-switch { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--gray-500); }
.auth-switch a { color: var(--blue-600); font-weight: 600; }
.auth-switch a:hover { color: var(--blue-700); }

.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px;
  font-size: .9rem; font-weight: 500; display: flex; align-items: center; gap: 10px;
}
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ══════════════════════════════════════
   DASHBOARD LAYOUT
   Desktop (>768px): sidebar always visible,
     topbar offset right of sidebar, NO bottom nav.
   Mobile (<=768px): sidebar hidden off-screen,
     topbar full-width with hamburger, bottom nav shown.
══════════════════════════════════════ */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--blue-900);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 300;
  transition: transform var(--transition);
  overflow-y: auto; overflow-x: hidden;
  /* Desktop: always visible, no transform */
  transform: translateX(0);
}
.sidebar-logo {
  padding: 24px 24px 20px;
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 800;
  color: var(--white); letter-spacing: -.5px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-logo span { color: var(--blue-300); }
.sidebar-logo .version {
  font-size: .65rem; font-weight: 400; color: var(--blue-400);
  display: block; font-family: var(--font-body); letter-spacing: .1em;
  text-transform: uppercase; margin-top: 2px;
}
.sidebar-section { padding: 20px 16px 8px; }
.sidebar-section-label {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--blue-400); padding: 0 8px; margin-bottom: 6px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a, .sidebar-nav li button {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--blue-200); font-size: .9rem; font-weight: 500;
  transition: all var(--transition); width: 100%;
  background: transparent; text-align: left;
}
.sidebar-nav li a:hover, .sidebar-nav li button:hover {
  background: rgba(255,255,255,.07); color: var(--white);
}
.sidebar-nav li a.active {
  background: linear-gradient(90deg, var(--blue-600), var(--blue-500));
  color: var(--white); box-shadow: 0 2px 8px rgba(26,95,212,.35);
}
.sidebar-nav li a .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-bottom {
  margin-top: auto; padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}

/* Overlay for sidebar on mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 299;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: fixed; top: 0;
  left: var(--sidebar-w); /* desktop: offset by sidebar */
  right: 0; z-index: 200;
  box-shadow: var(--shadow-sm);
}
.topbar-left  { display: flex; align-items: center; gap: 14px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }

/* Hamburger — hidden on desktop, shown on mobile */
.hamburger {
  display: none;
  background: var(--gray-100); border: none; cursor: pointer;
  color: var(--gray-700); font-size: 1.1rem;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.hamburger:hover { background: var(--gray-200); }

.topbar-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--gray-800); }
.topbar-avatar {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .9rem; cursor: pointer; flex-shrink: 0;
}
.topbar-user { font-size: .85rem; color: var(--gray-700); text-align: right; }
.topbar-user strong { display: block; font-weight: 600; color: var(--gray-900); }

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-w); /* desktop: beside sidebar */
  padding-top: var(--topbar-h);
  flex: 1; min-height: 100vh;
}
.page-body { padding: 28px; }
.page-header { margin-bottom: 28px; }
.page-header h2 {
  font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--gray-900);
}
.page-header p { color: var(--gray-500); font-size: .9rem; margin-top: 4px; }

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); overflow: hidden;
}
.card-header {
  padding: 20px 24px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.card-body { padding: 24px; }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 22px 24px; border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 80px; height: 80px; border-radius: 50%; background: var(--blue-50);
}
.stat-card.blue::after  { background: rgba(59,126,240,.08); }
.stat-card.green::after { background: rgba(16,185,129,.08); }
.stat-card.amber::after { background: rgba(245,158,11,.08); }
.stat-card.red::after   { background: rgba(239,68,68,.08); }
.stat-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 14px; position: relative; z-index: 1;
}
.stat-card.blue .stat-card-icon  { background: rgba(26,95,212,.1);  color: var(--blue-600); }
.stat-card.green .stat-card-icon { background: rgba(16,185,129,.1); color: var(--success); }
.stat-card.amber .stat-card-icon { background: rgba(245,158,11,.1); color: var(--warning); }
.stat-card.red .stat-card-icon   { background: rgba(239,68,68,.1);  color: var(--danger); }
.stat-card-value {
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 800;
  color: var(--gray-900); line-height: 1;
}
.stat-card-label { font-size: .82rem; color: var(--gray-500); margin-top: 6px; }

/* ══════════════════════════════════════
   TABLE
══════════════════════════════════════ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 12px 16px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gray-500);
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
  font-size: .9rem; color: var(--gray-700);
}
tbody tr:hover td { background: var(--blue-50); }
tbody tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.badge-active   { background: #dcfce7; color: #15803d; }
.badge-inactive { background: var(--gray-100); color: var(--gray-600); }
.badge-banned   { background: #fee2e2; color: #b91c1c; }
.badge-admin    { background: var(--blue-100); color: var(--blue-700); }
.badge-user     { background: var(--gray-100); color: var(--gray-600); }
.badge-amber    { background: #fef9c3; color: #92400e; }
.badge-info     { background: #e0f2fe; color: #0369a1; }

.action-btns { display: flex; gap: 6px; }
.btn-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: all var(--transition);
}
.btn-icon.edit { background: var(--blue-50); color: var(--blue-600); }
.btn-icon.edit:hover { background: var(--blue-600); color: var(--white); }
.btn-icon.del { background: #fee2e2; color: var(--danger); }
.btn-icon.del:hover { background: var(--danger); color: var(--white); }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--gray-900); color: var(--white);
  padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: .875rem; min-width: 260px; max-width: 360px;
  animation: slideIn .3s ease;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--blue-400); }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════
   BOTTOM NAV
   Default: hidden (desktop).
   On mobile (<=768px): shown via media query.
   Using display:none / display:block + inner
   flex wrapper — most reliable cross-browser
   pattern for Samsung Internet & Android Chrome.
══════════════════════════════════════ */
.bottom-nav {
  display: none !important; /* shown only at <=768px — see mobile media query below */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--blue-900);
  border-top: 1px solid rgba(255,255,255,.12);
  z-index: 400;
  /* safe area for Android gesture bar / iPhone home bar */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 24px rgba(4,22,48,.4);
}
/* Inner wrapper carries the flex layout so padding-bottom on parent works */
.bottom-nav-inner {
  display: flex;
  height: var(--bottom-nav-h);
  align-items: stretch;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  color: rgba(255,255,255,.4);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  /* 44px min touch target (Android accessibility) */
  min-width: 44px;
}
.bottom-nav-item i {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform var(--transition), color var(--transition);
}
.bottom-nav-item.active {
  color: var(--white);
}
.bottom-nav-item.active i {
  color: var(--blue-300);
  transform: translateY(-2px);
}
/* Active pill indicator */
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--blue-400);
  border-radius: 0 0 2px 2px;
}
.bottom-nav-item:active { opacity: .6; }

/* ══════════════════════════════════════
   PRODUCT CARDS
══════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.product-card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-img { width: 100%; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-50); }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300); font-size: 2.5rem;
}
.product-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-name {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  color: var(--gray-900); margin-bottom: 4px; line-height: 1.3;
}
.product-meta { font-size: .78rem; color: var(--gray-500); margin-bottom: 6px; }
.product-desc { font-size: .8rem; color: var(--gray-600); line-height: 1.5; flex: 1; margin-bottom: 10px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-family: var(--font-head); font-size: 1.05rem; font-weight: 800; color: var(--blue-700); }
.product-stock { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-full); }
.product-stock.in-stock  { background: #dcfce7; color: #15803d; }
.product-stock.out-stock { background: #fee2e2; color: #b91c1c; }

/* PWA Install Banner */
#pwa-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--blue-900); color: white;
  padding: 16px 24px; display: flex; align-items: center;
  justify-content: space-between; z-index: 9998;
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
  transform: translateY(100%); transition: transform .3s ease;
}
#pwa-banner.show { transform: translateY(0); }
#pwa-banner p { font-size: .9rem; }
#pwa-banner p strong { display: block; font-family: var(--font-head); }
#pwa-banner .pwa-actions { display: flex; gap: 10px; }

/* ══════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE (<=768px)
   On mobile:
   • Sidebar slides off-screen (hidden by default)
   • Hamburger in topbar slides sidebar back in
   • Topbar spans full width (left:0)
   • Main content no left margin
   • Bottom nav SHOWN — this is the primary nav on mobile
══════════════════════════════════════ */
@media (max-width: 768px) {

  /* Auth */
  .auth-wrapper { grid-template-columns: 1fr; min-height: 100svh; }
  .auth-brand { display: none; }
  .auth-form-side { padding: 48px 20px 40px; justify-content: flex-start; min-height: 100svh; }
  .auth-form-side .form-header { margin-bottom: 24px; }
  .auth-form-side .form-header h1 { font-size: 1.5rem; }
  .auth-form, .auth-form-side .form-header { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Sidebar: completely hidden on mobile — bottom nav is the only navigation */
  .sidebar,
  .sidebar.open,
  .sidebar-overlay {
    display: none !important;
  }

  /* Topbar: full width, no hamburger (sidebar is gone), hide user name */
  .topbar {
    left: 0;
    padding: 0 14px;
  }
  .hamburger { display: none !important; }
  .topbar-user { display: none; }

  /* Main content: no sidebar offset, pad bottom for nav bar */
  .main-content {
    margin-left: 0;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 8px);
  }

  /* BOTTOM NAV: show on all mobile/Android/iOS */
  .bottom-nav {
    display: block !important;
  }

  /* Layout */
  .page-body { padding: 14px; }
  .page-header { margin-bottom: 18px; }
  .page-header h2 { font-size: 1.3rem; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
  .stat-card { padding: 16px; }
  .stat-card-value { font-size: 1.5rem; }

  /* Cards */
  .card-body { padding: 14px; }
  .card-header { padding: 14px 16px; }
  .card-body form { flex-direction: column !important; gap: 10px !important; }
  .card-body form > div { min-width: 100% !important; }
  .card-body form > button,
  .card-body form > a { width: 100%; justify-content: center; }

  /* Tables */
  table { min-width: 620px; }
  thead th { padding: 10px 12px; font-size: .7rem; }
  tbody td  { padding: 12px; font-size: .82rem; }

  /* Products */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Toast: above bottom nav */
  #toast-container {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
    right: 12px; left: 12px;
  }
  .toast { min-width: unset; width: 100%; }

  /* Modal */
  #pw-modal > div { padding: 24px 20px; margin: 0 12px; }
}

@media (max-width: 480px) {
  .form-control { font-size: 16px; } /* prevent zoom on focus */
  .auth-form-side { padding: 32px 16px 40px; }
}

@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
}