/* ============================================================
   GLC Goods Lift Company – Dashboard
   Design system: Inter, dark chrome shell, dot-grid, GLC blue
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Content surfaces */
  --bg:             #edf1f7;
  --bg-elev:        #ffffff;
  --bg-elev-2:      #f5f7fb;
  --bg-elev-3:      #eaeff6;
  --border:         #dde4ef;
  --border-strong:  #c4cfde;
  --text:           #0d1b2b;
  --text-secondary: #34506a;
  --text-muted:     #637d96;
  --text-faint:     #96afc5;

  /* Brand */
  --brand:          #1d6fa4;
  --brand-dark:     #165e8c;
  --brand-soft:     rgba(29, 111, 164, 0.10);
  --brand-soft2:    rgba(29, 111, 164, 0.05);

  /* Dark chrome – header & sidebar */
  --chrome:         #0b1929;
  --chrome-elev:    #112338;
  --chrome-border:  rgba(255,255,255,0.07);
  --chrome-text:    #c8d8e6;
  --chrome-muted:   #6e90a8;
  --chrome-faint:   #2b4257;
  --chrome-active:  rgba(29,111,164,0.22);
  --chrome-brand:   #4aaddf;   /* lighter brand on dark bg */

  /* Status */
  --success:        #16a34a;
  --warning:        #d97706;
  --danger:         #dc2626;

  /* Geometry */
  --radius:         10px;
  --radius-sm:      7px;
  --radius-xs:      5px;

  /* Shadows */
  --shadow-xs:      0 1px 2px rgba(13,27,43,0.06);
  --shadow-sm:      0 1px 4px rgba(13,27,43,0.07), 0 1px 2px rgba(13,27,43,0.04);
  --shadow-md:      0 4px 12px -2px rgba(13,27,43,0.09), 0 2px 4px rgba(13,27,43,0.04);
  --shadow-lg:      0 12px 28px -4px rgba(13,27,43,0.11), 0 4px 8px rgba(13,27,43,0.05);
  --shadow-xl:      0 24px 48px -8px rgba(13,27,43,0.16);

  --header-h: 62px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
.muted  { color: var(--text-muted); font-size: 0.875rem; }

/* ============================================================
   Loading / Error
   ============================================================ */

.loading-screen, .error-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  background: var(--bg);
}
.error-screen h1 { color: var(--text); font-size: 1.4rem; }

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   App shell
   ============================================================ */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   Header
   ============================================================ */

.app-header {
  height: var(--header-h);
  background: var(--chrome);
  border-bottom: 1px solid var(--chrome-border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 1px 0 var(--chrome-border), 0 4px 20px rgba(0,0,0,0.25);
}

.header-left {
  display: flex;
  align-items: center;
}

.header-updated {
  font-size: 0.7rem;
  color: var(--chrome-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Logo */
.header-center { display: flex; justify-content: center; }

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
}

.logo-glc {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.06em;
  line-height: 1;
}

.logo-icon { flex-shrink: 0; }

.logo-sub {
  font-size: 0.62rem;
  color: var(--chrome-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-transform: lowercase;
}
.logo-sub strong { color: var(--chrome-brand); font-weight: 700; }

/* Header right controls */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.auto-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--chrome-border);
  background: var(--chrome-elev);
  color: var(--chrome-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.auto-refresh-btn.active {
  border-color: var(--brand);
  background: var(--chrome-active);
  color: var(--chrome-brand);
}
.auto-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.header-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--chrome-border);
  background: var(--chrome-elev);
  color: var(--chrome-text);
  cursor: pointer;
  transition: all 0.15s;
}
.header-refresh-btn:hover { border-color: var(--brand); color: var(--chrome-brand); background: var(--chrome-active); }
.header-refresh-btn.loading svg { animation: spin 0.75s linear infinite; }

/* ============================================================
   App body
   ============================================================ */

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--bg);
  /* Subtle dot-grid texture referencing the brand colour */
  background-image: radial-gradient(circle, rgba(29,111,164,0.13) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--chrome);
  border-right: none;
  box-shadow: 1px 0 0 var(--chrome-border), 4px 0 20px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.65rem 1rem;
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  overflow-y: auto;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
}

.nav-divider {
  height: 1px;
  background: var(--chrome-border);
  margin: 0.6rem 0.5rem;
}

.nav-section-label {
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--chrome-faint);
  padding: 0 0.65rem;
  margin-bottom: 0.3rem;
}

.nav-pipeline {
  position: relative;
  padding-left: 0.85rem;
  margin-left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.nav-pipeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 2px;
  background: var(--chrome-faint);
  border-radius: 1px;
  opacity: 0.5;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: none;
  color: var(--chrome-muted);
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-size: 0.835rem;
  font-weight: 500;
  width: 100%;
  transition: background 0.12s, color 0.12s;
  overflow: hidden;
}
.nav-item:hover {
  background: var(--chrome-elev);
  color: var(--chrome-text);
}
.nav-item.active {
  background: var(--chrome-active);
  color: var(--chrome-brand);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 2.5px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}
.nav-pipeline .nav-item.active::before {
  left: -0.85rem;
  width: 2px;
  background: var(--chrome-brand);
  top: 0; bottom: 0;
  border-radius: 1px;
}

.nav-icon {
  width: 15px; height: 15px;
  flex-shrink: 0;
  opacity: 0.55;
}
.nav-item.active .nav-icon { opacity: 1; }

.badge {
  margin-left: auto;
  background: var(--brand);
  color: white;
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  font-size: 0.64rem;
  font-weight: 700;
  min-width: 1.25rem;
  text-align: center;
  line-height: 1.5;
}
.badge:empty { display: none; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--chrome-border);
}

.countdown-label {
  font-size: 0.67rem;
  color: var(--chrome-faint);
}

.settings-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--chrome-muted);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 0.5rem;
  text-align: left;
}
.settings-btn:hover { background: var(--chrome-elev); color: var(--chrome-text); }

.settings-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  margin-bottom: 0.6rem;
  display: block;
}

/* ============================================================
   Top nav tabs
   ============================================================ */

.top-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
  background: var(--bg-elev);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.top-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 1.15rem;
  font-size: 0.835rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.top-nav-item:hover { color: var(--text); background: var(--bg-elev-2); }
.top-nav-item.active {
  color: var(--brand);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

/* ============================================================
   Main content
   ============================================================ */

.main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2rem 2rem;
  overflow-x: hidden;
}

.page-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.page-content { flex: 1; min-width: 0; }

/* ============================================================
   View header
   ============================================================ */

.view-header { margin-bottom: 1.5rem; }

.view-header h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ============================================================
   Stat cards
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, rgba(29,111,164,0.25) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ============================================================
   Panel + enquiry list
   ============================================================ */

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.panel-header h2 { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

.enquiries-list { display: flex; flex-direction: column; }

.enquiry-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
}
.enquiry-row:hover { background: var(--bg-elev-2); }
.enquiry-row:last-child { border-bottom: none; }

.enquiry-main { min-width: 0; }

.enquiry-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.enquiry-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.enquiry-meta span { white-space: nowrap; }

.enquiry-summary {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.enquiry-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.status-pill, .urgency-pill {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.status-pill.responded { background: rgba(22,163,74,0.1);   color: var(--success); }
.status-pill.awaiting  { background: rgba(217,119,6,0.1);   color: var(--warning); }
.status-pill.new       { background: var(--brand-soft);      color: var(--brand); }
.status-pill.other     { background: rgba(107,127,150,0.1);  color: var(--text-muted); }

.urgency-pill.high   { background: rgba(220,38,38,0.1);  color: var(--danger); }
.urgency-pill.medium { background: rgba(217,119,6,0.1);  color: var(--warning); }
.urgency-pill.low    { background: rgba(107,127,150,0.1);color: var(--text-muted); }

.enquiry-date { font-size: 0.7rem; color: var(--text-faint); }

.empty-state {
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================================
   Buttons
   ============================================================ */

.primary-btn {
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(29,111,164,0.35);
}
.primary-btn:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 3px 8px rgba(29,111,164,0.35); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ghost-btn {
  background: var(--bg-elev);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.ghost-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft2); }

.danger-btn {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid rgba(220,38,38,0.3);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s;
}
.danger-btn:hover { background: rgba(220,38,38,0.05); }

.success-btn {
  background: var(--success);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(22,163,74,0.35);
}
.success-btn:hover:not(:disabled) { background: #15803d; box-shadow: 0 3px 8px rgba(22,163,74,0.35); }

.footer-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(22,163,74,0.1);
  border: 1.5px solid rgba(22,163,74,0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* ============================================================
   Stats panel (right column)
   ============================================================ */

.stats-panel {
  width: 228px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: calc(var(--header-h) + 1.75rem);
}
.stats-panel.hidden { display: none; }

.stat-widget {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.stat-widget-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  margin-bottom: 0.7rem;
}

.bar-chart-wrap { width: 100%; overflow: hidden; }
.bar-chart-wrap svg { display: block; width: 100%; overflow: visible; }

.widget-big-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.widget-trend { font-size: 0.76rem; font-weight: 600; }
.widget-trend.up   { color: var(--success); }
.widget-trend.down { color: var(--danger); }
.widget-trend.flat { color: var(--text-muted); }

.widget-list { display: flex; flex-direction: column; gap: 0.45rem; }
.widget-list-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.77rem; gap: 0.4rem; }
.widget-list-label { color: var(--text-muted); flex-shrink: 0; }
.widget-list-val   { font-weight: 700; color: var(--text); flex-shrink: 0; }
.widget-list-bar-wrap { flex: 1; height: 4px; background: var(--bg-elev-3); border-radius: 2px; overflow: hidden; }
.widget-list-bar  { height: 100%; background: var(--brand); border-radius: 2px; opacity: 0.65; }

/* ============================================================
   Map panel
   ============================================================ */

.map-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.map-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.map-panel-header h2 { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.map-status { font-size: 0.75rem; color: var(--text-muted); }

#awaiting-map { height: 320px; width: 100%; z-index: 0; }

.leaflet-popup-content-wrapper { border-radius: var(--radius-sm) !important; box-shadow: var(--shadow-lg) !important; }
.leaflet-popup-content { font-size: 0.82rem; line-height: 1.5; }
.map-popup-link { display: inline-block; margin-top: 0.35rem; color: var(--brand); text-decoration: none; font-size: 0.78rem; font-weight: 600; }
.map-popup-link:hover { text-decoration: underline; }

.glc-map-marker {
  width: 20px; height: 20px;
  background: var(--brand);
  border: 2.5px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ============================================================
   Calendar
   ============================================================ */

.calendar-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.cal-month-label { font-weight: 700; font-size: 0.95rem; min-width: 9rem; text-align: center; color: var(--text); }

.calendar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cal-weekdays { display: grid; grid-template-columns: repeat(7,1fr); background: var(--bg-elev-2); border-bottom: 1px solid var(--border); }
.cal-weekday { padding: 0.6rem; font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-align: center; text-transform: uppercase; letter-spacing: 0.06em; }

.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); grid-auto-rows: minmax(110px,1fr); }

.cal-day {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  min-height: 110px;
  background: var(--bg-elev);
  transition: background 0.1s;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.outside { background: var(--bg); opacity: 0.55; }
.cal-day.today .cal-day-num {
  background: var(--brand); color: white; border-radius: 999px;
  width: 1.5rem; height: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
}

.cal-day-num { font-size: 0.77rem; font-weight: 600; color: var(--text-muted); }
.cal-day.today .cal-day-num { color: white; }

.cal-event {
  background: var(--brand); color: white;
  font-size: 0.68rem; padding: 0.15rem 0.4rem;
  border-radius: 4px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer; border: none;
  text-align: left; width: 100%; font-weight: 500;
  transition: filter 0.1s;
}
.cal-event:hover { filter: brightness(1.1); }
.cal-event.continuation { opacity: 0.55; }
.cal-event.done { background: var(--success); }
.cal-more { font-size: 0.67rem; color: var(--text-muted); cursor: pointer; margin-top: 0.1rem; }

/* ============================================================
   Modal
   ============================================================ */

.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,26,42,0.45);
  backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  width: 100%; max-width: 460px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
/* Wide detail modal scrolls as a whole so the map container is never clipped */
.modal-panel-wide {
  max-width: 740px;
  overflow-y: auto;
}
.modal-panel-wide .modal-body {
  flex: none;
  overflow-y: visible;
}
.modal-body-top    { padding-bottom: 0.75rem; }
.modal-body-bottom { padding-top: 0.75rem; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.modal-header h2 { font-size: 1rem; font-weight: 700; color: var(--text); }

.modal-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 1.4rem; cursor: pointer; width: 1.8rem; height: 1.8rem;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.modal-close:hover { background: var(--bg-elev-3); color: var(--text); }

.modal-body { padding: 1.35rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 0.9rem 1.35rem; border-top: 1px solid var(--border);
  display: flex; gap: 0.5rem; justify-content: flex-end;
  background: var(--bg-elev-2);
}

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field span { font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; }

.field input, .field textarea, .field select {
  background: var(--bg-elev-2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem; font-size: 0.9rem; outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29,111,164,0.1);
}
.field-hint { font-size: 0.75rem; color: var(--text-muted); }

.detail-section { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.detail-section:last-child { border-bottom: none; padding-bottom: 0; }
.detail-section h3 { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.5rem; }

.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.75rem; }
.detail-grid > div { font-size: 0.88rem; color: var(--text); }
.detail-grid > div span { display: block; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.15rem; }

.detail-text {
  font-size: 0.875rem; white-space: pre-wrap;
  background: var(--bg-elev-2); padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  max-height: 200px; overflow-y: auto; color: var(--text);
}

/* ============================================================
   Completed Jobs – accordion cards
   ============================================================ */

.job-cards { display: flex; flex-direction: column; gap: 0.5rem; }

.job-card-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: rgba(22,163,74,0.1); color: var(--success);
  border-radius: 999px; padding: 0.18rem 0.65rem;
  font-size: 0.68rem; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}

/* Accordion wrapper */
.jca {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.jca:hover, .jca.open { box-shadow: var(--shadow-md); }

/* Summary bar */
.jca-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.8rem 1.1rem;
  cursor: pointer; user-select: none;
  transition: background 0.1s;
}
.jca-header:hover { background: var(--bg-elev-2); }
.jca.open .jca-header { background: var(--bg-elev-2); border-bottom: 1px solid var(--border); }

.jca-summary { display: flex; align-items: center; gap: 0.75rem; min-width: 0; flex: 1; }
.jca-name { font-size: 0.9rem; font-weight: 700; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.jca-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; }
.jca-pill {
  font-size: 0.73rem; color: var(--text-muted);
  background: var(--bg-elev-3); border: 1px solid var(--border);
  border-radius: 4px; padding: 0.1rem 0.4rem; white-space: nowrap;
}
.jca-right { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; }
.jca-chevron { color: var(--text-muted); transition: transform 0.2s ease; flex-shrink: 0; }
.jca.open .jca-chevron { transform: rotate(90deg); }

/* Expanded content */
.jca-body { display: none; }
.jca.open .jca-body { display: block; }

/* Map */
.jca-map-wrap { border-bottom: 1px solid var(--border); }
.jca-map-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1.1rem; background: var(--bg-elev-2);
}
.jca-map-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted);
}
.jca-map { height: 220px; width: 100%; display: block; isolation: isolate; }

/* Info grid */
.jca-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem 1.5rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border);
}
.jca-info-item { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.85rem; color: var(--text); }
.jca-info-label { font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); }
.jca-info-link { color: var(--brand); text-decoration: none; font-weight: 500; }
.jca-info-link:hover { text-decoration: underline; }

/* Text sections */
.jca-section { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border); }
.jca-section-label { font-size: 0.63rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); margin-bottom: 0.4rem; }
.jca-text { font-size: 0.84rem; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.55; }
.jca-text-scroll {
  max-height: 140px; overflow-y: auto;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.6rem 0.75rem;
}

/* Notes + photos */
.job-card-body { display: grid; grid-template-columns: 1fr 1fr; }
.job-card-notes-area { padding: 1rem 1.1rem; border-right: 1px solid var(--border); }
.job-card-photos-area { padding: 1rem 1.1rem; }
.job-card-notes-area label,
.job-card-photos-area label {
  display: block; font-size: 0.67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 0.45rem;
}
.job-card-notes-area textarea {
  width: 100%; min-height: 80px;
  background: var(--bg-elev-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.82rem; padding: 0.5rem 0.65rem; resize: vertical;
  outline: none; transition: border-color 0.12s; font-family: inherit;
}
.job-card-notes-area textarea:focus { border-color: var(--brand); }
.photo-upload-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 1.25rem 1rem; text-align: center; color: var(--text-muted);
  font-size: 0.78rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  background: var(--bg-elev-2);
}
.photo-upload-zone:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.upload-icon { font-size: 1.4rem; display: block; margin-bottom: 0.3rem; }
.photo-thumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.photo-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 5px; border: 1px solid var(--border); box-shadow: var(--shadow-xs); }

/* ============================================================
   Placeholder cards
   ============================================================ */

.placeholder-card {
  padding: 3.5rem 2rem; text-align: center; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.placeholder-icon { margin-bottom: 0.25rem; opacity: 0.35; color: var(--brand); }

/* ============================================================
   Toast
   ============================================================ */

.toast {
  position: fixed; bottom: 1.75rem; left: 50%; transform: translateX(-50%);
  background: var(--text); color: white;
  padding: 0.7rem 1.35rem; border-radius: 999px;
  font-size: 0.83rem; font-weight: 500; z-index: 200;
  box-shadow: var(--shadow-lg); animation: toastIn 0.2s ease-out;
  white-space: nowrap;
}
.toast.error   { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============================================================
   Duration toggle (Half Day / Full Day)
   ============================================================ */

.duration-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.duration-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 0.9rem 0.75rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, color 0.15s;
  color: var(--text-muted);
  text-align: center;
}
.duration-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
.duration-btn.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}
.duration-icon  { font-size: 1.25rem; line-height: 1; }
.duration-label { font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
.duration-sub   { font-size: 0.68rem; color: var(--text-faint); }
.duration-btn.active .duration-sub { color: var(--brand); opacity: 0.7; }

/* ============================================================
   Calendar – clash highlighting
   ============================================================ */

.cal-day.has-clash {
  background: rgba(217,119,6,0.03);
  outline: 2px solid rgba(217,119,6,0.28);
  outline-offset: -2px;
  border-radius: 0;
}

.clash-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--warning);
  background: rgba(217,119,6,0.12);
  border-radius: 3px;
  padding: 0.06rem 0.32rem;
  margin-bottom: 0.1rem;
  width: fit-content;
}

/* ============================================================
   Detail modal – static map container & directions
   ============================================================ */

.detail-map-outer {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}

.detail-map-inner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.35rem;
  gap: 0.75rem;
}

.detail-map-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.detail-mini-map {
  height: 260px;
  width: 100%;
  display: block;
  /* isolation keeps Leaflet z-indices from leaking outside the modal */
  isolation: isolate;
}

.directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1.5px solid rgba(29,111,164,0.22);
  border-radius: var(--radius-xs);
  padding: 0.4rem 0.85rem;
  text-decoration: none;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s;
  white-space: nowrap;
  flex-shrink: 0;
}
.directions-btn:hover {
  background: var(--brand);
  color: white;
  box-shadow: 0 2px 8px rgba(29,111,164,0.35);
}
.directions-btn svg { flex-shrink: 0; }

/* map loading overlay */
.detail-map-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--text-muted);
  background: var(--bg-elev-2);
}

/* ============================================================
   Login / Register screen
   ============================================================ */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--chrome);
  background-image: radial-gradient(circle, rgba(29,111,164,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: 1.5rem;
}

.login-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.login-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.login-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.4rem;
  letter-spacing: -0.02em;
}

.login-error {
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.25);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.84rem;
  margin-bottom: 1rem;
}

.login-submit {
  width: 100%;
  padding: 0.65rem;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.login-register-link {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
}
.login-register-link a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.login-register-link a:hover { text-decoration: underline; }

/* Header logo — brand name driven by config */
.logo-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--chrome-text);
  letter-spacing: -0.02em;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Header logout button */
.header-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--chrome-border);
  background: var(--chrome-elev);
  color: var(--chrome-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.header-logout-btn:hover { border-color: var(--danger); color: #f87171; background: rgba(220,38,38,0.08); }

/* Billing banner */
.billing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.billing-banner-warning {
  background: rgba(217,119,6,0.1);
  border: 1px solid rgba(217,119,6,0.3);
  color: var(--warning);
}
.billing-banner-danger {
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.25);
  color: var(--danger);
}
.billing-banner-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: inherit;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-xs);
  padding: 0.3rem 0.75rem;
  text-decoration: none;
  transition: background 0.12s;
}
.billing-banner-btn:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   Email setup wizard
   ============================================================ */

.setup-stepper {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.75rem 0;
}
.setup-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elev-3);
  border: 2px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.setup-step-dot.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.setup-step-dot.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.setup-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.2s;
}
.setup-step-line.done { background: var(--success); }

.setup-provider-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: var(--brand-soft);
  border: 1px solid rgba(29,111,164,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  margin-top: 0.5rem;
}
.setup-provider-badge svg { flex-shrink: 0; }

.setup-guide {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.setup-guide-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.setup-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.setup-guide-step {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.setup-guide-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.setup-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border: 1.5px solid rgba(29,111,164,0.3);
  border-radius: var(--radius-xs);
  background: var(--brand-soft2);
  transition: background 0.12s;
}
.setup-guide-link:hover { background: var(--brand-soft); }

.setup-security-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.6rem;
}
.setup-security-note svg { flex-shrink: 0; margin-top: 1px; color: var(--success); }

.setup-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(22,163,74,0.1);
  border: 2px solid rgba(22,163,74,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--success);
}

/* ============================================================
   Auth pages — theme picker, password strength, footer, verify banner
   ============================================================ */

/* Two-column register layout */
.register-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--chrome);
  background-image: radial-gradient(circle, rgba(29,111,164,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}
.register-side {
  width: 340px;
  flex-shrink: 0;
  background: rgba(11,25,41,0.7);
  border-right: 1px solid var(--chrome-border);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.register-side-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}
.register-side-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}
.register-side-tagline {
  font-size: 0.82rem;
  color: var(--chrome-muted);
  margin-bottom: 2.5rem;
  line-height: 1.5;
}
.register-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.register-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.register-feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(29,111,164,0.2);
  border: 1px solid rgba(29,111,164,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.register-feature-icon svg { color: var(--chrome-brand); }
.register-feature-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--chrome-text);
  margin-bottom: 0.1rem;
}
.register-feature-text span {
  font-size: 0.75rem;
  color: var(--chrome-muted);
  line-height: 1.4;
}
.register-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.register-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-xl);
}

/* Theme picker */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.35rem;
}
.theme-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem 0.5rem;
  cursor: pointer;
  background: var(--bg-elev-2);
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  user-select: none;
}
.theme-card:hover { border-color: var(--border-strong); }
.theme-card.selected { border-color: var(--brand); background: var(--brand-soft); }
.theme-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: 0.4rem;
}
.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.theme-bar {
  width: 20px;
  height: 8px;
  border-radius: 3px;
}
.theme-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.theme-card.selected .theme-name { color: var(--brand); }

/* Password strength */
.pw-strength-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  margin-top: 0.4rem;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.25s, background 0.25s;
}
.pw-strength-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Terms checkbox */
.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.terms-row input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}
.terms-row a { color: var(--brand); text-decoration: none; font-weight: 600; }
.terms-row a:hover { text-decoration: underline; }

/* Auth footer */
.auth-footer {
  text-align: center;
  font-size: 0.73rem;
  color: var(--chrome-muted);
  padding: 1.5rem 1rem 1rem;
}
.auth-footer a { color: var(--chrome-muted); text-decoration: none; }
.auth-footer a:hover { color: var(--chrome-text); text-decoration: underline; }
.auth-footer-sep { margin: 0 0.4rem; opacity: 0.4; }

/* Verify email banner (shown inside dashboard) */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1rem;
  background: rgba(217,119,6,0.1);
  border: 1px solid rgba(217,119,6,0.3);
  color: var(--warning);
}
.verify-banner button {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: inherit;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.65rem;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s;
}
.verify-banner button:hover { background: rgba(255,255,255,0.1); }

/* Forgot password link */
.forgot-link {
  font-size: 0.8rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  text-align: right;
  display: block;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}
.forgot-link:hover { text-decoration: underline; }

/* Success message */
.auth-success {
  background: rgba(22,163,74,0.08);
  border: 1px solid rgba(22,163,74,0.25);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.84rem;
  margin-bottom: 1rem;
}

@media (max-width: 860px) {
  .register-shell { flex-direction: column; }
  .register-side { width: 100%; padding: 2rem 1.5rem; border-right: none; border-bottom: 1px solid var(--chrome-border); }
  .register-features { flex-direction: row; flex-wrap: wrap; }
  .register-feature { width: calc(50% - 0.375rem); }
}
@media (max-width: 520px) {
  .theme-picker { grid-template-columns: repeat(2, 1fr); }
  .register-feature { width: 100%; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .stats-panel { display: none; }
}

@media (max-width: 720px) {
  .app-header { grid-template-columns: auto 1fr auto; padding: 0 1rem; }
  .header-left .header-updated { display: none; }
  .sidebar { display: none; }
  .main { padding: 1rem; }
  .cal-grid { grid-auto-rows: minmax(80px,1fr); }
  #awaiting-map { height: 220px; }
  .job-card-body { grid-template-columns: 1fr; }
  .job-card-notes-area { border-right: none; border-bottom: 1px solid var(--border); }
}
