:root {
    --bg: #080b0f;
    --bg-raised: #0d1218;
    --panel: #111820;
    --panel-2: #151e27;
    --line: #26313d;
    --line-soft: #1d2731;
    --text: #f2f5f7;
    --text-soft: #b4c0ca;
    --muted: #71808d;
    --accent: #48e5a8;
    --accent-strong: #21c98b;
    --blue: #62a7ff;
    --warning: #ffbe5c;
    --danger: #ff6e77;
    --purple: #b399ff;
    --shadow: 0 22px 70px rgba(0, 0, 0, .28);
    --radius: 14px;
    --radius-sm: 9px;
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: var(--font); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
h1 { margin-bottom: 0; font-size: 23px; }
h2 { margin-bottom: 8px; font-size: 24px; }
h3 { margin-bottom: 6px; font-size: 17px; }
small { color: var(--muted); }
.mono { font-family: var(--mono); letter-spacing: -.02em; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent); }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; height: 100vh; padding: 24px 18px 18px; border-right: 1px solid var(--line-soft); background: #0b1016; }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-lockup > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand-lockup strong { font-size: 13px; letter-spacing: .16em; }
.brand-lockup small { margin-top: 5px; color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid rgba(72, 229, 168, .5); border-radius: 11px; color: #06100c; background: var(--accent); font-size: 18px; font-weight: 900; box-shadow: 0 0 28px rgba(72, 229, 168, .15); }
.brand-lockup--large .brand-mark { width: 48px; height: 48px; border-radius: 14px; font-size: 22px; }
.brand-lockup--large strong { font-size: 16px; }

.main-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 42px; }
.nav-label { margin: 20px 12px 7px; color: #52606c; font-family: var(--mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; color: var(--text-soft); font-weight: 600; transition: .18s ease; }
.nav-link > span { width: 19px; color: var(--muted); font-family: var(--mono); font-size: 18px; text-align: center; }
.nav-link:hover { color: var(--text); background: var(--panel-2); }
.nav-link.is-active { border-color: rgba(72, 229, 168, .17); color: var(--accent); background: rgba(72, 229, 168, .07); }
.nav-link.is-active > span { color: var(--accent); }
.sidebar-user { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.user-summary { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; }
.user-summary > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.user-summary strong, .user-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-summary strong { font-size: 12px; }
.user-summary small { font-size: 10px; }
.avatar { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid #3a4a58; border-radius: 50%; color: var(--blue); background: #182430; font-size: 12px; font-weight: 800; }
.avatar--large { width: 58px; height: 58px; font-size: 20px; }
.logout-form { margin: 0; }
.icon-button, .menu-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--text); background: var(--panel-2); }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 14px 34px; border-bottom: 1px solid rgba(38, 49, 61, .8); background: rgba(8, 11, 15, .9); backdrop-filter: blur(16px); }
.topbar .eyebrow { margin-bottom: 3px; color: var(--muted); }
.topbar-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.menu-button { display: none; }
.page-content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 30px 34px 60px; }

.alert { position: relative; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 12px 42px 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text-soft); background: var(--panel-2); }
.alert button { position: absolute; top: 7px; right: 8px; border: 0; color: inherit; background: none; font-size: 20px; cursor: pointer; }
.alert--success { border-color: rgba(72, 229, 168, .3); color: #b8f7df; background: rgba(72, 229, 168, .08); }
.alert--error { border-color: rgba(255, 110, 119, .35); color: #ffc4c8; background: rgba(255, 110, 119, .09); }
.alert--warning { border-color: rgba(255, 190, 92, .35); color: #ffe2b3; background: rgba(255, 190, 92, .08); }
.revision-alert { flex-direction: column; }
.revision-alert strong { color: var(--warning); }

.hero-strip { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; min-height: 190px; margin-bottom: 22px; padding: 34px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, #111820 0%, #101923 58%, #10241f 100%); box-shadow: var(--shadow); }
.hero-strip::after { position: absolute; right: 7%; bottom: -70px; width: 260px; height: 190px; border: 1px solid rgba(72, 229, 168, .12); border-radius: 50%; box-shadow: 0 0 80px rgba(72, 229, 168, .07); content: ""; }
.hero-strip > * { position: relative; z-index: 1; }
.hero-strip h2 { max-width: 680px; margin-bottom: 10px; font-size: clamp(27px, 3vw, 42px); }
.hero-strip p { max-width: 630px; margin-bottom: 0; color: var(--text-soft); font-size: 15px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { position: relative; display: flex; flex-direction: column; min-height: 132px; padding: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat-card::before { position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: #394754; content: ""; }
.stat-card--accent::before { background: var(--accent); }
.stat-card--warning::before { background: var(--warning); }
.stat-card--value::before { background: var(--blue); }
.stat-card span { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.stat-card strong { margin-top: 9px; font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -.04em; }
.stat-card small { margin-top: auto; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 12px 40px rgba(0, 0, 0, .12); }
.panel--padded { padding: 26px; }
.panel-heading { margin-bottom: 22px; }
.panel-heading h2 { margin-bottom: 7px; font-size: 21px; }
.panel-heading h3 { margin-bottom: 5px; }
.panel-heading p { margin-bottom: 0; color: var(--muted); }
.panel-heading--spread { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; margin: 0; }
.panel-heading--spread h2 { margin-bottom: 0; }
.panel--table { overflow: hidden; }
.filter-bar, .inline-form { display: flex; align-items: flex-end; gap: 8px; }
.filter-bar input { width: 210px; }
.filter-bar select { width: 145px; }
.activity-panel { padding: 22px; }
.activity-list, .timeline { margin: 0; padding: 0; list-style: none; }
.activity-list li { position: relative; display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding-bottom: 19px; }
.activity-list li:not(:last-child)::before { position: absolute; top: 9px; bottom: 0; left: 3px; width: 1px; background: var(--line); content: ""; }
.activity-dot { position: relative; z-index: 1; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--accent); }
.activity-list a { color: var(--blue); font-family: var(--mono); font-size: 11px; }
.activity-list p { margin: 3px 0; color: var(--text-soft); font-size: 12px; }
.activity-list small { font-size: 9px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; white-space: nowrap; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.button--primary { border-color: var(--accent); color: #06110c; background: var(--accent); box-shadow: 0 8px 24px rgba(72, 229, 168, .12); }
.button--primary:hover { background: #6af0ba; }
.button--secondary { border-color: var(--line); color: var(--text); background: var(--panel-2); }
.button--secondary:hover { border-color: #3a4957; }
.button--ghost { border-color: var(--line); color: var(--text-soft); background: transparent; }
.button--danger { border-color: rgba(255, 110, 119, .4); color: #ffb1b6; background: rgba(255, 110, 119, .09); }
.button--wide { width: 100%; }
.button--small { min-height: 33px; padding: 0 11px; font-size: 11px; }
.button-group { display: flex; gap: 8px; }

input, select, textarea { width: 100%; border: 1px solid #2d3a46; border-radius: 8px; outline: none; color: var(--text); background: #0c1218; transition: border-color .16s, box-shadow .16s; }
input, select { height: 42px; padding: 0 11px; }
textarea { min-height: 90px; padding: 10px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(72, 229, 168, .75); box-shadow: 0 0 0 3px rgba(72, 229, 168, .09); }
input::placeholder, textarea::placeholder { color: #4e5d69; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span, .choice-fieldset legend { color: var(--text-soft); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.field-hint { margin: -2px 0 0; color: var(--muted); font-size: 11px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; gap: 14px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.form-actions--center { justify-content: center; }
.separator { height: 1px; margin: 26px 0; border: 0; background: var(--line); }
.choice-fieldset { margin: 0; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: 9px; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.check-card { position: relative; }
.check-card input { position: absolute; opacity: 0; pointer-events: none; }
.check-card span { display: flex; align-items: center; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-soft); background: var(--bg-raised); cursor: pointer; }
.check-card input:checked + span { border-color: rgba(72, 229, 168, .5); color: var(--accent); background: rgba(72, 229, 168, .07); }
.check-card input:focus-visible + span { box-shadow: 0 0 0 3px rgba(72, 229, 168, .09); }
.money-input, .suffix-input { display: flex; align-items: center; border: 1px solid #2d3a46; border-radius: 8px; background: #0c1218; }
.money-input:focus-within, .suffix-input:focus-within { border-color: rgba(72, 229, 168, .75); box-shadow: 0 0 0 3px rgba(72, 229, 168, .09); }
.money-input > span, .suffix-input > span { padding: 0 9px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.money-input input, .suffix-input input { border: 0; background: transparent; box-shadow: none; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 12px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 12px; border-bottom: 1px solid var(--line-soft); color: var(--text-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .015); }
.data-table strong { display: block; color: var(--text); font-size: 12px; }
.data-table small { display: block; margin-top: 3px; font-size: 10px; }
.data-table input, .data-table select { min-width: 95px; height: 36px; }
.data-table .numeric, .numeric { text-align: right; white-space: nowrap; }
.click-row { cursor: pointer; }
.click-row:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.link { color: var(--blue); font-size: 11px; }
.stage-badge, .role-chip, .status-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-soft); background: var(--panel-2); font-size: 10px; white-space: nowrap; }
.stage-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.stage-badge--approved i, .stage-badge--is-active i { background: var(--accent); }
.stage-badge--revision i { background: var(--warning); }

.content-narrow { max-width: 920px; margin: 0 auto; }
.back-link { display: inline-flex; margin-bottom: 15px; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--text); }
.callout { display: flex; gap: 13px; padding: 14px; border: 1px solid rgba(98, 167, 255, .2); border-radius: 10px; background: rgba(98, 167, 255, .06); }
.callout--warning { border-color: rgba(255, 190, 92, .25); background: rgba(255, 190, 92, .06); }
.callout-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: 8px; color: var(--blue); background: rgba(98, 167, 255, .12); font-weight: 800; }
.callout strong { display: block; margin-bottom: 2px; }
.callout p { margin: 0; color: var(--text-soft); font-size: 12px; }

.two-column { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.sticky-panel { position: sticky; top: 96px; }
.user-list { display: flex; flex-direction: column; }
.user-row { display: grid; grid-template-columns: 38px minmax(160px, 1fr) auto auto 30px; gap: 11px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.user-row-main { display: flex; flex-direction: column; min-width: 0; }
.user-row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chip.is-active { border-color: rgba(72, 229, 168, .2); color: var(--accent); background: rgba(72, 229, 168, .06); }
.status-chip.is-inactive { border-color: rgba(255, 110, 119, .2); color: var(--danger); }
.row-menu { position: relative; }
.row-menu summary { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--muted); cursor: pointer; list-style: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu-card { position: absolute; top: 34px; right: 0; z-index: 5; width: 250px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); box-shadow: var(--shadow); }
.row-menu-card form:first-child button { width: 100%; padding: 8px; border: 0; border-radius: 6px; color: var(--danger); background: rgba(255, 110, 119, .08); cursor: pointer; }
.reset-form { display: grid; gap: 7px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.reset-form label { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.reset-form input { height: 34px; margin-top: 3px; }
.reset-form button { height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); cursor: pointer; }
.profile-head { display: flex; align-items: center; gap: 15px; }
.profile-head h2 { margin-bottom: 3px; }
.profile-head p { margin-bottom: 0; color: var(--muted); }

.auth-body { background: #080b0f; }
.auth-shell { display: grid; grid-template-columns: minmax(350px, 1.1fr) minmax(430px, .9fr); min-height: 100vh; }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(30px, 5vw, 70px); overflow: hidden; border-right: 1px solid var(--line); background: radial-gradient(circle at 78% 72%, rgba(72, 229, 168, .13), transparent 30%), linear-gradient(145deg, #0c1117, #101a21); }
.auth-brand::after { position: absolute; right: -180px; bottom: -210px; width: 520px; height: 520px; border: 1px solid rgba(72, 229, 168, .12); border-radius: 50%; box-shadow: 0 0 120px rgba(72, 229, 168, .07); content: ""; }
.auth-brand-copy { position: relative; z-index: 1; max-width: 680px; margin: auto 0; }
.auth-brand-copy h1 { max-width: 620px; margin-bottom: 20px; font-size: clamp(40px, 5vw, 72px); }
.auth-brand-copy p { max-width: 560px; color: var(--text-soft); font-size: 17px; }
.auth-signal { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.auth-signal span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 6vw, 90px); background: var(--bg); }
.auth-card { width: 100%; max-width: 520px; margin: 0 auto; }
.auth-card h2 { margin-bottom: 9px; font-size: 30px; }
.auth-card > p { margin-bottom: 27px; }
.security-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.quote-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.quote-title-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.quote-id { color: var(--blue); font-size: 12px; }
.quote-hero h2 { margin-bottom: 7px; font-size: clamp(28px, 4vw, 42px); }
.quote-hero h2 span { color: #43515d; font-weight: 400; }
.quote-hero p { margin-bottom: 0; color: var(--muted); }
.stage-track { display: grid; grid-template-columns: repeat(8, minmax(90px, 1fr)); margin: 0 0 22px; padding: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); list-style: none; }
.stage-track li { position: relative; display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 10px 12px; border-right: 1px solid var(--line-soft); }
.stage-track li:last-child { border-right: 0; }
.stage-track li > span { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.stage-track li small { color: var(--muted); font-size: 9px; line-height: 1.15; }
.stage-track .is-done > span { border-color: rgba(72, 229, 168, .3); color: #07110d; background: var(--accent); }
.stage-track .is-done small { color: var(--text-soft); }
.stage-track .is-current { background: rgba(98, 167, 255, .06); }
.stage-track .is-current::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--blue); content: ""; }
.stage-track .is-current > span { border-color: var(--blue); color: #07101a; background: var(--blue); }
.stage-track .is-current small { color: var(--text); font-weight: 700; }
.quote-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.quote-facts article { display: flex; flex-direction: column; min-width: 0; padding: 15px 17px; border-right: 1px solid var(--line-soft); }
.quote-facts article:last-child { border-right: 0; }
.quote-facts span { color: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.quote-facts strong, .quote-facts small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-facts strong { margin: 4px 0 1px; font-size: 14px; }
.quote-facts small { font-size: 9px; }
.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.quote-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.quote-aside { min-width: 0; }
.compact-panel { padding: 14px 18px; }
.compact-panel summary { display: flex; justify-content: space-between; color: var(--text); font-weight: 700; cursor: pointer; }
.compact-panel summary span { color: var(--muted); font-weight: 400; }
.compact-panel .inline-form { margin-top: 15px; }
.inline-form .field { flex: 1; }
.section-divider { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.section-divider h3 { margin-bottom: 0; }
.paste-panel { padding: 15px; border: 1px dashed #394957; border-radius: 10px; background: var(--bg-raised); }
.bom-editor { min-width: 820px; }
.bom-editor th:nth-child(1) { width: 17%; }
.bom-editor th:nth-child(2) { width: 28%; }
.bom-editor th:nth-child(3) { width: 12%; }
.bom-editor th:nth-child(4) { width: 10%; }
.bom-editor th:nth-child(5) { width: 24%; }
.remove-button { width: 30px; height: 30px; border: 1px solid rgba(255, 110, 119, .25); border-radius: 7px; color: var(--danger); background: rgba(255, 110, 119, .06); cursor: pointer; }
.waiting-state, .empty-state { padding: 54px 25px; color: var(--muted); text-align: center; }
.waiting-state > span, .empty-state > span { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); background: var(--bg-raised); font-size: 20px; }
.waiting-state h3, .empty-state h3 { color: var(--text); }
.waiting-state p, .empty-state p { max-width: 520px; margin: 0 auto; }
.empty-state--error .button { margin-top: 18px; }
.supplier-links { display: flex; flex-wrap: wrap; gap: 5px; }
.supplier-links a { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue); font-family: var(--mono); font-size: 9px; }
.verification-table { min-width: 820px; }
.pricing-table { min-width: 980px; }
.flag-note { display: block; margin-top: 4px; color: var(--warning); font-style: normal; }
.calculation-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.calculation-grid article { display: flex; flex-direction: column; padding: 13px; border-right: 1px solid var(--line); background: var(--bg-raised); }
.calculation-grid article:last-child { border: 0; }
.calculation-grid span, .cost-summary span, .approval-summary span { color: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.calculation-grid strong { margin-top: 5px; }
.calculation-grid__total { color: var(--accent); background: rgba(72, 229, 168, .05) !important; }
.labour-table { min-width: 870px; }
.cost-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; }
.cost-summary > div { display: flex; flex-direction: column; padding: 14px; border-right: 1px solid var(--line); }
.cost-summary > div:last-child { border-right: 0; }
.cost-summary strong { margin-top: 5px; }
.cost-summary__total { color: var(--accent); background: rgba(72, 229, 168, .05); }
.approval-summary { display: grid; grid-template-columns: 1fr 1fr 1.2fr; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.approval-summary article { display: flex; flex-direction: column; padding: 17px; border-right: 1px solid var(--line); background: var(--bg-raised); }
.approval-summary article:last-child { border: 0; }
.approval-summary strong { margin-top: 5px; font-size: 18px; }
.approval-summary__total { color: var(--accent); background: rgba(72, 229, 168, .05) !important; }
.quote-result { display: flex; flex-direction: column; align-items: center; padding: 24px; border: 1px solid rgba(72, 229, 168, .35); border-radius: 12px; background: rgba(72, 229, 168, .055); text-align: center; }
.quote-result > span { color: var(--text-soft); }
.quote-result > strong { margin: 5px 0 2px; color: var(--accent); font-size: clamp(30px, 5vw, 44px); }
.quote-result small b { color: var(--text); }
.revision-form { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; padding: 20px; border: 1px solid rgba(255, 110, 119, .3); border-radius: 11px; background: rgba(255, 110, 119, .05); }
.approval-complete { text-align: center; }
.approval-mark { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 14px; border-radius: 50%; color: #06110c; background: var(--accent); font-size: 27px; font-weight: 900; box-shadow: 0 0 35px rgba(72, 229, 168, .18); }
.final-value { display: flex; flex-direction: column; align-items: center; margin: 24px auto; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); }
.final-value span { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.final-value strong { margin: 3px 0; color: var(--accent); font-size: 38px; }
.sap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-align: left; }
.sap-grid > div { display: flex; flex-direction: column; padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sap-grid > div:nth-child(3n) { border-right: 0; }
.sap-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.sap-grid span { color: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.sap-grid strong { margin-top: 4px; font-size: 12px; }
.timeline li { position: relative; display: grid; grid-template-columns: 13px 1fr; gap: 9px; padding-bottom: 20px; }
.timeline li::before { position: absolute; top: 11px; bottom: 0; left: 4px; width: 1px; background: var(--line); content: ""; }
.timeline li:last-child::before { display: none; }
.timeline li > span { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 4px; border: 2px solid var(--panel); border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline strong { font-size: 11px; }
.timeline p { margin: 3px 0; color: var(--text-soft); font-size: 11px; }
.timeline small { font-size: 9px; }

@media (max-width: 1250px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .quote-layout { grid-template-columns: 1fr; }
    .activity-panel { order: 2; }
    .quote-aside .sticky-panel { position: static; }
    .timeline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; }
    .form-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 260px; box-shadow: 20px 0 60px rgba(0,0,0,.45); transition: transform .2s ease; }
    .sidebar.is-open { transform: none; }
    .menu-button { display: inline-flex; margin-right: 12px; }
    .topbar { justify-content: flex-start; padding: 13px 20px; }
    .topbar-meta { margin-left: auto; }
    .page-content { padding: 24px 20px 50px; }
    .two-column { grid-template-columns: 1fr; }
    .two-column .sticky-panel { position: static; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { min-height: 360px; border-right: 0; border-bottom: 1px solid var(--line); }
    .auth-brand-copy h1 { font-size: 45px; }
    .stage-track { grid-template-columns: repeat(8, 115px); }
}

@media (max-width: 700px) {
    h1 { font-size: 19px; }
    h2 { font-size: 21px; }
    .topbar .eyebrow, .topbar-meta { display: none; }
    .page-content { padding: 18px 13px 45px; }
    .hero-strip { min-height: 0; padding: 24px 20px; flex-direction: column; align-items: flex-start; }
    .hero-strip h2 { font-size: 29px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .stat-card { min-height: 115px; padding: 15px; }
    .stat-card strong { font-size: 25px; }
    .panel--padded { padding: 19px 15px; }
    .panel-heading--spread { align-items: stretch; flex-direction: column; padding: 18px 15px 14px; }
    .filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .filter-bar input { grid-column: 1 / -1; width: 100%; }
    .filter-bar select { width: 100%; }
    .quote-table { min-width: 760px; }
    .form-grid--2, .form-grid--4 { grid-template-columns: 1fr; }
    .choice-grid { grid-template-columns: 1fr 1fr; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .section-divider { align-items: stretch; flex-direction: column; }
    .button-group { display: grid; grid-template-columns: 1fr 1fr; }
    .quote-hero { align-items: flex-start; flex-direction: column; }
    .quote-hero h2 { font-size: 30px; }
    .quote-facts { grid-template-columns: 1fr 1fr; }
    .quote-facts article:nth-child(2) { border-right: 0; }
    .quote-facts article:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
    .compact-panel summary { flex-direction: column; }
    .inline-form { align-items: stretch; flex-direction: column; }
    .calculation-grid, .cost-summary { grid-template-columns: 1fr 1fr; }
    .calculation-grid article:nth-child(2), .cost-summary > div:nth-child(2) { border-right: 0; }
    .calculation-grid article:nth-child(-n+2), .cost-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .approval-summary { grid-template-columns: 1fr; }
    .approval-summary article { border-right: 0; border-bottom: 1px solid var(--line); }
    .sap-grid { grid-template-columns: 1fr 1fr; }
    .sap-grid > div { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; }
    .sap-grid > div:nth-child(2n) { border-right: 0 !important; }
    .sap-grid > div:nth-last-child(-n+2) { border-bottom: 0 !important; }
    .timeline { grid-template-columns: 1fr; }
    .user-row { grid-template-columns: 36px 1fr auto; }
    .user-row .role-chip { grid-column: 2; width: max-content; }
    .user-row .status-chip { grid-column: 2; width: max-content; }
    .row-menu { grid-column: 3; grid-row: 1; }
    .auth-brand { min-height: 300px; padding: 28px 22px; }
    .auth-brand-copy h1 { font-size: 34px; }
    .auth-brand-copy p { font-size: 14px; }
    .auth-signal { display: none; }
    .auth-panel { padding: 38px 20px; }
}

@media print {
    body { color: #111; background: #fff; }
    .sidebar, .topbar, .back-link, .stage-track, .quote-aside, .form-actions, .alert { display: none !important; }
    .app-shell { display: block; }
    .page-content { max-width: none; padding: 0; }
    .panel, .quote-facts, .sap-grid, .final-value { border-color: #bbb; color: #111; background: #fff; box-shadow: none; }
    .panel * { color: #111 !important; }
    .quote-layout { display: block; }
}

