/* 3DM Operations — internal dashboard
   Brand: blue #20669A (sections), orange #FFA500 (accents) */

:root {
    --blue: #20669A;
    --blue-dark: #184e75;
    --orange: #FFA500;
    --ink: #1f2933;
    --muted: #6b7785;
    --line: #dfe4ea;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --danger: #b91c1c;
    --sidebar-bg: #15324a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ── Layout ─────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: #cdd9e4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 28px 36px 60px;
    max-width: 1200px;
}

/* ── Brand ──────────────────────────────────────────────── */
.brand {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.brand-mark {
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    letter-spacing: 1px;
}
.brand-sub { color: var(--orange); font-size: 13px; font-weight: 600; text-transform: uppercase; }

/* ── Sidebar nav ────────────────────────────────────────── */
.nav { flex: 1; padding: 10px 0; }
.nav-section { margin-bottom: 14px; }
.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6f8398;
    padding: 6px 20px;
}
.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 20px;
    color: #cdd9e4;
    font-size: 13.5px;
    border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.nav-link.active {
    background: rgba(255,255,255,0.10);
    color: #fff;
    border-left-color: var(--orange);
    font-weight: 600;
}
.nav-link.pending { color: #8194a6; }
.soon {
    font-size: 9px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.12);
    color: #9fb0c0;
    padding: 1px 6px;
    border-radius: 8px;
}
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.logout { color: #9fb0c0; font-size: 13px; }

/* ── Page header ────────────────────────────────────────── */
.page-head { margin-bottom: 20px; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; color: var(--blue-dark); }
.page-head .muted { max-width: 760px; }
.breadcrumb { margin-bottom: 10px; font-size: 13px; }

/* ── Panels ─────────────────────────────────────────────── */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px 22px;
    margin-bottom: 18px;
}
.panel h2 { margin-top: 0; font-size: 16px; color: var(--blue-dark); }
.placeholder p { margin: 6px 0; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-block;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: #f0f3f6; text-decoration: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-danger { color: var(--danger); border-color: #e3b4b4; background: #fff; }
.btn-danger:hover { background: #fbeaea; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ── Stat cards (home) ──────────────────────────────────── */
.cards-row { display: flex; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.stat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    border-radius: 8px;
    padding: 16px 22px;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    color: var(--ink);
}
.stat-card:hover { text-decoration: none; border-top-color: var(--orange); }
.stat-num { font-size: 30px; font-weight: 700; color: var(--blue-dark); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.quick-link {
    border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: #fbfcfd;
}
.quick-link:hover { border-color: var(--blue); text-decoration: none; }

/* ── Toolbar / search ───────────────────────────────────── */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-form { display: flex; gap: 8px; }
.search-form input { min-width: 280px; }

/* ── Lists ──────────────────────────────────────────────── */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-title { font-weight: 600; }
.tags { color: var(--muted); font-size: 12px; }

/* ── Forms ──────────────────────────────────────────────── */
.form label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .4px; }
.form input[type=text], .form input[type=password], .form input[type=date], .form textarea, .form select,
input[type=password], select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.form textarea { resize: vertical; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 150px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.actions form { margin: 0; }
/* Inline editable field (label + small control on one line) */
.inline-field { display: flex; align-items: center; gap: 8px; margin: 1em 0; }
.inline-form { display: inline; margin: 0; }
.inline-select { width: auto; display: inline-block; padding: 4px 8px; font-size: 13px; }
code { background: #eef1f4; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ── Filters / summary (tasks) ──────────────────────────── */
.filters { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 14px 0; font-size: 13px; }
.filters select { width: auto; display: inline-block; }
.filters .check { display: flex; align-items: center; gap: 6px; }
.summary-row { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.summary-stat { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 16px; font-size: 13px; }
.summary-stat b { color: var(--blue-dark); font-size: 16px; margin-right: 4px; }

/* ── Task sections ──────────────────────────────────────── */
.task-section {
    background: #e6ebef;
    border: 1px solid #d4dae0;
    border-radius: 8px;
    padding: 16px 20px 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(31, 41, 51, 0.06);
}
.task-section h2 { font-size: 16px; color: var(--blue-dark); border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.task-section h2 .count { color: var(--muted); font-size: 13px; font-weight: 400; }
.task { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; margin-bottom: 8px; }
.task-high { border-left-color: var(--danger); }
.task-medium { border-left-color: var(--orange); }
.task-low { border-left-color: #4a9c5a; }
.task > summary { padding: 10px 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task > summary::-webkit-details-marker { display: none; }
.task-title { font-weight: 600; }
.task-desc { color: var(--muted); }
.task-due { color: var(--muted); font-size: 12px; margin-left: auto; }
.task-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.task-quick { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.task-quick form { margin: 0; }
.task-edit { margin-top: 8px; }
.edit-toggle { cursor: pointer; color: var(--blue); font-size: 13px; }
.add-task > summary { cursor: pointer; font-weight: 600; color: var(--blue-dark); }

/* ── Badges ─────────────────────────────────────────────── */
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.p-high { background: #fde2e2; color: #b91c1c; }
.p-medium { background: #fff0d6; color: #9a6700; }
.p-low { background: #e2f3e6; color: #2f7d3f; }
.s-to-do { background: #eceff2; color: #4a5663; }
.s-in-progress { background: #dceaf6; color: #1d5a86; }
.s-waiting { background: #fff0d6; color: #9a6700; }
.s-done { background: #e2f3e6; color: #2f7d3f; }

/* ── Chips / tags ───────────────────────────────────────── */
.tag-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { background: #eef1f4; color: var(--muted); font-size: 12px; padding: 2px 10px; border-radius: 10px; }

/* ── Markdown body ──────────────────────────────────────── */
.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: var(--blue-dark); }
.markdown-body { line-height: 1.65; }
.markdown-body code { font-size: 13px; }
.markdown-body pre { background: #f4f6f8; padding: 12px; border-radius: 6px; overflow-x: auto; }

/* ── Login ──────────────────────────────────────────────── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--sidebar-bg); }
.login-card { background: #fff; padding: 32px; border-radius: 10px; width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.login-brand { border: none; padding: 0 0 18px; justify-content: center; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; }
.login-card .btn { margin-top: 16px; }
.alert { background: #fbeaea; color: var(--danger); border: 1px solid #e3b4b4; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.notice { background: #e2f3e6; color: #2f7d3f; border: 1px solid #b6dcc0; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }

/* ── Service Orders ─────────────────────────────────────── */
.so-tabs { display: flex; gap: 8px; }

.so-card {
    display: flex; align-items: stretch; gap: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 6px;
    margin-bottom: 8px;
}
.so-card-main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.so-card-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink); flex: 1; }
.so-card-link:hover { text-decoration: none; }
.so-card-link:hover .so-cust { text-decoration: underline; }
.so-num { font-weight: 700; color: var(--blue-dark); }
.so-cust { font-weight: 600; }
.so-desc { color: var(--muted); font-size: 13px; }
.so-meta { display: flex; align-items: center; gap: 8px; }
.so-pill { font-size: 11px; padding: 2px 9px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.so-urg { font-size: 12px; font-weight: 600; white-space: nowrap; }
.so-urg-red { color: var(--danger); }
.so-urg-orange { color: #b5740a; }
.so-urg-green { color: #0a8c43; }
.so-urg-gray { color: var(--muted); }
.so-reorder { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-right: 8px; }
.so-reorder form { margin: 0; }
.so-reorder .btn { padding: 0 6px; line-height: 1.4; }

.so-summary-head { cursor: pointer; font-weight: 600; color: var(--blue-dark); }
.so-summary-head .count { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }
.so-matches { margin: 10px 0; }
.so-inline-create { display: flex; gap: 6px; align-items: center; margin: 0; }
.so-inline-create select { width: auto; }

.so-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.so-table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.so-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.so-vendor { margin-bottom: 8px; }
.so-vendor > summary { cursor: pointer; padding: 6px 0; }
.so-email { margin-top: 8px; }
.so-email-body { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }

.so-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.so-detail-head form { margin: 0; }

.so-parts .so-part-cell { padding: 6px 4px; }
.so-part-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.so-part-form input[type=text], .so-part-form input[type=number], .so-part-form select { width: auto; padding: 6px 8px; }
.so-part-form input[name=part_name] { flex: 1; min-width: 160px; }
.so-sku { width: 110px !important; }
.so-qty { width: 64px !important; }
.so-notes { flex: 1; min-width: 140px !important; }
.so-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.so-part-cell { display: flex; gap: 8px; align-items: center; }
.so-part-del { margin: 0; }
.so-addpart { margin-top: 12px; }

.so-imgcol { flex: 1; min-width: 220px; }
.so-imglist { list-style: none; margin: 6px 0; padding: 0; }
.so-imglist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.so-imglist form { margin: 0; }
.so-upload { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* ── Task Tracker: areas + add-by-placement ─────────────── */
.area-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.area-pill {
    display: inline-block; padding: 5px 12px; border: 1px solid var(--line);
    border-radius: 14px; background: #fff; color: var(--blue);
    font-size: 12.5px; font-weight: 600;
}
.area-pill:hover { background: var(--blue); color: #fff; border-color: var(--blue); text-decoration: none; }
.task-section { scroll-margin-top: 16px; }
.area-add { margin-bottom: 14px; }
.area-add-row {
    cursor: pointer; list-style: none; display: inline-block;
    color: var(--blue); font-weight: 600; font-size: 13px;
    padding: 7px 14px; border: 1px solid var(--blue); border-radius: 6px; background: #fff;
}
.area-add-row::-webkit-details-marker { display: none; }
.area-add-row:hover { background: #f0f6fb; }

.task-section-head { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; padding-bottom: 8px; }
.task-section-head h2 { border: none; margin: 0; padding: 0; color: var(--blue-dark); }
.area-edit-toggle { cursor: pointer; list-style: none; }
.area-edit-toggle::-webkit-details-marker { display: none; }
.area-del-form { margin: 0; }

/* up/down reorder arrows (areas + tasks), pushed to far right of the row */
.reorder { display: inline-flex; gap: 2px; margin-left: auto; }
.reorder form { margin: 0; }
.reorder .btn { padding: 2px 8px; line-height: 1.2; }
.area-reorder { align-self: center; }
.task-reorder { align-self: center; }

.area-inline-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.area-inline-form input[type=text] { width: auto; min-width: 240px; }

.task-add { margin-bottom: 8px; }
.task-add-row {
    cursor: pointer; list-style: none;
    border: 1px dashed var(--line); border-radius: 6px;
    padding: 8px 14px; color: var(--blue); font-size: 13px; font-weight: 600; background: #fbfcfd;
}
.task-add-row::-webkit-details-marker { display: none; }
.task-add-row:hover { border-color: var(--blue); background: #f0f6fb; }
.task-add[open] { border: 1px solid var(--line); border-radius: 6px; padding: 0 12px 12px; background: #fbfcfd; margin-bottom: 12px; }
.task-add[open] .task-add-row { border: none; background: none; padding: 10px 2px; }

/* ── Shopify Snapshot ───────────────────────────────────── */
.ss-group { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 6px; background: #fbfcfd; }
.ss-group > summary { cursor: pointer; padding: 8px 12px; font-size: 13px; }
.ss-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 14px; border-top: 1px solid var(--line); }
.ss-name { font-weight: 600; }
.ss-note { font-size: 12px; }
.ss-note-preview { font-size: 12px; }
.ss-uncollected { list-style: none; margin: 8px 0 0; padding: 0; }
.ss-uncollected li { padding: 5px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Data grid table (Vehicle Library etc.) ─────────────── */
.grid-table {
    width: 100%; border-collapse: collapse; background: var(--panel);
    border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 13px;
}
.grid-table th {
    text-align: left; background: #f7f9fb; color: var(--muted);
    font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
    padding: 9px 12px; border-bottom: 1px solid var(--line);
}
.grid-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.grid-table tr:last-child td { border-bottom: none; }
.grid-table tbody tr:hover { background: #f7f9fb; }
.filters input[type=text] { width: 200px; display: inline-block; }
.mr-head { font-weight: 700; color: var(--blue-dark); margin-bottom: 4px !important; }

/* two-row catalog filter bar: search row + on-the-fly filter row */
.catalog-filters { margin: 14px 0 0; }
.cf-set { margin-bottom: 10px; }
.cf-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cf-search input[type=text] {
    width: 360px; max-width: 100%; padding: 8px 12px;
    border: 1px solid var(--line); border-radius: 6px;
    font-size: 14px; font-family: inherit; background: #fff;
}
.cf-filters { font-size: 13px; }
.cf-filters span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.cf-filters select { width: auto; display: inline-block; }
.cf-filters .cf-arrow { color: var(--blue-dark); font-weight: 700; font-size: 15px; margin: 0 1px; }
.cf-more > summary { cursor: pointer; color: var(--muted); font-size: 12px; width: fit-content; }
.cf-more > summary:hover { color: var(--blue); }
.cf-more[open] > summary { margin-bottom: 8px; color: var(--blue-dark); font-weight: 600; }
/* Single filter dropdown — one panel, sectioned (no nested accordions) */
.filter-dd { display: inline-block; margin: 14px 0 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 220px; }
.filter-dd[open] { display: block; }
.filter-dd-btn { cursor: pointer; padding: 9px 16px; font-weight: 700; color: var(--blue-dark); list-style: none; user-select: none; }
.filter-dd-btn::-webkit-details-marker { display: none; }
.filter-dd-btn::before { content: '▸  '; color: var(--muted); }
.filter-dd[open] > .filter-dd-btn::before { content: '▾  '; }
.filter-dd-btn:hover { background: #f7f9fb; border-radius: 8px; }
.filter-dd-on { margin-left: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--blue); padding: 1px 8px; border-radius: 10px; }
.filter-dd-panel { padding: 0 16px 4px; border-top: 1px solid var(--line); }
.filter-dd-sum { margin-left: 10px; font-weight: 400; font-size: 12px; color: var(--muted); }
/* each filter section = its own defined container */
.cf-sec { padding: 12px 14px 14px; margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.cf-sec > h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--blue-dark); font-weight: 700; }
.cf-actions { display: flex; gap: 10px; align-items: center; padding: 2px 0 14px; }
.cf-apply { margin-top: 10px; }
.cf-brands { display: flex; gap: 14px; align-items: flex-start; }
.cf-brand-col { flex: 1; min-width: 220px; }
.cf-brand { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px 14px; }
.cf-brand-head { font-size: 14px; font-weight: 700; color: var(--blue-dark); margin: 0 0 6px 2px; }
.cf-shopnav-head { font-size: 13px; color: var(--blue-dark); font-weight: 700; margin: 12px 0 4px; }
.cf-brand .cf-shopnav-head:first-of-type { margin-top: 0; }
.cf-shopnav-leaf { display: block; padding: 4px 8px; border-radius: 5px; color: var(--blue-dark); font-size: 13px; }
.cf-shopnav-leaf:hover { background: #eef4f9; text-decoration: none; }
.cf-shopnav-leaf.active { background: var(--blue); color: #fff; }

/* ── Kit detail tabs (CSS-only, no JS) ──────────────────── */
.kit-tabs > input[type=radio] { display: none; }
.kit-tablabels { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; }
.kit-tablabels label {
    padding: 9px 20px; cursor: pointer; font-weight: 600; color: var(--muted);
    border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; margin-bottom: -2px;
}
.kit-tablabels label:hover { color: var(--blue); }
#kt-overview:checked ~ .kit-tablabels label[for=kt-overview],
#kt-description:checked ~ .kit-tablabels label[for=kt-description],
#kt-parts:checked ~ .kit-tablabels label[for=kt-parts] {
    color: var(--blue-dark); background: #fff; border-color: var(--line); border-bottom: 2px solid #fff;
}
.kit-panel { display: none; }
#kt-overview:checked ~ #panel-overview { display: block; }
#kt-description:checked ~ #panel-description { display: block; }
#kt-parts:checked ~ #panel-parts { display: block; }

/* ── Part detail tabs (Details | Shopify) ───────────────── */
.ptabs > input[type=radio] { display: none; }
.ptab-labels { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; }
.ptab-labels label {
    padding: 9px 20px; cursor: pointer; font-weight: 600; color: var(--muted);
    border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; margin-bottom: -2px;
}
.ptab-labels label:hover { color: var(--blue); }
#pt-details:checked ~ .ptab-labels label[for=pt-details],
#pt-rel:checked ~ .ptab-labels label[for=pt-rel],
#pt-shopify:checked ~ .ptab-labels label[for=pt-shopify],
#pt-bom:checked ~ .ptab-labels label[for=pt-bom],
#pt-eng:checked ~ .ptab-labels label[for=pt-eng],
#pt-fitment:checked ~ .ptab-labels label[for=pt-fitment] {
    color: var(--blue-dark); background: #fff; border-color: var(--line); border-bottom: 2px solid #fff;
}
.ptab-panel { display: none; }
#pt-details:checked ~ #panel-pt-details { display: block; }
#pt-rel:checked ~ #panel-pt-rel { display: block; }
#pt-shopify:checked ~ #panel-pt-shopify { display: block; }
#pt-bom:checked ~ #panel-pt-bom { display: block; }
#pt-eng:checked ~ #panel-pt-eng { display: block; }
#pt-fitment:checked ~ #panel-pt-fitment { display: block; }

/* Categories config (engineering-tab checkboxes) */
.cat-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.cat-check { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.cat-check input { width: auto; }
/* Category list with per-category spec-parameter drill-down */
.cat-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.cat-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.cat-row .cat-check { border: none; padding: 0; min-width: 220px; }
.cat-params > summary { cursor: pointer; color: var(--blue-dark); font-size: 13px; font-weight: 600; }
.cat-params ul { margin: 8px 0 2px; columns: 2; font-size: 13px; color: var(--muted); }
.cat-params li { margin: 2px 0; }

/* drift flag — Shopify value disagrees with the DB / across listings */
.drift { color: #b3541e; font-weight: 600; }

/* Accessory add row — name + URL + button on one row */
.acc-row { display: flex; gap: 14px; align-items: flex-end; }
.acc-row > div { flex: 1; }
.acc-row .acc-row-btn { flex: 0 0 auto; }
.acc-row input { width: 100%; }
/* divider line above the accessory list, with gap; no per-row lines below */
.fitment-list.acc-list { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; }
.fitment-list.acc-list li { border-bottom: none; }

/* Boilerplate flow placeholders (per-kit content markers) */
.bp-placeholder { border: 1px dashed #c4ccd4; border-radius: 8px; background: #f6f8fa; padding: 12px 14px; margin-bottom: 22px; }
.bp-placeholder > b { color: #5a6573; }
.bp-placeholder .muted { margin: 2px 0 0; }
.bp-ph-tag { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #8a96a3; background: #e7edf2; border-radius: 4px; padding: 1px 7px; margin-right: 8px; vertical-align: middle; }

/* WYSIWYG (Quill) boilerplate editor */
.wysiwyg-form { margin-bottom: 22px; }
.wysiwyg-editor .ql-editor { min-height: 140px; font-size: 14px; }
.wysiwyg-form .ql-toolbar { border-radius: 6px 6px 0 0; }
.wysiwyg-form .ql-container { border-radius: 0 0 6px 6px; }

/* Shopify description preview (composed output) */
.desc-preview { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: #fff; }
.desc-preview img { max-width: 160px; height: auto; }
.desc-preview ul { margin: 4px 0 10px 18px; }
.desc-preview p { margin: 6px 0; }
.desc-source { margin-top: 10px; }
.desc-source-text { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; white-space: pre; }

/* Persistent Product Development dropdown header (megamenu) */
.pd-header { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; margin-bottom: 18px; }
.pd-header-prompt { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 8px; }
.pd-header-label { font-size: 14px; color: var(--blue-dark); margin-right: 4px; font-weight: 700; text-decoration: none; padding: 7px 13px; border-radius: 6px; }
.pd-header-label:hover { background: #eef4f9; }
.pd-header-label.active { background: var(--blue); color: #fff; }
.pd-header-label.active:hover { background: var(--blue); }
.pd-menu { position: relative; }
.pd-menu-btn { font-weight: 700; color: var(--blue-dark); background: none; border: none; cursor: pointer; padding: 7px 13px; border-radius: 6px; font-size: 14px; }
.pd-menu:hover .pd-menu-btn { background: #eef4f9; }
.pd-flyout { display: none; position: absolute; top: 100%; left: 0; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 14px; gap: 24px; min-width: 240px; max-width: 1100px; flex-wrap: wrap; }
.pd-menu:hover .pd-flyout { display: flex; }
.pd-flyout-col { display: flex; flex-direction: column; gap: 1px; }
.pd-flyout-head { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin: 8px 0 3px; white-space: nowrap; }
.pd-flyout-leaf { display: block; padding: 5px 8px; border-radius: 5px; text-decoration: none; color: var(--blue-dark); font-size: 13px; white-space: nowrap; }
a.pd-flyout-leaf:hover { background: #eef4f9; }
.pd-flyout-leaf.soon { color: var(--muted); }
.pd-home-link { margin-left: auto; font-size: 13px; color: var(--muted); text-decoration: none; padding: 7px 10px; }
.pd-home-link:hover { color: var(--blue); }

/* Shopify Product Development — brand top header + line cards */
.brand-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin: 4px 0 22px; }
.brand-tab { padding: 11px 26px; font-weight: 700; font-size: 16px; color: var(--muted); border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; margin-bottom: -2px; text-decoration: none; }
.brand-tab:hover { color: var(--blue); }
.brand-tab.active { color: var(--blue-dark); background: #fff; border-color: var(--line); border-bottom: 2px solid #fff; }
.brand-tabs .pd-refresh { margin-left: auto; align-self: center; margin-bottom: 6px; }
.proddev-soon { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #8a96a3; background: #eef1f4; border-radius: 4px; padding: 1px 6px; }
/* nested tree (Family → Collection) */
.pd-tree { max-width: 760px; }
.pd-group { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.pd-group > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--blue-dark); }
.pd-group > summary::-webkit-details-marker { color: var(--muted); }
.pd-leaves { display: flex; flex-direction: column; padding: 4px 16px 12px 30px; gap: 2px; }
.pd-leaves-flat { padding-left: 16px; }
.pd-leaf { display: block; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--blue-dark); }
a.pd-leaf:hover { background: #eef4f9; }
.pd-leaf-soon { color: var(--muted); }

/* Product Tool — breadcrumb + collapsible help guides (tool-wide + per-container) */
.pd-crumb { margin: 0 0 10px; font-size: 13px; }
.pd-crumb a { color: var(--muted); text-decoration: none; }
.pd-crumb a:hover { color: var(--blue); text-decoration: underline; }
details.pd-help { border: 1px solid var(--line); border-radius: 8px; background: #f7fafc; margin: 0 0 16px; }
details.pd-help > summary { cursor: pointer; padding: 9px 14px; font-size: 13px; font-weight: 700; color: var(--blue-dark); }
details.pd-help > summary::-webkit-details-marker { color: var(--muted); }
details.pd-help .pd-help-body { padding: 2px 16px 12px; font-size: 13px; color: var(--ink); }
details.pd-help .pd-help-body p { margin: 7px 0; }
details.pd-help .pd-help-body code { background: #eef2f6; padding: 0 3px; border-radius: 3px; font-size: 12px; }
/* per-container help: an always-visible help line under a section header */
.pd-help-line { font-size: 12px; color: var(--muted); margin: -2px 0 10px; }
.pd-help-line::before { content: "ℹ "; }
.pd-help-line code { background: #eef2f6; padding: 0 3px; border-radius: 3px; }

/* Catalog Sync dashboard */
.syncbar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin: 14px 0 8px; background: #eef1f4; }
.syncbar-seg { display: block; height: 100%; }
.seg-matched { background: #2ecc71; }
.seg-unmatched { background: #e74c3c; }
.seg-nosku { background: #95a5a6; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.sync-cat > summary { cursor: pointer; font-size: 15px; padding: 4px 0; display: flex; align-items: center; gap: 12px; }
.sync-cat > summary::-webkit-details-marker { color: var(--muted); }
.catbar { flex: 1; max-width: 220px; height: 8px; background: #eef1f4; border-radius: 4px; overflow: hidden; }
.catbar-fill { display: block; height: 100%; background: #e74c3c; }
.catbar-fill.blue { background: #3498db; }
.ok { color: #1e8e4e; font-weight: 600; }
.yes { color: #1e8e4e; font-weight: 700; }
.no { color: #c0c6cd; font-weight: 700; }

/* Sales rollup (3DM kit Parts List) */
.sales-panel { background: #f3f7fa; border-left: 4px solid var(--blue); }
.metric-lbl { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.metric-val { margin: 2px 0 0; font-size: 22px; font-weight: 700; color: var(--blue-dark); }

/* ── Kit list: Kits | Boilerplate sub-tabs ──────────────── */
.subtabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 10px 0 16px; }
.subtab { padding: 9px 20px; font-weight: 600; color: var(--muted); border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; margin-bottom: -2px; }
.subtab:hover { color: var(--blue); text-decoration: none; }
.subtab.active { color: var(--blue-dark); background: #fff; border-color: var(--line); border-bottom: 2px solid #fff; }
.bp-form { margin-bottom: 18px; }
.bp-form textarea { width: 100%; }

/* ── Kit list: search row + filter pills ────────────────── */
.kit-search-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.kit-search-row input[type=text] {
    width: 360px; max-width: 100%; padding: 8px 12px;
    border: 1px solid var(--line); border-radius: 6px; font-size: 14px; font-family: inherit; background: #fff;
}
.kit-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill {
    display: inline-block; padding: 6px 14px; border: 1px solid var(--line);
    border-radius: 16px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600;
}
.pill:hover { border-color: var(--blue); text-decoration: none; }
.pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── Kit details: source-labeled sections ───────────────── */
.src-head { font-weight: 700; color: var(--blue-dark); margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.src-head.src-shopify { color: #5a3a8a; }

/* ── Kit specs (structured Front/Rear) ──────────────────── */
.spec-grid { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 8px; }
.spec-col { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: #fbfcfd; }
.fitment-list { list-style: none; margin: 0 0 10px; padding: 0; }
.fitment-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.fitment-list form { margin: 0; }
.fitment-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fitment-add select { width: auto; min-width: 280px; }
.spec-head { font-weight: 700; color: var(--blue-dark); margin: 0 0 6px; }
.spec-lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; margin: 10px 0 3px; }
.spec-col input, .spec-col select { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; font-family: inherit; background: #fff; }
.spec-lb { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--blue-dark); font-weight: 600; }

/* ── Suspension Kit BOM ─────────────────────────────────── */
.kit-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.kit-list-head h2 { margin: 0; }
.kit-bom td, .kit-bom th { font-size: 12.5px; }
.kit-qty-form { margin: 0; }
.kit-qty-form input { width: 56px; padding: 4px 6px; }
.kit-avail-form { margin: 0; }
.kit-avail-form select { width: auto; padding: 4px 6px; font-size: 12px; }
.kit-bom tfoot .kit-subtotal td { background: #f7f9fb; font-weight: 600; border-top: 2px solid var(--line); }
.bom-group-header td { background: var(--blue-dark); color: #fff; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 6px 12px; }
.kit-add-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.kit-add-form input[type=text] { flex: 1; min-width: 200px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.kit-rollup { max-width: 360px; }
.kit-rollup .kit-total td { border-top: 2px solid var(--line); background: #f7f9fb; }

/* ── Vendors (admin) ────────────────────────────────────── */
.vd-vendor > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.vd-vendor > summary::-webkit-details-marker { display: none; }
.vd-body { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.vd-body p { margin: 4px 0; }
.vd-disc-list { margin: 4px 0 0; padding-left: 18px; }
.vd-disc-list li { margin: 2px 0; }
.vd-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.vd-actions form { margin: 0; }
.vd-edit { flex: 1; min-width: 200px; }
.vd-disc-row { margin-top: 8px; }
.vd-disc-row > div { min-width: 120px; }

/* ── Parts Catalog: Category Builder + hybrid Specs tab ─── */
.cat-builder { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.cat-builder > summary { padding: 10px 14px; cursor: pointer; }
.cat-builder-body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.cat-builder-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; }
.cat-sub-row { border-top: 1px dashed var(--line); }
.cat-sub-row > span:first-child { flex: 1; min-width: 220px; }
.cat-inline-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.cat-inline-form input[type=text] { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-family: inherit; width: 180px; }
.spec-group-head { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px; font-size: 14px; color: var(--blue-dark); }
.spec-group-link { font-weight: 400; }
.spec-field-rm { background: none; border: none; cursor: pointer; padding: 0 2px; font-size: 13px; }
.spec-source-banner { font-size: 13px; padding: 9px 13px; border-radius: 6px; border-left: 4px solid; margin-bottom: 4px; line-height: 1.5; }
.spec-source-library { background: #f0f5fb; border-color: var(--blue); color: #1a3a55; }
.spec-source-adhoc { background: #fffbf0; border-color: #e6a817; color: #5a3e00; }

/* ── Order Processing: Overview tab ─────────────────────── */
.ov-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.ov-card h2 { margin: 0; }
.ov-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ov-metrics { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.ov-metric { display: flex; flex-direction: column; }
.ov-metric-val { font-size: 22px; font-weight: 700; color: var(--blue-dark); }
.ov-metric-label { font-size: 12px; color: var(--muted); }
.ov-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); margin-bottom: 10px; }
.ov-bar > span { display: block; height: 100%; }
.ov-legend { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.ov-legend li { display: flex; align-items: center; gap: 7px; padding: 2px 0; }
.ov-legend b { color: var(--text); }
.ov-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.ov-need { margin: 12px 0 0; font-size: 13px; color: var(--text); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .content { padding: 20px; }
}

/* ── Product list accordion ──────────────────────────────── */
.expand-btn {
    background: none; border: 1px solid var(--line); border-radius: 4px;
    cursor: pointer; padding: 2px 7px; font-size: .8rem; color: var(--text-muted);
    transition: background .15s;
}
.expand-btn:hover { background: var(--bg-alt); }
.panel-row td { border-top: none; }
.prod-panel {
    padding: 14px 16px 16px;
    background: var(--bg-alt);
    border-top: 2px solid var(--blue);
}
.prod-panel-actions {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}
.prod-panel-section {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.prod-panel-section:last-child { margin-bottom: 0; }
.prod-panel-heading {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
    color: var(--blue); font-weight: 700;
    margin: 0 0 10px; padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

/* ── Studio home: the storefront menu, mirrored ──────────────────────────── */
/* Shopify Studio matches Shopify, so the home page is the District menu and
   each collection leaf opens that menu item's tool page. */

.alert-ok {
    background: #eaf5ee;
    border: 1px solid #b7ddc4;
    color: #1d5e37;
}

.menu-mirror {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* The three storefront branches are the top of the hierarchy, so they get a
   pill rather than just a larger heading — it separates them from the menu
   items inside them at a glance. */
.menu-branch > .branch-row h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Nested levels step in, so the tree reads the way the storefront menu does. */
.menu-list .menu-list {
    margin-left: 14px;
    padding-left: 10px;
    border-left: 2px solid var(--line);
}

.menu-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
    /* Same horizontal padding as .menu-leaf, so a parent heading lines up with
       the siblings around it instead of sitting 10px further left. */
    padding: 12px 10px 5px;
}

.menu-group-title {
    /* Typography comes from depth, not from having children — see the depth
       rules at the end of this file. Only the indent and the nested list
       beneath it mark a node as a parent. */
    font-weight: 600;
}

.menu-group-open {
    font-size: 0.76rem;
    color: var(--blue);
    text-decoration: none;
}

.menu-group-open:hover {
    text-decoration: underline;
}

.menu-leaf {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 10px;
    border-radius: 4px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
}

a.menu-leaf:hover {
    background: var(--bg);
    color: var(--blue);
}

.menu-leaf-title {
    font-size: 0.94rem;
}

.menu-leaf-meta {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Content pages and dead links are shown but not actionable yet — they still
   belong to the menu, so hiding them would misrepresent the storefront. */
.menu-leaf.is-other .menu-leaf-title,
.menu-leaf.is-broken .menu-leaf-title {
    color: var(--muted);
}

.menu-leaf.is-broken .menu-leaf-meta {
    color: var(--danger);
}

.home-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.home-foot p {
    margin: 0;
}

.menu-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.menu-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Menu item: readiness checklist ──────────────────────────────────────── */

.gap-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gap-tile {
    flex: 1 1 96px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--panel);
}

.gap-tile.has-gap {
    border-color: #e5b4ae;
    background: #fdf4f3;
}

.gap-n {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.gap-tile.has-gap .gap-n {
    color: var(--danger);
}

.gap-l {
    font-size: 0.74rem;
    color: var(--muted);
}

.checklist-table .ck-col {
    text-align: center;
    white-space: nowrap;
}

.checklist-table th.ck-col {
    font-size: 0.68rem;
    letter-spacing: 0.03em;
}

.ck {
    font-weight: 700;
    font-size: 0.95rem;
}

.ck-yes { color: #2b7a4b; }
.ck-no  { color: var(--danger); }

.checklist-table tr.row-ready td:first-child {
    border-left: 3px solid #2b7a4b;
}

.boilerplate-note {
    margin: 10px 0 0;
    padding: 8px 11px;
    border-left: 3px solid var(--orange);
    background: #fffaf0;
}

/* ── Menu item: bulk editor ──────────────────────────────────────────────── */

.scroll-x { overflow-x: auto; }

.bulk-table { font-size: 0.85rem; }
.bulk-table th.num, .bulk-table td.num { text-align: right; white-space: nowrap; }
.bulk-table td { font-variant-numeric: tabular-nums; }

/* A DB value Shopify disagrees with, or a value Shopify is missing. */
.cell-diff { color: var(--danger); font-weight: 700; }

.flag {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fdecea;
    color: var(--danger);
}

.field-group { margin-top: 18px; }
.field-group h3 { margin: 0 0 3px; font-size: 1rem; }
.field-table { font-size: 0.84rem; margin-top: 8px; }
.field-table code { font-size: 0.78rem; }

/* ── Menu mirror: depth-aware hierarchy ──────────────────────────────────── */
/* Siblings look like siblings. A node's typography is set by how deep it sits,
   never by whether it happens to have children — so BMW Racecars matches the
   M3/M4 (G8X) entries beside it, Ohlins 'Tools' matches the family headings it
   sits among, and the Swift lines match both. Depth is carried by indent and
   the nested list, not by restyling parents. */

.menu-leaf.d1 .menu-leaf-title,
.menu-group.g1 .menu-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.menu-leaf.d2 .menu-leaf-title,
.menu-group.g2 .menu-group-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
}

.menu-leaf.d3 .menu-leaf-title,
.menu-leaf.d4 .menu-leaf-title,
.menu-group.g3 .menu-group-title,
.menu-group.g4 .menu-group-title {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--muted);
}

/* Deeper lists indent a little less, so long chains stay readable. */
.menu-list.depth-3,
.menu-list.depth-4 {
    margin-left: 10px;
    padding-left: 8px;
}

/* ── Build flags on the menu rows ────────────────────────────────────────── */

/* Each toggle is its own form post, so state survives without any JS. */
.toggle {
    cursor: pointer;
    min-width: 64px;
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.toggle-off {
    background: #fdecea;
    border: 1px solid #e5b4ae;
    color: var(--danger);
}

.toggle-on {
    background: #eaf5ee;
    border: 1px solid #b7ddc4;
    color: #1d5e37;
}

.toggle:hover { filter: brightness(0.96); }

/* A menu row is the item plus its two build flags, so the flags sit outside
   the item's own link rather than nested inside it. */
.menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.menu-row > .menu-leaf,
.menu-row > .menu-group {
    flex: 1 1 auto;
    min-width: 0;
    border-bottom: none;
}

.menu-flags {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.flag-form { margin: 0; }

.toggle-key {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.75;
    margin-right: 4px;
}

/* The branch heading is a coloured bar spanning the whole panel. Negative
   margins cancel the panel's own padding (20px 22px) so it reaches the edges,
   and the radius matches the panel's 8px minus its 1px border. */
.branch-row {
    margin: -20px -22px 16px;
    padding: 12px 22px;
    background: var(--blue);
    border-radius: 7px 7px 0 0;
    border-bottom: none;
}

.branch-row h2 { flex: 1 1 auto; }

.branch-row .menu-group-open {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

/* Studio-only items: being developed before the Shopify menu item exists. */
.pending-tag {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fff4e0;
    color: #8a5a00;
}

/* Studio tools pinned into the storefront menu: work that belongs to a whole
   branch rather than one menu item. Deliberately unlike a menu leaf — this is a
   Studio page, not something the customer has. */
.menu-tool {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cfe0ee;
    border-left: 4px solid #20669A;
    border-radius: 3px;
    background: #f4f9fc;
    text-decoration: none;
}

.menu-tool:hover {
    background: #e9f3fa;
    border-color: #20669A;
}

.menu-tool-title {
    font-weight: 700;
    color: #20669A;
}

.menu-tool-blurb {
    font-size: 0.78rem;
    color: #5c6b77;
}

/* Kit tiers: a product type, not a storefront collection. Brand blue so it
   reads as a Studio construct rather than something the customer sees. */
.tier-tag {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #e7f0f7;
    color: #20669A;
}

/* Open audit findings on a menu item — the "known problems here" badge. */
.audit-tag {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fdecea;
    color: #a33a2e;
}

/* ── Audit tab ── one row per open defect; the list is meant to shrink. */
.audit-group { display: flex; align-items: baseline; gap: 10px; }

.audit-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #a33a2e;
    background: #fdecea;
    padding: 1px 8px;
    border-radius: 10px;
}

.audit-clean { color: #1d7a36; font-weight: 600; margin: 0; }

.audit-table { width: 100%; border-collapse: collapse; }

.audit-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eef1f4;
    vertical-align: top;
}

.audit-table tr:last-child td { border-bottom: none; }

.audit-kit { white-space: nowrap; font-weight: 700; width: 1%; }

.audit-detail { font-size: 0.88rem; }

.audit-meta { display: block; font-size: 0.72rem; color: #8a97a3; margin-top: 2px; }

.audit-actions { width: 1%; white-space: nowrap; text-align: right; }

.audit-act { display: inline-block; margin: 0; }

.audit-dismiss { display: inline-block; position: relative; }
.audit-dismiss summary { list-style: none; cursor: pointer; display: inline-block; }
.audit-dismiss summary::-webkit-details-marker { display: none; }
.audit-dismiss[open] form {
    position: absolute;
    right: 0;
    z-index: 5;
    background: #fff;
    border: 1px solid #cfd8e0;
    border-radius: 3px;
    padding: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    display: flex;
    gap: 6px;
    width: 320px;
}
.audit-dismiss form input[type=text] { flex: 1; }

.audit-resolved .audit-detail, .audit-resolved .audit-kit { color: #8a97a3; }

.audit-history { margin-top: 18px; }
.audit-history > summary { cursor: pointer; font-weight: 600; color: #5c6b77; }

.pending-note {
    margin: 8px 0 0;
    padding: 9px 12px;
    border-left: 3px solid var(--orange);
    background: #fffaf0;
    font-size: 0.88rem;
    color: var(--ink-2, var(--ink));
    max-width: 78ch;
}

/* ── Öhlins Catalog Update ──────────────────────────────────────────────────
   A status page plus a runbook. Öhlins is the one vendor whose truth lives in
   the DB, so the portal has to be read back in; there is no execute button
   because the portal needs a signed-in session the server cannot drive. */

.last-run-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.last-run-date { font-size: 1.5rem; font-weight: 700; color: var(--blue-dark); margin-right: 10px; }
.last-run-age { font-size: .85rem; color: var(--muted); }
.last-run.is-stale .last-run-age { color: #8a5a00; font-weight: 700; }
.last-run.is-stale .last-run-date { color: #8a5a00; }
.last-run-when { margin-bottom: 8px; }

.area-h { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1.05rem; color: var(--blue-dark); }
.area-rank { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #20669A; color: #fff; font-size: .74rem; font-weight: 700; }
.area-note { font-weight: 400; color: var(--muted); font-size: .85rem; }
.sub-h { margin: 18px 0 4px; font-size: .92rem; color: var(--blue-dark); }

.panel .chip { display: inline-block; margin: 0 6px 4px 0; }
.chip.warn { background: #fff4e0; color: #8a5a00; font-weight: 700; }

.tier-table { max-width: 420px; }
.desc-cell { color: var(--muted); font-size: .82rem; }
code.suggest { background: #fff4e0; color: #8a5a00; }

.runbook-panel { border-left: 4px solid #FFA500; }
.runbook { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }
.runbook li { margin-bottom: 10px; }
.runbook-code { background: #f4f6f8; border: 1px solid #e2e6ea; border-radius: 4px; padding: 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; white-space: pre; }
.runbook-todo { display: block; margin-top: 4px; padding: 4px 8px; border-left: 3px solid #FFA500; background: #fffaf0; color: #8a5a00; font-size: .82rem; }

/* Description preview, opened from a checklist row. */
.preview-dialog {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    min-width: 520px;
    max-width: 760px;
    max-height: 82vh;
    overflow-y: auto;
    background: var(--bg);
    color: var(--text);
}

.preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

/* ── Lifecycle checklist: a wide table that scrolls ─────────────────────────
   The lifecycle runs to far more columns than a page is wide, so the table
   scrolls sideways rather than hiding stages. The product column freezes:
   without it you scroll right and lose which kit the row belongs to. */

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.table-scroll .grid-table {
    /* override grid-table's width:100% so the table may exceed its container,
       and its overflow:hidden, which would clip the sticky column */
    width: auto;
    min-width: 100%;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.checklist-table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    /* opaque, or scrolled cells show through underneath */
    background: var(--panel);
    border-right: 1px solid var(--line);
    min-width: 260px;
}

.checklist-table thead .sticky-col {
    z-index: 3;
    /* colour set with the rest of Product ID, further down */
}

.checklist-table tbody tr:hover .sticky-col { background: #f7f9fb; }

/* Phase bands: who owns this stretch of the lifecycle. */
.checklist-table .phase-row th {
    text-transform: none;
    letter-spacing: .02em;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-bottom: 1px solid var(--line);
}

.checklist-table .phase-band {
    text-align: center;
    border-left: 2px solid var(--line);
    border-right: 2px solid var(--line);
}

.phase-band.phase-shopify { background: #fff4e0; color: #8a5a00; }
.phase-band.phase-live    { background: #e8f5ec; color: #2b7a4b; }

.checklist-table tr.row-ready .sticky-col {
    border-left: 3px solid #2b7a4b;
}

/* The checklist is all ticks so it reads at a glance; the figures live in the
   Bulk Editor. The one exception is a value that exists but disagrees with the
   catalog — neither done nor missing, and a plain tick would bury it. */
.ck-warn { color: #b8730a; }

/* Hand-ticked gates are clickable; computed ones are deliberately not. */
.stage-form { display: inline; margin: 0; }
.stage-btn { background: none; border: none; cursor: pointer; padding: 0; font: inherit; }
.ck-todo { color: var(--muted); }
.stage-btn.ck-todo:hover { color: #20669A; }

/* Required gates: must pass before a product is capable of going live. */
.req-star { color: var(--danger); font-weight: 700; margin-left: 2px; }
/* Required headers used to be dark blue against grey for the rest, which
   said the same thing twice. The red * is the differentiator; every
   column name reads the same weight so the row scans evenly. */
.gap-tile.is-required.has-gap { border-color: var(--danger); }

/* Published is the key column: not a yes/no but where a product stands. */
.ck-ready { color: #20669A; font-weight: 700; }
.ck-dev   { color: var(--muted); }
.launch-ready    { background: #e7f0f7; }
.launch-live_gap { background: #fdecea; }
.launch-live     { background: #e8f5ec; }

/* Publishing column + legend. */
.checklist-table .pub-col { white-space: nowrap; text-align: center; font-size: 12px; }
.legend { margin: 10px 0 0; font-size: 0.78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.legend-item { white-space: nowrap; }
.legend-item .ck { font-size: 0.8rem; margin-right: 3px; }

/* The Updated date is a fixed-width value — never wrap it. */
.checklist-table .updated-col { white-space: nowrap; min-width: 92px; }

/* Pricing band: figures, not ticks. Amber where Shopify disagrees with the catalog. */
.checklist-table .money-col { text-align: right; white-space: nowrap; font-size: 12px; }
/* Green agrees with the catalog, red does not. Uncoloured means one side has
   no value — that is a gap, not a disagreement. */
.checklist-table .money-match  { color: #2b7a4b; font-weight: 700; }
/* Amber, not red: a price disagreeing with the catalog is something to go and
   look at, not a failure. The legend swatch and the grid cell must match. */
.checklist-table .money-differ { color: #9a6700; font-weight: 700; background: #fff0d6; }

/* The SKU is the drill-down into the part view. */
.checklist-table .sku-col { white-space: nowrap; }
.sku-link { font-size: 11px; font-family: ui-monospace, Menlo, Consolas, monospace;
            color: var(--blue-dark); text-decoration: none; }
.sku-link:hover { text-decoration: underline; }

/* ── The checklist on a wide screen ─────────────────────────────────────────
   .content is capped at 1200px so prose stays readable. The checklist is a
   21-column grid and wants every pixel, so it breaks out of that cap and fills
   the viewport instead — minus the 240px sidebar and .content's own padding. */
.panel-wide {
    width: calc(100vw - 240px - 72px);
    max-width: calc(100vw - 240px - 72px);
}

/* Scrolls both ways inside the grid, so both scrollbars stay put — page-level
   vertical scrolling walked the horizontal scrollbar off the bottom of the
   screen. Sized to nearly the full viewport: most tiers show every row anyway,
   and it buys back the sticky header, which page scrolling cannot have. */
.panel-wide .table-scroll {
    max-height: calc(100vh - 190px);
    overflow: auto;
}

/* Header pins going down. Two rows: the band titles, then the column labels
   sitting directly beneath them. */
.checklist-table thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 4;
}

.checklist-table thead tr:last-child th {
    position: sticky;
    top: 28px;
    z-index: 4;
}

/* Where the frozen column crosses the frozen header, both have to win. */
/* The two header cells above the frozen column have to freeze on BOTH axes:
   top with their header row, left with the column. Their `top` came from the
   row rules and their `left` from the column rule, which left the corner
   ambiguous - stated here together so it is not. Above everything else, since
   this is the cell two frozen things cross at. */
.checklist-table thead .sticky-col { z-index: 7; }
.checklist-table thead tr:first-child .sticky-col {
    position: sticky; top: 0; left: 0; z-index: 9;
}
.checklist-table thead tr:last-child .sticky-col {
    position: sticky; top: 28px; left: 0; z-index: 9;
}
/* Product ID owns both frozen header cells, so they carry its colour rather
   than the generic header grey. */
.checklist-table thead .sticky-col { background: #dde5ea; }

@media (max-width: 1400px) {
    /* Narrow enough that breaking out gains nothing — behave like any panel. */
    .panel-wide { width: auto; max-width: 100%; }
}

/* Publishing: Shopify's own words, plus what stands in the way. */
.status-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
              padding: 2px 7px; border-radius: 3px; }
.status-active   { background: #e8f5ec; color: #2b7a4b; }
.status-draft    { background: #eef1f4; color: var(--muted); }
.status-unlisted { background: #fff4e0; color: #8a5a00; }
.status-archived { background: #fdecea; color: var(--danger); }

.chan { font-size: 11px; color: var(--muted); }
.chan-live { color: #2b7a4b; font-weight: 700; }

.checklist-table .notes-col { min-width: 260px; white-space: normal; font-size: 11px; }
.note-chip { display: inline-block; background: #eef1f4; color: var(--ink);
             border-radius: 3px; padding: 1px 6px; margin: 1px 3px 1px 0; }
.notes-col.launch-live_gap .note-chip:first-child { background: #fdecea; color: var(--danger); font-weight: 700; }
.notes-col.launch-ready .note-chip:first-child { background: #e7f0f7; color: #20669A; font-weight: 700; }
/* Same semantics on the Audit tab's Live gaps rows, where the chip carries the
   launch state itself. */
.audit-table .note-chip.launch-live_gap:first-child { background: #fdecea; color: var(--danger); font-weight: 700; }
.audit-table .note-chip.launch-ready:first-child { background: #e7f0f7; color: #20669A; font-weight: 700; }

.audit-cat { font-size: 1rem; margin-bottom: 4px; }

/* ── Products tab ── the roster: triage on top, one card per product. */
.triage-h { margin: 0; }
.triage-fix .flow-mgr-row { border: none; background: none; padding: 0; }

.live-chip {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #e7f0f7;
    color: #20669A;
}

.punch-line { margin: 6px 0; font-size: 0.88rem; }
.bulk-line { margin: 4px 0; font-size: 0.84rem; }

.roster-head { margin: 18px 0 6px; }

.prod-card {
    border: 1px solid #dfe5ea;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 6px;
}
.prod-card.sev-red { border-left: 4px solid #c0392b; }
.prod-card.sev-amber { border-left: 4px solid #c77d00; }
.prod-card.sev-green { border-left: 4px solid #1d7a36; }

.prod-sum {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    list-style: none;
}
.prod-sum::-webkit-details-marker { display: none; }
.prod-sum:hover { background: #f6f9fb; }
.prod-sum::before { content: '▸'; color: #8a97a3; }
.prod-card[open] > .prod-sum::before { content: '▾'; }

.prod-title { flex: 0 1 auto; }
.prod-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.prod-audited { white-space: nowrap; }

.sev-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}
.sev-dot.sev-red { background: #c0392b; }
.sev-dot.sev-amber { background: #e8a33d; }
.sev-dot.sev-green { background: #2e9e4f; }

.prod-body { padding: 4px 12px 14px; border-top: 1px solid #eef1f4; }

.prod-h { margin: 16px 0 6px; font-size: 0.92rem; }

.cat-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 2px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #eef1f4;
    color: #5c6b77;
}
.cat-chip.cat-price { background: #fdecea; color: #a33a2e; }
.cat-chip.cat-availability { background: #fff4e0; color: #8a5a00; }
.cat-chip.cat-description { background: #e7f0f7; color: #20669A; }

.req-chip {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 2px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #efe9f7;
    color: #5b3e8f;
}

.prod-req {
    background: #fbfbf6;
    border: 1px solid #ece9da;
    border-radius: 3px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

/* ── Task Tracker: Development Lifecycle ──────────────────
   Reference, not tasks — so it is deliberately quieter than .task-section:
   white ground, orange rule, no status colour anywhere. */
.lifecycle-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    padding: 14px 20px 16px;
    margin-bottom: 22px;
    scroll-margin-top: 16px;
}
.lifecycle-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lifecycle-head h2 { font-size: 16px; color: var(--blue-dark); margin: 0; }
.area-pill-lc { border-color: var(--orange); color: #9a6700; }
.area-pill-lc:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }

.lifecycle { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; background: #fbfcfd; }
.lifecycle > summary { padding: 10px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lifecycle > summary::-webkit-details-marker { display: none; }
.lifecycle[open] > summary { border-bottom: 1px solid var(--line); }
.lc-name { font-weight: 600; color: var(--blue-dark); }
.lc-reorder { align-self: center; }
.lifecycle-body { padding: 12px 16px 16px; }
.lc-intro { color: var(--muted); margin: 0 0 14px; max-width: 62em; }

.lc-phase { margin-bottom: 16px; }
.lc-phase h3 {
    font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--blue); margin: 0 0 8px; padding-left: 8px;
    border-left: 3px solid var(--orange);
}
.lc-steps { list-style: none; margin: 0; padding: 0; }
.lc-steps > li { padding: 7px 0 7px 16px; border-bottom: 1px solid #eef1f4; position: relative; }
.lc-steps > li:last-child { border-bottom: none; }
.lc-steps > li::before { content: "\2022"; position: absolute; left: 2px; color: var(--orange); font-weight: 700; }
.lc-step-row { display: flex; align-items: flex-start; gap: 10px; }
.lc-step-text { flex: 1; max-width: 68em; }
.lc-step-text b { color: var(--ink); }
.lc-detail { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; white-space: pre-line; }
.lc-source { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--blue); background: #eef4f9; border-radius: 10px; padding: 1px 10px; }
.lc-step-reorder { margin-left: auto; opacity: 0; transition: opacity .12s; }
.lc-steps > li:hover .lc-step-reorder, .lc-step-reorder:focus-within { opacity: 1; }
.lc-step-edit { margin-top: 4px; }
.lc-step-edit > summary { font-size: 12px; }
.lc-step-edit form { margin-top: 6px; }

.lc-add { margin-top: 10px; }
.lc-add-row {
    cursor: pointer; list-style: none; display: inline-block;
    border: 1px dashed var(--line); border-radius: 6px;
    padding: 7px 14px; color: var(--blue); font-size: 13px; font-weight: 600; background: #fff;
}
.lc-add-row::-webkit-details-marker { display: none; }
.lc-add-row:hover { border-color: var(--orange); background: #fffaf0; }
.lc-add-quiet { color: var(--muted); font-weight: 400; }
.lc-new { margin-top: 4px; }

/* ── Menu item: Product Lifecycle tab ───────────────────
   Manual ticks and Barry's own notes. Quieter than the Product List grid,
   which is computed - this one is a person saying what they have done. */
.lc-progress-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap; margin: 4px 0 18px;
}
.lc-bar { flex: 1; min-width: 200px; max-width: 320px; height: 8px;
          background: #e6ebef; border-radius: 4px; overflow: hidden; }
.lc-bar span { display: block; height: 100%; background: var(--orange); }

.mlc-phase { margin-bottom: 18px; }
.mlc-phase h3 {
    font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--blue); margin: 0 0 8px; padding-left: 8px;
    border-left: 3px solid var(--orange);
}
.mlc-step {
    display: flex; gap: 12px; align-items: flex-start;
    background: #fff; border: 1px solid var(--line); border-radius: 6px;
    padding: 10px 14px; margin-bottom: 6px;
}
.mlc-step.is-done { background: #f7faf8; border-color: #cfe3d5; }
.mlc-step.is-done .mlc-title { color: var(--muted); }

.mlc-tick { margin: 0; }
.mlc-box {
    width: 22px; height: 22px; border-radius: 4px; cursor: pointer;
    border: 2px solid var(--line); background: #fff; color: #2f7d3f;
    font-size: 14px; font-weight: 700; line-height: 1; padding: 0;
}
.mlc-box:hover { border-color: var(--orange); }
.is-done .mlc-box { border-color: #4a9c5a; background: #e2f3e6; }

.mlc-body { flex: 1; min-width: 0; }
.mlc-title { font-weight: 600; }
.mlc-when { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 8px; }
.mlc-detail {
    color: var(--muted); font-size: 13px; margin-top: 3px;
    white-space: pre-line; max-width: 72em;
}
.mlc-note {
    margin-top: 8px; padding: 8px 12px; background: #fffaf0;
    border-left: 3px solid var(--orange); border-radius: 0 4px 4px 0;
    white-space: pre-line; font-size: 13px; max-width: 72em;
}
.mlc-noteedit { margin-top: 6px; }
.mlc-noteedit > summary { font-size: 12px; }
.mlc-noteedit textarea { max-width: 72em; }

/* ── Product Developer: overview row in the grid header ──────────
   Was a row of cards above the table. A count means more directly above the
   column it counts than it does in a separate container you have to match up. */
.ov-row th {
    text-align: center; font-size: 13px; font-weight: 700;
    background: #eef1f4; color: var(--muted);
    border-bottom: 1px solid var(--line); padding: 5px 6px;
}
.ov-row .ov-cell.has-gap { background: #fff0d6; color: #9a6700; }
.ov-row .ov-cell.has-gap.is-required { background: #fde2e2; color: #b91c1c; }
.ov-row .sticky-col { text-align: left; background: #e6ebef; white-space: nowrap; }
.ov-ready { color: var(--blue-dark); font-size: 14px; }
.ov-ready-l { font-weight: 400; font-size: 12px; margin-left: 3px; }

/* ── Product Developer: expanded variant rows ──────────────────
   Recessed against the product row above them so the grid still reads as a
   list of products, with variants belonging to one. */
.vrow > td { background: #fbfcfd; border-top: 1px dotted #e6ebef; font-size: 12.5px; }
.vrow .sticky-col { background: #f4f6f8; }
.vrow-name { color: var(--muted); white-space: nowrap; padding-left: 18px !important; }
.vrow-tick { color: #c4ccd4; margin-right: 6px; }
.vrow-blank { background: #fbfcfd; }
.vrow-sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; white-space: nowrap; }
.vrow-nocat { color: var(--danger); }

/* Variant rows start collapsed - see the toggle in the product row. */
.vrow.is-collapsed { display: none; }
.vtoggle {
    border: 1px solid var(--line); background: #fff; color: var(--muted);
    border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 600;
    padding: 1px 6px; margin-right: 8px; line-height: 1.5;
}
.vtoggle:hover { border-color: var(--orange); color: var(--ink); }
.vtoggle-arrow { display: inline-block; margin-right: 4px; transition: transform .12s; }
.vtoggle.is-open { border-color: var(--orange); color: var(--ink); }
.vtoggle.is-open .vtoggle-arrow { transform: rotate(90deg); }

/* Studio Publishing: Updated + the two action buttons. The band colour already
   exists further up as .phase-band.phase-studio. */
.act-col { text-align: center; white-space: nowrap; }
.act-col form { margin: 0; display: inline; }
.updated-col.is-stale { color: #9a6700; font-weight: 600; }
.stale-dot { color: var(--orange); }
.row-shopify { margin-left: 8px; color: var(--muted); font-size: 12px; text-decoration: none; }
.row-shopify:hover { color: var(--blue); }

/* Description band — its own colour, since it pushes on its own button. */

/* Customs & Codes — parked at the far end, so it reads quieter than the
   groups you actually work in. */

/* Description Editor: the Sections panel. Folded away by default - most days
   you are writing copy, not changing the shape of the page. */
.flow-mgr-row {
    cursor: pointer; list-style: none; display: inline-block;
    color: var(--blue); font-weight: 600; font-size: 13px;
    padding: 7px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.flow-mgr-row::-webkit-details-marker { display: none; }
.flow-mgr-row:hover { border-color: var(--orange); background: #fffaf0; }
.flow-table { margin: 12px 0; }
.flow-table td { vertical-align: middle; }
.flow-move { white-space: nowrap; }
.flow-move form { display: inline; margin: 0; }
.flow-kind { font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 9px; }
.flow-field { background: #dceaf6; color: #1d5a86; }
.flow-block { background: #eef1f4; color: var(--muted); }
.flow-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.flow-edit input[type=text] { width: auto; min-width: 190px; }
.flow-slot { font-size: 11px; color: var(--muted); }
.flow-add { margin-top: 10px; }
.flow-add-row {
    cursor: pointer; list-style: none; display: inline-block;
    border: 1px dashed var(--line); border-radius: 6px;
    padding: 7px 14px; color: var(--blue); font-size: 13px; font-weight: 600; background: #fbfcfd;
}
.flow-add-row::-webkit-details-marker { display: none; }
.flow-add-row:hover { border-color: var(--orange); background: #fffaf0; }

/* Click a gate cell to see what is behind it. No per-cell label - the cell is
   the target, which costs no space in a grid already 32 columns wide. */
.ck-col.cd-able, .money-col.cd-able, .pub-col.cd-able { cursor: pointer; }
.ck-col.cd-able:hover, .money-col.cd-able:hover { background: #fffaf0; }

#cell-detail {
    position: absolute; z-index: 60; min-width: 300px; max-width: 460px;
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 8px 28px rgba(31, 41, 51, .18); padding: 12px 14px;
    font-size: 13px; display: none;
}
#cell-detail.is-open { display: block; }
.cd-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
           border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 8px; }
.cd-head b { color: var(--blue-dark); font-size: 14px; }
.cd-owner { color: var(--muted); font-size: 12px; }
.cd-rows { width: 100%; border-collapse: collapse; }
.cd-rows th { text-align: left; vertical-align: top; color: var(--muted);
              font-weight: 600; padding: 3px 10px 3px 0; white-space: nowrap; }
.cd-rows td { vertical-align: top; padding: 3px 0; word-break: break-word; }
.cd-note { color: var(--muted); font-size: 12px; margin: 8px 0 0;
           border-top: 1px solid var(--line); padding-top: 7px; }
.cd-loading { color: var(--muted); }

/* ── Product Developer: one colour per group, two strengths ───────
   The band and the column names share a shade; the cells beneath take a
   lighter version of the same hue, so a group reads as one block from its
   heading to the last row. That is what keeps you oriented on a grid this
   wide - the heading is a long way up by the time you are reading row 40. */

.phase-band.phase-sku { background: #dde5ea; color: #3d5566; }
.phase-band.phase-publishing { background: #e4d9f2; color: #5b3f8a; }
.phase-band.phase-studio { background: #d6e6f5; color: #1d5a86; }
.phase-band.phase-desc { background: #f3dcea; color: #8a3f6b; }
.phase-band.phase-pricing { background: #d9eee1; color: #2b7a4b; }
.phase-band.phase-setup { background: #e6e9ec; color: #3d4852; }
.phase-band.phase-customs { background: #e6e9ec; color: #6b7785; }

.checklist-table th.grp-sku         { background: #dde5ea; }
.checklist-table th.grp-publishing  { background: #e4d9f2; }
.checklist-table th.grp-studio      { background: #d6e6f5; }
.checklist-table th.grp-desc        { background: #f3dcea; }
.checklist-table th.grp-pricing     { background: #d9eee1; }
.checklist-table th.grp-setup       { background: #e6e9ec; }
.checklist-table th.grp-customs     { background: #e6e9ec; }

.checklist-table tbody td.grp-sku         { background: #f2f6f9; }
.checklist-table tbody td.grp-publishing  { background: #f6f1fc; }
.checklist-table tbody td.grp-studio      { background: #eff6fc; }
.checklist-table tbody td.grp-desc        { background: #fcf2f8; }
.checklist-table tbody td.grp-pricing     { background: #f1f9f4; }
.checklist-table tbody td.grp-setup       { background: #f7f8f9; }
.checklist-table tbody td.grp-customs     { background: #f7f8f9; }

/* Variant rows sit under their product, recessed, whatever group they are in. */
.checklist-table tbody tr.vrow > td { background: #f6f8fa; }
.checklist-table tbody tr.vrow .sticky-col { background: #f1f4f6; }

/* The frozen name column, and a product that is ready to go live. */
.checklist-table tbody .sticky-col { background: #f2f6f9; }
.checklist-table tbody tr.row-ready .sticky-col { background: #edf6f0; }

/* A warning gets a ground of its own - it is something to go and fix, not a
   category. A matched price needs none: its figure is already green and bold. */
.checklist-table tbody td.money-col.money-differ { background: #fff0d6; }
.checklist-table tbody td.updated-col.is-stale { background: #fff6e5; }

/* Product ID — the name and the SKU. Its band cell above the frozen name
   column is blank; the heading sits over the SKU beside it, and the shared
   colour is what ties the two together. */

/* The frozen half of the Product ID band carries the label, so it needs the
   band's own weight rather than the plain sticky-header styling. */
.checklist-table thead .sticky-col.phase-band {
    font-weight: 700; text-align: left; padding-left: 10px;
}

/* The quiet half of an action button: same control, nothing waiting on it.
   Solid blue means Studio and Shopify disagree; this means they agree. A pale
   fill with blue text rather than pale text on white, which would read as
   disabled - it is still perfectly clickable. */
.btn-quiet {
    background: #e6eff6;
    border-color: #c2d9e8;
    color: var(--blue);
}
.btn-quiet:hover { background: #d6e6f2; border-color: var(--blue); }

/* "i" beside an action column header — what the button does. Small and quiet:
   it is there when you wonder, not competing with the column name. */
.col-help {
    display: inline-flex; align-items: center; justify-content: center;
    width: 13px; height: 13px; margin-left: 5px; padding: 0;
    border: 1px solid var(--muted); border-radius: 50%;
    background: transparent; color: var(--muted);
    font-size: 9px; font-weight: 700; font-style: italic;
    line-height: 1; cursor: pointer; vertical-align: middle;
}
.col-help:hover { border-color: var(--blue); color: var(--blue); background: #fff; }
.cd-help { margin: 0; line-height: 1.55; }

/* "No accessories" — an answer, not an action, so it is a checkbox. */
.acc-none { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.acc-none .check { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }

/* ── PDC: availability ────────────────────────────────────
   Sits in the Pricing group beside price, because Barry's rule is that
   availability is a pricing fact: can you sell it or not.

   Deliberately quiet. It reports what Ohlins says, and no value of it is a
   failure — "Special Order" is a normal state for most of the spares catalog,
   not a problem to fix, so it must not read like one. Only N/A and Unknown
   get any warmth, and only enough to be findable in a long scroll. */
.avail { display: inline-block; border-radius: 3px; padding: 0 5px;
         font-size: 0.78rem; line-height: 1.5; white-space: nowrap; }
.avail-available     { background: #e8f0e9; color: #2f6b3a; }
.avail-special-order { background: #eef1f4; color: var(--muted); }
.avail-kit-only      { background: #eef1f4; color: var(--muted); }
.avail-na,
.avail-unknown       { background: #fdecea; color: var(--danger); }
/* A product whose variants disagree — the one worth opening. */
.avail-mixed { background: #fff; color: var(--muted); border: 1px dashed var(--border); }

/* ── Products tab: framed sections inside an expanded card (2026-11-05).
   Barry: "make the sections a little more defined, it all kind of runs
   together" — each part of the expanded body is a panel with a header strip,
   and the gate chart became stacked cards (one per phase band) so nothing
   scrolls horizontally. */
.psec { margin: 14px 0; border: 1px solid #e2e6ea; border-radius: 5px; background: #fff; }
.psec-h {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px;
    background: #f4f6f8;
    border-bottom: 1px solid #e2e6ea;
    border-left: 3px solid #9fb0bd;
    border-radius: 4px 4px 0 0;
}
.psec-t {
    font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: #46525d;
}
.psec-side { margin-left: auto; font-size: 0.82rem; }
.psec-b { padding: 10px 12px; }
.psec-b.table-scroll { padding: 0; }
.psec-b > .audit-table { margin: 0; }
.psec-findings .psec-h { border-left-color: #c0392b; }
.psec-req .psec-h { border-left-color: #cbb97a; background: #f8f6ec; }
.psec-req .psec-t { color: #6b6238; }

details.vpanel > summary.psec-h { cursor: pointer; list-style: none; }
details.vpanel > summary.psec-h::-webkit-details-marker { display: none; }
details.vpanel[open] .vtoggle-arrow { transform: rotate(90deg); }
details.vpanel:not([open]) > summary.psec-h { border-bottom: none; border-radius: 4px; }
.vpanel .vtoggle-arrow { display: inline-block; transition: transform .12s; }

/* Gate cards: one per phase band, the gates stacked vertically inside —
   label left, state right. The header keeps the band's chart colour. */
.gate-cards { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.gate-card {
    flex: 0 1 auto; min-width: 158px;
    border: 1px solid #dfe3e7; border-radius: 4px;
    background: #fff; overflow: hidden;
}
.gc-h { padding: 3px 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; }
.gc-publishing .gc-h { background: #e4d9f2; color: #5b3f8a; }
.gc-studio     .gc-h { background: #d6e6f5; color: #1d5a86; }
.gc-desc       .gc-h { background: #f3dcea; color: #8a3f6b; }
.gc-pricing    .gc-h { background: #d9eee1; color: #2b7a4b; }
.gc-setup      .gc-h { background: #e6e9ec; color: #3d4852; }
.gc-customs    .gc-h { background: #e6e9ec; color: #6b7785; }
.gate-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 2px 8px;
    border-top: 1px solid #f0f2f4;
    font-size: 0.82rem; line-height: 1.65;
}
.gate-label { color: #5a646e; white-space: nowrap; }
.gate-val { text-align: right; white-space: nowrap; }
.gate-val form { margin: 0; display: inline; }
.gate-val.cd-able { cursor: pointer; border-radius: 3px; padding: 0 3px; }
.gate-val.cd-able:hover { background: #fffaf0; }
.gate-val .money-match  { color: #2b7a4b; font-weight: 700; }
.gate-val .money-differ { color: #9a6700; font-weight: 700; background: #fff0d6; padding: 0 4px; border-radius: 3px; }
.ck-yes-val { color: #2b7a4b; font-weight: 600; }

/* The slim variants table: only the per-SKU columns, so it fits the screen. */
.vtable { width: auto; }
.vtable th, .vtable td { white-space: nowrap; }
.vtable .vrow-name { padding-left: 10px !important; }

/* Kit notes panel: customer-facing, so its accent echoes the on-page callout. */
.psec-kn .psec-h { border-left-color: #1d5a86; background: #eef4f9; }
.psec-kn .psec-t { color: #1d5a86; }
.kn-body { background: #f4f8fb; border-color: #d8e4ee; }
