:root {
  color-scheme: light;
  --forest: #245b3b;
  --forest-deep: #173f2c;
  --leaf: #799951;
  --teal: #327b80;
  --ink: #293a30;
  --muted: #687369;
  --paper: #fffefa;
  --canvas: #f4f5ed;
  --line: #e0e5d9;
  --soft-green: #edf2e4;
  --shadow: 0 8px 28px rgba(43, 65, 33, .045), 0 1px 3px rgba(43, 65, 33, .025);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", serif;
  --gutter: clamp(18px, 3vw, 48px);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-width: 320px; margin: 0; color: var(--ink); font: 14px/1.6 var(--font); }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; transition: background .18s, border-color .18s, box-shadow .18s; }
button:disabled { cursor: not-allowed; opacity: .48; }
[hidden] { display: none !important; }
h1, h2, h3, p { overflow-wrap: anywhere; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #8eae6e; outline-offset: 3px; }
input, select, textarea { min-width: 0; accent-color: var(--forest); }
input:not([type="checkbox"]), select, textarea { border: 1px solid #d7dfd2; border-radius: 9px; background: #fffefa; padding: 0 12px; }
input:not([type="checkbox"]), select { min-height: 42px; }
input::placeholder, textarea::placeholder { color: #808b80; }
input:disabled, select:disabled { color: #687369; background: #f3f5ef; }
button .icon { flex: 0 0 auto; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.overline { margin: 0 0 8px; color: var(--forest); font-size: 11px; font-weight: 600; letter-spacing: .16em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The same ivory, leaf and forest palette as the original login illustration. */
.brand-symbol, .brand-stamp { display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; }
.brand-symbol { width: 66px; height: 66px; }
.brand-logo { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.brand-lockup { display: flex; align-items: center; gap: 12px; color: var(--forest-deep); }
.brand-lockup b { display: block; font-family: "STKaiti", "Kaiti SC", serif; font-size: 42px; line-height: 1.15; letter-spacing: .1em; }
.brand-lockup small, .brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .15em; }

/* Real text and controls keep the login usable at every viewport and zoom. */
.login-view { position: relative; min-height: 100svh; background: var(--paper); }
.login-view--welcome { display: grid; grid-template-columns: 51% 49%; }
.login-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(28px, 5.8vw, 112px); }
.login-content > .brand-lockup { margin-bottom: 32px; }
.login-card { position: relative; width: 100%; padding: 32px 36px 22px; border: 1px solid #e5e8dd; border-radius: 24px; background: rgba(255, 255, 253, .97); box-shadow: 0 16px 44px #31412b0a, 0 2px 8px #31412b06; }
.login-card .overline { font-size: 12px; letter-spacing: .1em; }
.login-card h1 { margin: 12px 0; color: var(--forest-deep); font-size: clamp(30px, 2.8vw, 46px); line-height: 1.45; letter-spacing: -.03em; }
.heading-dot { color: var(--leaf); }
.login-intro { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.login-card label { display: grid; gap: 8px; margin: 16px 0; font-size: 13px; font-weight: 600; }
.login-input { position: relative; display: block; }
.login-input > .icon { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); color: #7a887a; pointer-events: none; }
.login-input input { width: 100%; min-height: 50px; padding-left: 48px; font-weight: 400; background: #fff; }
.login-card button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; margin-top: 22px; border: 1px solid var(--forest); border-radius: 10px; background: var(--forest); padding: 0 20px; color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 5px 12px #245b3b15; }
.login-card button:hover { background: var(--forest-deep); }
.form-error { min-height: 20px; margin: 8px 0; color: #a63f31; font-size: 12px; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; }
.login-security .icon { width: 15px; height: 15px; color: var(--leaf); }
.login-features { display: flex; justify-content: space-between; gap: 12px; margin: 28px 12px 0; color: var(--muted); font-size: 12px; }
.login-features span { display: flex; align-items: center; gap: 8px; }
.login-features .icon { color: var(--forest); }
.login-artwork { position: relative; min-width: 0; overflow: hidden; border-radius: 100px 0 0 0; background: #e9edcf; }
.login-artwork > img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.artwork-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 64px 32px 28px; background: linear-gradient(transparent, #1e4b3775); color: #fff; text-align: center; }
.artwork-caption span { display: block; font-family: var(--serif); font-size: 23px; letter-spacing: .07em; }
.artwork-caption small { display: block; margin-top: 8px; font-size: 10px; letter-spacing: .18em; }

/* First sign-in. */
#password-view { display: flex; align-items: center; justify-content: center; padding: 170px 32px 64px; background: radial-gradient(ellipse at 95% 100%, #dce7cb, transparent 60%), var(--paper); }
.login-brand { position: absolute; top: 36px; left: var(--gutter); }
.password-steps { position: absolute; top: 72px; right: var(--gutter); display: flex; gap: 32px; color: var(--muted); font-size: 12px; }
.password-steps b { margin-left: 8px; font-weight: 400; }
.password-steps .current { color: var(--forest); }
.password-steps .current b { font-weight: 700; }
.login-card--compact { max-width: 840px; padding: 40px 320px 32px 40px; }
.login-card--compact h1 { font-size: 30px; }
.password-tips { position: absolute; top: 40px; bottom: 40px; right: 32px; display: flex; flex-direction: column; justify-content: center; gap: 18px; width: 236px; border: 1px solid #dfe7d2; border-radius: 18px; background: #f1f5e8; padding: 28px; color: var(--forest); }
.password-tips b { font-family: var(--serif); font-size: 21px; }
.password-tips span { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.password-tips .icon { width: 16px; height: 16px; }

/* Workspace frame and introduction. */
.app-shell { max-width: 1920px; min-height: 100svh; margin: auto; padding-bottom: 32px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; border-bottom: 1px solid var(--line); background: #fffef9e8; padding: 14px var(--gutter); }
.brand, .topbar-right { display: flex; align-items: center; gap: 12px; }
.brand-stamp { width: 46px; height: 46px; }
.brand b { display: block; color: var(--forest-deep); font-size: 19px; font-weight: 600; letter-spacing: .02em; }
.brand small { font-size: 9px; }
.topbar-right { gap: 16px; }
.text-button, .logout-button { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: transparent; padding: 0 13px; color: var(--muted); font-size: 12px; }
.text-button:hover, .logout-button:hover { border-color: #9daf91; background: var(--soft-green); color: var(--forest); }
.logout-button { display: grid; width: 38px; place-items: center; padding: 0; }
.logout-button .icon { width: 18px; height: 18px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--forest); font-size: 11px; white-space: nowrap; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); }
.identity { border-left: 1px solid var(--line); padding-left: 18px; text-align: right; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.identity small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 400; }
.workspace-intro { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow: hidden; margin: 24px var(--gutter) 20px; border: 1px solid #dfe7d1; border-radius: 20px; background: linear-gradient(110deg, #f9faf0 25%, #e8efd9); padding: 24px 30px; }
.workspace-intro::after { content: ""; position: absolute; right: -60px; top: -145px; width: 380px; height: 280px; border: 1px solid #ffffffa8; border-radius: 50%; transform: rotate(-25deg); box-shadow: 0 18px 0 #ffffff20, 0 38px 0 #ffffff20; pointer-events: none; }
.workspace-intro > * { position: relative; z-index: 1; }
.workspace-intro h1 { margin: 0; color: var(--forest-deep); font-family: var(--serif); font-size: clamp(24px, 2.1vw, 33px); font-weight: 600; letter-spacing: .02em; }
.workspace-intro p:last-child { margin: 8px 0 0; color: #68745b; font-size: 12px; }
.workflow-journey { display: flex; flex: 0 0 auto; gap: 44px; margin: 0 18px; padding: 0; list-style: none; }
.workflow-journey li { position: relative; display: grid; justify-items: center; gap: 9px; color: #466244; font-size: 11px; }
.workflow-journey li + li::before { content: "→"; position: absolute; top: 12px; left: -31px; color: #91a081; }
.workflow-journey li > span { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid #d6e2c5; border-radius: 50%; background: #ffffff85; color: var(--forest); }
.workflow-journey li:nth-child(2) > span { border-color: #c7dfdc; color: var(--teal); }

/* Overview: restrained status colors with legible numbers. */
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0 var(--gutter) 24px; }
.summary-grid article { position: relative; min-width: 0; min-height: 108px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 19px 20px; box-shadow: var(--shadow); }
.summary-grid article:first-child { border-color: #cedcbd; background: #edf3e4; }
.summary-grid article > span:not(.summary-icon) { display: block; padding-right: 33px; color: var(--muted); font-size: 12px; }
.summary-grid strong { display: block; margin-top: 8px; color: var(--forest-deep); font-family: "Avenir Next", var(--font); font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.summary-icon { position: absolute; top: 20px; right: 18px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: #f0f4e9; color: var(--forest); }
.summary-grid article:nth-child(2) .summary-icon { background: #f7f0df; color: #967329; }
.summary-grid article:nth-child(3) .summary-icon { background: #e9f2f1; color: var(--teal); }
.summary-grid article:nth-child(4) .summary-icon { background: #eef1e2; color: #707d34; }
.summary-grid article:nth-child(5) .summary-icon { background: #e9f2e5; color: var(--forest); }
.summary-icon .icon { width: 18px; height: 18px; }

/* Order queue and editable shipment sheet. */
.desk, .warehouse-workspace { margin: 0 var(--gutter); }
.desk { display: grid; grid-template-columns: minmax(290px, 29%) minmax(0, 1fr); align-items: start; gap: 20px; }
.order-column, .order-sheet, .warehouse-workspace { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.order-column { overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 16px; }
.section-heading p { margin: 0 0 4px; color: var(--muted); font-size: 10px; letter-spacing: .15em; }
.section-heading h2 { margin: 0; font-size: 19px; font-weight: 600; }
.section-heading button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--forest); }
.section-heading button:hover { background: var(--soft-green); }
.section-heading button .icon { width: 16px; height: 16px; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 8px; border-bottom: 1px solid var(--line); padding: 0 16px 18px; }
.filters input, .filters select { width: 100%; min-height: 38px; padding: 0 9px; font-size: 12px; }
.order-list { min-height: 340px; max-height: min(780px, 80vh); overflow: auto; padding: 8px; scrollbar-width: thin; scrollbar-color: #ccd5c2 transparent; }
.order-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; margin: 0 0 4px; border: 1px solid transparent; border-radius: 10px; background: transparent; padding: 17px 12px; color: inherit; text-align: left; }
.order-card:hover { background: #f5f7ef; }
.order-card.active { border-color: #d4dfc6; background: #edf3e6; box-shadow: inset 3px 0 var(--forest); }
.order-card h3 { margin: 0 0 5px; font-size: 14px; font-weight: 600; }
.order-card p, .order-card small { margin: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.order-card small { display: block; margin-top: 6px; color: #9b4b35; }
.order-dialog { position: static; min-width: 0; width: 100%; max-width: none; margin: 0; border: 0; background: transparent; padding: 0; color: inherit; }
.order-dialog::backdrop { background: #1e342b66; backdrop-filter: blur(5px); }
.status-chip, .badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; border: 1px solid transparent; border-radius: 6px; background: #eef2e7; padding: 3px 7px; color: #59674d; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.status-chip[data-status="draft"], .badge[data-status="draft"] { background: #f7f0df; color: #896219; }
.status-chip[data-status="returned"], .badge[data-status="returned"], .badge.red { background: #faebe4; color: #a14a31; }
.status-chip[data-status="submitted"], .badge[data-status="submitted"] { background: #e9f2f2; color: #316b73; }
.status-chip[data-status="received"], .badge[data-status="received"] { background: #eff1dd; color: #647126; }
.status-chip[data-status="completed"], .badge[data-status="completed"] { background: #e6f0e4; color: #35613b; }
.order-sheet { overflow: hidden; padding: 0 26px 24px; }
.empty-state { display: grid; min-height: 480px; place-content: center; justify-items: center; padding: 36px 16px; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 84px; height: 84px; place-items: center; border: 1px solid #e0e7d5; border-radius: 28px 28px 28px 8px; background: #f1f5e9; color: #789165; }
.empty-state .icon { width: 34px; height: 34px; }
.empty-state h2 { margin: 24px 0 8px; color: var(--forest); font-family: var(--serif); font-size: 22px; font-weight: 600; }
.empty-state p { margin: 0; font-size: 12px; }
.list-note { padding: 24px 14px; text-align: center; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 -26px; border-bottom: 1px solid var(--line); background: #fcfdf7; padding: 21px 26px; }
.sheet-head .overline { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.sheet-head h2 { display: inline-block; margin: 0 12px 6px 0; color: var(--forest-deep); font-size: 22px; font-weight: 600; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-head-actions { display: flex; flex-shrink: 0; gap: 8px; }
.order-dialog-close { display: none; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px solid #d9e2ce; border-radius: 50%; background: #fffefa; color: var(--forest); padding: 0; }
.order-dialog-close:hover { background: var(--soft-green); border-color: #9aaf88; }
.order-dialog-close .icon { width: 16px; height: 16px; }
.secondary, .action-buttons button, .warehouse-actions button, .warehouse-filters button { min-height: 40px; border: 1px solid #cddbc3; border-radius: 9px; background: #fffefa; padding: 0 15px; color: var(--forest); font-size: 12px; font-weight: 600; }
.secondary:hover, .action-buttons button:hover, .warehouse-actions button:hover, .warehouse-filters button:hover { background: var(--soft-green); border-color: #9aaf88; }
.action-buttons .primary, .warehouse-actions .primary { border-color: var(--forest); background: var(--forest); color: #fff; }
.action-buttons .primary:hover, .warehouse-actions .primary:hover { background: var(--forest-deep); }
.missing-warning { margin-top: 18px; border: 1px solid #eadac0; border-radius: 9px; background: #fcf6e9; padding: 11px 14px; color: #906629; font-size: 12px; }
.missing-warning p { margin: 0; }
.missing-warning p + p { margin-top: 5px; }
#return-warning { border-color: #ebd3c7; background: #fcf0e9; color: #9b4b35; }
.order-sheet fieldset { min-width: 0; margin: 25px 0; border: 0; padding: 0; }
.order-sheet legend { width: 100%; border-bottom: 1px solid var(--line); padding-bottom: 11px; font-size: 15px; font-weight: 600; }
.order-sheet legend span { float: right; color: #8d9b80; font-family: "Avenir Next", var(--font); font-size: 12px; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; padding-top: 18px; }
.field-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.field-grid input, .field-grid select { width: 100%; font-size: 13px; }
.field-grid .wide { grid-column: 1 / -1; }
.table-wrap, .warehouse-table-wrap { overflow: auto; scrollbar-width: thin; scrollbar-color: #ccd5c2 transparent; }
.order-sheet table, .warehouse-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.order-sheet table { min-width: 640px; overflow: hidden; }
.order-sheet th, .warehouse-table th { background: #f1f5e9; color: #617054; font-size: 11px; font-weight: 500; white-space: nowrap; }
.order-sheet th, .order-sheet td, .warehouse-table th, .warehouse-table td { border-bottom: 1px solid #e7ebe0; padding: 11px 8px; text-align: left; }
.order-sheet tbody tr:last-child td, .warehouse-table tbody tr:last-child td { border-bottom: 0; }
.order-sheet td input, .order-sheet td select { width: 100%; min-width: 56px; min-height: 35px; border-radius: 6px; background: #fff; padding: 0 7px; font-size: 12px; }
.order-sheet th:first-child { width: 23%; }
.order-sheet th:nth-child(2) { width: 19%; }
.order-sheet td:last-child { width: 36px; }
.remove-item { display: grid; width: 28px; height: 35px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #ae6450; padding: 0; }
.remove-item:hover { background: #f9ebe5; }
.remove-item .icon { width: 15px; height: 15px; }
.table-action { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; border: 1px dashed #c4d3b9; border-radius: 6px; background: transparent; padding: 0 10px; color: var(--forest); font-size: 11px; }
.table-action .icon { width: 14px; height: 14px; }
.order-sheet tfoot td { border-top: 1px solid var(--line); border-bottom: 0; background: #fafbf5; }
.order-sheet tfoot td:last-child { text-align: right; white-space: nowrap; }
.order-sheet tfoot strong { margin-left: 9px; color: var(--forest); font-family: "Avenir Next", var(--font); font-size: 23px; font-weight: 600; }
.sheet-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.sheet-footer p { margin: 0; color: #9a692a; font-size: 12px; }
.action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

/* Warehouse: clear group headings and a contained wide table. */
.warehouse-workspace { overflow: hidden; }
.warehouse-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding: 24px; }
.warehouse-head h2 { margin: 0; color: var(--forest-deep); font-size: 24px; font-weight: 600; }
.warehouse-head .muted { margin: 7px 0 0; max-width: 620px; font-size: 12px; }
.warehouse-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.warehouse-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; border-bottom: 1px solid var(--line); background: #fbfcf6; padding: 18px 24px; }
.warehouse-filters label { display: grid; flex: 1 1 150px; gap: 6px; color: var(--muted); font-size: 11px; }
.warehouse-filters input, .warehouse-filters select { width: 100%; min-height: 40px; font-size: 12px; }
.warehouse-search { flex-basis: 210px !important; }
.warehouse-views { display: flex; flex: 0 0 auto; gap: 3px; min-height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #edf1e5; padding: 3px; }
.warehouse-views button { min-height: 32px; border: 0; border-radius: 6px; background: transparent; padding: 0 13px; color: var(--muted); font-size: 12px; }
.warehouse-views button.active { background: #fffefa; color: var(--forest); box-shadow: 0 1px 4px #30452715; }
.warehouse-date-range { display: flex; flex: 1 1 280px; gap: 8px; }
.warehouse-date-range label { flex-basis: 120px; }
.warehouse-table-wrap { max-height: 72vh; }
.warehouse-table { min-width: 1250px; border: 0; border-radius: 0; }
.warehouse-table thead { position: sticky; top: 0; z-index: 2; }
.warehouse-table th, .warehouse-table td { padding: 15px 12px; }
.warehouse-table td { vertical-align: top; line-height: 1.75; }
.warehouse-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.warehouse-table tr:hover td { background: #f9fbf3; }
.warehouse-table tr:has(input:checked) td { background: #f0f5e8; }
.warehouse-table .warehouse-group th { border-top: 1px solid #e0e7d4; background: #f7f9f1; padding: 10px 15px; color: var(--forest); font-size: 12px; font-weight: 600; }
.warehouse-table .recipient { color: var(--forest-deep); font-size: 13px; font-weight: 600; }
.warehouse-table .copy-button, .warehouse-table .view-button { min-height: 28px; border: 0; background: transparent; padding: 2px 0; color: var(--teal); font-size: 11px; }
.warehouse-table .copy-button:hover, .warehouse-table .view-button:hover { text-decoration: underline; }
.warehouse-table .items-text { min-width: 180px; white-space: pre-line; }
.warehouse-table .address-text { min-width: 210px; max-width: 300px; overflow-wrap: anywhere; }
.warehouse-table .time-text { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* Accounts, identity binding and workflow dialogs. */
.admin-dialog, .password-dialog { width: min(1080px, calc(100vw - 40px)); max-height: 90svh; border: 1px solid #dce4d2; border-radius: 22px; background: var(--paper); padding: 0; box-shadow: 0 24px 90px #173f2c2e; }
.admin-dialog::backdrop, .password-dialog::backdrop { background: #1e342b66; backdrop-filter: blur(5px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: #f3f7e9; padding: 24px 28px; }
.dialog-head h2 { margin: 0; color: var(--forest-deep); font-family: var(--serif); font-size: 27px; font-weight: 600; }
.dialog-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.dialog-head button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #d9e2ce; border-radius: 50%; background: #fffefa; color: var(--forest); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.admin-grid > section { min-width: 0; padding: 26px 28px; }
.admin-grid > section + section { border-left: 1px solid var(--line); background: #fafbf5; }
.admin-grid h3 { margin: 0 0 18px; font-size: 16px; font-weight: 600; }
.admin-grid h4 { margin: 26px 0 0; color: var(--forest-deep); font-size: 13px; font-weight: 600; }
.admin-grid .muted { font-size: 12px; }
.stack-form { display: grid; gap: 13px; }
.stack-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; font-size: 13px; }
.stack-form textarea { min-height: 100px; padding: 12px; resize: vertical; }
.stack-form > button { min-height: 44px; margin-top: 3px; border: 1px solid var(--forest); border-radius: 9px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 600; }
.stack-form > button:hover { background: var(--forest-deep); }
.admin-list { margin-top: 22px; }
.admin-row { display: grid; gap: 12px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.admin-row b, .admin-row small { display: block; overflow-wrap: anywhere; }
.admin-row b { font-size: 13px; font-weight: 600; }
.admin-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.admin-row > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-row select, .admin-row button { min-height: 33px; border: 1px solid #d6dfce; border-radius: 7px; background: #fffefa; padding: 0 10px; color: var(--forest); font-size: 11px; }
.admin-row.is-new { border-radius: 10px; background: #edf3e4; padding: 16px 12px; }
.create-user-feedback { border: 1px solid #d1dfc3; border-radius: 9px; background: #eef5e6; padding: 12px; color: var(--forest); }
.create-user-feedback.error { border-color: #efd1c6; background: #fcf0e9; color: #a34e39; }
.create-user-feedback p { margin: 5px 0 0; font-size: 12px; }
.password-dialog { width: min(460px, calc(100vw - 32px)); padding: 30px; }
.password-dialog h2 { margin: 0; color: var(--forest-deep); font-size: 24px; font-weight: 600; }
.password-dialog .muted { margin: 0 0 6px; font-size: 12px; }
.dialog-actions { display: flex; gap: 10px; margin-top: 12px; }
.dialog-actions button { flex: 1; min-height: 42px; border: 1px solid #cddbc3; border-radius: 9px; background: #fffefa; padding: 0 15px; color: var(--forest); font-size: 13px; }
.dialog-actions button:last-child { border-color: var(--forest); background: var(--forest); color: #fff; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: min(440px, calc(100vw - 32px)); border: 1px solid #ffffff20; border-radius: 12px; background: var(--forest-deep); padding: 14px 20px; color: #fff; box-shadow: 0 6px 24px #173f2c22; opacity: 0; transform: translateY(16px); transition: opacity .2s, transform .2s; pointer-events: none; overflow-wrap: anywhere; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #a34e39; }

@media (min-width: 1600px) {
  .login-content { padding-left: max(7vw, calc((100vw - 1550px) / 2)); }
  .login-card { max-width: 570px; padding: 40px 44px 28px; }
  .login-features { max-width: 545px; }
}
@media (max-width: 1120px) {
  .login-content { padding: 32px; }
  .login-card { padding: 28px; }
  .login-card h1 { font-size: 34px; }
  .topbar-right { gap: 10px; }
  .live-indicator { display: none; }
  .summary-grid { gap: 10px; }
  .summary-grid article { padding: 16px; }
  .summary-icon { right: 12px; width: 26px; height: 26px; }
  .summary-grid article > span:not(.summary-icon) { padding-right: 26px; font-size: 11px; }
  .desk { grid-template-columns: 290px minmax(0, 1fr); gap: 14px; }
  .sheet-head { align-items: flex-start; }
  .sheet-head-actions { flex-direction: column; }
  .workflow-journey { gap: 32px; margin: 0; }
  .workflow-journey li + li::before { left: -24px; }
  .warehouse-head { align-items: flex-start; }
  .warehouse-actions { max-width: 340px; }
}
@media (max-width: 820px) {
  .login-view--welcome { grid-template-columns: 1fr; background: radial-gradient(ellipse at 100% 0, #e6edce, transparent 65%), var(--paper); }
  .login-content { width: min(520px, 100%); min-height: 100svh; margin: auto; padding: 32px 24px; }
  .login-content > .brand-lockup { margin-bottom: 24px; }
  .login-artwork { display: none; }
  .login-card { padding: 30px; }
  .login-card h1 { font-size: 36px; }
  .login-features { margin-top: 24px; }
  #password-view { padding: 170px 24px 40px; }
  .login-brand { top: 24px; left: 24px; }
  .password-steps { top: 116px; left: 24px; right: auto; gap: 22px; font-size: 11px; }
  .login-card--compact { max-width: 500px; padding: 30px; }
  .password-tips { position: static; width: 100%; margin-top: 20px; padding: 18px; gap: 8px; }
  .password-tips b { font-family: var(--font); font-size: 13px; }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 16px var(--gutter); }
  .topbar-right { margin-left: auto; }
  .brand b { font-size: 17px; }
  .workspace-intro { margin-top: 18px; padding: 22px; }
  .workspace-intro h1 { font-size: 25px; }
  .workflow-journey { display: none; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .summary-grid article:first-child { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
  .summary-grid article:first-child .summary-icon { top: 16px; }
  .summary-grid article:first-child strong { font-size: 42px; }
  .summary-grid article:first-child > span:not(.summary-icon) { padding: 0; }
  .summary-grid article { min-height: 88px; padding: 16px 14px; }
  .summary-grid strong { font-size: 28px; }
  .summary-icon { top: 15px; }
  .desk { grid-template-columns: 1fr; }
  .order-dialog.mobile-modal { position: fixed; inset: 12px; width: auto; max-width: none; max-height: calc(100svh - 24px); overflow: hidden; border: 1px solid #dce4d2; border-radius: 18px; background: var(--paper); box-shadow: 0 24px 90px #173f2c2e; }
  .order-dialog.mobile-modal .order-sheet { display: flex; height: 100%; max-height: inherit; flex-direction: column; overflow: hidden; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  .order-dialog.mobile-modal #order-form { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 0 18px 20px; }
  .order-dialog.mobile-modal .sheet-head { position: relative; margin: 0 -18px; padding: 20px 68px 20px 18px; }
  .order-dialog.mobile-modal .order-dialog-close { position: absolute; top: 16px; right: 18px; display: grid; }
  .order-dialog.mobile-modal .sheet-head-actions { justify-content: flex-end; }
  .order-list { min-height: 0; max-height: 300px; }
  .filters { grid-template-columns: minmax(0, 1fr) 120px; }
  .order-card { padding: 16px; }
  .order-card p, .order-card small { font-size: 11px; }
  .empty-state { min-height: 300px; }
  .sheet-head-actions { flex-direction: row; }
  .warehouse-head { flex-direction: column; padding: 20px; }
  .warehouse-actions { justify-content: flex-start; max-width: none; }
  .warehouse-filters { padding: 16px 20px; }
  .warehouse-views { flex: 1 1 100%; }
  .warehouse-views button { flex: 1; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-grid > section + section { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  :root { --gutter: 14px; }
  .login-content { padding: 24px 20px; }
  .brand-symbol { width: 54px; height: 54px; }
  .brand-lockup b { font-size: 34px; }
  .brand-lockup small { font-size: 9px; }
  .login-card { border-radius: 18px; padding: 26px 22px 20px; }
  .login-card h1 { font-size: 29px; }
  .login-intro { font-size: 12px; }
  .login-features { gap: 6px; margin-right: 0; margin-left: 0; font-size: 11px; }
  .login-features span { gap: 5px; }
  .login-features .icon { width: 17px; height: 17px; }
  .login-input input, .field-grid input, .field-grid select, .stack-form input, .stack-form select, .stack-form textarea { font-size: 16px; }
  .password-steps { gap: 12px; }
  .password-steps b { margin-left: 4px; }
  .topbar { gap: 14px; }
  .brand { gap: 9px; }
  .brand-stamp { width: 37px; height: 37px; }
  .brand b { font-size: 17px; }
  .topbar-right { width: 100%; gap: 10px; }
  .topbar-right .text-button { margin-right: auto; }
  .identity { margin-left: auto; font-size: 12px; }
  .workspace-intro { margin-top: 14px; border-radius: 14px; padding: 20px; }
  .workspace-intro h1 { font-size: 22px; }
  .workspace-intro p:last-child { font-size: 11px; }
  .summary-grid { gap: 8px; }
  .summary-grid article { min-height: 85px; border-radius: 11px; padding: 12px; }
  .summary-grid article > span:not(.summary-icon) { padding: 0; font-size: 10px; }
  .summary-icon { display: none; }
  .summary-grid article:first-child .summary-icon { display: grid; left: 12px; top: 12px; }
  .summary-grid article:first-child strong { font-size: 36px; }
  .summary-grid strong { font-size: 25px; }
  .section-heading { padding: 20px 16px 14px; }
  .order-sheet { padding: 0 18px 20px; }
  .order-dialog.mobile-modal { inset: 10px; max-height: calc(100svh - 20px); }
  .order-dialog.mobile-modal .order-sheet { padding: 0; }
  .order-dialog.mobile-modal #order-form { padding: 0 18px 20px; }
  .sheet-head { flex-wrap: wrap; margin: 0 -18px; padding: 20px 18px; gap: 16px; }
  .sheet-head-actions { width: 100%; }
  .sheet-head-actions button:not(.order-dialog-close) { flex: 1; }
  .sheet-head-actions .order-dialog-close { flex: 0 0 40px; }
  .field-grid { grid-template-columns: 1fr; gap: 14px; }
  .order-sheet table { min-width: 0; border: 0; border-radius: 0; }
  .order-sheet thead { display: none; }
  .order-sheet tbody { display: grid; gap: 12px; }
  .order-sheet tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf5; padding: 14px; }
  .order-sheet tbody td { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; }
  .order-sheet tbody td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .order-sheet tbody td:first-child, .order-sheet tbody td:nth-child(2) { grid-column: 1 / -1; }
  .order-sheet tbody td:last-child { grid-column: 1 / -1; justify-self: end; width: auto; }
  .order-sheet tbody td:last-child::before { display: none; }
  .order-sheet td input, .order-sheet td select { min-height: 40px; font-size: 16px; }
  .order-sheet .remove-item { width: 36px; min-height: 36px; border: 1px solid #ead8ce; background: #fffefa; }
  .order-sheet tfoot, .order-sheet tfoot tr { display: block; }
  .order-sheet tfoot td { display: block; width: 100%; border: 0; background: transparent; padding: 14px 0 0; }
  .order-sheet tfoot td:last-child { width: 100%; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
  .order-sheet .table-action { width: 100%; min-height: 40px; justify-content: center; }
  .sheet-footer { align-items: stretch; flex-direction: column; gap: 10px; }
  .action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-buttons button { padding: 0 10px; }
  .action-buttons button:only-child { grid-column: 1 / -1; }
  .warehouse-actions { width: 100%; }
  .warehouse-actions button { flex: 1 1 130px; }
  .warehouse-filters > button { width: 100%; }
  .warehouse-search { flex-basis: 100% !important; }
  .dialog-head { padding: 20px; }
  .dialog-head h2 { font-size: 23px; }
  .admin-grid > section { padding: 22px 20px; }
  .password-dialog { padding: 24px; }
  .toast { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
