:root {
    color: #252a30;
    background: #f7f8fa;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: #f7f8fa; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.03em; line-height: 1.1; }
h2 { margin-bottom: 8px; font-size: 1.3rem; letter-spacing: -.018em; }
h3 { margin-bottom: 0; font-size: .98rem; }

.site-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 max(24px, 5vw); background: #252a30; color: #fff; }
.brand { color: #fff; font-size: 1.1rem; font-weight: 780; letter-spacing: -.018em; text-decoration: none; }
.brand-title { display: inline; }
.brand-short { display: none; }
.session { display: flex; align-items: center; gap: 20px; white-space: nowrap; }
.session form { margin: 0; }
.session-user { display: inline-flex; align-items: center; gap: 7px; color: #e7e9ec; font-size: .96rem; line-height: 1.2; }
.session-user strong { color: #fff; }
.session-user span { color: #c7ccd2; }
.link-button, .danger-link, .comment-toggle, .delete-item-button, .add-one-button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; text-decoration: none; }
.link-button { color: #fff; font-size: .96rem; font-weight: 740; }
.link-button:hover { color: #f0c4c7; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 72px; }
.request-form-page .page-shell { width: min(1500px, calc(100% - 40px)); padding-bottom: 32px; }
.request-form-page #request-form { padding-bottom: 96px; }
.home-page .page-shell { padding-top: 118px; }
.auth-page .page-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 0; }
.mto-request-detail-page .page-shell { padding-bottom: clamp(480px, 80vh, 680px); }

.eyebrow { margin-bottom: 8px; color: #737b84; font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.muted { color: #69727d; }
.hero-lead { max-width: 650px; margin-bottom: 0; color: #58616c; font-size: 1.05rem; }
.site-messages { margin-bottom: 22px; }
.site-message { padding: 12px 14px; border: 1px solid #cfdbe5; border-left: 4px solid #68839a; border-radius: 8px; background: #fff; color: #43515e; font-size: .88rem; }
.site-message-error { border-color: #e8b8bc; border-left-color: #b31b25; color: #99141d; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 7px; padding: 9px 16px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 750; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.button.primary { background: #b31b25; color: #fff; box-shadow: 0 3px 8px rgba(179, 27, 37, .18); }
.button.primary:hover { background: #95151e; }
.button.secondary { border-color: #d0d5da; background: #fff; color: #3e454d; }
.button.secondary:hover { border-color: #aeb5bc; background: #fbfcfd; }
.button-full { width: 100%; margin-top: 8px; }
.button:disabled { cursor: not-allowed; opacity: .55; }

.home-hero { margin-bottom: 36px; }
.home-hero h1 { max-width: none; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.scenario-card { min-height: 286px; display: flex; flex-direction: column; align-items: flex-start; padding: 28px; border: 1px solid #dce1e6; border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(37, 42, 48, .04); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.scenario-card:hover, .scenario-card:focus-within { border-color: #d9a7aa; box-shadow: 0 12px 27px rgba(37, 42, 48, .08); transform: translateY(-2px); }
.scenario-card h2 { font-size: 1.45rem; }
.scenario-card p:not(.eyebrow) { max-width: 420px; color: #626c77; }
.scenario-card .button { margin-top: auto; }
.scenario-icon, .coming-soon-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 30px; margin-bottom: 23px; padding: 0 10px; border-radius: 5px; background: #252a30; color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .05em; }

.auth-layout { width: min(460px, 100%); }
.auth-card { padding: 36px; border: 1px solid #dce1e6; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(37, 42, 48, .07); }
.auth-card-centered h1 { margin-bottom: 9px; font-size: 1.7rem; }
.auth-card .muted { margin-bottom: 27px; font-size: .9rem; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .button-full { margin-top: 4px; }
.back-link { display: inline-block; margin-top: 26px; color: #626c77; font-size: .85rem; text-decoration: none; }
.back-link:hover { color: #b31b25; }

.app-page-header, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.app-page-header h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.app-page-header .muted { max-width: 680px; margin-bottom: 0; }
.form-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.status-badge { display: inline-flex; align-items: center; min-height: 29px; margin-top: 8px; padding: 4px 10px; border: 1px solid #d8dde2; border-radius: 999px; background: #fff; color: #5b6570; font-size: .76rem; font-weight: 750; }
.form-header-actions .status-badge { margin-top: 0; }
.status-submitted { border-color: #cfd9e3; background: #f3f7fa; color: #455d71; }
.status-needs_correction { border-color: #e8b8bc; background: #fff2f3; color: #99141d; }
.status-accepted { border-color: #b9d8c7; background: #f0f8f3; color: #286142; }
.status-quantity-pending { border-color: #cfd9e3; background: #f3f7fa; color: #455d71; }
.status-quantity-approved { border-color: #b9d8c7; background: #f0f8f3; color: #286142; }
.status-quantity-rejected { border-color: #e8b8bc; background: #fff2f3; color: #99141d; }
.status-quantity-cancelled { border-color: #d8dde2; background: #f4f5f6; color: #626c76; }
.title-with-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.title-with-status h1 { margin-bottom: 0; }
.title-with-status .status-badge { margin-top: 0; }
.request-author { margin: 18px 0 0; color: #5c6670; font-size: .9rem; }
.request-author strong { color: #30373e; font-weight: 780; }
.dashboard-panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 22px; border: 1px solid #dce1e6; border-radius: 11px; background: #fff; box-shadow: 0 7px 18px rgba(37, 42, 48, .035); }
.dashboard-panel h2 { margin-bottom: 3px; }
.dashboard-panel p { margin-bottom: 0; color: #69727d; }
.panel-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: #f0f2f4; color: #252a30; font-size: 1.25rem; }
.text-link { color: #b31b25; font-size: .88rem; font-weight: 750; text-decoration: none; white-space: nowrap; }

.request-list { overflow: hidden; border: 1px solid #dce1e6; border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(37, 42, 48, .035); }
.request-list-head, .request-list-row { display: grid; grid-template-columns: 175px 105px minmax(220px, 1fr) 140px 190px 140px; align-items: center; }
.request-list-head { min-height: 40px; border-bottom: 1px solid #dce1e6; background: #f0f2f4; color: #67717c; font-size: .68rem; font-weight: 820; letter-spacing: .045em; text-transform: uppercase; }
.request-list-head span, .request-list-cell { min-width: 0; padding: 10px 14px; }
.request-list-row { min-height: 66px; border-bottom: 1px solid #e7eaed; color: #535d67; font-size: .86rem; }
.request-list-row:last-child { border-bottom: 0; }
.request-list-number strong { color: #252a30; font-size: .88rem; font-variant-numeric: tabular-nums; }
.request-list-object { overflow: hidden; color: #343b42; text-overflow: ellipsis; white-space: nowrap; }
.request-list-label { display: none; }
.request-list-action { display: flex; justify-content: flex-start; overflow: visible; text-align: left; }
.request-list-action .text-link { display: inline-flex; flex: 0 0 auto; padding: 6px 0; }
.request-list-cell .status-badge { margin: 0; }
.mto-request-list .request-list-head,
.mto-request-list .request-list-row { grid-template-columns: 160px 85px minmax(170px, 1fr) 125px 130px 150px 140px; }
.filter-panel { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr)) auto; gap: 14px; align-items: end; margin-bottom: 20px; padding: 18px; }
.filter-actions { display: flex; gap: 8px; }
.empty-state { display: grid; justify-items: start; max-width: 600px; padding: 30px; }
.empty-state p { color: #69727d; }
.template-import { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -6px 0 26px; padding: 20px 22px; }
.template-import h2 { margin-bottom: 4px; font-size: 1.05rem; }
.template-import .eyebrow { margin-bottom: 5px; }
.template-import .muted { max-width: 620px; margin-bottom: 0; font-size: .85rem; }
.template-import-actions { display: grid; gap: 10px; flex: 0 1 480px; }
.template-upload-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.template-upload-form input[type="file"] { min-width: 0; padding: 7px; font-size: .78rem; }

.correction-notice { margin-bottom: 22px; padding: 20px 22px; border: 1px solid #e8b8bc; border-left: 4px solid #b31b25; border-radius: 9px; background: #fff; }
.correction-notice h2 { margin-bottom: 9px; }
.correction-notice > p:not(.eyebrow):not(.muted) { margin-bottom: 8px; color: #3f464e; }
.correction-notice .muted { margin-bottom: 0; font-size: .86rem; }

.card { border: 1px solid #dce1e6; border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(37, 42, 48, .035); }
.form-section { padding: 26px; }
.section-title { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 22px; padding-bottom: 17px; border-bottom: 1px solid #e6e9ec; }
.section-title h2 { margin-bottom: 0; }
.section-title > p { margin-bottom: 0; color: #747d87; font-size: .84rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.field { min-width: 0; }
.field label, .calculated-field span { display: block; margin-bottom: 6px; color: #414951; font-size: .79rem; font-weight: 760; }
input, select, textarea { width: 100%; border: 1px solid #cbd1d7; border-radius: 6px; padding: 9px 10px; background: #fff; color: #252a30; font: inherit; font-size: .9rem; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: #b31b25; box-shadow: 0 0 0 3px rgba(179, 27, 37, .11); }
textarea { min-height: 68px; resize: vertical; }
.errorlist { padding: 0; margin: 6px 0 0; color: #a1141d; font-size: .79rem; list-style: none; }
.form-error { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #ecc1c4; border-radius: 7px; background: #fff6f6; color: #99141d; font-size: .88rem; }

.items-section { margin-top: 34px; }
.section-heading { align-items: center; margin-bottom: 14px; }
.section-heading h2 { margin-bottom: 3px; }
.section-heading .muted { margin-bottom: 0; font-size: .86rem; }
.bulk-add-control { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid #dce1e6; border-radius: 8px; background: #fff; }
.bulk-add-control label { margin: 0 2px 0 4px; color: #626c76; font-size: .78rem; font-weight: 720; white-space: nowrap; }
.bulk-add-control input { width: 70px; min-height: 36px; padding: 6px 8px; text-align: center; }
.bulk-add-control .button { min-height: 36px; padding: 6px 12px; }
.items-table-wrap { position: relative; }
.items-table { overflow: hidden; border: 1px solid #dce1e6; border-radius: 10px; background: #fff; box-shadow: 0 5px 16px rgba(37, 42, 48, .035); }
.items-table-head, .item-row { display: grid; grid-template-columns: 36px minmax(250px, 2.6fr) minmax(110px, 1fr) 80px 96px 130px 126px minmax(120px, 1fr) minmax(120px, 1fr) 140px; }
.items-table-head { align-items: center; min-height: 38px; border-bottom: 1px solid #dce1e6; background: #f0f2f4; color: #67717c; font-size: .68rem; font-weight: 820; letter-spacing: .045em; text-transform: uppercase; }
.items-table-head span { min-width: 0; padding: 8px 7px; }
.items-table-head .numeric-head { text-align: left; }
.item-row { position: relative; align-items: start; border-bottom: 1px solid #e4e7ea; }
.item-row:last-child { border-bottom: 0; }
.item-cell { min-width: 0; padding: 9px 7px; }
.item-cell input, .item-cell select { min-height: 35px; padding: 6px 7px; font-size: .82rem; }
.item-number { display: grid; min-height: 35px; place-items: center; color: #646e78; font-size: .8rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.item-name input { font-weight: 650; }
.item-cell .mobile-cell-label { display: none; }
.calculated-field { display: grid; align-content: center; justify-content: start; min-height: 53px; overflow: hidden; color: #68717b; font-size: .75rem; font-variant-numeric: tabular-nums; text-align: left; }
.calculated-field strong { max-width: 100%; overflow: hidden; color: #505963; font-size: .8rem; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.item-actions { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 6px; min-height: 53px; }
.comment-toggle, .danger-link { width: max-content; color: #626c76; font-size: .76rem; font-weight: 720; }
.comment-toggle:hover { color: #b31b25; }
.danger-link:hover { color: #252a30; text-decoration: underline; }
.delete-item-button { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; color: #747d87; }
.delete-item-button svg { width: 19px; height: 19px; }
.delete-item-button:hover { border-color: #e1b9bc; background: #fff5f5; color: #a1141d; }
.delete-item-button:focus-visible { outline: 2px solid #b31b25; outline-offset: 2px; }
.item-comment-row { display: none; grid-column: 1 / -1; padding: 10px 12px 12px 43px; border-top: 1px solid #eceef0; background: #fbfcfd; }
.item-comment-row.is-expanded { display: block; }
.item-comment-row textarea { min-height: 48px; padding: 7px 9px; font-size: .84rem; }
.delete-field, .is-deleted { display: none; }
.add-one-row { display: flex; justify-content: center; margin-top: -1px; }
.add-one-button { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid #cfd5db; border-radius: 0 0 7px 7px; background: #fff; color: #4e5862; font-size: .8rem; font-weight: 750; box-shadow: 0 4px 9px rgba(37, 42, 48, .05); }
.add-one-button span { color: #b31b25; font-size: 1rem; line-height: 1; }
.add-one-button:hover { border-color: #aeb5bc; }
.add-one-button:disabled { cursor: not-allowed; opacity: .55; }

.form-actions { position: fixed; left: 50%; bottom: 12px; z-index: 20; width: min(1500px, calc(100% - 40px)); display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin: 0; padding: 11px; border: 1px solid #dce1e6; border-radius: 9px; background: rgba(255, 255, 255, .97); box-shadow: 0 8px 22px rgba(37, 42, 48, .1); transform: translateX(-50%); }
.action-hint { margin: 0 auto 0 2px; color: #737c86; font-size: .79rem; }

.success-card, .coming-soon-card { width: min(630px, 100%); margin: 5vh auto; padding: 42px; border: 1px solid #dce1e6; border-radius: 14px; background: #fff; box-shadow: 0 13px 30px rgba(37, 42, 48, .06); text-align: center; }
.success-mark { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 19px; border-radius: 50%; background: #f0f2f4; color: #252a30; font-size: 1.7rem; font-weight: 800; }
.request-number { margin: 18px 0; color: #252a30; font-size: clamp(1.5rem, 5vw, 2.35rem); font-weight: 850; letter-spacing: .03em; }
.coming-soon-card { text-align: left; }
.coming-soon-card .muted { max-width: 520px; margin-bottom: 27px; }
.coming-soon-icon { margin-bottom: 20px; background: #252a30; }
.access-icon { background: #6c737b; }
.access-card { width: min(540px, 100%); }

.request-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 28px; padding: 26px; }
.request-summary div { min-width: 0; }
.request-summary span { display: block; margin-bottom: 4px; color: #737c86; font-size: .73rem; font-weight: 750; }
.request-summary strong { display: block; color: #333a41; font-size: .9rem; overflow-wrap: anywhere; }
.request-summary .summary-wide { grid-column: 1 / -1; }
.request-view-items { margin-top: 30px; }
.view-items-table { overflow: hidden; border: 1px solid #dce1e6; border-radius: 10px; background: #fff; }
.view-items-head, .view-item-row { display: grid; grid-template-columns: 38px minmax(190px, 2fr) minmax(110px, 1fr) 54px 110px 120px 95px 110px 110px 110px; }
.view-items-head { padding: 9px 0; border-bottom: 1px solid #dce1e6; background: #f0f2f4; color: #67717c; font-size: .68rem; font-weight: 820; text-transform: uppercase; }
.view-items-head span, .view-item-row > span, .view-item-row > strong { min-width: 0; padding: 7px 8px; }
.view-item-row { align-items: start; border-bottom: 1px solid #e7eaed; color: #59636e; font-size: .82rem; font-variant-numeric: tabular-nums; }
.view-item-row:last-child { border-bottom: 0; }
.view-item-row > strong { color: #343b42; }
.money-value { overflow-wrap: anywhere; }
.view-item-comment { grid-column: 1 / -1; margin: 0; padding: 8px 12px 10px 46px; border-top: 1px solid #eceef0; background: #fbfcfd; }
.manager-actions { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 18px 24px; align-items: start; margin-bottom: 24px; padding: 22px; }
.manager-actions p { margin-bottom: 0; }
.manager-actions > form:not(.correction-form) { align-self: center; }
.correction-form { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding-top: 18px; border-top: 1px solid #e6e9ec; }
.quantity-change-requests { padding: 16px 22px; border-top: 1px solid #e5e8eb; background: #fcfcfd; }
.quantity-change-requests h4 { margin: 0 0 10px; color: #4d5761; font-size: .8rem; }
.quantity-change-request { padding: 12px 14px; border: 1px solid #e1e5e8; border-radius: 8px; background: #fff; }
.quantity-change-request + .quantity-change-request { margin-top: 9px; }
.quantity-change-request.is-pending { border-color: #cfd9e3; }
.quantity-change-request-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 11px; }
.quantity-change-request-info strong { color: #343b42; font-size: .88rem; }
.quantity-change-request-info .status-badge { margin: 0; }
.quantity-change-request > p { margin: 9px 0 0; color: #59636d; font-size: .8rem; }
.quantity-manager-comment { color: #4d5963; }
.quantity-change-actions { display: grid; grid-template-columns: auto minmax(230px, 1fr); gap: 12px; align-items: end; margin-top: 12px; }
.quantity-change-actions form { margin: 0; }
.quantity-change-actions form:last-child { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.quantity-change-actions textarea { min-height: 42px; font-size: .8rem; }
.pto-quantity-change { grid-column: 1 / -1; margin: 7px 8px 0; padding: 13px 14px; border: 1px solid #dce1e6; border-radius: 8px; background: #fafbfc; }
.pto-quantity-change-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.pto-quantity-change-header strong { color: #3c454e; font-size: .8rem; }
.pto-quantity-change-header .muted { font-size: .75rem; }
.pto-quantity-request-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; color: #56616c; font-size: .8rem; }
.pto-quantity-request-status .status-badge { margin: 0; }
.pto-quantity-form { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr) auto; gap: 10px; align-items: end; }
.pto-quantity-form .field label { font-size: .72rem; }
.pto-quantity-form input, .pto-quantity-form textarea { min-height: 38px; padding: 7px 8px; font-size: .82rem; }
.pto-quantity-form textarea { min-height: 38px; }
.procurement-items { display: grid; gap: 18px; }
.procurement-item { overflow: hidden; }
.procurement-item-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid #e5e8eb; }
.procurement-item-header h3 { margin-bottom: 5px; font-size: 1.05rem; }
.procurement-item-header .muted { margin-bottom: 0; font-size: .82rem; }
.selected-option-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 44px; padding: 10px 22px; background: #f7f8f9; color: #59636d; font-size: .82rem; }
.selection-mark { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 999px; background: #eaf5ee; color: #286142; font-size: .72rem; font-weight: 780; }
.procurement-option-list { border-top: 1px solid #e5e8eb; }
.procurement-option { padding: 17px 22px; border-bottom: 1px solid #e5e8eb; }
.procurement-option:last-child { border-bottom: 0; }
.procurement-option.is-selected { border-left: 3px solid #438360; background: #fbfdfb; }
.procurement-option-main { display: grid; grid-template-columns: 1.1fr 1.5fr .7fr repeat(3, 1fr) .8fr; gap: 12px; }
.procurement-option-main div { min-width: 0; }
.procurement-option-main span { display: block; margin-bottom: 4px; color: #737c86; font-size: .66rem; font-weight: 760; text-transform: uppercase; }
.procurement-option-main strong { display: block; overflow-wrap: anywhere; color: #343b42; font-size: .8rem; }
.internal-comment { margin: 13px 0 0; padding: 10px 12px; border-radius: 7px; background: #f4f5f6; color: #555f69; font-size: .8rem; }
.option-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 13px; }
.option-actions form { margin: 0; }
.action-button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.procurement-empty { margin: 0; padding: 18px 22px; color: #737c86; font-size: .84rem; }
.option-form { overflow: hidden; }
.option-form-section { padding: 24px 26px; border-bottom: 1px solid #e6e9ec; }
.option-form-section .section-title { margin-bottom: 18px; }
.option-supplier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-help { margin: 6px 0 0; color: #737c86; font-size: .76rem; }
.option-form-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 26px; background: #fafbfc; }

@media (prefers-reduced-motion: reduce) {
    .scenario-card { transition: none; }
    .scenario-card:hover, .scenario-card:focus-within { transform: none; }
}

@media (min-width: 1280px) {
    .home-hero h1, .home-hero .hero-lead { max-width: none; white-space: nowrap; }
}

@media (max-width: 1024px) {
    .request-list { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .request-list-head { display: none; }
    .request-list-row,
    .mto-request-list .request-list-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-bottom: 12px; padding: 8px; border: 1px solid #dce1e6; border-radius: 9px; background: #fff; }
    .request-list-row:last-child { border-bottom: 1px solid #dce1e6; }
    .request-list-cell { padding: 8px; }
    .request-list-label { display: block; margin-bottom: 3px; color: #7a838d; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
    .request-list-number, .request-list-object, .request-list-action { grid-column: 1 / -1; }
    .request-list-object { white-space: normal; }
    .request-list-action { justify-content: flex-start; text-align: left; }
    .filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-search, .filter-actions { grid-column: 1 / -1; }
    .home-page .page-shell { padding-top: 88px; }
    .template-import { align-items: flex-start; flex-direction: column; }
    .template-import-actions { width: 100%; max-width: 560px; flex: 0 1 auto; }
}

@media (max-width: 850px) {
    .page-shell { width: min(100% - 36px, 720px); padding-top: 38px; }
    .home-page .page-shell { padding-top: 58px; }
    .scenario-grid { grid-template-columns: 1fr; }
    .scenario-card { min-height: 250px; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-3 { grid-column: span 2; }
    .procurement-option-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1239px) {
    .items-table { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .items-table-head { display: none; }
    .item-row { display: block; margin-bottom: 12px; border: 1px solid #dce1e6; border-radius: 9px; background: #fff; box-shadow: 0 4px 12px rgba(37, 42, 48, .035); }
    .item-row:last-child { border-bottom: 1px solid #dce1e6; }
    .item-cell { padding: 10px 12px; border-top: 1px solid #eceef0; }
    .item-number { display: flex; align-items: center; gap: 7px; min-height: 0; padding: 9px 12px; border-top: 0; background: #f5f6f7; color: #5d6670; }
    .item-cell .mobile-cell-label { display: block; margin-bottom: 5px; color: #737c86; font-size: .69rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
    .item-number .mobile-cell-label { margin: 0; }
    .item-cell input, .item-cell select { min-height: 39px; padding: 8px 9px; font-size: .88rem; }
    .calculated-field { display: flex; align-items: baseline; justify-content: flex-start; gap: 14px; min-height: 0; }
    .calculated-field .mobile-cell-label { margin: 0; }
    .calculated-field strong { font-size: .88rem; }
    .item-actions { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; min-height: 0; }
    .comment-toggle, .danger-link { font-size: .83rem; }
    .item-comment-row { padding: 11px 12px 12px; border-top: 1px solid #eceef0; border-radius: 0 0 8px 8px; }
    .view-items-head { display: none; }
    .view-item-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
    .view-item-row > span, .view-item-row > strong { padding: 7px 8px; }
    .view-item-row > span::before, .view-item-row > strong::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #7a838d; font-size: .66rem; font-weight: 800; text-transform: uppercase; }
    .view-item-comment { grid-column: 1 / -1; padding: 9px 8px 3px; border-top: 1px solid #eceef0; }
}

@media (max-width: 640px) {
    .site-header { min-height: 58px; gap: 12px; padding: 0 16px; }
    .brand-title { display: none; }
    .brand-short { display: inline; font-size: .94rem; }
    .session { gap: 12px; }
    .session-user { gap: 5px; font-size: .85rem; }
    .session-user > span[aria-hidden], .session-user > span:last-child { display: none; }
    .link-button { font-size: .85rem; }
    .page-shell { width: calc(100% - 28px); padding-top: 28px; padding-bottom: 46px; }
    h1 { font-size: 1.95rem; }
    .home-hero { margin-bottom: 28px; }
    .scenario-card, .auth-card, .form-section, .success-card, .coming-soon-card { padding: 21px; }
    .form-grid { grid-template-columns: 1fr; gap: 15px; }
    .span-2, .span-3 { grid-column: span 1; }
    .app-page-header, .section-heading, .section-title { flex-direction: column; gap: 11px; }
    .form-header-actions { width: 100%; justify-content: space-between; }
    .section-title { align-items: flex-start; }
    .dashboard-panel { grid-template-columns: auto minmax(0, 1fr); }
    .dashboard-panel .text-link { grid-column: 1 / -1; }
    .form-actions { position: static; flex-direction: column; align-items: stretch; margin-top: 20px; }
    .form-actions .button { width: 100%; }
    .action-hint { margin: 0 0 3px; text-align: center; }
    .auth-page .page-shell { min-height: calc(100vh - 58px); padding-top: 28px; padding-bottom: 28px; }
    .mto-request-detail-page .page-shell { padding-bottom: max(260px, 50vh); }
    .request-form-page .page-shell { width: calc(100% - 28px); padding-bottom: 46px; }
    .request-form-page #request-form { padding-bottom: 0; }
    .template-import { margin-top: 0; padding: 18px; }
    .template-import-actions, .template-upload-form { grid-template-columns: 1fr; }
    .template-import .button { width: 100%; }
    .bulk-add-control { width: 100%; justify-content: flex-end; }
    .bulk-add-control label { margin-right: auto; }
    .request-summary { grid-template-columns: 1fr; padding: 21px; }
    .request-summary .summary-wide { grid-column: auto; }
    .view-item-row { grid-template-columns: 1fr; }
    .view-item-comment { grid-column: auto; }
    .filter-panel { grid-template-columns: 1fr; }
    .filter-search, .filter-actions { grid-column: auto; }
    .filter-actions { flex-direction: column; }
    .manager-actions { grid-template-columns: 1fr; }
    .manager-actions > form:not(.correction-form) { width: 100%; }
    .manager-actions > form:not(.correction-form) .button { width: 100%; }
    .correction-form { grid-column: auto; grid-template-columns: 1fr; }
    .correction-form .button { width: 100%; }
    .quantity-change-requests { padding-left: 18px; padding-right: 18px; }
    .quantity-change-actions { grid-template-columns: 1fr; }
    .quantity-change-actions form:last-child { grid-template-columns: 1fr; }
    .quantity-change-actions .button { width: 100%; }
    .pto-quantity-change { margin-left: 0; margin-right: 0; }
    .pto-quantity-form { grid-template-columns: 1fr; }
    .pto-quantity-form .button { width: 100%; }
    .procurement-item-header { flex-direction: column; align-items: stretch; padding: 18px; }
    .procurement-item-header .button { width: 100%; }
    .selected-option-summary, .procurement-option, .procurement-empty { padding-left: 18px; padding-right: 18px; }
    .procurement-option-main, .option-supplier-grid { grid-template-columns: 1fr; }
    .option-form-section { padding: 20px; }
    .option-form-actions { flex-direction: column; padding: 14px 20px; }
    .option-form-actions .button { width: 100%; }
}
