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

:root {
  /* Mayday AI brand — orange primary, cream typography on warm dark backgrounds */
  --bg: #16110d;
  --surface: #201812;
  --surface2: #2a2018;
  --border: #3d2f23;
  --text: #f7f1e3;
  --text2: #b3a38e;
  --primary: #d9531e;
  --primary-dark: #b54317;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #a855f7;
  --teal: #14b8a6;
  --gray: #6b7280;
  --radius: 8px;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* NAVBAR */
.navbar { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.navbar-brand { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.brand-sub { font-weight: 400; color: var(--text2); font-size: 13px; }
.stats-bar { display: flex; gap: 8px; flex: 1; justify-content: center; }
.stat-pill { display: flex; flex-direction: column; align-items: center; background: var(--surface2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 12px; min-width: 64px; cursor: default; }
.stat-pill.green .pill-num { color: var(--green); }
.stat-pill.blue .pill-num { color: var(--primary); }
.stat-pill.amber .pill-num { color: var(--amber); }
.stat-pill.purple .pill-num { color: var(--purple); }
.stat-pill.teal .pill-num { color: var(--teal); }
.pill-num { font-size: 15px; font-weight: 700; line-height: 1.2; }
.pill-label { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; }
.navbar-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* BUTTONS */
.btn { border: none; border-radius: var(--radius); padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface2); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: rgba(239,68,68,0.1); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #0d9488; }
.btn-retell { background: #7c3aed; color: #fff; }
.btn-retell:hover { background: #6d28d9; }
.btn-retell:disabled { background: #a78bfa; cursor: not-allowed; }

/* LAYOUT */
.main-layout { display: flex; flex: 1; overflow: hidden; }
.left-panel { width: 320px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.map-container { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

/* LEFT PANEL */
.panel-controls { padding: 12px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.search-input { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 10px; color: var(--text); font-size: 13px; outline: none; }
.search-input:focus { border-color: var(--primary); }
.filter-row { display: flex; gap: 6px; }
.filter-select { flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 5px 8px; color: var(--text); font-size: 12px; outline: none; cursor: pointer; }
.selection-bar { display: flex; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--border); align-items: center; }
.selection-bar .btn-danger:disabled { opacity: 0.35; cursor: not-allowed; }
.tab-row { display: flex; border-bottom: 1px solid var(--border); }
.tab-btn { flex: 1; background: none; border: none; color: var(--text2); padding: 8px; font-size: 12px; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.business-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }

/* BUSINESS CARD */
.biz-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; transition: all 0.15s; display: flex; flex-direction: column; gap: 4px; position: relative; }
.biz-card:hover { border-color: var(--primary); }
.biz-card.selected { border-color: var(--primary); background: rgba(217,83,30,0.12); }
.biz-card-top { display: flex; align-items: flex-start; gap: 8px; }
.biz-check { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; cursor: pointer; accent-color: var(--primary); }
.biz-name { font-size: 13px; font-weight: 600; line-height: 1.3; flex: 1; }
.biz-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-left: 24px; }
.biz-category { font-size: 11px; color: var(--text2); }
.biz-window { font-size: 11px; color: var(--amber); }
.score-dots { display: flex; gap: 2px; }
.score-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.score-dot.filled { background: var(--green); }
.status-badge { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.s-unvisited { background: rgba(107,114,128,0.2); color: #9ca3af; }
.s-visited { background: rgba(59,130,246,0.2); color: #60a5fa; }
.s-interested { background: rgba(34,197,94,0.2); color: #4ade80; }
.s-not_interested { background: rgba(239,68,68,0.2); color: #f87171; }
.s-follow_up { background: rgba(245,158,11,0.2); color: #fbbf24; }
.s-closed { background: rgba(168,85,247,0.2); color: #c084fc; }
.s-no_answer { background: rgba(107,114,128,0.2); color: #9ca3af; }

/* MAP CENTER BUTTON */
.map-center-btn { position: absolute; top: 12px; right: 12px; z-index: 500; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); width: 36px; height: 36px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.4); transition: background 0.15s; }
.map-center-btn:hover { background: var(--surface2); }

/* DETAIL LINKS */
.detail-link { color: var(--primary); text-decoration: none; }
.detail-link:hover { text-decoration: underline; }

/* MAP LEGEND */
.map-legend { position: absolute; bottom: 24px; left: 12px; background: rgba(22,17,13,0.9); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; font-size: 11px; display: flex; flex-wrap: wrap; gap: 8px; z-index: 500; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 3px; }

/* ROUTE PANEL */
.route-panel { position: fixed; bottom: 0; left: 320px; right: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 20px; z-index: 600; max-height: 280px; overflow-y: auto; transition: transform 0.2s; }
.route-panel.hidden { transform: translateY(100%); }
.route-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.home-base-row { display: flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 10px; }
.home-location-btns { display: flex; gap: 6px; }
.home-icon { font-size: 14px; }
.home-label { font-size: 12px; color: var(--text2); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-label.set { color: var(--green); }
.route-summary-bar { font-size: 12px; color: var(--amber); font-weight: 500; margin-bottom: 8px; min-height: 16px; }
.route-instructions { font-size: 12px; color: var(--text2); margin-bottom: 10px; }
.route-list { display: flex; flex-direction: column; gap: 6px; padding-left: 20px; }
.route-list li { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.route-num { background: var(--primary); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-overlay.hidden { display: none; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 100%; max-width: 600px; max-height: 85vh; overflow-y: auto; display: flex; flex-direction: column; }
.modal-sm { max-width: 460px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 20px 0; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text2); font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 20px; flex: 1; }
.modal-footer { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--border); }

/* DETAIL MODAL */
.detail-cat { font-size: 12px; color: var(--text2); display: block; margin-top: 2px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.detail-section { display: flex; flex-direction: column; gap: 8px; }
.detail-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.detail-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.score-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.score-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.score-stars { display: flex; gap: 3px; margin-bottom: 6px; }
.score-star { font-size: 16px; }
.score-window { font-size: 13px; font-weight: 600; color: var(--amber); margin-bottom: 4px; }
.score-tip { font-size: 12px; color: var(--text2); }
.notes-section { margin-top: 12px; }
.notes-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 6px; }
.notes-display { font-size: 13px; color: var(--text); min-height: 40px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; white-space: pre-wrap; }
.visit-history { margin-top: 16px; }
.visit-item { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; font-size: 12px; }
.visit-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.visit-date { color: var(--text2); }
.visit-notes { color: var(--text2); margin-top: 4px; }

/* VOICE PROMPT */
.voice-prompt-section { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.voice-prompt-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.voice-prompt-textarea { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; color: var(--text); font-size: 12px; font-family: inherit; line-height: 1.55; resize: vertical; height: 280px; outline: none; }
.voice-prompt-textarea:focus { border-color: var(--primary); }
.route-prompt-btn { background: none; border: none; font-size: 16px; cursor: pointer; padding: 2px 4px; flex-shrink: 0; opacity: 0.7; transition: opacity 0.15s; }
.route-prompt-btn:hover { opacity: 1; }

/* FORMS */
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-label { font-size: 12px; color: var(--text2); display: block; margin-bottom: 5px; font-weight: 500; }
.form-input { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; color: var(--text); font-size: 13px; outline: none; resize: vertical; font-family: inherit; }
.form-input:focus { border-color: var(--primary); }

/* OUTCOME GRID */
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.outcome-btn { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; text-align: center; }
.outcome-btn:hover { border-color: var(--primary); }
.outcome-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* DISCOVER */
.discover-note { font-size: 12px; color: var(--text2); margin-bottom: 14px; line-height: 1.5; }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cat-btn { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; color: var(--text); font-size: 12px; cursor: pointer; transition: all 0.15s; text-align: left; }
.cat-btn:hover { border-color: var(--primary); background: rgba(217,83,30,0.12); }
.cat-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.discover-result { margin-top: 14px; font-size: 13px; padding: 10px; background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border); min-height: 40px; }

/* SUGGESTIONS */
.suggest-header { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 4px 4px; }

/* TOAST */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; font-size: 13px; z-index: 2000; box-shadow: 0 4px 20px rgba(0,0,0,0.4); transition: all 0.2s; }
.toast.hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* MAP POPUP */
.leaflet-popup-content-wrapper { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.leaflet-popup-tip { background: var(--surface); }
.map-popup { font-size: 13px; }
.map-popup strong { display: block; margin-bottom: 4px; }
.map-popup .popup-meta { font-size: 11px; color: var(--text2); margin-bottom: 8px; }
.map-popup button { background: var(--primary); border: none; color: #fff; padding: 5px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; width: 100%; margin-top: 4px; }

.empty-state { text-align: center; color: var(--text2); font-size: 13px; padding: 40px 20px; }

/* REP PICKER */
.rep-picker-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.rep-picker-overlay.hidden { display: none; }
.rep-picker-box {
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; max-width: 380px; width: 100%;
}
.rep-picker-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700;
}
.brand-tagline { font-size: 13px; color: var(--text2); text-align: center; margin-top: -18px; }
.rep-picker-title { font-size: 24px; font-weight: 700; text-align: center; }
.rep-picker-cards { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.rep-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  cursor: pointer; transition: all 0.15s; width: 100%;
  text-align: left;
}
.rep-card:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,0.3); border-color: var(--primary); }
.rep-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.rep-card-text { display: flex; flex-direction: column; }
.rep-card-name { font-size: 16px; font-weight: 700; }
.rep-card-sub  { font-size: 12px; color: var(--text2); margin-top: 2px; }
.rep-picker-note { font-size: 12px; color: var(--text2); text-align: center; }

/* WORKSPACE SWITCHER (in navbar) */
.ws-select {
  background: var(--surface2); border: 2px solid var(--primary);
  border-radius: 20px; color: var(--text);
  padding: 4px 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; outline: none; flex-shrink: 0; max-width: 160px;
}

/* REP BADGE (in navbar) */
.rep-badge {
  background: var(--surface2); border: 2px solid var(--border);
  border-radius: 20px; color: var(--text);
  padding: 4px 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  flex-shrink: 0; transition: border-color 0.15s;
}
.rep-badge:hover { opacity: 0.85; }
.rep-badge-switch { font-size: 12px; opacity: 0.5; }

/* Mobile stat elements (hidden on desktop, shown on mobile) */
.mobile-stats { display: none; }
.mobile-nav   { display: none; }

.mobile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border-right: 1px solid var(--border);
}
.mobile-stat:last-child { border-right: none; }
.mobile-stat span:first-child { font-size: 17px; font-weight: 700; }
.mobile-stat span:last-child  { font-size: 9px; text-transform: uppercase; color: var(--text2); letter-spacing: 0.04em; }
.mobile-stat.green span:first-child  { color: var(--green); }
.mobile-stat.amber span:first-child  { color: var(--amber); }
.mobile-stat.purple span:first-child { color: var(--purple); }

/* ============================================================
   MOBILE — each nav tab is its own full-screen page.
   The map lives at z-index 1 (always rendered, never removed).
   Businesses and Route pages sit at z-index 10 and fully cover it.
   Add and Discover open as bottom-sheet modals (unchanged).
   ============================================================ */
@media (max-width: 768px) {

  html {
    height: 100%;
    height: -webkit-fill-available;
    height: 100dvh;
    overflow: hidden;
  }
  body {
    height: 100%;
    height: -webkit-fill-available;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* Navbar: logo only */
  .navbar { flex-shrink: 0; height: 48px; padding: 0 14px; }
  .stats-bar { display: none; }
  .navbar-actions { display: none; }
  .brand-sub { display: none; }

  /* Stats row below navbar */
  .mobile-stats {
    display: flex;
    flex-shrink: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 5px 0;
  }

  /* Content area: stacking context for all tab pages */
  .main-layout {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    /* reset desktop flex-row */
    display: block;
  }

  /* MAP PAGE — base layer, always rendered */
  .map-container {
    position: absolute;
    inset: 0;
    z-index: 1;
  }
  #map { width: 100%; height: 100%; }
  .map-legend { display: none; }

  /* BUSINESSES PAGE — covers map when active */
  .left-panel {
    position: absolute;
    inset: 0;
    z-index: 10;
    width: 100%;
    border-right: none;
    background: var(--surface);
    display: none;
    flex-direction: column;
    overflow: hidden;
  }
  .left-panel.mobile-open { display: flex; }

  /* Business list must scroll inside flex parent — min-height:0 is the key */
  .business-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ROUTE PAGE — full-screen page, covers map */
  .route-panel {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: var(--surface);
    border-top: none;
    border-radius: 0;
    padding: 16px;
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* kill desktop transform animation */
    transform: none !important;
    transition: none;
  }
  .route-panel.hidden { display: none; }

  /* Route page header layout */
  .route-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }
  .route-header > strong { font-size: 17px; }
  .home-base-row { width: 100%; }
  .home-label { max-width: none; flex: 1; white-space: normal; font-size: 12px; }
  /* Location buttons: Use My Location takes full width, Type Address is secondary */
  .home-location-btns { display: flex; gap: 8px; width: 100%; }
  .home-location-btns .btn-primary { flex: 2; font-size: 14px; padding: 11px; }
  .home-location-btns .btn-outline { flex: 1; font-size: 13px; }
  .route-header-actions { display: flex; gap: 8px; }
  .route-header-actions .btn-primary { flex: 1; text-align: center; font-size: 15px; padding: 12px; }
  .route-instructions { font-size: 13px; margin-bottom: 12px; }

  /* Bottom nav */
  .mobile-nav {
    display: flex;
    flex-shrink: 0;
    height: 58px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    padding: 4px 2px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .mobile-nav-btn.active { color: var(--primary); }
  .mnav-icon  { font-size: 20px; line-height: 1; }
  .mnav-label { font-size: 10px; font-weight: 500; }
  .mnav-plus {
    width: 30px; height: 30px;
    background: var(--primary); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 300; line-height: 1;
  }

  /* Modals: slide up as bottom sheets */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: 100%; width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
  }

  /* Touch-friendly sizing */
  .btn          { padding: 10px 16px; font-size: 14px; }
  .biz-card     { padding: 12px 14px; }
  .biz-name     { font-size: 14px; }
  .outcome-btn  { padding: 12px 8px; font-size: 13px; }
  .filter-select { font-size: 13px; padding: 7px 8px; }
  .search-input  { font-size: 16px; padding: 9px 12px; }
  .tab-btn       { padding: 10px; font-size: 13px; }
  .cat-btn       { padding: 12px 10px; font-size: 13px; }
  .detail-grid   { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }
  .lookup-grid   { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }

  /* Toast: float above bottom nav */
  .toast { bottom: 68px; left: 12px; right: 12px; text-align: center; }
}

/* TOGGLE */
.toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-top: 8px; font-size: 12px; color: var(--text2); }
.toggle-wrap { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 20px; transition: 0.2s; }
.toggle-slider::before { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.toggle-wrap input:checked + .toggle-slider { background: var(--primary); }
.toggle-wrap input:checked + .toggle-slider::before { transform: translateX(16px); }

/* RETURN TIME */
.return-time-section { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.return-time-header { font-size: 12px; color: var(--amber); font-weight: 500; margin-bottom: 10px; }
.return-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; background: rgba(245,158,11,0.15); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); border-radius: 10px; padding: 1px 6px; font-weight: 600; }

/* LOOKUP PREVIEW */
.lookup-preview { display: flex; flex-direction: column; gap: 10px; }
.lookup-field { display: flex; flex-direction: column; gap: 3px; }
.lookup-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.lookup-value { font-size: 13px; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 10px; }
.lookup-value.missing { color: var(--amber); border-color: rgba(245,158,11,0.3); font-style: italic; }
.lookup-found-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); margin-bottom: 4px; }
.lookup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
