/* ============================================================
   BOSS Spraying Ltd — Demo Pack Styles
   ============================================================ */

/* ---- Print / PDF Stylesheet ---- */
@media print {
  /* Hide everything except the customer quote screen */
  .sidebar,
  .page-header,
  .notice.info:not(.print-keep),
  #cq-accept-btn,
  #cq-pay-section,
  .nav-card,
  button:not(.print-hidden) {
    display: none !important;
  }

  body { background: #fff; font-size: 13px; }
  .app-wrapper { display: block; }
  .main-content { margin-left: 0; padding: 0; }

  .screen { display: none !important; }
  #screen-customer-quote { display: block !important; }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  /* Print header */
  #screen-customer-quote::before {
    content: '';
    display: block;
  }

  .quote-brand { padding-bottom: 12px; margin-bottom: 16px; }
  .price-block { background: #1a3a5c !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .mockup-after.generated { background: #374151 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ral-color-7016 { background: #383e42 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .tc-section details { open: true; }
  .tc-section ul { display: block; }

  /* Footer */
  #screen-customer-quote::after {
    content: 'BOSS Spraying Ltd · All Hampshire · bossspraying.co.uk · This quote is valid for 30 days from issue date.';
    display: block;
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    font-size: 11px;
    color: #666;
    text-align: center;
  }

  @page {
    margin: 20mm 15mm;
    size: A4 portrait;
  }
}

:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --border: #e2e6ea;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --accent: #1a3a5c;
  --accent-light: #e8eef5;
  --accent-mid: #2d5f8a;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0ea5e9;
  --info-light: #e0f2fe;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---- Layout ---- */
.app-wrapper { display: flex; min-height: 100vh; }

/* ---- Sidebar Nav ---- */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-brand {
  padding: 20px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: #fff;
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 8px;
}

.sidebar-brand h2 { font-size: 13px; font-weight: 700; line-height: 1.3; }
.sidebar-brand p { font-size: 11px; opacity: 0.6; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 10px 0; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 12px 18px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  cursor: pointer;
  border-radius: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-left-color: #60a5fa;
}

.nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

/* ---- Main Content ---- */
.main-content {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  padding: 28px;
}

/* ---- Screens ---- */
.screen { display: none; }
.screen.active { display: block; }

/* ---- Page Header ---- */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.page-header p { color: var(--text-muted); margin-top: 4px; font-size: 14px; }
.page-header .badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

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

.card-title { font-size: 15px; font-weight: 600; }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-mid); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

/* ---- Status Badges ---- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-new { background: #ede9fe; color: #6d28d9; }
.status-photos { background: #fef3c7; color: #92400e; }
.status-review { background: #dbeafe; color: #1e40af; }
.status-approved { background: #dcfce7; color: #15803d; }
.status-sent { background: #e0f2fe; color: #0369a1; }
.status-deposit { background: #d1fae5; color: #065f46; }
.status-scheduled { background: #dcfce7; color: #166534; }
.status-completed { background: #f1f5f9; color: #475569; }
.status-lost { background: #fee2e2; color: #991b1b; }
.status-moreinfo { background: #fce7f3; color: #9d174d; }
.status-weather { background: #fef3c7; color: #92400e; }

/* ---- Summary Cards ---- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.summary-card .s-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.summary-card .s-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.summary-card.warning .s-value { color: var(--warning); }
.summary-card.success .s-value { color: var(--success); }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }

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

thead th {
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

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

tbody tr:hover { background: #f9fafb; }
tbody tr:last-child td { border-bottom: none; }

/* ---- Process Flow ---- */
.process-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 20px;
  background: var(--accent-light);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 12px;
  min-width: 90px;
}

.flow-step .step-icon {
  width: 42px; height: 42px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 6px;
}

.flow-step .step-label { font-size: 11px; font-weight: 600; color: var(--accent); }

.flow-arrow {
  font-size: 20px;
  color: var(--accent-mid);
  opacity: 0.5;
  padding: 0 4px;
}

/* ---- Messenger Mock ---- */
.messenger-wrap {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.messenger-header {
  background: #1a3a5c;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.messenger-avatar {
  width: 36px; height: 36px;
  background: #60a5fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.messenger-header .m-name { font-size: 13px; font-weight: 600; }
.messenger-header .m-sub { font-size: 11px; opacity: 0.7; }

.messenger-body { padding: 16px; min-height: 320px; display: flex; flex-direction: column; gap: 10px; }

.msg { max-width: 80%; padding: 10px 13px; border-radius: 16px; font-size: 13px; line-height: 1.4; }
.msg-in { background: #f0f2f5; color: var(--text); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-out { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg-label { font-size: 10px; color: var(--text-muted); margin-bottom: 2px; }
.msg-label.out { text-align: right; }

.quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 16px; }

.qr-btn {
  background: #fff;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.qr-btn:hover, .qr-btn.selected { background: var(--accent); color: #fff; }

/* ---- Form ---- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: 12px; font-weight: 600; color: var(--text-muted); }

input, select, textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-mid);
}

textarea { resize: vertical; min-height: 80px; }

.photo-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.photo-upload:hover { border-color: var(--accent-mid); background: var(--accent-light); }
.photo-upload .upload-icon { font-size: 32px; margin-bottom: 8px; }
.photo-upload p { font-size: 13px; }
.photo-upload small { font-size: 11px; opacity: 0.7; }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; }

/* ---- Quote Review ---- */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.photo-placeholder {
  background: #e5e7eb;
  border-radius: var(--radius-sm);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.estimate-table { width: 100%; }
.estimate-table tr td { padding: 6px 0; font-size: 13px; border: none; }
.estimate-table tr td:first-child { color: var(--text-muted); }
.estimate-table tr td:last-child { text-align: right; font-weight: 600; }
.estimate-table .divider td { border-top: 1px solid var(--border); padding-top: 10px; }
.estimate-table .total td { font-weight: 700; font-size: 15px; color: var(--accent); }

.internal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--warning-light);
  color: var(--warning);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 20px -20px -20px;
}

/* ---- Customer Quote Page ---- */
.quote-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.quote-logo {
  width: 48px; height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.quote-headline { font-size: 20px; font-weight: 700; }
.quote-sub { font-size: 13px; color: var(--text-muted); }

.price-block {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.price-block .price-main { font-size: 36px; font-weight: 800; }
.price-block .price-label { font-size: 12px; opacity: 0.7; margin-bottom: 4px; }
.price-block .price-row { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.2); }
.price-block .price-row span { font-size: 13px; opacity: 0.85; }
.price-block .price-row strong { font-size: 13px; }

.ai-mockup {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.mockup-before, .mockup-after {
  flex: 1;
  background: #e5e7eb;
  min-height: 180px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 20px;
  text-align: center;
}

.mockup-after { background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%); }
.mockup-after.generated { background: linear-gradient(135deg, #374151 0%, #1f2937 100%); color: #fff; }

.mockup-pair { display: flex; gap: 12px; }

.mockup-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  opacity: 0.7;
}

.color-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.1);
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* ---- Stripe Mock ---- */
.stripe-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  overflow: hidden;
}

.stripe-header {
  background: #635bff;
  color: #fff;
  padding: 16px 20px;
}
.stripe-header small { opacity: 0.7; font-size: 11px; }
.stripe-header .stripe-amount { font-size: 24px; font-weight: 700; margin-top: 4px; }

.stripe-body { padding: 20px; }

.card-input {
  background: #f8f9fb;
  border: 1.5px solid #e2e6ea;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  color: var(--text);
  width: 100%;
  font-family: 'Courier New', monospace;
  margin-bottom: 10px;
}

.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stripe-btn {
  width: 100%;
  background: #635bff;
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
.stripe-btn:hover { background: #5046e5; }

.stripe-confirm {
  text-align: center;
  padding: 30px 20px;
  display: none;
}
.stripe-confirm .tick { font-size: 48px; color: var(--success); }
.stripe-confirm h3 { font-size: 18px; font-weight: 700; margin: 10px 0 6px; }
.stripe-confirm p { color: var(--text-muted); font-size: 13px; }

/* ---- Calendar ---- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.cal-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px 4px;
  text-transform: uppercase;
}

.cal-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  min-height: 80px;
  font-size: 11px;
}

.cal-cell .cal-date { font-weight: 700; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell.today .cal-date { color: var(--accent); }
.cal-cell.rain { background: #eff6ff; border-color: #93c5fd; }
.cal-cell.confirmed { background: var(--success-light); border-color: #86efac; }
.cal-cell.provisional { background: var(--warning-light); border-color: #fcd34d; }
.cal-cell.buffer { background: #f8f9fb; }
.cal-cell.empty { background: transparent; border-color: transparent; }

.cal-event {
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.3;
}

.cal-event.external { background: var(--accent); color: #fff; }
.cal-event.internal { background: #d1fae5; color: #065f46; }
.cal-event.rain-warn { background: var(--warning-light); color: var(--warning); }
.cal-event.buffer { background: #f1f5f9; color: #64748b; }

/* ---- Weather Section ---- */
.weather-rule {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5f8a 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.weather-rule h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.weather-rule p { font-size: 13px; opacity: 0.85; line-height: 1.6; }

.job-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.job-type-card {
  border-radius: var(--radius);
  padding: 14px;
}

.job-type-card.external { background: var(--warning-light); border: 1px solid #fcd34d; }
.job-type-card.internal { background: var(--success-light); border: 1px solid #86efac; }
.job-type-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.job-type-card ul { padding-left: 14px; font-size: 12px; line-height: 1.8; }

.weather-scenario {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.scenario-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.scenario-step {
  background: var(--accent-light);
  color: var(--accent);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.scenario-step.rain { background: #dbeafe; color: #1e40af; }
.scenario-step.move { background: var(--warning-light); color: var(--warning); }
.scenario-step.fill { background: var(--success-light); color: var(--success); }
.scenario-step.approve { background: #ede9fe; color: #6d28d9; }
.scenario-step.notify { background: #dcfce7; color: var(--success); }

/* ---- Starter Pack Page ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light), var(--shadow);
}

.pricing-card .featured-badge {
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-tier { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.pricing-range { font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.pricing-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.pricing-features { list-style: none; padding: 0; }
.pricing-features li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12px; padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border: none; }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ---- Alert/Notice ---- */
.notice {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notice-icon { flex-shrink: 0; font-size: 15px; }
.notice.info { background: var(--info-light); color: #0c4a6e; border-left: 3px solid var(--info); }
.notice.success { background: var(--success-light); color: #14532d; border-left: 3px solid var(--success); }
.notice.warning { background: var(--warning-light); color: #78350f; border-left: 3px solid var(--warning); }
.notice.danger { background: var(--danger-light); color: #7f1d1d; border-left: 3px solid var(--danger); }

/* ---- T&C ---- */
.tc-section summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 0;
  user-select: none;
}
.tc-section ul { padding-left: 18px; font-size: 12px; line-height: 1.8; color: var(--text-muted); margin-top: 8px; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }

.tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border: 1.5px solid transparent;
  transition: all 0.15s;
}
.tab.active { background: var(--accent); color: #fff; }
.tab:hover:not(.active) { background: var(--bg); border-color: var(--border); }

/* ---- Success overlay ---- */
.success-overlay {
  display: none;
  text-align: center;
  padding: 30px;
  background: var(--success-light);
  border-radius: var(--radius);
  border: 1px solid #86efac;
}
.success-overlay .big-tick { font-size: 52px; }
.success-overlay h3 { font-size: 18px; font-weight: 700; margin: 10px 0 6px; color: var(--success); }
.success-overlay p { color: var(--text-muted); font-size: 13px; }

/* ---- Demo Home ---- */
.nav-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.nav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.nav-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.nav-card .nc-icon { font-size: 28px; margin-bottom: 8px; }
.nav-card h3 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.nav-card p { font-size: 11px; color: var(--text-muted); }

/* ---- Misc ---- */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.text-muted { color: var(--text-muted); }
.text-small { font-size: 12px; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.gap-8 { gap: 8px; }

.w-full { width: 100%; }

.ral-color-7016 { background: #383e42; }
.ral-color-9010 { background: #f4f4f0; border: 1px solid #ddd; }
.ral-color-7035 { background: #cdd1cd; }
.ral-color-6005 { background: #2f5030; }

@media (max-width: 900px) {
  .sidebar { width: 56px; min-width: 56px; }
  .sidebar-brand h2, .sidebar-brand p, .nav-item span, .nav-section-label { display: none; }
  .main-content { margin-left: 56px; padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .job-type-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE — 480px and below
   ============================================================ */
@media (max-width: 480px) {

  /* ---- Hide sidebar, show bottom nav bar ---- */
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 12px 12px 72px; /* bottom padding clears the nav bar */
  }

  /* Bottom navigation bar */
  .mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--accent);
    z-index: 200;
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mobile-nav::-webkit-scrollbar { display: none; }

  .mobile-nav-item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    flex: 1;
    gap: 3px;
    padding: 6px 4px;
    cursor: pointer;
    color: rgba(255,255,255,0.6);
    font-size: 9px;
    font-weight: 600;
    border: none;
    background: none;
    white-space: nowrap;
    transition: color 0.15s;
  }
  .mobile-nav-item .mni-icon { font-size: 18px; line-height: 1; }
  .mobile-nav-item.active { color: #fff; }
  .mobile-nav-item.active .mni-icon { filter: drop-shadow(0 0 4px rgba(96,165,250,0.7)); }

  /* Mobile top bar — fixed at top, full width */
  .mobile-topbar {
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    z-index: 150;
  }

  /* Push main content down below fixed topbar */
  .main-content {
    padding-top: 64px !important;
  }
  .mobile-topbar .mtb-logo {
    width: 28px; height: 28px;
    background: #fff;
    color: var(--accent);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
  }
  .mobile-topbar .mtb-title { font-size: 14px; font-weight: 700; flex: 1; }
  .mobile-topbar .mtb-screen { font-size: 11px; opacity: 0.7; }

  /* ---- Page header ---- */
  .page-header h1 { font-size: 17px; }
  .page-header p { font-size: 12px; }

  /* ---- Cards ---- */
  .card { padding: 14px; margin-bottom: 12px; border-radius: 8px; }
  .card-header { margin-bottom: 12px; padding-bottom: 10px; flex-wrap: wrap; gap: 8px; }
  .card-title { font-size: 13px; }

  /* ---- Summary grid — 2 columns on phone ---- */
  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .summary-card { padding: 12px; }
  .summary-card .s-value { font-size: 22px; }

  /* ---- Buttons — full width stacking ---- */
  .btn-group-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .btn-group-mobile .btn { width: 100%; justify-content: center; }
  .btn-lg { padding: 12px 20px; font-size: 14px; }

  /* ---- Forms ---- */
  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  input, select, textarea { font-size: 16px; } /* prevent iOS zoom on focus */

  /* ---- Tables — horizontal scroll ---- */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { font-size: 12px; }
  thead th { padding: 8px; font-size: 10px; }
  tbody td { padding: 10px 8px; }

  /* ---- Process flow — vertical on mobile ---- */
  .process-flow {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
  }
  .flow-step { flex-direction: row; gap: 10px; min-width: unset; text-align: left; padding: 4px 0; }
  .flow-step .step-icon { width: 32px; height: 32px; font-size: 14px; flex-shrink: 0; margin-bottom: 0; }
  .flow-arrow { transform: rotate(90deg); padding: 0; align-self: flex-start; margin-left: 5px; }

  /* ---- Messenger mock ---- */
  .messenger-wrap { border-radius: 0; border-left: none; border-right: none; max-width: 100%; }

  /* ---- Occupancy calendar — horizontal scroll, compact cells ---- */
  #occ-cal-body table {
    min-width: 560px !important;
    font-size: 10px;
  }
  #occ-cal-body td > div {
    min-height: 70px !important;
    padding: 4px !important;
    font-size: 8px;
  }
  /* Stack month summary cards vertically */
  #occ-month-summary {
    grid-template-columns: 1fr !important;
  }

  /* ---- Revenue Engine ---- */
  .rev-engine-grid { grid-template-columns: 1fr !important; }

  /* ---- Nav cards on demo home — 2 col ---- */
  .nav-cards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .nav-card { padding: 14px 10px; }
  .nav-card .nc-icon { font-size: 22px; margin-bottom: 6px; }
  .nav-card h3 { font-size: 11px; }
  .nav-card p { display: none; }

  /* ---- Quote review two-col grid ---- */
  .review-grid { grid-template-columns: 1fr; }

  /* ---- Flex rows that need to wrap ---- */
  .flex-between { flex-wrap: wrap; gap: 8px; }

  /* ---- Stripe screen ---- */
  .stripe-card-mock { padding: 14px; }

  /* ---- Landing page mobile (landing.html) ---- */
  .hero-split { flex-direction: column !important; }
  .stats-bar { flex-wrap: wrap; gap: 12px; }
  .services-grid { grid-template-columns: 1fr 1fr !important; }
  .steps-grid { grid-template-columns: 1fr !important; }
  .coverage-tags { gap: 6px; }
}

/* Desktop — hide mobile-only elements */
.mobile-nav  { display: none; }
.mobile-topbar { display: none; }
