/* Smart Parking NZ Signage Hub - one stylesheet, no framework, no web fonts.
   Same build as the supplier's other ordering sites (light grey page, white cards), in Smart Parking's
   brand from their sign artwork: slate header, orange actions, blue links. Contrast (WCAG 2.1):
   white on slate 7.8:1; blue #006AA6 on white 5.8:1; white on --action 4.7:1. The brand orange #F15D22 is
   only 3.3:1 with white, so it is used for rules, focus and accents, never behind small text. */

:root {
  --slate: #43555F;
  --accent: #F15D22;          /* Smart Parking orange: header rule, highlights, progress */
  --accent-soft: rgba(241,93,34,.10);
  --action: #CE440D;          /* primary buttons: the same orange, darkened for white text */
  --action-dark: #B63C0C;
  --link: #006AA6;            /* Smart Parking blue: links, active nav and tabs */
  --link-dark: #00507d;
  --link-soft: rgba(0,106,166,.08);
  --danger: #B42318;
  --ink: #1b1b1f;
  --ink-2: #4a4a52;
  --muted: #6f6f78;
  --line: #e4e4e8;
  --bg: #f4f4f6;
  --card: #ffffff;
  --ok: #1a8f4c;
  --warn: #b7791f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(20,20,30,.06);
  --shadow-lg: 0 20px 60px rgba(20,20,30,.22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }
a { color: inherit; }
.page a:not(.btn):not(.card-img):not(.chip):not(.queue-row), .link { color: var(--link); }
.muted { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.fineprint { font-size: 12px; color: #a0a0a8; margin-top: 28px; text-align: center; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Inputs & buttons ---- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=tel], input[type=number], input[type=url], input:not([type]), textarea, select {
  width: 100%; font: inherit; padding: 11px 13px; border: 1px solid #cfcfd6; border-radius: 9px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(0,106,166,.18); }
input[readonly] { background: var(--bg); color: var(--ink-2); }
textarea { resize: vertical; }
.code-input { font-size: 28px; letter-spacing: 10px; text-align: center; font-weight: 700; }
.btn { font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 9px; padding: 11px 18px; cursor: pointer; background: #fff; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, transform .05s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .tab:focus-visible, .subtab:focus-visible, .chip:focus-visible, .tile:focus-visible, .queue-row:focus-visible { outline: 3px solid rgba(0,106,166,.45); outline-offset: 2px; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--action-dark); }
.btn-ghost { background: transparent; border-color: #cfcfd6; }
.btn-ghost:hover { background: #fff; }
.btn-danger { color: var(--danger); border-color: #f0c2c5; background: #fff; }
.btn-danger:hover { background: #fdecec; }
.btn-link { background: none; color: var(--muted); padding: 8px; text-decoration: underline; font-weight: 500; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.stack > * + * { margin-top: 14px; }
.msg { margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: #fdecec; color: #9b1c1c; }
.msg.ok { background: #e6f6ec; color: #16693a; }
.msg.warn { background: #fff5dd; color: #7a5200; }

/* ---- Brand (header and sign-in card) ---- */
.brand-hub { color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; line-height: 1.2; }

/* ---- Sign in ---- */
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(180deg, var(--slate) 0, var(--slate) 34vh, var(--bg) 34vh); }
.login-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.login-brand { background: var(--slate); border-bottom: 3px solid var(--accent); padding: 22px 32px 20px; }
.login-brand .brand-mark { height: 38px; }
.login-brand .brand-name { font-size: 22px; }
.login-body { padding: 26px 32px 22px; }
.login-card h1 { margin-bottom: 6px; }
.login-card .muted { margin-bottom: 22px; }
/* Demo sign-in block (SC-20261003-11): password + two buttons, then "or" and the email-code form */
.demo-block .muted { margin-bottom: 16px; }
.demo-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-buttons .btn { padding-left: 8px; padding-right: 8px; font-size: 14px; white-space: nowrap; }
.btn-slate { background: var(--slate); color: #fff; }
.btn-slate:hover:not(:disabled) { background: #36454d; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px; color: var(--muted); font-size: 13px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-subhead { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: var(--ink); }
@media (max-width: 420px) { .demo-buttons { grid-template-columns: 1fr; } }

/* ---- Top bar: slate brand bar with the logo, white nav bar under it ---- */
.topbar { position: sticky; top: 0; z-index: 30; }
.brandbar { background: var(--slate); border-bottom: 3px solid var(--accent); }
.brandbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; min-height: 58px; display: flex; align-items: center; gap: 16px; }
/* The lockup (header and sign-in card): the cube mark, "Smart Parking" in white, a thin divider, SIGNAGE HUB.
   Sam, 3 Oct 2026: the hub says "Smart Parking", never "Smart Compliance Management" (their artwork's wordmark). */
.brand-lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { display: block; height: 30px; width: auto; flex: none; }
.brand-name { color: #fff; font-weight: 700; font-size: 18px; letter-spacing: -.005em; white-space: nowrap; line-height: 1.1; }
.brand-lockup .brand-hub { margin-left: 4px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.4); }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13px; color: #fff; max-width: 280px; }
.user-chip .pill { background: rgba(255,255,255,.16); color: #fff; }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.btn-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-on-dark:hover { background: rgba(255,255,255,.12); }
.btn-on-dark:focus-visible { outline-color: #fff; }
.navbar { background: #fff; border-bottom: 1px solid var(--line); }
.tabs { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; flex-wrap: wrap; }
.tab { text-decoration: none; padding: 12px 12px 9px; font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; border-bottom: 3px solid transparent; }
.tab:hover { color: var(--link); }
.tab.active { color: var(--link); border-bottom-color: var(--link); }

/* ---- Pills ---- */
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e6f1f8; color: var(--link-dark); white-space: nowrap; letter-spacing: .01em; }
.pill.blue { background: #e6f1f8; color: var(--link-dark); }
.pill.orange { background: var(--action); color: #fff; }
.pill.slate { background: var(--slate); color: #fff; }
.pill.green { background: #e6f6ec; color: var(--ok); }
.pill.amber { background: #fff5dd; color: #7a5200; }
.pill.grey { background: #f1f1f3; color: var(--muted); }
.pill.red { background: #fdecec; color: #9b1c1c; }
.pill.ink { background: var(--ink); color: #fff; }

/* ---- Page ---- */
.page { max-width: 1280px; margin: 0 auto; padding: 32px 24px 80px; }
.page:focus { outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .muted { margin: 6px 0 0; max-width: 620px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head p { margin: 4px 0 0; font-size: 13.5px; }
.panel-head .stat-link { margin-top: 0; }

/* ---- Dashboard ---- */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.stat-value.alert { color: var(--action); }
.stat-sub { font-size: 13.5px; color: var(--muted); flex: 1; }
.stat-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13.5px; }
.stat-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.stat-link { margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--link); text-decoration: none; align-self: flex-start; }
.stat-link:hover { text-decoration: underline; }
.empty-line { color: var(--muted); font-size: 14px; padding: 18px 0 6px; text-align: center; }

/* ---- Tables (stack into cards on phones) ---- */
.table-wrap { width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.inactive td { color: var(--muted); }
.table .actions { text-align: right; white-space: nowrap; }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); }

/* ---- Sub-tabs (Settings) ---- */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.subtab { font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; margin-bottom: -1px; cursor: pointer; }
.subtab:hover { color: var(--ink); }
.subtab[aria-selected=true] { color: var(--link); border-bottom-color: var(--link); }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field.span-2 { grid-column: span 2; }
.invite-form { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.invite-form .btn { height: 45px; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 240px; }
.inline-form .btn { height: 45px; }

/* ---- "Coming in step N" ---- */
.coming { background: var(--card); border: 2px dashed #d5d5dc; border-radius: var(--radius); padding: 30px 28px; max-width: 760px; }
.coming .pill { margin-bottom: 12px; }
.coming ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }
.coming li + li { margin-top: 4px; }

/* ---- Thumbnail grid + cards (sign register, catalogue - steps 3-4) ---- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-img { position: relative; aspect-ratio: 16 / 10; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-weight: 700; font-size: 15px; }
.card-desc { font-size: 12.5px; color: var(--muted); flex: 1; }

/* ---- Artwork & T&Cs (step 3) ---- */
.upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 22px; align-items: start; }
.upload-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-fields .wide, .upload-fields .hint { grid-column: span 2; }
.upload-fields:has(#aw-variant-field[hidden]) #aw-region-field { grid-column: span 2; }
.upload-fields .hint { margin: 0; }
input[type=file] { width: 100%; font: inherit; font-size: 14px; padding: 9px; border: 1px dashed #bdbdc6; border-radius: 9px; background: #fafafb; }
.upload-preview { min-width: 0; }
.upload-preview-img { aspect-ratio: 1400 / 880; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.upload-preview-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.upload-preview[data-state=loading] .upload-preview-img { background: repeating-linear-gradient(-45deg, #fafafb, #fafafb 10px, #f2f2f5 10px, #f2f2f5 20px); }
.upload-preview-meta { font-size: 13px; margin: 8px 0 0; min-height: 1.4em; }
.upload-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.upload-progress { flex: 1 1 200px; max-width: 320px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.art-products { margin-top: 18px; }
.art-product .panel-head { margin-bottom: 0; }
.art-product .grid { margin-top: 14px; }
.art-product h3 .sku { font-size: 13px; font-weight: 600; margin-left: 4px; }
.version-card { border: 1px solid var(--line); box-shadow: none; transition: box-shadow .3s, border-color .3s; }
.version-card.is-current { border-color: #9fd8b5; }
.version-card.flash { box-shadow: 0 0 0 3px rgba(241,93,34,.5); }
.version-card .card-img { display: block; text-decoration: none; }
.version-card .badge { position: absolute; top: 8px; left: 8px; }
.no-thumb { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; background: #fafafb; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-notes { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); }
.pf-notes li + li { margin-top: 2px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ---- Products table (supplier admin) ---- */
.money-input { display: inline-flex; align-items: center; gap: 4px; }
.money-input input { width: 110px; padding: 7px 9px; text-align: right; }
input.invalid { border-color: var(--danger); background: #fff7f7; }
.products-table [data-save]:disabled { background: transparent; color: var(--muted); border-color: var(--line); opacity: 1; }
.table input[type=checkbox], .check input { width: 18px; height: 18px; accent-color: var(--link); vertical-align: middle; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink); margin: 0; cursor: pointer; }
.check-field { align-self: end; padding-bottom: 12px; }
.form-actions { display: flex; gap: 10px; align-items: center; }
.rename-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rename-form input { max-width: 260px; padding: 7px 10px; }
.table td.pre { white-space: pre-line; font-size: 13.5px; }

/* ---- Modal & toast ---- */
.modal { position: fixed; inset: 0; background: rgba(20,20,30,.5); z-index: 50; display: grid; place-items: center; padding: 20px; overflow: auto; }
.modal-card { background: #fff; border-radius: 16px; width: 100%; max-width: 680px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px 22px 22px; overflow: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; z-index: 70; box-shadow: var(--shadow-lg); }

/* ---- Responsive ---- */
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: 1fr; }
  .invite-form { grid-template-columns: 1fr 1fr; }
  .invite-form .btn { grid-column: span 2; }
}
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .upload-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .topbar { position: static; }   /* on a phone the header scrolls away with the page */
  .brandbar-inner { padding: 10px 16px; gap: 10px; min-height: 0; }
  /* phone: the mark beside "Smart Parking" over SIGNAGE HUB (no divider when they stack) */
  .brand-lockup { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: 9px; row-gap: 1px; }
  .brand-lockup .brand-mark { grid-row: span 2; height: 32px; }
  .brand-name { font-size: 16px; }
  .brand-lockup .brand-hub { border-left: 0; padding-left: 0; margin-left: 0; font-size: 10.5px; }
  .login-brand .brand-mark { height: 36px; }
  .login-brand .brand-name { font-size: 19px; }
  .user-chip { display: none; }   /* name and role are under Settings > Your details */
  .user-menu .btn { padding: 6px 10px; }
  .tabs { padding: 0 6px; gap: 0; }
  .tab { padding: 10px 8px 7px; font-size: 13.5px; }
  .login-brand, .login-body { padding-left: 22px; padding-right: 22px; }
  .page { padding: 20px 16px 80px; }
  .panel { padding: 16px; }
  .form-grid, .invite-form { grid-template-columns: 1fr; }
  .field.span-2, .invite-form .btn { grid-column: span 1; }
  .subtabs { margin-bottom: 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .subtab { padding: 9px 9px; font-size: 13.5px; white-space: nowrap; flex: none; }
  /* tables become one card per row */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: left; flex: none; }
  .table td.cell-main { display: block; text-align: left; font-size: 15px; }
  .table td.cell-main::before { content: none; }
  .table .actions { text-align: right; justify-content: flex-end; padding-top: 8px; }
  .table .actions::before { content: none; }
  .coming { padding: 22px 18px; }
  .upload-fields { grid-template-columns: 1fr; }
  .upload-fields .field, .upload-fields .hint,
  .upload-fields:has(#aw-variant-field[hidden]) #aw-region-field { grid-column: span 1; }
  .table td.pre { text-align: right; }
  .money-input input { width: 120px; }
}
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Step 5: cart, orders, order detail, admin hub
   ===================================================================== */
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: #f1f1f3; color: var(--ink-2); white-space: nowrap; }
.tag.tbc { background: #fff5dd; color: #7a5200; }
.tag.big { background: #e6f1f8; color: var(--link-dark); }
.tag.warn { background: #fff5dd; color: #7a5200; }
.tbc-banner { background: #fff5dd; color: #7a5200; border-radius: 9px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin: 12px 0 0; }
.thumb { display: block; width: 100%; aspect-ratio: 1400 / 880; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.thumb.none { display: grid; place-items: center; font-size: 11.5px; color: var(--muted); background: #fafafb; text-align: center; padding: 4px; }

/* ---- Cart (#/order) ---- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.cart-panel { min-width: 0; }
.cat-group + .cat-group { margin-top: 22px; }
.cat-group > h3 { margin: 0 0 10px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product-card .card-body { gap: 5px; }
.product-card .card-title { font-size: 14.5px; }
.product-card .meta { font-size: 12.5px; color: var(--muted); }
.product-card .price-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.product-card .add-row { display: flex; gap: 8px; align-items: flex-end; margin-top: auto; padding-top: 4px; }
.product-card .add-row select { padding: 7px 8px; font-size: 13.5px; }
.product-card .add-row .btn { flex: none; }
.cart-panel .panel-head { margin-bottom: 4px; }
.cart-empty { color: var(--muted); font-size: 14px; padding: 14px 0; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line .line-title { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.cart-line .line-title b { font-size: 14px; }
.cart-line .sub { font-size: 12.5px; color: var(--muted); }
.cart-line .line-controls { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cart-line .line-controls select, .cart-line .line-controls input[type=text] { padding: 6px 8px; font-size: 13px; width: auto; flex: 1 1 140px; min-width: 0; }
.cart-line .line-price { margin-left: auto; font-weight: 700; font-size: 14px; white-space: nowrap; }
.btn-x { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 4px; cursor: pointer; }
.btn-x:hover { color: var(--danger); }
.qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid #cfcfd6; border-radius: 9px; overflow: hidden; background: #fff; flex: none; }
.qty-stepper button { width: 32px; border: 0; background: #f4f4f6; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.qty-stepper button:hover { background: #e9e9ee; }
.qty-stepper input { width: 50px; border: 0; border-radius: 0; text-align: center; padding: 6px 2px; box-shadow: none; }
.cart-section { padding: 14px 0 0; }
.cart-section > label, .cart-section > .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { display: flex; gap: 8px; align-items: flex-start; border: 1px solid #cfcfd6; border-radius: 10px; padding: 9px 11px; cursor: pointer; margin: 0; font-weight: 500; }
.choice input { margin-top: 3px; accent-color: var(--link); }
.choice b { display: block; font-size: 14px; color: var(--ink); }
.choice span { font-size: 12.5px; color: var(--muted); }
.choice:has(input:checked) { border-color: var(--link); background: var(--link-soft); }
.addr-text { white-space: pre-line; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.totals { margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.totals .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.totals .row span:first-child { color: var(--ink-2); }
.totals .grand { font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.totals .grand span:first-child { color: var(--ink); }
.totals .hint { margin: 2px 0 0; }
.totals[data-state=pending] .num { opacity: .45; }
.place-row { margin-top: 16px; }
/* Order summary bar: sticks to the bottom of the screen while the cart's totals are out of view (order.js
   toggles .is-hidden with an IntersectionObserver), so the running total is always visible while browsing. */
.cartbar { position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 14px; width: 400px; max-width: 100%;
  margin: 18px 0 -60px auto; padding: 10px 12px 10px 18px; background: var(--slate); color: #fff; border-radius: 12px;
  box-shadow: var(--shadow-lg); border-bottom: 3px solid var(--accent); transition: opacity .15s; }
.cartbar b { margin-left: auto; font-size: 16px; }
.cartbar.is-hidden { opacity: 0; visibility: hidden; }
.cart-site { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- Orders list ---- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid #cfcfd6; background: #fff;
  font-weight: 600; font-size: 13.5px; text-decoration: none; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.chip .n { background: #f1f1f3; border-radius: 999px; padding: 0 7px; font-size: 12px; color: var(--ink-2); }
.chip:hover { border-color: var(--link); color: var(--link); }
.chip.active { border-color: var(--link); color: #fff; background: var(--link); }
.chip.active .n { background: rgba(255,255,255,.22); color: #fff; }
.chips .check { margin-left: auto; }
.order-no { font-weight: 800; white-space: nowrap; }

/* ---- Order view (detail page and the admin drawer) ---- */
.order-view .ov-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.order-view .ov-meta { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.order-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.inline-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.inline-panel .form-grid { gap: 10px 14px; }
.inline-panel .form-actions { margin-top: 12px; }
.steps { list-style: none; display: flex; margin: 0 0 18px; padding: 0; counter-reset: step; }
.steps li { flex: 1 1 0; position: relative; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); padding-top: 26px; min-width: 0; }
.steps li::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #c9c9d1; z-index: 1; }
.steps li::after { content: ''; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: #d9d9df; }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--ink-2); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.done::after, .steps li.current::after { background: var(--ok); }
.steps li.current { color: var(--link); }
.steps li.current::before { background: var(--link); border-color: var(--link); box-shadow: 0 0 0 4px rgba(0,106,166,.15); }
.order-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.order-view.wide .order-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.order-grid .panel + .panel { margin-top: 0; }
.order-side { display: grid; gap: 16px; }
.line-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line-row:last-child { border-bottom: 0; }
.line-row .line-main b { font-size: 14.5px; }
.line-row .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.line-row .line-nums { text-align: right; font-size: 14px; white-space: nowrap; }
.line-row .line-nums .sub { margin-top: 2px; }
.line-row .line-install { grid-column: 2 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.install-form { display: inline-flex; gap: 6px; align-items: center; }
.install-form input { width: 64px; padding: 6px 8px; }
.kv { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.kv dd { margin: 0; white-space: pre-line; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.timeline li { position: relative; padding: 0 0 12px 18px; border-left: 2px solid var(--line); margin-left: 5px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--link); }
.timeline .when { display: block; font-size: 12px; color: var(--muted); }
.tracking-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #e6f1f8; border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }
.cancelled-box { background: #f1f1f3; border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }

/* ---- Admin hub (#/admin) ---- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 12px; cursor: pointer; font: inherit;
  color: inherit; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; border-top: 3px solid var(--slate); }
.tile:hover { border-color: var(--link); border-top-color: var(--link); }
.tile .tile-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile .tile-value { font-size: 30px; font-weight: 800; line-height: 1.15; }
.tile .tile-sub { font-size: 12.5px; color: var(--muted); }
.tile.alert { border-top-color: var(--accent); }
.tile.alert .tile-value { color: var(--action); }
.tile.good .tile-value { color: var(--ok); }
.tile.bad .tile-value { color: var(--danger); }
.queue-group + .queue-group { margin-top: 18px; }
.queue-group h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.queue-list { display: grid; gap: 8px; }
.queue-row { display: grid; grid-template-columns: 150px minmax(0, 1.5fr) minmax(0, 1fr) 70px 100px 110px; gap: 12px; align-items: center; padding: 11px 14px;
  border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.queue-row:hover { border-color: var(--link); box-shadow: var(--shadow); }
.queue-row .sub { display: block; font-size: 12.5px; color: var(--muted); }
.queue-row .num { text-align: right; }
.queue-empty { color: var(--muted); font-size: 14px; margin: 0; }
.drawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(20,20,30,.45); }
.drawer-panel { width: min(680px, 100%); height: 100%; background: var(--bg); overflow-y: auto; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.drawer-head { position: sticky; top: 0; z-index: 2; background: var(--slate); color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 3px solid var(--accent); }
.drawer-head h3 { color: #fff; }
.drawer-body { padding: 18px; }
.health-list { list-style: none; margin: 0; padding: 0; }
.health-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.health-list li:last-child { border-bottom: 0; }
.health-list .detail { color: var(--muted); font-size: 13.5px; }
.activity-table td { font-size: 13.5px; }

@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-row { grid-template-columns: 130px minmax(0, 1fr) 90px 110px; }
  .queue-row .q-po, .queue-row .q-signs { display: none; }
}
@media (max-width: 1000px) {
  .order-layout { grid-template-columns: 1fr; }
  .order-view.wide .order-grid { grid-template-columns: 1fr; }
  .cartbar { bottom: 0; width: auto; margin: 18px -24px -80px; padding: 10px 24px; border-radius: 0; box-shadow: none; border-bottom: 0; border-top: 3px solid var(--accent); }
}
@media (max-width: 700px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile .tile-value { font-size: 26px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { flex-direction: row; }
  .product-card .card-img { width: 128px; flex: none; aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--line); }
  .cartbar { margin: 18px -16px -80px; padding: 10px 16px; }
  .choices { grid-template-columns: 1fr; }
  .line-row { grid-template-columns: 84px minmax(0, 1fr); }
  .line-row .line-nums { grid-column: 2; text-align: left; }
  .line-row .line-install { grid-column: 1 / -1; }
  .kv { grid-template-columns: 92px minmax(0, 1fr); }
  .steps li { font-size: 11px; }
  .queue-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .queue-row .q-for { grid-column: 1 / -1; grid-row: 2; }
  .queue-row .q-total { display: none; }
  .chips .check { margin-left: 0; }
  .drawer-body { padding: 14px 12px; }
}

/* =====================================================================
   Step 4: sites list, site page, new-site wizard, CSV import
   ===================================================================== */
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---- Sites list ---- */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-bar .field { flex: 0 1 240px; min-width: 0; }
.filter-bar .field.grow { flex: 1 1 320px; }
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: #fafafb; }
.site-name { font-weight: 700; }

/* ---- Site page ---- */
.banner { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; font-size: 14.5px; }
.banner.decommissioned { background: #eceef0; border-left: 4px solid var(--slate); color: var(--ink-2); }
.site-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.site-top .panel + .panel { margin-top: 0; }
.addr-block { margin: 0 0 10px; }
.addr-block .addr-text { display: block; margin-top: 4px; }
.inline-panel.danger { border-color: #f0c2c5; }
.sign-grid { margin-top: 4px; }
.sign-card { border: 1px solid var(--line); box-shadow: none; }
.sign-card[data-status=damaged] { border-color: #f0c2c5; }
.sign-card .card-img > a { display: block; height: 100%; }
.sign-badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.sign-badges .pill { box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.sign-card .card-title { font-size: 14.5px; }
.sign-card .meta { font-size: 12.5px; color: var(--muted); }
.sign-card .meta.ood { color: var(--action); font-weight: 600; }
.sign-card .meta.notes { color: #9b1c1c; }
.sign-label { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--bg); border-radius: 6px; padding: 3px 8px; align-self: flex-start; }
.damaged-form { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; display: grid; gap: 8px; }
.damaged-form label { margin: 0; }
.damaged-form input { padding: 7px 9px; font-size: 13.5px; }
.damaged-form .form-actions { flex-wrap: wrap; gap: 6px; }
.damaged-form .msg { margin-top: 0; }

/* ---- New-site wizard ---- */
.wizard-steps { list-style: none; display: flex; gap: 8px; margin: 0 0 18px; padding: 0; }
.wizard-steps li { flex: 1 1 0; min-width: 0; }
.wizard-steps button, .wizard-steps .step-static { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font: inherit; color: var(--muted); text-align: left; font-weight: 600; font-size: 14px; }
.wizard-steps button { cursor: pointer; color: var(--ink-2); }
.wizard-steps button:hover { border-color: var(--link); color: var(--link); }
.wizard-steps button:focus-visible { outline: 3px solid rgba(0,106,166,.45); outline-offset: 2px; }
.wizard-steps .num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #f1f1f3; font-size: 13px; font-weight: 800; }
.wizard-steps .current .step-static { border-color: var(--link); color: var(--link); background: var(--link-soft); }
.wizard-steps .current .num { background: var(--link); color: #fff; }
.wizard-steps .done .num { background: var(--ok); color: #fff; }
.wizard-steps .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-title { margin: 0 0 12px; }
.wizard-nav { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.wizard-nav .grow { flex: 1; }
.wizard-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.wizard-review .panel + .panel { margin-top: 0; }
.review-lines { margin-top: 14px; border-top: 1px solid var(--line); }
.review-line { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-line .sub { display: block; font-size: 12.5px; color: var(--muted); }
.review-line .num { font-weight: 700; white-space: nowrap; }
.new-address { margin-top: 12px; padding: 14px; background: var(--bg); border-radius: 10px; }
.new-address .hint { margin-top: 10px; }

/* ---- CSV import ---- */
.import-panel h3 { margin: 20px 0 8px; }
.import-panel h3:first-child { margin-top: 0; }
.code-line { background: var(--bg); border-radius: 8px; padding: 10px 12px; font-size: 13px; overflow-x: auto; margin: 0 0 10px; white-space: pre; }
.plain-list { margin: 0 0 12px; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.plain-list li + li { margin-top: 4px; }
.import-pick { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.import-pick input[type=file] { flex: 1 1 260px; width: auto; min-width: 0; }
.paste { margin-top: 12px; font-size: 14px; }
.paste summary { cursor: pointer; color: var(--link); font-weight: 600; }
.paste textarea { margin-top: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.import-error { color: #9b1c1c; font-weight: 600; font-size: 13.5px; }
.table tr.row-error td { background: #fff7f7; }

@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .site-top, .wizard-review { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .stat-grid { grid-template-columns: 1fr; }
  .filter-bar .field, .filter-bar .field.grow { flex: 1 1 100%; }
  .head-actions { width: 100%; }
  .wizard-steps { gap: 4px; }
  .wizard-steps button, .wizard-steps .step-static { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 11.5px; text-align: center; }
  .wizard-steps .lbl { white-space: normal; }
  .wizard-nav .btn { padding: 11px 14px; }
  .review-line { grid-template-columns: 64px minmax(0, 1fr); }
  .review-line .num { grid-column: 2; }
  .table td[data-label=Result] { text-align: left; }
}
@media (max-width: 480px) {
  .sign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sign-card .card-body { padding: 10px; }
  .sign-card .card-title { font-size: 13.5px; }
  .sign-card .btn-sm { padding: 6px 8px; font-size: 12.5px; }
  .sign-badges .pill { font-size: 10.5px; padding: 2px 7px; }
}
.import-actions { margin-top: 14px; flex-wrap: wrap; }
.import-actions .btn { flex: none; }
.wz-side-next { margin-top: 14px; }
@media (max-width: 700px) {
  /* a cell with a main value and a sub line stays one right-aligned block when the table stacks into cards */
  .table td > .cell-val { display: block; text-align: right; min-width: 0; }
}

/* =====================================================================
   Step 6: Artwork & T&Cs (out of date, categories, current versions, all versions), bulk reorder review
   ===================================================================== */
body.modal-open { overflow: hidden; }
.banner.decommissioned { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.banner p { margin: 0; flex: 1 1 320px; }

.ood-overview { border-top: 3px solid var(--accent); }
.ood-overview .panel-head h3 { margin: 0; }
.ood-regions { display: grid; gap: 8px; }
.ood-region { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ood-region > summary { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 14px; cursor: pointer; list-style: none; }
.ood-region > summary::-webkit-details-marker { display: none; }
.ood-region > summary::before { content: '▸'; color: var(--muted); font-size: 12px; transition: transform .15s; }
.ood-region[open] > summary::before { transform: rotate(90deg); }
.ood-region-name { font-weight: 700; }
.ood-region-figs { color: var(--ink-2); font-size: 14px; margin-left: auto; }
.ood-region .table-wrap { padding: 0 14px 8px; }
.ood-table td, .ood-table th { font-size: 14px; }
.ood-table { table-layout: fixed; }
.ood-table th:nth-child(1) { width: 34%; }
.ood-table th:nth-child(2) { width: 24%; }
.ood-table th:nth-child(4) { width: 14%; }

.art-cats { margin-top: 18px; display: grid; gap: 14px; }
.art-cat > summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none; padding: 6px 2px 10px; }
.art-cat > summary::-webkit-details-marker { display: none; }
.art-cat > summary::before { content: '▸'; color: var(--muted); font-size: 13px; transition: transform .15s; align-self: center; }
.art-cat[open] > summary::before { transform: rotate(90deg); }
.art-cat-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.art-cat-meta { font-size: 13.5px; }
.art-cat-body { display: grid; gap: 14px; }
.art-cat-body .panel + .panel { margin-top: 0; }
.art-product .current-versions { margin-top: 14px; }
.art-product .empty-line { padding: 14px 0 4px; text-align: left; }
.upload-slot { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fcfcfd; }
.upload-slot-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.upload-slot-head h4 { margin: 0; font-size: 15px; }
.upload-slot-head .btn { flex: none; white-space: nowrap; overflow-wrap: normal; }
.ood-line { font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 6px; }
.ood-line.has-ood summary { cursor: pointer; color: var(--action); }
.ood-line.has-ood summary b { color: var(--action); }
.ood-sites { margin: 6px 0 0; padding-left: 16px; }
.ood-sites li + li { margin-top: 3px; }
.ood-sites .muted { display: block; font-size: 12px; }
.all-versions { margin-top: 14px; }
.all-versions > summary { cursor: pointer; font-weight: 600; color: var(--link); font-size: 14px; }
.all-versions .table-wrap { margin-top: 8px; }
.versions-table td { vertical-align: middle; }
.versions-table tr.is-current td { background: #f6fbf8; }
.cell-thumb { width: 96px; }
.cell-thumb .thumb { width: 88px; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .btn + .btn, .table .actions .btn + a, .table .actions a + .btn { margin-left: 6px; }
.table tr.flash td { box-shadow: inset 0 0 0 9999px rgba(241,93,34,.08); }
.confirm-row td { background: #fffaf3; }
.inline-confirm p { margin: 0 0 10px; font-size: 14px; }

.bulk-modal { align-items: start; }
.bulk-card { max-width: 860px; max-height: none; margin: 10px 0; }
.bulk-intro { font-size: 14px; margin: 0 0 14px; }
.bulk-form { margin-bottom: 12px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.seg { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 0 2px; }
.bulk-regions { display: grid; gap: 12px; }
.bulk-region { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.bulk-region.off { background: #fafafb; }
.bulk-region.off .table-wrap, .bulk-region.off .bulk-totals { opacity: .55; }
.bulk-region-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.bulk-region-total { font-size: 16px; }
.bulk-deliver { font-size: 13.5px; margin: 6px 0 4px; }
.bulk-region .msg { margin: 8px 0; }
.bulk-lines td, .bulk-lines th { font-size: 13.5px; }
.bulk-totals { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 3px 18px; margin: 8px 0 0; font-size: 13.5px; }
.bulk-totals dt { color: var(--ink-2); text-align: right; }
.bulk-totals dd { margin: 0; text-align: right; }
.bulk-foot { position: sticky; bottom: -22px; background: #fff; border-top: 1px solid var(--line); margin: 14px -22px -22px; padding: 12px 22px 16px; }
.bulk-grand { margin: 0; font-size: 15px; }
.bulk-foot .modal-actions { margin-top: 10px; }
.bulk-placed { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.bulk-placed li { display: flex; gap: 10px 14px; align-items: baseline; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.bulk-placed li span { color: var(--ink-2); flex: 1 1 200px; }
.stat-links { display: flex; gap: 14px; flex-wrap: wrap; }
.stat-of { font-weight: 500; font-size: 12.5px; }
.line-site { color: var(--ink-2) !important; }

/* =====================================================================
   Step 7: Stock
   ===================================================================== */
.stock-table td { vertical-align: middle; }
.stock-table .num, .stock-table th.num { text-align: right; }
.stock-table [data-on-hand] { font-size: 17px; }
.form-row > td { background: #fafafb; padding: 12px; }
.form-row .inline-panel { margin: 0; }
.alloc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.movements { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.movements li { display: flex; gap: 12px; align-items: baseline; font-size: 14px; }
.mv-qty { flex: none; min-width: 44px; text-align: right; font-weight: 800; }
.mv-qty.in { color: var(--ok); }
.mv-qty.out { color: var(--action); }
.mv-main .sub { display: block; font-size: 12.5px; color: var(--muted); }

@media (max-width: 700px) {
  .ood-region-figs { margin-left: 0; width: 100%; }
  .ood-region .table-wrap { padding: 0 12px 6px; }
  .cell-thumb { width: auto; }
  .table td.cell-thumb { justify-content: flex-start; }
  .table td.cell-thumb::before { content: none; }
  .cell-thumb .thumb { width: 120px; }
  .table .actions { white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; }
  .table .actions .btn + .btn, .table .actions .btn + a, .table .actions a + .btn { margin-left: 0; }
  .bulk-modal { padding: 8px; }
  .bulk-card { margin: 0; }
  .bulk-foot { margin: 14px -22px -22px; }
  .bulk-totals { justify-content: stretch; grid-template-columns: 1fr auto; }
  .alloc-grid { grid-template-columns: 1fr; }
  .form-row > td { padding: 8px 0; }
  .form-row > td::before { content: none; }
  .table td.form-row, .table tr.form-row td { display: block; text-align: left; }
  .table tr.confirm-row td { display: block; text-align: left; }
  .table tr.confirm-row td::before { content: none; }
  .movements li { font-size: 13.5px; }
}

/* =====================================================================
   Site photos & site plan (SC-20261003-13): the section under "Current signs", the photo corner on a sign card,
   the upload panel and the lightbox
   ===================================================================== */
.sign-no { font-weight: 600; font-size: 12px; color: var(--muted); margin-left: 2px; }
.sign-card.flash { box-shadow: 0 0 0 3px rgba(241,93,34,.55); transition: box-shadow .3s; }
.sign-photo-slot { position: absolute; right: 8px; bottom: 8px; z-index: 1; }
.sign-photo { position: relative; display: block; width: 58px; height: 58px; padding: 0; border: 2px solid #fff; border-radius: 9px;
  overflow: hidden; background: #ddd; cursor: pointer; box-shadow: 0 2px 8px rgba(20,20,30,.28); }
.sign-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sign-photo:focus-visible { outline: 3px solid rgba(0,106,166,.55); outline-offset: 1px; }
.sign-photo-n { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 3px;
  background: rgba(27,27,31,.72); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 0; }
.sign-photo-n svg { width: 12px; height: 12px; }

.photos-panel .panel-head p { margin-top: 4px; }
.photo-sub { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }
.photo-sub + .photo-grid, .photo-sub + .plan-grid { margin-top: 0; }
.plan-grid + .photo-sub { margin-top: 20px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.photo-tile { font: inherit; text-align: left; color: inherit; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column; min-width: 0; transition: box-shadow .15s, border-color .15s; }
.photo-tile:hover { border-color: #c9ccd2; box-shadow: var(--shadow); }
.photo-tile:focus-visible { outline: 3px solid rgba(0,106,166,.45); outline-offset: 2px; }
.photo-tile-img { display: block; aspect-ratio: 3 / 4; background: #eceef0; overflow: hidden; }
.photo-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile.big .photo-tile-img { aspect-ratio: 4 / 3; background: #f7f7f9; }
.photo-tile.big .photo-tile-img img { object-fit: contain; }
.photo-tile[data-kind=plan] { border-color: #b9c3c9; }
.photo-tile-body { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; min-width: 0; }
.photo-tile-cap { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.photo-tile-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-tile.big .photo-tile-cap { font-size: 14px; }

.photo-upload h4 { margin: 0 0 12px; font-size: 15px; }
/* long sign names in the selects must not widen the grid past a phone screen */
.photo-upload .form-grid, .lb-edit .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.photo-upload select, .lb-edit select { min-width: 0; text-overflow: ellipsis; }
/* the real file input is visually hidden (the "Choose photos" label opens it); the global file-input rule must not widen it */
.dropzone input[type=file].sr-only { width: 1px; height: 1px; padding: 0; border: 0; margin: -1px; left: 0; top: 0; }
.dropzone { position: relative; margin-top: 14px; border: 2px dashed #c4c8cf; border-radius: 12px; background: #fafafb; padding: 18px 16px; text-align: center; transition: background .15s, border-color .15s; }
.dropzone.over { border-color: var(--link); background: var(--link-soft); }
.dropzone .dz-icon { width: 30px; height: 30px; color: var(--slate); }
.dropzone .dz-line { margin: 6px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dropzone .dz-pick { margin: 0; color: var(--ink); }
.dropzone .hint { max-width: 560px; margin: 10px auto 0; }
.upload-queue { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.queue-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px) minmax(0, 1.4fr) 64px; align-items: center; gap: 6px 12px;
  font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.queue-item .q-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item .q-bar { max-width: none; }
.queue-item .q-note { font-size: 12.5px; color: var(--muted); }
.queue-item[data-state=done] { border-color: #9fd8b5; }
.queue-item[data-state=done] .q-bar span { background: var(--ok); }
.queue-item[data-state=done] .q-note { color: var(--ok); font-weight: 600; }
.queue-item[data-state=failed] { border-color: #f0c2c5; background: #fffafa; }
.queue-item[data-state=failed] .q-note { color: #9b1c1c; }
.queue-item .btn-link { padding: 2px 4px; }

.lightbox { background: rgba(14,16,20,.86); padding: 16px; z-index: 60; }
.lb-card { width: 100%; max-width: 1040px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #16181c; color: #f1f2f4;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; }
.lb-count { font-size: 13px; font-weight: 600; color: #b9bcc4; }
.lb-close { font: inherit; font-size: 26px; line-height: 1; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,.16); }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; background: #0d0e10; min-height: 200px; flex: 1 1 auto; min-height: 0; }
.lb-img { display: block; max-width: 100%; max-height: calc(100vh - 250px); width: auto; height: auto; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 64px; border: 0; border-radius: 10px; font: inherit; font-size: 36px; line-height: 1;
  color: #fff; background: rgba(0,0,0,.45); cursor: pointer; }
.lb-nav:hover { background: rgba(0,0,0,.7); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 3px solid rgba(241,93,34,.8); outline-offset: 2px; }
.lb-info { padding: 14px 18px 16px; background: #fff; color: var(--ink); overflow: auto; flex: none; max-height: 45vh; }
.lb-caption { font-size: 15.5px; font-weight: 600; margin: 0 0 4px; }
.lb-meta { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.lb-sign { font-size: 13.5px; margin: 0; display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.lb-sign .btn-link { padding: 2px 4px; }
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.lb-confirm { margin-top: 12px; padding: 10px 12px; border: 1px solid #f0c2c5; border-radius: 10px; background: #fffafa; }
.lb-confirm p { margin: 0 0 8px; font-size: 14px; }
.lb-edit .form-grid { gap: 10px 14px; }

@media (max-width: 700px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-tile-meta { white-space: normal; }
  .plan-grid { grid-template-columns: 1fr; }
  .photo-upload .form-grid, .lb-edit .form-grid { grid-template-columns: minmax(0, 1fr); }
  .queue-item { grid-template-columns: minmax(0, 1fr) 64px; }
  .queue-item .q-bar { grid-column: 1 / -1; grid-row: 2; }
  .queue-item .q-note { grid-column: 1 / -1; grid-row: 3; }
  .lightbox { padding: 0; place-items: stretch; }
  .lb-card { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  .lb-img { max-height: calc(100vh - 290px); }
  .lb-nav { width: 40px; height: 54px; font-size: 30px; }
  .lb-nav.prev { left: 6px; }
  .lb-nav.next { right: 6px; }
}
@media (max-width: 480px) {
  .sign-photo { width: 46px; height: 46px; border-radius: 8px; }
  .sign-photo-slot { right: 6px; bottom: 6px; }
}

/* =====================================================================
   SC-20261003-14: Sites as the home page (big search, stats strip), the site page's header and History timeline,
   "Which site?" before the cart, the Installers page
   ===================================================================== */
.btn-big { padding: 13px 22px; font-size: 16px; border-radius: 10px; }
.btn-inline { padding: 0 2px; font-size: inherit; vertical-align: baseline; }
.btn-icon { min-width: 34px; padding: 6px 8px; font-size: 15px; line-height: 1; }
.table th.num, .table td.num { text-align: right; }

/* ---- the big search box (Sites, Which site?) ---- */
.site-search { position: relative; margin: 0 0 14px; }
.site-search .search-icon { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.site-search input[type=search] { font-size: 17px; padding: 15px 16px 15px 48px; border-radius: 12px; border: 2px solid #cfd3d8; background: #fff; box-shadow: var(--shadow); }
.site-search input[type=search]:focus { border-color: var(--link); }

/* ---- the stats strip ---- */
.stats-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.stat-pill { font: inherit; color: var(--ink); text-align: left; text-decoration: none; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 0; }
.stat-pill b { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.stat-pill span { font-size: 13.5px; color: var(--ink-2); }
a.stat-pill:hover, button.stat-pill:hover { border-color: var(--link); }
button.stat-pill { cursor: pointer; }
.stat-pill.alert b { color: var(--action); }
.stat-pill.alert { border-top: 3px solid var(--accent); }
.stat-pill.on { border-color: var(--link); background: var(--link-soft); }
.filter-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.filter-row .field { flex: 0 1 220px; min-width: 0; }
.filter-row .chips { margin: 0; flex: 1 1 420px; }
.filter-row select { padding: 8px 10px; }
.sites-table .pill + .sub, .sites-table .sub { margin-top: 2px; }

/* ---- the site page header ---- */
.site-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin: 0 0 20px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; border-left: 5px solid var(--slate); }
.site-hero-main { min-width: 0; flex: 1 1 420px; }
.site-hero .crumb { margin: 0 0 6px; font-size: 13.5px; }
.site-hero h2 { font-size: 26px; }
.site-hero-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; }
.site-hero-meta > span:not(.pill) + span:not(.pill)::before { content: '·'; margin-right: 14px; color: #b9bcc4; }
.site-hero-addr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; font-size: 14.5px; }
.pin { width: 17px; height: 17px; color: var(--accent); flex: none; }
.site-hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.site-hero-actions .head-actions { justify-content: flex-end; }
.site-top { margin-top: 18px; }
.page .sites-table td.nil .muted { color: #b9bcc4; }

/* ---- History timeline ---- */
.tl-chips { margin-bottom: 14px; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 16px; padding: 0 0 18px; }
.tl-item::before { content: ''; position: absolute; left: 164px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.tl-item:last-child::before { bottom: 12px; }
.tl-item::after { content: ''; position: absolute; left: 159px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--link); box-shadow: 0 0 0 3px #fff; }
.tl-sign::after { background: var(--ok); }
.tl-sign[data-event=damaged]::after { background: var(--danger); }
.tl-sign[data-event=removed]::after, .tl-sign[data-event=replaced]::after { background: #9aa0a8; }
.tl-photo::after { background: var(--accent); }
.tl-when { font-size: 12.5px; color: var(--muted); font-weight: 600; padding-top: 1px; text-align: right; padding-right: 22px; }
.tl-body { min-width: 0; padding-left: 14px; }
.tl-title { display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; font-size: 14.5px; }
.tl-kind { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tl-meta { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.tl-lines { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13.5px; display: grid; gap: 3px; }
.tl-lines .muted { display: inline; margin-left: 4px; }
.tl-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.tl-thumb { width: 56px; height: 56px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #eceef0; cursor: pointer; }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-thumb:hover { border-color: var(--link); }
.tl-thumb:focus-visible { outline: 3px solid rgba(0,106,166,.45); outline-offset: 2px; }
.tl-more { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.tl-signs { margin-top: 4px; font-size: 13px; }
.tl-signs summary { cursor: pointer; color: var(--link); font-weight: 600; }
.tl-signs ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; }

/* ---- Which site? (#/order) ---- */
.order-steps { list-style: none; display: flex; gap: 8px; margin: 0 0 16px; padding: 0; flex-wrap: wrap; }
.order-steps li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 12px 6px 6px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.order-steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f1f1f3; font-size: 12.5px; font-weight: 800; }
.order-steps li.current { color: var(--link); border-color: var(--link); background: var(--link-soft); }
.order-steps li.current span { background: var(--link); color: #fff; }
.pick-panel .site-search input[type=search] { box-shadow: none; }
.pick-head { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pick-site { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none;
  color: var(--ink) !important; background: #fff; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.pick-site:hover, .pick-site:focus-visible { border-color: var(--link); box-shadow: var(--shadow); outline: none; }
.pick-name { font-weight: 700; font-size: 15px; }
.pick-sub { font-size: 13px; color: var(--ink-2); }
.pick-figs { font-size: 12.5px; color: var(--muted); }
.pick-foot { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.pick-stock { margin-top: 14px; }

/* ---- the cart: the site pinned at the top ---- */
.cart-for { display: grid; gap: 2px; margin: -20px -22px 14px; padding: 14px 22px 12px; background: var(--slate); color: #fff; border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 3px solid var(--accent); position: relative; }
.cart-for-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #cfd6da; }
.page a.cart-for-name, .cart-for-name { color: #fff !important; font-size: 18px; font-weight: 800; text-decoration: none; line-height: 1.25; padding-right: 92px; }
.cart-for-sub { font-size: 12.5px; color: #dfe4e7; }
.page a.cart-for-change { position: absolute; top: 14px; right: 18px; color: #fff !important; font-size: 13px; font-weight: 600; }
.cart-for.stock { background: #5b5f66; }
.banner.stock-order { background: #fff5dd; border-left: 4px solid #b7791f; color: #5c3d00; }
.mcb-for { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mcb-site { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }

/* ---- Installers ---- */
.inst-regions { display: grid; gap: 10px; }
.inst-region { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.inst-region > summary { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; list-style: none; }
.inst-region > summary::-webkit-details-marker { display: none; }
.inst-region > summary::before { content: '▸'; color: var(--muted); font-size: 12px; transition: transform .15s; }
.inst-region[open] > summary::before { transform: rotate(90deg); }
.inst-region-name { font-weight: 800; font-size: 16.5px; }
.inst-region-figs { margin-left: auto; color: var(--ink-2); font-size: 13.5px; }
.inst-body { padding: 0 18px 16px; }
.inst-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inst-list.off { margin-top: 10px; }
.inst-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; }
.inst-row.off { background: #fafafb; color: var(--muted); }
.inst-row.editing { display: block; padding: 0; border: 0; background: none; }
.inst-row.editing .inline-panel { margin: 0; }
.inst-row[draggable=true] { cursor: grab; }
.inst-row.dragging { opacity: .5; }
.inst-row.drop-before { box-shadow: 0 -3px 0 var(--link); }
.inst-row.drop-after { box-shadow: 0 3px 0 var(--link); }
.inst-rank { display: flex; align-items: center; justify-content: center; gap: 4px; font-weight: 800; font-size: 16px; color: var(--slate); }
.inst-rank .grip { color: #b9bcc4; font-size: 12px; letter-spacing: -2px; }
.inst-list > li:first-child .inst-rank:not(.off) { color: var(--ok); }
.inst-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inst-name { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.inst-main .sub { font-size: 13px; color: var(--muted); }
.inst-main .notes { color: var(--ink-2); font-style: italic; white-space: pre-line; }
.inst-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.inst-confirm { grid-column: 1 / -1; border: 1px solid #f0c2c5; background: #fffafa; border-radius: 9px; padding: 10px 12px; }
.inst-confirm p { margin: 0 0 8px; font-size: 14px; }
.inst-add { margin-top: 12px; }
.inst-form h4 { margin: 0 0 12px; font-size: 15px; }
.inst-body > .inst-form { margin-top: 12px; }
.installers-note { margin: -6px 0 12px; }

@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-hero-actions { align-items: stretch; width: 100%; }
  .site-hero-actions .head-actions { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .site-search input[type=search] { font-size: 16px; padding: 13px 12px 13px 42px; }
  .site-search .search-icon { left: 13px; width: 20px; height: 20px; }
  .stats-strip { gap: 8px; }
  .stat-pill { padding: 8px 10px; gap: 2px 6px; }
  .stat-pill b { font-size: 19px; }
  .stat-pill span { font-size: 12.5px; }
  .filter-row .field, .filter-row .chips { flex: 1 1 100%; }
  .site-hero { padding: 14px 16px; }
  .site-hero h2 { font-size: 22px; }
  .site-hero-actions .btn-big { width: 100%; }
  .tl-item { grid-template-columns: minmax(0, 1fr); padding-left: 22px; gap: 2px; }
  .tl-item::before { left: 5px; }
  .tl-item::after { left: 0; }
  .tl-when { text-align: left; padding-right: 0; }
  .tl-body { padding-left: 0; }
  .pick-grid { grid-template-columns: minmax(0, 1fr); }
  .cart-for { margin: -16px -16px 12px; padding: 12px 16px 10px; }
  .inst-row { grid-template-columns: 34px minmax(0, 1fr); }
  .inst-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .inst-region > summary { padding: 12px 14px; }
  .inst-region-figs { margin-left: 0; width: 100%; }
  .inst-body { padding: 0 12px 12px; }
  .table td.num { text-align: right; }
  .sites-table td.nil { display: none; }   /* phones: no rows of dashes */
}

/* =====================================================================
   SC-20261004-02: the site layout map, "Missing photo" / "Add photo" on the sign cards, "Notify installer" and the
   photo links, and the installer's phone page (public/p.html)
   ===================================================================== */
/* Current signs: the head carries "n of m signs photographed" and Notify installer */
.signs-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.photo-progress { font-size: 12.5px; padding: 4px 10px; }
.missing-slot:empty { display: none; }
.missing-slot .pill { box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.btn-add-photo svg { width: 16px; height: 16px; }
.sign-upload { margin: 0; font-size: 12.5px; color: var(--muted); }
.sign-upload[data-state=failed] { color: #9b1c1c; }
.sign-upload[data-state=uploading], .sign-upload[data-state=working] { color: var(--link-dark); font-weight: 600; }
/* the sign card's camera input: visually hidden; the global file-input rule must not widen the page */
input[type=file].quick-photo-input { position: fixed; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }

/* Site layout */
.layout-panel .panel-head p { margin-top: 4px; }
.site-map { height: 460px; border-radius: 10px; overflow: hidden; background: #2f3a36; border: 1px solid var(--line); z-index: 0; }
.layout-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.layout-body.placing { grid-template-columns: minmax(0, 1fr) 320px; }
.layout-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; background: #fff5dd; color: #5c3d00;
  border-left: 4px solid var(--warn); }
.layout-banner p { margin: 0; flex: 1 1 320px; }
.layout-empty { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--link-soft); color: var(--link-dark); font-size: 14px; }
.layout-side { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 460px; min-width: 0; }
.layout-steps { margin: 0; font-size: 13.5px; display: flex; flex-direction: column; gap: 2px; }
.layout-left { margin: 0; font-size: 12.5px; }
.layout-list { list-style: none; margin: 0; padding: 0; overflow: auto; display: grid; gap: 6px; flex: 1 1 auto; min-height: 0; }
.layout-sign { font: inherit; width: 100%; text-align: left; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; color: inherit; }
.layout-sign:hover { border-color: #c4c8cf; }
.layout-sign.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(241,93,34,.35); background: #fff8f4; }
.layout-sign-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; }
.layout-sign-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layout-sign-text .muted { font-size: 12px; }
.layout-dot { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.layout-save { display: flex; gap: 8px; align-items: center; padding-top: 4px; border-top: 1px solid var(--line); }
.layout-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); }
.layout-legend span { display: inline-flex; align-items: center; gap: 6px; }
.layout-legend i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }

/* the pins (Leaflet divIcons; the hub draws them, no image files) */
.map-pin-icon { background: none; border: 0; }
.map-pin { position: relative; display: block; width: 30px; height: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); cursor: pointer; }
.map-pin svg { display: block; }
.map-pin b { position: absolute; left: 0; right: 0; top: 6px; text-align: center; color: #fff; font: 800 13px/16px var(--font); pointer-events: none; }
.map-pin.selected svg path { stroke: var(--accent); stroke-width: 4; }
.map-pin.selected { transform: scale(1.18); transform-origin: 50% 100%; }
.map-pin.pending svg path { stroke-dasharray: 4 3; }
.pin-pop { display: flex; flex-direction: column; gap: 3px; font: 13px/1.35 var(--font); color: var(--ink); min-width: 170px; }
.pin-pop-img { padding: 0; border: 0; background: #eceef0; border-radius: 8px; overflow: hidden; cursor: pointer; margin-bottom: 4px; }
.pin-pop-img img, .pin-pop-thumb { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 8px; }
.pin-pop-thumb { margin-bottom: 4px; }
.pin-pop-missing { margin: 0 0 4px; padding: 14px 8px; text-align: center; border-radius: 8px; background: #fdecec; color: #9b1c1c; font-weight: 700; }
.pin-pop-ordered { margin: 0 0 4px; padding: 10px 8px; text-align: center; border-radius: 8px; background: #f1f1f3; color: var(--muted); }
.pin-pop-title { font-size: 13.5px; }
.pin-pop-meta { color: var(--muted); font-size: 12px; }
.pin-pop-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.leaflet-container { font-family: var(--font); }
.leaflet-container .btn-primary { color: #fff; }
.leaflet-popup-content { margin: 12px 14px; }

/* Notify installer */
.notify-card { max-width: 560px; }
.notify-card .modal-head h3 { font-size: 18px; }
.notify-x { background: #f1f1f3; color: var(--ink); font-size: 24px; width: 36px; height: 36px; }
.notify-x:hover { background: #e4e4e8; }
.notify-lead { font-size: 15px; }
.notify-signs { margin: 0 0 14px; font-size: 14px; }
.notify-signs summary { cursor: pointer; color: var(--link); font-weight: 600; }
.notify-signs ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.notify-to { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; min-width: 0; }
.notify-to legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.radio-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; margin: 0; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 9px; font-weight: 400; font-size: 14px; color: var(--ink); cursor: pointer; }
.radio-row:has(input:checked) { border-color: var(--link); background: var(--link-soft); }
.radio-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--link); }
.radio-sub { display: block; font-size: 12.5px; }
.notify-card .field + .field { margin-top: 12px; }
.notify-card textarea { width: 100%; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
.copy-row .btn { flex: none; white-space: nowrap; overflow-wrap: normal; }

/* the photo links at the foot of Photos & site plan */
.links-row { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.links-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link-item { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; }
.link-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.link-meta { font-size: 12.5px; }
.link-confirm { display: inline-flex; gap: 6px; align-items: center; }

@media (max-width: 900px) {
  .layout-body.placing { grid-template-columns: minmax(0, 1fr); }
  .layout-side { max-height: none; }
  .layout-list { max-height: 50vh; }
}
@media (max-width: 700px) {
  .site-map { height: 60vh; min-height: 280px; }
  .signs-head { width: 100%; }
  .copy-row { flex-direction: column; }
}

/* ---- the installer's phone page (/p/<token>): no app nav, big touch targets ---- */
body.plink { background: var(--bg); }
.plink-bar { background: var(--slate); border-bottom: 3px solid var(--accent); }
.plink-bar-inner { max-width: 760px; margin: 0 auto; padding: 10px 16px; min-height: 52px; }
.plink-main { max-width: 760px; margin: 0 auto; padding: 16px 16px 60px; }
.pl-hero h1 { font-size: 23px; margin: 0 0 4px; }
.pl-hero h1 span { color: var(--slate); }
.pl-addr { display: flex; gap: 6px; align-items: flex-start; color: var(--ink-2); font-size: 14.5px; margin: 0 0 12px; }
.pl-addr svg, .pl-locate svg, .pl-place-btn svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pl-progress { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.pl-progress p { margin: 8px 0 0; font-size: 15px; }
.pl-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pl-bar span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.pl-thanks { background: #e6f6ec; color: #16693a; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.pl-thanks h2 { font-size: 20px; margin: 0 0 4px; }
.pl-thanks p { margin: 0; }
.pl-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pl-locate { width: 100%; background: #fff; }
.pl-locate.on { border-color: #1a73e8; color: #1a5fc4; }
.pl-near { margin: 0; padding: 10px 12px; border-radius: 10px; background: #e8f0fe; color: #174ea6; font-size: 15px; }
.pl-placing { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--slate); color: #fff; font-size: 15px; }
.pl-placing p { margin: 0; }
.pl-placing .btn-link { color: #fff; }
.pl-placing-actions { display: inline-flex; gap: 6px; }
.pl-map { height: 52vh; min-height: 260px; border-radius: 12px; overflow: hidden; background: #2f3a36; margin-bottom: 14px; z-index: 0; }
.pl-signs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pl-sign { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 12px; border: 2px solid transparent; display: grid; gap: 10px; }
.pl-sign[data-state=missing] { border-color: #f6c9c9; }
.pl-sign[data-near] { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,.18), var(--shadow); }
.pl-sign-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.pl-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; display: block; background: #eceef0; }
.pl-thumb-empty { display: grid; place-items: center; color: #9b1c1c; background: #fdecec; }
.pl-thumb-empty svg { width: 28px; height: 28px; }
.pl-sign-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; }
.pl-sign-name { font-size: 16px; line-height: 1.25; }
.pl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-sign-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pl-sign-actions:has(.pl-place-btn) { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.pl-add { position: relative; margin: 0; min-height: 52px; font-size: 17px; width: 100%; }
.pl-add svg { width: 22px; height: 22px; }
.pl-add.btn-primary { color: #fff; }
.pl-add.disabled { opacity: .55; pointer-events: none; }
.pl-place-btn { min-height: 52px; width: 100%; }
/* the real file inputs sit invisibly over their buttons (a tap on the button is a tap on the input - phones need that) */
.pl-file, input[type=file].pl-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; font-size: 0; }
.pl-library { position: relative; justify-self: center; margin: -4px 0 0; padding: 4px 8px; font-size: 13.5px; font-weight: 500; color: var(--link); text-decoration: underline; cursor: pointer; }
.pl-job { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; font-size: 14px; }
.pl-job-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pl-job-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.pl-job[data-state=done] .pl-job-bar span { background: var(--ok); }
.pl-job[data-state=done] .pl-job-note { color: var(--ok); font-weight: 700; }
.pl-job[data-state=waiting] .pl-job-note { color: #7a5200; font-weight: 600; }
.pl-job[data-state=failed] .pl-job-note { color: #9b1c1c; font-weight: 600; }
.pl-job .btn { justify-self: start; }
.pl-foot { margin: 18px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.pl-gone { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 22px 18px; text-align: center; margin-top: 20px; }
.pl-gone h1 { font-size: 21px; margin-bottom: 8px; }

/* ---- The installer's job page (/p/<token> for an install job, SC-20261004-04) ---- */
.pj-kicker { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pj-kicker b { color: var(--slate); }
.pj-offer { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; border-left: 5px solid var(--accent); }
.pj-offer p { margin: 0; font-size: 15.5px; }
.pj-offer[data-state=accepted] { border-left-color: var(--ok); background: #f3fbf6; }
.pj-offer-actions { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.pj-offer-actions .btn { min-height: 52px; width: 100%; }
.pj-pass { margin-top: 12px; }
.pj-pass label { font-size: 14px; }
.pj-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 16px 0 8px; flex-wrap: wrap; }
.pj-head h2 { font-size: 19px; }
.pj-note { display: grid; gap: 4px; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.pj-signs { margin-bottom: 16px; }
.pj-sign[data-state=ordered] { border-color: #f4d3c4; }
.pj-sign[data-state=installed] { border-color: #bfe5cd; }
.pl-thumb.pj-art { object-fit: contain; background: #fff; border: 1px solid var(--line); }
.pj-replaces { display: inline-block; align-self: flex-start; margin-top: 2px; padding: 3px 8px; border-radius: 8px; background: #fff5dd; color: #7a5200; font-weight: 700; font-size: 13.5px; }
.pj-install { font-size: 17px; }
.pj-sub { display: flex; align-items: center; justify-content: center; gap: 4px 12px; flex-wrap: wrap; margin-top: -4px; }
.pj-sub .pl-library { margin: 0; justify-self: auto; }
.pj-sub .btn-link { color: var(--link); padding: 4px 8px; font-size: 13.5px; }
.pj-hint { margin: 0; font-size: 13px; color: var(--muted); }
.pj-more { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; margin-top: 4px; }
.pj-more summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.pj-more .pl-signs { margin-top: 10px; }
.pj-more .pl-sign { box-shadow: none; border: 1px solid var(--line); }

/* ---- The order page's Install card (SC-20261004-04) ---- */
.install-card { border-top: 3px solid var(--slate); }
.install-card[data-job-status=offered] { border-top-color: var(--warn); }
.install-card[data-job-status=accepted] { border-top-color: var(--link); }
.install-card[data-job-status=done] { border-top-color: var(--ok); }
.install-card[data-job-status=unassigned] { border-top-color: var(--danger); }
.ij-line { margin: 10px 0 4px; font-size: 14.5px; }
.ij-signs { margin: 0 0 10px; font-size: 13.5px; }
.ij-link { margin: 10px 0 12px; }
.ij-link .hint { margin-top: 6px; }
.ij-events { margin-top: 10px; }
.ij-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ij-offer, .install-card .inline-panel { margin: 12px 0 0; display: grid; gap: 8px; }
.ij-offer h4, .install-card .inline-panel h4 { margin: 0; font-size: 15px; }
.ij-offer .radio-row select { margin-top: 6px; }
.ij-offer .form-actions, .install-card .inline-panel .form-actions { margin-top: 4px; }
.pill.job-badge { margin-left: 2px; }

/* ---- The site page's install job chip and History items (SC-20261004-04) ---- */
.tl-job::after { background: var(--slate); }
.tl-job-events { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13.5px; color: var(--ink-2); }
.tl-job-events .when { color: var(--muted); margin-right: 6px; white-space: nowrap; }
.page .site-hero-meta a.pill.job-chip { white-space: normal; text-decoration: none; font-size: 12.5px; padding: 4px 10px; }
.page .site-hero-meta a.pill.job-chip.amber { color: #7a5200; }
.page .site-hero-meta a.pill.job-chip.blue { color: var(--link-dark); }
.page .site-hero-meta a.pill.job-chip.red { color: #9b1c1c; }
.page .site-hero-meta a.pill.job-chip:hover { text-decoration: underline; }

/* ---- Rollouts (SC-20261004-05): one artwork change followed across every site ---- */
.stats-strip.has-rollouts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-pill.rollouts { border-top: 3px solid var(--link); }
.stat-pill.rollouts b { color: var(--link); }
.ro-group-title { font-size: 15px; margin: 0 0 10px; }
.ro-cards { display: grid; gap: 14px; }
.ro-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; }
.panel + .ro-card, .ro-card + .ro-card { margin-top: 0; }
.ro-thumb { display: block; aspect-ratio: 16 / 10; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-decoration: none; }
.ro-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ro-thumb .no-thumb { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--muted); }
.ro-main { min-width: 0; }
.ro-title { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.ro-title h3 { margin: 0; }
.ro-version { margin: 6px 0 2px; font-size: 14.5px; }
.ro-made { margin: 0 0 10px; font-size: 13px; }
.ro-done { margin: 0 0 6px; font-size: 14.5px; }
.ro-done b { font-size: 16px; }
.ro-done.big b { font-size: 22px; font-weight: 800; }
.ro-bar { display: flex; height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ro-seg { display: block; height: 100%; }
.ro-seg[data-seg=photographed], .ro-dot[data-dot=photographed] { background: #16693a; }
.ro-seg[data-seg=installed], .ro-dot[data-dot=installed] { background: #5bbf83; }
.ro-seg[data-seg=dispatched], .ro-dot[data-dot=dispatched] { background: var(--link); }
.ro-seg[data-seg=ordered], .ro-dot[data-dot=ordered] { background: #e0a526; }
.ro-seg[data-seg=behind], .ro-dot[data-dot=behind] { background: #e8794a; }
.ro-counts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); }
.ro-counts li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ro-counts li.nil { color: var(--muted); }
.ro-counts li.nil b { color: var(--muted); font-weight: 600; }
.ro-counts b { color: var(--ink); }
.ro-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ro-completed { margin-top: 18px; }
.ro-completed > summary { cursor: pointer; font-weight: 700; font-size: 15px; padding: 8px 0; }
.ro-completed > summary .hint { display: inline; margin: 0 0 0 8px; font-weight: 400; }
.ro-completed[open] > summary { margin-bottom: 10px; }
.ro-crumb { margin: 0 0 10px; font-size: 14px; }
.ro-hero { border-top: 3px solid var(--accent); }
.ro-hero[data-in-motion="0"] { border-top-color: var(--ok); }
.ro-hero-top { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px 20px; align-items: start; margin-bottom: 14px; }
.ro-hero-main { min-width: 0; }
.ro-hero-main h2 { font-size: 24px; margin: 0 0 8px; }
.ro-hero-main .ro-version { margin-top: 8px; }
.ro-kicker { margin: 0 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ro-hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ro-hero-actions .hint { margin: 0; text-align: right; }
.ro-rules { margin-top: 12px; }
.ro-chips { margin: 18px 0 14px; }
.ro-region { margin-top: 14px; }
.ro-region .panel-head { align-items: center; }
.ro-region .panel-head h3 { margin: 0; }
.ro-noaddr { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.ro-table { table-layout: fixed; }   /* the same columns in every region's table */
.ro-table th:nth-child(1) { width: 27%; }
.ro-table th:nth-child(2) { width: 7%; }
.ro-table th:nth-child(3) { width: 11%; }
.ro-table th:nth-child(4) { width: 15%; }
.ro-table th:nth-child(5) { width: 12%; }
.ro-table th:nth-child(6) { width: 16%; }
.ro-table th:nth-child(7) { width: 12%; }
.ro-table td { vertical-align: top; }
.ro-table th.num, .ro-table td.num { text-align: right; }
.ro-stage { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.ro-order { display: block; }
.ro-order + .ro-order { margin-top: 4px; }
.ro-yes { color: var(--ok); font-weight: 700; }
.ro-no { color: var(--muted); }
.pill.stage-chip { font-size: 12.5px; padding: 4px 10px; }
.pill.stage-chip[data-stage-chip=behind] { background: var(--action); color: #fff; }
.pill.stage-chip[data-stage-chip=ordered] { background: #fff5dd; color: #7a5200; }
.pill.stage-chip[data-stage-chip=dispatched] { background: #e6f1f8; color: var(--link-dark); }
.pill.stage-chip[data-stage-chip=installed] { background: #e6f6ec; color: #16693a; }
.pill.stage-chip[data-stage-chip=photographed] { background: #16693a; color: #fff; }
.version-card .ro-made-current, .art-versions .ro-made-current { margin: 0 0 12px; }
.bulk-scope { margin: 0 0 8px; font-size: 15px; }

@media (max-width: 900px) {
  .stats-strip.has-rollouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-strip.has-rollouts .stat-pill.rollouts { grid-column: span 2; }
  .ro-hero-top { grid-template-columns: 120px minmax(0, 1fr); }
  .ro-hero-actions { grid-column: 1 / -1; align-items: stretch; }
  .ro-hero-actions .hint { text-align: left; }
}
@media (max-width: 700px) {
  .ro-card { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .ro-hero-top { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .ro-hero-main h2 { font-size: 20px; }
  .ro-done.big b { font-size: 19px; }
  .ro-counts { gap: 6px 14px; font-size: 13px; }
  .ro-region .panel-head > .btn { width: 100%; }
  .ro-table td.num { justify-content: space-between; }
  .ro-stage { align-items: flex-end; }
  .ro-table .ro-order { text-align: right; }
}

/* ---- The phone page with no signal (SC-20261004-06): the offline banner, "n waiting to send", "saved on this phone" ---- */
.pl-net { max-width: 760px; margin: 0 auto; padding: 12px 16px 0; display: grid; gap: 8px; }
.pl-offline { margin: 0; padding: 10px 12px; border-radius: 10px; background: #2b3237; color: #fff; font-size: 14.5px; line-height: 1.4; }
.pl-offline-at { color: #d3d8dc; }
.pl-outbox { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px;
  border-radius: 10px; background: #fff5dd; border: 1px solid #f0dba4; color: #7a5200; font-size: 14.5px; }
.pl-outbox .btn { background: #fff; border-color: #e3c47c; color: #7a5200; min-height: 40px; }
.pl-adopt { padding: 12px; border-radius: 10px; background: #fff; border: 2px solid var(--accent); box-shadow: var(--shadow); }
.pl-adopt p { margin: 0 0 10px; font-size: 15px; }
.pl-adopt .btn { width: 100%; min-height: 52px; }
.pl-adopt-other { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.pl-pend-note { color: #7a5200; font-weight: 600; }
.pl-sign[data-pending], .pj-sign[data-state=pending] { border-color: #f0dba4; }
.pl-job[data-state=expired] .pl-job-note { color: #9b1c1c; font-weight: 600; }
.pl-gone-saved { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff5dd; color: #7a5200; text-align: left; }
