/* ==========================================================================
   Magothy Office — application styles
   All colours / radii / fonts are CSS variables in :root so the whole back
   office can be re-themed (e.g. to match the public website) from one place.
   ========================================================================== */

/* Self-hosted fonts (same files as magothyroofing.com) */
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700 800; font-display: swap; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/inter-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600 700; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }

:root {
  /* brand */
  --brand: #0d9488;
  --brand-d: #0f766e;
  --brand-l: #ccfbf1;
  --brand-2: #14b8a6;
  --brand-bg: #f0fdfa;
  --navy: #0f172a;
  --dark: #0a0a0a;

  /* neutrals */
  --ink: #111111;
  --text: #1f2937;
  --muted: #4b5563;
  --line: #e2e8f0;
  --line-2: #eef2f6;
  --bg: #f8fafc;
  --surface: #ffffff;
  --side-bg: #0a0a0a;

  /* status */
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #059669;
  --info: #2563eb;

  /* shape & type */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  --glow: 0 8px 24px rgba(13, 148, 136, .28);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .22);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --side-w: 248px;
  --top-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0; line-height: 1.25; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 650; }
a { color: var(--brand-d); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .75em; }
img { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.ic { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.tiny { font-size: .8rem; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.mt { margin-top: 1.5rem; }
.pad { padding: 1rem 1.25rem; margin: 0; }
.inline { display: inline; margin: 0; }
.stack { display: grid; gap: 1rem; }
.stack-lg { display: grid; gap: 1.25rem; align-content: start; }
.text-danger { color: var(--danger); }
.yes { color: var(--ok); }
.prewrap { white-space: pre-wrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ── shell ─────────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--side-w); background: var(--side-bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; overflow-y: auto; }
.brand { display: block; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-2); text-align: center; }
.brand:hover { text-decoration: none; }
.brand img { width: 150px; height: auto; margin: 0 auto; }
.brand-sub { display: block; margin-top: 4px; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.nav { padding: 10px 12px; flex: 1; }
.nav-group { margin: 16px 10px 6px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: #475569; font-weight: 500; font-size: .93rem; }
.nav-link:hover { background: #f1f5f9; color: var(--ink); text-decoration: none; }
.nav-link.active { background: var(--brand-bg); color: var(--brand-d); font-weight: 650; }
.nav-link.active .ic { color: var(--brand); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.nav-link.linklike { width: 100%; padding: 8px 12px; }
.sidebar-foot { padding: 10px 12px 16px; border-top: 1px solid var(--line-2); }
.scrim { display: none; }
.main { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 9px; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: #f1f5f9; color: var(--ink); text-decoration: none; }
.search-trigger { display: flex; align-items: center; gap: 10px; flex: 0 1 440px; min-width: 0; width: 440px; padding: 8px 12px; border: 1px solid var(--line); background: #f8fafc; border-radius: 10px; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; }
.search-trigger:hover { border-color: #cbd5e1; background: #fff; }
.search-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: 600 .7rem/1 var(--font); border: 1px solid var(--line); border-bottom-width: 2px; background: #fff; border-radius: 5px; padding: 3px 6px; color: var(--muted); }
.timer-chip { display: inline-flex; align-items: center; gap: 8px; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; font-weight: 650; font-variant-numeric: tabular-nums; border-radius: 999px; padding: 5px 12px; font-size: .88rem; }
.timer-chip:hover { text-decoration: none; background: #d1fae5; }
.timer-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.me { display: inline-flex; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; }
.page { padding: 26px 28px 40px; max-width: 1400px; width: 100%; margin: 0 auto; flex: 1; }
.page-foot { padding: 14px 28px; color: #94a3b8; font-size: .8rem; text-align: center; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--text); font-size: .92rem; }
.dropdown-menu a:hover { background: #f1f5f9; text-decoration: none; }

/* ── page head ─────────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.crumb { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg a { padding: 7px 12px; color: var(--muted); font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.seg a.on { background: var(--brand-bg); color: var(--brand-d); }
.seg a:hover { text-decoration: none; background: #f8fafc; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-d); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: #fef2f2; border-color: #fecaca; }
.btn-link { background: none; color: var(--brand-d); padding-left: 6px; padding-right: 6px; }
.btn-sm { padding: 6px 11px; font-size: .84rem; border-radius: 8px; }
.btn-block { width: 100%; padding: 11px 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ── flash ─────────────────────────────────────────────────────────────── */
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.flash-x { background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 0; display: grid; }
.flash-x:hover { opacity: 1; }

/* ── cards ─────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head a { font-size: .88rem; font-weight: 600; }
.card-pad { padding: 16px 18px; }
.card-foot { padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: .88rem; }
.count { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 4px; background: #f1f5f9; color: var(--muted); border-radius: 999px; font-size: .75rem; font-weight: 700; text-align: center; }
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty h3 { margin: 12px 0 4px; color: var(--ink); }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #ecfdf5; border-color: #a7f3d0; }
.banner .btn { margin-left: auto; }

/* ── tabs / toolbar ────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 9px 14px; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--brand-d); border-bottom-color: var(--brand); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.search-box { position: relative; flex: 1 1 240px; max-width: 360px; }
.search-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.search-box input, .search-box input[type="search"] { padding-left: 34px; }
.toolbar select { width: auto; max-width: 200px; }

/* ── tables ────────────────────────────────────────────────────────────── */
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; padding: 10px 16px; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.right, .table td.right { text-align: right; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot td { background: #fafbfd; border-top: 1px solid var(--line); border-bottom: 0; }
.table.rowlink tbody tr[data-href] { cursor: pointer; }
.table.rowlink tbody tr[data-href]:hover { background: #f8fafc; }
.table.compact td, .table.compact th { padding: 8px 14px; }
.th-sort { color: inherit; }
.th-sort:hover, .th-sort.sorted { color: var(--ink); text-decoration: none; }
.w-check { width: 44px; padding-right: 0 !important; }
tr.is-done td { opacity: .55; }
tr.is-done td a.primary { text-decoration: line-through; }
a.primary { font-weight: 650; color: var(--ink); }
a.primary:hover { color: var(--brand-d); }
.usr { display: inline-flex; align-items: center; gap: 7px; }
.tick { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #cbd5e1; background: #fff; color: transparent; display: inline-grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.tick:hover { border-color: var(--brand); }
.tick.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap; font-size: .88rem; }
.pager nav { display: flex; gap: 4px; align-items: center; }
.page-btn { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #fff; font-weight: 600; font-size: .85rem; }
.page-btn:hover { text-decoration: none; background: #f8fafc; }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn.disabled { opacity: .4; pointer-events: none; }
.page-gap { color: var(--muted); padding: 0 2px; }

/* ── badges, pills, tags ───────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 650; white-space: nowrap; line-height: 1.5; }
.b-gray { background: #f1f5f9; color: #475569; }
.b-green { background: #dcfce7; color: #166534; }
.b-blue { background: #dbeafe; color: #1e40af; }
.b-amber { background: #fef3c7; color: #92400e; }
.b-red { background: #fee2e2; color: #991b1b; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: color-mix(in srgb, var(--pc) 14%, #fff); color: color-mix(in srgb, var(--pc) 75%, #000); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 6px; font-size: .78rem; font-weight: 600; background: color-mix(in srgb, var(--tc) 13%, #fff); color: color-mix(in srgb, var(--tc) 80%, #000); }
.tag-x { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; opacity: .6; display: grid; }
.tag-x:hover { opacity: 1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px 4px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f1f5f9; color: #475569; font-size: .72rem; font-weight: 600; }
.chip-blue { background: #dbeafe; color: #1e40af; }

/* ── forms ─────────────────────────────────────────────────────────────── */
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=password], input[type=search], input[type=time], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: .93rem; transition: border-color .15s, box-shadow .15s;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 6 6 11 1'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .18); }
input::placeholder, textarea::placeholder { color: #94a3b8; }
label { display: block; font-size: .82rem; font-weight: 650; color: #334155; margin-bottom: 5px; }
.req { color: var(--danger); }
.hint { display: block; color: var(--muted); margin-top: 4px; font-size: .8rem; }
.form-card { padding: 22px 24px 20px; max-width: 980px; }
.form-card h2 { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px 16px; }
.form-section { margin: 10px 0 -2px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.form-grid > .form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.span-1 { grid-column: span 1; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; } .span-10 { grid-column: span 10; } .span-11 { grid-column: span 11; } .span-12 { grid-column: span 12; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-2); }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: .93rem; color: var(--text); margin: 0; padding: 9px 0; cursor: pointer; }
label.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.money-in { position: relative; }
.money-in > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.money-in input { padding-left: 26px; }

/* relation picker */
.picker { position: relative; }
.picker-input { padding-right: 32px; }
.picker-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #94a3b8; cursor: pointer; display: none; padding: 4px; }
.picker.has-value .picker-clear { display: grid; }
.picker-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60; max-height: 260px; overflow: auto; display: none; }
.picker.open .picker-menu { display: block; }
.picker-opt { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--text); }
.picker-opt small { display: block; color: var(--muted); font-size: .78rem; }
.picker-opt:hover, .picker-opt.hi { background: var(--brand-bg); }
.picker-empty { padding: 10px 12px; color: var(--muted); font-size: .88rem; }

/* ── detail page ───────────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.col-main, .col-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; min-width: 0; }
.dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; padding: 6px 18px 12px; column-gap: 28px; }
.dl-row { padding: 9px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.dl-row.wide { grid-column: 1 / -1; }
.dl dt { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.dl dd { margin: 0; word-break: break-word; }

/* timeline & panels */
.composer { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: grid; gap: 8px; }
.composer-row { display: flex; gap: 8px; justify-content: space-between; }
.composer-row select { width: auto; }
.timeline { padding: 6px 18px 12px; }
.tl { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.tl:last-child { border-bottom: 0; }
.tl-ic { width: 26px; height: 26px; border-radius: 50%; background: #f1f5f9; color: var(--muted); display: grid; place-items: center; flex: none; margin-top: 1px; }
.tl-call .tl-ic { background: #dbeafe; color: #1d4ed8; } .tl-email .tl-ic { background: #ede9fe; color: #6d28d9; } .tl-meeting .tl-ic { background: #fef3c7; color: #b45309; } .tl-note .tl-ic { background: #ccfbf1; color: var(--brand-d); }
.tl-body { min-width: 0; flex: 1; }
.tl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.tl-text { margin-top: 2px; word-break: break-word; }
.timeline.slim { padding-top: 2px; }
.task-list { padding: 4px 18px 8px; }
.task-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.task-list li:last-child { border-bottom: 0; }
.task-list li.is-done a { text-decoration: line-through; color: var(--muted); }
.task-list .tick { margin-top: 2px; }
.task-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; margin-top: 1px; }
.quick-add { display: flex; gap: 6px; padding: 12px 18px 16px; }
.quick-add input[type=text] { flex: 1; min-width: 0; }
.quick-add input[type=date] { width: 138px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; padding: 14px 18px 6px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #f1f5f9; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .65); color: #fff; cursor: pointer; display: none; place-items: center; padding: 0; }
.thumb:hover .thumb-x { display: grid; }
.file-list { padding: 8px 18px; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: .9rem; }
.file-list a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload { display: flex; align-items: center; gap: 10px; padding: 12px 18px 16px; flex-wrap: wrap; }
.file-names { font-size: .8rem; }

/* ── dashboard ─────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); color: inherit; transition: box-shadow .15s, transform .15s; }
.stat:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-label { display: block; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat-value { display: block; font-size: 1.85rem; font-weight: 700; color: var(--ink); margin: 4px 0 2px; font-family: var(--font-head); letter-spacing: -.02em; }
.stat-sub { display: block; font-size: .82rem; color: var(--muted); }
.stat-warn { border-color: #fed7aa; background: #fffbf5; }
.stat-warn .stat-value { color: #c2410c; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #eef2f6; stroke-width: 1; }
.chart .axis { fill: #94a3b8; font-size: 11px; font-family: var(--font); }
.funnel { display: grid; gap: 9px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 110px; gap: 12px; align-items: center; font-size: .88rem; }
.funnel-name { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel-name i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.funnel-bar { height: 9px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.funnel-bar b { display: block; height: 100%; border-radius: 99px; }
.funnel-num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.agenda li a { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); color: inherit; }
.agenda li:last-child a { border-bottom: 0; }
.agenda li a:hover { background: #f8fafc; text-decoration: none; }
.ag-date { width: 40px; text-align: center; flex: none; }
.ag-date b { display: block; font-size: 1.15rem; line-height: 1.1; color: var(--ink); }
.ag-date small { color: var(--muted); font-size: .7rem; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.ag-body { flex: 1; min-width: 0; display: grid; }
.ag-body small { line-height: 1.35; }

/* ── kanban ────────────────────────────────────────────────────────────── */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; min-height: 60vh; }
.kcol { flex: 0 0 290px; background: #eceff4; border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.kcol-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); font-size: .9rem; flex: 1; min-width: 0; }
.kcol-title i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); flex: none; }
.kcol-count { background: #fff; border-radius: 999px; padding: 0 8px; font-size: .75rem; font-weight: 700; color: var(--muted); }
.kcol-sum { font-size: .78rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.kcol-body { padding: 4px 10px 10px; overflow-y: auto; display: grid; gap: 9px; align-content: start; min-height: 60px; flex: 1; }
.kcol-body.over { background: rgba(13, 148, 136, .1); border-radius: 10px; outline: 2px dashed var(--brand); outline-offset: -4px; }
.kcol-empty { text-align: center; color: #94a3b8; font-size: .82rem; padding: 18px 0; }
.kcol-add { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; margin: 0 10px 10px; color: var(--muted); font-weight: 600; font-size: .85rem; border-radius: 9px; }
.kcol-add:hover { background: rgba(255, 255, 255, .7); text-decoration: none; color: var(--brand-d); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; box-shadow: var(--shadow-sm); cursor: grab; }
.kcard:hover { box-shadow: var(--shadow); }
.kcard.dragging { opacity: .45; }
.kcard-title { display: block; font-weight: 650; color: var(--ink); line-height: 1.3; }
.kcard-sub { color: var(--muted); font-size: .82rem; margin-top: 3px; }
.kcard-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: .88rem; }
.kcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ── calendar ──────────────────────────────────────────────────────────── */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.cal-nav-l { display: flex; align-items: center; gap: 6px; }
.cal-nav h2 { min-width: 150px; text-align: center; font-size: 1.1rem; }
.cal-filter select { width: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal-dow { padding: 8px; text-align: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); background: #fafbfd; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 104px; padding: 4px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #fafbfd; }
.cal-day.out .cal-daynum a, .cal-day.out .cal-daynum { color: #b6c0cc; }
.cal-daynum { font-size: .82rem; font-weight: 650; padding: 2px 4px; color: var(--muted); }
.cal-daynum a { color: inherit; }
.cal-day.today .cal-daynum a, .cal-day.today .cal-daynum { color: #fff; }
.cal-day.today .cal-daynum { display: inline-block; align-self: flex-start; background: var(--brand); border-radius: 999px; min-width: 24px; text-align: center; padding: 2px 6px; }
.cal-item { display: block; font-size: .74rem; line-height: 1.3; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; font-weight: 500; }
.cal-item:hover { text-decoration: none; filter: brightness(1.08); }
.cal-item b { font-weight: 700; }
.ev-teal { background: #0d9488; } .ev-blue { background: #2563eb; } .ev-navy { background: #1e3a5f; } .ev-purple { background: #7c3aed; }
.ev-amber { background: #d97706; } .ev-gray { background: #64748b; } .ev-task { background: #fff; color: #334155 !important; border: 1px dashed #94a3b8; }
.cal-more { font-size: .72rem; color: var(--muted); padding: 0 6px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 18px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ── command palette ───────────────────────────────────────────────────── */
.cmdk { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.cmdk-box { width: min(620px, 92vw); background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-input input { border: 0; box-shadow: none !important; padding: 16px 0; font-size: 1.02rem; }
.cmdk-results { max-height: 50vh; overflow: auto; padding: 6px; }
.cmdk-hint { padding: 22px; text-align: center; color: var(--muted); }
.cmdk-group { padding: 8px 10px 3px; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: #94a3b8; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--text); }
.cmdk-item:hover, .cmdk-item.hi { background: var(--brand-bg); text-decoration: none; }
.cmdk-item small { color: var(--muted); margin-left: auto; }

/* ── login / errors ────────────────────────────────────────────────────── */
body.bare { background: linear-gradient(160deg, #f0fdfa 0%, #f4f6f9 55%, #e8eef6 100%); min-height: 100vh; }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 34px 32px 26px; text-align: center; }
.login-card form { text-align: left; margin-top: 18px; }
.login-logo { width: 190px; margin: 0 auto 12px; }
.login-card h1 { font-size: 1.35rem; }
.login-card > p.muted { margin-top: 6px; }
.login-foot { margin: 18px 0 0; font-size: .82rem; color: var(--muted); }
.login-copy { margin-top: 18px; font-size: .8rem; color: #94a3b8; }
.error-page { text-align: center; padding: 90px 20px; }
.error-code { font-size: 5rem; font-weight: 800; color: var(--brand); letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }

/* ── modal ─────────────────────────────────────────────────────────────── */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 120; display: grid; place-items: center; padding: 20px; }
.modal { width: min(420px, 100%); background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 24px 24px 18px; }
.modal-msg { margin: 0 0 18px; font-size: 1.02rem; color: var(--ink); line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ── misc helpers ──────────────────────────────────────────────────────── */
.h1-sub { font-weight: 500; color: var(--muted); font-size: .7em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kv { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; font-size: .92rem; }
.kv > span:first-child { flex: none; }
.kv > a { text-align: right; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: .82rem; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.5; background: #f8fafc; white-space: pre; overflow: auto; }
.color-in { height: 40px; padding: 3px 5px !important; width: 88px !important; cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.stats-tight { margin-bottom: 20px; }
.stat-good .stat-value { color: #047857; }
.status-select { width: auto !important; font-weight: 600; }
.h-spacer { flex: 1; }

/* ── document editor (estimates / invoices / purchase orders) ──────────── */
.doc-card { max-width: none; }
.li-editor { overflow: visible; }
.li-editor .card-head { flex-wrap: wrap; }
.li-picker { width: min(360px, 100%); }
.li-table th { white-space: nowrap; }
.li-table td { vertical-align: top; padding: 8px 10px; }
.li-table input, .li-table textarea { padding: 7px 9px; font-size: .9rem; }
.li-table textarea { min-height: 38px; resize: vertical; width: 100%; }
.li-qty { width: 88px; } .li-unit { width: 84px; } .li-price { width: 124px; } .li-tax { width: 48px; text-align: center; } .li-x { width: 44px; text-align: right; }
.li-tax input { width: 17px; height: 17px; accent-color: var(--brand); margin-top: 9px; }
.li-amt { width: 112px; padding-top: 16px !important; font-weight: 600; white-space: nowrap; }
.li-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; padding: 14px 18px 18px; border-top: 1px solid var(--line-2); }
.li-totals { margin: 0; min-width: 300px; display: grid; gap: 8px; }
.li-totals > div { display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 12px; }
.li-totals dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.li-totals dd { margin: 0; text-align: right; }
.li-totals .money-in input, .rate-in input { text-align: right; }
.li-grand { padding-top: 10px; border-top: 2px solid var(--ink); }
.li-grand dt { color: var(--ink); font-size: 1rem; }
.li-grand dd { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.rate-in { position: relative; }
.rate-in span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.rate-in input { padding-right: 28px; }

/* ── paper (printable documents) ───────────────────────────────────────── */
.paper { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 38px 42px 34px; overflow: hidden; }
.paper-stamp { position: absolute; top: 118px; right: 44px; transform: rotate(-9deg); border: 3px solid currentColor; border-radius: 8px; padding: 4px 16px; font-weight: 800; font-size: 1.5rem; letter-spacing: .12em; opacity: .28; pointer-events: none; }
.stamp-green { color: #059669; } .stamp-red { color: #dc2626; } .stamp-gray { color: #64748b; }
.paper-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.paper-brand { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.paper-brand img { width: 128px; height: auto; flex: none; }
.paper-co { display: grid; font-size: .84rem; color: var(--muted); line-height: 1.5; padding-top: 4px; }
.paper-co strong { color: var(--ink); font-size: .95rem; }
.paper-title { text-align: right; flex: none; }
.paper-title h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-d); margin-bottom: 8px; }
.paper-meta { margin-left: auto; border-collapse: collapse; font-size: .88rem; }
.paper-meta th { text-align: right; padding: 2px 12px 2px 0; color: var(--muted); font-weight: 600; }
.paper-meta td { text-align: right; padding: 2px 0; font-weight: 650; color: var(--ink); }
.paper-parties { display: flex; gap: 40px; flex-wrap: wrap; padding: 22px 0; }
.paper-parties h4, .paper-notes h4, .paper-terms h4 { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; font-weight: 700; }
.paper-parties .strong { font-weight: 700; color: var(--ink); }
.paper-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.paper-table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--ink); }
.paper-table th.right { text-align: right; }
.paper-table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.paper-bottom { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-top: 18px; }
.paper-notes { flex: 1 1 260px; font-size: .9rem; }
.paper-notes p { margin: 0 0 12px; }
.paper-totals { margin: 0; flex: 0 0 300px; display: grid; gap: 6px; align-content: start; }
.paper-totals > div { display: flex; justify-content: space-between; gap: 16px; }
.paper-totals dt { color: var(--muted); }
.paper-totals dd { margin: 0; font-weight: 600; color: var(--ink); }
.paper-totals .grand { border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 4px; }
.paper-totals .grand dt { color: var(--ink); font-weight: 700; }
.paper-totals .grand dd { font-size: 1.3rem; font-weight: 800; }
.paper-totals .due dd { color: var(--brand-d); }
.paper-accept { margin-top: 20px; padding: 12px 16px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; }
.paper-terms { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.paper-terms p { margin: 0; }

/* ── document detail sidebar bits ──────────────────────────────────────── */
.bal-big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; font-family: var(--font-head); }
.bal-over { color: var(--danger); }
.pay-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.pay-list li:last-child { border-bottom: 0; }
.recv-table input.recv-in { width: 84px; padding: 6px 8px; text-align: right; }
.crew-list li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.crew-list li > div { flex: 1; min-width: 0; }
.crew-list li:last-child { border-bottom: 0; }
.cost-table td { padding: 9px 18px; }
.cost-table tfoot td { font-size: .95rem; }
.row-good td { color: #047857; } .row-bad td { color: var(--danger); }
.mat-form { display: grid; grid-template-columns: 1fr 100px auto; gap: 8px; padding: 14px 18px 4px; align-items: start; }
.mat-hint { padding: 0 18px 10px; margin: 0; }
.inv-form .form-grid { gap: 10px; }

/* ── time ──────────────────────────────────────────────────────────────── */
.time-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.timer-card.is-running { border-color: #a7f3d0; background: linear-gradient(180deg, #f0fdf9, #fff); }
.big-timer { font-size: 3rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); margin: 6px 0 2px; font-family: var(--font-head); }
.toolbar-total { margin-left: auto; font-size: .9rem; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; }

/* ── inventory / reports / team / settings ─────────────────────────────── */
.adjust-form { display: grid; grid-template-columns: minmax(200px, 1.6fr) 150px 110px minmax(120px, 1fr) auto; gap: 8px; padding: 16px 18px; align-items: start; }
.aging-bar { width: 32%; }
.aging-bar span { display: block; height: 8px; min-width: 2px; background: var(--brand); border-radius: 99px; opacity: .8; }
.range-bar { align-items: center; }
.range-dates { display: inline-flex; gap: 8px; align-items: center; }
.range-dates input { width: auto; }
.roles-table td:first-child { white-space: nowrap; width: 220px; }
.settings-form { max-width: 980px; }
.settings-form > h2 + .muted { margin-bottom: 16px; }
.logo-row { display: flex; align-items: center; gap: 18px; }
.logo-row img { width: 130px; height: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.num-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stage-table td { padding: 8px 10px; }
.stage-table input, .stage-table select { padding: 7px 9px; }
.inline-add { max-width: 980px; padding: 18px 24px; }
.inline-add .quick-add input { max-width: 420px; }
.stat-dl { grid-template-columns: repeat(3, 1fr); padding: 6px 0 16px; }
.import-problems { margin: 8px 0 0 16px; list-style: disc; font-size: .86rem; color: var(--muted); }
.import-result { align-items: flex-start; }

/* ── public (customer) pages ───────────────────────────────────────────── */
body.public { background: #eef2f6; }
.public-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.public-brand img { width: 150px; height: auto; display: block; }
.public-contact { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; font-size: .92rem; }
.public-main { max-width: 900px; margin: 26px auto 10px; padding: 0 16px; display: grid; gap: 16px; }
.public-foot { text-align: center; color: #94a3b8; font-size: .82rem; padding: 18px 16px 34px; }
.public-card { padding: 60px 24px; }
.public-actions { display: flex; justify-content: flex-end; }
.public-banner { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.public-banner.ok { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.public-banner.warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.public-banner .muted { color: inherit; opacity: .8; }
.accept-card { border: 2px solid var(--brand); }
.acc-check { padding-top: 30px; }

/* ── responsive ────────────────────────────────────────────────────────── */
@media screen and (max-width: 1100px) {
  .detail-grid, .grid-main, .cal-layout, .time-grid { grid-template-columns: minmax(0, 1fr); }
  .adjust-form { grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; width: 280px; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 12px; }
  .page { padding: 18px 14px 32px; }
  .search-trigger kbd { display: none; }
  .hide-sm { display: none; }
  .dl { grid-template-columns: minmax(0, 1fr); }
  .form-grid > * { grid-column: 1 / -1 !important; }
  .funnel-row { grid-template-columns: 110px 1fr 90px; }
  .cal-day { min-height: 64px; }
  .cal-item { font-size: .66rem; padding: 1px 3px; }
  .kcol { flex-basis: 260px; }
  .grid-2 { grid-template-columns: 1fr; }
  .paper { padding: 22px 18px; }
  .paper-head { flex-direction: column; }
  .paper-title { text-align: left; }
  .paper-meta { margin-left: 0; }
  .paper-stamp { top: 96px; right: 16px; font-size: 1.1rem; }
  .paper-totals { flex-basis: 100%; }
  .li-table, .li-table tbody, .li-table tr, .li-table td { display: block; }
  .li-table thead { display: none; }
  .li-table tr.li-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 8px; padding: 12px; border-bottom: 1px solid var(--line-2); position: relative; }
  .li-table tr.li-row td { padding: 0; width: auto; }
  .li-table tr.li-row td:first-child { grid-column: 1 / -1; }
  .li-table td.li-amt { padding-top: 0 !important; text-align: left; }
  .li-table td.li-x { position: absolute; top: 4px; right: 4px; width: auto; }
  .li-totals { min-width: 0; width: 100%; }
  .mat-form, .adjust-form { grid-template-columns: 1fr; }
  .public-bar { padding: 10px 14px; }
  .public-brand img { width: 118px; }
  .stat-dl { grid-template-columns: 1fr 1fr; }
  .big-timer { font-size: 2.4rem; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.35rem; }
  .table th, .table td { padding: 9px 10px; }
  .stat-value { font-size: 1.55rem; }
}

@media print {
  .sidebar, .topbar, .page-foot, .head-actions, .no-print, .crumb, .flash, .public-bar, .public-foot, .col-side, .tabs, .toolbar { display: none !important; }
  .main { margin: 0; }
  body, body.public { background: #fff; }
  .page, .public-main { padding: 0; max-width: none; margin: 0; }
  .detail-grid { display: block; }
  .card, .paper { box-shadow: none !important; }
  .paper { border: 0; padding: 0; }
  .page-head { margin-bottom: 8px; }
  .paper-stamp { opacity: .22; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* small-screen safety nets */
input[type="file"] { max-width: 100%; min-width: 0; }
.logo-row > div { min-width: 0; }
@media (max-width: 520px) { .logo-row { flex-wrap: wrap; } }

/* ==========================================================================
   Website theme (Phase 2) — matches magothyroofing.com
   Teal #0D9488, Space Grotesk headings + Inter body, pill buttons, soft
   rounded cards, near-black (#0A0A0A) dark surfaces. Everything here reads
   the :root tokens above, so colours can still be changed in one place.
   ========================================================================== */
h1, h2, h3, h4 { letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.08rem; font-weight: 600; }
h3 { font-size: .98rem; font-weight: 600; }
::selection { background: rgba(13, 148, 136, .22); }

/* — top strip (echoes the website's teal announcement bar) — */
.top-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 28px; background: linear-gradient(90deg, #0a0a0a 0%, #0c3b37 45%, var(--brand-d) 100%); color: rgba(255, 255, 255, .88); font-size: .8rem; font-weight: 500; }
.top-strip a { color: #fff; font-weight: 600; }
.top-strip a:hover { text-decoration: underline; }
.top-strip .ts-left, .top-strip .ts-right { display: flex; align-items: center; gap: 14px; }
.top-strip .ts-tag { font-family: var(--font-head); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .68rem; padding: 2px 9px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .14); color: #fff; }
.top-strip .ic { vertical-align: -2px; }

/* — sidebar: dark surface with teal accents — */
.sidebar { background: linear-gradient(180deg, #0a0a0a 0%, #0a1412 100%); border-right: 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.brand { padding: 16px 16px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.brand .brand-logo { display: block; background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.brand img { width: 100%; max-width: 168px; }
.brand-sub { margin-top: 10px; color: rgba(255, 255, 255, .55); font-family: var(--font-head); letter-spacing: .22em; font-weight: 600; }
.nav-group { color: rgba(255, 255, 255, .38); font-family: var(--font-head); letter-spacing: .14em; }
.nav-link { color: rgba(255, 255, 255, .74); font-family: var(--font); font-weight: 500; border-radius: 10px; position: relative; transition: background .2s, color .2s; }
.nav-link .ic { color: rgba(255, 255, 255, .5); transition: color .2s; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link:hover .ic { color: var(--brand-2); }
.nav-link.active { background: rgba(20, 184, 166, .16); color: #fff; font-weight: 600; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-2); }
.nav-link.active .ic { color: #2dd4bf; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); }
body.nav-open .sidebar { box-shadow: 0 0 60px rgba(0, 0, 0, .5); }

/* — top bar — */
.topbar { background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(15, 23, 42, .02); }
.search-trigger { border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--bg); padding: 8px 14px; transition: border-color .2s, background .2s, box-shadow .2s; }
.search-trigger:hover { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(13, 148, 136, .1); }
.icon-btn { border-radius: 10px; }
.icon-btn:hover { background: rgba(13, 148, 136, .08); color: var(--brand-d); }
.page-foot { color: #6b7280; }

/* — buttons: pill shaped, Space Grotesk, teal glow — */
.btn { font-family: var(--font-head); font-weight: 600; letter-spacing: 0; border-radius: var(--radius-pill); padding: 9px 20px; border-width: 1.5px; transition: background .2s, border-color .2s, box-shadow .2s, transform .2s, color .2s; }
.btn-primary { background: var(--brand-d); border-color: var(--brand-d); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(13, 148, 136, .36); }
.btn-primary:active { transform: none; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; border-color: var(--brand); color: var(--brand-d); }
.btn-danger { box-shadow: 0 6px 18px rgba(220, 38, 38, .22); }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-text:hover { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.btn-link { padding-left: 8px; padding-right: 8px; }
.btn-link:hover { background: rgba(13, 148, 136, .08); }
.btn-sm { padding: 6px 15px; font-size: .84rem; border-radius: var(--radius-pill); }
.btn-block { padding: 12px 20px; font-size: 1rem; }
.seg { border-width: 1.5px; border-radius: var(--radius-pill); }
.seg a { padding: 7px 15px; font-family: var(--font-head); }
.seg a.on { background: rgba(13, 148, 136, .1); color: var(--brand-d); }
.dropdown-menu { border-radius: 14px; padding: 8px; }
.dropdown-menu a { border-radius: 8px; font-weight: 500; }
.dropdown-menu a:hover { background: rgba(13, 148, 136, .07); color: var(--brand-d); }
.page-btn { border-radius: var(--radius-pill); min-width: 34px; height: 34px; }
.timer-chip { font-family: var(--font-head); }

/* — cards, stats, tables — */
.card { border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04); }
.card-head { padding: 15px 20px; }
.card-head h2 { font-size: 1.02rem; }
.card-pad { padding: 18px 20px; }
.stat { border-radius: var(--radius); padding: 18px 20px; }
.stat:hover { box-shadow: 0 10px 30px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.stat-label { font-family: var(--font-head); letter-spacing: .08em; font-weight: 600; }
.stat-value { font-weight: 700; font-size: 1.95rem; }
.stat-warn { border-color: #fed7aa; }
.table th { font-family: var(--font-head); font-weight: 600; letter-spacing: .07em; background: var(--bg); }
.table tfoot td { background: var(--bg); }
.table.rowlink tbody tr[data-href]:hover { background: rgba(13, 148, 136, .045); }
a.primary { font-family: var(--font-head); font-weight: 600; }
.count { background: rgba(13, 148, 136, .1); color: var(--brand-d); font-weight: 700; }
.empty h3 { font-family: var(--font-head); }
.banner { border-radius: var(--radius); }

/* — tabs become website-style pills — */
.tabs { border-bottom: 0; gap: 6px; padding-bottom: 2px; }
.tab { border: 0; margin: 0; border-radius: var(--radius-pill); padding: 7px 16px; font-family: var(--font-head); font-weight: 600; font-size: .88rem; color: #4b5563; transition: background .2s, color .2s; }
.tab:hover { background: rgba(13, 148, 136, .07); color: var(--brand-d); }
.tab.active { background: rgba(13, 148, 136, .12); color: var(--brand-d); }

/* — badges & tags — */
.badge { font-family: var(--font-head); font-weight: 600; padding: 3px 11px; }
.b-gray { background: #eef2f6; color: #374151; }
.b-green { background: rgba(16, 185, 129, .12); color: #047857; }
.b-blue { background: rgba(13, 148, 136, .1); color: var(--brand-d); }
.b-amber { background: rgba(217, 119, 6, .12); color: #92400e; }
.b-red { background: rgba(220, 38, 38, .1); color: #b91c1c; }
.pill { font-family: var(--font-head); font-weight: 600; }
.chip { border-radius: var(--radius-pill); }

/* — forms — */
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=datetime-local], input[type=password], input[type=search], input[type=time], select, textarea {
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); padding: 10px 13px;
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #cbd5e1; }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 148, 136, .15); }
input::placeholder, textarea::placeholder { color: #9ca3af; }
input[type=file] { background: #fff; }
label { color: var(--ink); font-weight: 600; }
.form-section { font-family: var(--font-head); font-weight: 600; letter-spacing: .1em; color: var(--brand-d); }
.form-card { border-radius: var(--radius); padding: 24px 26px 22px; }
.form-actions { border-top-color: var(--line); }
.picker-menu { border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .16); }
.picker-opt:hover, .picker-opt.hi { background: rgba(13, 148, 136, .07); }
.flash { border-radius: 14px; }
.flash-success { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); color: #065f46; }
.tick.on { background: var(--brand-d); border-color: var(--brand-d); }

/* — search palette — */
.cmdk { background: rgba(10, 10, 10, .55); backdrop-filter: blur(3px); }
.cmdk-box { border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.cmdk-group { font-family: var(--font-head); color: var(--brand-d); }
.cmdk-item { border-radius: 10px; }
.cmdk-item:hover, .cmdk-item.hi { background: rgba(13, 148, 136, .08); }

/* — kanban & calendar — */
.kcol { background: #eef2f6; border-radius: var(--radius); }
.kcol-title { font-family: var(--font-head); font-weight: 600; }
.kcard { border-radius: 12px; }
.kcard:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .09); border-color: rgba(13, 148, 136, .4); }
.kcard-title { font-family: var(--font-head); font-weight: 600; }
.kcol-add:hover { color: var(--brand-d); background: rgba(255, 255, 255, .9); }

/* — estimate / invoice paper — */
.paper { border-radius: var(--radius); }
.paper-head { border-bottom: 3px solid var(--brand); }
.paper-title h2 { font-family: var(--font-head); font-weight: 700; color: var(--brand-d); }
.paper-table th { font-family: var(--font-head); font-weight: 600; border-bottom-color: var(--ink); }
.paper-stamp { font-family: var(--font-head); }

/* — sign-in: dark hero + white card, like the website's quote form — */
body.bare { background: #0a0a0a; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 56px; padding: 48px clamp(24px, 7vw, 110px); position: relative; overflow: hidden; background:
  radial-gradient(900px 520px at 12% 8%, rgba(13, 148, 136, .34), transparent 62%),
  radial-gradient(700px 480px at 92% 96%, rgba(20, 184, 166, .22), transparent 60%),
  #0a0a0a; }
.login-hero { color: rgba(255, 255, 255, .78); max-width: 560px; }
.login-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #5eead4; background: rgba(20, 184, 166, .14); border: 1px solid rgba(94, 234, 212, .25); padding: 6px 15px; border-radius: var(--radius-pill); }
.login-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.2vw, 3.4rem); line-height: 1.08; margin: 20px 0 16px; }
.login-hero h1 span { color: #2dd4bf; }
.login-hero > p { font-size: 1.05rem; line-height: 1.7; margin: 0 0 30px; color: rgba(255, 255, 255, .7); }
.login-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 24px; }
.login-points strong { display: block; font-family: var(--font-head); font-size: 1.15rem; color: #fff; }
.login-points span { font-size: .82rem; color: rgba(255, 255, 255, .58); }
.login-wrap { min-height: 0; padding: 0; display: block; width: 100%; max-width: 460px; justify-self: end; }
.login-card { width: 100%; border: 0; border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); padding: 38px 36px 28px; }
.login-card h1 { font-size: 1.6rem; }
.login-logo { width: 168px; margin: 0 auto 14px; }
.login-copy { color: rgba(255, 255, 255, .45); text-align: center; }
.login-foot { color: #6b7280; }
.error-code { font-family: var(--font-head); }
body.bare .error-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(800px 480px at 50% 0%, rgba(13, 148, 136, .3), transparent 65%), #0a0a0a; }
body.bare .error-page h1 { color: #fff; }
body.bare .error-page p { color: rgba(255, 255, 255, .7); }
body.bare .error-code { color: #2dd4bf; }

/* — customer-facing estimate / invoice pages — */
body.public { background: var(--bg); }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 28px; background: linear-gradient(90deg, #0a0a0a 0%, #0c3b37 45%, var(--brand-d) 100%); color: rgba(255, 255, 255, .88); font-size: .8rem; font-weight: 500; }
.public-top a { color: #fff; font-weight: 600; }
.public-bar { padding: 10px 28px; box-shadow: 0 1px 0 rgba(15, 23, 42, .03); }
.public-contact a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--brand-d); color: #fff; font-family: var(--font-head); box-shadow: var(--glow); transition: background .2s, transform .2s; }
.public-contact a:nth-child(2) { background: #fff; color: var(--brand-d); box-shadow: none; border: 1.5px solid var(--line); }
.public-contact a:hover { text-decoration: none; background: var(--brand); color: #fff; transform: translateY(-1px); }
.public-foot { background: #0a0a0a; color: rgba(255, 255, 255, .6); padding: 30px 16px 34px; margin-top: 34px; line-height: 1.8; }
.public-foot strong { display: block; font-family: var(--font-head); font-size: 1.05rem; color: #fff; }
.public-foot a { color: #5eead4; }

@media screen and (max-width: 960px) {
  .login-shell { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 20px 40px; align-content: center; }
  .login-hero { display: none; }
  .login-wrap { justify-self: center; }
}
@media screen and (max-width: 860px) {
  .top-strip { display: none; }
  .public-top { padding: 6px 14px; font-size: .74rem; }
  .public-top .pt-right { display: none; }
  .nav-link.active::before { left: 0; }
}
@media print {
  .top-strip, .public-top { display: none !important; }
  .paper-head { border-bottom-color: #111; }
}
.brand .brand-logo { width: 156px; margin: 0 auto; padding: 6px 8px; border-radius: 12px; }
.brand-logo img, .login-logo, .paper-brand img, .public-brand img { mix-blend-mode: multiply; }

/* list tables: short values (phone, date, owner, amounts) stay on one line; long text may wrap or is trimmed */
.table { font-size: .9rem; }
.table td { padding: 11px 14px; }
.table th { padding: 10px 14px; }
.table td.nw, .table td .usr, .table td a[href^="tel:"] { white-space: nowrap; }
.table td:not(:first-child):not(.nw) { max-width: 240px; }
.table td, .table th { padding-left: 12px; padding-right: 12px; }
.table td:first-child, .table th:first-child { padding-left: 16px; }
.table a.primary { font-family: var(--font); font-weight: 600; }
.table td:first-child { min-width: 96px; }

/* Phase 2 polish */
.public-brand img { width: 110px; }
.paper-stamp { top: 196px; right: 40px; }
@media screen and (max-width: 860px) {
  .public-brand img { width: 96px; }
  .paper-stamp { top: auto; bottom: auto; position: static; display: inline-block; margin: 0 0 14px; transform: rotate(-4deg); }
}
@media (max-width: 560px) {
  .paper { padding: 20px 14px; }
  .paper-table { font-size: .82rem; }
  .paper-table th { font-size: .6rem; letter-spacing: .02em; padding: 8px 3px; }
  .paper-table td { padding: 9px 3px; }
  .paper-table td:first-child, .paper-table th:first-child { padding-left: 0; }
  .paper-table td:last-child, .paper-table th:last-child { padding-right: 0; }
}

/* Print view + list print buttons */
body.print-page { background: var(--bg); }
.print-wrap { max-width: 900px; margin: 0 auto; padding: 20px 16px 56px; }
.print-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.print-bar .print-hint { flex: 1; text-align: right; color: var(--muted); font-size: .84rem; }
@media (max-width: 640px) { .print-bar .print-hint { display: none; } .print-bar { justify-content: space-between; } }
.cell-with-print { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.row-print { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 9999px; color: var(--muted); border: 1px solid transparent; }
.row-print:hover { color: var(--brand-d); background: rgba(13,148,136,.10); border-color: rgba(13,148,136,.25); }
@page { margin: .5in; }
@media print {
  body.print-page { background: #fff; }
  .print-wrap { max-width: none; padding: 0; }
  .paper-stamp { top: 168px; right: 0; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Tax Docs */
.tax-year select { min-width: 170px; }
.tax-period { display: flex; align-items: center; gap: 8px; margin: -6px 0 16px; font-size: .92rem; }
.tax-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tax-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.tax-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
.tax-card p { margin: 0; line-height: 1.55; }
.tax-card .tc-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(13, 148, 136, .12); color: var(--brand-d); display: grid; place-items: center; }
.tax-card .tc-actions { margin-top: auto; }
.tax-card-main { border-color: rgba(13, 148, 136, .45); box-shadow: 0 10px 30px rgba(13, 148, 136, .10); }
.check-list, .file-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.check-list li:last-child, .file-list li:last-child { border-bottom: 0; }
.check-list .ck-icon { flex: none; margin-top: 1px; color: var(--muted); }
.check-list .warn .ck-icon { color: #b45309; }
.check-list .ck-text { flex: 1; min-width: 0; line-height: 1.5; }
.file-list li { display: grid; gap: 2px; padding: 11px 20px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.file-list code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; color: var(--brand-d); word-break: break-all; }
.stat-warn .stat-value { color: #b45309; }
@media (max-width: 560px) { .check-list li { flex-wrap: wrap; } .tax-year select { width: 100%; } }

.stats.stats-5 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* Print buttons on document lists (labelled, so they are easy to spot) */
.row-print-btn { color: var(--brand-d); background: rgba(13,148,136,.07); border-color: rgba(13,148,136,.35); gap: 5px; white-space: nowrap; padding: 3px 10px; font-size: .78rem; font-weight: 600; }
.row-print-btn:hover { background: rgba(13,148,136,.16); border-color: rgba(13,148,136,.6); color: var(--brand-d); }
@media print { .pager, .pagination, .row-print-btn { display: none !important; } }
@media print {
  .table-wrap { overflow: visible !important; }
  .table-card { border: 0 !important; box-shadow: none !important; }
  .table { font-size: .72rem; width: 100%; }
  .table th, .table td { padding: 5px 6px !important; max-width: none !important; white-space: normal !important; }
  .table td.nw { white-space: nowrap !important; }
  .table th a { color: inherit !important; }
}

/* several documents on one print page */
.batch-doc { margin-bottom: 28px; }
.batch-doc .paper { position: relative; }
@media print {
  .batch-doc { margin: 0; break-after: page; page-break-after: always; }
  .batch-doc:last-child { break-after: auto; page-break-after: auto; }
}
.w-check input[type="checkbox"], .row-sel { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.sel-hint { margin: -6px 0 14px; font-size: .9rem; color: var(--brand-d); font-weight: 600; }

/* numbered set-up steps */
ol.steps { margin: 14px 0 20px; padding-left: 1.6em; display: grid; gap: 14px; list-style: decimal; }
ol.steps li { padding-left: 4px; line-height: 1.55; }

/* ── Google reviews (v1.5.0) ── */
.stars { display: inline-block; letter-spacing: 1px; line-height: 1; white-space: nowrap; font-size: 1em; }
.stars .on { color: #f5b301; }
.stars .off { color: #d5dbe3; }
.stars-n { font-weight: 600; color: var(--ink); font-size: .9em; }
.review-stats { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.review-stats .stat-sub .stars { font-size: 1.05rem; }
.paper-review { display: flex; align-items: center; gap: 20px; margin-top: 26px; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 14px; break-inside: avoid; page-break-inside: avoid; }
.paper-review-qr { flex: none; width: 112px; height: 112px; line-height: 0; }
.paper-review-qr svg { width: 112px; height: 112px; display: block; }
.paper-review h4 { margin: 0 0 4px; font-size: 1.02rem; color: var(--ink); text-transform: none; letter-spacing: 0; }
.paper-review p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.paper-review .paper-review-stars { font-size: 1.15rem; margin-bottom: 4px; }
.paper-review .paper-review-btn { margin-top: 10px; }
@media (max-width: 520px) { .paper-review { flex-direction: column; text-align: center; } }
