:root {
  /* Navy + grey, pixel-sampled from the real logo (site/assets/logo.jpg) -- see that
     file's CLAUDE.md entry for how. Matches the public site's palette exactly. */
  --navy: #211f3a;
  --navy-dark: #14132a;
  --grey: #6d6d6d;
  --grey-light: #a7a7a7;
  --bg: #f4f6f8;
  --card: #ffffff;
  --border: #e0e4e9;
  --text: #182433;
  --text-dim: #5b6b7c;
  --danger: #c0392b;
  --danger-bg: #fbeae8;
  --success: #1e7a3d;
  --success-bg: #e7f5ec;
  --warn: #b96f13;
  --warn-bg: #fbf0de;
  --info: #1d5fa8;
  --info-bg: #e7f1fb;
  --radius: 8px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
a { color: var(--info); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; }
.hidden { display: none !important; }

/* ---- Topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--navy);
  color: #fff;
  padding: .75rem 1.25rem;
  flex-wrap: wrap;
}
.topbar-brand { display: flex; align-items: center; }
.topbar-logo { height: 40px; width: auto; border-radius: 8px; display: block; }
.topbar-name { color: #fff; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
.topbar-name:hover { color: #fff; }
.topbar-nav { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
.nav-link { color: #d7e0ea; padding: .5rem .75rem; border-radius: var(--radius); font-size: .9rem; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: var(--grey); color: #fff; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.topbar-user { font-size: .85rem; color: #b9c6d6; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; padding: .4rem .6rem; border-radius: var(--radius); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; order: 1; }
  .topbar-nav { display: none; width: 100%; order: 3; }
  .topbar.nav-open .topbar-nav { display: flex; flex-direction: column; }
  .topbar-actions { order: 2; }
}

/* ---- Layout ---- */
.page { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.4rem; }
.section { margin-bottom: 1.75rem; }

/* ---- Cards & KPIs ---- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.kpi-tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.kpi-tile .kpi-label { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em; }
.kpi-tile .kpi-value { font-size: 1.6rem; font-weight: 700; margin-top: .2rem; }
.kpi-tile .kpi-sub { font-size: .78rem; color: var(--text-dim); margin-top: .15rem; }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .85rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .8rem; font-weight: 600; color: var(--text-dim); }
input, select, textarea {
  font: inherit; padding: .55rem .65rem; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
textarea { resize: vertical; min-height: 4.5rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--navy); color: #fff; border: none; border-radius: var(--radius);
  padding: .55rem 1rem; min-height: 44px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--navy-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-accent { background: var(--navy); color: #fff; }
.btn-accent:hover { background: var(--navy-dark); }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #9d3123; }
/* Deliberately under the 44px floor .btn keeps everywhere else: this is a mouse-driven
   staff tool, and forcing every dense inline table action (filter pills, per-row Open/
   Delete) up to 44px would blow out row height across every table in the app for a
   touch target this surface doesn't need. 36px is still a real improvement over the
   ~28px it shipped at. */
.btn-sm { padding: .35rem .65rem; min-height: 36px; font-size: .8rem; }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
th, td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .88rem; }
th { background: #eef1f5; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); }
tbody tr:hover { background: #fafbfc; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap table { border: none; border-radius: 0; }

/* ---- Line items (quote / invoice editor) ---- */
.line-items-table th, .line-items-table td { padding: .4rem .5rem; font-size: .85rem; }
.line-items-table input { padding: .4rem .5rem; min-height: 36px; }
.line-items-total {
  display: flex; justify-content: flex-end; gap: .75rem; align-items: baseline;
  margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--border); font-size: 1rem;
}
.line-items-total strong { font-size: 1.2rem; }

/* ---- Status badges ---- */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-new, .badge-scheduled { background: var(--info-bg); color: var(--info); }
.badge-quoted, .badge-in_progress { background: var(--warn-bg); color: var(--warn); }
.badge-won, .badge-completed, .badge-paid { background: var(--success-bg); color: var(--success); }
.badge-lost, .badge-cancelled, .badge-overdue { background: var(--danger-bg); color: var(--danger); }
.badge-invoiced, .badge-unpaid { background: #ece7fb; color: #5b3fa8; }

/* ---- Empty / loading states ---- */
.ui-state { padding: 2.5rem 1rem; text-align: center; color: var(--text-dim); }
.ui-state__body { font-size: .92rem; }

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 380px; }
.login-logo { display: block; height: 72px; width: auto; margin: 0 auto 1.25rem; }
.login-card .field { margin-bottom: .85rem; }
.login-error { color: var(--danger); font-size: .85rem; min-height: 1.2em; margin-top: .5rem; }

/* ---- Blocked screen ---- */
.blocked-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--bg); }
.blocked-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 420px; text-align: center; }

/* ---- Modal ---- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(33,31,58,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.modal-card { background: var(--card); border-radius: var(--radius); padding: 1.5rem; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

@media (max-width: 600px) {
  .page { padding: 1rem .85rem 2.5rem; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  .table-wrap tr { border-bottom: 1px solid var(--border); padding: .5rem 0; }
  .table-wrap td { border: none; padding: .25rem .75rem; }
  .table-wrap td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; color: var(--text-dim); text-transform: uppercase; }
}

/* ---- Calendar ---- */
.calendar-grid { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.calendar-weekdays, .calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays div { padding: .5rem; text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); background: #eef1f5; }
.calendar-day {
  min-height: 92px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: .35rem; display: flex; flex-direction: column; gap: .2rem;
}
.calendar-week > .calendar-day:last-child { border-right: none; }
.calendar-day.outside { background: var(--bg); }
.calendar-day.today { background: #eef4fb; }
.calendar-day-num { font-size: .8rem; font-weight: 600; color: var(--text-dim); }
.calendar-day.outside .calendar-day-num { color: #c3c9d1; }
.calendar-day.today .calendar-day-num { color: var(--navy); }
.calendar-jobs { display: flex; flex-direction: column; gap: .2rem; max-height: 88px; overflow-y: auto; }
.calendar-job-pill {
  display: block; font-size: .72rem; padding: .15rem .4rem; border-radius: 4px; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600;
}

@media (max-width: 700px) {
  .calendar-day { min-height: 68px; padding: .25rem; }
  .calendar-weekdays div { font-size: .62rem; padding: .35rem .1rem; }
  .calendar-job-pill { font-size: .65rem; }
}
.line-items-add { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.line-items-add select { max-width: 100%; }

/* ---- Settings ---- */
.settings-hint { font-size: .82rem; color: var(--text-dim); margin: .25rem 0 .75rem; }
.settings-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }
.settings-row { display: flex; gap: .5rem; align-items: center; }
.settings-row input { flex: 1; min-width: 0; }
.settings-add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.settings-add input { flex: 1 1 180px; min-width: 0; }
.settings-brand { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.settings-logo-preview { min-width: 160px; min-height: 64px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: var(--radius); padding: .5rem; background: var(--bg); }
.settings-logo-preview img { max-height: 80px; max-width: 240px; display: block; }
.settings-brand-controls { display: flex; flex-direction: column; gap: .6rem; }
.settings-brand-controls input[type="color"] { width: 64px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 6px; }
.settings-save { display: flex; gap: .75rem; align-items: center; margin: 0 0 1.75rem; flex-wrap: wrap; }

/* ---- Sign in: product wordmark, forgot-password link ---- */
.login-wordmark { text-align: center; font-weight: 800; font-size: 1.45rem; color: var(--navy); margin: 0 0 1.25rem; letter-spacing: -.01em; }
.login-wordmark span { color: var(--grey); }
.login-link { display: block; margin: .75rem auto 0; background: none; border: 0; color: var(--info); font: inherit; font-size: .88rem; cursor: pointer; padding: .5rem; min-height: 44px; }
.login-link:hover { text-decoration: underline; }
.login-link:disabled { color: var(--text-dim); cursor: default; }
.login-note { margin-top: .5rem; font-size: .85rem; color: var(--success); text-align: center; }

/* ---- Front door (index.html): Playbook4Trades landing page with the sign-in card ---- */
.fd { background: var(--card); }
.fd-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.fd-top { border-bottom: 1px solid var(--border); background: var(--card); position: sticky; top: 0; z-index: 5; }
.fd-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.fd-brand { font-weight: 800; font-size: 1.2rem; color: var(--navy); letter-spacing: -.01em; }
.fd-brand span { color: var(--grey); }
.fd-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.fd-nav a { color: var(--text); padding: .6rem .7rem; font-size: .92rem; border-radius: var(--radius); }
.fd-nav a:hover { background: var(--bg); }
.fd-hero { background: var(--bg); padding: 3rem 0 3.5rem; }
.fd-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.fd-eyebrow { color: var(--text-dim); font-size: .9rem; margin: 0 0 .75rem; }
.fd-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; color: var(--navy); margin: 0 0 1rem; letter-spacing: -.02em; }
.fd-lead { font-size: 1.08rem; line-height: 1.6; color: var(--text); margin: 0 0 1.5rem; max-width: 36em; }
.fd-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fd-cta .btn { min-height: 46px; display: inline-flex; align-items: center; padding: 0 1.25rem; }
.fd-small { font-size: .88rem; color: var(--text-dim); margin: 0; }
.fd-signin { max-width: none; box-shadow: 0 10px 30px rgba(20, 19, 42, .08); }
.fd-signin-title { font-size: 1.2rem; color: var(--navy); margin-bottom: 1rem; }
.fd-signed-in p { margin: 0 0 1rem; }
.fd-section { padding: 3.5rem 0; }
.fd-section h2 { font-size: 1.6rem; color: var(--navy); margin-bottom: 1.5rem; }
.fd-alt { background: var(--bg); }
.fd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.fd-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; background: var(--card); }
.fd-card h3 { font-size: 1.02rem; color: var(--navy); margin-bottom: .4rem; }
.fd-card p { margin: 0; color: var(--text-dim); line-height: 1.55; font-size: .94rem; }
.fd-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .9rem; font-size: 1.02rem; line-height: 1.55; max-width: 44em; }
.fd-price { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.fd-price-card { border: 2px solid var(--navy); border-radius: 12px; padding: 1.5rem 2rem; text-align: center; min-width: 240px; }
.fd-price-amount { font-size: 2.6rem; font-weight: 800; color: var(--navy); line-height: 1; }
.fd-price-per { color: var(--text-dim); margin: .4rem 0 1.1rem; }
.fd-q { border-bottom: 1px solid var(--border); padding: .9rem 0; max-width: 46em; }
.fd-q summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.fd-q p { margin: .6rem 0 0; color: var(--text-dim); line-height: 1.6; }
.fd-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; font-size: .9rem; color: var(--text-dim); }
@media (max-width: 760px) {
  .fd-hero { padding: 2rem 0 2.5rem; }
  .fd-hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .fd-nav a:not(.fd-signin-link) { display: none; }
  .fd-section { padding: 2.5rem 0; }
}

/* ---- Front door F3: Book a demo form ---- */
.fd-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2.5rem; align-items: start; }
.fd-demo-form { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: var(--card); }
.fd-demo-form textarea { width: 100%; font: inherit; }
.fd-consent { display: flex; gap: .6rem; align-items: flex-start; margin: .5rem 0 1rem; font-size: .92rem; line-height: 1.5; }
.fd-consent input { margin-top: .25rem; width: 18px; height: 18px; flex: 0 0 auto; }
.fd-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fd-demo-status { margin-top: .75rem; font-size: .92rem; min-height: 1.2em; }
.fd-demo-ok { color: var(--success); }
.fd-demo-error { color: var(--danger); }
.fd-team-link { color: var(--text-dim); }
@media (max-width: 760px) { .fd-demo { grid-template-columns: 1fr; gap: 1.25rem; } }
.fd-legal { max-width: 46em; }
.fd-legal h1 { color: var(--navy); font-size: 1.9rem; margin-bottom: .5rem; }
.fd-legal h2 { font-size: 1.15rem; margin: 1.75rem 0 .4rem; }
.fd-legal p { line-height: 1.65; }
.req-reach { display: flex; flex-direction: column; gap: .2rem; }
.req-work { display: flex; flex-direction: column; gap: .4rem; min-width: 200px; }
.req-work textarea { width: 100%; font: inherit; }
.req-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
/* Jump links (#demo, #signin) land below the sticky top bar, not under it. */
.fd section[id], .fd form[id] { scroll-margin-top: 76px; }

/* ---- Get ready checklist (dashboard, owners) ---- */
.setup-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.setup-count { font-size: .88rem; color: var(--text-dim); }
.setup-bar { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: .25rem 0 1rem; }
.setup-bar span { display: block; height: 100%; background: var(--success); border-radius: 99px; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.setup-list li { display: flex; gap: .75rem; align-items: flex-start; }
.setup-tick { width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: #fff; margin-top: 1px; }
.setup-done .setup-tick { background: var(--success); border-color: var(--success); }
.setup-done span:not(.setup-tick) { color: var(--text-dim); text-decoration: line-through; }
.setup-list a { font-weight: 600; }
.setup-hint { font-size: .85rem; color: var(--text-dim); margin-top: .1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* ---- Playbook team side navigation (2026-11-18) -------------------------------------------
   Same shape as the Tshana Kitchen and Playbook 420 platform admins: a section nav beside the
   page on wide screens, a sideways strip on phones. Shown only after the platformAdmins check
   (js/team-shell.js). */
.team-shell { display: block; }
.team-nav[hidden] { display: none !important; }
.team-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: .25rem; padding: .4rem 1rem; overflow-x: auto; background: var(--card); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.team-nav::-webkit-scrollbar { display: none; }
.team-nav-head { display: none; }
.team-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .5rem; min-height: 40px; padding: .45rem .8rem; color: var(--text-dim); border-radius: var(--radius); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.team-link:hover { color: var(--navy); background: var(--bg); }
.team-link:focus-visible { outline: 2px solid var(--info); outline-offset: 1px; }
.team-link[aria-current="page"] { color: var(--navy); background: var(--info-bg); box-shadow: inset 0 -2px var(--navy); }
.team-count { min-width: 22px; margin-left: auto; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.team-count.warn { color: var(--warn); background: var(--warn-bg); }
.team-count.quiet { color: var(--text-dim); background: var(--bg); }
.team-count[hidden] { display: none; }

.team-lede { margin: -.5rem 0 1rem; }
.team-kpi-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s ease; }
.team-kpi-link:hover { border-color: var(--navy); color: inherit; }
.team-kpi-link:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.team-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.team-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.team-card-head h2 { font-size: 1rem; }
.team-card-head a { font-size: .85rem; font-weight: 600; }
.team-rows { margin: 0; padding: 0; list-style: none; }
.team-rows li + li { border-top: 1px solid var(--border); }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 52px; padding: .55rem .25rem; color: inherit; text-decoration: none; }
.team-row:hover { background: var(--bg); color: inherit; }
.team-row-main { display: grid; min-width: 0; }
.team-row-main strong, .team-row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row-main small { color: var(--text-dim); font-size: .8rem; }
.team-row .badge { flex: 0 0 auto; text-transform: capitalize; }
.team-empty { padding: .9rem .25rem; color: var(--text-dim); font-size: .9rem; }

@media (min-width: 1024px) {
  .team-nav-on .team-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; max-width: 1440px; margin: 0 auto; padding: 0 1.25rem; }
  .team-nav-on .team-shell > .page { max-width: none; margin: 0; padding-left: 0; padding-right: 0; }
  .team-nav { top: 1.25rem; flex-direction: column; gap: .15rem; align-self: start; margin-top: 1.5rem; padding: 0 0 .75rem; overflow: visible; border: 1px solid var(--border); border-radius: 12px; }
  .team-nav-head { display: grid; gap: 1px; margin-bottom: .5rem; padding: .8rem 1rem; color: #fff; background: var(--navy); border-radius: 11px 11px 0 0; }
  .team-nav-head span { font-size: .95rem; font-weight: 700; }
  .team-nav-head small { color: #b9c6d6; font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .team-link { display: flex; margin: 0 .5rem; }
  .team-link[aria-current="page"] { box-shadow: inset 3px 0 var(--navy); }
  .team-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
