:root {
    --ink: #162019;
    --ink-soft: #26322a;
    --paper: #f3f0e7;
    --paper-deep: #e8e4d8;
    --surface: #fffdf7;
    --line: #d7d4ca;
    --line-dark: #adb2aa;
    --muted: #697169;
    --orange: #ef6b2e;
    --orange-dark: #c94b16;
    --lime: #c9f24b;
    --blue: #2458a6;
    --red: #af3e31;
    --shadow: 0 18px 50px rgba(22, 32, 25, .08);
    --radius: 4px;
    --font-body: "Avenir Next", "Avenir", "Segoe UI", sans-serif;
    --font-display: "Avenir Next Condensed", "DIN Condensed", "Franklin Gothic Condensed", sans-serif;
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(22, 32, 25, .023) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 32, 25, .023) 1px, transparent 1px);
    background-size: 32px 32px;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 26px 20px 22px;
    color: #eff2e9;
    background: var(--ink);
    border-right: 1px solid rgba(255, 255, 255, .12);
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .28;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,.045) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,.035) 40px);
}

.brand, .module-stamp, .primary-nav, .sidebar-footer { position: relative; }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 7px 24px;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.brand-mark {
    display: grid;
    width: 47px;
    height: 38px;
    place-items: center;
    color: var(--ink);
    background: var(--lime);
    font-family: var(--font-display);
    font-size: 21.6px;
    font-weight: 900;
    letter-spacing: .04em;
    clip-path: polygon(0 0, 100% 0, 100% 72%, 84% 100%, 0 100%);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { font-size: 18px; letter-spacing: .02em; }
.brand-copy small { color: #97a098; font-size: 13.2px; letter-spacing: .08em; }

.module-stamp {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 25px;
    padding: 13px;
    background: rgba(255,255,255,.065);
    border: 1px solid rgba(255,255,255,.12);
}

.module-stamp-code {
    display: grid;
    width: 58px;
    height: 45px;
    flex: 0 0 58px;
    place-items: center;
    color: #fff;
    background: var(--orange);
    font-family: var(--font-display);
    font-size: 20.4px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
}

.module-stamp > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.module-stamp small { color: #9ca69e; font-size: 10.8px; text-transform: uppercase; letter-spacing: .13em; }
.module-stamp strong { overflow: hidden; margin-top: 2px; font-size: 13.2px; white-space: nowrap; text-overflow: ellipsis; }

.primary-nav { display: flex; flex: 1; flex-direction: column; gap: 7px; }
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    padding: 0 12px;
    color: #abb4ac;
    border: 1px solid transparent;
    font-size: 15.6px;
    font-weight: 600;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav-item:hover { color: #fff; transform: translateX(2px); }
.nav-item.is-active { color: var(--ink); background: var(--lime); }
.nav-item.is-active::after { content: ""; position: absolute; right: -21px; width: 4px; height: 25px; background: var(--orange); }
.nav-icon { width: 19px; height: 19px; }
.nav-icon svg { width: 100%; height: 100%; fill: currentColor; }
.nav-bell-icon { position: relative; flex: 0 0 19px; }
.notification-dot {
    position: absolute;
    top: -3px;
    right: -4px;
    display: block;
    width: 9px;
    height: 9px;
    background: var(--orange);
    border: 2px solid var(--ink);
    border-radius: 50%;
}
.nav-item.is-active .notification-dot { border-color: var(--lime); }

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 17px 7px 0;
    border-top: 1px solid rgba(255,255,255,.14);
}
.sidebar-footer > span:last-child { display: flex; flex-direction: column; }
.sidebar-footer strong { font-size: 13.2px; }
.sidebar-footer small { color: #8e9990; font-size: 10.8px; letter-spacing: .08em; text-transform: uppercase; }
.system-dot { width: 9px; height: 9px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 4px rgba(201,242,75,.11); }

.app-frame { min-height: 100vh; margin-left: var(--sidebar-width); }
.main-content { width: min(1500px, 100%); margin: 0 auto; padding: 44px 52px 72px; }
.mobile-header { display: none; }
.nav-scrim { display: none; }

.flash {
    position: fixed;
    z-index: 80;
    top: 24px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 11px;
    width: min(420px, calc(100vw - 40px));
    padding: 13px 14px;
    color: #fff;
    background: var(--ink);
    border: 1px solid rgba(255,255,255,.2);
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: slide-in .35s both cubic-bezier(.2,.8,.2,1);
}
.flash-error { background: var(--red); }
.flash-symbol { display: grid; width: 27px; height: 27px; place-items: center; color: var(--ink); background: var(--lime); font-weight: 800; }
.flash-error .flash-symbol { background: #fff0e3; color: var(--red); }
.flash span:nth-child(2) { flex: 1; font-size: 15.6px; font-weight: 600; }
.flash button { color: inherit; background: transparent; border: 0; font-size: 28.8px; line-height: 1; cursor: pointer; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-12px); } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 44px; margin-bottom: 30px; }
.page-heading > div:first-child { max-width: 850px; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.page-heading h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(42px, 4.5vw, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.035em;
}
.page-heading h1 em { color: var(--orange); font-style: normal; }
.heading-copy { max-width: 650px; margin: 14px 0 0; color: var(--muted); font-size: 18px; line-height: 1.55; }
.heading-actions, .detail-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.date-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.2px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.date-chip span { width: 7px; height: 7px; background: var(--orange); border-radius: 50%; }

.button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 14.4px;
    font-weight: 800;
    letter-spacing: .015em;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; background: var(--orange); box-shadow: 5px 5px 0 var(--ink); }
.button-primary:hover { background: var(--orange-dark); box-shadow: 3px 3px 0 var(--ink); }
.button-secondary { color: var(--ink); background: var(--lime); border-color: var(--ink); }
.button-copy { color: #fff; background: var(--ink); border-color: var(--ink); }
.button-copy:hover { color: var(--ink); background: var(--lime); }
.button-copy.is-copied { color: var(--ink); background: var(--lime); border-color: var(--ink); box-shadow: 4px 4px 0 var(--orange); transform: translateY(-2px); }
.copy-icon { font-size: 19.2px; line-height: 1; }
.button-ink { color: #fff; background: var(--ink); }
.button-ink:hover { background: var(--ink-soft); }
.button-quiet { color: var(--ink); background: transparent; border-color: var(--line-dark); }
.button-full { width: 100%; }
.text-link { color: var(--ink); border-bottom: 1px solid var(--ink); font-size: 13.2px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.text-link span { color: var(--orange); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.stat-card {
    min-height: 178px;
    padding: 20px;
    background: var(--surface);
    border-top: 3px solid var(--ink);
    box-shadow: 0 8px 24px rgba(22,32,25,.04);
    animation: rise .45s both;
}
.stat-card:nth-child(2) { animation-delay: .05s; }
.stat-card:nth-child(3) { animation-delay: .1s; }
.stat-card:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.stat-card-dark { color: #fff; background: var(--ink); border-color: var(--lime); }
.stat-card-accent { background: var(--lime); }
.stat-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stat-card-dark .stat-top { color: #97a198; }
.stat-index { opacity: .65; }
.stat-card > strong { display: block; margin-top: 22px; font-family: var(--font-display); font-size: 57.6px; line-height: 1; }
.stat-card > small { color: var(--muted); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.stat-card-dark > small { color: #abb4ac; }
.stat-rule { height: 3px; margin-top: 18px; background: var(--paper-deep); }
.stat-card-dark .stat-rule { background: rgba(255,255,255,.13); }
.stat-card-accent .stat-rule { background: rgba(22,32,25,.15); }
.stat-rule span { display: block; max-width: 100%; height: 100%; min-width: 8px; background: var(--orange); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, .8fr); gap: 18px; align-items: stretch; }
.panel { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 35px rgba(22,32,25,.045); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel-heading h2 { margin: 0; font-family: var(--font-display); font-size: 32.4px; line-height: 1; letter-spacing: -.02em; }
.recent-panel, .setup-panel { padding: 25px; }

.request-list { margin-top: 6px; }
.request-row {
    display: grid;
    grid-template-columns: 132px minmax(160px, 1fr) 90px 95px 22px;
    align-items: center;
    gap: 16px;
    min-height: 74px;
    border-bottom: 1px solid var(--line);
    transition: background .15s ease, padding .15s ease;
}
.request-row:last-child { border-bottom: 0; }
.request-row:hover { margin-inline: -10px; padding-inline: 10px; background: #f6f3ea; }
.request-ref, .table-ref { font-size: 13.2px; font-weight: 900; letter-spacing: .04em; }
.request-main { display: flex; min-width: 0; flex-direction: column; }
.request-main strong { font-size: 15.6px; }
.request-main small { overflow: hidden; color: var(--muted); font-size: 13.2px; white-space: nowrap; text-overflow: ellipsis; }
.request-row time { color: var(--muted); font-size: 12px; }
.row-arrow, .table-arrow { color: var(--orange); font-size: 22.8px; transition: transform .15s ease; }
.request-row:hover .row-arrow { transform: translateX(4px); }

.status { display: inline-flex; width: fit-content; align-items: center; gap: 6px; padding: 5px 8px; color: var(--ink); background: #eceee9; font-size: 10.8px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7d847d; }
.status-draft { background: #e8e7e1; }
.status-requested { background: #fff0d5; color: #805211; }
.status-requested::before { background: var(--orange); }
.status-costed { background: #e3f3c0; color: #334d0a; }
.status-costed::before { background: #6b981a; }
.status-archived { color: #686868; background: #e1e1e1; }
.status-large { padding: 7px 10px; font-size: 12px; }

.setup-panel { display: flex; flex-direction: column; color: #eef2e9; background: var(--ink); border-color: var(--ink); }
.setup-panel .panel-heading { border-color: rgba(255,255,255,.14); }
.setup-panel .eyebrow { color: #9da69e; }
.percentage { color: var(--lime); font-family: var(--font-display); font-size: 36px; font-weight: 800; }
.setup-gauge { height: 11px; margin: 27px 0 18px; padding: 2px; border: 1px solid rgba(255,255,255,.25); }
.setup-gauge span { display: block; width: var(--progress); height: 100%; background: var(--lime); transition: width .4s ease; }
.setup-panel > p { margin: 0; color: #aeb7af; font-size: 14.4px; line-height: 1.7; }
.setup-panel > p strong { color: #fff; }
.setup-legend { display: flex; gap: 18px; margin: 21px 0 25px; color: #9fa8a1; font-size: 12px; }
.setup-legend span { display: flex; align-items: center; gap: 7px; }
.setup-legend i { width: 8px; height: 8px; }
.legend-ready { background: var(--lime); }
.legend-todo { border: 1px solid #7a857c; }
.setup-panel .button { margin-top: auto; color: var(--ink); background: var(--surface); }

.empty-state { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 260px; padding: 38px; text-align: left; }
.compact-empty { min-height: 230px; }
.empty-number { color: var(--line-dark); font-family: var(--font-display); font-size: 64.8px; font-weight: 900; letter-spacing: -.05em; }
.empty-state h3, .empty-state h1 { margin: 0 0 5px; font-family: var(--font-display); font-size: 30px; }
.empty-state p { max-width: 390px; margin: 0; color: var(--muted); font-size: 14.4px; }
.full-empty { min-height: 70vh; }

.standard-heading h1, .form-heading h1, .detail-heading h1 { font-size: clamp(57.6px, 6vw, 86.4px); }
.standard-heading { align-items: center; }
.form-heading { align-items: center; }
.request-number-preview { min-width: 245px; padding: 18px 20px; background: var(--ink); color: #fff; border-left: 5px solid var(--orange); box-shadow: 7px 7px 0 var(--lime); }
.request-number-preview small, .request-number-preview span { display: block; color: #aab4ab; font-size: 10.8px; letter-spacing: .1em; text-transform: uppercase; }
.request-number-preview strong { display: block; margin: 6px 0 4px; font-family: var(--font-display); font-size: 26.4px; letter-spacing: .035em; }

.callout { display: flex; align-items: center; gap: 16px; margin: -12px 0 28px; padding: 16px 18px; border: 1px solid #d5a55d; background: #fff4dc; }
.callout-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: #fff; background: var(--orange); font-size: 21.6px; font-weight: 900; }
.callout div { flex: 1; }
.callout strong { display: block; font-size: 15.6px; }
.callout p { margin: 2px 0 0; color: #756044; font-size: 13.2px; }
.duplicate-callout { background: #edf6cf; border-color: #9db63f; }
.duplicate-callout .callout-mark { color: var(--ink); background: var(--lime); border: 1px solid var(--ink); }
.duplicate-callout p { color: #53612f; }
.duplicate-warning { margin-top: -18px; }
.draft-compatibility-warning { border-left: 5px solid var(--orange); }

.request-builder { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 22px; align-items: start; }
.builder-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-section { padding: 29px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 35px rgba(22,32,25,.04); scroll-margin-top: 20px; }
.form-section-foundation { border-top: 4px solid var(--orange); }
.section-heading { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.section-number { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; color: var(--surface); background: var(--ink); font-family: var(--font-display); font-size: 16.8px; font-weight: 900; }
.section-heading h2 { margin: 0; font-family: var(--font-display); font-size: 32.4px; line-height: 1; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13.2px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field-label { color: #444c45; font-size: 12px; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.field-label b { color: var(--orange); }
.field-label i { color: var(--muted); font-style: normal; font-weight: 500; text-transform: none; }
.field input, .field select, .field textarea, .search-field input {
    width: 100%;
    color: var(--ink);
    background: #fbfaf5;
    border: 1px solid var(--line-dark);
    border-radius: 0;
    outline: 0;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field input, .field select { height: 45px; padding: 0 12px; }
.field textarea { min-height: 92px; padding: 11px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-field input:focus { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,107,46,.12); }
.field small { color: var(--muted); font-size: 12px; }
.select-wrap { position: relative; display: block; }
.select-wrap::after { content: "⌄"; position: absolute; top: 50%; right: 12px; color: var(--orange); font-size: 18px; transform: translateY(-55%); pointer-events: none; }
.select-wrap select { padding-right: 34px; appearance: none; }
.field-action { align-self: flex-start; padding: 0; color: var(--orange-dark); background: transparent; border: 0; font-size: 12px; font-weight: 800; cursor: pointer; }
.field-action:hover { text-decoration: underline; }
.empty-select { display: flex; height: 45px; align-items: center; padding: 0 12px; color: #8a8e88; background: #efede7; border: 1px dashed var(--line-dark); font-size: 13.2px; }

.builder-sidebar { position: sticky; top: 22px; padding: 24px; color: #edf1e9; background: var(--ink); border-top: 5px solid var(--lime); box-shadow: var(--shadow); }
.builder-progress > strong { display: block; margin-bottom: 8px; color: var(--lime); font-family: var(--font-display); font-size: 54px; line-height: 1; }
.builder-progress .eyebrow { color: #9ba59d; }
.progress-track { height: 5px; background: rgba(255,255,255,.14); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .25s ease; }
.builder-progress > p:last-child { margin: 9px 0 0; color: #98a29a; font-size: 12px; }
.section-nav { display: flex; flex-direction: column; margin: 25px 0; border-top: 1px solid rgba(255,255,255,.13); }
.section-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: #afb7b0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 13.2px; transition: color .15s ease, padding .15s ease; }
.section-nav a:hover { padding-left: 4px; color: #fff; }
.section-nav span { color: var(--orange); font-family: var(--font-display); font-weight: 900; }
.builder-note { display: flex; gap: 10px; margin-bottom: 20px; padding: 13px; background: rgba(255,255,255,.055); }
.builder-note > span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; color: var(--ink); background: var(--lime); font-family: serif; font-weight: 800; border-radius: 50%; }
.builder-note p { margin: 0; color: #abb4ac; font-size: 10.8px; line-height: 1.6; }
.builder-sidebar .button + .button { margin-top: 8px; }
.builder-sidebar .button-ink { color: var(--ink); background: var(--lime); }
.builder-sidebar .button-quiet { color: #cbd2cb; border-color: rgba(255,255,255,.3); }
.retired-fields-section { border-top: 5px solid #b94239; }
.retired-fields-section .section-number { background: #b94239; }
.retired-field-list { display: flex; flex-direction: column; border: 1px solid var(--line); }
.retired-field-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; background: #fff8f1; border-bottom: 1px solid var(--line); cursor: pointer; }
.retired-field-row:last-child { border-bottom: 0; }
.retired-field-row > span:first-child { display: grid; gap: 3px; }
.retired-field-row small { color: var(--muted); font-size: 9.6px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.retired-field-row strong { font-size: 14.4px; }
.retired-field-row em { color: #805211; font-size: 12px; font-style: normal; }
.retired-field-action { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; color: #8a2e28; font-size: 10.8px; font-weight: 900; text-transform: uppercase; }
.retired-field-action input { width: 18px; height: 18px; accent-color: #b94239; }

.dialog { width: min(690px, calc(100vw - 30px)); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--ink); box-shadow: 14px 14px 0 rgba(22,32,25,.25); }
.customer-edit-dialog { width: min(820px, calc(100vw - 30px)); }
.dialog::backdrop { background: rgba(16,24,18,.7); backdrop-filter: blur(3px); }
.dialog form { padding: 27px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.dialog-heading h2 { margin: 0; font-family: var(--font-display); font-size: 38.4px; }
.dialog-close { padding: 0; color: var(--muted); background: transparent; border: 0; font-size: 36px; line-height: 1; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.discard-confirm-dialog { width: min(570px, calc(100vw - 30px)); border-top: 6px solid var(--red); }
.discard-confirm-dialog form { padding: 30px; }
.discard-confirm-heading { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 20px; }
.discard-confirm-mark { display: grid; width: 76px; height: 76px; place-items: center; color: #fff; background: var(--red); font-family: var(--font-display); font-size: 38px; font-weight: 900; }
.discard-confirm-heading .eyebrow { margin-bottom: 5px; color: var(--red); }
.discard-confirm-heading h2 { margin: 0; font-family: var(--font-display); font-size: 34px; line-height: 1.05; }
.discard-confirm-actions { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.button-discard { color: #fff; background: var(--red); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.button-discard:hover { background: #8f3027; box-shadow: 2px 2px 0 var(--ink); }

.history-panel { padding: 25px; }
.filters { display: flex; align-items: center; gap: 9px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; display: block; flex: 1; min-width: 220px; }
.search-field svg { position: absolute; z-index: 1; top: 13px; left: 12px; width: 18px; height: 18px; fill: var(--muted); }
.search-field input { height: 44px; padding: 0 12px 0 40px; }
.filter-select { min-width: 150px; }
.filter-select select { width: 100%; height: 44px; padding: 0 32px 0 11px; color: var(--ink); background: #fbfaf5; border: 1px solid var(--line-dark); border-radius: 0; appearance: none; }
.customer-filter { min-width: 190px; }
.history-meta { display: flex; justify-content: space-between; padding: 18px 2px 12px; color: var(--muted); font-size: 13.2px; }
.history-meta strong { color: var(--ink); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 12px; color: var(--muted); background: #efede5; font-size: 10.8px; font-weight: 900; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px 12px; border-bottom: 1px solid var(--line); font-size: 13.2px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #f7f4ec; }
.data-table td > strong, .data-table td > small { display: block; }
.data-table td > small { max-width: 380px; overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.table-ref { border-bottom: 1px solid var(--line-dark); }
.table-arrow { display: inline-flex; padding: 5px; }
.history-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; white-space: nowrap; }
.duplicate-request-link { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); border-bottom: 1px solid var(--line-dark); font-size: 10.8px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.duplicate-request-link span { color: var(--orange); font-size: 16.8px; line-height: 1; }
.duplicate-request-link:hover { color: var(--orange-dark); border-color: var(--orange); }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.detail-heading { align-items: center; }
.detail-title-row { display: flex; align-items: center; gap: 18px; }
.detail-heading-actions { flex-direction: row; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.detail-main { display: flex; min-width: 0; flex-direction: column; gap: 15px; }
.request-lineage { display: flex; align-items: center; gap: 12px; padding: 13px 17px; color: #fff; background: var(--ink); border-left: 4px solid var(--lime); }
.lineage-mark { color: var(--lime); font-size: 24px; }
.request-lineage p { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; }
.request-lineage strong { color: #9fa8a1; font-size: 10.8px; text-transform: uppercase; letter-spacing: .08em; }
.request-lineage a { color: #fff; border-bottom: 1px solid var(--orange); font-weight: 800; }
.customer-summary { padding: 26px; border-top: 4px solid var(--orange); }
.record-kicker { margin-bottom: 17px; color: var(--muted); font-size: 10.8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.customer-summary-grid { display: grid; grid-template-columns: minmax(190px, .8fr) 1.4fr; gap: 35px; align-items: end; }
.customer-summary h2 { margin: 0; font-family: var(--font-display); font-size: 40.8px; line-height: 1; }
.customer-summary p { margin: 5px 0 0; color: var(--muted); font-size: 13.2px; }
.customer-summary dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; }
.customer-summary dl div { padding-left: 13px; border-left: 2px solid var(--line); }
.customer-summary dt, .specification-list dt { color: var(--muted); font-size: 10.8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.customer-summary dd { overflow-wrap: anywhere; margin: 4px 0 0; font-size: 13.2px; font-weight: 700; }
.specification-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); }
.specification-heading { display: flex; flex-direction: column; justify-content: space-between; min-height: 180px; padding: 23px; color: #fff; background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.1); }
.specification-heading span { color: var(--orange); font-family: var(--font-display); font-size: 21.6px; font-weight: 900; }
.specification-heading h2 { margin: 0; font-family: var(--font-display); font-size: 33.6px; }
.specification-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.specification-list > div { min-height: 90px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specification-list > div:nth-child(2n) { border-right: 0; }
.specification-list > div:nth-last-child(-n+2) { border-bottom: 0; }
.specification-list dd { margin: 7px 0 0; font-size: 15.6px; font-weight: 700; }
.detail-sidebar { position: sticky; top: 22px; display: flex; flex-direction: column; gap: 14px; }
.lifecycle-card { padding: 24px; }
.lifecycle-card .eyebrow { margin-bottom: 4px; }
.lifecycle-card > h2 { margin: 0 0 18px; font-family: var(--font-display); font-size: 33.6px; }
.lifecycle-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.lifecycle-title-row h2 { margin: 0; font-family: var(--font-display); font-size: 33.6px; line-height: 1; }
.lifecycle-card form { margin-top: 9px; }
.cra-finalized-banner { display: grid; grid-template-columns: 82px minmax(0, 1fr); color: #fff; background: #275e45; border: 1px solid var(--ink); box-shadow: 7px 7px 0 var(--lime); }
.cra-finalized-mark { display: grid; min-height: 82px; place-items: center; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 15.6px; font-weight: 900; letter-spacing: .08em; }
.cra-finalized-banner > div { display: flex; flex-direction: column; justify-content: center; padding: 15px 20px; }
.cra-finalized-banner strong { font-family: var(--font-display); font-size: 24px; line-height: 1; }
.cra-finalized-banner p { margin: 5px 0 0; color: #d6e3d9; font-size: 11px; }
.timeline { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.timeline-item { position: relative; display: flex; gap: 12px; min-height: 55px; color: var(--muted); }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; top: 12px; bottom: -2px; left: 5px; width: 1px; background: var(--line-dark); }
.timeline-item i { position: relative; z-index: 1; width: 11px; height: 11px; flex: 0 0 auto; margin-top: 2px; background: var(--surface); border: 2px solid var(--line-dark); border-radius: 50%; }
.timeline-item.is-complete i { background: var(--lime); border-color: var(--ink); }
.timeline-item span { display: flex; flex-direction: column; }
.timeline-item strong { color: var(--ink); font-size: 13.2px; }
.timeline-item small { font-size: 10.8px; }
.snapshot-note { display: flex; gap: 12px; padding: 17px; color: #aeb7af; background: var(--ink); }
.snapshot-note > span { color: var(--lime); font-size: 28.8px; }
.snapshot-note p { margin: 0; font-size: 10.8px; line-height: 1.65; }
.snapshot-note strong { display: block; color: #fff; font-size: 12px; }
.empty-specification, .direct-input-note { display: flex; align-items: center; gap: 20px; padding: 28px; }
.empty-specification > span, .direct-input-note > span { display: grid; width: 55px; height: 55px; place-items: center; color: var(--surface); background: var(--ink); font-family: var(--font-display); font-size: 22.8px; font-weight: 900; }
.empty-specification h2, .direct-input-note h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 28.8px; }
.empty-specification p, .direct-input-note p { margin: 0; color: var(--muted); font-size: 13.2px; }

.configuration-heading { margin-bottom: 28px; }
.configuration-count { display: flex; align-items: center; gap: 13px; padding-left: 18px; border-left: 3px solid var(--orange); }
.configuration-count strong { font-family: var(--font-display); font-size: 50.4px; line-height: 1; }
.configuration-count span { color: var(--muted); font-size: 10.8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.tabs { display: flex; gap: 3px; margin-bottom: 17px; border-bottom: 1px solid var(--line-dark); }
.tabs a { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 20px; color: var(--muted); font-size: 13.2px; font-weight: 800; }
.tabs a span { font-family: var(--font-display); }
.tabs a b { display: grid; min-width: 22px; height: 22px; place-items: center; color: var(--ink); background: var(--paper-deep); font-size: 10.8px; border-radius: 50%; }
.tabs a.is-active { margin-bottom: -1px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-dark); border-bottom-color: var(--surface); }
.tabs a.is-active span { color: var(--orange); }
.configuration-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 17px; align-items: start; }
.field-directory { position: sticky; top: 20px; overflow: hidden; }
.directory-heading { display: flex; justify-content: space-between; padding: 20px 18px 13px; border-bottom: 1px solid var(--line); }
.directory-heading .eyebrow { margin: 0; }
.directory-heading > span { color: var(--muted); font-size: 10.8px; }
.directory-list { max-height: 720px; overflow-y: auto; }
.directory-section-label { display: flex; align-items: center; justify-content: space-between; min-height: 31px; padding: 0 12px; color: var(--muted); background: var(--paper-deep); border-bottom: 1px solid var(--line); font-size: 9.6px; letter-spacing: .09em; text-transform: uppercase; }
.directory-section-label span { font-weight: 600; letter-spacing: .04em; }
.directory-entry { display: grid; grid-template-columns: minmax(0, 1fr) 38px; border-bottom: 1px solid var(--line); transition: background .15s ease, opacity .15s ease; }
.directory-entry:hover { background: #f6f3ea; }
.directory-entry.is-active { color: #fff; background: var(--ink); }
.directory-entry.is-muted { opacity: .52; }
.directory-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) 28px; align-items: center; gap: 9px; min-height: 62px; padding: 10px 8px 10px 13px; transition: background .15s ease; }
.directory-item:hover { background: #f6f3ea; }
.directory-item.is-active { color: #fff; background: var(--ink); }
.directory-entry.is-active .directory-item:hover { background: rgba(255,255,255,.04); }
.directory-dot { width: 6px; height: 6px; background: var(--line-dark); border-radius: 50%; }
.directory-item.is-active .directory-dot { background: var(--lime); box-shadow: 0 0 0 3px rgba(201,242,75,.15); }
.directory-item > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.directory-item strong { overflow: hidden; font-size: 13.2px; white-space: nowrap; text-overflow: ellipsis; }
.directory-item small { color: var(--muted); font-size: 9.6px; letter-spacing: .05em; text-transform: uppercase; }
.directory-item.is-active small { color: #9ea89f; }
.directory-item em { color: var(--muted); font-family: var(--font-display); font-size: 14.4px; font-style: normal; font-weight: 900; text-align: right; }
.directory-item.is-active em { color: var(--orange); }
.field-order-controls { display: grid; place-items: center; padding: 5px 4px 5px 0; border-left: 1px solid var(--line); }
.directory-entry.is-active .field-order-controls { border-color: rgba(255,255,255,.14); }
.configuration-workspace { display: flex; min-width: 0; flex-direction: column; gap: 17px; }
.field-settings, .option-manager { padding: 25px; }
.type-badge, .option-total { padding: 6px 9px; color: var(--muted); background: var(--paper-deep); font-size: 9.6px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.field-settings form { margin-top: 23px; }
.settings-footer { display: flex; align-items: center; gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.settings-footer .button { margin-left: auto; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle > span { position: relative; width: 35px; height: 19px; background: var(--line-dark); transition: background .16s ease; }
.toggle > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; background: #fff; transition: transform .16s ease; }
.toggle input:checked + span { background: var(--ink); }
.toggle input:checked + span::after { background: var(--lime); transform: translateX(16px); }
.toggle em { font-size: 10.8px; font-style: normal; font-weight: 700; }
.option-manager .panel-heading { margin-bottom: 18px; }
.add-option-form { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(130px, .7fr) auto; gap: 12px; align-items: end; padding: 17px; background: #efede5; border-left: 4px solid var(--orange); }
.add-option-form .button { height: 45px; }
.option-list { margin-top: 18px; border-top: 1px solid var(--line); }
.option-row { display: grid; grid-template-columns: 28px 30px minmax(150px, 1.35fr) minmax(90px, .65fr) 58px 90px; align-items: center; gap: 8px; min-height: 64px; border-bottom: 1px solid var(--line); }
.option-row.is-archived, .customer-row.is-archived { opacity: .52; }
.option-order { color: var(--orange); font-family: var(--font-display); font-size: 14.4px; font-weight: 900; }
.option-position-controls { display: grid; place-items: center; }
.option-name { display: flex; min-width: 0; flex-direction: column; }
.option-name strong { font-size: 13.2px; }
.option-name small { color: var(--muted); font-size: 10.8px; }
.inline-option-field input { width: 100%; height: 34px; padding: 0 8px; color: var(--ink); background: transparent; border: 1px solid transparent; outline: 0; font-size: 13.2px; font-weight: 700; }
.inline-option-field input:hover { border-color: var(--line); }
.inline-option-field input:focus { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 2px rgba(239,107,46,.1); }
.option-code input { color: var(--muted); font-size: 10.8px; font-weight: 500; }
.option-state { color: var(--muted); font-size: 9.6px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.option-actions { display: flex; justify-content: flex-end; gap: 9px; }
.save-option { color: var(--ink); }
.text-button { padding: 4px 0; color: var(--orange-dark); background: transparent; border: 0; border-bottom: 1px solid currentColor; font-size: 10.8px; font-weight: 800; cursor: pointer; }
.option-empty { min-height: 190px; }

.customer-grid { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); gap: 17px; align-items: start; }
.customer-form-panel, .customer-list-panel { padding: 25px; }
.panel-intro { margin: 18px 0 22px; color: var(--muted); font-size: 13.2px; line-height: 1.7; }
.customer-form-panel form > .button { margin-top: 20px; }
.customer-list { margin-top: 8px; }
.customer-row { display: grid; grid-template-columns: 36px 42px minmax(140px, 1fr) 55px 65px 105px; align-items: center; gap: 10px; min-height: 72px; border-bottom: 1px solid var(--line); }
.customer-row:last-child { border-bottom: 0; }
.customer-monogram { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: var(--ink); font-family: var(--font-display); font-size: 13.2px; font-weight: 900; }
.customer-name { display: flex; min-width: 0; flex-direction: column; }
.customer-name strong { overflow: hidden; font-size: 13.2px; white-space: nowrap; text-overflow: ellipsis; }
.customer-name small { overflow: hidden; color: var(--muted); font-size: 10.8px; white-space: nowrap; text-overflow: ellipsis; }
.request-count { display: flex; flex-direction: column; text-align: center; }
.request-count strong { font-family: var(--font-display); font-size: 21.6px; }
.request-count small { color: var(--muted); font-size: 8.4px; text-transform: uppercase; }
.customer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.customer-actions form { display: contents; }
.edit-customer-button { color: var(--ink); }

@media (max-width: 1180px) {
    .main-content { padding-inline: 32px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .setup-panel { min-height: 280px; }
    .request-builder { grid-template-columns: minmax(0, 1fr) 250px; }
    .filters { flex-wrap: wrap; }
    .search-field { flex-basis: 100%; }
    .customer-summary-grid { grid-template-columns: 1fr; }
    .configuration-grid { grid-template-columns: 260px minmax(0, 1fr); }
    .field-grid.three-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 250px; }
    .sidebar { transform: translateX(-100%); transition: transform .24s ease; }
    body.nav-open .sidebar { transform: translateX(0); }
    .nav-scrim { position: fixed; z-index: 45; inset: 0; background: rgba(10,18,12,.55); }
    body.nav-open .nav-scrim { display: block; }
    .app-frame { margin-left: 0; }
    .mobile-header { position: sticky; z-index: 35; top: 0; display: flex; height: 58px; align-items: center; justify-content: space-between; padding: 0 18px; color: #fff; background: var(--ink); border-bottom: 3px solid var(--lime); }
    .icon-button { display: flex; width: 30px; height: 30px; flex-direction: column; justify-content: center; gap: 4px; padding: 5px; background: transparent; border: 0; }
    .icon-button span { display: block; width: 19px; height: 2px; background: #fff; }
    .mobile-brand { font-family: var(--font-display); font-size: 18px; font-weight: 900; letter-spacing: .08em; }
    .mini-create { display: grid; width: 30px; height: 30px; place-items: center; color: var(--ink); background: var(--orange); font-size: 26.4px; }
    .mobile-header-actions { display: flex; min-width: 30px; align-items: center; justify-content: flex-end; gap: 8px; }
    .mobile-news-link { position: relative; display: grid; width: 30px; height: 30px; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.28); }
    .mobile-news-link svg { width: 19px; height: 19px; fill: currentColor; }
    .mobile-news-link .notification-dot { top: -4px; right: -4px; }
    .main-content { padding-top: 32px; }
    .request-builder, .detail-grid { grid-template-columns: 1fr; }
    .builder-sidebar, .detail-sidebar { position: static; }
    .builder-sidebar { order: -1; }
    .section-nav { display: none; }
    .configuration-grid { grid-template-columns: 1fr; }
    .field-directory { position: static; }
    .directory-list { display: grid; max-height: 270px; grid-template-columns: repeat(2, 1fr); }
    .directory-section-label { grid-column: 1 / -1; }
    .directory-entry { border-right: 1px solid var(--line); }
    .customer-grid { grid-template-columns: 1fr; }
}

/* Platform release ledger */
.release-heading { align-items: flex-end; border-left: 7px solid var(--orange); padding-left: 22px; }
.release-current-version {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 0 15px;
    color: #fff;
    background: var(--ink);
    border-bottom: 4px solid var(--lime);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .05em;
    white-space: nowrap;
}
.release-ledger { display: grid; max-width: 1120px; gap: 16px; }
.release-entry {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 220px;
    padding: 0;
    overflow: hidden;
    border-top: 5px solid var(--ink);
}
.release-entry.is-latest { color: #eef2e9; background: var(--ink); border-top-color: var(--lime); }
.release-rail { position: relative; display: flex; align-items: center; flex-direction: column; padding-top: 28px; background: var(--paper-deep); border-right: 1px solid var(--line); }
.release-entry.is-latest .release-rail { color: var(--ink); background: var(--lime); border-right-color: transparent; }
.release-rail span { font-family: var(--font-display); font-size: 29px; font-weight: 900; line-height: 1; }
.release-rail i { width: 1px; flex: 1; margin-top: 17px; background: var(--line-dark); }
.release-entry.is-latest .release-rail i { background: rgba(22,32,25,.25); }
.release-entry-main { min-width: 0; padding: 27px 34px 29px; }
.release-entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.release-entry-meta time { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 650; }
.release-entry.is-latest .release-entry-meta time { color: #aeb8af; }
.release-version-chip, .release-latest-chip { display: inline-flex; min-height: 29px; align-items: center; padding: 0 10px; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.release-version-chip { color: #fff; background: var(--blue); }
.release-latest-chip { color: var(--ink); background: var(--orange); }
.release-entry-main h2 { margin: 20px 0 13px; font-family: var(--font-display); font-size: clamp(28px, 3vw, 38px); line-height: 1; letter-spacing: -.015em; }
.release-change-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.release-change-list li { position: relative; padding-left: 21px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.release-change-list li::before { content: ""; position: absolute; top: .62em; left: 0; width: 9px; height: 3px; background: var(--orange); }
.release-entry.is-latest .release-change-list li { color: #d2d9d2; }
.release-commit { margin: 22px 0 0; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.release-entry.is-latest .release-commit { color: #89958b; }
.release-commit code { color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.release-empty-state { display: grid; max-width: 900px; min-height: 250px; grid-template-columns: 105px minmax(0, 1fr); align-items: center; padding: 34px; border-top: 5px solid var(--orange); }
.release-empty-state > span { display: grid; width: 84px; height: 84px; place-items: center; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 43px; font-weight: 900; }
.release-empty-state h2 { margin: 5px 0 7px; font-family: var(--font-display); font-size: 36px; }
.release-empty-state p:last-child { margin: 0; color: var(--muted); }
.release-pagination { display: flex; max-width: 1120px; align-items: center; justify-content: space-between; gap: 15px; margin-top: 24px; }
.release-pagination span { color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }

@media (max-width: 680px) {
    .release-heading { padding-left: 16px; }
    .release-current-version { margin-top: 20px; }
    .release-entry { grid-template-columns: 47px minmax(0, 1fr); }
    .release-rail { padding-top: 23px; }
    .release-rail span { font-size: 20px; }
    .release-entry-main { padding: 22px 18px 24px; }
    .release-entry-meta { align-items: flex-start; }
    .release-entry-meta time { width: 100%; margin: 2px 0 0; }
    .release-entry-main h2 { margin-top: 17px; }
    .release-change-list li { font-size: 14px; }
    .release-empty-state { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
    .release-pagination { flex-wrap: wrap; }
}

@media (max-width: 680px) {
    .main-content { padding: 25px 16px 52px; }
    .page-heading { display: block; margin-bottom: 27px; }
    .page-heading h1 { font-size: 45.6px; }
    .heading-actions, .detail-heading-actions { align-items: stretch; margin-top: 23px; }
    .date-chip { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-card { min-height: 150px; padding: 16px; }
    .stat-card > strong { font-size: 48px; }
    .recent-panel, .setup-panel, .history-panel, .field-settings, .option-manager, .customer-form-panel, .customer-list-panel { padding: 18px; }
    .panel-heading { align-items: center; }
    .request-row { grid-template-columns: 1fr auto; gap: 7px; padding-block: 13px; }
    .request-ref, .request-main { grid-column: 1; }
    .request-row .status { grid-column: 2; grid-row: 1; }
    .request-row time { grid-column: 2; grid-row: 2; }
    .row-arrow { display: none; }
    .form-heading .request-number-preview { margin-top: 24px; }
    .form-section { padding: 20px 17px; }
    .field-grid, .field-grid.three-columns { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .filters { display: grid; grid-template-columns: 1fr 1fr; }
    .search-field, .customer-filter { grid-column: 1 / -1; min-width: 0; }
    .history-meta { align-items: flex-end; }
    .history-table { min-width: 820px; }
    .detail-title-row { flex-wrap: wrap; }
    .detail-heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .detail-heading-actions .button { flex: 1; }
    .detail-heading-actions .button-copy { grid-column: 1 / -1; grid-row: 1; }
    .customer-summary dl { grid-template-columns: 1fr; }
    .specification-card { grid-template-columns: 1fr; }
    .specification-heading { min-height: auto; flex-direction: row; align-items: center; }
    .specification-list { grid-template-columns: 1fr; }
    .specification-list > div, .specification-list > div:nth-child(2n), .specification-list > div:nth-last-child(-n+2) { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .specification-list > div:last-child { border-bottom: 0; }
    .configuration-count { margin-top: 22px; }
    .tabs { overflow-x: auto; }
    .tabs a { flex: 0 0 auto; justify-content: center; padding-inline: 12px; }
    .directory-list { grid-template-columns: 1fr; }
    .settings-footer { align-items: stretch; flex-direction: column; }
    .settings-footer .button { margin-left: 0; }
    .add-option-form { grid-template-columns: 1fr; }
    .code-field { display: none; }
    .option-row { grid-template-columns: 24px 28px minmax(110px, 1fr) 76px; padding-block: 8px; }
    .option-row .option-code, .option-row .option-state { display: none; }
    .customer-row { grid-template-columns: 30px 38px minmax(120px, 1fr) 45px 92px; }
    .customer-row .option-state { display: none; }
    .empty-state { flex-direction: column; text-align: center; }
    .empty-state p { margin-inline: auto; }
    .dialog form { padding: 20px; }
    .discard-confirm-dialog form { padding: 22px; }
    .discard-confirm-heading { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
    .discard-confirm-mark { width: 56px; height: 56px; font-size: 29px; }
    .discard-confirm-heading h2 { font-size: 28px; }
    .discard-confirm-actions { display: grid; grid-template-columns: 1fr; }
    .discard-confirm-actions .button { width: 100%; }
}

@media print {
    body { background: #fff; font-size: 13.2px; }
    .sidebar, .mobile-header, .flash, .detail-heading-actions, .detail-sidebar, .nav-scrim { display: none !important; }
    .app-frame { margin: 0; }
    .main-content { width: 100%; padding: 0; }
    .page-heading { margin-bottom: 20px; }
    .page-heading h1 { font-size: 40.8px; }
    .detail-grid { display: block; }
    .panel { box-shadow: none; break-inside: avoid; }
    .specification-card { margin-top: 10px; }
}

/* Authentication verification and platform security ledger */
.auth-verification-wrap { width: min(540px, 100%); }
.auth-verification-wrap .auth-form-heading h2 { font-size: clamp(48px, 4.6vw, 70px); }
.auth-verification-wrap .auth-form-heading strong { color: var(--ink); }
.verification-code-field input { height: 72px; padding-left: 24px; color: var(--ink); background: #fff; border: 2px solid var(--ink); font-family: var(--font-display); font-size: 36px; font-weight: 900; letter-spacing: .28em; text-align: center; }
.verification-code-field input:focus { border-color: var(--orange); box-shadow: 5px 5px 0 var(--orange); outline: 0; }
.auth-field-help { margin: -9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.trust-browser-choice { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; align-items: start; padding: 15px; background: #e9eee7; border-left: 4px solid var(--ink); cursor: pointer; }
.trust-browser-choice input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--orange); }
.trust-browser-choice span { display: grid; gap: 3px; }
.trust-browser-choice strong { font-size: 13px; }
.trust-browser-choice small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.verification-secondary-actions { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 20px 0; color: var(--line-dark); }
.verification-secondary-actions form { margin: 0; }
.auth-text-button { padding: 3px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.auth-text-button:hover { color: var(--orange-dark); border-color: var(--orange-dark); }
.auth-recovery-panel { border: 1px solid var(--line); background: rgba(255,255,255,.58); }
.auth-recovery-panel summary { padding: 13px 15px; color: var(--ink); font-size: 11px; font-weight: 900; cursor: pointer; }
.auth-recovery-panel[open] summary { background: var(--ink); color: #fff; }
.auth-recovery-panel > div { padding: 16px; }
.auth-recovery-panel p { margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.auth-recovery-form { display: grid; gap: 12px; }
.auth-recovery-form input { text-transform: uppercase; letter-spacing: .12em; }

.security-heading { padding-left: 22px; border-left: 7px solid var(--ink); }
.security-retention-note { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: stretch; margin: -12px 0 18px; color: #dfe5dc; background: var(--ink); }
.security-retention-note > span { display: grid; place-items: center; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 28px; font-weight: 900; }
.security-retention-note p { margin: 0; padding: 15px 18px; color: #aeb8af; font-size: 12px; line-height: 1.55; }
.security-retention-note strong { color: #fff; }
.security-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.security-summary-card { position: relative; display: grid; min-height: 122px; align-content: end; overflow: hidden; padding: 15px 17px; background: #fff; border: 1px solid var(--line); box-shadow: 4px 4px 0 rgba(22,32,25,.1); }
.security-summary-card::before { position: absolute; inset: 0 auto 0 0; width: 5px; content: ""; background: var(--ink); }
.security-summary-card.is-success::before { background: #18856f; }
.security-summary-card.is-failure::before { background: #d85d3d; }
.security-summary-card.is-lock::before { background: #d8ad2f; }
.security-summary-card small { position: absolute; top: 14px; right: 15px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.security-summary-card strong { font-family: var(--font-display); font-size: 42px; line-height: .9; }
.security-summary-card span { margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.security-filter-panel { margin-bottom: 18px; padding: 18px; border-top: 5px solid var(--ink); }
.security-filter-grid { display: grid; grid-template-columns: 1fr 1.2fr .8fr 1fr .8fr .8fr; gap: 10px; align-items: end; }
.security-filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.security-ledger-panel { padding: 0; overflow: hidden; }
.security-ledger-heading { margin: 0; padding: 20px; background: #f5f3eb; border-bottom: 1px solid var(--line); }
.security-ledger-heading > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.security-table-wrap { overflow-x: auto; }
.security-event-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.security-event-table th { padding: 10px 14px; color: #cbd2ca; background: var(--ink); font-size: 9px; font-weight: 900; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
.security-event-table td { min-width: 0; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.security-event-table tbody tr:hover { background: #f5f7ef; }
.security-event-table td:first-child { width: 180px; }
.security-event-table td:nth-child(2) { width: 220px; }
.security-event-table td:nth-child(3) { width: 220px; }
.security-event-table td:nth-child(4) { width: 210px; }
.security-event-table td:last-child { width: 100px; }
.security-event-table strong, .security-event-table small { display: block; }
.security-event-table strong { font-size: 12px; }
.security-event-table small { max-width: 270px; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.security-event-table time { display: block; color: var(--muted); font-size: 10px; }
.security-event-table code { display: inline-block; padding: 5px 7px; color: var(--ink); background: var(--paper-deep); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; }
.security-outcome { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 6px; font-size: 8px; font-weight: 900; letter-spacing: .07em; }
.security-outcome::before { width: 6px; height: 6px; content: ""; border-radius: 50%; background: currentColor; }
.security-outcome.is-success { color: #126b59; background: #d9efe8; }
.security-outcome.is-failure { color: #9f2f25; background: #f7ddd8; }
.security-outcome.is-info { color: #5a5e58; background: #e6e8e3; }
.security-empty-state { padding: 55px 25px; text-align: center; }
.security-empty-state strong { font-family: var(--font-display); font-size: 28px; }
.security-empty-state p { margin: 6px 0 0; color: var(--muted); }
.security-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 15px 18px; background: #f5f3eb; border-top: 1px solid var(--line); }
.security-pagination span { color: var(--muted); font-size: 10px; font-weight: 800; }

@media (max-width: 1180px) {
    .security-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .security-filter-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    .auth-verification-wrap .auth-form-heading h2 { font-size: 46px; }
    .verification-code-field input { height: 64px; font-size: 30px; }
    .security-heading { padding-left: 14px; }
    .security-heading .button { width: 100%; }
    .security-retention-note { grid-template-columns: 58px minmax(0, 1fr); }
    .security-summary-grid, .security-filter-grid { grid-template-columns: 1fr; }
    .security-summary-card { min-height: 105px; }
    .security-filter-actions { grid-column: auto; }
    .security-filter-actions .button { flex: 1; }
    .security-pagination { justify-content: space-between; }
}

/* QMM · Quotation Management */
.nav-group-label { display: block; margin: 19px 13px 7px; color: rgba(255,255,255,.43); font-size: 10.8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.qmm-heading h1 em { color: #506bff; }
.qmm-heading .eyebrow::before { background: #506bff; }
.qmm-rate-warning { display: flex; align-items: center; gap: 18px; margin: -7px 0 18px; padding: 13px 17px; border: 1px solid #d99c30; background: #fff4d7; color: #5e4211; }
.qmm-rate-warning strong { flex: 0 0 auto; font-size: 13.2px; letter-spacing: .08em; text-transform: uppercase; }
.qmm-editor { display: grid; gap: 18px; padding-bottom: 100px; }
.qmm-editor > .panel { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); overflow: hidden; padding: 0; }
.qmm-section-number { display: flex; align-items: flex-start; justify-content: center; padding-top: 28px; border-right: 1px solid var(--line); color: #506bff; font-family: var(--font-display); font-size: 22.8px; font-weight: 800; }
.qmm-section-body { min-width: 0; padding: 28px; }
.qmm-required-note, .qmm-edit-note { padding: 6px 9px; border: 1px solid var(--line); color: var(--muted); font-size: 10.8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qmm-foundation-card { border-top: 5px solid #506bff; }
.qmm-foundation-grid { display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .55fr) minmax(320px, 1.25fr); gap: 18px; align-items: start; }
.qmm-rate-fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 13px; background: #f1f2ed; }
.qmm-rate-fieldset p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11.4px; line-height: 1.45; }
.qmm-section-intro { max-width: 760px; margin: -5px 0 20px; color: var(--muted); }
.qmm-lines { display: grid; gap: 12px; }
.qmm-lines-empty { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 92px; border: 1px dashed #b9bcb2; color: #7c8077; background: #fafaf6; }
.qmm-lines-empty span { color: #506bff; font-size: 27.6px; }
.qmm-lines-empty p { margin: 0; }
.qmm-line-card { position: relative; border: 1px solid #bbbfb5; background: #fcfcf8; }
.qmm-product-line { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(285px, .95fr); }
.qmm-line-controls { position: absolute; z-index: 2; top: 8px; right: 8px; display: flex; gap: 3px; }
.qmm-line-controls button { width: 29px; height: 29px; border: 1px solid #c9cbc4; background: #fff; color: #444a43; cursor: pointer; font-size: 14.4px; }
.qmm-line-controls button:last-child { color: #a23b35; }
.qmm-line-identity { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 17px 72px 17px 16px; border-right: 1px solid var(--line); }
.qmm-line-index { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: #162019; color: #fff; font-family: var(--font-display); font-size: 13.2px; font-weight: 800; letter-spacing: .06em; }
.qmm-line-identity .field { margin-bottom: 10px; }
.qmm-line-identity strong, .qmm-catalogue-summary strong { display: block; overflow-wrap: anywhere; font-family: var(--font-display); font-size: 18px; }
.qmm-line-identity p, .qmm-catalogue-summary p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.qmm-line-identity .qmm-features-preview { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 10.8px; }
.qmm-features-preview b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 9.6px; letter-spacing: .07em; text-transform: uppercase; }
.qmm-cra-link { padding: 17px 72px 17px 17px; }
.qmm-inheritance-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border: 1px solid var(--line); }
.qmm-inheritance-grid > span { min-width: 0; padding: 10px; border-right: 1px solid var(--line); }
.qmm-inheritance-grid > span:last-child { border-right: 0; }
.qmm-inheritance-grid small, .qmm-record-addresses small { display: block; color: var(--muted); font-size: 9.6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qmm-inheritance-grid strong { display: block; overflow: hidden; margin-top: 3px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.internal-only { background: #eef0eb; }
.qmm-price-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); background: #f3f3ee; }
.qmm-contribution-margin { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(175px, 1.05fr) minmax(120px, .65fr) minmax(120px, .65fr) minmax(210px, 1.4fr); align-items: center; gap: 14px; min-height: 68px; padding: 11px 16px; border-top: 1px solid #cbd0c7; border-left: 5px solid #506bff; }
.qmm-contribution-margin small { display: block; color: #687069; font-size: 9.6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qmm-cm-title strong { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 18px; }
.qmm-cm-value { padding-left: 14px; border-left: 1px solid #c6cbc2; }
.qmm-cm-value output { display: block; margin-top: 2px; color: #1f5e45; font-family: var(--font-display); font-size: 20px; font-weight: 900; }
.qmm-cm-message { color: #626a62; font-size: 10.8px; line-height: 1.4; }
.qmm-contribution-margin.is-unavailable { border-left-color: #9ca39c; }
.qmm-contribution-margin.is-unavailable .qmm-cm-value output { color: #7f867f; }
.qmm-contribution-margin.is-negative { border-left-color: #a22b25; background: #f8e7e4; }
.qmm-contribution-margin.is-negative .qmm-cm-value output { color: #8f2823; }
.qmm-review-flag { grid-column: 1 / -1; margin: 0; padding: 7px 15px; background: #fff0cf; color: #6d4b12; font-size: 11.4px; font-weight: 700; }
.qmm-accessory-section { border-left: 5px solid var(--orange); }
.qmm-service-section { border-left: 5px solid var(--lime); }
.qmm-catalogue-line { display: grid; grid-template-columns: 54px minmax(240px, 1.1fr) minmax(300px, 1.4fr) 190px; gap: 14px; align-items: center; padding: 16px 72px 16px 14px; }
.qmm-catalogue-summary { min-width: 0; }
.qmm-catalogue-summary > span { display: inline-block; margin: 7px 5px 0 0; padding: 4px 7px; background: #eceee8; color: #4b524b; font-size: 10.8px; }
.qmm-line-price small { display: block; margin-top: 4px; color: var(--muted); font-size: 10.8px; }
.qmm-short-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qmm-terms-section .field { margin-bottom: 15px; }
.qmm-save-bar { position: sticky; z-index: 8; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; border: 1px solid #080c09; background: #162019; color: #fff; box-shadow: 7px 7px 0 rgba(80,107,255,.45); }
.qmm-save-bar div { display: grid; gap: 2px; }
.qmm-save-bar span { color: rgba(255,255,255,.68); font-size: 11.4px; }

.qmm-history-stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 18px; border: 1px solid #162019; background: #162019; gap: 1px; }
.qmm-history-stats article { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px; background: #fff; }
.qmm-history-stats span { color: var(--muted); font-size: 11.4px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qmm-history-stats strong { font-family: var(--font-display); font-size: 31.2px; }
.qmm-history-panel { padding: 0; overflow: hidden; }
.qmm-filter-bar { display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(4, minmax(120px, .7fr)) auto; gap: 10px; align-items: end; padding: 17px; border-bottom: 1px solid var(--line); background: #f2f3ee; }
.qmm-history-table { overflow-x: auto; }
.qmm-history-row { display: grid; grid-template-columns: 165px minmax(180px, 1.2fr) minmax(230px, 1.5fr) 75px 105px 100px 30px; gap: 13px; align-items: center; min-width: 930px; padding: 14px 17px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.qmm-history-row:hover:not(.qmm-history-labels) { background: #f4f5ef; }
.qmm-history-row > span { min-width: 0; }
.qmm-history-row strong, .qmm-history-row small { display: block; }
.qmm-history-row small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10.8px; text-overflow: ellipsis; white-space: nowrap; }
.qmm-history-labels { background: #162019; color: rgba(255,255,255,.65); font-size: 9.6px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.qmm-currency-chip, .qmm-currency-display { display: inline-flex; align-items: center; justify-content: center; padding: 6px 8px; background: #506bff; color: #fff; font-weight: 900; letter-spacing: .06em; }
.status-finalized { color: #fff; background: #275e45; }
.status-sent { color: #172c38; background: #bde9ff; }
.status-sent::before { background: #167ca8; }

.qmm-record-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
    min-height: 220px;
    padding: 28px 32px 30px;
    overflow: hidden;
    color: #f8f9f5;
    background: #1b223f;
    border-top: 6px solid #506bff;
    box-shadow: var(--shadow);
}
.qmm-record-hero::after {
    position: absolute;
    inset: 0 0 0 auto;
    width: 34%;
    pointer-events: none;
    content: "";
    background: linear-gradient(135deg, transparent 28%, rgba(80,107,255,.15));
}
.qmm-record-hero .record-hero-main,
.qmm-record-hero .record-hero-side { position: relative; z-index: 1; }
.qmm-record-hero .back-link {
    display: inline-flex;
    margin-bottom: 24px;
    color: #cbd2e8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
}
.qmm-record-hero .back-link:hover { color: #fff; }
.qmm-record-hero .record-kicker {
    margin-bottom: 8px;
    color: #aebdff;
}
.qmm-record-hero h1 {
    overflow-wrap: anywhere;
    margin: 0;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(40px, 4.2vw, 58px);
    line-height: .95;
    letter-spacing: -.025em;
}
.qmm-record-hero .record-hero-main > p {
    margin: 16px 0 0;
    color: #cbd2e8;
    font-size: 15.6px;
    font-weight: 600;
}
.qmm-record-hero .source-request-link {
    display: inline-block;
    margin-top: 9px;
    color: #aebdff;
    font-size: 12px;
    font-weight: 800;
}
.qmm-record-hero .record-hero-side {
    display: flex;
    min-width: 190px;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: #cbd2e8;
    font-size: 12px;
}
.qmm-record-hero .record-hero-side .status {
    margin-bottom: 8px;
    color: #26300f;
    background: #dff287;
}
.qmm-record-hero .record-hero-side .status::before { background: #718f1b; }
.qmm-record-hero .record-hero-side .status-finalized {
    color: #fff;
    background: #317957;
}
.qmm-record-hero .record-hero-side .status-finalized::before { background: #a8e0c1; }
.qmm-record-hero .record-hero-side .status-sent {
    color: #172c38;
    background: #bde9ff;
}
.qmm-record-hero .record-hero-side .status-sent::before { background: #167ca8; }
.qmm-record-hero .record-hero-side .status-archived {
    color: #303630;
    background: #d8dcd8;
}
.qmm-record-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.qmm-record-actions form { margin: 0; }
.qmm-archive-action { margin-left: auto !important; }
.qmm-archive-action button { border: 0; background: none; color: #9a413b; cursor: pointer; text-decoration: underline; }
.qmm-record-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr); gap: 18px; }
.qmm-record-main, .qmm-record-side { display: grid; align-content: start; gap: 18px; }
.qmm-record-summary, .qmm-record-lines, .qmm-rate-card, .qmm-terms-card { padding: 22px; }
.qmm-record-addresses { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.qmm-record-addresses > div { display: flex; flex-direction: column; padding: 15px; border-right: 1px solid var(--line); }
.qmm-record-addresses > div:last-child { border-right: 0; }
.qmm-record-addresses small { margin-bottom: 8px; }
.qmm-record-addresses span { line-height: 1.45; }
.qmm-record-line { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 150px; gap: 15px; align-items: start; padding: 17px 0; border-top: 1px solid var(--line); }
.qmm-record-line-copy h3 { margin: 0; overflow-wrap: anywhere; font-family: var(--font-display); font-size: 19.2px; }
.qmm-record-line-copy p { margin: 4px 0 0; color: var(--muted); }
.qmm-record-features { margin-top: 9px; color: #3e463f; font-size: 11.4px; line-height: 1.45; }
.qmm-record-features p { margin: 0; }
.qmm-line-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.qmm-line-tags span { padding: 4px 7px; background: #eceee8; font-size: 10.8px; }
.qmm-record-line-price { text-align: right; }
.qmm-record-line-price small { display: block; color: var(--muted); font-size: 9.6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qmm-record-line-price strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 21.6px; }
.qmm-quantity-strip { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line); }
.qmm-quantity-strip div { padding: 8px 10px; border-right: 1px solid var(--line); }
.qmm-quantity-strip div:last-child { border-right: 0; }
.qmm-quantity-strip dt { color: var(--muted); font-size: 9.6px; text-transform: uppercase; }
.qmm-quantity-strip dd { margin: 2px 0 0; font-weight: 800; }
.qmm-quantity-strip .is-negative dd { color: #a22b25; }
.qmm-rate-card { border-top: 5px solid #506bff; }
.qmm-rate-card dl, .qmm-terms-card dl { margin: 16px 0; }
.qmm-rate-card dl div, .qmm-terms-card dl div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.qmm-rate-card dd, .qmm-terms-card dd { margin: 0; font-weight: 700; }
.qmm-rate-card > p:last-child { color: var(--muted); font-size: 10.8px; }
.qmm-draft-note { display: grid; grid-template-columns: 54px 1fr; background: #fff2c8; }
.qmm-draft-note > span { display: flex; align-items: center; justify-content: center; background: #e4b635; font-family: var(--font-display); font-size: 28.8px; font-weight: 900; }
.qmm-draft-note p { display: grid; gap: 4px; margin: 0; padding: 14px; }
.qmm-draft-note p strong { display: block; }

/* Print-ready customer and approval documents */
.qmm-print-body { min-height: 100vh; margin: 0; background: #dfe1dc; color: #172019; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.qmm-print-toolbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; max-width: 1030px; margin: 0 auto; padding: 12px 0; }
.qmm-print-toolbar a { color: #172019; font-weight: 700; text-decoration: none; }
.qmm-print-sheet { position: relative; width: 1030px; min-height: 1450px; margin: 0 auto 50px; padding: 52px 58px 35px; overflow: hidden; background: #fff; box-shadow: 0 12px 45px rgba(0,0,0,.18); }
.qmm-draft-watermark { position: fixed; z-index: 5; top: 47%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); color: rgba(150,50,45,.11); font-family: Arial Black, sans-serif; font-size: 150px; font-weight: 900; letter-spacing: .08em; pointer-events: none; }
.qmm-print-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 27px; border-bottom: 5px solid #172019; }
.qmm-print-brand { display: block; width: 220px; }
.qmm-print-brand img { display: block; width: 100%; height: auto; }
.qmm-print-title { text-align: right; }
.qmm-print-title small, .qmm-print-addresses address > small, .qmm-print-price small, .qmm-approval-header small, .qmm-approval-meta small, .qmm-approval-terms small, .qmm-approval-decision small { color: #697169; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.qmm-print-title h1 { margin: 4px 0; font-size: 25px; }
.qmm-print-title span { color: #697169; }
.qmm-print-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 30px 0; }
.qmm-print-addresses address { display: flex; flex-direction: column; font-style: normal; line-height: 1.5; }
.qmm-print-addresses .company-name { margin: 6px 0 4px; font-weight: 900; }
.qmm-print-section { margin-top: 28px; }
.qmm-print-section > h2, .qmm-print-terms > h2, .qmm-approval-section > h2, .qmm-approval-terms > h2, .qmm-approval-decision > h2 { margin: 0 0 12px; padding-bottom: 7px; border-bottom: 2px solid #172019; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.qmm-print-line { display: grid; grid-template-columns: 34px minmax(0, 1fr) 145px; gap: 14px; padding: 16px 0; border-bottom: 1px solid #cfd2ca; break-inside: avoid; }
.qmm-print-line-number { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: #172019; color: #fff; font-size: 10px; font-weight: 800; }
.qmm-print-line-copy h3 { margin: 0 0 3px; overflow-wrap: anywhere; font-size: 16px; }
.qmm-print-line-copy p { margin: 0; color: #4f5850; }
.qmm-print-features { margin-top: 7px; font-size: 11px; line-height: 1.45; }
.qmm-print-features p { margin: 0; }
.qmm-print-specs { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; }
.qmm-print-specs span { font-weight: 700; }
.qmm-print-specs .qmm-print-spec-centered { text-align: center; }
.qmm-print-specs small { display: block; color: #727a72; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.qmm-print-price { text-align: right; }
.qmm-print-price strong { display: block; margin-top: 4px; font-size: 18px; }
.qmm-print-table, .qmm-approval-table { width: 100%; border-collapse: collapse; }
.qmm-print-table th, .qmm-print-table td, .qmm-approval-table th, .qmm-approval-table td { padding: 9px 8px; border-bottom: 1px solid #cfd2ca; text-align: left; vertical-align: top; }
.qmm-print-table th, .qmm-approval-table th { background: #eef0eb; color: #596159; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.qmm-print-table small, .qmm-approval-table small { display: block; margin-top: 3px; color: #697169; }
.qmm-approval-table strong { overflow-wrap: anywhere; }
.qmm-print-table .number { text-align: right; white-space: nowrap; }
.qmm-print-terms { margin-top: 31px; break-inside: avoid; }
.qmm-print-terms dl { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #cfd2ca; }
.qmm-print-terms dl div { padding: 12px; border-right: 1px solid #cfd2ca; border-bottom: 1px solid #cfd2ca; }
.qmm-print-terms dl div:nth-child(3), .qmm-print-terms dl .wide { border-right: 0; }
.qmm-print-terms dl .wide { grid-column: 1 / -1; }
.qmm-print-terms dl .wide:last-child { border-bottom: 0; }
.qmm-print-terms dt { margin-bottom: 5px; color: #697169; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.qmm-print-terms dd { margin: 0; line-height: 1.45; }
.qmm-print-footer { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 9px; border-top: 1px solid #172019; color: #697169; font-size: 9px; letter-spacing: .06em; }
.print-footer-attribution { display: inline-flex; align-items: baseline; gap: 7px; }
.print-footer-attribution i { color: #a4aaa4; font-style: normal; }
.print-footer-attribution strong { color: #172019; font-weight: 800; }
.qmm-approval-header { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 28px; padding: 0 0 24px; border-bottom: 5px solid #172019; }
.qmm-approval-brand { width: 190px; }
.qmm-approval-title { min-width: 0; justify-self: end; text-align: right; }
.qmm-approval-header h1 { margin: 5px 0; font-size: 28px; }
.qmm-approval-header p { margin: 0; color: #596159; }
.qmm-approval-meta { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0 30px; border: 1px solid #cfd2ca; }
.qmm-approval-meta div { display: grid; gap: 3px; padding: 12px; border-right: 1px solid #cfd2ca; }
.qmm-approval-meta div:last-child { border-right: 0; }
.qmm-approval-meta span { color: #697169; font-size: 10px; }
.qmm-approval-section { margin-top: 25px; }
.qmm-approval-table { font-size: 11px; }
.qmm-approval-table .negative { color: #a22b25; font-weight: 900; }
.qmm-approval-empty { padding: 15px; background: #eef0eb; }
.qmm-approval-terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 28px; border: 1px solid #cfd2ca; break-inside: avoid; page-break-inside: avoid; }
.qmm-approval-terms h2 { grid-column: 1 / -1; margin: 0; padding: 10px 12px; background: #172019; color: #fff; }
.qmm-approval-terms > div { padding: 11px; border-right: 1px solid #cfd2ca; border-bottom: 1px solid #cfd2ca; }
.qmm-approval-terms > div:nth-of-type(3), .qmm-approval-terms > .wide { border-right: 0; }
.qmm-approval-terms > .wide { grid-column: 1 / -1; }
.qmm-approval-terms > .wide:last-child { border-bottom: 0; }
.qmm-approval-terms p { margin: 4px 0 0; }
.qmm-approval-decision { margin-top: 30px; padding: 16px; border: 2px solid #172019; break-inside: avoid; }
.qmm-approval-signature { display: grid; gap: 8px; padding-top: 14px; }
.qmm-approval-signature span { display: block; height: 62px; border-bottom: 1px solid #596159; }

@media (max-width: 1180px) {
    .qmm-foundation-grid { grid-template-columns: 1fr 1fr; }
    .qmm-rate-fieldset { grid-column: 1 / -1; }
    .qmm-filter-bar { grid-template-columns: repeat(3, 1fr); }
    .qmm-record-grid { grid-template-columns: 1fr; }
    .qmm-record-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .qmm-editor > .panel { grid-template-columns: 48px minmax(0, 1fr); }
    .qmm-section-body { padding: 18px; }
    .qmm-foundation-grid, .qmm-short-terms, .qmm-product-line { grid-template-columns: 1fr; }
    .qmm-line-identity { border-right: 0; border-bottom: 1px solid var(--line); }
    .qmm-price-grid { grid-template-columns: 1fr 1fr; }
    .qmm-contribution-margin { grid-template-columns: 1.1fr .7fr .7fr; }
    .qmm-cm-message { grid-column: 1 / -1; }
    .qmm-catalogue-line { grid-template-columns: 45px 1fr; }
    .qmm-catalogue-select, .qmm-catalogue-summary, .qmm-line-price { grid-column: 2; }
    .qmm-history-stats { grid-template-columns: 1fr 1fr; }
    .qmm-filter-bar { grid-template-columns: 1fr 1fr; }
    .qmm-filter-bar .qmm-search { grid-column: 1 / -1; }
    .qmm-record-side { grid-template-columns: 1fr; }
    .qmm-record-hero { grid-template-columns: 1fr; min-height: 0; }
    .qmm-record-hero .record-hero-side { align-items: flex-start; }
}
@media (max-width: 560px) {
    .qmm-editor > .panel { display: block; }
    .qmm-section-number { justify-content: flex-start; padding: 10px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
    .qmm-price-grid, .qmm-filter-bar, .qmm-history-stats, .qmm-record-addresses { grid-template-columns: 1fr; }
    .qmm-contribution-margin { grid-template-columns: 1fr; }
    .qmm-cm-value { padding: 8px 0 0; border-top: 1px solid #c6cbc2; border-left: 0; }
    .qmm-cm-message { grid-column: auto; }
    .qmm-save-bar { align-items: stretch; flex-direction: column; }
    .qmm-record-line { grid-template-columns: 42px minmax(0, 1fr); }
    .qmm-record-line-price { grid-column: 2; text-align: left; }
    .qmm-quantity-strip { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
    .qmm-record-hero { gap: 22px; padding: 22px 20px 24px; }
    .qmm-record-hero .back-link { margin-bottom: 20px; }
}
@media print {
    @page { size: A4; margin: 10mm; }
    html, body { orphans: 3; widows: 3; }
    .qmm-print-body { background: #fff; font-size: 10pt; }
    .qmm-print-toolbar { display: none; }
    .qmm-print-sheet { width: auto; min-height: 0; margin: 0; padding: 0; overflow: visible; box-shadow: none; }
    .qmm-draft-watermark { position: fixed; }
    .qmm-print-section, .qmm-approval-section { break-inside: auto; }
    .qmm-print-section > h2,
    .qmm-print-terms > h2,
    .qmm-approval-section > h2,
    .qmm-approval-terms > h2,
    .qmm-approval-decision > h2 { break-after: avoid-page; page-break-after: avoid; }
    .qmm-print-table thead,
    .qmm-approval-table thead { display: table-header-group; }
    .qmm-print-table tfoot,
    .qmm-approval-table tfoot { display: table-footer-group; }
    .qmm-print-line,
    .qmm-print-table tr,
    .qmm-approval-table tr,
    .qmm-print-terms,
    .qmm-approval-terms,
    .qmm-approval-decision,
    .qmm-print-footer {
        break-inside: avoid-page;
        page-break-inside: avoid;
    }
}

/* Identity, authentication and record accountability */
.brand, .module-stamp, .primary-nav, .sidebar-account { position: relative; }
.sidebar-account { margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.14); }
.sidebar-user { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 7px 11px; }
.sidebar-user > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.sidebar-user strong { overflow: hidden; color: #fff; font-size: 13.2px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-user small { overflow: hidden; color: #8e9990; font-size: 9.6px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; text-overflow: ellipsis; }
.user-monogram { display: grid; width: 38px; height: 38px; place-items: center; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 15.6px; font-weight: 900; letter-spacing: .02em; }
.sidebar-logout { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 7px; color: #aeb7af; background: transparent; border: 0; font-size: 10.8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.sidebar-logout:hover { color: var(--orange); }

.auth-body { min-height: 100vh; background: var(--ink); }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr); }
.auth-brand-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 42px clamp(34px, 6vw, 92px); color: #f1f4ed; background: var(--ink); border-right: 1px solid rgba(255,255,255,.15); }
.auth-brand-panel::before { content: ""; position: absolute; inset: 0; opacity: .45; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; }
.auth-brand-panel::after { content: "CRA"; position: absolute; right: -32px; bottom: 55px; color: rgba(255,255,255,.025); font-family: var(--font-display); font-size: clamp(180px, 29vw, 420px); font-weight: 900; line-height: .6; letter-spacing: -.08em; }
.auth-brand-top, .auth-statement, .auth-module-line { position: relative; z-index: 1; }
.auth-brand-top { display: flex; align-items: center; gap: 14px; }
.auth-workspace { display: flex; flex-direction: column; font-size: 18px; font-weight: 800; line-height: 1.15; }
.auth-workspace small { color: #89958b; font-size: 12px; font-weight: 500; letter-spacing: .08em; }
.auth-statement { max-width: 660px; }
.auth-statement .eyebrow { color: #9ba69d; }
.auth-statement h1 { margin: 0; font-family: var(--font-display); font-size: clamp(48px, 6vw, 84px); font-weight: 900; line-height: .95; letter-spacing: -.035em; }
.auth-statement h1 em { color: var(--lime); font-style: normal; }
.auth-statement > p:last-child { max-width: 570px; margin: 28px 0 0; color: #aeb7af; font-size: 18px; line-height: 1.7; }
.auth-module-line { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); }
.auth-module-line > span { display: grid; width: 50px; height: 45px; place-items: center; color: var(--ink); background: var(--orange); font-family: var(--font-display); font-size: 21.6px; font-weight: 900; }
.auth-module-line strong { font-size: 15.6px; }
.auth-module-line small { color: #879188; font-size: 10.8px; letter-spacing: .12em; text-transform: uppercase; }
.auth-form-panel { position: relative; display: grid; min-height: 100vh; place-items: center; padding: 56px clamp(32px, 6vw, 90px); background-color: var(--paper); background-image: linear-gradient(rgba(22,32,25,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(22,32,25,.025) 1px, transparent 1px); background-size: 32px 32px; }
.auth-form-panel .flash { position: absolute; top: 25px; right: 25px; }
.auth-form-wrap { width: min(500px, 100%); }
.auth-form-heading { margin-bottom: 30px; }
.auth-step { display: inline-block; margin-bottom: 17px; color: var(--orange-dark); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.auth-form-heading h2 { margin: 0; font-family: var(--font-display); font-size: clamp(57.6px, 5vw, 78px); line-height: .9; letter-spacing: -.04em; }
.auth-form-heading p { margin: 18px 0 0; color: var(--muted); font-size: 15.6px; line-height: 1.7; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-submit { min-height: 52px; margin-top: 8px; }
.auth-support { display: flex; justify-content: space-between; gap: 20px; margin: 28px 0 0; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
.auth-support span { color: var(--ink); font-weight: 800; }
.signed-in-as { display: flex; align-items: center; gap: 12px; margin: -8px 0 25px; padding: 14px; background: var(--paper-deep); border-left: 4px solid var(--lime); }
.signed-in-as > span:last-child { display: flex; flex-direction: column; }
.signed-in-as small { color: var(--muted); font-size: 9.6px; letter-spacing: .1em; text-transform: uppercase; }
.signed-in-as strong { font-size: 15.6px; }
.auth-secondary-action { margin-top: 20px; text-align: center; }

.profile-identity-mark { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.profile-identity-mark > span { display: grid; width: 88px; height: 88px; place-items: center; color: var(--ink); background: var(--lime); border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--orange); font-family: var(--font-display); font-size: 43.2px; font-weight: 900; }
.profile-identity-mark small { color: var(--muted); font-size: 10.8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); gap: 18px; align-items: start; }
.profile-card { padding: 28px; }
.profile-card > form { margin-top: 25px; }
.profile-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-form-footer p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; }
.field-grid.one-column { grid-template-columns: 1fr; }
.security-symbol { color: var(--orange); font-family: var(--font-display); font-size: 30px; font-weight: 900; letter-spacing: .12em; }
.security-card .button { margin-top: 22px; }

.admin-boundary-note { display: flex; align-items: center; gap: 16px; margin: -12px 0 25px; padding: 15px 18px; color: #dfe5dc; background: var(--ink); border-left: 5px solid var(--orange); }
.admin-boundary-note > span { padding: 5px 7px; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 14.4px; font-weight: 900; letter-spacing: .07em; }
.admin-boundary-note p { margin: 0; color: #aeb8af; font-size: 13.2px; }
.admin-boundary-note strong { color: #fff; }
.users-grid { display: grid; grid-template-columns: minmax(280px, .65fr) minmax(0, 1.35fr); gap: 18px; align-items: start; }
.user-directory-panel { position: sticky; top: 22px; padding: 23px; }
.user-directory-list { margin: 8px 0 20px; }
.user-directory-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 65px; padding: 8px; border-bottom: 1px solid var(--line); transition: color .15s ease, background .15s ease; }
.user-directory-row:hover { background: #f0ede4; }
.user-directory-row.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }
.user-directory-row.is-active .user-monogram { background: var(--orange); }
.user-directory-row.is-archived { opacity: .52; }
.user-directory-row > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.user-directory-row strong, .user-directory-row small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-directory-row strong { font-size: 13.2px; }
.user-directory-row small { color: var(--muted); font-size: 9.6px; }
.user-directory-row.is-active small { color: #9ca69e; }
.user-directory-row em { color: var(--orange-dark); font-size: 9.6px; font-style: normal; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.user-directory-row.is-active em { color: var(--lime); }
.user-admin-workspace { display: flex; min-width: 0; flex-direction: column; gap: 18px; }
.user-account-card, .user-settings-card, .compact-admin-card { padding: 27px; }
.user-account-hero { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.user-account-monogram { display: grid; width: 76px; height: 76px; place-items: center; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 36px; font-weight: 900; }
.user-account-hero .eyebrow { margin-bottom: 5px; }
.user-account-hero h2 { margin: 0; font-family: var(--font-display); font-size: 38.4px; line-height: 1; }
.user-account-hero p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 13.2px; }
.account-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.account-facts > div { display: flex; min-height: 74px; flex-direction: column; justify-content: center; padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-facts small { color: var(--muted); font-size: 9.6px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.account-facts strong { margin-top: 4px; font-size: 13.2px; }
.user-settings-card > form { margin-top: 24px; }
.user-settings-footer { flex-wrap: wrap; }
.record-attribution, .configuration-audit { color: var(--muted); font-size: 10.8px; line-height: 1.55; }
.record-attribution strong, .configuration-audit strong { color: var(--ink); }
.configuration-audit { margin: 12px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.inline-option-field { display: flex; min-width: 0; flex-direction: column; }
.inline-audit { overflow: hidden; color: var(--muted); font-size: 8.4px !important; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.user-security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compact-admin-card { display: flex; min-height: 305px; flex-direction: column; justify-content: space-between; }
.compact-admin-card .eyebrow { margin-bottom: 7px; }
.compact-admin-card h3 { margin: 0; font-family: var(--font-display); font-size: 28.8px; }
.compact-admin-card p { margin: 9px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.compact-admin-card form { display: flex; flex-direction: column; gap: 12px; }
.account-state-card { color: #fff; background: var(--ink); border-color: var(--ink); }
.account-state-card .eyebrow, .account-state-card p { color: #9fa9a0; }
.account-state-card .button-quiet { color: #fff; border-color: rgba(255,255,255,.35); }
.new-user-dialog { width: min(760px, calc(100vw - 30px)); }
.dialog-intro { margin: -8px 0 22px; color: var(--muted); font-size: 13.2px; }

.request-audit-strip { display: grid; grid-template-columns: repeat(4, 1fr); color: #fff; background: var(--ink); border-left: 5px solid var(--orange); }
.request-audit-strip > span { display: flex; min-height: 74px; flex-direction: column; justify-content: center; padding: 13px 16px; border-right: 1px solid rgba(255,255,255,.14); }
.request-audit-strip small { color: #98a39a; font-size: 9.6px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.request-audit-strip strong { margin-top: 4px; font-size: 13.2px; }
.audit-cell strong, .audit-cell small { display: block; }
.audit-cell small { color: var(--muted); font-size: 9.6px; white-space: nowrap; }
.creator-filter { min-width: 175px; }
.received-cost-summary { display: grid; grid-template-columns: 82px minmax(180px, 1fr) minmax(140px, .58fr) minmax(170px, .65fr); align-items: stretch; color: var(--ink); background: var(--lime); border: 1px solid var(--ink); box-shadow: 7px 7px 0 var(--orange); }
.received-cost-mark { display: grid; place-items: center; color: #fff; background: var(--ink); font-family: var(--font-display); font-size: 16.8px; font-weight: 900; letter-spacing: .08em; }
.received-cost-summary > div { display: flex; min-height: 92px; flex-direction: column; justify-content: center; padding: 15px 19px; border-right: 1px solid rgba(22,32,25,.22); }
.received-cost-summary > div:last-child { border-right: 0; }
.received-cost-summary small { font-size: 9.6px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.received-cost-summary strong { margin-top: 3px; font-family: var(--font-display); font-size: 30px; line-height: 1; }
.received-cost-summary .received-estimate strong, .received-cost-summary .received-recorder strong { font-family: var(--font-body); font-size: 13.2px; overflow-wrap: anywhere; }
.received-cost-summary em { margin-top: 2px; font-size: 9.6px; font-style: normal; }
.factory-cost-card { padding: 23px; overflow: hidden; border-top: 5px solid var(--orange); }
.factory-cost-card.has-cost { color: #fff; background: var(--ink); border-color: var(--lime); }
.factory-cost-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.factory-cost-heading .eyebrow { margin-bottom: 4px; }
.factory-cost-heading h2 { margin: 0; font-family: var(--font-display); font-size: 31.2px; line-height: .95; }
.factory-cost-heading > span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--ink); background: var(--lime); border: 1px solid var(--ink); font-family: var(--font-display); font-size: 20.4px; font-weight: 900; }
.factory-cost-intro { margin: -4px 0 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.factory-cost-value { margin: -3px 0 20px; color: var(--lime); font-family: var(--font-display); font-size: 42px; font-weight: 900; line-height: 1; overflow-wrap: anywhere; }
.factory-estimate-code { display: flex; flex-direction: column; gap: 2px; margin: -7px 0 18px; padding: 10px 12px; background: rgba(255,255,255,.07); border-left: 3px solid var(--orange); }
.factory-estimate-code small { color: #aeb7af; font-size: 9.6px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.factory-estimate-code strong { color: #fff; font-size: 13.2px; overflow-wrap: anywhere; }
.factory-cost-fields { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 15px; }
.factory-cost-card.has-cost .field-label { color: #aeb7af; }
.factory-cost-card.has-cost .field input, .factory-cost-card.has-cost .field select { color: #fff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.32); }
.factory-cost-card.has-cost .field input:focus, .factory-cost-card.has-cost .field select:focus { background: rgba(255,255,255,.11); border-color: var(--lime); box-shadow: 0 0 0 3px rgba(201,242,75,.12); }
.factory-cost-card.has-cost .button-primary { color: var(--ink); background: var(--lime); box-shadow: 4px 4px 0 var(--orange); }
.factory-cost-card.is-read-only { border-color: var(--line-dark); box-shadow: none; }
.factory-correction-note { margin: 13px 0 0; color: var(--muted); font-size: 10.8px; line-height: 1.55; }
.factory-cost-card.has-cost .factory-correction-note { color: #aeb7af; }
.factory-cost-clear { display: block; margin: 15px auto 0; padding: 3px 0; color: #aeb7af; background: transparent; border: 0; border-bottom: 1px solid currentColor; font-size: 10.8px; font-weight: 800; cursor: pointer; }
.factory-cost-clear:hover { color: var(--orange); }
.factory-cost-cell { min-width: 120px; font-family: var(--font-display); font-size: 16.8px !important; font-weight: 900; white-space: nowrap; }
.factory-cost-cell > span { color: var(--muted); font-family: var(--font-body); font-size: 10.8px; font-weight: 700; text-transform: uppercase; }
.factory-cost-cell > strong, .factory-cost-cell > small { display: block; }
.factory-cost-cell > small { max-width: 150px; overflow: hidden; color: var(--muted); font-family: var(--font-body); font-size: 9.6px; font-weight: 700; text-overflow: ellipsis; }

/* Product formulation catalogue */
.product-request-section { overflow: hidden; border-top: 5px solid var(--orange); }
.product-request-grid { align-items: end; }
.product-request-preview { display: grid; grid-column: 1 / -1; grid-template-columns: 78px minmax(0, 1fr); min-height: 105px; color: #fff; background: var(--ink); border-left: 5px solid var(--lime); }
.product-request-preview[hidden] { display: none; }
.product-preview-mark { display: grid; place-items: center; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 15.6px; font-weight: 900; letter-spacing: .08em; }
.product-request-preview > div { display: flex; flex-direction: column; justify-content: center; padding: 16px 20px; }
.product-request-preview small { color: #9eaaa0; font-size: 9.6px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.product-request-preview strong { margin-top: 3px; font-family: var(--font-display); font-size: 26.4px; }
.product-request-preview p { margin: 3px 0 0; color: #c8cec8; font-size: 12px; }
.request-product-summary { padding: 0; overflow: hidden; }
.request-product-summary .record-kicker { padding: 10px 18px; }
.request-product-summary-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); }
.request-product-identity { display: grid; grid-template-columns: 82px minmax(0, 1fr); min-height: 126px; color: #fff; background: var(--ink); }
.request-product-identity > div { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 18px; }
.request-product-identity h2 { margin: 0; font-family: var(--font-display); font-size: 28.8px; line-height: 1; }
.request-product-identity p { margin: 6px 0 0; color: var(--lime); font-size: 12px; font-weight: 800; }
.request-customer-product-name { display: grid; gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.16); }
.request-customer-product-name small { color: #9eaaa0; font-size: 9.6px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.request-customer-product-name strong { overflow-wrap: anywhere; font-size: 13.2px; line-height: 1.35; }
.request-product-summary dl { display: grid; grid-template-columns: .55fr 1.45fr; margin: 0; }
.request-product-summary dl > div { display: flex; min-height: 126px; flex-direction: column; justify-content: center; padding: 18px; border-left: 1px solid var(--line); }
.request-product-summary dt { color: var(--muted); font-size: 9.6px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.request-product-summary dd { margin: 7px 0 0; font-size: 13.2px; font-weight: 700; line-height: 1.55; }

.product-catalogue-layout { display: grid; grid-template-columns: 345px minmax(0, 1fr); gap: 17px; align-items: start; }
.product-directory { position: sticky; top: 20px; overflow: hidden; }
.product-directory-search { display: block; padding: 13px 13px 0; }
.product-directory-search input { width: 100%; height: 42px; padding: 0 12px; color: var(--ink); background: var(--paper-deep); border: 1px solid var(--line); outline: 0; font-size: 12px; }
.product-directory-search input:focus { background: #fff; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,107,46,.1); }
.product-directory > .button { width: calc(100% - 26px); margin: 10px 13px 13px; }
.sortable-status { display: flex; min-height: 34px; align-items: center; gap: 8px; padding: 8px 13px; color: var(--muted); background: #f0ede4; border-top: 1px solid var(--line); font-size: 9.6px; font-weight: 800; }
.sortable-status i { width: 7px; height: 7px; flex: 0 0 auto; background: var(--orange); border-radius: 50%; }
.sortable-status[data-state="saving"] i { animation: product-order-pulse .7s ease-in-out infinite alternate; }
.sortable-status[data-state="success"] { color: #36530d; background: #eef8d7; }
.sortable-status[data-state="success"] i { background: #6b981a; }
.sortable-status[data-state="error"] { color: #8a2e28; background: #fae6e3; }
.sortable-status[data-state="error"] i { background: #b94239; }
.sortable-status[data-state="filtered"] { color: #805211; background: #fff0d5; }
.option-manager > .sortable-status { margin-top: 18px; }
.sortable-status + .option-list { margin-top: 0; }
.attribute-dictionary > .sortable-status { margin-top: 12px; }
@keyframes product-order-pulse { to { opacity: .25; transform: scale(.72); } }
.product-directory-list { max-height: 675px; overflow-y: auto; border-top: 1px solid var(--line); }
.product-directory-entry { display: grid; grid-template-columns: minmax(0, 1fr) 46px; border-bottom: 1px solid var(--line); }
.product-directory-entry.is-archived { opacity: .52; }
[data-sortable-item].is-drag-source { visibility: hidden; }
.sortable-drag-ghost { position: fixed !important; z-index: 10000; overflow: hidden; pointer-events: none; opacity: .96; background: var(--paper); border: 1px solid var(--ink); box-shadow: 7px 9px 0 rgba(17, 32, 23, .22), inset 4px 0 0 var(--orange); transform: scale(1.01); }
.sortable-drag-ghost.is-archived { opacity: .78; }
[data-sortable-list].is-reordering { cursor: grabbing; user-select: none; }
body.configuration-is-dragging, body.configuration-is-dragging * { cursor: grabbing !important; user-select: none !important; }
.product-directory-link { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; min-height: 76px; align-items: center; padding: 10px 8px 10px 12px; transition: color .15s ease, background .15s ease; }
.product-directory-link:hover { background: #f0ede4; }
.product-directory-link.is-active { color: #fff; background: var(--ink); }
.product-sequence { color: var(--orange); font-family: var(--font-display); font-size: 16.8px; font-weight: 900; }
.product-directory-link > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.product-directory-link strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.product-directory-link small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 8.4px; white-space: nowrap; text-overflow: ellipsis; }
.product-directory-link.is-active small { color: #9ea89f; }
.product-directory-link em { grid-column: 2; color: var(--muted); font-size: 8.4px; font-style: normal; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.product-directory-link.is-active em { color: var(--lime); }
.product-order-controls { display: grid; place-items: center; border-left: 1px solid var(--line); }
.sortable-drag-handle { display: grid; width: 40px; height: 54px; place-items: center; padding: 0; background: transparent; border: 1px solid transparent; cursor: grab; touch-action: none; }
.sortable-drag-handle::before { content: ""; width: 15px; height: 23px; background-image: radial-gradient(circle, #777e78 1.8px, transparent 2px); background-position: 0 0; background-size: 7px 7px; }
.sortable-drag-handle:hover, .sortable-drag-handle:focus-visible { background: var(--lime); border-color: var(--ink); outline: 0; }
.sortable-drag-handle:hover::before, .sortable-drag-handle:focus-visible::before { background-image: radial-gradient(circle, var(--ink) 1.8px, transparent 2px); }
.sortable-drag-handle:active { cursor: grabbing; }
.sortable-drag-handle:disabled { cursor: not-allowed; opacity: .3; }
[data-sortable-density="compact"] .sortable-drag-handle { width: 30px; height: 36px; }
.product-directory-empty { padding: 35px 18px; color: var(--muted); font-size: 12px; text-align: center; }
.product-catalogue-workspace { display: flex; min-width: 0; flex-direction: column; gap: 17px; }
.product-editor-panel { padding: 27px; border-top: 5px solid var(--orange); }
.product-editor-heading h2 { max-width: 680px; }
.product-editor-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.product-core-fields { margin-top: 23px; }
.rich-field { margin-top: 20px; }
.rich-editor-shell { margin-top: 7px; background: #fff; border: 1px solid var(--line-dark); }
.rich-editor-toolbar { display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 6px 8px; background: var(--paper-deep); border-bottom: 1px solid var(--line); }
.rich-editor-toolbar button { display: flex; height: 29px; align-items: center; gap: 7px; padding: 0 9px; color: var(--ink); background: #fff; border: 1px solid var(--line-dark); font-size: 10.8px; cursor: pointer; }
.rich-editor-toolbar button:hover { background: var(--lime); border-color: var(--ink); }
.rich-editor-toolbar button strong { font-family: Georgia, serif; font-size: 16.8px; }
.rich-editor-toolbar small { margin-left: auto; color: var(--muted); font-size: 9.6px; }
.rich-editor { min-height: 150px; padding: 15px; outline: 0; font-size: 13.2px; line-height: 1.7; }
.rich-editor:focus { box-shadow: inset 0 0 0 2px rgba(239,107,46,.25); }
.rich-editor:empty::before { content: "Add approvals, certifications, and customer-facing benefits…"; color: #959c96; }
.rich-editor p { margin: 0 0 10px; }
.compatibility-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: 16px; margin-top: 20px; }
.compatibility-fieldset { min-width: 0; margin: 0; padding: 0; background: #f0ede4; border: 1px solid var(--line); }
.compatibility-fieldset legend { display: flex; width: 100%; flex-direction: column; padding: 14px 16px 10px; background: var(--ink); }
.compatibility-fieldset legend span { color: #fff; font-family: var(--font-display); font-size: 20.4px; font-weight: 900; }
.compatibility-fieldset legend small { color: #9ea89f; font-size: 9.6px; }
.checkbox-matrix { display: grid; gap: 6px; padding: 13px; }
.colour-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.packaging-matrix { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.checkbox-matrix label { min-width: 0; cursor: pointer; }
.checkbox-matrix input { position: absolute; opacity: 0; }
.checkbox-matrix label > span { display: flex; min-height: 36px; align-items: center; gap: 7px; padding: 6px 8px; overflow: hidden; background: #fff; border: 1px solid var(--line); font-size: 10.8px; font-weight: 700; white-space: nowrap; }
.checkbox-matrix label > span i { position: relative; width: 14px; height: 14px; flex: 0 0 auto; border: 1px solid var(--line-dark); }
.checkbox-matrix input:checked + span { color: #fff; background: var(--ink); border-color: var(--ink); }
.checkbox-matrix input:checked + span i { background: var(--lime); border-color: var(--lime); }
.checkbox-matrix input:checked + span i::after { content: "✓"; position: absolute; top: -4px; left: 2px; color: var(--ink); font-size: 13.2px; font-style: normal; font-weight: 900; }
.checkbox-matrix input:focus-visible + span { outline: 3px solid rgba(239,107,46,.35); }
.product-compatibility-summary { color: var(--muted); font-size: 10.8px; font-weight: 800; }
.product-lifecycle-form { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.product-lifecycle-form p { margin: 0; color: var(--muted); font-size: 10.8px; }
.attribute-dictionaries { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; align-items: start; }
.attribute-dictionary { padding: 22px; }
.dictionary-add-form { display: flex; align-items: center; gap: 8px; margin: 17px 0 10px; padding: 12px; background: var(--paper-deep); border-left: 4px solid var(--orange); }
.dictionary-add-form input { width: 100%; min-width: 0; height: 38px; padding: 0 9px; background: #fff; border: 1px solid var(--line-dark); font-size: 12px; }
.dictionary-add-form > span { color: var(--muted); font-size: 10.8px; font-weight: 800; }
.dictionary-add-form .button { min-height: 38px; padding-inline: 12px; }
.dictionary-list { max-height: 500px; overflow-y: auto; border-top: 1px solid var(--line); }
.dictionary-row { display: grid; grid-template-columns: 29px minmax(80px, 1fr) 58px 34px 47px; align-items: center; gap: 7px; min-height: 53px; border-bottom: 1px solid var(--line); }
.dictionary-row.is-archived { opacity: .5; }
.dictionary-row > input, .dictionary-volume input { width: 100%; min-width: 0; height: 32px; padding: 0 7px; background: transparent; border: 1px solid transparent; font-size: 10.8px; font-weight: 700; }
.dictionary-row > input:focus, .dictionary-volume input:focus { background: #fff; border-color: var(--orange); outline: 0; }
.dictionary-row > small { color: var(--muted); font-size: 8.4px; text-align: right; }
.dictionary-sort-handle { display: grid; place-items: center; }
.dictionary-volume { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.dictionary-volume span { color: var(--muted); font-size: 9.6px; }

.accessory-directory-list { max-height: 720px; }
.accessory-directory-link { min-height: 82px; }
.accessory-directory-link em { color: var(--orange); }
.accessory-directory-link.is-active em { color: var(--lime); }
.accessory-editor-panel { border-top-color: var(--lime); }
.accessory-editor-heading { align-items: flex-start; }
.temporary-badge { color: var(--ink); background: var(--lime); border-color: var(--ink); }
.accessory-identity-band { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(190px, .7fr); gap: 14px; margin-top: 22px; padding: 18px; background: var(--ink); box-shadow: 6px 6px 0 var(--orange); }
.accessory-identity-band .field-label { color: #aeb6af; }
.accessory-identity-band input { background: #fff; border-color: #fff; }
.accessory-name-field input { font-family: var(--font-display); font-size: 19.2px; font-weight: 900; }
.article-number-field input { color: var(--ink); background: var(--lime); border-color: var(--lime); font-size: 14.4px; font-weight: 900; letter-spacing: .04em; }
.temporary-article-toggle { grid-column: 1 / -1; justify-self: end; }
.temporary-article-toggle em { color: #fff; }
.field-grid.accessory-commercial-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; }
.accessory-commercial-fields .field small { margin-top: 6px; color: var(--muted); font-size: 9.6px; line-height: 1.4; }
.accessory-full-details { min-height: 168px; line-height: 1.6; }
.money-input { display: grid; grid-template-columns: 38px minmax(0, 1fr); }
.money-input b { display: grid; place-items: center; color: var(--ink); background: var(--lime); border: 1px solid var(--line-dark); border-right: 0; font-size: 15.6px; }
.money-input input { min-width: 0; }
.accessory-save-footer p { margin: 0; color: var(--muted); font-size: 10.8px; }
.accessory-data-note { display: grid; grid-template-columns: 92px minmax(0, 1fr); overflow: hidden; color: #fff; background: var(--ink); border: 1px solid var(--ink); }
.accessory-data-note > span { display: grid; min-height: 128px; place-items: center; color: var(--ink); background: var(--orange); font-family: var(--font-display); font-size: 26.4px; font-weight: 900; letter-spacing: -.04em; writing-mode: vertical-rl; transform: rotate(180deg); }
.accessory-data-note > div { align-self: center; padding: 22px 25px; }
.accessory-data-note h3 { margin: 4px 0 7px; font-family: var(--font-display); font-size: 25.2px; line-height: 1; }
.accessory-data-note p:last-child { max-width: 630px; margin: 0; color: #aeb6af; font-size: 10.8px; line-height: 1.6; }

.service-directory-list { max-height: 610px; }
.service-directory-link { min-height: 91px; }
.service-directory-link strong { white-space: normal; line-height: 1.25; }
.service-directory-link em { color: var(--orange); }
.service-directory-link.is-active em { color: var(--lime); }
.service-editor-panel { border-top-color: var(--orange); }
.service-editor-heading { align-items: flex-start; }
.price-request-badge { color: #fff; background: var(--orange); border-color: var(--ink); }
.service-identity-band { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 18px; align-items: stretch; margin-top: 22px; padding: 18px; color: #fff; background: var(--ink); box-shadow: 6px 6px 0 var(--lime); }
.service-identity-mark { display: grid; min-height: 112px; place-items: center; color: var(--ink); background: var(--orange); font-family: var(--font-display); font-size: 27.6px; font-weight: 900; letter-spacing: -.04em; }
.service-identity-band .field-label { color: #aeb6af; }
.service-description-field textarea { min-height: 112px; color: var(--ink); background: #fff; border-color: #fff; font-family: var(--font-display); font-size: 19.2px; font-weight: 900; line-height: 1.25; }
.service-price-panel { display: grid; grid-template-columns: minmax(210px, .65fr) auto minmax(250px, 1fr); gap: 20px; align-items: center; margin-top: 28px; padding: 18px; background: var(--paper-deep); border-left: 5px solid var(--lime); }
.service-money-input input[readonly] { color: var(--muted); background: #e0ddd3; }
.price-request-toggle { min-height: 45px; padding: 0 14px; background: #fff; border: 1px solid var(--line-dark); }
.price-request-toggle input:checked + span { background: var(--orange); }
.service-price-panel > p { margin: 0; color: var(--muted); font-size: 10.8px; line-height: 1.55; }
.service-details-field { margin-top: 24px; }
.service-details-field textarea { min-height: 185px; line-height: 1.65; }
.service-save-footer p { margin: 0; color: var(--muted); font-size: 10.8px; }
.service-future-note { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 112px; color: #fff; background: var(--ink); border-bottom: 5px solid var(--lime); }
.service-future-note > div { display: flex; align-items: center; gap: 13px; padding: 20px; border-right: 1px solid rgba(255,255,255,.14); }
.service-future-note span { display: grid; width: 54px; height: 54px; flex: 0 0 auto; place-items: center; color: var(--ink); background: var(--lime); font-family: var(--font-display); font-size: 22.8px; font-weight: 900; }
.service-future-note small { font-size: 9.6px; font-weight: 900; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.service-future-note > p { align-self: center; margin: 0; padding: 22px 25px; color: #aeb6af; font-size: 10.8px; line-height: 1.65; }

@media (max-width: 1080px) {
    .auth-shell { grid-template-columns: .85fr 1.15fr; }
    .auth-statement h1 { font-size: 57.6px; }
    .profile-grid, .users-grid { grid-template-columns: 1fr; }
    .user-directory-panel { position: static; }
    .user-directory-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; }
    .product-catalogue-layout { grid-template-columns: 290px minmax(0, 1fr); }
    .accessory-identity-band { grid-template-columns: 1fr; }
    .field-grid.accessory-commercial-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .temporary-article-toggle { grid-column: auto; justify-self: start; }
    .service-price-panel { grid-template-columns: 1fr 1fr; }
    .service-price-panel > p { grid-column: 1 / -1; }
    .compatibility-grid, .attribute-dictionaries { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .auth-shell { display: block; }
    .auth-brand-panel { min-height: 270px; padding: 27px 24px; }
    .auth-statement { margin-top: 50px; }
    .auth-statement h1 { font-size: 43.2px; }
    .auth-statement > p:last-child, .auth-module-line { display: none; }
    .auth-form-panel { min-height: calc(100vh - 270px); padding: 45px 23px; }
    .auth-form-panel .flash { position: static; width: 100%; margin-bottom: 25px; }
    .profile-heading { display: flex; }
    .profile-identity-mark > span { width: 64px; height: 64px; font-size: 32.4px; box-shadow: 5px 5px 0 var(--orange); }
    .profile-identity-mark small { display: none; }
    .profile-form-footer { align-items: stretch; flex-direction: column; }
    .user-directory-list, .user-security-grid { grid-template-columns: 1fr; }
    .user-account-hero { grid-template-columns: 60px minmax(0, 1fr); }
    .user-account-monogram { width: 60px; height: 60px; font-size: 30px; }
    .user-account-hero > .status { grid-column: 1 / -1; }
    .account-facts { grid-template-columns: 1fr; }
    .request-audit-strip { grid-template-columns: 1fr 1fr; }
    .request-audit-strip > span:nth-child(2) { border-right: 0; }
    .received-cost-summary { grid-template-columns: 70px 1fr; }
    .received-cost-summary .received-estimate, .received-cost-summary .received-recorder { grid-column: 1 / -1; min-height: 65px; border-top: 1px solid rgba(22,32,25,.22); }
    .product-catalogue-layout { grid-template-columns: 1fr; }
    .product-directory { position: static; }
    .product-directory-list { max-height: 330px; }
    .request-product-summary-grid { grid-template-columns: 1fr; }
    .request-product-summary dl > div { min-height: 95px; border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
    .creator-filter { grid-column: 1 / -1; }
    .profile-card, .user-directory-panel, .user-account-card, .user-settings-card, .compact-admin-card { padding: 18px; }
    .admin-boundary-note { align-items: flex-start; }
    .request-audit-strip { grid-template-columns: 1fr; }
    .request-audit-strip > span { min-height: 59px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.13); }
    .received-cost-summary { grid-template-columns: 1fr; box-shadow: 5px 5px 0 var(--orange); }
    .received-cost-mark { min-height: 38px; }
    .received-cost-summary > div, .received-cost-summary > div:last-child { grid-column: auto; min-height: 68px; border-right: 0; border-top: 1px solid rgba(22,32,25,.22); }
    .product-editor-panel, .attribute-dictionary { padding: 18px; }
    .colour-matrix { grid-template-columns: 1fr; }
    .packaging-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dictionary-row { grid-template-columns: 26px minmax(70px, 1fr) 44px 31px 43px; gap: 5px; }
    .product-lifecycle-form { align-items: flex-start; flex-direction: column; }
    .accessory-identity-band { padding: 14px; box-shadow: 4px 4px 0 var(--orange); }
    .field-grid.accessory-commercial-fields { grid-template-columns: 1fr; }
    .accessory-data-note { grid-template-columns: 58px minmax(0, 1fr); }
    .service-identity-band { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 12px; box-shadow: 4px 4px 0 var(--lime); }
    .service-identity-mark { min-height: 126px; font-size: 20.4px; writing-mode: vertical-rl; transform: rotate(180deg); }
    .service-price-panel { grid-template-columns: 1fr; gap: 13px; padding: 14px; }
    .service-price-panel > p { grid-column: auto; }
    .service-future-note { grid-template-columns: 1fr; }
    .service-future-note > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
    .request-product-summary dl { grid-template-columns: 1fr; }
    .request-product-summary dl > div { min-height: 75px; border-left: 0; }
}

@media print {
    .received-cost-summary { margin-bottom: 12px; box-shadow: none; break-inside: avoid; }
    .received-cost-summary, .received-cost-mark { color: #000; background: #fff; }
    .received-cost-mark { border-right: 1px solid #000; }
}

/* B2C+ platform overview */
.platform-heading { align-items: center; }
.platform-stat-qmm { border-color: #506bff; }
.platform-stat-qmm .stat-rule span { background: #506bff; }
.platform-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.platform-module-card { position: relative; overflow: hidden; padding: 24px; }
.platform-module-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--orange); }
.platform-module-qmm::before { background: #506bff; }
.platform-module-header { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 17px; align-items: start; }
.platform-module-code { display: grid; width: 64px; height: 64px; place-items: center; color: #fff; background: var(--orange); font-family: var(--font-display); font-size: 22.8px; font-weight: 900; letter-spacing: .01em; }
.platform-module-qmm .platform-module-code { background: #506bff; }
.platform-module-header .eyebrow { margin-bottom: 5px; }
.platform-module-header h2 { margin: 0; font-family: var(--font-display); font-size: 31.2px; line-height: 1; letter-spacing: -.025em; }
.platform-module-header p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13.2px; line-height: 1.55; }
.platform-module-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 22px 0 18px; border: 1px solid var(--line); }
.platform-module-qmm .platform-module-metrics { grid-template-columns: repeat(4, 1fr); }
.platform-module-metrics div { padding: 12px 13px; border-right: 1px solid var(--line); }
.platform-module-metrics div:last-child { border-right: 0; }
.platform-module-metrics dt { color: var(--muted); font-size: 9.6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.platform-module-metrics dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 31.2px; font-weight: 900; line-height: 1; }
.platform-module-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button-qmm { color: #fff; background: #506bff; box-shadow: 5px 5px 0 var(--ink); }
.button-qmm:hover { background: #3852dd; box-shadow: 3px 3px 0 var(--ink); }
.platform-activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.platform-activity-panel { min-width: 0; padding: 24px; }
.platform-activity-qmm { border-top: 4px solid #506bff; }
.platform-activity-list { margin-top: 5px; }
.platform-activity-row { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) max-content; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-height: 72px; padding-right: 30px; border-bottom: 1px solid var(--line); transition: background .15s ease, box-shadow .15s ease; }
.platform-activity-row:last-child { border-bottom: 0; }
.platform-activity-row > * { min-width: 0; }
.platform-activity-row:hover { background: #f6f3ea; box-shadow: inset 4px 0 0 var(--orange); }
.platform-activity-row .request-ref { grid-column: 1; grid-row: 1 / -1; align-self: center; }
.platform-activity-row .request-main { grid-column: 2; grid-row: 1 / -1; align-self: center; overflow: hidden; }
.platform-activity-row .request-main strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.platform-activity-row .status { grid-column: 3; grid-row: 1; align-self: end; justify-self: end; white-space: nowrap; }
.platform-activity-row time { grid-column: 3; grid-row: 2; align-self: start; justify-self: end; color: var(--muted); font-size: 10.8px; text-align: right; white-space: nowrap; }
.platform-activity-row .row-arrow { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); }
.platform-activity-row:hover .row-arrow { transform: translate(2px, -50%); }
.platform-activity-empty { display: grid; min-height: 195px; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 16px; color: var(--muted); }
.platform-activity-empty > span { display: grid; width: 58px; height: 58px; place-items: center; color: var(--ink); background: var(--paper-deep); font-family: var(--font-display); font-size: 18px; font-weight: 900; }
.platform-activity-qmm .platform-activity-empty > span { color: #fff; background: #506bff; }
.platform-activity-empty h3 { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: 25.2px; }
.platform-activity-empty p { margin: 3px 0 0; font-size: 13.2px; }

@media (max-width: 760px) {
    .platform-module-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .platform-module-card, .platform-activity-panel { padding: 18px; }
    .platform-module-header { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; }
    .platform-module-code { width: 54px; height: 54px; font-size: 19.2px; }
    .platform-module-header h2 { font-size: 26.4px; }
    .platform-module-actions { display: grid; grid-template-columns: 1fr; }
    .platform-activity-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 0; }
    .platform-activity-row .request-ref { grid-column: 1; grid-row: 1; }
    .platform-activity-row .request-main { grid-column: 1; grid-row: 2; }
    .platform-activity-row .status { grid-column: 2; grid-row: 1; }
    .platform-activity-row time { grid-column: 2; grid-row: 2; }
    .platform-activity-row .row-arrow { display: none; }
}

/* NPR · New Product Registration */
:root { --npr: #147d78; --npr-dark: #0e504d; --npr-pale: #dcefeb; }
.primary-nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
body[data-view^="npr"] .module-stamp-code { background: var(--npr); }
body[data-view^="npr"] .nav-item.is-active { background: #bfe8df; }
.button-npr { color: #fff; background: var(--npr); border-color: var(--npr-dark); box-shadow: 5px 5px 0 var(--ink); }
.button-npr:hover { background: var(--npr-dark); box-shadow: 3px 3px 0 var(--ink); }
.npr-heading { border-left: 7px solid var(--npr); padding-left: 22px; }
.npr-heading-code { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; }
.npr-heading-code span { display: grid; width: 88px; height: 64px; place-items: center; color: #fff; background: var(--npr); font-family: var(--font-display); font-size: 32px; font-weight: 900; letter-spacing: .03em; }
.npr-heading-code small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.npr-config-intro { display: grid; grid-template-columns: minmax(0, 1fr) 100px; align-items: center; gap: 25px; margin-bottom: 18px; padding: 24px; border-top: 5px solid var(--npr); }
.npr-config-intro h2 { margin: 0; font-family: var(--font-display); font-size: 31px; }
.npr-config-intro p:last-child { max-width: 780px; margin: 8px 0 0; color: var(--muted); }
.npr-config-mark { display: grid; width: 100px; height: 72px; place-items: center; color: #fff; background: var(--npr); font-family: var(--font-display); font-size: 29px; font-weight: 900; }
.npr-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.npr-option-panel { min-width: 0; padding: 22px; }
.npr-option-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; margin: 17px 0 10px; padding: 13px; background: var(--npr-pale); border-left: 4px solid var(--npr); }
.npr-option-list { max-height: 520px; overflow-y: auto; border-top: 1px solid var(--line); }
.npr-option-row { display: grid; grid-template-columns: 31px 31px minmax(100px, 1fr) 66px 92px; align-items: center; gap: 7px; min-height: 60px; border-bottom: 1px solid var(--line); }
.npr-option-row.is-archived { opacity: .56; }
.npr-option-row .inline-option-field input { width: 100%; min-width: 0; height: 34px; padding: 0 8px; background: transparent; border: 1px solid transparent; font-size: 12px; font-weight: 700; }
.npr-option-row .inline-option-field input:focus { background: #fff; border-color: var(--npr); outline: 0; }

.npr-editor { display: grid; gap: 18px; padding-bottom: 60px; }
.npr-section { padding: 0 26px 26px; overflow: hidden; border-top: 4px solid var(--npr); }
.npr-section-heading { display: grid; grid-template-columns: 55px minmax(0, 1fr); align-items: center; gap: 17px; margin: 0 -26px 24px; padding: 17px 26px; border-bottom: 1px solid var(--line); background: #f1f3ee; }
.npr-section-heading > span { display: grid; width: 44px; height: 44px; place-items: center; color: #fff; background: var(--npr); font-family: var(--font-display); font-size: 17px; font-weight: 900; }
.npr-section-heading .eyebrow { margin-bottom: 3px; }
.npr-section-heading h2 { margin: 0; font-family: var(--font-display); font-size: 29px; line-height: 1; }
.npr-field-grid { align-items: start; }
.npr-field-grid .field small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.npr-field-grid .field-label b { color: var(--npr); }
.npr-field-grid .field-label i { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 700; }
.npr-derived-value { display: flex; min-height: 45px; align-items: center; padding: 0 12px; color: var(--npr-dark); background: var(--npr-pale); border: 1px solid #8eb8b2; font-family: var(--font-display); font-size: 20px; font-weight: 900; }
.npr-derived-value.is-negative { color: #8f2823; background: #f8dfdc; border-color: #c8837d; }
.field-span-2 { grid-column: span 2; }
.npr-source-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 14px; color: #fff; background: var(--npr-dark); border-left: 7px solid #bfe8df; }
.npr-source-strip[hidden] { display: none; }
.npr-source-strip > span { color: #bfe8df; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.npr-source-strip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npr-source-strip small { color: #c8dad7; font-size: 10px; text-align: right; }
.npr-print-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.npr-print-config { height: 100%; }
.npr-print-config .npr-field-grid { grid-template-columns: 1fr; }
.npr-editor-actions { position: sticky; z-index: 7; bottom: 15px; display: flex; justify-content: flex-end; gap: 10px; padding: 15px; color: #fff; background: var(--ink); border: 1px solid #000; box-shadow: 7px 7px 0 rgba(20,125,120,.4); }
.npr-editor-actions .button-quiet { color: #fff; border-color: #738078; }

.npr-history-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 18px; background: var(--npr-dark); border: 1px solid var(--npr-dark); }
.npr-history-stats article { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px; background: #fff; }
.npr-history-stats span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.npr-history-stats strong { color: var(--npr-dark); font-family: var(--font-display); font-size: 31px; }
.npr-history-panel { padding: 0; overflow: hidden; }
.npr-filter-bar { display: grid; grid-template-columns: minmax(230px, 1.4fr) repeat(3, minmax(130px, .75fr)) auto; gap: 10px; align-items: end; padding: 17px; background: #eef4f1; border-bottom: 1px solid var(--line); }
.npr-history-table { overflow-x: auto; }
.npr-history-row { display: grid; grid-template-columns: 155px minmax(210px, 1.3fr) minmax(180px, 1fr) minmax(130px, .7fr) 100px 125px 24px; gap: 13px; align-items: center; min-width: 1000px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.npr-history-row:hover:not(.npr-history-labels) { background: #f0f6f3; }
.npr-history-row > span { min-width: 0; }
.npr-history-row strong, .npr-history-row small, .npr-history-row time small { display: block; }
.npr-history-row small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.npr-history-row time { color: var(--muted); font-size: 11px; }
.npr-history-labels { color: rgba(255,255,255,.72); background: var(--npr-dark); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.status-created { color: #fff; background: var(--npr); }
.status-created::before { background: #bfe8df; }

.npr-record-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; min-height: 220px; padding: 29px 32px; overflow: hidden; color: #fff; background: var(--npr-dark); border-top: 6px solid #45b6aa; box-shadow: var(--shadow); }
.npr-record-hero::after { position: absolute; right: 24px; bottom: -65px; content: "NPR"; color: rgba(255,255,255,.055); font-family: var(--font-display); font-size: 190px; font-weight: 900; line-height: 1; pointer-events: none; }
.npr-record-hero .record-hero-main, .npr-record-hero .record-hero-side { position: relative; z-index: 1; }
.npr-record-hero .back-link { display: inline-flex; margin-bottom: 23px; color: #bfe8df; font-size: 12px; font-weight: 800; }
.npr-record-hero .record-kicker { margin-bottom: 8px; color: #8fd3ca; font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.npr-record-hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(40px, 4.2vw, 58px); line-height: .95; }
.npr-record-hero .record-hero-main > p { margin: 14px 0 0; color: #d4e7e4; font-weight: 600; }
.npr-record-hero .source-request-link { display: inline-block; margin-top: 8px; color: #8fd3ca; font-size: 11px; font-weight: 800; }
.npr-record-hero .record-hero-side { display: flex; min-width: 190px; flex-direction: column; align-items: flex-end; gap: 4px; color: #c6ddda; font-size: 11px; }
.npr-record-hero .status { margin-bottom: 8px; }
.npr-record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.npr-record-actions form { margin: 0; }
.npr-record-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .55fr); gap: 18px; }
.npr-record-main, .npr-record-side { display: grid; align-content: start; gap: 18px; }
.npr-commercial-card, .npr-detail-card, .npr-comments-card, .npr-article-card, .npr-audit-card { padding: 22px; }
.npr-commercial-card { border-top: 5px solid var(--npr); }
.npr-currency-chip { display: grid; min-width: 52px; height: 39px; place-items: center; color: #fff; background: var(--npr); font-weight: 900; }
.npr-commercial-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 0; border: 1px solid var(--line); }
.npr-commercial-grid > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.npr-commercial-grid > div:nth-child(4n) { border-right: 0; }
.npr-commercial-grid > div:nth-last-child(-n+4) { border-bottom: 0; }
.npr-commercial-grid dt, .npr-detail-grid dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.npr-commercial-grid dd, .npr-detail-grid dd { overflow-wrap: anywhere; margin: 4px 0 0; font-weight: 800; }
.npr-commercial-grid dd.is-negative { color: #a22b25; }
.npr-commercial-grid a { color: var(--npr-dark); border-bottom: 1px solid var(--npr); }
.npr-audit-note { margin: 13px 0 0; padding: 9px 11px; color: #3f5d59; background: var(--npr-pale); font-size: 10px; }
.npr-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.npr-detail-grid > div { min-height: 72px; padding: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.npr-detail-grid.compact { grid-template-columns: repeat(3, 1fr); }
.npr-print-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.npr-comments-card > p:last-child { margin: 8px 0 0; line-height: 1.65; }
.npr-article-card { color: #fff; background: var(--npr-dark); border-color: var(--npr-dark); }
.npr-article-card .eyebrow, .npr-article-card p { color: #b9d5d2; }
.npr-article-card h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 31px; overflow-wrap: anywhere; }
.npr-article-card .field-label { color: #b9d5d2; }
.npr-article-card form { display: grid; gap: 12px; }
.npr-audit-card h2 { margin: 0; font-family: var(--font-display); font-size: 27px; }
.npr-audit-card ol { margin: 14px 0 0; padding: 0; list-style: none; }
.npr-audit-card li { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.npr-audit-card li span, .npr-audit-card li small { color: var(--muted); font-size: 10px; }
.npr-draft-note { display: grid; grid-template-columns: 55px 1fr; background: #f2e8bd; }
.npr-draft-note > span { display: grid; place-items: center; background: #d9b643; font-family: var(--font-display); font-size: 30px; font-weight: 900; }
.npr-draft-note p { display: grid; gap: 4px; margin: 0; padding: 14px; }
.npr-draft-note p strong { display: block; }

.platform-stats-grid { grid-template-columns: repeat(5, 1fr); }
.platform-module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-module-npr::before { background: var(--npr); }
.platform-module-npr .platform-module-code { background: var(--npr); }
.platform-module-npr .platform-module-metrics { grid-template-columns: repeat(4, 1fr); }
.platform-activity-npr { border-top: 4px solid var(--npr); }
.platform-activity-npr .platform-activity-empty > span { color: #fff; background: var(--npr); }

/* NPR print form */
.npr-print-body { min-height: 100vh; margin: 0; color: #172019; background: #dfe1dc; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.npr-print-sheet { position: relative; width: 1030px; min-height: 1450px; margin: 0 auto 50px; padding: 48px 58px 35px; background: #fff; box-shadow: 0 12px 45px rgba(0,0,0,.18); }
.npr-draft-watermark { position: fixed; z-index: 5; top: 47%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); color: rgba(150,50,45,.1); font-family: Arial Black, sans-serif; font-size: 150px; font-weight: 900; letter-spacing: .08em; pointer-events: none; }
.npr-print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; padding-bottom: 24px; border-bottom: 5px solid var(--npr-dark); }
.npr-print-brand { width: 220px; }
.npr-print-brand img { display: block; width: 100%; height: auto; }
.npr-print-header > div:last-child { text-align: right; }
.npr-print-header small { color: var(--npr); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.npr-print-header h1 { margin: 4px 0; font-size: 27px; }
.npr-print-header span { color: #697169; }
.npr-print-intro { display: grid; grid-template-columns: 1fr 1.35fr .8fr; margin: 24px 0; border: 1px solid #bfc7c2; }
.npr-print-intro div { display: grid; gap: 4px; padding: 13px; border-right: 1px solid #bfc7c2; }
.npr-print-intro div:last-child { border-right: 0; }
.npr-print-intro small { color: #697169; font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.npr-print-commercial, .npr-print-section, .npr-print-comments { margin-top: 22px; }
.npr-print-commercial h2, .npr-print-section h2, .npr-print-comments h2 { margin: 0 0 9px; padding-bottom: 6px; border-bottom: 2px solid #172019; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.npr-print-commercial dl, .npr-print-section dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid #cfd2ca; border-left: 1px solid #cfd2ca; }
.npr-print-commercial dl { grid-template-columns: repeat(4, 1fr); }
.npr-print-commercial dl div, .npr-print-section dl div { min-height: 59px; padding: 9px 10px; border-right: 1px solid #cfd2ca; border-bottom: 1px solid #cfd2ca; }
.npr-print-commercial dt, .npr-print-section dt { color: #697169; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.npr-print-commercial dd, .npr-print-section dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.npr-print-commercial dd.is-negative { color: #a22b25; font-weight: 900; }
.npr-print-comments { padding: 12px; border: 1px solid #cfd2ca; }
.npr-print-comments p { margin: 0; line-height: 1.5; }
.npr-print-footer { display: flex; justify-content: space-between; margin-top: 28px; padding-top: 8px; border-top: 1px solid #172019; color: #697169; font-size: 9px; letter-spacing: .06em; }

@media (max-width: 1280px) {
    .platform-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .platform-module-grid, .platform-activity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
    .npr-config-grid, .npr-print-config-grid, .npr-print-details-grid { grid-template-columns: 1fr; }
    .npr-filter-bar { grid-template-columns: repeat(2, 1fr); }
    .npr-filter-bar .npr-search { grid-column: 1 / -1; }
    .npr-record-layout { grid-template-columns: 1fr; }
    .npr-record-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .npr-heading { padding-left: 15px; }
    .npr-heading-code { display: none; }
    .npr-history-stats { grid-template-columns: repeat(2, 1fr); }
    .npr-record-hero { grid-template-columns: 1fr; min-height: 0; padding: 23px 20px; }
    .npr-record-hero .record-hero-side { align-items: flex-start; }
    .npr-commercial-grid, .npr-detail-grid { grid-template-columns: repeat(2, 1fr); }
    .npr-detail-grid.compact { grid-template-columns: repeat(2, 1fr); }
    .npr-commercial-grid > div:nth-child(4n) { border-right: 1px solid var(--line); }
    .npr-commercial-grid > div:nth-child(2n) { border-right: 0; }
    .npr-commercial-grid > div:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
    .npr-commercial-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
    .npr-record-side { grid-template-columns: 1fr; }
    .npr-source-strip { grid-template-columns: 1fr; }
    .npr-source-strip small { text-align: left; }
    .npr-config-intro { grid-template-columns: 1fr; }
    .npr-config-mark { display: none; }
}
@media (max-width: 560px) {
    .npr-filter-bar, .npr-history-stats, .npr-commercial-grid, .npr-detail-grid, .npr-detail-grid.compact { grid-template-columns: 1fr; }
    .npr-commercial-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
    .npr-commercial-grid > div:last-child { border-bottom: 0; }
    .npr-filter-bar .npr-search { grid-column: auto; }
    .npr-section { padding-inline: 17px; }
    .npr-section-heading { margin-inline: -17px; padding-inline: 17px; }
    .npr-option-panel { padding: 16px; }
    .npr-option-row { grid-template-columns: 27px 27px minmax(80px, 1fr) 82px; }
    .npr-option-row .option-state { display: none; }
    .npr-editor-actions { align-items: stretch; flex-direction: column; }
    .npr-editor-actions .button { width: 100%; }
}
@media print {
    @page { size: A4; margin: 10mm; }
    .npr-print-body { background: #fff; font-size: 9.5pt; }
    .npr-print-body .qmm-print-toolbar { display: none; }
    .npr-print-sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
    .npr-draft-watermark { position: fixed; }
    .npr-print-header, .npr-print-intro, .npr-print-commercial, .npr-print-comments, .npr-print-footer,
    .npr-print-commercial dl div, .npr-print-section dl div { break-inside: avoid-page; page-break-inside: avoid; }
    .npr-print-section h2, .npr-print-comments h2 { break-after: avoid-page; page-break-after: avoid; }
}
