:root {
    --page: #fbfaf8;
    --surface: #ffffff;
    --cream: #eee7db;
    --cream-light: #f6f2eb;
    --sand: #ddcbb0;
    --sand-hover: #cfb895;
    --ink: #292720;
    --muted: #6b655b;
    --line: #e8e1d6;
    --green: #365c44;
    --green-bg: #eaf1e9;
    --amber: #795413;
    --amber-bg: #fbf0d8;
    --red: #973f34;
    --red-bg: #faece7;
    --radius: 22px;
    --shadow: 0 8px 32px rgb(55 44 27 / 4%);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--page);
    --bs-border-color: var(--line);
    --bs-primary: #755c3a;
    --bs-link-color: #705637;
    --bs-link-hover-color: #45351f;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--page); line-height: 1.6; }
h1, h2, h3, h4, h5 { color: var(--ink); letter-spacing: -.035em; font-weight: 600; }
h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.2; }
h2 { font-size: 1.3rem; } h3 { font-size: 1.06rem; }
a { color: var(--bs-link-color); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #8a6b43; outline-offset: 4px; }
p, dd, li, .text-break { overflow-wrap: anywhere; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.app-container { max-width: 1320px; }
.main-content { flex: 1; padding-top: 40px; padding-bottom: 64px; }
.main-content:focus { outline: none; }
.site-header { background: rgb(251 250 248 / 97%); border-bottom: 1px solid var(--line); }
.navbar { min-height: 92px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); margin-right: 30px; white-space: normal; }
.brand:hover { color: var(--ink); }
.brand strong { display: block; font-size: 1rem; letter-spacing: -.025em; }
.brand small { display: block; font-size: .72rem; font-weight: 400; color: var(--muted); margin-top: 3px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--cream); color: #7e684c; }
.brand-mark .icon { width: 26px; height: 26px; }
.navbar-nav { gap: 6px; }
.navbar .nav-link { display: flex; align-items: center; gap: 8px; padding: 11px 16px !important; border-radius: 12px; color: var(--muted); font-size: .9rem; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--ink); background: var(--cream); }
.navbar-toggler { border-color: var(--line); border-radius: 12px; padding: 8px; }
.header-note { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.site-footer { border-top: 1px solid var(--line); padding: 23px 0; font-size: .76rem; color: var(--muted); }
.footer-content { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.footer-caption { color: #827768; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 1000; padding: 12px 18px; background: var(--ink); color: white; border-radius: 10px; }
.skip-link:focus { top: 10px; color: white; }
.eyebrow { display: block; color: #847256; font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 9px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading h1 { margin: 0 0 9px; }
.page-heading p { margin: 0; color: var(--muted); max-width: 660px; font-size: .95rem; }
.page-heading .btn { flex-shrink: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.section-heading h2, .section-heading h3 { margin: 0; }
.section-heading .section-caption { color: var(--muted); font-size: .8rem; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 28px; }
.content-stack { display: grid; gap: 28px; min-width: 0; }
.summary-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: sticky; top: 24px; min-width: 0; }
.summary-panel h2 { margin-bottom: 22px; }
.summary-row { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 15px; font-size: .88rem; }
.summary-row > span { color: var(--muted); }
.summary-row strong { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.summary-total { border-top: 1px solid var(--line); padding-top: 19px; margin-top: 20px; font-size: 1rem; }
.summary-note { font-size: .8rem; color: var(--muted); margin: 18px 0 0; }
.summary-panel .btn { width: 100%; margin-top: 18px; }
.summary-panel .btn + .btn { margin-top: 10px; }
.summary-list { padding-left: 18px; font-size: .85rem; color: var(--muted); margin-bottom: 0; }
.summary-list li { margin: 8px 0; }
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel { padding: 28px; }
.card-body { padding: 26px; }
.muted { color: var(--muted); }
.form-label, label:not(.checkbox-label):not(.choice-chip) { font-size: .83rem; font-weight: 500; margin-bottom: 7px; }
.form-control, .form-select { min-height: 46px; border: 1px solid #dcd2c2; border-radius: 11px; background-color: #fffdf9; color: var(--ink); padding: 10px 13px; font-size: .93rem; }
.form-control::placeholder { color: #8b8274; }
.form-control:focus, .form-select:focus { color: var(--ink); border-color: #9a7e59; background-color: white; box-shadow: 0 0 0 3px rgb(154 126 89 / 15%); }
textarea.form-control { min-height: 94px; resize: vertical; }
.field-hint { color: var(--muted); font-size: .78rem; margin: 8px 0 0; }
.form-check-input { border-color: #af9d83; width: 1.08em; height: 1.08em; flex: 0 0 auto; }
.form-check-input:checked { background-color: #806949; border-color: #806949; }
.form-check-input:focus { border-color: #806949; box-shadow: 0 0 0 3px rgb(128 105 73 / 18%); }
.checkbox-label { display: inline-flex; align-items: center; gap: 9px; font-size: .84rem; margin-bottom: 0; }
.choice-chip { display: inline-flex; align-items: center; gap: 9px; background: var(--cream-light); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; font-size: .84rem; font-weight: 400; }
.choice-chip .form-check-input, .checkbox-label .form-check-input { margin-top: 0; }
.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { --bs-btn-focus-shadow-rgb: 128, 105, 73; display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px; padding: 10px 18px; border-radius: 11px; font-size: .86rem; font-weight: 500; line-height: 1.4; transition: background-color .16s, border-color .16s, color .16s; }
.btn-primary { --bs-btn-color: #30271c; --bs-btn-bg: var(--sand); --bs-btn-border-color: var(--sand); --bs-btn-hover-color: #30271c; --bs-btn-hover-bg: var(--sand-hover); --bs-btn-hover-border-color: var(--sand-hover); --bs-btn-active-color: #30271c; --bs-btn-active-bg: var(--sand-hover); --bs-btn-active-border-color: var(--sand-hover); --bs-btn-disabled-bg: var(--sand); --bs-btn-disabled-border-color: var(--sand); }
.btn-outline-primary, .btn-outline-secondary { --bs-btn-color: #5d503e; --bs-btn-border-color: #d6c7b0; --bs-btn-hover-color: #30271c; --bs-btn-hover-bg: var(--cream); --bs-btn-hover-border-color: #d6c7b0; --bs-btn-active-color: #30271c; --bs-btn-active-bg: var(--cream); --bs-btn-active-border-color: #d6c7b0; }
.btn-success { --bs-btn-color: #fff; --bs-btn-bg: var(--green); --bs-btn-border-color: var(--green); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #294a34; --bs-btn-hover-border-color: #294a34; }
.btn-outline-danger { --bs-btn-color: var(--red); --bs-btn-border-color: #e3c2b9; --bs-btn-hover-color: var(--red); --bs-btn-hover-bg: var(--red-bg); --bs-btn-hover-border-color: #d7a79a; }
.btn-outline-warning { --bs-btn-color: var(--amber); --bs-btn-border-color: #dfcca0; --bs-btn-hover-color: #63400a; --bs-btn-hover-bg: var(--amber-bg); --bs-btn-hover-border-color: #c2a867; }
.btn-quiet { color: var(--muted); border-color: transparent; background: transparent; }
.btn-quiet:hover { color: var(--ink); background: var(--cream-light); }
.button-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-icon { min-width: 43px; padding: 9px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; font-size: .73rem; font-weight: 500; line-height: 1.4; background: var(--cream-light); color: #6b5940; border: 1px solid var(--line); }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-success { color: var(--green); background: var(--green-bg); border-color: #d8e5d6; }
.status-warning { color: var(--amber); background: var(--amber-bg); border-color: #ead9af; }
.status-danger { color: var(--red); background: var(--red-bg); border-color: #efd7ce; }
.filter-panel { padding: 22px 26px; margin-bottom: 28px; }
.filter-form { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) minmax(140px, 1fr) auto; gap: 16px; align-items: end; }
.search-form { display: flex; align-items: end; gap: 12px; }
.search-form .search-field { flex: 1; }
.material-list, .request-list { display: grid; gap: 18px; }
.material-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); border-radius: var(--radius); overflow: hidden; background: var(--cream); min-width: 0; }
.material-visual { display: grid; place-items: center; background: #f7f6f2; padding: 24px; color: #9b8768; }
.material-visual .icon { height: 42px; width: 42px; stroke-width: 1.2; }
.material-content { padding: 23px 25px; min-width: 0; }
.material-content h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.material-description { font-size: .81rem; color: var(--muted); }
.material-top { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.material-top > div { min-width: 0; }
.material-fields { display: grid; grid-template-columns: minmax(0, 1fr) 155px 145px; gap: 18px; align-items: start; }
.material-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 16px; }
.material-actions .btn { min-height: 36px; padding: 5px 8px; }
.material-counts { display: flex; gap: 14px 28px; flex-wrap: wrap; margin-top: 19px; }
.material-counts > div { min-width: 75px; }
.material-counts span { display: block; font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.material-counts strong { font-size: 1rem; font-weight: 500; }
.quantity-control { display: inline-flex; align-items: center; gap: 8px; min-height: 43px; }
.quantity-control input { width: 58px; min-width: 0; background: transparent; border: 1px solid transparent; border-radius: 7px; text-align: center; padding: 6px 2px; color: var(--ink); appearance: textfield; }
.quantity-control input:focus { background: #fffdf9; border-color: #a68c67; outline: 2px solid #a68c67; outline-offset: 1px; }
.quantity-control input::-webkit-inner-spin-button, .quantity-control input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.quantity-button { width: 32px; height: 32px; border: none; border-radius: 6px; background: #e1d3bc; color: #65543c; display: grid; place-items: center; padding: 6px; }
.quantity-button:hover { background: #d4c09e; }
.quantity-button:disabled { opacity: .45; cursor: default; }
.quantity-button .icon { width: 17px; height: 17px; }
.request-card { display: grid; grid-template-columns: 100px minmax(0, 1fr); border-radius: var(--radius); background: var(--cream); overflow: hidden; }
.request-card-body { padding: 24px; min-width: 0; }
.request-card h2 { font-size: 1.08rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.request-folio { color: #827154; font-size: .72rem; letter-spacing: .06em; margin-bottom: 7px; display: block; }
.request-meta { display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: .79rem; color: var(--muted); margin-top: 16px; }
.request-meta span { display: inline-flex; gap: 6px; align-items: center; }
.request-meta .icon { width: 16px; height: 16px; }
.request-states { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.request-card .card-link { text-decoration: none; color: var(--ink); }
.request-card .card-link:hover { text-decoration: underline; }
.request-card .btn { min-height: 35px; padding: 7px 10px; font-size: .78rem; }
.pagination-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 24px; font-size: .83rem; color: var(--muted); }
.pagination-actions { display: flex; gap: 10px; }
.empty-state { border: 1px dashed #d6c9b5; border-radius: var(--radius); padding: 48px 24px; text-align: center; background: var(--cream-light); }
.empty-state .icon { width: 38px; height: 38px; color: #9c8663; margin-bottom: 15px; }
.empty-state h2 { font-size: 1.2rem; }
.empty-state p { font-size: .87rem; color: var(--muted); margin: 0; }
.details-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin-bottom: 0; }
.details-meta dt { color: var(--muted); font-size: .76rem; font-weight: 400; margin-bottom: 5px; }
.details-meta dd { font-size: .9rem; margin: 0; }
.details-meta .full-width { grid-column: 1 / -1; }
.progress-track { list-style: none; padding: 0; display: flex; gap: 14px; margin: 0 0 28px; }
.progress-track li { display: flex; align-items: center; gap: 9px; font-size: .8rem; color: var(--muted); flex: 1; }
.progress-track .step-marker { display: grid; place-items: center; height: 32px; width: 32px; border-radius: 50%; border: 1px solid #d8cdbb; flex: 0 0 auto; font-size: .78rem; }
.progress-track .done .step-marker { background: var(--cream); color: #655139; border-color: #d8cdbb; }
.progress-track .done { color: var(--ink); }
.operation-section { scroll-margin-top: 20px; }
.operation-section > p { color: var(--muted); font-size: .88rem; }
.operation-note { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .8rem; margin: 18px 0; }
.disclosure { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.disclosure summary { font-weight: 500; font-size: .86rem; cursor: pointer; color: #6d593c; padding: 5px 0; }
.disclosure > form, .disclosure > div { margin-top: 16px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 26px; border-left: 1px solid #dfd3c1; margin-left: 6px; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #c8b391; border: 2px solid var(--page); }
.timeline time, .timeline .event-meta { display: block; color: var(--muted); font-size: .74rem; margin-bottom: 4px; }
.timeline p { font-size: .85rem; margin: 5px 0 0; }
.history-record { background: var(--cream-light); border-radius: 14px; padding: 20px; margin-bottom: 14px; }
.history-record:last-child { margin-bottom: 0; }
.history-record h3 { margin-bottom: 6px; }
.history-record .event-meta { color: var(--muted); font-size: .76rem; }
.history-items { list-style: none; padding: 0; margin: 16px 0 0; }
.history-items li { padding: 10px 0; border-top: 1px solid var(--line); font-size: .84rem; }
.history-items small { display: block; color: var(--muted); margin-top: 4px; }
.account-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); background: var(--cream); border-radius: var(--radius); overflow: hidden; }
.account-card-body { padding: 24px; min-width: 0; }
.account-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.account-header h2 { font-size: 1.04rem; margin-bottom: 4px; overflow-wrap: anywhere; }
.account-header p { font-size: .8rem; color: var(--muted); margin: 0; }
.account-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.account-options { display: flex; flex-wrap: wrap; gap: 14px; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 1020px; margin: 24px auto; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.auth-story { background: var(--cream); padding: 54px 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-story h2 { font-size: 2rem; line-height: 1.25; max-width: 350px; }
.auth-story p { font-size: .9rem; color: #6c604f; }
.auth-illustration { display: flex; justify-content: center; gap: 14px; align-items: center; padding: 28px 0; }
.illustration-tile { width: 88px; height: 102px; border-radius: 20px; background: #f8f4ec; display: grid; place-items: center; color: #9a815d; transform: rotate(-8deg); }
.illustration-tile:nth-child(2) { height: 128px; width: 108px; background: #dfcdae; transform: rotate(4deg); }
.illustration-tile:nth-child(3) { transform: rotate(-3deg); }
.illustration-tile .icon { width: 42px; height: 42px; stroke-width: 1.2; }
.auth-form { padding: 54px 44px; }
.auth-form h1 { font-size: 1.9rem; }
.auth-form .intro { color: var(--muted); font-size: .88rem; margin: 12px 0 28px; }
.auth-form .btn-primary { width: 100%; margin-top: 8px; }
.auth-footer { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 28px; font-size: .78rem; color: var(--muted); }
.security-card { max-width: 760px; margin: 0 auto; }
.security-card .security-header { display: flex; gap: 18px; align-items: start; margin-bottom: 28px; }
.security-icon { display: grid; place-items: center; width: 58px; height: 58px; background: var(--cream); border-radius: 18px; flex-shrink: 0; color: #826b4a; }
.security-icon .icon { height: 27px; width: 27px; }
.alert { border-radius: 14px; border: 1px solid; padding: 16px 20px; font-size: .88rem; overflow-wrap: anywhere; }
.alert-success { color: var(--green); background: var(--green-bg); border-color: #d6e3d3; }
.alert-warning { color: var(--amber); background: var(--amber-bg); border-color: #ead9af; }
.alert-danger { color: var(--red); background: var(--red-bg); border-color: #efd7ce; }
.text-danger { color: var(--red) !important; }
.validation-summary-errors { color: var(--red); background: var(--red-bg); border: 1px solid #efd7ce; border-radius: 12px; padding: 15px 20px; margin-bottom: 22px; font-size: .85rem; }
.validation-summary-errors ul { margin-bottom: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.field-validation-error { font-size: .78rem; display: block; margin-top: 5px; }
code { color: #6e4630; overflow-wrap: anywhere; }
hr { border-color: var(--line); opacity: 1; margin: 24px 0; }

@media (max-width: 1100px) {
    .content-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; }
    .material-card { grid-template-columns: 76px minmax(0, 1fr); }
    .material-visual { padding: 16px; }
    .material-fields { grid-template-columns: minmax(0, 1fr) 145px; }
    .material-fields .unit-field { grid-column: 1 / -1; max-width: 240px; }
    .summary-panel { padding: 23px; }
}
@media (max-width: 991px) {
    .filter-form { grid-template-columns: 1fr 1fr; }
    .navbar-collapse { padding-top: 16px; }
    .navbar-collapse > form { margin-top: 12px; }
    .content-grid { grid-template-columns: minmax(0, 1fr); }
    .summary-panel { position: static; }
    .summary-panel.summary-first { grid-row: 1; }
}
@media (max-width: 767px) {
    .navbar { min-height: 78px; }
    .brand { margin-right: 0; }
    .navbar-collapse { padding-top: 16px; }
    .navbar-collapse > form { margin-top: 12px; }
    .header-note { display: none; }
    .main-content { padding-top: 26px; padding-bottom: 40px; }
    .page-heading { align-items: start; flex-direction: column; gap: 18px; margin-bottom: 24px; }
    .page-heading .btn { width: 100%; }
    .content-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .summary-panel { position: static; }
    .summary-panel.summary-first { grid-row: 1; }
    .filter-form { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .filter-form .btn { width: 100%; }
    .panel, .card-body { padding: 21px; }
    .filter-panel { padding: 20px; }
    .request-card { grid-template-columns: 64px minmax(0, 1fr); }
    .request-card-body { padding: 20px 17px; }
    .request-card .material-visual .icon { width: 29px; height: 29px; }
    .material-top { flex-wrap: wrap; gap: 12px; }
    .material-visual .icon { width: 33px; height: 33px; }
    .quantity-button { width: 44px; height: 44px; }
    .details-meta { grid-template-columns: minmax(0, 1fr); }
    .auth-layout { grid-template-columns: minmax(0, 1fr); margin-top: 0; }
    .auth-story { padding: 28px; gap: 0; }
    .auth-story h2 { font-size: 1.5rem; max-width: none; }
    .auth-story .auth-illustration, .auth-story .story-footnote { display: none; }
    .auth-form { padding: 30px 28px; }
    .account-card { grid-template-columns: 60px minmax(0, 1fr); }
    .account-card-body { padding: 20px 17px; }
    .account-header { flex-direction: column; }
    .account-controls .btn { width: 100%; }
    .progress-track { gap: 9px; }
    .progress-track li { font-size: .71rem; gap: 6px; }
    .progress-track .step-marker { height: 27px; width: 27px; }
    .footer-caption { display: none; }
}
@media (max-width: 480px) {
    .material-card { grid-template-columns: 52px minmax(0, 1fr); }
    .material-visual { padding: 10px; }
    .material-visual .icon { width: 28px; height: 28px; }
    .material-content { padding: 19px 16px; }
    .material-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .material-fields .unit-field { grid-column: auto; max-width: none; }
    .material-counts { gap: 10px 16px; }
    .material-counts > div { min-width: 60px; }
    .summary-panel { padding: 22px; }
    .search-form { flex-wrap: wrap; }
    .search-form .search-field { flex-basis: 100%; }
    .search-form .btn { width: 100%; }
    .security-card .security-header { flex-direction: column; }
    .button-row .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
