﻿/* ==========================================================================
   Jobyn design system  (spec Section 3A)
   One shared stylesheet. It customises Bootstrap 5.3 through CSS variables and adds
   the components every page uses. Sections:
     1. Fonts            6. Cards and stat cards       11. Public site
     2. Tokens           7. Status badges              12. Tradie app shell
     3. Bootstrap bridge 8. Tables (stack on phones)   13. Admin theme
     4. Base             9. Empty / error / loading    14. Dashboard parts
     5. Buttons + forms 10. Toasts, modal, utilities
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokens --------------------------------------------------------------- */
:root {
  --jb-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Brand */
  --jb-navy-950: #060f21;
  --jb-navy-900: #0b1b3a;
  --jb-navy-800: #12295a;
  --jb-navy-700: #1b3a7a;
  --jb-primary: #1d4ed8;
  --jb-primary-hover: #1e40af;
  --jb-primary-rgb: 29, 78, 216;
  --jb-primary-50: #eff6ff;
  --jb-primary-100: #dbeafe;
  --jb-primary-200: #bfdbfe;
  --jb-accent: #f97316;
  --jb-accent-hover: #fb923c;
  --jb-accent-rgb: 249, 115, 22;
  --jb-accent-50: #fff7ed;
  --jb-on-accent: #0b1b3a;

  /* Neutrals */
  --jb-gray-50: #f8fafc;
  --jb-gray-100: #f1f5f9;
  --jb-gray-200: #e2e8f0;
  --jb-gray-300: #cbd5e1;
  --jb-gray-400: #94a3b8;
  --jb-gray-500: #64748b;
  --jb-gray-600: #475569;
  --jb-gray-700: #334155;
  --jb-gray-800: #1e293b;
  --jb-gray-900: #0f172a;

  --jb-text: #0f172a;
  --jb-text-muted: #475569;
  --jb-text-subtle: #5b6b83;
  --jb-bg: #f5f7fb;
  --jb-surface: #ffffff;
  --jb-border: #e2e8f0;
  --jb-border-strong: #cbd5e1;

  /* Status colours: green = paid, amber = due, red = overdue, blue = sent */
  --jb-paid-fg: #15803d;    --jb-paid-bg: #dcfce7;
  --jb-due-fg: #b45309;     --jb-due-bg: #fef3c7;
  --jb-overdue-fg: #b91c1c; --jb-overdue-bg: #fee2e2;
  --jb-sent-fg: #1d4ed8;    --jb-sent-bg: #dbeafe;
  --jb-draft-fg: #475569;   --jb-draft-bg: #e2e8f0;

  /* Shape + depth */
  --jb-radius-sm: 8px;
  --jb-radius: 12px;
  --jb-radius-lg: 16px;
  --jb-radius-xl: 24px;
  --jb-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --jb-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --jb-shadow: 0 4px 12px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.04);
  --jb-shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.22), 0 8px 16px -8px rgba(15, 23, 42, 0.12);

  /* Spacing scale */
  --jb-space-1: 0.25rem;
  --jb-space-2: 0.5rem;
  --jb-space-3: 0.75rem;
  --jb-space-4: 1rem;
  --jb-space-5: 1.5rem;
  --jb-space-6: 2rem;
  --jb-space-7: 3rem;
  --jb-space-8: 4.5rem;

  /* App shell */
  --jb-sidebar-w: 264px;
  --jb-sidebar-w-collapsed: 76px;
  --jb-topbar-h: 64px;
  --jb-bottomnav-h: 68px;
  --jb-sidebar-bg: var(--jb-navy-900);
  --jb-sidebar-text: #c7d2e8;
  --jb-sidebar-active-bg: rgba(255, 255, 255, 0.1);
  --jb-sidebar-accent: var(--jb-accent);
}

/* 3. Bootstrap bridge -------------------------------------------------------
   Bootstrap 5.3 reads these variables, so the whole framework picks up our brand. */
:root {
  --bs-font-sans-serif: var(--jb-font);
  --bs-body-font-family: var(--jb-font);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--jb-text);
  --bs-body-color-rgb: 15, 23, 42;
  --bs-body-bg: var(--jb-bg);
  --bs-secondary-color: var(--jb-text-muted);
  --bs-secondary-color-rgb: 71, 85, 105;
  --bs-border-color: var(--jb-border);
  --bs-border-radius: var(--jb-radius-sm);
  --bs-border-radius-lg: var(--jb-radius);
  --bs-primary: var(--jb-primary);
  --bs-primary-rgb: var(--jb-primary-rgb);
  --bs-link-color: var(--jb-primary);
  --bs-link-color-rgb: var(--jb-primary-rgb);
  --bs-link-hover-color: var(--jb-primary-hover);
  --bs-focus-ring-color: rgba(var(--jb-primary-rgb), 0.35);
  --bs-success: #15803d;
  --bs-success-rgb: 21, 128, 61;
  --bs-warning: #b45309;
  --bs-warning-rgb: 180, 83, 9;
  --bs-danger: #b91c1c;
  --bs-danger-rgb: 185, 28, 28;
  --bs-info: #1d4ed8;
  --bs-info-rgb: 29, 78, 216;
}

/* 4. Base ----------------------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--jb-font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--jb-text);
  background: var(--jb-bg);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { color: var(--jb-text); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h1, .h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); }
h2, .h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.875rem); }
h3, .h3 { font-size: 1.25rem; }
h4, .h4 { font-size: 1.0625rem; }
p { color: var(--jb-text-muted); }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
::selection { background: rgba(var(--jb-primary-rgb), 0.18); }

:focus-visible {
  outline: 3px solid rgba(var(--jb-primary-rgb), 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--jb-navy-900); color: #fff; padding: 10px 16px; border-radius: var(--jb-radius-sm);
  font-weight: 600; text-decoration: none; transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

.text-subtle { color: var(--jb-text-subtle) !important; }
.text-muted-jb { color: var(--jb-text-muted) !important; }
.fw-600 { font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 5. Buttons + forms ------------------------------------------------------ */
.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: var(--jb-radius-sm);
  --bs-btn-padding-x: 1.1rem;
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-font-size: 0.9375rem;
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  letter-spacing: -0.005em;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { --bs-btn-padding-y: 0.35rem; --bs-btn-padding-x: 0.8rem; --bs-btn-font-size: 0.875rem; min-height: 36px; }
.btn-lg { --bs-btn-padding-y: 0.8rem; --bs-btn-padding-x: 1.6rem; --bs-btn-font-size: 1.0625rem; min-height: 52px; --bs-btn-border-radius: var(--jb-radius); }

.btn-primary {
  --bs-btn-bg: var(--jb-primary); --bs-btn-border-color: var(--jb-primary); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--jb-primary-hover); --bs-btn-hover-border-color: var(--jb-primary-hover); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--jb-navy-800); --bs-btn-active-border-color: var(--jb-navy-800); --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--jb-primary); --bs-btn-disabled-border-color: var(--jb-primary);
  --bs-btn-focus-shadow-rgb: var(--jb-primary-rgb);
  box-shadow: 0 1px 2px rgba(var(--jb-primary-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-accent {
  --bs-btn-bg: var(--jb-accent); --bs-btn-border-color: var(--jb-accent); --bs-btn-color: var(--jb-on-accent);
  --bs-btn-hover-bg: var(--jb-accent-hover); --bs-btn-hover-border-color: var(--jb-accent-hover); --bs-btn-hover-color: var(--jb-on-accent);
  --bs-btn-active-bg: #ea6a0a; --bs-btn-active-border-color: #ea6a0a; --bs-btn-active-color: var(--jb-on-accent);
  --bs-btn-disabled-bg: var(--jb-accent); --bs-btn-disabled-border-color: var(--jb-accent); --bs-btn-disabled-color: var(--jb-on-accent);
  --bs-btn-focus-shadow-rgb: var(--jb-accent-rgb);
  box-shadow: 0 4px 14px -2px rgba(var(--jb-accent-rgb), 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-outline-primary {
  --bs-btn-color: var(--jb-primary); --bs-btn-border-color: var(--jb-primary-200);
  --bs-btn-hover-bg: var(--jb-primary-50); --bs-btn-hover-color: var(--jb-primary-hover); --bs-btn-hover-border-color: var(--jb-primary);
  --bs-btn-active-bg: var(--jb-primary-100); --bs-btn-active-color: var(--jb-primary-hover); --bs-btn-active-border-color: var(--jb-primary);
}
.btn-light-outline {
  --bs-btn-bg: #fff; --bs-btn-color: var(--jb-text); --bs-btn-border-color: var(--jb-border-strong);
  --bs-btn-hover-bg: var(--jb-gray-50); --bs-btn-hover-color: var(--jb-text); --bs-btn-hover-border-color: var(--jb-gray-400);
  --bs-btn-active-bg: var(--jb-gray-100); --bs-btn-active-color: var(--jb-text);
  box-shadow: var(--jb-shadow-xs);
}
.btn-on-dark {
  --bs-btn-bg: rgba(255, 255, 255, 0.08); --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, 0.28);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.16); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: rgba(255, 255, 255, 0.5);
  --bs-btn-active-bg: rgba(255, 255, 255, 0.22); --bs-btn-active-color: #fff;
}
.btn-danger { --bs-btn-bg: #b91c1c; --bs-btn-border-color: #b91c1c; --bs-btn-hover-bg: #991b1b; --bs-btn-hover-border-color: #991b1b; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }

/* Loading state: add .is-loading (site.js does this on form submit for [data-loading]) */
.btn.is-loading { pointer-events: none; position: relative; color: transparent !important; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  color: var(--jb-text); animation: jb-spin 0.7s linear infinite;
}
.btn-primary.is-loading::after, .btn-danger.is-loading::after { color: #fff; }
.btn-accent.is-loading::after { color: var(--jb-on-accent); }
@keyframes jb-spin { to { transform: rotate(360deg); } }

.form-label { font-weight: 600; font-size: 0.875rem; color: var(--jb-gray-800); margin-bottom: 0.4rem; }
.form-label .optional { font-weight: 400; color: var(--jb-text-subtle); margin-left: 0.25rem; }
.form-control, .form-select {
  min-height: 46px; border-radius: var(--jb-radius-sm); border-color: var(--jb-border-strong);
  font-size: 1rem; padding: 0.6rem 0.9rem; color: var(--jb-text); background-color: #fff;
  box-shadow: var(--jb-shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control::placeholder { color: var(--jb-gray-500); }
.form-control:focus, .form-select:focus { border-color: var(--jb-primary); box-shadow: 0 0 0 4px rgba(var(--jb-primary-rgb), 0.16); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--jb-overdue-fg); }
.form-text { color: var(--jb-text-subtle); font-size: 0.8125rem; }
.invalid-feedback { font-size: 0.8125rem; color: var(--jb-overdue-fg); font-weight: 500; }
.form-check-input { width: 1.2em; height: 1.2em; border-color: var(--jb-border-strong); }
.form-check-input:checked { background-color: var(--jb-primary); border-color: var(--jb-primary); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }
.input-icon { position: relative; }
.input-icon > .bi { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--jb-gray-500); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.6rem; }

/* 6. Cards ---------------------------------------------------------------- */
.jb-card {
  background: var(--jb-surface); border: 1px solid var(--jb-border); border-radius: var(--jb-radius-lg);
  box-shadow: var(--jb-shadow-sm);
}
.jb-card-body { padding: 1.25rem; }
@media (min-width: 768px) { .jb-card-body { padding: 1.5rem; } }
.jb-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--jb-border);
}
@media (min-width: 768px) { .jb-card-header { padding: 1.1rem 1.5rem; } }
.jb-card-title { font-size: 1rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.jb-card-link { transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease; text-decoration: none; color: inherit; display: block; }
.jb-card-link:hover { box-shadow: var(--jb-shadow); transform: translateY(-2px); border-color: var(--jb-border-strong); color: inherit; }

.jb-stat { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1.1rem 1.25rem; }
.jb-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.jb-stat-label { font-size: 0.8125rem; font-weight: 600; color: var(--jb-text-muted); text-transform: none; }
.jb-stat-icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; flex: none;
  background: var(--jb-primary-50); color: var(--jb-primary);
}
.jb-stat-icon.is-green { background: var(--jb-paid-bg); color: var(--jb-paid-fg); }
.jb-stat-icon.is-red { background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); }
.jb-stat-icon.is-amber { background: var(--jb-due-bg); color: var(--jb-due-fg); }
.jb-stat-icon.is-accent { background: var(--jb-accent-50); color: #c2410c; }
.jb-stat-value { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.jb-stat-hint { font-size: 0.8125rem; color: var(--jb-text-subtle); }
.jb-stat-hint .up { color: var(--jb-paid-fg); font-weight: 600; }

/* 7. Status badges --------------------------------------------------------- */
.jb-badge {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.65rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.4; white-space: nowrap; letter-spacing: 0.005em;
  background: var(--jb-draft-bg); color: var(--jb-draft-fg);
}
.jb-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.jb-badge.no-dot::before { display: none; }
.jb-badge.is-paid, .jb-badge.is-accepted, .jb-badge.is-active, .jb-badge.is-completed { background: var(--jb-paid-bg); color: var(--jb-paid-fg); }
.jb-badge.is-due, .jb-badge.is-trialing, .jb-badge.is-inprogress, .jb-badge.is-pending { background: var(--jb-due-bg); color: var(--jb-due-fg); }
.jb-badge.is-overdue, .jb-badge.is-declined, .jb-badge.is-pastdue, .jb-badge.is-cancelled { background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); }
.jb-badge.is-sent, .jb-badge.is-scheduled { background: var(--jb-sent-bg); color: var(--jb-sent-fg); }
.jb-badge.is-draft { background: var(--jb-draft-bg); color: var(--jb-draft-fg); }

/* 8. Tables ---------------------------------------------------------------- */
.jb-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; }
.jb-table th {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--jb-text-subtle);
  padding: 0.75rem 1.25rem; background: var(--jb-gray-50); border-bottom: 1px solid var(--jb-border); white-space: nowrap;
}
.jb-table td { padding: 0.95rem 1.25rem; border-bottom: 1px solid var(--jb-border); vertical-align: middle; color: var(--jb-text); }
.jb-table tbody tr:last-child td { border-bottom: 0; }
.jb-table tbody tr { transition: background-color 0.12s ease; }
.jb-table tbody tr:hover { background: var(--jb-gray-50); }
.jb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.jb-table .cell-strong { font-weight: 600; }
.jb-table .cell-sub { display: block; font-size: 0.8125rem; color: var(--jb-text-subtle); font-weight: 400; }
.jb-table-wrap { position: relative; border-radius: var(--jb-radius-lg); overflow-x: auto; overflow-y: hidden; max-width: 100%; }
@media (min-width: 768px) and (max-width: 1199.98px) { .jb-table .col-wide-only { display: none; } }
/* The compact table sits in a half-width card, so it drops the Due column until there is a lot of room. */
@media (min-width: 768px) and (max-width: 1599.98px) { .jb-table-compact .col-xxl-only { display: none; } }
.jb-table td.cell-title { white-space: nowrap; }
@media (max-width: 1199.98px) {
  .jb-table th { padding-left: 0.85rem; padding-right: 0.85rem; }
  .jb-table td { padding-left: 0.85rem; padding-right: 0.85rem; }
}

/* Text links that sit alone (not inside a sentence) get a comfortable tap height. */
.link-tap { display: inline-flex; align-items: center; min-height: 32px; }

/* On phones a table turns into a stack of cards. Every <td> needs a data-label. */
@media (max-width: 767.98px) {
  .jb-table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .jb-table-stack, .jb-table-stack tbody, .jb-table-stack tr, .jb-table-stack td { display: block; width: 100%; }
  .jb-table-stack tbody { display: grid; gap: 0.75rem; padding: 0.75rem; }
  .jb-table-stack tr { border: 1px solid var(--jb-border); border-radius: var(--jb-radius); padding: 0.35rem 0; background: #fff; box-shadow: var(--jb-shadow-xs); }
  .jb-table-stack tbody tr:hover { background: #fff; }
  .jb-table-stack td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.55rem 1rem; border: 0 !important; text-align: right; }
  .jb-table-stack td::before { content: attr(data-label); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--jb-text-subtle); text-align: left; flex: none; }
  .jb-table-stack td.cell-title { font-size: 1rem; padding-top: 0.75rem; }
  .jb-table-stack td.cell-title::before { display: none; }
  .jb-table-stack td.cell-actions { justify-content: flex-end; padding-bottom: 0.75rem; }
  .jb-table-stack td.cell-actions::before { display: none; }
  .jb-table-stack .cell-sub { display: none; }
}

/* 9. Empty, error and loading states -------------------------------------- */
.jb-empty { text-align: center; padding: 3rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.jb-empty-icon {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; margin-bottom: 0.75rem;
  background: var(--jb-primary-50); color: var(--jb-primary); box-shadow: 0 0 0 10px rgba(var(--jb-primary-rgb), 0.06);
}
.jb-empty.is-error .jb-empty-icon { background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); box-shadow: 0 0 0 10px rgba(185, 28, 28, 0.06); }
.jb-empty h3 { margin: 0; font-size: 1.15rem; }
.jb-empty p { max-width: 42ch; margin: 0 0 0.75rem; }

.jb-skeleton { position: relative; overflow: hidden; background: var(--jb-gray-200); border-radius: 8px; min-height: 1em; }
.jb-skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent); animation: jb-shimmer 1.4s infinite;
}
@keyframes jb-shimmer { 100% { transform: translateX(100%); } }
.jb-skeleton.line { height: 0.9rem; margin-bottom: 0.6rem; }
.jb-skeleton.block { height: 96px; border-radius: var(--jb-radius); }
.jb-skeleton.circle { width: 40px; height: 40px; border-radius: 50%; }

.jb-alert { display: flex; gap: 0.75rem; padding: 0.9rem 1rem; border-radius: var(--jb-radius); border: 1px solid; font-size: 0.9375rem; }
.jb-alert > .bi { font-size: 1.2rem; flex: none; margin-top: 0.1rem; }
.jb-alert p { margin: 0; color: inherit; }
.jb-alert.is-info { background: var(--jb-sent-bg); border-color: var(--jb-primary-200); color: #1e3a8a; }
.jb-alert.is-warn { background: var(--jb-due-bg); border-color: #fcd34d; color: #78350f; }
.jb-alert.is-danger { background: var(--jb-overdue-bg); border-color: #fca5a5; color: #7f1d1d; }
.jb-alert.is-success { background: var(--jb-paid-bg); border-color: #86efac; color: #14532d; }

/* 10. Toasts, modal, utilities -------------------------------------------- */
.jb-toasts { position: fixed; z-index: 1100; top: 1rem; right: 1rem; display: flex; flex-direction: column; gap: 0.6rem; width: min(380px, calc(100vw - 2rem)); pointer-events: none; }
.jb-toasts > * { pointer-events: auto; }
@media (max-width: 991.98px) { .jb-toasts { top: auto; bottom: calc(var(--jb-bottomnav-h) + 1rem); right: 1rem; left: 1rem; width: auto; } }
body.layout-public .jb-toasts { bottom: 1rem; }
.jb-toast {
  display: flex; align-items: flex-start; gap: 0.75rem; background: #fff; border: 1px solid var(--jb-border); border-left-width: 4px;
  border-radius: var(--jb-radius); box-shadow: var(--jb-shadow-lg); padding: 0.85rem 1rem; animation: jb-toast-in 0.25s ease;
}
.jb-toast .bi { font-size: 1.25rem; margin-top: 0.05rem; }
.jb-toast .jb-toast-body { flex: 1; font-size: 0.9375rem; color: var(--jb-text); }
.jb-toast .jb-toast-title { display: block; font-weight: 700; }
.jb-toast.is-success { border-left-color: var(--jb-paid-fg); } .jb-toast.is-success .bi:first-child { color: var(--jb-paid-fg); }
.jb-toast.is-error { border-left-color: var(--jb-overdue-fg); } .jb-toast.is-error .bi:first-child { color: var(--jb-overdue-fg); }
.jb-toast.is-info { border-left-color: var(--jb-primary); } .jb-toast.is-info .bi:first-child { color: var(--jb-primary); }
.jb-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; }
@keyframes jb-toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-content { border: 0; border-radius: var(--jb-radius-lg); box-shadow: var(--jb-shadow-lg); }
.modal-header { border-bottom: 0; padding: 1.5rem 1.5rem 0; }
.modal-body { padding: 0.75rem 1.5rem 1rem; }
.modal-footer { border-top: 0; padding: 0 1.5rem 1.5rem; gap: 0.5rem; }
.jb-confirm-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); font-size: 1.4rem; margin-bottom: 0.75rem; }

.jb-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--jb-primary-100); color: var(--jb-primary-hover); font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.02em;
}
.jb-avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
.jb-logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.04em; color: inherit; }
.jb-logo:hover { color: inherit; }
.jb-logo-mark { width: 34px; height: 34px; flex: none; }

.jb-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.jb-page-header h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.85rem); margin: 0; }
.jb-page-header p { margin: 0.25rem 0 0; }
.jb-breadcrumb { font-size: 0.8125rem; color: var(--jb-text-subtle); margin-bottom: 0.4rem; }
.jb-breadcrumb a { color: var(--jb-text-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 28px; }
.jb-breadcrumb a:hover { color: var(--jb-primary); text-decoration: underline; }

.jb-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; background: var(--jb-primary-50); color: var(--jb-primary-hover); border: 1px solid var(--jb-primary-100);
}
.jb-divider { height: 1px; background: var(--jb-border); border: 0; margin: 1.25rem 0; opacity: 1; }
.preview-banner {
  background: repeating-linear-gradient(135deg, #fef3c7, #fef3c7 12px, #fde68a 12px, #fde68a 24px);
  color: #78350f; font-size: 0.8125rem; font-weight: 600; text-align: center; padding: 0.4rem 1rem;
}

/* 11. Public marketing site ------------------------------------------------ */
body.layout-public { background: #fff; }
.pub-header {
  position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.pub-header.is-scrolled { border-bottom-color: var(--jb-border); box-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.12); background: rgba(255, 255, 255, 0.94); }
.pub-header .navbar { min-height: 72px; padding: 0.5rem 0; }
.pub-header .nav-link { font-weight: 600; font-size: 0.9375rem; color: var(--jb-gray-700); padding: 0.5rem 0.9rem !important; border-radius: var(--jb-radius-sm); }
.pub-header .nav-link:hover, .pub-header .nav-link:focus-visible { color: var(--jb-primary); background: var(--jb-primary-50); }
.pub-header .navbar-toggler { border: 1px solid var(--jb-border-strong); border-radius: var(--jb-radius-sm); padding: 0.4rem 0.6rem; }
.pub-header .navbar-toggler:focus { box-shadow: 0 0 0 4px rgba(var(--jb-primary-rgb), 0.16); }
@media (max-width: 991.98px) {
  .pub-header .navbar-collapse { padding: 0.75rem 0 1rem; }
  .pub-header .navbar-nav { gap: 0.15rem; margin-bottom: 0.75rem; }
  .pub-header .nav-cta { display: grid; gap: 0.6rem; }
}
.jb-logo-word { color: var(--jb-navy-900); }
.jb-logo-word .dot { color: var(--jb-accent); }

.pub-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(var(--jb-accent-rgb), 0.28), transparent 60%),
    radial-gradient(700px 520px at -10% 110%, rgba(var(--jb-primary-rgb), 0.55), transparent 60%),
    linear-gradient(160deg, var(--jb-navy-900) 0%, var(--jb-navy-800) 100%);
  padding: 3.5rem 0 4rem;
}
.pub-hero::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
@media (min-width: 992px) { .pub-hero { padding: 5.5rem 0 6rem; } }
.pub-hero .container { position: relative; }
.pub-hero h1 { color: #fff; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.pub-hero h1 .hl { color: var(--jb-accent); }
.pub-hero .lead { color: #cbd5e8; font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); max-width: 34rem; line-height: 1.6; }
.pub-hero .jb-eyebrow { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.hero-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; }
.hero-points li { color: #dbe4f5; font-size: 0.9375rem; display: flex; align-items: center; gap: 0.45rem; }
.hero-points .bi { color: #4ade80; }

/* Hero product mock-up: pure HTML/CSS laptop + phone so there is no image to maintain */
.mock { position: relative; max-width: 560px; margin: 2.5rem auto 0; padding-bottom: 1rem; }
@media (min-width: 992px) { .mock { margin: 0 0 0 auto; } }
.mock-window {
  background: #fff; border-radius: 16px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden; color: var(--jb-text);
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--jb-gray-100); border-bottom: 1px solid var(--jb-border); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--jb-gray-300); display: block; }
.mock-bar span { margin-left: 10px; font-size: 11px; color: var(--jb-text-subtle); background: #fff; border-radius: 6px; padding: 2px 10px; }
.mock-body { padding: 14px; background: var(--jb-bg); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock-stat { background: #fff; border: 1px solid var(--jb-border); border-radius: 10px; padding: 9px 10px; }
.mock-stat small { display: block; font-size: 10px; color: var(--jb-text-subtle); font-weight: 600; }
.mock-stat b { font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mock-chart { margin-top: 8px; background: #fff; border: 1px solid var(--jb-border); border-radius: 10px; padding: 10px; }
.mock-chart small { font-size: 10px; font-weight: 600; color: var(--jb-text-subtle); }
.mock-bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; margin-top: 8px; }
.mock-bars i { flex: 1; border-radius: 4px 4px 0 0; background: var(--jb-primary-200); display: block; }
.mock-bars i:nth-child(6) { background: var(--jb-primary); }
.mock-list { margin-top: 8px; background: #fff; border: 1px solid var(--jb-border); border-radius: 10px; }
.mock-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: 11px; border-bottom: 1px solid var(--jb-border); }
.mock-row:last-child { border-bottom: 0; }
.mock-row b { font-weight: 600; }
.mock-phone {
  position: absolute; right: -6px; bottom: -22px; width: 150px; background: #0b1b3a; border-radius: 26px; padding: 7px;
  box-shadow: 0 30px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
}
@media (min-width: 576px) { .mock-phone { width: 176px; right: -18px; } }
.mock-phone-screen { background: #fff; border-radius: 20px; padding: 12px 10px 14px; color: var(--jb-text); }
.mock-phone-screen .t { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--jb-text-subtle); text-transform: uppercase; }
.mock-phone-screen .big { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.mock-phone-screen .line { display: flex; justify-content: space-between; font-size: 10px; color: var(--jb-text-muted); padding: 3px 0; border-bottom: 1px dashed var(--jb-border); }
.mock-phone-screen .pay { margin-top: 10px; background: var(--jb-accent); color: var(--jb-on-accent); text-align: center; font-weight: 700; font-size: 11px; border-radius: 8px; padding: 8px 0; }

.pub-section { padding: 4rem 0; }
@media (min-width: 992px) { .pub-section { padding: 6rem 0; } }
.pub-section.is-tinted { background: var(--jb-gray-50); border-block: 1px solid var(--jb-border); }
.pub-section-head { max-width: 42rem; margin: 0 auto 2.75rem; text-align: center; }
.pub-section-head h2 { margin: 0.9rem 0 0.75rem; }
.pub-section-head p { font-size: 1.0625rem; margin: 0; }

.trade-strip { background: #fff; border-bottom: 1px solid var(--jb-border); padding: 1.25rem 0; }
.trade-strip .label { font-size: 0.8125rem; font-weight: 600; color: var(--jb-text-subtle); text-transform: uppercase; letter-spacing: 0.08em; }
.trade-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.trade-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.9rem; border: 1px solid var(--jb-border); border-radius: 999px; background: var(--jb-gray-50); font-size: 0.9rem; font-weight: 600; color: var(--jb-gray-700); }
.trade-chip .bi { color: var(--jb-primary); }

.feature-card { height: 100%; padding: 1.6rem; transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
.feature-card:hover { box-shadow: var(--jb-shadow); transform: translateY(-3px); border-color: var(--jb-primary-200); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1.1rem;
  background: linear-gradient(145deg, var(--jb-primary-50), var(--jb-primary-100)); color: var(--jb-primary); border: 1px solid var(--jb-primary-100);
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { margin: 0; font-size: 0.9875rem; }

.step-card { position: relative; padding: 0 0.5rem; text-align: center; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.25rem; font-weight: 800; margin-bottom: 1.1rem;
  background: var(--jb-navy-900); color: #fff; box-shadow: 0 0 0 8px var(--jb-primary-50);
}
.step-card h3 { font-size: 1.15rem; }
.step-card p { max-width: 28ch; margin: 0.4rem auto 0; }
@media (min-width: 768px) {
  .step-row { position: relative; }
  .step-row::before { content: ""; position: absolute; top: 28px; left: 16.6%; right: 16.6%; height: 2px; background: repeating-linear-gradient(90deg, var(--jb-primary-200) 0 8px, transparent 8px 16px); }
  .step-card { position: relative; }
}

.pay-flow { border-radius: var(--jb-radius-xl); background: linear-gradient(160deg, var(--jb-navy-900), var(--jb-navy-800)); color: #fff; padding: 2rem; position: relative; overflow: hidden; }
@media (min-width: 992px) { .pay-flow { padding: 3rem; } }
.pay-flow h2, .pay-flow h3 { color: #fff; }
.pay-flow p { color: #cbd5e8; }
.pay-flow .check-list li { color: #e2e8f5; }
.pay-flow .check-list .bi { color: #4ade80; }
.pay-flow-card { background: #fff; color: var(--jb-text); border-radius: var(--jb-radius-lg); padding: 1.25rem; box-shadow: var(--jb-shadow-lg); }
.pay-flow-card .row-line { display: flex; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1px dashed var(--jb-border); font-size: 0.9rem; }
.pay-flow-arrow { display: flex; align-items: center; gap: 0.6rem; margin: 0.9rem 0; font-size: 0.875rem; color: #cbd5e8; }
.pay-flow-arrow .node { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 0.3rem 0.8rem; color: #fff; font-weight: 600; white-space: nowrap; }
.pay-flow-arrow .line { flex: 1; height: 2px; background: rgba(255, 255, 255, 0.25); min-width: 12px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.check-list li { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--jb-text-muted); }
.check-list .bi { color: var(--jb-paid-fg); margin-top: 0.2rem; flex: none; }

.price-card { height: 100%; padding: 2rem 1.75rem; display: flex; flex-direction: column; position: relative; }
.price-card.is-featured { border: 2px solid var(--jb-primary); box-shadow: var(--jb-shadow-lg); background: linear-gradient(180deg, #fff, var(--jb-primary-50)); }
@media (min-width: 992px) { .price-card.is-featured { transform: translateY(-12px); } }
.price-flag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--jb-accent); color: var(--jb-on-accent); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3rem 0.9rem; border-radius: 999px; box-shadow: 0 4px 10px -2px rgba(var(--jb-accent-rgb), 0.5); white-space: nowrap; }
.price-name { font-size: 1.15rem; font-weight: 700; margin: 0; }
.price-amount { display: flex; align-items: baseline; gap: 0.3rem; margin: 0.9rem 0 0.25rem; }
.price-amount .num { font-size: 3rem; font-weight: 800; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-amount .cur { font-size: 1.4rem; font-weight: 700; align-self: flex-start; margin-top: 0.4rem; }
.price-amount .per { color: var(--jb-text-muted); font-size: 0.95rem; }
.price-card .check-list { margin: 1.4rem 0 1.75rem; flex: 1; }
.price-note { text-align: center; font-size: 0.875rem; color: var(--jb-text-subtle); margin-top: 1.5rem; }

.testimonial { height: 100%; padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.testimonial .stars { color: #f59e0b; letter-spacing: 2px; }
.testimonial blockquote { margin: 0; font-size: 1.0125rem; color: var(--jb-gray-800); line-height: 1.65; flex: 1; }
.testimonial figcaption { display: flex; align-items: center; gap: 0.75rem; }
.testimonial figcaption b { display: block; font-size: 0.9375rem; }
.testimonial figcaption span { font-size: 0.8125rem; color: var(--jb-text-subtle); }
.sample-note { text-align: center; font-size: 0.8125rem; color: #78350f; background: #fef3c7; border: 1px dashed #f59e0b; border-radius: var(--jb-radius-sm); padding: 0.45rem 0.8rem; max-width: 36rem; margin: 0 auto 1.5rem; }

.faq .accordion-item { border: 1px solid var(--jb-border); border-radius: var(--jb-radius) !important; margin-bottom: 0.75rem; overflow: hidden; background: #fff; box-shadow: var(--jb-shadow-xs); }
.faq .accordion-button { font-weight: 600; font-size: 1.0125rem; padding: 1.1rem 1.35rem; color: var(--jb-text); background: #fff; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { color: var(--jb-primary-hover); background: var(--jb-primary-50); }
.faq .accordion-button:focus { box-shadow: 0 0 0 4px rgba(var(--jb-primary-rgb), 0.16); }
.faq .accordion-body { padding: 0.25rem 1.35rem 1.35rem; color: var(--jb-text-muted); }
.faq .accordion-body p:last-child { margin-bottom: 0; }

.cta-band { background: linear-gradient(135deg, var(--jb-navy-900), var(--jb-navy-700)); border-radius: var(--jb-radius-xl); padding: 3rem 1.5rem; text-align: center; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--jb-accent-rgb), 0.35), transparent 65%); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: 0.6rem; }
.cta-band p { color: #cbd5e8; max-width: 34rem; margin: 0 auto 1.5rem; font-size: 1.0625rem; }
@media (min-width: 768px) { .cta-band { padding: 4.5rem 2rem; } }

.pub-footer { background: var(--jb-navy-950); color: #aab6cf; padding: 4rem 0 2rem; }
.pub-footer .foot-title { color: #fff; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; font-weight: 700; }
.pub-footer a { color: #aab6cf; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.pub-footer a.jb-logo { min-height: 0; }
.pub-footer a:hover { color: #fff; text-decoration: underline; }
.pub-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.pub-footer p { color: #aab6cf; }
.pub-footer .jb-logo-word { color: #fff; }
.pub-footer .footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 3rem; padding-top: 1.5rem; font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }

/* Centred "card on a soft background" pages: sign-up/login placeholders, errors, legal */
.pub-center { min-height: calc(100vh - 72px - 1px); display: grid; place-items: center; padding: 3rem 1rem;
  background: radial-gradient(800px 400px at 50% -10%, rgba(var(--jb-primary-rgb), 0.1), transparent 70%), var(--jb-gray-50); }
.auth-card { width: 100%; max-width: 460px; padding: 2.25rem 1.75rem; text-align: center; }
@media (min-width: 576px) { .auth-card { padding: 2.75rem 2.5rem; } }
.error-code { font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; background: linear-gradient(135deg, var(--jb-primary), var(--jb-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prose { max-width: 46rem; margin: 0 auto; }
.prose h2 { margin-top: 2rem; font-size: 1.35rem; }

/* 12. Tradie app shell ------------------------------------------------------ */
body.layout-app, body.layout-admin { background: var(--jb-bg); }
.app-shell { min-height: 100vh; display: block; }
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1020; width: var(--jb-sidebar-w); display: none; flex-direction: column;
  background: var(--jb-sidebar-bg); color: var(--jb-sidebar-text); transition: width 0.22s ease; overflow: hidden;
}
@media (min-width: 992px) {
  .app-sidebar { display: flex; }
  .app-main { margin-left: var(--jb-sidebar-w); transition: margin-left 0.22s ease; }
  body.sidebar-collapsed .app-sidebar { width: var(--jb-sidebar-w-collapsed); }
  body.sidebar-collapsed .app-main { margin-left: var(--jb-sidebar-w-collapsed); }
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 1.1rem 1.1rem 1rem 1.25rem; min-height: var(--jb-topbar-h); }
.sidebar-brand .jb-logo-word { color: #fff; }
.sidebar-toggle { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--jb-sidebar-text); display: grid; place-items: center; flex: none; }
.sidebar-toggle:hover { background: var(--jb-sidebar-active-bg); color: #fff; }
.sidebar-toggle .bi { transition: transform 0.22s ease; }
body.sidebar-collapsed .sidebar-toggle .bi { transform: rotate(180deg); }
.sidebar-nav { padding: 0.5rem 0.75rem; display: grid; gap: 0.2rem; flex: 1; align-content: start; overflow-y: auto; }
.sidebar-label { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #7f8fb0; padding: 1rem 0.75rem 0.4rem; white-space: nowrap; }
.sidebar-link {
  position: relative; display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 0.85rem; border-radius: 10px;
  color: var(--jb-sidebar-text); text-decoration: none; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; min-height: 44px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sidebar-link .bi { font-size: 1.2rem; flex: none; width: 1.4rem; text-align: center; }
.sidebar-link:hover { background: var(--jb-sidebar-active-bg); color: #fff; }
.sidebar-link.active { background: var(--jb-sidebar-active-bg); color: #fff; }
.sidebar-link.active::before { content: ""; position: absolute; left: -0.75rem; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--jb-sidebar-accent); }
.sidebar-link.active .bi { color: var(--jb-sidebar-accent); }
.sidebar-footer { padding: 0.9rem 0.75rem 1.1rem; }
.sidebar-plan { border-radius: 12px; padding: 0.95rem; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); }
.sidebar-plan b { color: #fff; display: block; font-size: 0.9rem; }
.sidebar-plan small { color: #b3c0da; display: block; margin: 0.15rem 0 0.7rem; }
.sidebar-plan .progress { height: 6px; background: rgba(255, 255, 255, 0.15); }
.sidebar-plan .progress-bar { background: var(--jb-accent); }
body.sidebar-collapsed .sidebar-link span, body.sidebar-collapsed .sidebar-label, body.sidebar-collapsed .sidebar-plan, body.sidebar-collapsed .sidebar-brand .jb-logo-word { display: none; }
body.sidebar-collapsed .sidebar-brand { padding-inline: 0.7rem; justify-content: center; flex-direction: column; gap: 0.4rem; padding-top: 0.9rem; }
body.sidebar-collapsed .sidebar-link { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .sidebar-link.active::before { left: -0.75rem; }

.app-topbar {
  position: sticky; top: 0; z-index: 1010; height: var(--jb-topbar-h); display: flex; align-items: center; gap: 0.75rem; padding: 0 1rem;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--jb-border);
}
@media (min-width: 992px) { .app-topbar { padding: 0 2rem; gap: 1rem; } }
.topbar-biz { display: flex; align-items: center; gap: 0.65rem; min-width: 0; text-decoration: none; color: inherit; }
.topbar-biz .biz-name { font-weight: 700; font-size: 0.9375rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 11rem; display: block; }
.topbar-biz small { color: var(--jb-text-subtle); font-size: 0.75rem; display: block; line-height: 1.2; }
.biz-logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 0.9rem; color: #fff; background: linear-gradient(145deg, #0e7490, #155e75); letter-spacing: 0.02em; }
.topbar-search { flex: 1; max-width: 440px; }
.topbar-search .form-control { background: var(--jb-gray-100); border-color: transparent; box-shadow: none; min-height: 42px; }
.topbar-search .form-control:focus { background: #fff; border-color: var(--jb-primary); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.topbar-search-row { display: none; padding: 0.6rem 1rem; background: #fff; border-bottom: 1px solid var(--jb-border); }
.topbar-search-row.is-open { display: block; }
.user-menu-btn { display: flex; align-items: center; gap: 0.6rem; background: transparent; border: 0; padding: 0.25rem 0.4rem 0.25rem 0.25rem; border-radius: 999px; color: inherit; }
.user-menu-btn:hover { background: var(--jb-gray-100); }
.user-menu-btn .who { text-align: left; line-height: 1.2; }
.user-menu-btn .who b { display: block; font-size: 0.875rem; }
.user-menu-btn .who small { color: var(--jb-text-subtle); font-size: 0.75rem; }
.dropdown-menu { border: 1px solid var(--jb-border); border-radius: var(--jb-radius); box-shadow: var(--jb-shadow-lg); padding: 0.4rem; }
.dropdown-item { border-radius: 8px; padding: 0.55rem 0.8rem; font-weight: 500; font-size: 0.9375rem; display: flex; align-items: center; gap: 0.65rem; min-height: 40px; }
.dropdown-item .bi { color: var(--jb-text-subtle); }
.dropdown-item:active { background: var(--jb-primary); }
.dropdown-item:active .bi { color: #fff; }

.app-content { padding: 1.25rem 1rem calc(var(--jb-bottomnav-h) + 5.5rem); max-width: 1320px; margin: 0 auto; }
@media (min-width: 768px) { .app-content { padding: 1.75rem 1.5rem calc(var(--jb-bottomnav-h) + 5.5rem); } }
@media (min-width: 992px) { .app-content { padding: 2rem 2rem 3rem; } }

.app-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; height: var(--jb-bottomnav-h); display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--jb-border); box-shadow: 0 -4px 20px -6px rgba(15, 23, 42, 0.12); padding: 0 0.25rem env(safe-area-inset-bottom);
}
@media (min-width: 992px) { .app-bottomnav, .app-fab { display: none !important; } }
.bottomnav-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; color: var(--jb-text-muted); text-decoration: none;
  font-size: 0.6875rem; font-weight: 600; background: transparent; border: 0; border-radius: 12px; margin: 0.35rem 0.1rem; min-height: 48px;
}
.bottomnav-link .bi { font-size: 1.35rem; line-height: 1; }
.bottomnav-link.active { color: var(--jb-primary); background: var(--jb-primary-50); }
.app-fab {
  position: fixed; right: 1rem; bottom: calc(var(--jb-bottomnav-h) + 1rem); z-index: 1025; height: 56px; padding: 0 1.25rem 0 1rem; border-radius: 999px; border: 0;
  background: var(--jb-accent); color: var(--jb-on-accent); font-weight: 700; display: flex; align-items: center; gap: 0.4rem; font-size: 1rem;
  box-shadow: 0 10px 24px -6px rgba(var(--jb-accent-rgb), 0.65), 0 2px 6px rgba(15, 23, 42, 0.2);
}
.app-fab .bi { font-size: 1.5rem; }
.app-fab:active { transform: scale(0.97); }
.offcanvas-bottom { border-radius: var(--jb-radius-xl) var(--jb-radius-xl) 0 0; height: auto; max-height: 85vh; }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--jb-gray-300); margin: 0.6rem auto 0; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 0.5rem 0 1rem; }
.sheet-tile { display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; border: 1px solid var(--jb-border); border-radius: var(--jb-radius); text-decoration: none; color: var(--jb-text); font-weight: 600; background: #fff; min-height: 88px; }
.sheet-tile .bi { font-size: 1.5rem; color: var(--jb-primary); }
.sheet-tile:active { background: var(--jb-gray-50); }
.sheet-list { display: grid; gap: 0.25rem; padding-bottom: 1rem; }
.sheet-list a { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 0.5rem; text-decoration: none; color: var(--jb-text); font-weight: 600; border-radius: 10px; min-height: 48px; }
.sheet-list a .bi { font-size: 1.25rem; color: var(--jb-text-subtle); width: 1.5rem; text-align: center; }
.sheet-list a:active { background: var(--jb-gray-50); }

/* 13. Platform admin theme: violet accent so it is never confused with a tradie account */
body.layout-admin {
  --jb-primary: #6d28d9; --jb-primary-hover: #5b21b6; --jb-primary-rgb: 109, 40, 217;
  --jb-primary-50: #f5f3ff; --jb-primary-100: #ede9fe; --jb-primary-200: #ddd6fe;
  --jb-sidebar-bg: #1e1b4b; --jb-sidebar-text: #c9c6ee; --jb-sidebar-active-bg: rgba(255, 255, 255, 0.1); --jb-sidebar-accent: #a78bfa;
  --bs-primary: var(--jb-primary); --bs-primary-rgb: var(--jb-primary-rgb); --bs-link-color: var(--jb-primary); --bs-link-color-rgb: var(--jb-primary-rgb);
}
body.layout-admin .sidebar-label { color: #8b87c4; }
body.layout-admin .sidebar-plan small { color: #b8b4e8; }
body.layout-admin .sidebar-plan .progress-bar { background: #a78bfa; }
.admin-flag { display: inline-flex; align-items: center; gap: 0.4rem; background: #ede9fe; color: #5b21b6; font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 999px; letter-spacing: 0.02em; white-space: nowrap; }
.admin-topbar { border-bottom: 2px solid #6d28d9; }

/* 14. Dashboard parts ------------------------------------------------------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.15rem; }
.checklist li { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.25rem; border-bottom: 1px solid var(--jb-border); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--jb-border-strong); font-size: 0.8rem; color: transparent; }
.checklist li.is-done .tick { background: var(--jb-paid-fg); border-color: var(--jb-paid-fg); color: #fff; }
.checklist li.is-done .label { color: var(--jb-text-subtle); text-decoration: line-through; }
.checklist .label { flex: 1; font-weight: 600; font-size: 0.9375rem; }
.progress-jb { height: 8px; border-radius: 99px; background: var(--jb-gray-200); overflow: hidden; }
.progress-jb > div { height: 100%; background: linear-gradient(90deg, var(--jb-primary), #3b82f6); border-radius: 99px; }

.job-list { list-style: none; padding: 0; margin: 0; }
.job-item { display: flex; gap: 0.9rem; align-items: center; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--jb-border); }
.job-item:last-child { border-bottom: 0; }
.job-date { width: 52px; flex: none; text-align: center; border-radius: 10px; background: var(--jb-primary-50); color: var(--jb-primary-hover); padding: 0.3rem 0; line-height: 1.1; }
.job-date b { display: block; font-size: 1.15rem; }
.job-date small { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.job-item .grow { flex: 1; min-width: 0; }
.job-item .grow b { display: block; font-size: 0.9375rem; }
.job-item .grow span { font-size: 0.8125rem; color: var(--jb-text-subtle); }

.activity { list-style: none; padding: 0; margin: 0; position: relative; }
.activity li { display: flex; gap: 0.85rem; padding: 0.75rem 1.25rem; position: relative; }
.activity .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 0.9rem; background: var(--jb-primary-50); color: var(--jb-primary); }
.activity .dot.is-green { background: var(--jb-paid-bg); color: var(--jb-paid-fg); }
.activity .dot.is-amber { background: var(--jb-due-bg); color: var(--jb-due-fg); }
.activity .dot.is-red { background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); }
.activity p { margin: 0; color: var(--jb-text); font-size: 0.9375rem; }
.activity small { color: var(--jb-text-subtle); }

.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }
.segmented { display: inline-flex; padding: 3px; background: var(--jb-gray-100); border-radius: 10px; gap: 2px; }
.segmented button { border: 0; background: transparent; font-weight: 600; font-size: 0.8125rem; padding: 0.35rem 0.8rem; border-radius: 8px; color: var(--jb-text-muted); min-height: 32px; }
.segmented button.active { background: #fff; color: var(--jb-text); box-shadow: var(--jb-shadow-xs); }

.swatch { height: 64px; border-radius: var(--jb-radius); border: 1px solid rgba(15, 23, 42, 0.08); display: flex; align-items: flex-end; padding: 0.4rem 0.6rem; font-size: 0.75rem; font-weight: 600; }
.ds-section { margin-bottom: 2.5rem; }
.ds-section > h2 { font-size: 1.25rem; margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--jb-border); }

/* 15. Account pages: sign-up, log in, password reset ------------------------ */
.auth-page { padding: 2.5rem 0 4rem; background: radial-gradient(900px 420px at 50% -10%, rgba(var(--jb-primary-rgb), 0.1), transparent 70%), var(--jb-gray-50); min-height: calc(100vh - 72px - 1px); }
@media (min-width: 992px) { .auth-page { padding: 4rem 0 5rem; } }
.auth-form-card { padding: 1.75rem 1.25rem; width: 100%; }
@media (min-width: 576px) { .auth-form-card { padding: 2.5rem 2.5rem; } }
.auth-page-narrow .auth-form-card { max-width: 480px; }
.auth-form-card h1 { letter-spacing: -0.02em; }
.auth-aside { height: 100%; border-radius: var(--jb-radius-lg); padding: 2.25rem 2rem; color: #dbe4f5;
  background: linear-gradient(160deg, var(--jb-navy-900), var(--jb-navy-800)); box-shadow: var(--jb-shadow-md); }
.auth-aside h2 { color: #fff; margin-bottom: 1.5rem; letter-spacing: -0.01em; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.auth-points li { display: flex; gap: 0.75rem; align-items: flex-start; line-height: 1.45; }
.auth-points .bi { color: #4ade80; font-size: 1.15rem; margin-top: 0.1rem; flex: none; }
.auth-points b { color: #fff; }

.plan-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.plan-choice { position: relative; display: block; cursor: pointer; margin: 0; }
.plan-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.plan-choice-body { display: grid; gap: 0.1rem; padding: 0.85rem 1rem; border: 1.5px solid var(--jb-border-strong); border-radius: var(--jb-radius); background: #fff; text-align: left; transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease; }
.plan-choice-body b { font-size: 1rem; color: var(--jb-text); }
.plan-choice-body > span { font-weight: 700; font-size: 1.15rem; color: var(--jb-text); }
.plan-choice-body > span small, .plan-choice-body > small { font-weight: 400; font-size: 0.8125rem; color: var(--jb-text-subtle); }
.plan-choice input:checked + .plan-choice-body { border-color: var(--jb-primary); background: var(--jb-primary-50); box-shadow: 0 0 0 3px rgba(var(--jb-primary-rgb), 0.15); }
.plan-choice input:focus-visible + .plan-choice-body { outline: 3px solid var(--jb-primary); outline-offset: 2px; }
fieldset legend.form-label { float: none; width: auto; padding: 0; }

.form-alert { display: flex; gap: 0.75rem; align-items: flex-start; text-align: left; border-radius: var(--jb-radius); border: 1px solid #fecaca; background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); font-weight: 500; font-size: 0.9375rem; padding: 0.85rem 1rem; margin-bottom: 1.25rem; }
.form-alert .bi { font-size: 1.1rem; margin-top: 0.1rem; flex: none; }
.jb-password .form-control { border-right: 0; }
.jb-password .btn { border-left: 0; border-color: var(--jb-border-strong); min-width: 48px; }
.jb-password:focus-within .btn { border-color: var(--jb-primary); }
.jb-empty-icon.is-success { background: var(--jb-paid-bg); color: var(--jb-paid-fg); box-shadow: 0 0 0 10px rgba(21, 128, 61, 0.07); }
.jb-empty-icon.is-error { background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); box-shadow: 0 0 0 10px rgba(185, 28, 28, 0.06); }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.25rem; margin: 0; }
.detail-list dt { font-weight: 600; color: var(--jb-text-subtle); font-size: 0.875rem; }
.detail-list dd { margin: 0; font-weight: 600; word-break: break-word; }

/* 16. Settings, team, logo and the setup wizard ------------------------------ */
.settings-tabs { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--jb-border); overflow-x: auto; scrollbar-width: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; min-height: 44px; font-weight: 600; font-size: 0.9375rem; color: var(--jb-text-muted); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.settings-tab:hover { color: var(--jb-primary); }
.settings-tab.active { color: var(--jb-primary); border-bottom-color: var(--jb-primary); }
.jb-card-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--jb-border); background: var(--jb-gray-50); border-radius: 0 0 var(--jb-radius-lg) var(--jb-radius-lg); }
@media (min-width: 768px) { .jb-card-footer { padding: 1rem 1.5rem; } }

.note-box { display: flex; gap: 0.75rem; align-items: flex-start; text-align: left; padding: 0.85rem 1rem; border-radius: var(--jb-radius); background: var(--jb-primary-50); border: 1px solid var(--jb-primary-100); color: var(--jb-text); font-size: 0.9375rem; line-height: 1.45; }
.note-box .bi { color: var(--jb-primary); font-size: 1.1rem; margin-top: 0.1rem; flex: none; }

.logo-uploader { display: grid; gap: 1rem; justify-items: center; }
.logo-preview { width: 160px; height: 160px; border-radius: var(--jb-radius-lg); border: 1.5px dashed var(--jb-border-strong); background: #fff; display: grid; place-items: center; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview img[hidden] { display: none; }
.logo-initials { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; color: var(--jb-primary); }
.logo-uploader form { text-align: left; }

.biz-logo.has-image { background: #fff; border: 1px solid var(--jb-border); overflow: hidden; padding: 2px; }
.biz-logo.has-image img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

.team-list { list-style: none; margin: 0; padding: 0; }
.team-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--jb-border); flex-wrap: wrap; }
.team-row:last-child { border-bottom: 0; }
.team-who { flex: 1; min-width: 12rem; display: grid; gap: 0.1rem; }
.team-who b { font-weight: 600; }
.team-who small { color: var(--jb-text-subtle); word-break: break-all; }
.team-action { margin-left: auto; }
.you-tag { margin-left: 0.5rem; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--jb-primary); background: var(--jb-primary-50); border-radius: 999px; padding: 0.1rem 0.5rem; vertical-align: middle; }
.jb-avatar.is-pending { background: var(--jb-gray-100); color: var(--jb-text-muted); }
.checklist .grow { flex: 1; }

.layout-setup { background: radial-gradient(900px 420px at 50% -10%, rgba(var(--jb-primary-rgb), 0.1), transparent 70%), var(--jb-gray-50); min-height: 100vh; }
.setup-header { padding: 1rem 0; background: rgba(255, 255, 255, 0.86); border-bottom: 1px solid var(--jb-border); }
.setup-skip { font-weight: 600; color: var(--jb-text-muted); text-decoration: none; min-height: 44px; }
.setup-skip:hover { color: var(--jb-primary); text-decoration: underline; }
.setup-main { padding: 2rem 0 4rem; }
.setup-card { max-width: 560px; margin: 0 auto; padding: 1.75rem 1.25rem; }
@media (min-width: 576px) { .setup-card { padding: 2.5rem; } }
.setup-count { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jb-primary); margin-bottom: 0.5rem; }
.stepper { list-style: none; display: flex; justify-content: center; gap: 0.5rem; padding: 0; margin: 0 auto 1.75rem; max-width: 560px; }
.stepper-item { flex: 1; display: grid; justify-items: center; gap: 0.4rem; position: relative; text-align: center; }
.stepper-item:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 2px; background: var(--jb-border-strong); }
.stepper-item.is-done:not(:last-child)::after { background: var(--jb-paid-fg); }
.stepper-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.875rem; background: #fff; border: 2px solid var(--jb-border-strong); color: var(--jb-text-muted); position: relative; z-index: 1; }
.stepper-item.is-current .stepper-dot { background: var(--jb-primary); border-color: var(--jb-primary); color: #fff; box-shadow: 0 0 0 4px rgba(var(--jb-primary-rgb), 0.18); }
.stepper-item.is-done .stepper-dot { background: var(--jb-paid-fg); border-color: var(--jb-paid-fg); color: #fff; }
.stepper-label { font-size: 0.8125rem; font-weight: 600; color: var(--jb-text-muted); }
.stepper-item.is-current .stepper-label { color: var(--jb-text); }
@media (max-width: 575.98px) { .stepper-label { font-size: 0.75rem; } }
.auth-points-dark li { color: var(--jb-text); }
.auth-points-dark .bi { color: var(--jb-paid-fg); }
.form-switch .form-check-label { margin-left: 0.5rem; }
@media (max-width: 575.98px) {
  .settings-tab { padding: 0.75rem 0.7rem; gap: 0.4rem; font-size: 0.875rem; }
  .settings-tabs { margin-left: -0.25rem; }
}

/* 17. Customers ------------------------------------------------------------- */
.segmented-link { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 8px; padding: 0.35rem 0.8rem; min-height: 32px; font-weight: 600; font-size: 0.8125rem; color: var(--jb-text-muted); text-decoration: none; }
.segmented-link:hover { color: var(--jb-text); }
.segmented-link.active { background: #fff; color: var(--jb-text); box-shadow: var(--jb-shadow-xs); }
.seg-count { font-size: 0.6875rem; font-weight: 700; background: var(--jb-gray-200, #e2e8f0); color: var(--jb-text-muted); border-radius: 999px; padding: 0.05rem 0.45rem; }
.segmented-link.active .seg-count { background: var(--jb-primary-50); color: var(--jb-primary); }
.customer-search { display: flex; gap: 0.5rem; align-items: center; flex: 1; min-width: min(100%, 280px); max-width: 560px; }
.customer-name { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; min-height: 44px; }
.customer-name:hover .customer-name-text { color: var(--jb-primary); text-decoration: underline; }
.customer-name-text { font-weight: 600; word-break: break-word; }
.cell-address { max-width: 24rem; color: var(--jb-text-muted); }
.customer-name { white-space: normal; }
.jb-table .cell-title .cell-sub { word-break: break-all; }
@media (max-width: 767.98px) { .jb-table-stack .cell-title .customer-name { width: 100%; } }
.btn.disabled, .btn[aria-disabled=true] { opacity: 0.5; pointer-events: none; }
/* On a phone the email under a customer's name stays visible: it is how people tell two Sams apart. */
@media (max-width: 767.98px) { .jb-table-stack .customer-name .cell-sub { display: block; font-size: 0.8125rem; } }

/* 18. Quotes ---------------------------------------------------------------- */
.jb-badge.is-expired { background: var(--jb-overdue-bg); color: var(--jb-overdue-fg); }
.segmented-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented-scroll::-webkit-scrollbar { display: none; }
.segmented-scroll .segmented-link { white-space: nowrap; }
.quote-link { display: grid; text-decoration: none; color: inherit; min-height: 44px; align-content: center; }
.quote-number { font-weight: 700; }
.quote-title { font-weight: 400; font-size: 0.8125rem; color: var(--jb-text-subtle); word-break: break-word; }
.quote-link:hover .quote-number { color: var(--jb-primary); text-decoration: underline; }
.quote-actions form { margin: 0; }

/* Six columns when GST is shown (description, qty, price, GST, amount, remove). The page used to give it five, so the amount ran past the edge and the delete button dropped to a second row. */
.quote-lines-head, .quote-line { display: grid; gap: 0.6rem; align-items: start; grid-template-columns: minmax(0, 1fr) 76px 124px 64px 96px 36px; }
.quote-lines-head { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--jb-text-subtle); padding: 0 0 0.4rem; }
.quote-line { padding: 0.65rem 0; border-top: 1px solid var(--jb-border); }
.quote-line .ql-total { text-align: right; font-weight: 600; padding-top: 0.55rem; font-variant-numeric: tabular-nums; }
.quote-line .ql-gst { padding-top: 0.5rem; }
.quote-line .ql-label { display: none; font-size: 0.75rem; font-weight: 600; color: var(--jb-text-subtle); margin-bottom: 0.2rem; }
.quote-line .ql-remove .btn { min-width: 36px; min-height: 38px; }
.quote-line .ql-remove .btn:disabled { opacity: 0.35; }
/* Without a GST column the grid has one fewer cell. */
.quote-lines:not(:has(.ql-gst)) .quote-line, .quote-lines:not(:has(.ql-gst)) .quote-lines-head { grid-template-columns: minmax(0, 1fr) 90px 130px 120px 36px; }
@media (max-width: 767.98px) {
  .quote-lines-head { display: none; }
  .quote-line, .quote-lines:not(:has(.ql-gst)) .quote-line { grid-template-columns: 1fr 1fr; grid-template-areas: "desc desc" "qty price" "gst total" "remove remove"; gap: 0.6rem 0.75rem; padding: 1rem 0; }
  .quote-line .ql-desc { grid-area: desc; }
  .quote-line .ql-qty { grid-area: qty; }
  .quote-line .ql-price { grid-area: price; }
  .quote-line .ql-gst { grid-area: gst; padding-top: 0.2rem; align-self: center; }
  .quote-line .ql-total { grid-area: total; padding-top: 0; align-self: center; font-size: 1.05rem; }
  .quote-line .ql-remove { grid-area: remove; }
  .quote-line .ql-remove .btn { width: 100%; }
  .quote-line .ql-label { display: block; }
}

.quote-totals { display: grid; gap: 0.35rem; max-width: 22rem; margin: 1.25rem 0 0 auto; padding: 0; }
.quote-totals > div { display: flex; justify-content: space-between; gap: 1.5rem; }
.quote-totals dt { font-weight: 500; color: var(--jb-text-muted); }
.quote-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.quote-totals .grand { border-top: 2px solid var(--jb-border-strong); margin-top: 0.35rem; padding-top: 0.6rem; font-size: 1.2rem; }
.quote-totals .grand dt, .quote-totals .grand dd { color: var(--jb-text); font-weight: 800; }
.quote-history { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.65rem; }
.quote-history li { display: flex; gap: 0.6rem; align-items: flex-start; }
.quote-history .bi { color: var(--jb-text-subtle); margin-top: 0.1rem; }
.quote-history .is-good .bi { color: var(--jb-paid-fg); }
.quote-history .is-bad .bi { color: var(--jb-overdue-fg); }
.record-decline > summary { list-style: none; cursor: pointer; }
.record-decline > summary::-webkit-details-marker { display: none; }

/* The page a customer sees. */
.layout-quote { background: var(--jb-gray-50); }
.quote-public { padding: 1.25rem 0 3rem; }
.quote-public .container { max-width: 860px; }
.quote-sheet { background: #fff; border: 1px solid var(--jb-border); border-radius: var(--jb-radius-lg); box-shadow: var(--jb-shadow-md); padding: 1.5rem 1.25rem 2rem; }
@media (min-width: 768px) { .quote-sheet { padding: 2.5rem 2.75rem 2.75rem; } }
.quote-sheet-head { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; padding-bottom: 1.5rem; border-bottom: 2px solid var(--jb-border); margin-bottom: 1.5rem; }
.quote-brand { display: flex; gap: 1rem; align-items: flex-start; min-width: 0; }
.quote-logo { max-width: 120px; max-height: 80px; object-fit: contain; flex: none; }
.quote-business { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--jb-navy-900); word-break: break-word; }
.quote-meta { font-size: 0.875rem; color: var(--jb-text-muted); }
.quote-ident { text-align: right; }
@media (max-width: 575.98px) { .quote-ident { text-align: left; } }
.quote-word { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--jb-navy-900); margin: 0; }
.quote-number-big { font-weight: 700; }
.quote-banner { display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: var(--jb-radius); margin-bottom: 1.5rem; font-size: 0.9375rem; line-height: 1.45; }
.quote-banner .bi { font-size: 1.25rem; flex: none; margin-top: 0.05rem; }
.quote-banner.is-good { background: var(--jb-paid-bg); color: #14532d; }
.quote-banner.is-bad { background: var(--jb-overdue-bg); color: #7f1d1d; }
.quote-banner.is-wait { background: var(--jb-due-bg); color: #78350f; }
.quote-section { display: grid; gap: 1rem 2rem; grid-template-columns: 1fr; margin-bottom: 1.5rem; }
@media (min-width: 576px) { .quote-section:not(.quote-notes) { grid-template-columns: 1fr 1fr; } }
.quote-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--jb-text-subtle); margin-bottom: 0.2rem; }
.quote-for-name { font-size: 1.1rem; font-weight: 700; word-break: break-word; }
.quote-table { border: 1px solid var(--jb-border); }
.quote-totals-public { margin-top: 1.5rem; }
.quote-totals-public .grand dd small { font-weight: 600; color: var(--jb-text-muted); }
.quote-respond { margin-top: 2rem; padding: 1.5rem; border-radius: var(--jb-radius-lg); background: var(--jb-primary-50); border: 1px solid var(--jb-primary-100); }
.quote-decline > summary { cursor: pointer; color: var(--jb-text-muted); font-weight: 600; font-size: 0.9375rem; min-height: 32px; display: inline-flex; align-items: center; }
.quote-footer-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.quote-credit { text-align: center; color: var(--jb-text-subtle); font-size: 0.8125rem; margin: 1.25rem 0 0; }

/* Quote tweaks found in the Step 5 screenshots: long descriptions and e-mail addresses wrap instead of pushing the page wider. */
.quote-lines-table td.cell-title, .quote-table td.cell-title { white-space: normal; overflow-wrap: anywhere; }
.quote-meta, .quote-contact { overflow-wrap: anywhere; }
.quote-totals { margin-bottom: 1.5rem; }
.quote-totals dd { white-space: nowrap; }
.quote-totals .grand dt { min-width: 0; }
.quote-card-text { overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
  .jb-table-stack td.cell-title { white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .jb-table-stack td { min-width: 0; }
}

/* 19. Jobs ------------------------------------------------------------------ */
.job-heading { overflow-wrap: anywhere; }
.jb-card-subbar { padding: 0.6rem 1.25rem; border-bottom: 1px solid var(--jb-border); }
.job-facts { margin: 0; padding: 0; }
.job-facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0.35rem 1rem; padding: 0.9rem 1.25rem; border-top: 1px solid var(--jb-border); }
.job-facts > div:first-child { border-top: 0; }
.job-facts dt { font-size: 0.8125rem; font-weight: 600; color: var(--jb-text-subtle); text-transform: uppercase; letter-spacing: 0.05em; padding-top: 0.15rem; }
.job-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .job-facts > div { grid-template-columns: 1fr; } }

.photo-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.photo-tile { position: relative; border: 1px solid var(--jb-border); border-radius: var(--jb-radius); overflow: hidden; background: var(--jb-gray-50); }
.photo-tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-tile > a { display: block; }
.photo-delete { position: absolute; top: 0.4rem; right: 0.4rem; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(11, 27, 58, 0.78); color: #fff; }
.photo-delete:hover { background: #0b1b3a; }
.photo-meta { display: block; padding: 0.35rem 0.55rem; font-size: 0.75rem; color: var(--jb-text-subtle); overflow-wrap: anywhere; }
.photo-upload label.btn:has(+ input:focus-visible) { outline: 3px solid var(--jb-primary); outline-offset: 2px; }
.photo-upload.is-auto [data-jb-photo-submit] { display: none; }

/* The month calendar: a grid on wide screens, an agenda of the busy days on phones. */
.cal-bar { flex-wrap: wrap; gap: 0.75rem; }
.cal-title { min-width: 9.5rem; text-align: center; font-size: 1.05rem; }
.cal-head, .cal-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head { background: var(--jb-gray-50); border-bottom: 1px solid var(--jb-border); }
.cal-headcell { padding: 0.5rem 0.6rem; font-size: 0.75rem; font-weight: 600; color: var(--jb-text-subtle); text-transform: uppercase; letter-spacing: 0.05em; }
.cal-cell { min-height: 7.5rem; padding: 0.4rem; border-right: 1px solid var(--jb-border); border-bottom: 1px solid var(--jb-border); display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-out { background: var(--jb-gray-50); }
.cal-cell.is-out .cal-daynum { opacity: 0.55; }
.cal-cell.is-today { background: var(--jb-primary-50); }
.cal-daynum { align-self: flex-start; min-width: 1.85rem; height: 1.85rem; padding: 0 0.3rem; display: grid; place-items: center; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--jb-text); text-decoration: none; }
.cal-daynum:hover { background: var(--jb-gray-100); }
.cal-cell.is-today .cal-daynum { background: var(--jb-primary); color: #fff; }
.cal-job { display: block; padding: 0.15rem 0.45rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--jb-sent-bg); color: var(--jb-sent-fg); }
.cal-job.is-inprogress { background: var(--jb-due-bg); color: var(--jb-due-fg); }
.cal-job.is-completed { background: var(--jb-paid-bg); color: var(--jb-paid-fg); }
.cal-job:hover { filter: brightness(0.96); text-decoration: underline; }
.cal-more { font-size: 0.7rem; color: var(--jb-text-subtle); padding-left: 0.2rem; }
.cal-agenda { display: none; }
@media (max-width: 767.98px) { .cal-grid { display: none; } .cal-agenda { display: block; } }
.agenda-day { padding: 0.9rem 1.25rem; border-top: 1px solid var(--jb-border); }
.agenda-day:first-child { border-top: 0; }
.agenda-day.is-today { background: var(--jb-primary-50); }
.agenda-date { margin-bottom: 0.5rem; }
.agenda-job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.75rem; align-items: center; padding: 0.55rem 0; text-decoration: none; color: inherit; min-height: 44px; }
.agenda-job + .agenda-job { border-top: 1px dashed var(--jb-border); }
.agenda-title { font-weight: 600; overflow-wrap: anywhere; }
.agenda-sub { grid-column: 1; font-size: 0.8125rem; color: var(--jb-text-subtle); overflow-wrap: anywhere; }
.agenda-job .jb-badge { grid-column: 2; grid-row: 1 / span 2; }
.unsched-list { list-style: none; margin: 0; padding: 0; }
.unsched-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1.25rem; border-top: 1px solid var(--jb-border); }
.unsched-list li > a:first-child { display: grid; text-decoration: none; color: inherit; min-width: 0; }
.cal-bar > div { flex-wrap: wrap; row-gap: 0.5rem; }
@media (max-width: 575.98px) { .cal-title { min-width: 0; flex: 1 1 auto; font-size: 1rem; } }

/* 20. Invoices --------------------------------------------------------------- */
.jb-badge.is-partpaid { background: var(--jb-due-bg); color: var(--jb-due-fg); }
.inv-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.inv-stat { display: grid; gap: 0.15rem; padding: 0.9rem 1.1rem; background: #fff; border: 1px solid var(--jb-border); border-radius: var(--jb-radius); box-shadow: var(--jb-shadow-xs); min-width: 0; }
.inv-stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--jb-text-subtle); }
.inv-stat-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.inv-stat.is-late .inv-stat-value { color: var(--jb-overdue-fg); }
@media (max-width: 575.98px) { .inv-stat-value { font-size: 1.2rem; } }
.note-box.is-late { background: var(--jb-overdue-bg); border-color: transparent; color: #7f1d1d; }
.note-box.is-late .bi { color: var(--jb-overdue-fg); }
.pay-text { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.9rem; overflow-wrap: anywhere; }

/* 21. Card payments and credit notes ----------------------------------------- */
.note-box.is-good { background: var(--jb-paid-bg); border-color: transparent; color: #14532d; }
.note-box.is-good .bi { color: var(--jb-paid-fg); }
.check-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.check-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.check-list .bi { color: var(--jb-paid-fg); margin-top: 0.15rem; flex: none; }

/* 22. Dashboard -------------------------------------------------------------- */
.dash-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; }
.dash-sub b { color: var(--jb-text); }
.dash-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.45; flex: none; }
.text-overdue { color: var(--jb-overdue-fg) !important; }
.jb-stat-link { position: relative; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.jb-stat-link:hover { box-shadow: var(--jb-shadow); }
.jb-stat-link:focus-within { outline: 2px solid var(--jb-primary); outline-offset: 2px; }
.jb-stat-link .jb-stat-label { text-decoration: none; }
.jb-stat-link .jb-stat-label:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .jb-stat-link { transition: none; } }
.job-list a.job-item { transition: background-color 0.12s ease; }
.job-list a.job-item:hover { background: var(--jb-gray-50); }
.job-list a.job-item:last-child { border-bottom: 0; }
.activity-link:hover { text-decoration: underline !important; }
.jb-table-stack.dash-attention .cell-sub { display: block; }
.dash-notes { display: grid; gap: 0.5rem; padding: 0.85rem 1.25rem 1.1rem; border-top: 1px solid var(--jb-border); }
.dash-note { display: flex; gap: 0.5rem; align-items: center; font-size: 0.875rem; color: var(--jb-text-muted); text-decoration: none; min-height: 32px; }
.dash-note:hover { color: var(--jb-text); text-decoration: underline; }
.dash-note.is-late { color: var(--jb-overdue-fg); font-weight: 600; }
.dash-card .jb-empty { padding: 1.5rem 1rem; }
.dash-card .jb-empty-icon { width: 52px; height: 52px; font-size: 1.35rem; }

/* 23. Billing --------------------------------------------------------------- */
.bill-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1.5rem; }
.bill-top > div { min-width: 0; flex: 1 1 18rem; }
.plan-card.is-yours { border-color: var(--jb-primary); box-shadow: 0 0 0 1px var(--jb-primary), var(--jb-shadow-sm); }
.plan-price { font-size: 0.95rem; }
.plan-price b { font-size: 1.85rem; letter-spacing: -0.03em; }
.billing-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; padding: 0.8rem 1rem; border-radius: var(--jb-radius); margin-bottom: 1rem; font-size: 0.9375rem; }
.billing-banner > i { font-size: 1.15rem; flex: none; }
.billing-banner .grow { flex: 1 1 14rem; min-width: 0; }
.billing-banner .grow b { margin-right: 0.25rem; }
.billing-banner.is-bad { background: var(--jb-overdue-bg); color: #7f1d1d; }
.billing-banner.is-wait { background: var(--jb-due-bg); color: #78350f; }
.billing-banner .btn { white-space: nowrap; }
.app-locked .topbar-search, .app-locked #topbarSearchToggle, .app-locked .topbar-search-row, .app-locked .jb-new-menu, .app-locked .app-fab, .app-locked #newSheet { display: none !important; }

/* 24. Account security ------------------------------------------------------- */
.setup-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: 0.08em; padding: 0.75rem 1rem; background: var(--jb-gray-100); border-radius: var(--jb-radius); word-break: break-all; user-select: all; }
.recovery-codes { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.5rem; }
.recovery-codes li { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.06em; padding: 0.6rem 0.8rem; background: var(--jb-gray-100); border-radius: var(--jb-radius-sm, 8px); text-align: center; user-select: all; }
.jb-page-header p { overflow-wrap: anywhere; }

/* 25. Privacy Policy and Terms ----------------------------------------------- */
.legal { max-width: 52rem; padding-top: 3rem; padding-bottom: 4.5rem; }
.legal-head h1 { margin: 0.5rem 0 0.75rem; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 0.875rem; color: var(--jb-text-muted); margin: 1rem 0 0.75rem; }
.legal-draft { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: var(--jb-radius); background: var(--jb-due-bg); color: #78350f; font-size: 0.9375rem; margin-bottom: 1.5rem; }
.legal-draft > i { font-size: 1.1rem; flex: none; margin-top: 0.1rem; }
.legal-toc { border: 1px solid var(--jb-border); border-radius: var(--jb-radius); padding: 1rem 1.25rem; margin: 1.5rem 0 2rem; background: var(--jb-gray-100); }
.legal-toc ol { margin: 0; padding-left: 1.25rem; columns: 2 14rem; column-gap: 2rem; }
.legal-toc li { margin: 0.2rem 0; break-inside: avoid; }
.legal-toc a { text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.legal-toc a:hover { text-decoration: underline; }
.legal-section { margin-top: 2.25rem; scroll-margin-top: 5.5rem; }
.legal-section h2 { font-size: 1.35rem; margin-bottom: 0.75rem; }
.legal-section h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem; }
.legal-section p, .legal-section li { line-height: 1.65; overflow-wrap: anywhere; }
.legal-section li { margin-bottom: 0.4rem; }

/* 15. Public site redesign: product pictures, inner pages, comparison, breadcrumbs ------------- */
.hero-v2 h1 { font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.5rem); }
.hero-badges { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-badges li { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; font-weight: 600; color: #e2e8f5; padding: 0.35rem 0.75rem; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.hero-badges .bi { color: var(--jb-accent); }
.hero-visual { position: relative; max-width: 640px; margin: 0 auto; padding-bottom: 2rem; }
.hero-visual .hero-window { margin: 0; }
.hero-visual .hero-phone { position: absolute; right: -4px; bottom: -6px; width: 30%; max-width: 190px; margin: 0; }
@media (min-width: 992px) { .hero-visual { margin: 0 0 0 auto; } .hero-visual .hero-phone { right: -24px; } }

/* A real screenshot inside a browser window */
.shot-window { margin: 0; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--jb-border); box-shadow: var(--jb-shadow-lg); }
.hero-visual .shot-window { border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.55); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--jb-gray-100); border-bottom: 1px solid var(--jb-border); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--jb-gray-300); display: block; }
.shot-bar span { margin-left: 8px; font-size: 11px; color: var(--jb-text-subtle); background: #fff; border-radius: 6px; padding: 2px 10px; }
.shot-window img { display: block; width: 100%; height: auto; }
.shot-window figcaption, .shot-phone figcaption { font-size: 0.8125rem; color: var(--jb-text-subtle); padding: 0.55rem 0.9rem; text-align: center; }

/* A real screenshot inside a phone */
.shot-phone { margin: 0; text-align: center; }
.shot-phone-frame { background: var(--jb-navy-900); border-radius: 28px; padding: 6px; box-shadow: 0 30px 50px -14px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1); }
.shot-phone-frame img { display: block; width: 100%; height: auto; border-radius: 22px; background: #fff; }
.phone-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 480px; margin: 0 auto; align-items: start; }
.phone-pair .shot-phone:nth-child(2) { margin-top: 2.5rem; }

/* Product tour rows: text on one side, picture on the other */
.tour-row { display: grid; gap: 1.75rem; align-items: center; margin-bottom: 4rem; }
.tour-row:last-child { margin-bottom: 0; }
@media (min-width: 992px) {
  .tour-row { grid-template-columns: 5fr 7fr; gap: 3.5rem; margin-bottom: 5.5rem; }
  .tour-row.is-flipped { grid-template-columns: 7fr 5fr; }
  .tour-row.is-flipped .tour-text { order: 2; }
}
.tour-step { display: inline-block; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--jb-primary); margin-bottom: 0.5rem; }
.tour-text h3 { font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.9rem); letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.tour-text .check-list { margin-top: 1.25rem; }

.problem-card { height: 100%; padding: 1.6rem; }
.problem-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1rem; background: var(--jb-accent-50); color: #c2410c; border: 1px solid #fed7aa; }
.problem-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.problem-card p { margin: 0; }
.promise-card { height: 100%; padding: 1.6rem; }
.promise-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.promise-card p { margin: 0; font-size: 0.9875rem; }

/* Inner page hero (same dark look as the home hero, shorter) */
.page-hero {
  position: relative; overflow: hidden; color: #fff; padding: 2.5rem 0 3.25rem;
  background:
    radial-gradient(800px 420px at 90% -20%, rgba(var(--jb-accent-rgb), 0.24), transparent 60%),
    radial-gradient(640px 440px at -10% 120%, rgba(var(--jb-primary-rgb), 0.5), transparent 60%),
    linear-gradient(160deg, var(--jb-navy-900) 0%, var(--jb-navy-800) 100%);
}
@media (min-width: 992px) { .page-hero { padding: 3.25rem 0 4.5rem; } }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.page-hero .lead { color: #cbd5e8; font-size: clamp(1.02rem, 1rem + 0.3vw, 1.2rem); max-width: 40rem; }
.page-hero .jb-eyebrow { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.page-hero .hero-points { margin-top: 1.5rem; }

.crumbs { margin-bottom: 1.25rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0; font-size: 0.8125rem; }
.crumbs li { color: #cbd5e8; display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 0.5rem; opacity: 0.55; }
.crumbs a { color: #e2e8f5; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: #fff; font-weight: 600; }

.feature-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.feature-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0.35rem 0.95rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff; font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.feature-jump a:hover { background: rgba(255, 255, 255, 0.18); }
.pub-section[id] { scroll-margin-top: 5rem; }

/* Pricing comparison */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--jb-border); border-radius: var(--jb-radius-lg); box-shadow: var(--jb-shadow-xs); }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--jb-border); font-size: 0.9625rem; }
.compare-table thead th { background: var(--jb-gray-50); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--jb-text-subtle); }
.compare-table tbody th { font-weight: 500; text-align: left; color: var(--jb-text); }
.compare-table th:not(:first-child), .compare-table td { text-align: center; width: 22%; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table .yes { color: var(--jb-paid-fg); font-size: 1.25rem; }
.compare-table .no { color: var(--jb-gray-400); }
@media (max-width: 575.98px) { .compare-table th, .compare-table td { padding: 0.65rem 0.5rem; font-size: 0.875rem; } .compare-table th:not(:first-child), .compare-table td { width: 4.75rem; } }

/* Example quote on trade pages */
.example-quote { padding: 1.25rem; }
.example-quote-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding-bottom: 0.75rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--jb-border); }
.example-quote-head span { color: var(--jb-text-subtle); font-size: 0.875rem; }
.example-quote-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 0.75rem; }
.example-quote-table th, .example-quote-table td { padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--jb-border); text-align: left; vertical-align: top; }
.example-quote-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--jb-text-subtle); }
.example-quote-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.example-quote-table tfoot td { border-bottom: 0; color: var(--jb-text-muted); }
.example-quote-table tfoot .total td { font-weight: 800; color: var(--jb-text); border-top: 2px solid var(--jb-text); font-size: 1rem; }
.cta-wrap { padding-top: 1rem; }
.text-subtle { color: var(--jb-text-subtle) !important; }

@media (prefers-reduced-motion: reduce) { .feature-card:hover { transform: none; } }

/* Animated-in columns start 100px to the side: never let that make the page scroll sideways */
body.layout-public main { overflow-x: clip; }

/* A link that stands on its own line needs a finger-sized target */
.tap-link { display: inline-flex; align-items: center; min-height: 40px; }

/* Bootstrap gutters wider than the 0.75rem page edge push a row past the screen on phones */
@media (max-width: 575.98px) { .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; } }

/* Tutorials page */
.tutorial-player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0b1b3a; border-radius: var(--jb-radius-lg); box-shadow: var(--jb-shadow-lg); }
.chapter-title { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--jb-text-subtle); margin: 0 0 0.5rem; font-weight: 700; }
.chapter-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chapter-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0.3rem 0.8rem; border: 1px solid var(--jb-border-strong); border-radius: 999px; background: #fff; color: var(--jb-gray-700); font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.chapter-btn:hover { border-color: var(--jb-primary); color: var(--jb-primary); background: var(--jb-primary-50); }
.chapter-btn .at { font-variant-numeric: tabular-nums; color: var(--jb-primary); font-weight: 800; }
.transcript { background: #fff; border: 1px solid var(--jb-border); border-radius: var(--jb-radius); padding: 0.25rem 1.1rem; }
.transcript summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.transcript p { color: var(--jb-text-muted); line-height: 1.75; margin: 0 0 1rem; }

.pay-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .pay-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pay-method { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.pay-method .bi { color: var(--jb-text-subtle); }
.cell-sub-text { color: var(--jb-text-muted); max-width: 22rem; overflow-wrap: anywhere; }

/* Help Centre */
.help-search-card .form-control-lg { min-height: 52px; }
.help-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.9rem; }
.help-popular-label { font-size: 0.8125rem; font-weight: 700; color: var(--jb-text-subtle); text-transform: uppercase; letter-spacing: 0.06em; }
.help-chip { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0.3rem 0.9rem; border: 1px solid var(--jb-border-strong); border-radius: 999px; background: #fff; font-size: 0.875rem; font-weight: 600; color: var(--jb-gray-700); text-decoration: none; }
.help-chip .bi { color: var(--jb-primary); }
.help-chip:hover { border-color: var(--jb-primary); background: var(--jb-primary-50); color: var(--jb-primary); }
.help-cat { margin-bottom: 1rem; scroll-margin-top: 5rem; overflow: hidden; }
.help-accordion .accordion-item { border: 0; border-top: 1px solid var(--jb-border); border-radius: 0; scroll-margin-top: 5rem; }
.help-accordion .accordion-button { padding: 1rem 1.25rem; font-weight: 600; background: #fff; box-shadow: none; }
.help-accordion .accordion-button:not(.collapsed) { background: var(--jb-primary-50); color: var(--jb-primary-hover); }
.help-accordion .accordion-button small { margin-top: 0.15rem; font-size: 0.8125rem; }
.help-accordion .accordion-body { padding: 1rem 1.25rem 1.25rem; }
.help-steps { padding-left: 1.25rem; margin: 0 0 0.5rem; display: grid; gap: 0.5rem; }
.help-tip { display: flex; gap: 0.7rem; background: var(--jb-accent-50); border: 1px solid #fed7aa; border-radius: var(--jb-radius); padding: 0.75rem 0.9rem; margin-top: 0.75rem; font-size: 0.9375rem; }
.help-tip .bi { color: #c2410c; margin-top: 0.15rem; }
.help-tip p { margin: 0; }
.help-tip p + p { margin-top: 0.35rem; }
.help-none { background: #fff; border: 1px dashed var(--jb-border-strong); border-radius: var(--jb-radius); padding: 1.25rem; text-align: center; }
.help-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.25rem; }
.help-links a { display: flex; flex-direction: column; padding: 0.6rem 0.75rem; border-radius: var(--jb-radius-sm); text-decoration: none; color: var(--jb-text); font-weight: 600; min-height: 44px; justify-content: center; }
.help-links a:hover { background: var(--jb-primary-50); color: var(--jb-primary-hover); }
.help-links small { color: var(--jb-text-subtle); font-weight: 400; }
[hidden] { display: none !important; }

/* Dashboard: what needs you, quick actions, help banner */
.dash-focus { background: #fff; border: 1px solid var(--jb-border); border-radius: var(--jb-radius-lg); box-shadow: var(--jb-shadow-xs); padding: 1.1rem 1.25rem 1.25rem; }
.dash-focus-head h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.dash-focus-head p { margin: -0.3rem 0 0.8rem; color: var(--jb-text-muted); }
.dash-focus-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.dash-focus-item { display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 0.85rem; border-radius: var(--jb-radius); background: var(--jb-gray-50); border: 1px solid var(--jb-border); }
.dash-focus-item.is-red { background: var(--jb-overdue-bg); border-color: #fecaca; }
.dash-focus-item.is-amber { background: var(--jb-due-bg); border-color: #fde68a; }
.dash-focus-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: #fff; color: var(--jb-primary); font-size: 1.15rem; }
.dash-focus-item.is-red .dash-focus-icon { color: var(--jb-overdue-fg); }
.dash-focus-item.is-amber .dash-focus-icon { color: var(--jb-due-fg); }
.dash-focus-text { flex: 1; min-width: 0; display: grid; }
.dash-focus-text b { font-size: 0.9625rem; }
.dash-focus-text span { font-size: 0.875rem; color: var(--jb-text-muted); }
@media (max-width: 575.98px) { .dash-focus-item { flex-wrap: wrap; } .dash-focus-item .btn { width: 100%; } }
.dash-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
@media (min-width: 768px) { .dash-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dash-quick a { display: flex; align-items: center; gap: 0.6rem; min-height: 52px; padding: 0.6rem 0.9rem; border: 1px solid var(--jb-border-strong); border-radius: var(--jb-radius); background: #fff; color: var(--jb-text); font-weight: 600; text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
.dash-quick a .bi { font-size: 1.25rem; color: var(--jb-primary); }
.dash-quick a:hover { border-color: var(--jb-primary); background: var(--jb-primary-50); }

.dash-help { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding: 1.1rem 1.25rem; border-radius: var(--jb-radius-lg); border: 1px solid var(--jb-primary-100); background: linear-gradient(135deg, var(--jb-primary-50), #fff); }
.dash-help-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--jb-primary); font-size: 1.5rem; border: 1px solid var(--jb-primary-100); flex: none; }
.dash-help-text { flex: 1; min-width: 14rem; }
.dash-help-text h2 { font-size: 1.05rem; margin: 0 0 0.15rem; }
.dash-help-text p { margin: 0; color: var(--jb-text-muted); }
.dash-help-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Launch offer: announcement bar, plan cards, sign-up note, billing, and the admin page */
.testing-bar { background: #fdf0c8; color: #3f2a00; border-bottom: 1px solid #e0bd5b; font-size: 0.9rem; line-height: 1.4; }
.testing-bar .container { display: flex; align-items: flex-start; justify-content: center; gap: 0.5rem; padding-top: 0.45rem; padding-bottom: 0.45rem; text-align: center; max-width: 100%; }
.testing-bar .bi { flex: none; margin-top: 0.12rem; }
.offer-bar { background: linear-gradient(90deg, #7c2d12, #c2410c 55%, #ea580c); color: #fff; font-size: 0.9375rem; }
.offer-bar .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem 1rem; padding-top: 0.55rem; padding-bottom: 0.55rem; text-align: center; }
.offer-bar-text .bi { margin-right: 0.35rem; }
.offer-bar-left { display: inline-block; padding: 0.1rem 0.6rem; margin-left: 0.15rem; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-weight: 700; white-space: nowrap; }
.offer-bar-left.is-last { background: #fff; color: #9a3412; }
.offer-bar-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0.1rem 0.9rem; border-radius: 999px; background: #fff; color: #9a3412; font-weight: 700; text-decoration: none; white-space: nowrap; }
.offer-bar-link:hover { background: #ffedd5; color: #7c2d12; }

.price-flag.is-offer { background: #16a34a; color: #fff; box-shadow: 0 4px 10px -2px rgba(22, 163, 74, 0.5); }
.price-card.has-offer { border-color: #86efac; }
.price-card.is-featured.has-offer .price-flag { background: #16a34a; color: #fff; box-shadow: 0 4px 10px -2px rgba(22, 163, 74, 0.5); }
.price-amount .was { color: var(--jb-text-subtle); font-size: 1.1rem; font-weight: 600; margin-left: 0.4rem; }
.price-offer-line { margin: 0.25rem 0 0.1rem; color: #15803d; font-weight: 600; font-size: 0.9375rem; }
.offer-note { max-width: 46rem; margin: 1.5rem auto 0; padding: 0.85rem 1.1rem; border: 1px solid #fed7aa; border-radius: var(--jb-radius); background: var(--jb-accent-50); color: #7c2d12; font-size: 0.9375rem; text-align: center; }
.signup-offer { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.75rem; padding: 0.7rem 0.9rem; border-radius: var(--jb-radius); border: 1px solid #fed7aa; background: var(--jb-accent-50); color: #7c2d12; font-size: 0.9rem; text-align: left; }
.signup-offer .bi { margin-top: 0.15rem; }
.signup-referral { margin: 0 0 1.25rem; }
.refer-link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.refer-link-row .form-control { flex: 1 1 14rem; min-width: 0; font-weight: 600; }
.refer-share { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.refer-share .btn { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }
.refer-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.refer-stats b { display: block; font-size: 1.6rem; line-height: 1.15; }
.refer-stats span { display: block; color: var(--jb-gray-700); font-size: 0.875rem; }
.plan-price .was { color: var(--jb-text-subtle); font-size: 0.95rem; margin-left: 0.25rem; }

.offer-status { border-left: 5px solid var(--jb-gray-300); }
.offer-status.is-open { border-left-color: #16a34a; }
.offer-status-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; }
.offer-status-action form { margin: 0; }
.offer-pill { display: inline-block; padding: 0.25rem 0.8rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.02em; }
.offer-pill.is-on { background: var(--jb-paid-bg); color: var(--jb-paid-fg); }
.offer-pill.is-wait { background: var(--jb-due-bg); color: var(--jb-due-fg); }
.offer-pill.is-off { background: var(--jb-draft-bg); color: var(--jb-draft-fg); }
.offer-meter { height: 10px; border-radius: 999px; background: var(--jb-gray-200); overflow: hidden; }
.offer-meter-fill { height: 100%; background: linear-gradient(90deg, #16a34a, #4ade80); border-radius: 999px; transition: width 0.3s ease; }
.offer-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; margin-top: 1rem; }
@media (min-width: 768px) { .offer-numbers { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.offer-numbers div { display: grid; }
.offer-numbers b { font-size: 1.35rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.offer-numbers span { font-size: 0.8125rem; color: var(--jb-text-subtle); }

/* Guides */
.guide-meta { color: #cbd5e8; font-size: 0.9rem; }
.guide-body { font-size: 1.0625rem; }
.guide-body .legal-section { margin-top: 2.25rem; }
.guide-body p { line-height: 1.75; }
.guide-list { padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.guide-figure { margin: 1.5rem 0; }
.guide-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--jb-gray-200, #dcd6cb); border-radius: var(--jb-radius); box-shadow: 0 6px 20px rgba(20, 40, 32, 0.12); background: #fff; }
.guide-figure figcaption { margin-top: 0.6rem; font-size: 0.9375rem; color: var(--jb-gray-700); }
.guide-notice { display: flex; gap: 0.65rem; padding: 0.8rem 1rem; border: 1px solid var(--jb-primary-100); background: var(--jb-primary-50); border-radius: var(--jb-radius); font-size: 0.9375rem; color: var(--jb-gray-700); margin-bottom: 1.5rem; }
.guide-notice .bi { color: var(--jb-primary); margin-top: 0.2rem; flex: none; }
.guide-toc { border: 1px solid var(--jb-border); border-radius: var(--jb-radius); background: var(--jb-gray-50); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.guide-toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.15rem; }
.guide-toc a { display: inline-flex; align-items: center; min-height: 32px; }
.guide-cta { margin-top: 3rem; padding: 1.75rem; border-radius: var(--jb-radius-lg); background: linear-gradient(135deg, var(--jb-navy-900), var(--jb-navy-700)); color: #fff; }
.guide-cta h2 { color: #fff; }
.guide-cta p { color: #cbd5e8; }
.guide-cta .btn + .btn { margin-left: 0.5rem; }
.guide-cta .btn-light-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
@media (max-width: 575.98px) { .guide-cta .btn { width: 100%; } .guide-cta .btn + .btn { margin-left: 0; margin-top: 0.5rem; } }

/* Card titles that are links: the whole card is clickable, and the link itself is a comfortable size to tap */
.feature-card h3 > a.stretched-link { display: inline-block; min-height: 32px; padding-block: 4px; line-height: 1.35; }
