/* ==========================================================================
   GeoXa — Design System (DEXTRAF SARL)
   High-contrast outdoor-readable geological & cartographic SaaS interface
   ========================================================================== */

:root {
  --bg-app: #F3F5F4;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F8FAF9;
  --bg-sidebar: #141A21;
  --bg-sidebar-hover: #1E2732;
  --bg-sidebar-active: #253240;

  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-inverse: #F9FAFB;

  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;

  --brand-gold: #C88A2B;
  --brand-gold-dark: #A66F1D;
  --brand-gold-soft: #FEF3C7;
  --brand-teal: #0F766E;
  --brand-teal-dark: #115E59;
  --brand-teal-soft: #CCFBF1;

  --status-ok: #059669;
  --status-ok-bg: #D1FAE5;
  --status-warn: #D97706;
  --status-warn-bg: #FEF3C7;
  --status-danger: #DC2626;
  --status-danger-bg: #FEE2E2;
  --status-info: #2563EB;
  --status-info-bg: #DBEAFE;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.16);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --sidebar-w: 256px;
  --topbar-h: 62px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- Auth Screen ---------- */
.auth-overlay {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--bg-sidebar);
}

.auth-hero {
  background:
    radial-gradient(circle at 20% 25%, rgba(200, 138, 43, 0.22), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(15, 118, 110, 0.24), transparent 55%),
    linear-gradient(155deg, #11161D 0%, #1B2531 100%);
  color: var(--text-inverse);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.auth-hero-inner { position: relative; z-index: 1; max-width: 520px; }

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1F2A37, #111827);
  border: 1px solid rgba(200, 138, 43, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.brand-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #D1D5DB;
}

.auth-hero h1 {
  font-size: 34px;
  line-height: 1.18;
  margin: 32px 0 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-hero p {
  color: #CBD5E1;
  font-size: 15px;
  margin: 0 0 28px;
}

.auth-feature-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.auth-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gold);
  margin-top: 6px;
  flex-shrink: 0;
}

.auth-panel {
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 36px 24px;
  position: relative;
}

.auth-lang-bar {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  gap: 6px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 7px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.demo-accounts {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.demo-account-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin-top: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-alt);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.15s, background 0.15s;
}

.demo-account-btn:hover {
  border-color: var(--brand-gold);
  background: #FFFDF7;
}

/* ---------- App Shell ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  transition: transform 0.2s ease;
}

.sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.org-switcher {
  margin-top: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}

.org-switcher label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9CA3AF;
  margin-bottom: 3px;
}

.org-switcher select {
  width: 100%;
  background: transparent;
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.org-switcher select option {
  background: #1F2937;
  color: #FFFFFF;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6B7280;
  padding: 12px 10px 4px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: #CBD5E1;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: #FFFFFF;
}

.nav-item.active {
  background: var(--bg-sidebar-active);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand-gold);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #F3F4F6;
}

.nav-badge.warn {
  background: var(--brand-gold);
  color: #111827;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-gold);
  color: #141A21;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  cursor: pointer;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---------- Sync & Offline Controls ---------- */
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-alt);
  cursor: pointer;
}

.sync-pill.online { border-color: #A7F3D0; background: #ECFDF5; color: #065F46; }
.sync-pill.offline { border-color: #FCD34D; background: #FFFBEB; color: #92400E; }
.sync-pill.conflict { border-color: #FCA5A5; background: #FEF2F2; color: #991B1B; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-ok);
}

.sync-pill.offline .status-dot { background: var(--status-warn); }
.sync-pill.conflict .status-dot { background: var(--status-danger); animation: pulse 1.4s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

.offline-banner {
  background: #FEF3C7;
  border-bottom: 1px solid #F59E0B;
  color: #78350F;
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- Content & Layout ---------- */
.content {
  padding: 22px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  min-width: 0;
}

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

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-teal);
}

.kpi-card.gold::before { background: var(--brand-gold); }
.kpi-card.warn::before { background: var(--status-warn); }
.kpi-card.info::before { background: var(--status-info); }

.kpi-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.kpi-sub { font-size: 12px; color: var(--text-secondary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover { background: var(--bg-surface-alt); border-color: #94A3B8; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--brand-teal-dark); border-color: var(--brand-teal-dark); }

.btn-gold {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #111827;
}
.btn-gold:hover { background: var(--brand-gold-dark); color: #FFFFFF; }

.btn-danger {
  background: var(--status-danger);
  border-color: var(--status-danger);
  color: #FFFFFF;
}

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-app); color: var(--text-primary); }

/* ---------- Badges & Pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-ok { background: var(--status-ok-bg); color: #065F46; }
.badge-warn { background: var(--status-warn-bg); color: #92400E; }
.badge-danger { background: var(--status-danger-bg); color: #991B1B; }
.badge-info { background: var(--status-info-bg); color: #1E40AF; }
.badge-neutral { background: #E5E7EB; color: #374151; }
.badge-gold { background: var(--brand-gold-soft); color: #78350F; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-control {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

textarea.form-control { min-height: 78px; resize: vertical; }

.fact-vs-interp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  grid-column: 1 / -1;
}

.fact-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 12px;
}

.interp-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 12px;
}

/* ---------- Tables ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-alt);
  white-space: nowrap;
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

tr:hover td { background: #FAFCFB; }

/* ---------- Toolbar / Filters ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Map ---------- */
.map-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 16px;
  height: calc(100vh - 180px);
  min-height: 520px;
}

.map-stage {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #E7ECEF;
  height: 100%;
}

#leaflet-map, #offline-canvas-map {
  width: 100%;
  height: 100%;
}

.map-overlay-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.map-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

/* ---------- Photos Grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.photo-thumb {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface-alt);
  position: relative;
}

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

.photo-caption {
  padding: 5px 7px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 24, 39, 0.78);
  color: #FFFFFF;
  cursor: pointer;
  font-size: 12px;
}

/* ---------- Timeline (Chain of Custody) ---------- */
.timeline {
  border-left: 2px solid var(--border-strong);
  margin-left: 8px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-teal);
  border: 2px solid #FFFFFF;
}

/* ---------- Pricing / Payment Cards ---------- */
.plan-card {
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-card.active-plan {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.plan-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.pay-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
}

.pay-method-btn {
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--bg-surface);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s;
}

.pay-method-btn.selected {
  border-color: var(--brand-gold);
  background: #FFFDF7;
}

/* ---------- Modals & Toasts ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-surface-alt);
}

.toast-stack {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  background: #141A21;
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--brand-teal);
  font-size: 13px;
  animation: slideIn 0.2s ease;
}

.toast.warn { border-left-color: var(--brand-gold); }
.toast.danger { border-left-color: var(--status-danger); }

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

/* ---------- Mobile Bottom Bar ---------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-sidebar);
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 45;
  padding: 6px 4px;
  justify-content: space-around;
}

.mobile-bottom-btn {
  border: none;
  background: transparent;
  color: #9CA3AF;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.mobile-bottom-btn.active {
  color: var(--brand-gold);
}

.progress-bar {
  height: 7px;
  background: #E5E7EB;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-gold));
  border-radius: 999px;
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1 { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  .map-stage { height: 420px; }
}

@media (max-width: 860px) {
  .auth-overlay { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; padding-bottom: 64px; }
  .mobile-menu-btn { display: inline-flex; }
  .mobile-bottom-nav { display: flex; }
  .form-grid, .form-grid-3, .fact-vs-interp, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
}
