@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/manrope-regular.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/manrope-medium.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/manrope-semibold.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/manrope-bold.woff2") format("woff2"); }

:root {
    --ink: #232a2e;
    --muted: #6c757a;
    --faint: #98a0a4;
    --line: #dfe3e2;
    --line-strong: #cbd0ce;
    --paper: #ffffff;
    --canvas: #f3f5f2;
    --sidebar: #20272b;
    --sidebar-muted: #9fa8ac;
    --accent: #d3a047;
    --accent-dark: #b4812f;
    --accent-soft: #f5ead3;
    --success: #356b53;
    --success-soft: #e5f0e9;
    --danger: #a4483d;
    --danger-soft: #f8e9e6;
    --blue-soft: #e5edf5;
    --shadow: 0 16px 40px rgba(38, 48, 52, .08);
    --sidebar-width: 264px;
    --radius: 12px;
    --font: "Manrope", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 26px 20px 18px;
    color: #f5f6f4;
    background: var(--sidebar);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    overflow: hidden;
    color: var(--sidebar);
    background: var(--accent);
    border-radius: 9px 3px 9px 3px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.brand-mark::after {
    position: absolute;
    right: -9px;
    bottom: -10px;
    width: 27px;
    height: 27px;
    content: "";
    border: 1px solid rgba(35, 42, 46, .35);
    transform: rotate(28deg);
}

.brand-mark span { position: relative; z-index: 1; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.2; }
.brand-copy strong { overflow: hidden; font-size: 16px; letter-spacing: -.3px; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { margin-top: 4px; color: var(--sidebar-muted); font-size: 11px; }

.nav { display: flex; flex: 1; flex-direction: column; margin-top: 44px; }
.nav-eyebrow { padding: 0 12px 9px; color: #747f84; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-eyebrow--spaced { margin-top: 28px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3px;
    padding: 10px 12px;
    color: #bbc2c5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.nav-link:hover { color: #f7f8f6; background: rgba(255,255,255,.055); }
.nav-link:active { transform: translateY(1px); }
.nav-link--active { color: #fff; background: rgba(211,160,71,.15); }
.nav-link--active svg { color: var(--accent); }
.nav-link svg, .icon-button svg, .button svg, .search svg, .material-search svg, .page-actions svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.09);
}

.avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #22292d;
    background: #e6d4ae;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.avatar--large { width: 42px; height: 42px; font-size: 14px; }
.sidebar-user__copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.25; }
.sidebar-user__copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user__copy small { margin-top: 3px; color: var(--sidebar-muted); font-size: 11px; }

.icon-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.icon-button:hover { color: var(--ink); background: rgba(35,42,46,.06); }
.sidebar .icon-button { color: var(--sidebar-muted); }
.sidebar .icon-button:hover { color: white; background: rgba(255,255,255,.07); }
.icon-button:active { transform: translateY(1px); }

.main-column { min-height: 100dvh; margin-left: var(--sidebar-width); }
.main-content { width: min(1420px, 100%); margin: 0 auto; padding: 42px 48px 96px; }
.mobile-header { display: none; }
.sidebar-backdrop { display: none; }

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.page-header--compact { align-items: center; margin-bottom: 24px; }
.page-header--document { align-items: center; }
.page-header h1 { margin: 5px 0 4px; font-size: clamp(28px, 3vw, 38px); font-weight: 680; letter-spacing: -1.5px; line-height: 1.08; }
.page-header p { max-width: 660px; margin: 0; color: var(--muted); font-size: 15px; }
.eyebrow { color: var(--accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.back-link { display: inline-flex; align-items: center; margin-bottom: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
.back-link::before { margin-right: 7px; content: "←"; color: var(--accent-dark); }
.title-row { display: flex; align-items: center; gap: 12px; }

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.button svg { width: 18px; height: 18px; }
.button:active { transform: translateY(1px); }
.button--primary { color: #252b2e; background: var(--accent); border-color: var(--accent); box-shadow: 0 8px 20px rgba(168,119,39,.14); }
.button--primary:hover { background: #dcaa54; border-color: #dcaa54; box-shadow: 0 10px 24px rgba(168,119,39,.2); }
.button--secondary { color: var(--ink); background: var(--paper); border-color: var(--line-strong); }
.button--secondary:hover, .button--ghost:hover { background: #f8f9f7; border-color: #b8bfbc; }
.button--ghost { color: var(--muted); background: transparent; border-color: transparent; }
.button--wide { width: 100%; }

.toolbar {
    display: flex;
    min-height: 66px;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 11px 14px;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.search { position: relative; display: flex; width: min(520px, 100%); align-items: center; }
.search svg { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--faint); }
.search input { width: 100%; height: 42px; padding: 0 13px 0 39px; color: var(--ink); background: #f7f8f6; border: 1px solid transparent; border-radius: 8px; outline: none; font-size: 14px; }
.search input:focus { background: white; border-color: #c1a468; box-shadow: 0 0 0 3px rgba(211,160,71,.12); }
.toolbar-actions { display: flex; align-items: center; gap: 18px; }
.text-link { color: var(--accent-dark); font-size: 13px; font-weight: 700; }
.result-count { flex: 0 0 auto; color: var(--muted); font-size: 13px; }

.table-wrap { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(39,47,50,.035); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 13px 15px; color: #7a8387; background: #f8f9f7; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; letter-spacing: .065em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px; border-bottom: 1px solid #e9ecea; vertical-align: middle; font-size: 14px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .16s ease; }
.data-table tbody tr:hover { background: #fafbf9; }
.data-table td strong { display: block; font-weight: 680; }
.data-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .amount { font-weight: 700; }
.data-table .actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.data-table .actions form { margin: 0; }
.document-link { color: #8e651f; font-weight: 760; }
.is-muted { opacity: .58; }
.table-empty { padding: 42px !important; color: var(--muted); text-align: center; }

.status { display: inline-flex; min-height: 26px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.status--draft { color: #6f6658; background: #eeeae3; }
.status--final { color: var(--success); background: var(--success-soft); }

.empty-state { display: flex; min-height: 430px; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-state__icon { display: grid; width: 58px; height: 58px; margin-bottom: 19px; place-items: center; color: #9a722f; background: var(--accent-soft); border-radius: 15px; transform: rotate(-3deg); }
.empty-state__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h1, .empty-state h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.6px; }
.empty-state p { max-width: 460px; margin: 0 0 22px; color: var(--muted); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(39,47,50,.035); }
.form-panel { margin-bottom: 18px; padding: 28px; }
.editor-panel { margin-bottom: 18px; padding: 28px; }

.section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.section-heading--editor { margin-bottom: 19px; }
.section-number { display: grid; width: 36px; height: 30px; flex: 0 0 36px; place-items: center; color: #896322; background: var(--accent-soft); border-radius: 7px; font-size: 11px; font-weight: 800; }
.section-heading h2 { margin: -1px 0 3px; font-size: 19px; letter-spacing: -.35px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.section-divider { height: 1px; margin: 30px 0; background: var(--line); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field--wide { grid-column: 1 / -1; }
.field > span, .status-choice > span { color: #515b60; font-size: 12px; font-weight: 750; }
.field input, .field textarea, .field select, .stack-form input, .stack-form select {
    width: 100%;
    color: var(--ink);
    background: #fbfcfa;
    border: 1px solid #d7dcda;
    border-radius: 8px;
    outline: none;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.field input, .field select, .stack-form input, .stack-form select { height: 46px; padding: 0 13px; font-size: 14px; }
.field textarea { min-height: 120px; padding: 11px 12px; line-height: 1.55; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .stack-form input:focus, .stack-form select:focus { background: white; border-color: #b99658; box-shadow: 0 0 0 3px rgba(211,160,71,.12); }
.field-error { color: var(--danger); font-size: 12px; }
.form-error-banner { margin: 13px 0; padding: 10px 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid #edcac4; border-radius: 8px; font-size: 13px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.save-state { color: var(--muted); font-size: 12px; }

.material-picker { position: relative; z-index: 5; }
.material-search { position: relative; display: flex; align-items: center; }
.material-search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--faint); }
.material-search input { width: 100%; height: 48px; padding: 0 64px 0 43px; color: var(--ink); background: #f8f9f7; border: 1px solid #d5dad8; border-radius: 9px; outline: none; }
.material-search input:focus { background: white; border-color: #b99658; box-shadow: 0 0 0 3px rgba(211,160,71,.12); }
.material-search kbd { position: absolute; right: 12px; padding: 3px 6px; color: #858d90; background: white; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font: 9px var(--font); }
.material-results { position: absolute; top: 54px; right: 0; left: 0; z-index: 20; max-height: 320px; overflow-y: auto; padding: 6px; background: white; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); }
.material-result { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 11px; color: var(--ink); background: transparent; border: 0; border-radius: 7px; cursor: pointer; text-align: left; }
.material-result:hover, .material-result.is-selected { background: #f5f2ea; }
.material-result strong { display: block; font-size: 14px; }
.material-result small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.material-result span { align-self: center; color: #755522; font-size: 13px; font-weight: 750; white-space: nowrap; }
.material-results__empty { padding: 18px; color: var(--muted); text-align: center; font-size: 13px; }

.offer-items { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.offer-items__head, .offer-item-row { display: grid; grid-template-columns: minmax(240px, 2.4fr) 90px 110px 110px 120px 36px; gap: 10px; align-items: center; }
.offer-items__head { min-height: 42px; padding: 0 12px; color: #7d8588; background: #f8f9f7; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.offer-item-row { position: relative; min-height: 76px; padding: 10px 12px; border-bottom: 1px solid #e8ebe9; }
.offer-item-row:last-child { border-bottom: 0; }
.offer-item-main { min-width: 0; }
.offer-item-main strong { display: block; overflow: hidden; font-size: 14px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.offer-item-main small { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.offer-item-input { width: 100%; height: 39px; padding: 0 8px; color: var(--ink); background: #fbfcfa; border: 1px solid #d8dddb; border-radius: 6px; outline: none; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.offer-item-input:focus { background: white; border-color: #b99658; box-shadow: 0 0 0 2px rgba(211,160,71,.11); }
.offer-item-input:read-only { color: #6c7478; background: #f2f4f2; border-color: transparent; }
.offer-item-total { font-size: 13px; font-weight: 760; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.offer-item-remove { width: 32px; height: 32px; }
.offer-item-remove:hover { color: var(--danger); background: var(--danger-soft); }
.offer-items-empty { display: flex; min-height: 190px; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: var(--muted); text-align: center; }
.offer-items-empty svg { width: 30px; height: 30px; margin-bottom: 12px; fill: none; stroke: #b58a42; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.offer-items-empty strong { color: var(--ink); font-size: 15px; }
.offer-items-empty span { max-width: 420px; margin-top: 5px; font-size: 13px; }

.offer-summary { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 24px; margin-top: 20px; }
.offer-summary dl { display: flex; gap: 28px; margin: 0; }
.offer-summary dl div { display: flex; flex-direction: column; }
.offer-summary dt { color: var(--muted); font-size: 12px; }
.offer-summary dd { margin: 3px 0 0; font-size: 17px; font-weight: 720; font-variant-numeric: tabular-nums; }
.grand-total { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #e8eddc; border: 1px solid #ccd5b7; border-radius: 9px; }
.grand-total span { color: #596348; font-size: 13px; font-weight: 700; }
.grand-total strong { font-size: 22px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }

.status-choice { display: grid; grid-template-columns: 150px repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; margin-top: 20px; }
.status-choice > span { align-self: center; }
.status-choice label { position: relative; display: block; cursor: pointer; }
.status-choice input { position: absolute; opacity: 0; pointer-events: none; }
.status-choice label > span { display: flex; min-height: 68px; flex-direction: column; justify-content: center; padding: 10px 13px; background: #fbfcfa; border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s ease, background-color .2s ease; }
.status-choice label strong { font-size: 14px; }
.status-choice label small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.status-choice input:checked + span { background: #f7f2e6; border-color: #c7a666; box-shadow: inset 3px 0 0 var(--accent); }

.sticky-actions { position: sticky; bottom: 18px; z-index: 12; display: flex; min-height: 76px; align-items: center; justify-content: space-between; margin-top: 22px; padding: 12px 14px 12px 18px; background: rgba(32,39,43,.96); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; box-shadow: 0 18px 50px rgba(31,38,41,.22); color: white; backdrop-filter: blur(12px); }
.sticky-actions > div:first-child { display: flex; flex-direction: column; }
.sticky-actions__label { color: #aeb6b9; font-size: 12px; }
.sticky-actions strong { margin-top: 1px; font-size: 22px; font-variant-numeric: tabular-nums; }
.sticky-actions__buttons { display: flex; gap: 6px; }
.sticky-actions .button--ghost { color: #ccd1d2; }
.sticky-actions .button--ghost:hover { color: white; background: rgba(255,255,255,.07); border-color: transparent; }

.flash { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 11px 13px; color: var(--success); background: var(--success-soft); border: 1px solid #cce0d3; border-radius: 9px; font-size: 13px; font-weight: 650; }
.flash svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.page-actions { display: flex; align-items: center; gap: 7px; }
.page-actions form { margin: 0; }
.document-preview { overflow: hidden; background: #dfe2df; border: 1px solid #d4d8d6; border-radius: var(--radius); }
.document-preview__bar { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; color: #5c6568; background: #eceeec; border-bottom: 1px solid #d2d6d4; font-size: 13px; font-weight: 700; }
.document-preview__bar small { color: #8b9396; font-size: 11px; }
.proposal-document { width: min(980px, calc(100% - 64px)); min-height: 1200px; margin: 34px auto 52px; padding: 0 38px 44px; overflow: hidden; background: white; box-shadow: 0 18px 55px rgba(39,47,50,.18); }
.proposal-hero { position: relative; display: flex; height: 138px; align-items: flex-start; justify-content: space-between; margin: 0 -38px 26px; padding: 24px 38px; overflow: hidden; color: white; background: #28343b; }
.proposal-hero::after { position: absolute; right: -30px; bottom: -90px; width: 340px; height: 220px; content: ""; background: #8c7245; opacity: .45; transform: rotate(-13deg); }
.proposal-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.proposal-logo { display: grid; width: 46px; height: 46px; place-items: center; color: var(--ink); background: var(--accent); font-size: 14px; font-weight: 850; }
.proposal-brand div { display: flex; flex-direction: column; }
.proposal-brand strong { font-size: 17px; }
.proposal-brand small { margin-top: 4px; color: #c6cdcf; font-size: 10px; }
.proposal-number { position: relative; z-index: 1; padding: 7px 10px; border: 1px solid rgba(255,255,255,.55); font-size: 11px; }
.proposal-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.proposal-meta dl { margin: 0; }
.proposal-meta dl div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.proposal-meta dt { color: var(--muted); font-size: 11px; }
.proposal-meta dd { margin: 0; font-size: 12px; font-weight: 620; }
.proposal-requisites { padding-left: 18px; border-left: 3px solid var(--accent); }
.proposal-requisites strong { font-size: 12px; }
.proposal-requisites p { margin: 6px 0 0; color: #50595d; font-size: 10px; line-height: 1.45; }
.proposal-title { margin: 28px 0 14px; font-size: 22px; text-align: center; }
.proposal-table-wrap { overflow-x: auto; }
.proposal-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 10px; }
.proposal-table th { padding: 8px 5px; color: white; background: #303c43; border: 1px solid #596267; font-size: 9px; }
.proposal-table td { padding: 7px 5px; border: 1px solid #cbd0ce; vertical-align: top; }
.proposal-table td:nth-child(1), .proposal-table td:nth-child(4), .proposal-table td:nth-child(5) { text-align: center; }
.proposal-table td:nth-child(n+6) { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.proposal-table tfoot td { padding: 8px 6px; font-weight: 700; vertical-align: middle; }
.proposal-table tfoot .total-label { background: #f5f6f4; text-align: right; }
.proposal-table tfoot .total-value { background: #f5f6f4; text-align: right; white-space: nowrap; }
.proposal-table tfoot .total-empty { background: #fafbfa; }
.proposal-table tfoot .grand td { background: #e7edd5; border-color: #b8c39e; font-size: 11px; }
.proposal-notes { margin-top: 20px; padding-top: 12px; border-top: 2px solid #303c43; font-size: 10px; }
.proposal-notes ol { margin: 7px 0 0 16px; padding: 0; }
.proposal-notes li { margin-bottom: 3px; }
.proposal-closing { display: grid; grid-template-columns: minmax(0, 1fr) 570px; align-items: center; gap: 22px; margin-top: 18px; }
.proposal-closing > p { margin: 0; padding: 10px 12px; color: #666e73; background: #f2f4f3; font-size: 9px; line-height: 1.5; }
.proposal-signing { position: relative; height: 100px; }
.proposal-signing__layout { position: absolute; right: 0; bottom: 8px; width: 100%; height: 26px; border-collapse: separate; border-spacing: 8px 0; white-space: nowrap; }
.proposal-signing__layout td { height: 26px; padding: 0; vertical-align: bottom; }
.proposal-signing__role { width: 92px; padding-bottom: 5px !important; font-size: 12px; }
.proposal-signing__line { position: relative; width: 145px; height: 26px !important; border-bottom: 1px solid #30373b; }
.proposal-signing__name { width: 96px; padding-bottom: 5px !important; font-size: 12px; }
.proposal-signing__seal { position: relative; width: 129px; height: 26px !important; }
.proposal-signing__mark { width: 30px; padding-bottom: 5px !important; font-size: 11px; }
.proposal-signing__signature { position: absolute; left: 34px; bottom: -4px; width: 76px; height: 94px; object-fit: contain; }
.proposal-signing__stamp { position: absolute; left: 0; bottom: -6px; width: 129px; height: 129px; object-fit: contain; opacity: .92; }

.split-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(500px, 1.35fr); gap: 18px; align-items: start; }
.split-layout__aside { position: sticky; top: 22px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-member { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 10px; }
.team-member summary { display: grid; min-height: 72px; grid-template-columns: 42px minmax(0, 1fr) auto 24px; align-items: center; gap: 13px; padding: 12px 15px; cursor: pointer; list-style: none; }
.team-member summary::-webkit-details-marker { display: none; }
.team-member__identity { display: flex; min-width: 0; flex-direction: column; }
.team-member__identity strong { font-size: 14px; }
.team-member__identity small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.chevron { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.team-member[open] .chevron { transform: rotate(180deg); }
.team-member__form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 18px; background: #f8f9f7; border-top: 1px solid var(--line); }
.team-member__form .button { justify-self: end; align-self: end; }
.check-field { display: flex; align-items: center; gap: 8px; color: #515b60; font-size: 13px; font-weight: 700; }
.check-field input { width: 16px; height: 16px; accent-color: var(--accent-dark); }

.login-page { background: #e9ece8; }
.login-shell { display: grid; min-height: 100dvh; grid-template-columns: minmax(460px, 1.05fr) minmax(440px, .95fr); }
.login-intro { position: relative; display: flex; min-height: 100dvh; flex-direction: column; justify-content: space-between; padding: 44px 55px 60px; overflow: hidden; color: white; background: #222b30; }
.brand--login { align-self: flex-start; }
.login-intro__copy { position: relative; z-index: 2; max-width: 660px; margin: auto 0; padding: 70px 0; }
.login-intro__copy .eyebrow { color: #dfb96e; }
.login-intro h1 { max-width: 650px; margin: 14px 0 18px; font-size: clamp(46px, 6vw, 76px); font-weight: 640; letter-spacing: -3.8px; line-height: .98; }
.login-intro p { max-width: 520px; margin: 0; color: #b8c0c3; font-size: 16px; line-height: 1.65; }
.login-accent { position: absolute; inset: auto -100px -90px auto; width: 520px; height: 420px; transform: rotate(-16deg); }
.login-accent span { position: absolute; display: block; background: #8a7043; opacity: .5; }
.login-accent span:nth-child(1) { inset: 0 0 auto; height: 90px; }
.login-accent span:nth-child(2) { inset: 120px 70px auto 0; height: 110px; opacity: .3; }
.login-accent span:nth-child(3) { inset: 260px 0 auto 120px; height: 70px; opacity: .18; }
.login-panel { display: grid; min-height: 100dvh; place-items: center; padding: 42px; background: #f7f8f5; }
.login-form { width: min(390px, 100%); }
.form-heading { margin-bottom: 30px; }
.form-heading h2 { margin: 6px 0 7px; font-size: 31px; letter-spacing: -1.2px; }
.form-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.login-form .field { margin-bottom: 17px; }
.login-form .button { margin-top: 8px; }
.login-help { margin: 17px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 1120px) {
    .main-content { padding-right: 28px; padding-left: 28px; }
    .offer-items__head, .offer-item-row { grid-template-columns: minmax(200px, 2fr) 80px 95px 95px 105px 34px; gap: 7px; }
    .page-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 250px; }
    .sidebar { transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 15; display: block; visibility: hidden; background: rgba(26,32,35,.42); opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
    body.sidebar-open .sidebar-backdrop { visibility: visible; opacity: 1; }
    .main-column { margin-left: 0; }
    .mobile-header { position: sticky; top: 0; z-index: 10; display: flex; height: 58px; align-items: center; gap: 10px; padding: 0 18px; background: rgba(247,248,245,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
    .mobile-header strong { font-size: 14px; }
    .main-content { padding-top: 28px; }
    .split-layout { grid-template-columns: 1fr; }
    .split-layout__aside { position: static; }
    .login-shell { grid-template-columns: 1fr; }
    .login-intro { display: none; }
    .login-panel { padding: 28px; }
    .offer-items { overflow-x: auto; }
    .offer-items__head, .offer-item-row { min-width: 820px; }
    .proposal-document { width: calc(100% - 30px); margin: 16px auto 30px; }
}

@media (max-width: 680px) {
    .main-content { padding: 22px 15px 90px; }
    .page-header { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 22px; }
    .page-header h1 { font-size: 29px; }
    .page-header > .button { width: 100%; }
    .page-actions { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
    .page-actions > *, .page-actions .button { width: 100%; }
    .page-actions form .button { width: 100%; }
    .page-actions > a:last-child { grid-column: 1 / -1; }
    .toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
    .toolbar-actions { justify-content: space-between; }
    .table-wrap { overflow-x: auto; }
    .data-table { min-width: 790px; }
    .data-table--materials { min-width: 760px; }
    .form-panel, .editor-panel { padding: 20px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .field--wide { grid-column: auto; }
    .offer-summary { grid-template-columns: 1fr; }
    .status-choice { grid-template-columns: 1fr; }
    .status-choice > span { margin-bottom: 2px; }
    .sticky-actions { bottom: 8px; min-height: auto; align-items: stretch; flex-direction: column; gap: 10px; }
    .sticky-actions__buttons { display: grid; grid-template-columns: 1fr 1fr; }
    .proposal-document { min-height: 0; padding: 0 16px 30px; }
    .proposal-hero { margin-right: -16px; margin-left: -16px; padding: 18px 16px; }
    .proposal-brand small { display: none; }
    .proposal-meta { grid-template-columns: 1fr; }
    .proposal-table { min-width: 720px; }
    .proposal-closing { grid-template-columns: 1fr; }
    .proposal-signing { width: 100%; max-width: 570px; margin-left: auto; }
    .proposal-signing__layout { border-spacing: 4px 0; }
    .proposal-signing__role { width: 74px; font-size: 10px; }
    .proposal-signing__line { width: 74px; }
    .proposal-signing__name { width: 72px; font-size: 10px; }
    .proposal-signing__seal { width: 112px; }
    .proposal-signing__mark { width: 24px; font-size: 9px; }
    .proposal-signing__signature { left: 4px; }
    .proposal-signing__stamp { width: 112px; height: 112px; }
    .team-member summary { grid-template-columns: 36px minmax(0,1fr) 22px; }
    .team-member summary .status { display: none; }
    .team-member__form { grid-template-columns: 1fr; }
    .login-panel { align-items: start; padding-top: 90px; }
}

@media print {
    .sidebar, .mobile-header, .page-header, .document-preview__bar { display: none !important; }
    .main-column { margin: 0; }
    .main-content { width: 100%; padding: 0; }
    .document-preview { border: 0; }
    .proposal-document { width: 100%; min-height: 0; margin: 0; box-shadow: none; }
}
