:root {
  --bg: #f6f7f9; --surface: #fff; --text: #1c2430; --muted: #667085; --line: #e3e6eb;
  --brand: #1f4b99; --brand-ink: #fff;
  --red: #b42318; --red-bg: #fee4e2; --amber: #b54708; --amber-bg: #fef0c7;
  --blue: #175cd3; --blue-bg: #d1e9ff; --gold: #946b00;
  --stage-yellow: #6b5200; --stage-yellow-bg: #fff1a8; --ph-discovery: #6b5200; --ph-discovery-bg: #fff1a8; --ph-procurement: #5b2fa8; --ph-procurement-bg: #e6dbfa; --ph-contract: #0b6577; --ph-contract-bg: #c9eef6; --ph-fulfillment: #7d4300; --ph-fulfillment-bg: #f0cf98; --ph-fulfil: #16622b; --ph-fulfil-bg: #d2efce; --ph-closed: #ffffff; --ph-closed-bg: #4b5563; --ph-lost: #ffffff; --ph-lost-bg: #8a5a7d; --stg-rfi: #f0cf3a; --stg-rfq: #c9a400; --stg-scope: #a98be0; --stg-bid: #6a3fc0; --stg-award: #6fd0e4; --stg-po: #2fa8c4; --stg-onboard: #0b7d94; --stg-supplier: #86c97d; --stg-custom_kit: #2f9e4f; --stg-delivery: #14602b; --stg-invoice: #0d3f1c; --stg-closed_won: #4b5563; --stg-closed_lost: #8a5a7d; --stg-closed: #4b5563; --ph-restock: #1d4ed8; --ph-restock-bg: #dbe6fd; --stg-bpo: #93b4f5; --stg-elocker: #5b8def; --stg-dtc_portal: #1b3fa8; --stg-billing: #122b78;
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100; --cat-5: #e87ba4; --cat-rest: #898781; --sla-1: #b4bac4; --sla-2: #5f8fcf; --sla-3: #2a5db0; --sla-4: #0e8a5f; --sla-serious: #f08a4b; --sla-critical: #d03b3b; --level-essential: #2a9bb5; --level-essential-bg: #d5eef4; --level-essential-ink: #0f5f73; --level-signature: #2d5a34; --level-signature-bg: #dcebdc; --level-signature-ink: #2d5a34; --green: #067647; --green-bg: #d3f8df; --gray-bg: #eef0f3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c; --surface: #1b212a; --text: #e8ecf1; --muted: #98a2b3; --line: #2c3541;
    --brand: #6ea0ff; --brand-ink: #0b1220;
    --red: #fda29b; --red-bg: #4a1d19; --amber: #fec84b; --amber-bg: #4a3512;
    --blue: #84caff; --blue-bg: #13304f; --gold: #e8b931;
    --stage-yellow: #f5d547; --stage-yellow-bg: #4a3c05; --ph-discovery: #f5d547; --ph-discovery-bg: #4a3c05; --ph-procurement: #cbb6f5; --ph-procurement-bg: #3a2a63; --ph-contract: #8fe0f0; --ph-contract-bg: #0f4654; --ph-fulfillment: #f0b667; --ph-fulfillment-bg: #5a3a0c; --ph-fulfil: #9be3a2; --ph-fulfil-bg: #17421f; --ph-closed: #ffffff; --ph-closed-bg: #5b6472; --ph-lost: #ffffff; --ph-lost-bg: #8c6b83; --stg-rfi: #f5d547; --stg-rfq: #c4a52a; --stg-scope: #cbb6f5; --stg-bid: #a688e6; --stg-award: #8fe0f0; --stg-po: #5cc3da; --stg-onboard: #3aa0b8; --stg-supplier: #9fdc96; --stg-custom_kit: #52b86a; --stg-delivery: #2f8f4a; --stg-invoice: #1f6f39; --stg-closed_won: #8b95a5; --stg-closed_lost: #b58aa8; --stg-closed: #8b95a5; --ph-restock: #93b4f5; --ph-restock-bg: #1d2f63; --stg-bpo: #a9c3f8; --stg-elocker: #7aa2f2; --stg-dtc_portal: #3f6fd8; --stg-billing: #2a55b8;
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-rest: #898781; --sla-1: #6e7787; --sla-2: #8db3ee; --sla-3: #3a7ae0; --sla-4: #1d9a6e; --sla-serious: #f5a070; --sla-critical: #e0605a; --level-essential: #4aaec4; --level-essential-bg: #12404b; --level-essential-ink: #8fd8e6; --level-signature: #3f8f52; --level-signature-bg: #1c3a23; --level-signature-ink: #9fd3a9; --green: #75e0a7; --green-bg: #12382a; --gray-bg: #262e39;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
--bg: #12161c; --surface: #1b212a; --text: #e8ecf1; --muted: #98a2b3; --line: #2c3541;
  --brand: #6ea0ff; --brand-ink: #0b1220;
  --red: #fda29b; --red-bg: #4a1d19; --amber: #fec84b; --amber-bg: #4a3512;
  --blue: #84caff; --blue-bg: #13304f; --gold: #e8b931;
    --stage-yellow: #f5d547; --stage-yellow-bg: #4a3c05; --ph-discovery: #f5d547; --ph-discovery-bg: #4a3c05; --ph-procurement: #cbb6f5; --ph-procurement-bg: #3a2a63; --ph-contract: #8fe0f0; --ph-contract-bg: #0f4654; --ph-fulfillment: #f0b667; --ph-fulfillment-bg: #5a3a0c; --ph-fulfil: #9be3a2; --ph-fulfil-bg: #17421f; --ph-closed: #ffffff; --ph-closed-bg: #5b6472; --ph-lost: #ffffff; --ph-lost-bg: #8c6b83; --stg-rfi: #f5d547; --stg-rfq: #c4a52a; --stg-scope: #cbb6f5; --stg-bid: #a688e6; --stg-award: #8fe0f0; --stg-po: #5cc3da; --stg-onboard: #3aa0b8; --stg-supplier: #9fdc96; --stg-custom_kit: #52b86a; --stg-delivery: #2f8f4a; --stg-invoice: #1f6f39; --stg-closed_won: #8b95a5; --stg-closed_lost: #b58aa8; --stg-closed: #8b95a5; --ph-restock: #93b4f5; --ph-restock-bg: #1d2f63; --stg-bpo: #a9c3f8; --stg-elocker: #7aa2f2; --stg-dtc_portal: #3f6fd8; --stg-billing: #2a55b8;
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-rest: #898781; --sla-1: #6e7787; --sla-2: #8db3ee; --sla-3: #3a7ae0; --sla-4: #1d9a6e; --sla-serious: #f5a070; --sla-critical: #e0605a; --level-essential: #4aaec4; --level-essential-bg: #12404b; --level-essential-ink: #8fd8e6; --level-signature: #3f8f52; --level-signature-bg: #1c3a23; --level-signature-ink: #9fd3a9; --green: #75e0a7; --green-bg: #12382a; --gray-bg: #262e39;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--text); }
.topbar { display: flex; align-items: center; gap: 20px; padding: 8px 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: 15px; line-height: 1.1; color: var(--text); text-decoration: none; }
.brand-logo { display: block; width: 44px; height: 44px; }
.brand:hover { color: var(--brand); }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav button, nav a { background: none; border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font: inherit; }
nav button[aria-current="true"], nav a[aria-current="true"] { background: var(--gray-bg); color: var(--text); font-weight: 600; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 24px 0 8px; display: flex; align-items: center; gap: 8px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.count { background: var(--gray-bg); border-radius: 10px; padding: 0 8px; font-size: 13px; font-weight: 600; }
.btn { font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 7px 12px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--gray-bg); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 4px 9px; font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; cursor: pointer; }
.card:hover { border-color: var(--brand); }
.card .title { font-weight: 600; }
.card .id { color: var(--muted); font-weight: 400; margin-right: 6px; }
.meta { color: var(--muted); font-size: 13px; grid-column: 1; }
.card .side { grid-column: 2; grid-row: 1 / span 2; text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--gray-bg); color: var(--muted); white-space: nowrap; }
.badge.overdue, .badge.urgent, .badge.missed { background: var(--red-bg); color: var(--red); }
.badge.due_today, .badge.high { background: var(--amber-bg); color: var(--amber); }
.badge.due_soon, .badge.paused { background: var(--blue-bg); color: var(--blue); }
.badge.met, .badge.ok { background: var(--green-bg); color: var(--green); }
.empty { color: var(--muted); padding: 10px 2px; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.tile b { display: block; font-size: 26px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 13px; }
.tile.alert b { color: var(--red); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; width: 100%; }
.toolbar input, .toolbar select { width: auto; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { margin-bottom: 10px; }
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 0; width: min(900px, 94vw); max-height: 92vh; background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 12px; }
.dlg-body { padding: 16px 18px; overflow: auto; max-height: calc(92vh - 70px); }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 2px solid var(--line); padding: 0 0 12px 12px; margin-left: 4px; font-size: 14px; }
.timeline time { display: block; color: var(--muted); font-size: 12px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 30px; gap: 8px; align-items: center; margin: 4px 0; font-size: 14px; }
.bar { background: var(--gray-bg); border-radius: 4px; height: 10px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.notice { background: var(--blue-bg); color: var(--blue); border-radius: 6px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 700px) {
  .split, .grid2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 24px; }
}

nav a { text-decoration: none; display: inline-block; font: inherit; }
nav a:hover { color: var(--text); }
.section-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-title { font-size: 22px; margin: 0; text-transform: uppercase; letter-spacing: .04em; }
.section-head nav { flex: 1; }
.landing-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.landing-purpose { max-width: 65ch; margin: 8px 0 4px; }
.landing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.tile.pending b { color: var(--muted); }
a { color: var(--brand); }

#section-nav a { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; font-weight: 600; }

.badge.code { background: var(--blue-bg); color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 4px; color: var(--text); font-size: 14px; }
.check input { width: auto; }
.form-error { color: var(--red); background: var(--red-bg); border-radius: 6px; padding: 8px 12px; font-size: 13px; margin: 0 0 10px; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo { filter: invert(1); } }
:root[data-theme="dark"] .brand-logo { filter: invert(1); }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board-col { min-width: 0; }
.board-col h2 { margin-top: 0; }
.board .card { grid-template-columns: 1fr; }
.board .card .side { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; text-align: left; order: 3; }
.steps { display: grid; gap: 6px; }
.step { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 14px; }
.step input { width: auto; }
.step time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Flags: color shows follow-up status; text is mm/dd [at time] */
.flag { position: relative; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.flag-icon { flex: none; }
.flag.overdue { color: var(--red); }
.flag.today { color: var(--blue); }
.flag.rescheduled { color: var(--gold); }
.flag.upcoming { color: var(--green); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; }
.legend .flag { font-weight: 500; }
.stage-code { display: inline-block; font-weight: 700; font-size: 12px; letter-spacing: .06em; line-height: 1.5; padding: 1px 9px; border-radius: 999px; background: var(--gray-bg); color: var(--muted); white-space: nowrap; vertical-align: 1px; }
.stage-discovery { background: var(--ph-discovery-bg); color: var(--ph-discovery); }
.stage-procurement { background: var(--ph-procurement-bg); color: var(--ph-procurement); }
.stage-contract { background: var(--ph-contract-bg); color: var(--ph-contract); }
.stage-fulfillment { background: var(--ph-fulfil-bg); color: var(--ph-fulfil); }
.stage-closed { background: var(--ph-closed-bg); color: var(--ph-closed); }
.stage-closed-lost { background: var(--ph-lost-bg); color: var(--ph-lost); }
.legend-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; max-width: 100%; color: var(--muted); font-size: 13px; }
.board { grid-auto-columns: minmax(230px, 1fr); }
.board .card { grid-template-columns: 1fr; }
.board .card .side { grid-column: 1; grid-row: auto; align-items: flex-start; text-align: left; order: 3; }
.board-col h2 { letter-spacing: .04em; font-size: 14px; }

/* Where the time goes */
.table-wrap { overflow-x: auto; margin-bottom: 8px; }
.steps-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.steps-table th, .steps-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.steps-table th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.steps-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.steps-table tr.slowest td { background: var(--amber-bg); }
.steps-table td:nth-child(2) { min-width: 160px; width: 30%; }
.steps-table .bar { position: relative; overflow: visible; }
.steps-table .bar i.over { background: var(--red); }
.steps-table .bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); text-decoration: none; }

.sale { color: var(--green); font-weight: 600; }
.nosale { color: var(--red); font-weight: 600; }
.close-panel { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0; }
h3 { font-size: 14px; margin: 16px 0 6px; }
.bar i.won { background: var(--green); }
.bar i.over { background: var(--red); }
.bar-row.wide { grid-template-columns: minmax(190px, 340px) 1fr 30px; }
.tile b.long { font-size: 18px; line-height: 1.5; }

/* Dragging cards between board stages */
.card.draggable { cursor: grab; }
.card.dragging { opacity: .45; }
.board-col { border-radius: 8px; border: 2px dashed transparent; transition: border-color .1s; }
.board-col { padding: 0 4px 6px; }
.drop-target { border-color: var(--brand); background: var(--gray-bg); }

/* Numbers that open the records behind them */
.tile-link { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
.tile-link:hover { border-color: var(--brand); }
.tile-link:focus-visible, .card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
dialog.drill .card { cursor: pointer; }

/* Pie charts */
.pies { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 8px 32px; margin-top: 4px; }
.pies > section { min-width: 0; }
.pies h2 { margin-top: 20px; }
.pie { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.pie svg { flex: none; max-width: 100%; height: auto; }
.pie svg [data-drill] { cursor: pointer; }
.pie svg [data-drill]:hover { opacity: .82; }
.pie svg [data-drill]:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.pie-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; }
.pie-item, .pie-total { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; font: inherit; color: var(--text); background: none; border: 0; border-radius: 6px; padding: 5px 6px; text-align: left; cursor: pointer; }
.pie-item:hover { background: var(--gray-bg); }
.pie-item:focus-visible { outline: 2px solid var(--brand); }
.pie-item .swatch { width: 12px; height: 12px; border-radius: 3px; }
.pie-item .pct { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.pie-item b { font-variant-numeric: tabular-nums; }
.pie-pct { fill: #fff; font-size: 13px; font-weight: 700; pointer-events: none; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: 3px; stroke-linejoin: round; }
.pie-total { align-items: center; gap: 8px; padding: 5px 6px; border-top: 1px solid var(--line); margin-top: 2px; font-weight: 700; }
.pie-total b { text-align: right; font-variant-numeric: tabular-nums; }
.pie-status { display: inline-flex; vertical-align: -2px; }

/* Opportunities: filters and weekly accordions */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 4px; }
.filters .field { margin: 0; min-width: 150px; flex: 1 1 150px; max-width: 240px; }
.filters .btn { margin-bottom: 1px; }
details.acc { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 8px; }
details.acc > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; flex-wrap: wrap; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::before { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .12s; flex: none; margin-right: 2px; }
details.acc[open] > summary::before { transform: rotate(45deg); }
details.acc > summary:hover { background: var(--gray-bg); border-radius: 8px; }
details.acc > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.week-title { font-weight: 600; }
.week-tag { color: var(--muted); font-size: 13px; }
.week-flags { display: inline-flex; gap: 10px; margin-left: auto; }
details.acc .count { margin-left: 0; }
.week-body { padding: 4px 12px 8px; border-top: 1px solid var(--line); }
.week-body .card { margin-top: 8px; }
details.acc.none > summary .week-title { color: var(--muted); }

/* PROGRAMS: revenue channels and customer segments */
nav button .channel-icon { vertical-align: -4px; margin-right: 6px; }
nav button { display: inline-flex; align-items: center; }
.channel-head { display: flex; gap: 16px; align-items: flex-start; }
.channel-badge { flex: none; width: 56px; height: 56px; border-radius: 12px; background: var(--gray-bg); color: var(--brand); display: grid; place-items: center; }
.channel-desc { max-width: 70ch; margin: 6px 0 0; color: var(--muted); }
.segments { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.segments .segment { grid-template-columns: 1fr; margin: 0; }
.muted { color: var(--muted); font-style: italic; }

details.acc.status .week-flags .nosale { font-size: 13px; }

/* Footer and Admin */
.site-footer { max-width: 1100px; margin: 24px auto 0; padding: 14px 20px 28px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; opacity: .55; }
.site-footer a:hover, .site-footer a:focus-visible, .site-footer a[aria-current="true"] { color: var(--text); opacity: 1; }
.admin-body { padding: 8px 18px 18px; }
.admin-form h3, .admin-body h3 { font-size: 14px; margin: 18px 0 6px; }
.admin-form h3:first-child { margin-top: 8px; }
.admin-form { max-width: 640px; }
.admin-sec > summary .week-tag { margin-left: 4px; }
.form-ok { color: var(--green); background: var(--green-bg); border-radius: 6px; padding: 8px 12px; font-size: 13px; margin: 0 0 10px; }

/* PROGRAMS: segments, catalog, kits, quotes */
.seg-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.seg-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font: inherit; color: var(--muted); cursor: pointer; }
.seg-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }
.card.segment { text-align: left; font: inherit; color: inherit; width: 100%; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.seg-foot { color: var(--muted); font-size: 13px; }
.kit-cost { font-weight: 600; font-variant-numeric: tabular-nums; }
.gear { color: var(--muted); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg); }
.census { display: grid; gap: 2px; margin: 8px 0; max-width: 580px; }
.census-row .grade { white-space: nowrap; }
.census-head, .census-row { display: grid; grid-template-columns: 62px 54px 54px 54px; gap: 4px; align-items: center; }
.census-head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; align-items: end; }
.census input[type=number] { width: 100%; padding: 3px 6px; box-sizing: border-box; text-align: right; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.addons { margin: 10px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.addons ul { margin: 4px 0 0; padding-left: 18px; }
.census-total { color: var(--muted); }
.group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
.group-grades { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.loose { display: grid; gap: 6px; margin: 8px 0; }
.mini { width: 64px; padding: 4px 6px; text-align: right; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.quote-table .low { color: var(--red); font-weight: 600; }
.warns { margin: 8px 0; padding: 8px 12px 8px 28px; border-radius: 8px; background: var(--amber-bg); }
.warns-inline { color: var(--red); margin: 6px 0; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.totals > div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.totals span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.totals b { font-size: 18px; font-variant-numeric: tabular-nums; }
.kit-row select { flex: 1; min-width: 140px; }
.kit-total { margin: 10px 0 0; }
.seg-tabs .channel-icon, .sub .channel-icon { vertical-align: -3px; }
.pie-item small { color: var(--muted); font-weight: 400; }


/* Dashboard: charts sit two by two under the key numbers, one per row on a phone */
.pies.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .pies.two { grid-template-columns: minmax(0, 1fr); } }
.steps-table.levels th, .steps-table.levels td { white-space: normal; vertical-align: top; }
.steps-table.levels th:first-child, .steps-table.levels td:first-child { width: 1%; white-space: nowrap; padding-right: 28px; }

.level-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 1px 9px; border-radius: 999px; background: var(--gray-bg); color: var(--text); margin-right: 4px; }
.level-tag.level-essential { background: var(--level-essential-bg); color: var(--level-essential-ink); }
.level-tag.level-signature { background: var(--level-signature-bg); color: var(--level-signature-ink); }

.kit-lines { display: block; margin: 8px 0 6px; border-top: 1px solid var(--line); }
.kit-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.kit-line .amt { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Dashboard area headings (SUPPORT, PIPELINE, PRODUCTION, PROGRAMS) in capitals so they stand out on a phone or tablet */
.dash > h2 { text-transform: uppercase; letter-spacing: .06em; font-size: 17px; margin-top: 28px; }

/* Board: revenue per stage */
.rev-tiles { margin-bottom: 4px; }
.col-rev { margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.col-rev b { font-size: 16px; }
.col-rev.inline { font-size: 13px; font-weight: 400; margin-left: 6px; color: var(--muted); }
.col-rev.inline b { font-size: 14px; color: var(--text); }
.rev-bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--gray-bg); overflow: hidden; }
.rev-bar i { display: block; height: 100%; background: var(--green); border-radius: 2px; }

/* Board sections: DISCOVERY, PROCUREMENT, CONTRACT, FULFILLMENT, CLOSED */
.sec-tag { font-size: 13px !important; letter-spacing: .08em; padding: 3px 14px !important; }
details.board-sec > .board { grid-auto-columns: minmax(230px, 1fr); }

details.board-sec > summary .sec-rev { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
details.board-sec > summary .sec-rev b { color: var(--text); font-size: 17px; }
details.board-sec > .board { padding: 12px; border-top: 1px solid var(--line); }
details.board-sec > .sec-body { padding: 10px 12px 8px; border-top: 1px solid var(--line); }
details.board-sec.drop-target { border-color: var(--brand); border-style: dashed; }
.board-col h3 { margin: 0 0 2px; }

/* Product pictures: thumbnails and the framed large view */
.thumb { --s: 40px; display: inline-flex; align-items: center; justify-content: center; width: var(--s); height: var(--s); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--gray-bg); color: var(--muted); cursor: zoom-in; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.empty { cursor: pointer; }
.thumb.empty svg { width: 60%; height: 60%; }
.thumb:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.thumb-cell { width: 1%; padding-right: 0 !important; }
.kit-item { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.kit-row .thumb { margin-right: 2px; }
.pd-picture input[type=file] { max-width: 100%; }
dialog.viewer { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(92vw, 640px); max-height: 92vh; overflow: auto; }
dialog.viewer::backdrop { background: rgba(0, 0, 0, .45); }
.frame { margin: 0; padding: 0 16px 16px; }
.frame-img { background: var(--gray-bg); border: 1px solid var(--line); border-radius: 10px 10px 0 0; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.frame-img img { max-width: 100%; max-height: 62vh; display: block; }
.frame-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); padding: 40px 0; }
.frame-empty svg { width: 64px; height: 64px; }
.frame figcaption { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; padding: 10px 14px; background: var(--surface); }
.frame dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; margin: 8px 0 0; }
.frame dl div { display: flex; flex-direction: column; }
.frame dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.frame dd { margin: 0; font-weight: 600; }

.week-rev { font-variant-numeric: tabular-nums; min-width: 80px; text-align: right; }
.week-rev b { font-size: 15px; }

/* Opportunities weeks: flags sit right after the title, total revenue stays at the far right like on the Board */
details.week > summary .week-flags { margin-left: 4px; }
details.week > summary .week-rev { margin-left: auto; }

details.board-sec > summary .week-flags, details.board-bar > summary .week-flags { margin-left: 4px; }


/* Accordion bars with follow-ups (Pipeline weeks and Board sections, Support statuses): the title and its count stay together in a
   fixed-width block, the flag counts start at the same spot in every bar, and any total sits at the far right. */
.acc-head { display: inline-flex; align-items: center; gap: 10px; min-width: var(--head-w, 240px); }
details.acc > summary .week-flags { margin-left: 0; }
details.acc.status > summary .week-flags .flag { font-size: 14px; }
@media (max-width: 640px) { .acc-head { min-width: 0; } details.board-sec > summary .acc-head { min-width: 178px; } details.status > summary .acc-head { min-width: 150px; } }

/* Support status tags, in the same family of tag colors as the Pipeline sections */
.st-new { background: var(--ph-discovery-bg); color: var(--ph-discovery); }
.st-acknowledged { background: var(--ph-contract-bg); color: var(--ph-contract); }
.st-in_progress { background: var(--blue-bg); color: var(--blue); }
.st-waiting { background: var(--ph-fulfillment-bg); color: var(--ph-fulfillment); }
.st-resolved { background: var(--green-bg); color: var(--green); }
.st-closed { background: var(--ph-closed-bg); color: var(--ph-closed); }

/* Support Batch buckets: same accordion layout as the statuses, with a tag color per bucket and the work button at the far right */
.bk-overdue { background: var(--red-bg); color: var(--red); }
.bk-due_today { background: var(--blue-bg); color: var(--blue); }
.bk-needs_ack { background: var(--ph-discovery-bg); color: var(--ph-discovery); }
.bk-due_soon { background: var(--green-bg); color: var(--green); }
.bk-follow_up { background: var(--ph-fulfillment-bg); color: var(--ph-fulfillment); }
.bk-to_close { background: var(--ph-closed-bg); color: var(--ph-closed); }
details.batch-sec > summary .work-btn { margin-left: auto; }
@media (max-width: 640px) { details.batch-sec > summary .acc-head { min-width: 0; } }

/* Opportunities rows: name, then the flag in the same column as the accordion's flag counts, then the revenue at the far right */
.week-body .card.row-card { grid-template-columns: minmax(0, var(--row-name-w, 341px)) auto 1fr auto; align-items: center; }
.week-body .card.row-card .title { grid-column: 1; grid-row: 1; }
.week-body .card.row-card .side { grid-column: 2; grid-row: 1; flex-direction: row; align-items: center; text-align: left; }
.week-body .card.row-card .card-rev { grid-column: 4; grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; text-align: right; }
.week-body .card.row-card .meta { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 760px) {
  .week-body .card.row-card { grid-template-columns: 1fr auto; }
  .week-body .card.row-card .title { grid-column: 1; }
  .week-body .card.row-card .side { grid-column: 2; grid-row: 1; }
  .week-body .card.row-card .card-rev { grid-column: 2; grid-row: 2; }
  .week-body .card.row-card .meta { grid-column: 1; grid-row: 2; }
}

/* Record popups: the icon button row in the top right corner */
.rec-actions { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--gray-bg); border-color: var(--muted); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.icon-btn.primary:hover:not(:disabled) { background: var(--brand); filter: brightness(1.1); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.rec-saved { color: var(--green); font-size: 13px; font-weight: 600; margin-right: 4px; }

/* Customer segments: two columns on tablets and desktops, one on a phone */
.segments.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .segments.two-col { grid-template-columns: minmax(0, 1fr); } }

/* Quote header: the quote number with the action buttons in line with it, the customer field stacked underneath */
.quote-head { margin: 12px 0 4px; }
.quote-no-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.quote-no { margin: 0; font-size: 22px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.quote-cust-row { display: flex; align-items: flex-end; gap: 12px; }
.quote-cust-row .field { flex: 1; min-width: 0; margin: 0; }
@media (max-width: 520px) { .quote-cust-row { flex-wrap: wrap; } }

/* Support Batch: group headings and the daily batch tags */
.batch-group { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.bk-day { background: var(--gray-bg); color: var(--text); border: 1px solid var(--line); }

.card.replied { opacity: .7; }

/* Segment buttons: an icon in a soft square on the left of the text */
.card.segment.has-icon { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.card.segment.has-icon > .seg-icon { grid-row: 1 / span 4; grid-column: 1; width: 44px; height: 44px; border-radius: 10px; background: var(--gray-bg); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.card.segment.has-icon > :not(.seg-icon) { grid-column: 2; }

/* Standard entry form: two columns. Fields flow two per row; .wide, textareas and sections span both. One column on a phone. */
form.dlg-body, form.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-content: start; }
form.dlg-body > :not(.field), form.admin-form > :not(.field) { grid-column: 1 / -1; }
form.dlg-body .grid2, form.admin-form .grid2 { display: contents; }
form .field.wide, form .field:has(> textarea) { grid-column: 1 / -1; }
form .form-h { grid-column: 1 / -1; margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
form .client-only[hidden] { display: none; }
form .client-only { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
form .client-only > :not(.field) { grid-column: 1 / -1; }
.doc-list { display: grid; gap: 6px; }
.doc-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 140px 140px; gap: 8px; align-items: center; }
.doc-row .doc-name { font-size: 13px; }
.seg-chips { margin: 0 0 8px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gray-bg); font-size: 13px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-align: left; cursor: pointer; text-decoration: underline; }
.icon-btn.danger.armed { background: var(--red); color: #fff; border-color: var(--red); }
@media (max-width: 640px) {
  form.dlg-body, form.admin-form, form .client-only { grid-template-columns: 1fr; }
  .doc-row { grid-template-columns: 1fr 1fr; }
  .doc-row .doc-name { grid-column: 1 / -1; }
}

/* Footer: Financials sits beside Admin, both on the right. */
.site-footer { gap: 18px; }

/* Financials page */
.mini { width: 70px; padding: 4px 6px; text-align: right; }
.opex-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.opex-row select { min-width: 0; }

/* Phone navigation: hamburger at the top right opens the sections as a menu. */
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .15s, opacity .15s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; }
  .nav-toggle { display: flex; }
  #section-nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; margin: 4px -20px -8px; border-top: 1px solid var(--line); }
  #section-nav[data-open="true"] { display: flex; }
  #section-nav a { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 15px; }
  #section-nav a:last-child { border-bottom: 0; }
  #section-nav a[aria-current="true"] { background: var(--gray-bg); }
  .opex-row { grid-template-columns: 1fr 100px auto; }
}
.section-title ~ form.admin-form { max-width: none; }

/* Phone: the flag counts sit on their own line under the title instead of wrapping around it. */
@media (max-width: 640px) {
  details.acc > summary .week-flags { flex: 1 1 0; min-width: 0; flex-wrap: wrap; margin-left: 0; padding-left: 22px; row-gap: 4px; }
  details.acc > summary .week-flags:empty { display: none; }
  /* title and count take the first line; the flags and the revenue (or the Work button) share the second, flags left and total right */
  details.acc > summary:has(.week-flags:not(:empty)) .acc-head { flex: 1 0 calc(100% - 34px); }
  details.acc > summary .sec-rev, details.acc > summary .week-rev, details.acc > summary .work-btn { flex: 0 0 auto; margin-left: auto; min-width: 0; }
}

/* Financials P&L: inputs on the left, time-frame tabs and results on the right. */
.fin-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.fin-side { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 14px; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; }
.fin-side .field { margin-bottom: 8px; }
.fin-side label { font-size: 12px; color: var(--muted); }
.side-h { margin: 16px 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.side-tag { font-size: 12px; letter-spacing: 0; background: var(--green-bg); color: var(--green); border-radius: 999px; padding: 1px 8px; }
.side-tag.bad { background: var(--red-bg); color: var(--red); }
.alloc-bar { display: flex; gap: 2px; height: 8px; margin-bottom: 8px; border-radius: 4px; overflow: hidden; }
.alloc-bar span { display: block; }
.alloc-rows { display: grid; gap: 6px; margin-bottom: 6px; }
.alloc-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 60px 60px 26px; gap: 6px; align-items: center; }
.alloc-row select { grid-column: 2 / 5; font-size: 12px; padding: 4px 6px; }
.alloc-row .btn { padding: 2px 6px; }
.alloc-row .swatch { width: 10px; height: 10px; border-radius: 2px; }
.fin-side .opex-row { grid-template-columns: minmax(0, 1fr) 72px 26px; }
.fin-title { margin: 6px 0 10px; font-size: 20px; }
.fin-tag { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--gray-bg); border-radius: 6px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.alloc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.alloc-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.alloc-card .alloc-label { font-size: 12px; color: var(--muted); }
.alloc-card b { font-size: 26px; color: var(--c); }
.alloc-card .alloc-amt { font-size: 16px; font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
.pos { color: var(--green); font-weight: 600; }
@media (max-width: 900px) { .fin-layout { grid-template-columns: 1fr; } .fin-side { position: static; max-height: none; } }

/* Activity feed (dashboard): a plain running list, one line per change */
.feed-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.feed-filters .feed-q { flex: 1 1 240px; margin: 0; }
.feed-filters select { width: auto; min-width: 140px; }
.feed-day h3 { margin: 14px 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.feed-list { list-style: none; margin: 8px 0; padding: 0; }
.feed-row { display: grid; grid-template-columns: 130px 96px minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 2fr) 76px; align-items: center; gap: 4px 14px; padding: 9px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.feed-row:hover, .feed-row:focus-visible { background: var(--gray-bg); }
.feed-row time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.feed-name, .feed-agency, .feed-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .feed-row { grid-template-columns: minmax(0, 1fr); }
  .feed-row time { grid-column: 1 / -1; }
  .feed-row .feed-name, .feed-row .feed-agency, .feed-row .feed-text { grid-column: 1 / -1; white-space: normal; overflow-wrap: anywhere; }
}
.feed-row > * { margin: 0; align-self: center; }
.feed-acc .feed-list { margin: 0; padding: 0 8px 4px; }
.feed-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) { .feed-row .feed-amt { grid-column: 1 / -1; text-align: left; } }
@media (max-width: 760px) { .feed-row .feed-stage { justify-self: start; } }

/* Restored rules (accidentally dropped by an earlier edit) */
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li { padding: 2px 0; }
.feed-list a { display: block; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-list a:hover, .feed-list a:focus-visible { text-decoration: underline; color: var(--brand); }
.feed-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 12px 0 4px; }
.feed-pager .btn[aria-current="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.feed-gap { color: var(--muted); padding: 0 2px; }
/* Contacts filters sit in one row: search wide, the lists beside it */
.contact-filters { gap: 8px; align-items: center; }
.contact-filters .field { flex: 1 1 260px; max-width: none; }
.contact-filters select { width: auto; min-width: 150px; flex: 0 1 190px; }
/* Social link on a contact tile */
.card .title a.social { display: inline-flex; vertical-align: -3px; margin-left: 8px; color: var(--muted); }
.card .title a.social-web:hover, .card .title a.social-mail:hover, .card .title a.social-phone:hover { color: var(--brand); opacity: 1; }
.card .title a.social[aria-label^="LinkedIn"] { color: #0a66c2; }
.card .title a.social:hover { opacity: .75; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card .title a.social[aria-label^="LinkedIn"] { color: #70b5f9; } }
:root[data-theme="dark"] .card .title a.social[aria-label^="LinkedIn"] { color: #70b5f9; }
/* Feed lines: a little color and weight so a line reads at a glance */
.feed-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.feed-kind { font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.feed-kind.k-contract { color: var(--ph-contract); }
.feed-kind.k-ticket { color: var(--ph-discovery); }
.feed-kind.k-contact { color: var(--ph-procurement); }
.feed-kind.k-quote { color: var(--ph-fulfillment); }
.feed-kind.k-product, .feed-kind.k-kit, .feed-kind.k-segment { color: var(--level-essential-ink, var(--muted)); }
.feed-name { font-weight: 700; color: var(--text); }
.feed-role { color: var(--muted); }
.feed-change { color: var(--text); }
.feed-status { display: inline-flex; vertical-align: -2px; }
.feed-status.s-progress { color: var(--blue); }
.feed-status.s-awarded { color: var(--green); }
.feed-kind { display: inline-flex; vertical-align: -3px; }
.feed-glyph { display: block; }
.feed-related { color: var(--muted); }
.census-meta { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; }
.census-meta .field { margin: 0; }
.census-split.on { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 16px; align-items: start; }
.nysed-panel { position: sticky; top: 8px; }
.nysed-panel .row { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.nysed-frame { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 900px) { .census-split.on { grid-template-columns: 1fr; } .nysed-panel { position: static; } .nysed-frame { height: 70vh; } }
#nysed-info, .nysed-note { margin: 8px 0; }
.nysed-note:empty { display: none; }
.nysed-card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px 14px; max-width: 760px; }
.nc-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 10px; }
.nc-head span { color: var(--muted); font-size: 13px; }
.nc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.nc-block h4 { margin: 0 0 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.nc-big { font-size: 26px; font-weight: 700; line-height: 1.15; }
.nc-big small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.nc-na { font-size: 16px; color: var(--muted); font-weight: 600; padding: 5px 0; }
.nc-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.nc-bar, .nc-rank { position: relative; height: 8px; border-radius: 4px; background: var(--gray-bg); margin-top: 6px; }
.nc-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--blue); }
.nc-rank { height: 2px; margin: 10px 0 2px; background: var(--line); }
.nc-rank i { position: absolute; top: -4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--text); border: 2px solid var(--surface); box-sizing: content-box; }
.nc-split { display: flex; gap: 2px; margin-top: 6px; font-size: 11px; line-height: 20px; text-align: center; color: #fff; }
.nc-split span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: clip; padding: 0 4px; }
.nc-split .f { background: #2a5db0; border-radius: 4px 0 0 4px; }
.nc-split .m { background: #5f6b7a; }
.nc-split .x { background: #946b00; }
.nc-split span:last-child { border-radius: 0 4px 4px 0; }
.nc-tier { margin-top: 4px; font-size: 13px; }
.nc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.school-row { display: flex; gap: 8px; align-items: center; }
.school-row > input, .school-row > select { flex: 1; min-width: 0; }
input.locked { background: var(--gray-bg); color: var(--muted); cursor: default; }
.nc-tier { cursor: help; }
.nc-info { color: var(--muted); font-size: 12px; }
form .form-sub { grid-column: 1 / -1; margin: 14px 0 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
form .client-only .form-h + .form-sub { margin-top: 0; }
form .field.half:has(> textarea) { grid-column: auto; }
.po-field { align-self: end; padding-bottom: 10px; }
.nysed-link { margin-left: 8px; font-size: 12px; font-weight: 400; }
.sub-h { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.quote-tier-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.quote-tier-row .field { flex: 0 1 320px; margin: 0; }
.quote-tier-row .sub { flex: 1 1 260px; margin: 0 0 8px; }
.walk { margin: 14px 0 0 auto; border-collapse: collapse; min-width: 320px; max-width: 480px; font-size: 14px; }
.walk td { padding: 4px 0; }
.walk td.num { padding-left: 24px; }
.walk-total td { border-top: 1px solid var(--line); font-weight: 700; padding-top: 6px; }
.nc-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.nc-facts b { color: var(--text); }
.card .title .district { margin-left: 8px; color: var(--blue); font-size: 14px; font-weight: 500; white-space: nowrap; }
/* A tooltip that shows on hover, keyboard focus and tap (the browser's title tooltip does not appear on touch screens or in some embedded viewers). */
.tip { position: relative; cursor: help; outline-offset: 2px; }
.tip .tip-body { display: none; position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); width: min(300px, 80vw); padding: 10px 12px; border-radius: 8px; background: var(--text); color: var(--surface); font-size: 12.5px; line-height: 1.45; font-weight: 400; text-align: left; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); white-space: normal; }
.tip:hover .tip-body, .tip:focus .tip-body, .tip:focus-within .tip-body { display: block; }
.tip .tip-body { text-transform: none; letter-spacing: 0; }
.field { position: relative; }
.cb-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px; list-style: none; max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.cb-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.cb-list li[role=option]:hover, .cb-list li[aria-selected=true] { background: var(--blue-bg); color: var(--blue); }
.cb-list .cb-more { cursor: default; color: var(--muted); font-size: 12px; }
/* Admin > Schools */
.sp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 8px; }
.sp-name { margin: 0; font-size: 20px; }
.sp-asof { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sp-asof label { color: var(--muted); font-size: 13px; }
.sp-sec { margin: 18px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.sp-sec h3 { margin: 0 0 8px; font-size: 15px; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 24px; }
.sp-row { display: flex; gap: 10px; font-size: 14px; padding: 3px 0; }
.sp-row span { color: var(--muted); min-width: 90px; }
.sp-segs { margin-top: 8px; font-size: 14px; }
.sp-list { margin: 0 0 8px; padding: 0; list-style: none; font-size: 14px; }
.sp-list li { padding: 4px 0; }
.sp-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 10px; }
.sp-media figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 13px; }
.sp-media img, .sp-file { width: 100%; height: 90px; object-fit: contain; background: var(--gray-bg); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; }
.sp-media figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.sp-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sp-form input, .sp-form select { flex: 1 1 150px; min-width: 0; }
.df-wrap { overflow-x: auto; margin-bottom: 8px; }
.df .df-node rect { fill: var(--surface); stroke: var(--blue); stroke-width: 1.5; }
.df .df-name { font-size: 13px; font-weight: 600; fill: var(--text); }
.df .df-title { font-size: 11px; fill: var(--muted); }
.df .df-step { font-size: 11px; font-weight: 600; fill: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.df .df-edge { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.df .df-head { fill: var(--muted); }
.district { color: var(--blue); font-size: 14px; font-weight: 500; margin-left: 8px; }
/* Activity feed on a phone: the timestamp is its own line and the rest of the entry wraps under it (nothing is cut off with an ellipsis). */
  .feed-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
  .feed-list a { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
  .feed-list time { display: block; font-size: 12px; }
  .feed-sep { display: none; }
.sp-row2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.sp-row2 .sp-facts { margin: 0; }
.sp-facts { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.sp-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.sp-links .btn { text-decoration: none; }
.sp-acc { margin-top: 8px; }
.sp-services { table-layout: fixed; width: 100%; }
.sp-services td, .sp-services th { text-align: center; }
.sp-services th:first-child { width: 32%; }
.sp-services th:last-child { width: 14%; }
.sp-services td:first-child, .sp-services th:first-child { text-align: left; }
.sp-seg-row td { background: var(--gray-bg); }
.sp-form label { display: flex; flex-direction: column; gap: 3px; flex: 1 1 150px; font-size: 13px; color: var(--muted); }
.sp-notice { padding: 8px 12px; border-radius: 8px; background: var(--gray-bg); font-size: 14px; }
.phase-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 1px 8px; border-radius: 999px; background: var(--gray-bg); color: var(--text); }
.phase-tag.phase-rfq { background: var(--ph-discovery-bg); color: var(--ph-discovery); }
.phase-tag.phase-bid { background: var(--ph-procurement-bg); color: var(--ph-procurement); }
.phase-tag.phase-contract { background: var(--ph-contract-bg); color: var(--ph-contract); }
.phase-tag.phase-supplier_order { background: var(--ph-fulfil-bg); color: var(--ph-fulfil); }
.gr { display: inline-flex; align-items: flex-start; gap: 8px; }
.gr i { font-style: normal; color: var(--muted); font-weight: 700; padding-top: 1px; }
.gr-part { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.gr-n { font-size: 20px; font-variant-numeric: tabular-nums; }
.gr-part small { color: var(--muted); font-size: 11px; }
.gr-f { color: var(--gr-f, #2a5db0); } .gr-m { color: var(--gr-m, #5f6b7a); } .gr-u { color: var(--gr-u, #946b00); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gr-f: #8fb4f0; --gr-m: #b4bdc9; --gr-u: #e0b64a; } }
:root[data-theme="dark"] { --gr-f: #8fb4f0; --gr-m: #b4bdc9; --gr-u: #e0b64a; }
.sc-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 10px; margin-bottom: 8px; align-items: end; }
.sc-name-filter { position: relative; display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.sc-name-filter label { font-size: 12px; color: var(--muted); }
.sc-name-filter input { width: 100%; font-size: 16px; padding: 8px 10px; }
.sc-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.sc-f span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-f input, .sc-f select { width: 100%; min-width: 0; }
.sc-count { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .sc-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sc-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sc-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sc-head, .sc-row { display: grid; grid-template-columns: minmax(180px, 2.2fr) minmax(120px, 1.4fr) minmax(130px, 1.4fr) 90px 70px 90px; gap: 4px 12px; align-items: center; }
.sc-head { padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sc-rec { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 8px; padding: 8px 12px; }
.sc-row2 { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.sc-rec .linklike { text-align: left; }
.sc-name { font-weight: 700; }
@media (max-width: 640px) { .sc-head { display: none; } .sc-row { grid-template-columns: 1fr 1fr; } .sc-row > :first-child { grid-column: 1 / -1; } }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-card { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; text-align: left; cursor: pointer; padding: 12px; }
.type-card .type-ic { grid-row: 1 / span 3; color: var(--muted); }
.type-card .title { font-weight: 700; }
.type-card .sub { font-size: 12px; }
.type-card .type-start { font-size: 12px; font-weight: 600; color: var(--blue); }
.type-card.current { border-color: var(--blue); }
.upload-drop { display: block; padding: 28px 14px; border: 2px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); cursor: pointer; margin: 8px 0 12px; }
.upload-drop input { display: block; margin: 0 auto 8px; }
.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 10px 0; }
.map-grid .field { margin: 0; }
.map-grid .field span { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .type-grid, .map-grid { grid-template-columns: 1fr; } }
.finder { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--gray-bg); }
.finder .sc-filters { margin-bottom: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .finder .sc-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .finder .sc-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.finder-results { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; margin-top: 8px; }
.finder-row { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; text-align: left; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 14px; }
.finder-row:hover { border-color: var(--blue); background: var(--blue-bg); }
.btn[hidden], .school-row [hidden] { display: none !important; }
.alloc-row .gl-pick { grid-column: 2 / 5; font-size: 12px; padding: 4px 6px; }
.fin-side .opex-row .gl-pick { grid-column: 1 / 3; font-size: 12px; padding: 4px 6px; margin-bottom: 4px; }
.side-note { margin: 0 0 8px; font-size: 13px; }
.ytd .mini { width: 110px; text-align: right; }
.ytd-past td:first-child, .ytd-future td:first-child { color: var(--text); }
.ytd-future { background: var(--gray-bg); }
.ytd-bar { display: block; height: 8px; border-radius: 4px; background: var(--blue); opacity: .55; min-width: 2px; }
.fin-main .tile b { font-size: 24px; overflow-wrap: anywhere; }
.lib-search { max-width: 420px; }
.lib-acc { margin-top: 8px; }
.lib-acc .sp-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.admin-sec > summary .admin-ic-box { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: 10px; border-radius: 8px; background: var(--surface-2, rgba(127,127,127,.12)); color: var(--blue, currentColor); flex: none; }
.admin-sec > summary { align-items: center; }
.alloc-card b small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.alloc-tap { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.actuals-box { margin: 10px 0 4px; font-size: 12px; }
.actuals-box .steps-table th, .actuals-box .steps-table td { padding: 4px 5px; font-size: 12px; }
.actuals-box .btn { margin-top: 6px; }
.actuals-box .steps-table { width: 100%; min-width: 0; table-layout: fixed; }
.actuals-box .steps-table th:first-child { width: 42%; }
.actuals-box .steps-table td, .actuals-box .steps-table th { white-space: normal; }
.alloc-table input.name-in { width: calc(100% - 20px); min-width: 120px; padding: 4px 6px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.alloc-table .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
.alloc-table .mini { width: 72px; }
.alloc-table .alloc-total td { border-top: 2px solid var(--line); }
.alloc-table .bad { color: var(--red); }
.alloc-more { margin: 6px 0; font-size: 13px; }
.alloc-more summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.alloc-acc-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(130px, 1fr) minmax(180px, 1.5fr); gap: 8px; align-items: center; padding: 3px 0; }
@media (max-width: 640px) { .alloc-acc-row { grid-template-columns: 1fr; } }
.alloc-table th:first-child, .alloc-table td:first-child { width: 44%; }
.alloc-table input.name-in { min-width: 0; }
.stock-ok { color: var(--green); font-weight: 600; }
.stock-low { color: var(--gold); font-weight: 600; }
.stock-out { color: var(--red); font-weight: 600; }
.sc-restock { color: var(--red); font-weight: 600; }
.sp-lv { width: 5.5em; }
.sp-qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.sp-qr .qr { border: 1px solid var(--border, #ccc); border-radius: 8px; background: #fff; }
.kr { max-width: 480px; margin: 0 auto; }
.kr-form { display: grid; gap: 12px; }
body[data-public] #section-nav, body[data-public] #nav-toggle, body[data-public] .site-footer { display: none; }
.sp-alerts { margin: 8px 0; padding-left: 18px; font-size: 14px; }
tr.dim td { opacity: .5; text-decoration: line-through; }
/* Compact inline entry rows on the account page: one line, a visible checkbox, add buttons as small icon buttons */
.sp-form { align-items: center; }
.sp-form input, .sp-form select { flex: 1 1 120px; padding: 5px 8px; }
.sp-form input[type="checkbox"] { flex: none; width: 16px; height: 16px; padding: 0; accent-color: var(--brand); }
.sp-form label.sp-check { flex: none; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; color: var(--text); }
.btn.icon { flex: none; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
/* Spec sheet lists: the type leads the line, the details line up in columns, and a download icon marks the PDF */
.spec-list { margin: 0; padding: 0; list-style: none; }
.spec-row { display: grid; align-items: center; gap: 4px 14px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-row:last-child { border-bottom: 0; }
.spec-kit { grid-template-columns: 96px minmax(0, 1.4fr) minmax(0, 1.2fr) 90px 34px; }
.spec-prod { grid-template-columns: 110px minmax(0, 1.4fr) minmax(0, 1.2fr) 34px; }
.spec-acct { grid-template-columns: 96px minmax(0, 1fr) 34px; }
.spec-row .level-tag { justify-self: start; }
.spec-name { font-weight: 600; overflow-wrap: anywhere; }
.spec-n { text-align: right; white-space: nowrap; }
.spec-dl { justify-self: end; width: 30px; height: 30px; }
  .spec-kit, .spec-prod { grid-template-columns: auto minmax(0, 1fr) 34px; }
  .spec-kit .spec-seg, .spec-kit .spec-n, .spec-prod .spec-seg { grid-column: 2; }
  .spec-kit .spec-dl, .spec-prod .spec-dl { grid-column: 3; grid-row: 1; }
  .spec-prod .spec-sku { grid-column: 1; }
.spec-row > * { margin: 0; align-self: center; }
.sp-save { display: flex; align-items: center; gap: 8px; }
.spec-doc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) 34px; }
@media (max-width: 640px) { .spec-doc { grid-template-columns: minmax(0, 1fr) 34px; } .spec-doc .spec-seg { grid-column: 1; } .spec-doc .spec-dl { grid-column: 2; grid-row: 1 / span 2; } }
/* Campaigns */
/* Services: the two desks are the main tabs */
.section-head nav.desks { flex: none; display: flex; gap: 6px; }
.desks button { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.feed-list li { border-bottom: 1px solid var(--line); }
/* Accounts landing: the search takes the row, the PO Status list sits beside it */
#sc-filters .sc-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
#sc-filters .sc-name-filter { flex: 1 1 320px; margin-bottom: 0; }
#sc-filters .sc-f { flex: 0 1 200px; }
/* Kit form: the segments a kit is assigned to, as a wrapped row of checkboxes per channel */
.kit-segs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 4px 0 10px; }
.kit-segs > b { flex: 0 0 100%; }
.kit-seg-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.kit-seg-opt input[type="checkbox"] { width: 16px; height: 16px; padding: 0; margin: 0; }
/* Accounts landing: the demographic filters sit in a row of their own */
#sc-filters .sc-demo { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; margin-top: 8px; }
#sc-filters .sc-demo .sc-f { flex: initial; }
/* In-page delete confirmation */
dialog.confirm-dlg { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(92vw, 440px); }
dialog.confirm-dlg::backdrop { background: rgba(0, 0, 0, .5); }
dialog.confirm-dlg .dlg-body { padding: 4px 18px 16px; }
dialog.confirm-dlg .row { gap: 8px; margin-top: 12px; }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); }

.tier-glance { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.tier-glance li { display: grid; grid-template-columns: 1.4fr 1.2fr auto; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.tier-glance li b { color: var(--text, inherit); }
.tier-glance li.on { border-color: var(--blue); background: var(--surface); }

.census-sum { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 4px; }
.census-sum .sum { text-align: right; padding-right: 6px; }
.census-sum .sum.low { color: var(--red); }
.census-sum .sum small { font-weight: 400; color: var(--muted); }
.size-group { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 6px; }

.census-split { display: flex; gap: 14px; align-items: flex-start; }
.census-split .census-main { flex: none; }
.census-head { min-height: 44px; }
.sizes-scroll { flex: 1; min-width: 0; overflow-x: auto; padding-bottom: 4px; }
.census.sizes { max-width: none; width: max-content; }
.sz-head { height: 44px; display: grid; align-content: end; gap: 2px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.sz-row { display: flex; gap: 14px; align-items: center; }
.sz-set { display: grid; grid-template-columns: repeat(8, 42px); gap: 4px; align-items: center; }
.sz-g { grid-column: 1 / -1; }
.sz-groups { height: 22px; }
.sz-g { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text, inherit); }
.sz-g small { font-weight: 400; color: var(--muted); } .sz-g.low, .sz-g.low small { color: var(--red); }
.sz-k { text-align: center; }
.sizes .sz-row input[type=number] { padding: 3px 2px; text-align: center; }
.sizes .census-sum .sum { text-align: center; padding: 0; }

/* census and size boxes are plain number entry: no up/down spinner */
.census input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.census input[type=number]::-webkit-outer-spin-button, .census input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.kit-rows { display: grid; gap: 12px; margin-top: 10px; }
.kit-row { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 14px; }
.kit-row header { cursor: pointer; }
.kit-row header:hover .title { text-decoration: underline; }
.kit-row header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.kit-row header .title { font-weight: 700; font-size: 15px; }
.kit-row .kit-total { margin-left: auto; }
.kit-row .steps-table { margin: 0; }
.kit-row .thumb-cell { width: 44px; }

.kit-spec { font-size: 12px; margin-left: 6px; }

.assume { margin: 6px 0 12px; max-width: 640px; }
.assume-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.assume-row input[type=range] { flex: 1; min-width: 180px; max-width: 320px; }
.assume-row b { min-width: 44px; }

.doc-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 140px 140px minmax(0, 1.2fr); }
.doc-file { display: flex; align-items: center; gap: 6px; min-width: 0; }
.doc-file .icon-btn.small { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.doc-chip { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
@media (max-width: 640px) { .doc-row { grid-template-columns: 1fr 1fr; } .doc-file { grid-column: 1 / -1; } }

.sc-req { display: inline-flex; align-items: center; gap: 6px; }
.sc-req-n { font-weight: 600; min-width: 1ch; }
.sc-req-n.on { color: var(--red); }

/* Product list: a heading row per category */
.prod-table tr.cat-row th { text-align: left; background: var(--bg-soft, rgba(127,127,127,.08)); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b7280); padding: 6px 10px; }

/* Kits tab: the Level and Fit tables share one first-column width so they line up */
.steps-table.levels th:first-child, .steps-table.levels td:first-child { min-width: 110px; }

/* Dashboard welcome quote: a framed card with an accent bar, so it stands out from the numbers below */
.welcome { margin: 6px 0 22px; max-width: none; width: 100%; box-sizing: border-box; padding: 14px 18px 12px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 10px; box-shadow: 0 1px 3px rgba(16, 24, 40, .08); position: relative; }
.welcome blockquote { margin: 0; font-size: 18px; font-style: italic; color: var(--text); line-height: 1.4; }
.welcome blockquote::before { content: "\201C"; color: var(--brand); font-size: 28px; line-height: 0; margin-right: 4px; vertical-align: -8px; font-style: normal; font-weight: 700; }
.welcome figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.welcome figcaption::before { content: "\2014\00a0"; }

/* Ticket stage tags: a color-coded outline only (no fill), one distinct color per stage */
.stage-code[class*="st-"] { background: transparent; border: 1.5px solid currentColor; }
.stage-code.st-new { color: #a16207; }          /* gold: just arrived */
.stage-code.st-due_today { color: var(--red); } /* red: needs action today */
.stage-code.st-in_progress { color: var(--blue); }
.stage-code.st-follow_up { color: #7c3aed; }    /* purple: come back to it */
.stage-code.st-waiting { color: #c2410c; }      /* orange: waiting on the customer (Pending) */
.stage-code.st-escalated { color: #be123c; }    /* crimson: handed up */
.stage-code.st-resolved { color: var(--green); }
.stage-code.st-closed { color: var(--text); }   /* dark: done */
.stage-code.st-canceled { color: var(--muted); border-style: dashed; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stage-code.st-new { color: #fbbf24; }
  :root:not([data-theme="light"]) .stage-code.st-follow_up { color: #c4b5fd; }
  :root:not([data-theme="light"]) .stage-code.st-waiting { color: #fb923c; }
  :root:not([data-theme="light"]) .stage-code.st-escalated { color: #fb7185; }
}
:root[data-theme="dark"] .stage-code.st-new { color: #fbbf24; }
:root[data-theme="dark"] .stage-code.st-follow_up { color: #c4b5fd; }
:root[data-theme="dark"] .stage-code.st-waiting { color: #fb923c; }
:root[data-theme="dark"] .stage-code.st-escalated { color: #fb7185; }

/* Batch tags follow the ticket stage colors: color-coded outlines, no fill */
.stage-code[class*="bk-"] { background: transparent; border: 1.5px solid currentColor; }
.stage-code.bk-overdue { color: #be123c; }        /* crimson: past its SLA */
.stage-code.bk-due_today { color: var(--red); }   /* red: same as the Due Today stage */
.stage-code.bk-needs_ack { color: #a16207; }      /* gold: same as New */
.stage-code.bk-due_soon { color: var(--blue); }   /* blue: same as In Progress, the clock is running */
.stage-code.bk-follow_up { color: #7c3aed; }      /* purple: same as Follow Up */
.stage-code.bk-to_close { color: var(--green); }  /* green: same as Resolved */
.stage-code.bk-day { color: var(--muted); border-color: var(--line); border-width: 1px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stage-code.bk-overdue { color: #fb7185; }
  :root:not([data-theme="light"]) .stage-code.bk-needs_ack { color: #fbbf24; }
  :root:not([data-theme="light"]) .stage-code.bk-follow_up { color: #c4b5fd; }
}
:root[data-theme="dark"] .stage-code.bk-overdue { color: #fb7185; }
:root[data-theme="dark"] .stage-code.bk-needs_ack { color: #fbbf24; }
:root[data-theme="dark"] .stage-code.bk-follow_up { color: #c4b5fd; }

/* Account page: Export CSV above each accordion, and the read-only (past day) Inventory and Ledger */
.sp-export { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.sp-ro { opacity: .92; }
.sp-ro input, .sp-ro select, .sp-ro textarea, .sp-ro button { opacity: .55; }

/* Pipeline stage tags: outline only, like the ticket stages (the Board section color is the border and the text) */
.stage-code.stage-discovery, .stage-code.stage-procurement, .stage-code.stage-contract, .stage-code.stage-fulfillment, .stage-code.stage-closed, .stage-code.stage-closed-lost { background: transparent; border: 1.5px solid currentColor; }
.stage-code.stage-closed { color: var(--ph-closed-bg); }
.stage-code.stage-closed-lost { color: var(--ph-lost-bg); }
/* Quote phase tags too: outline only */
.phase-tag { background: transparent; border: 1.5px solid currentColor; }
.phase-tag.phase-rfq, .phase-tag.phase-bid, .phase-tag.phase-contract, .phase-tag.phase-supplier_order { background: transparent; }
.board-col h3 .stage-name { font-size: 14px; font-weight: 700; margin: 0 4px; }
.stage-help { margin: 2px 0 8px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.stage-help b { color: var(--text); font-weight: 600; }
/* Board: a sub-accordion per stage inside each section */
.board-stages { display: grid; gap: 8px; padding: 8px 12px 12px; }
.board-stage { border: 1px solid var(--line); border-radius: 10px; background: var(--card, var(--surface, #fff)); }
.board-stage > summary { display: flex; align-items: center; gap: 12px; padding: 8px 12px; cursor: pointer; }
.board-stage .stage-name { font-size: 14px; font-weight: 700; margin: 0 6px; }
.board-stage .stage-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.board-stage .stage-body .stage-help { margin: 0 0 4px; }
.head-actions { display: inline-flex; gap: 8px; }
.rfi-dlg [data-rec="duplicate"], .rfi-dlg [data-rec="pdf"], .rfi-dlg [data-rec="cancel"] { display: none; }
.board-stage .sec-rev { margin-left: auto; }

.stage-restock { background: var(--ph-restock-bg); color: var(--ph-restock); }
.stage-code.stage-restock { background: transparent; border: 1.5px solid currentColor; }
/* Header actions: every button the same size */
.head-actions { flex-wrap: wrap; justify-content: flex-end; }
.head-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-width: 124px; height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; line-height: 1; box-sizing: border-box; }
@media (max-width: 640px) { .head-actions { width: 100%; } .head-actions .btn { flex: 1 1 0; min-width: 0; } }
/* Board bars: one column structure at every level: [tag and name ... count] [flags] [revenue] */
details.board-sec > summary .acc-head, details.board-bar > summary .acc-head, details.board-stage > summary .acc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) 36px; align-items: center; column-gap: 10px; width: var(--head-w); min-width: var(--head-w); flex: none; }
details.board-sec > summary .acc-head .count, details.board-bar > summary .acc-head .count, details.board-stage > summary .acc-head .count { grid-column: 3; justify-self: end; }
details.board-stage > summary .acc-head .stage-name { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.board-stage > summary .week-flags { margin-left: 0; }
.board-stage > summary { flex-wrap: nowrap; }
@media (max-width: 640px) {
  details.board-sec > summary .acc-head, details.board-bar > summary .acc-head, details.board-stage > summary .acc-head { width: auto; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; }
}
details.board-stage > summary .acc-head { grid-template-columns: 124px minmax(0, 1fr) 36px; }
details.board-stage > summary .acc-head > .stage-code { justify-self: start; }
@media (max-width: 640px) { details.board-stage > summary .acc-head { grid-template-columns: auto minmax(0, 1fr) auto; } }
/* The stage explanation sits on the bar itself, so it shows when the stage is closed */
details.board-stage > summary { align-items: center; }
details.board-stage > summary .week-flags { flex: 0 0 84px; }
details.board-stage > summary .stage-help { flex: 1 1 0; min-width: 0; margin: 0; padding: 0 20px 0 4px; font-size: 12.5px; line-height: 1.35; }
@media (max-width: 640px) {
  details.board-stage > summary { flex-wrap: wrap; }
  details.board-stage > summary .week-flags { flex: 1 1 0; }
  details.board-stage > summary .stage-help { flex: 1 0 100%; order: 5; padding: 0 0 0 22px; }
}
details.board-stage > summary .acc-head { grid-template-columns: 150px minmax(0, 1fr) 36px; }
details.board-stage > summary .acc-head .stage-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.doc-upload { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#packet-btn { position: relative; }
#packet-btn[disabled] { opacity: .45; cursor: default; }
#packet-btn .packet-n { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.pu-grid { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 760px; }
.pu-view { display: grid; gap: 4px; grid-template-columns: 1fr; padding: 10px 14px; }
.pu-actions { margin-top: 2px; }
.pu-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px 14px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; min-width: 0; }
.pu-card legend { font-weight: 700; padding: 0 6px; }
.pu-card .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .pu-grid, .pu-card { grid-template-columns: 1fr; } }
.pu-card.pu-view { grid-template-columns: 1fr; gap: 4px; }
.ledger-table .sp-form { margin: 2px 0; }
.sp-statement { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; background: var(--surface); }
.sp-statement tr.total td { border-top: 2px solid var(--line); font-size: 15px; }
details.rev-row > summary { cursor: pointer; list-style: none; font-size: 13px; }
details.rev-row[open] > summary { margin-bottom: 4px; }
/* Header actions: all gray, the font colour says which is which (RFI orange, Quote blue, BPO green) */
.head-actions .btn { background: var(--gray-bg); border: 1px solid var(--line); }
.head-actions .btn:hover { filter: brightness(.96); }
.head-actions .hd-rfi { color: #c2410c; }
.head-actions .hd-quote { color: #1d4ed8; }
.head-actions .hd-bpo { color: #15803d; }
:root[data-theme="dark"] .head-actions .hd-rfi { color: #fb923c; } :root[data-theme="dark"] .head-actions .hd-quote { color: #93b4f5; } :root[data-theme="dark"] .head-actions .hd-bpo { color: #86efac; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .head-actions .hd-rfi { color: #fb923c; } :root:not([data-theme="light"]) .head-actions .hd-quote { color: #93b4f5; } :root:not([data-theme="light"]) .head-actions .hd-bpo { color: #86efac; } }
.census-meta .field:has(#q-census-asof) { flex: 1 1 280px; min-width: 200px; }
.census-meta #q-census-asof { width: 100%; }
/* Quote page: the customer row, the census row and the school card line up on one grid and one height */
.quote-cust-row .btn, .census-meta .btn { height: 40px; min-height: 40px; box-sizing: border-box; padding: 0 16px; font-size: 14px; }
.quote-cust-row input, .census-meta input, .census-meta select { height: 40px; box-sizing: border-box; }
.census-meta { gap: 12px; }
.census-meta .field:has(#q-census-status) { flex: 0 0 280px; }
#nysed-info .nysed-card { max-width: none; width: 100%; box-sizing: border-box; padding: 14px 18px; }
#nysed-info .nc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { #nysed-info .nc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .census-meta .field:has(#q-census-status) { flex: 1 1 100%; } }
@media (max-width: 520px) { #nysed-info .nc-grid { grid-template-columns: 1fr; } }
.sz-set.sz-off { opacity: .4; filter: grayscale(1); }
.sz-set.sz-off input { background: var(--gray-bg); cursor: not-allowed; }
.census-meta .btn, .quote-cust-row .btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1; text-decoration: none; }
.census-line { margin: 8px 0; font-size: 14px; color: var(--muted); }
.census-line b { color: var(--text); font-weight: 600; }
.census-line .sep { margin: 0 4px; }
.overhead-tiles .tip-body { left: 0; right: auto; width: min(320px, 78vw); }
.overhead-tiles .tip-body b { font-size: inherit; }
.totals > div:first-child .tip-body, .totals > div:nth-child(2) .tip-body { left: 0; right: auto; }
.tip-left .tip-body { left: 0; right: auto; }
/* Batch bars: one line, same height; the aging sits where the flags do */
details.batch-sec > summary .batch-age { white-space: nowrap; color: var(--muted); font-size: 13px; margin-left: 4px; }
/* Paperwork tables in the contact form: the account page layout */
tr.doc-row { display: table-row; }
.doc-table td { vertical-align: middle; }
.doc-table select, .doc-table input[type="date"] { width: 100%; min-width: 130px; }
.doc-fileline { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.doc-fileline .doc-chip { max-width: 180px; }
[data-action="doc-packet"] { position: relative; }
[data-action="doc-packet"] .packet-n { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.doc-table td.doc-file { display: table-cell; }
.doc-table select { min-width: 150px; }
.doc-table select { min-width: 136px; }
.doc-table input[type="date"] { min-width: 124px; padding-left: 6px; padding-right: 6px; }
.doc-table th, .doc-table td { padding-left: 6px; padding-right: 6px; }

/* Media Needed: a small preview of the uploaded file */
.media-thumb { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
.media-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-thumb.file { font-size: 11px; font-weight: 700; color: var(--muted); }
.media-thumb.empty { border-style: dashed; background: transparent; }

/* Media Needed: compact columns, so the checkbox and preview stay narrow and the name and file take the room */
.media-table { table-layout: fixed; }
.media-table th:nth-child(1) { width: 36px; }
.media-table th:nth-child(2) { width: 84px; }
.media-table th:nth-child(3) { width: 30%; }
.media-table th:nth-child(4) { width: 110px; }
.media-table th:nth-child(6) { width: 130px; }
.media-table td { overflow-wrap: anywhere; }

/* Account Paperwork: compact columns, so the name and file take the room */
.paper-table { table-layout: fixed; }
.paper-table th:nth-child(1) { width: 36px; }
.paper-table th:nth-child(2) { width: 40%; }
.paper-table .doc-upload { white-space: normal; }
.paper-table th:nth-child(3) { width: 120px; }
.paper-table th:nth-child(4), .paper-table th:nth-child(5) { width: 110px; }
.paper-table th:nth-child(7) { width: 130px; }
.paper-table td { overflow-wrap: anywhere; }

/* Board stage bars: the dollar amount keeps its own column at the far right, clear of the explanation */
details.board-stage > summary .sec-rev { flex: 0 0 76px; text-align: right; margin-left: 0; }

/* Resolved ticket survey: the call controls wrap inside the popup */
.survey-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.survey-act select { max-width: 170px; }

/* Services and Dashboard feeds: one line per change, the stamp in a fixed column, long text cut with an ellipsis */
@media (min-width: 641px) {
  .feed-svc .feed-list li > a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .feed-svc .feed-list li > a > time { display: inline-block; width: 190px; }
  .feed-svc .feed-sep { display: none; }
}

/* Step 3 Restock: the pick list, its final count and the submit button stack under each other */
form.restock-pick { display: block; }
.restock-final { margin: 10px 0; max-width: 420px; }
.restock-pick input[type="number"] { width: 90px; text-align: right; }

/* Settlement statement: the explanation and source report columns wrap so the amount stays in view */
.sp-statement td.sub { white-space: normal; min-width: 160px; max-width: 300px; }
.shopify-panel .steps-table td:first-child { white-space: nowrap; }
.shopify-panel { margin-bottom: 14px; }
.shopify-store input { max-width: 260px; }
.shopify-panel .steps-table td { white-space: nowrap; }
.shopify-panel .doc-upload, .shopify-panel td > a.linklike { display: inline; vertical-align: middle; }
.quote-list .row-link { cursor: pointer; }
.quote-list .row-link:hover td, .quote-list .row-link:focus td { background: var(--hover, rgba(127,127,127,.08)); }
.quote-list td { white-space: nowrap; }
.quote-list { display: block; overflow-x: auto; }
.fr-opts .fr-opt.disabled { opacity: .5; cursor: not-allowed; }
.fr-opts { display: grid; gap: 6px; justify-items: start; margin-bottom: 12px; }
.fr-opts .fr-opt { display: inline-flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; width: auto; margin: 0; font-size: 14px; font-weight: 600; color: var(--text); text-align: left; }
.fr-opts .fr-opt input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; padding: 0; margin: 0; flex: none; }
.fr-opts .fr-detail { margin: 0 0 10px 24px; max-width: 760px; }
.fr-opts .fr-detail .sub { margin: 4px 0 10px; }
.fr-opts .fr-detail .grid2 { grid-template-columns: repeat(4, minmax(0, 170px)); justify-content: start; align-items: end; gap: 4px 14px; }
.fr-opts .fr-detail .field { margin-bottom: 4px; }
.fr-opts .fr-detail input { width: 100%; max-width: none; }
#freight-total .sub { margin: 6px 0; }
@media (max-width: 640px) { .fr-opts .fr-detail .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.proc-notes { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--muted); }
.proc-notes.warn { color: var(--red); }

/* Quote > Pricing: one field per row */
.stack-fields { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 640px; }

/* Procurement Method: the pick list with its notes underneath, as wide as the other Pricing fields */
.stack-fields { max-width: 640px; }
.proc-explain { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.stack-fields .proc-notes { margin-top: 6px; }

/* Quote: the itemized totals and the procurement warning sit in the right half of the page */
.quote-totals { width: 50%; min-width: 320px; margin: 14px 0 0 auto; }
.quote-totals .walk { width: 100%; max-width: none; min-width: 0; margin: 0; }
.quote-totals .walk td.num { text-align: right; }
.quote-totals .proc-total-warn { margin: 10px 0 0; }
@media (max-width: 700px) { .quote-totals { width: 100%; min-width: 0; } }

/* Kit form: EMB / SCR / BLK choice per garment */
.deco-pick { display: inline-flex; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 600; }
.deco-pick label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.deco-pick.off { opacity: .4; cursor: default; } .deco-pick.off label { cursor: default; }

/* Quote kit rows: what is in the kit and each product's share of the kit price (closed until opened) */
.kit-parts { margin-top: 4px; font-size: 13px; }
.kit-parts > summary { cursor: pointer; color: var(--muted); }
.kit-parts-table { width: 100%; margin: 4px 0 2px; border-collapse: collapse; }
.kit-parts-table td { padding: 2px 8px 2px 0; border: 0; }
.kit-parts-table .kit-parts-total td { border-top: 1px solid var(--line); padding-top: 4px; }

/* Uniform Pieces: the product list and its add button share one row and one height */
.pick-row { display: flex; gap: 8px; align-items: stretch; max-width: 560px; }
.pick-row select { flex: 1; min-width: 0; }
.pick-row .add-piece { height: auto; width: 40px; flex: none; }
.pick-row .btn { flex: none; white-space: nowrap; }
[data-pgroup-box] .group-grades select { width: auto; min-width: 70px; }

/* Icon buttons show their description on hover or focus (the browser's own title tooltip does not appear in some embedded viewers or on touch screens) */
.icon-btn[data-tip] { position: relative; }
.icon-btn[data-tip]:hover::after, .icon-btn[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; z-index: 60; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 5px 9px; border-radius: 6px; background: var(--text); color: var(--surface); font-size: 12px; font-weight: 400; line-height: 1.3; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.rec-actions .icon-btn[data-tip]:hover::after, .rec-actions .icon-btn[data-tip]:focus-visible::after { left: auto; right: 0; transform: none; }
.pick-row .icon-btn { height: auto; width: 40px; flex: none; }
.quote-table .group-row td { background: var(--gray-bg); padding-top: 8px; padding-bottom: 8px; }
.quote-table .subtotal-row td { border-top: 1px solid var(--line); border-bottom: 2px solid var(--line); }
/* Remote persistence failures do not block work, but remain visible until the next page load. */
.storage-banner { background:#fff3cd; color:#5c4300; padding:.65rem 1rem; text-align:center; border-bottom:1px solid #e4c96b; font-size:.9rem; }
.login-shell { position:fixed; inset:0; z-index:9999; display:grid; place-items:center; background:var(--bg, #f4f4f1); padding:1rem; }
.login-card { width:min(100%, 22rem); display:grid; gap:1rem; padding:2rem; background:var(--surface, #fff); border:1px solid var(--line, #ddd); border-radius:12px; box-shadow:0 18px 50px #0002; }
.login-card img { margin:auto; } .login-card h1 { margin:0; text-align:center; font-size:1.4rem; } .login-card label { display:grid; gap:.35rem; } .login-card [data-error] { color:#a40000; min-height:1.2em; margin:0; }
