:root {
    color-scheme: light;
    --navy-950: #0c1827;
    --navy-900: #102033;
    --navy-800: #17304a;
    --ink: #13243a;
    --muted: #64778b;
    --line: #d5e0ea;
    --surface: #ffffff;
    --surface-soft: #f3f7fa;
    --canvas: #eaf1f6;
    --teal: #087d69;
    --teal-light: #dff5ef;
    --blue: #1769aa;
    --amber: #a65f00;
    --danger: #b42318;
    --shadow: 0 14px 38px rgba(20, 43, 67, .10);
    --sidebar-width: 292px;
    --sidebar-collapsed: 82px;
    --header-height: 78px;
    font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--canvas); }
body { min-width: 0; min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--ink); background: var(--canvas); font-family: inherit; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; padding-top: var(--header-height); padding-left: var(--sidebar-width); transition: padding-left .22s ease; }
.app-shell.is-sidebar-collapsed { padding-left: var(--sidebar-collapsed); }
.app-header { position: fixed; z-index: 40; inset: 0 0 auto var(--sidebar-width); height: var(--header-height); display: flex; align-items: center; gap: 22px; padding: 0 clamp(18px, 3vw, 42px); color: #fff; background: var(--navy-950); border-bottom: 1px solid rgba(255,255,255,.09); transition: left .22s ease; }
.is-sidebar-collapsed .app-header { left: var(--sidebar-collapsed); }
.header-brand { display: inline-flex; min-width: 0; align-items: center; gap: 12px; text-decoration: none; }
.header-brand-mark { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--navy-950); background: #fff; font-size: 14px; font-weight: 900; }
.header-brand-name { overflow: hidden; font-size: 19px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.header-tools { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-clock { display: flex; align-items: baseline; gap: .35em; flex-shrink: 0; line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums; }
.header-clock-date { font-size: 20px; font-weight: 700; }
.header-clock-time { font-size: 20px; }
.icon-button { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: inherit; background: transparent; cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.08); }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu-button { display: none; }
.mobile-menu-button span { width: 19px; height: 2px; margin: 2px 0; border-radius: 3px; background: currentColor; }

.app-sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; display: flex; width: var(--sidebar-width); min-width: 0; flex-direction: column; color: #f5f8fb; background: var(--navy-900); border-right: 1px solid rgba(255,255,255,.08); transition: width .22s ease, transform .22s ease; }
.sidebar-heading { display: flex; height: var(--header-height); flex-shrink: 0; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-heading-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.sidebar-heading-copy span { color: #8ea7bd; font-size: 10px; font-weight: 800; letter-spacing: .15em; white-space: nowrap; }
.sidebar-heading-copy strong { margin-top: 4px; font-size: 18px; white-space: nowrap; }
.sidebar-collapse-button { flex: 0 0 42px; }
.sidebar-close-button { display: none; flex: 0 0 42px; }
.sidebar-nav { flex: 1; min-height: 0; padding: 18px 12px; overflow: auto; }
.sidebar-link { position: relative; display: flex; min-width: 0; min-height: 66px; align-items: center; gap: 12px; margin: 0 0 6px; padding: 8px 10px; border: 1px solid transparent; border-radius: 14px; color: #eaf0f6; text-decoration: none; }
.sidebar-link:not(.is-disabled):hover { background: rgba(255,255,255,.06); }
.sidebar-link.is-active { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.09); box-shadow: inset 3px 0 0 #45d0b2; }
.sidebar-link.is-disabled { color: #8497aa; cursor: default; }
.sidebar-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(143,176,201,.32); border-radius: 12px; color: #8fb0c9; background: rgba(143,176,201,.08); }
.sidebar-icon svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-link.is-active .sidebar-icon { color: #45d0b2; border-color: rgba(69,208,178,.48); background: rgba(69,208,178,.12); }
.sidebar-link-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.sidebar-link-copy strong { overflow: hidden; font-size: 19px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-link-copy small { overflow: hidden; color: #8fa5b9; font-size: 9px; letter-spacing: .04em; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-link-state { flex: 0 0 auto; color: #52cdb4; font-size: 22px; }
.sidebar-footer { display: flex; flex-direction: column; flex-shrink: 0; gap: 14px; margin-top: auto; padding: 18px 20px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-user-avatar { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: #073e35; background: #b9eadf; font-size: 19px; font-weight: 900; }
.sidebar-user-copy { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-copy strong { font-size: 18px; overflow-wrap: anywhere; }
.sidebar-user-copy small { color: #a9bdd0; font-size: 13px; }
.sidebar-footer .sidebar-logout { width: 100%; min-height: 46px; font-size: 16px; background: #26594f; border-color: #428679; }
.sidebar-footer .sidebar-logout:hover { background: #317264; }
.is-sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed); }
.is-sidebar-collapsed .sidebar-heading { justify-content: center; padding: 0; }
.is-sidebar-collapsed .sidebar-heading-copy, .is-sidebar-collapsed .sidebar-link-copy, .is-sidebar-collapsed .sidebar-link-state { display: none; }
.is-sidebar-collapsed .sidebar-footer { padding: 12px 4px; gap: 10px; }
.is-sidebar-collapsed .sidebar-user { flex-direction: column; text-align: center; }
.is-sidebar-collapsed .sidebar-user-copy strong { font-size: 12px; }
.is-sidebar-collapsed .sidebar-user-copy small { font-size: 10px; }
.is-sidebar-collapsed .sidebar-footer .sidebar-logout { padding-inline: 2px; font-size: 12px; }
.is-sidebar-collapsed .sidebar-collapse-button svg { transform: rotate(180deg); }
.is-sidebar-collapsed .sidebar-nav { padding-inline: 10px; }
.is-sidebar-collapsed .sidebar-link { justify-content: center; padding-inline: 8px; }

.app-main { min-width: 0; width: 100%; padding: clamp(20px, 3vw, 42px); }
.page-container { width: min(100%, 1280px); margin: 0 auto; }
.page-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-bottom: 28px; padding: clamp(26px, 4vw, 48px); border: 1px solid #cbd9e5; border-radius: 24px; background: linear-gradient(135deg, #fff 0%, #f8fbfd 68%, #e4f4f0 100%); box-shadow: var(--shadow); }
.page-hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -110px; bottom: -150px; border-radius: 50%; background: rgba(8,125,105,.12); }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.page-hero h1, .page-heading h1 { margin: 0; color: var(--ink); font-size: clamp(27px, 4vw, 46px); line-height: 1.3; letter-spacing: .015em; }
.page-hero p:not(.eyebrow) { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 15px; }
.hero-badge { position: relative; z-index: 1; display: grid; min-width: 128px; min-height: 96px; place-items: center; padding: 16px; border: 1px solid #bdd6cf; border-radius: 18px; color: #075e50; background: rgba(255,255,255,.72); text-align: center; }
.hero-badge strong { font-size: 22px; }
.hero-badge span { font-size: 11px; font-weight: 700; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 30px 0 14px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 7px 20px rgba(20,43,67,.06); }
.tool-card--link { position: relative; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.tool-card--link:hover { transform: translateY(-2px); border-color: #9fc8bd; box-shadow: var(--shadow); }
.tool-card--muted { color: #7b8b9b; background: #f6f8fa; box-shadow: none; }
.tool-card a.card-link { display: block; text-decoration: none; }
.tool-card-label { color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.tool-card h3 { margin: 5px 0 6px; font-size: 18px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 13px; }
.card-action { display: inline-block; margin-top: 16px; color: var(--teal); font-size: 13px; font-weight: 800; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.summary-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.78); }
.summary-card span { display: block; color: var(--muted); font-size: 12px; }
.summary-card strong { display: block; margin-top: 6px; font-size: 22px; }
.summary-card small { color: #8796a5; }
.page-heading { margin-bottom: 22px; }
.page-heading h1 { font-size: clamp(25px, 4vw, 38px); }
.page-heading p { margin: 7px 0 0; color: var(--muted); }
/* Use the page's navigation and section labels; reserve the top for work. */
.app-main > .page-container > .page-heading,
.app-main > .page-container > .page-hero,
.auth-page .login-card > .eyebrow,
.auth-page .login-card > h1,
.auth-page .login-card > .description { display: none; }
.app-main > .page-container > .page-hero + .section-heading { margin-top: 0; }
.panel { padding: clamp(20px, 3vw, 34px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.empty-state { display: grid; min-height: 330px; place-items: center; text-align: center; }
.empty-state-inner { max-width: 540px; }
.empty-state-icon { display: grid; width: 68px; height: 68px; margin: 0 auto 18px; place-items: center; border-radius: 20px; color: var(--teal); background: var(--teal-light); font-size: 29px; }
.empty-state h2 { margin: 0 0 8px; font-size: 23px; }
.empty-state p { margin: 0; color: var(--muted); }
.phase-note { margin-top: 18px; padding: 12px 14px; border-radius: 10px; color: #6f4a00; background: #fff4d9; font-size: 13px; }
.master-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.master-layout.is-readonly { grid-template-columns: minmax(0, 1fr); }
.master-form { position: sticky; top: calc(var(--header-height) + 18px); }
.master-form h2, .master-list h2 { margin: 0 0 16px; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.field--full { grid-column: 1 / -1; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 9px 14px; margin: 5px 0 18px; }
.checkbox-row label, .check-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.checkbox-row input, .check-label input { width: 18px; min-height: 18px; margin: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.filter-bar { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(120px, 180px)); gap: 10px; margin-bottom: 14px; }
.record-list { display: grid; gap: 10px; }
.record-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.record-card.is-deleted { opacity: .72; background: #f4f5f6; }
.record-card.is-completed h3 { color: #718297; text-decoration: line-through; }
.record-card.is-overdue { border-color: #e3a29c; box-shadow: inset 3px 0 0 #c3473c; }
.record-card.is-selected { border-color: #82cbbb; box-shadow: inset 3px 0 0 var(--teal); }
.record-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.record-card h3 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 16px; }
.record-card-meta { margin: 5px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.record-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.button--small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.button--danger { background: #a9362c; }
.button--warning { color: #573800; background: #f6c768; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; color: #075e50; background: var(--teal-light); font-size: 11px; font-weight: 800; }
.badge--muted { color: #56697c; background: #e8edf1; }
.badge--danger { color: #8d2119; background: #fee9e7; }
.badge--urgent { color: #8d2119; background: #fee1de; }
.badge--high { color: #7a4700; background: #fff0c9; }
.badge--low { color: #465d72; background: #e8eef3; }
.note-body { margin: 12px 0 0; color: #263b50; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-cargo-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.quote-detail { margin-top: 18px; }
.quote-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.quote-detail-heading h2, .vendor-response-form h3 { margin: 0; }
.quote-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.quote-print-view { display: none; }
.shipment-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.shipment-layout .master-form { position: static; }
.shipment-detail { margin-top: 18px; }
.shipment-item-editor { display: grid; gap: 14px; margin: 16px 0; }
.shipment-item-row { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.shipment-product-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.shipment-product-search select { grid-column: 1 / -1; }
.shipment-item-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shipment-item-wide { grid-column: 1 / -1; }
.shipment-item-fields .field { min-width: 0; margin: 0; }
.shipment-item-row input[readonly] { background: var(--surface-soft); }
.shipment-detail-table td { white-space: pre-wrap; overflow-wrap: anywhere; }
.shipment-report-preview { overflow-x: auto; margin-top: 18px; }
.shipment-print-set { position: absolute; left: -10000px; top: 0; }
.shipment-print-notice { display: none; }
.shipment-sheet { box-sizing: border-box; width: 186mm; height: 273mm; padding: 3mm; margin: 0 auto 12mm; color: #000; background: #fff; font-family: 'Yu Gothic', Meiryo, sans-serif; font-size: 10pt; line-height: 1.3; }
.shipment-sheet-heading { display: flex; justify-content: space-between; align-items: start; gap: 4mm; min-height: 14mm; margin-bottom: 2mm; }
.shipment-sheet-heading h1 { margin: 0; font-size: 17pt; }
.shipment-sheet-heading > div { white-space: pre-wrap; text-align: right; font-size: 8pt; }
.shipment-info-line { display: grid; grid-template-columns: 32mm minmax(0, 1fr); border-bottom: .25mm solid #000; margin-bottom: 1mm; }
.shipment-info-line strong { padding: 1mm; font-size: 9pt; }
.shipment-info-value { height: 8mm; padding: .5mm 1mm; white-space: pre-wrap; overflow-wrap: anywhere; }
.shipment-destination-value { height: 16mm; }
.shipment-info-line:has(.shipment-info-value) { min-width: 0; }
.shipment-receiver-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3mm; }
.shipment-sheet .shipment-doc-table { table-layout: fixed; border-collapse: collapse; margin-top: 3mm; font-size: 9pt; }
.shipment-sheet .shipment-doc-table th, .shipment-sheet .shipment-doc-table td { box-sizing: border-box; padding: .6mm 1mm; border: .25mm solid #000; color: #000; background: #fff; white-space: normal; vertical-align: middle; }
.shipment-doc-table th:nth-child(1) { width: 48%; }
.shipment-doc-table th:nth-child(2) { width: 12%; }
.shipment-doc-table th:nth-child(3) { width: 10%; }
.shipment-doc-table th:nth-child(4) { width: 30%; }
.shipment-cell { height: 5.5mm; white-space: pre-wrap; overflow-wrap: anywhere; }
.shipment-note { margin-top: 3mm; }
.shipment-sheet .shipment-note h2 { margin: 0 0 1mm; font-size: 9pt; text-align: left; }
.shipment-note-value { height: 24mm; padding: 1mm; border: .25mm solid #000; white-space: pre-wrap; overflow-wrap: anywhere; }
.shipment-note-value.is-large { height: 35mm; }
.shipment-receipt-sign { margin-top: 8mm; font-size: 9pt; }
.shipment-work-approval { padding-bottom: 3mm; text-align: right; font-size: 9pt; }
.shipment-fit-1 { font-size: 9pt; }
.shipment-fit-2 { font-size: 8pt; }
.shipment-fit-3 { font-size: 7pt; }
.shipment-fit-4 { font-size: 6.5pt; }
.shipment-fit-5 { font-size: 6pt; }
.quote-detail-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.quote-detail-field { min-width: 0; padding: 11px 13px; background: #fff; }
.quote-detail-field.is-wide { grid-column: span 3; }
.quote-detail-field dt { color: var(--muted); font-size: 11px; font-weight: 800; }
.quote-detail-field dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.quote-vendor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 18px; align-items: start; }
.vendor-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-bottom: 14px; }
.vendor-response-form { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.vendor-response-form h3 { margin-bottom: 15px; font-size: 17px; }
.badge-group { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.list-status { min-height: 46px; padding: 9px 0; color: var(--muted); font-size: 13px; }
.inline-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.inline-section h3 { margin: 0 0 12px; font-size: 16px; }
.compact-grid { display: grid; grid-template-columns: 1fr 1fr 90px auto auto; gap: 9px; align-items: end; }
/* Category controls live in the narrow product form panel. */
#category-form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
#category-form .field { min-width: 0; margin-bottom: 0; }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; color: #fff; background: var(--teal); font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(.94); }
.button:disabled { cursor: wait; opacity: .6; }
.button--secondary { color: var(--ink); border-color: var(--line); background: #fff; }
.button--ghost { min-height: 39px; color: #e6eef5; border-color: rgba(255,255,255,.2); background: transparent; font-size: 12px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid #b9c8d5; border-radius: 10px; color: var(--ink); background: #fff; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(8,125,105,.20); outline-offset: 2px; border-color: var(--teal); }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: #425970; background: #eef3f7; font-size: 12px; }
.alert { margin: 0 0 18px; padding: 12px 15px; border: 1px solid #bcd8d1; border-radius: 11px; color: #075f50; background: #e8f7f3; }
.alert--error { color: var(--danger); border-color: #efc0bc; background: #fff0ee; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; width: min(360px, calc(100vw - 30px)); gap: 9px; }
.toast { padding: 13px 15px; border-radius: 11px; color: #fff; background: var(--navy-800); box-shadow: var(--shadow); }
.toast--error { background: #8f241b; }
.modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(8,20,33,.58); }
.modal { width: min(100%, 580px); max-height: calc(100vh - 40px); overflow: auto; padding: 26px; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.app-footer { display: flex; justify-content: space-between; gap: 18px; width: min(100%, 1280px); margin: 18px auto 0; padding: 18px 2px 4px; color: #718297; font-size: 11px; }

.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 80% 10%, #d8efe9 0, transparent 30%), var(--canvas); }
.login-card { width: min(100%, 430px); padding: clamp(24px, 5vw, 38px); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.login-card .description { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.login-card .button { width: 100%; margin-top: 6px; }
.form-error { min-height: 24px; margin: 14px 0 0; color: var(--danger); font-size: 13px; }

@media (max-width: 1250px) {
    .header-brand-name { display: none; }
}

@media (max-width: 1050px) {
    .app-header { padding-inline: 18px; gap: 14px; }
    .header-tools { gap: 10px; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .master-layout { grid-template-columns: 1fr; }
    .shipment-layout { grid-template-columns: 1fr; }
    .master-form { position: static; }
    .quote-vendor-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    :root { --header-height: 66px; }
    .app-shell, .app-shell.is-sidebar-collapsed { padding-left: 0; }
    .app-header, .is-sidebar-collapsed .app-header { left: 0; display: flex; gap: 12px; padding: 0 12px; }
    .mobile-menu-button { display: grid; flex: 0 0 42px; }
    .header-brand { display: none; }
    .header-tools { gap: 8px; margin-left: 0; }
    .header-clock { display: none; }
    .app-sidebar, .is-sidebar-collapsed .app-sidebar { width: min(88vw, 310px); transform: translateX(-102%); box-shadow: 20px 0 50px rgba(0,0,0,.24); }
    .app-shell.is-sidebar-open .app-sidebar { transform: translateX(0); }
    .app-shell.is-sidebar-open .sidebar-overlay { display: block !important; position: fixed; z-index: 45; inset: 0; background: rgba(5,15,26,.55); }
    .sidebar-heading { padding: 0 15px 0 20px; }
    .sidebar-heading-copy, .is-sidebar-collapsed .sidebar-heading-copy, .sidebar-link-copy, .is-sidebar-collapsed .sidebar-link-copy, .sidebar-link-state, .is-sidebar-collapsed .sidebar-link-state, .sidebar-footer, .is-sidebar-collapsed .sidebar-footer { display: flex; }
    .sidebar-collapse-button { display: none; }
    .sidebar-close-button { display: grid; }
    .sidebar-nav, .is-sidebar-collapsed .sidebar-nav { padding: 14px 10px; }
    .sidebar-link, .is-sidebar-collapsed .sidebar-link { justify-content: flex-start; padding-inline: 10px; }
    .sidebar-footer, .is-sidebar-collapsed .sidebar-footer { flex-direction: column; padding: 18px 20px; gap: 14px; }
    .sidebar-user, .is-sidebar-collapsed .sidebar-user { flex-direction: row; text-align: left; }
    .sidebar-user-copy strong, .is-sidebar-collapsed .sidebar-user-copy strong { font-size: 18px; }
    .sidebar-user-copy small, .is-sidebar-collapsed .sidebar-user-copy small { font-size: 13px; }
    .sidebar-footer .sidebar-logout, .is-sidebar-collapsed .sidebar-footer .sidebar-logout { padding-inline: 15px; font-size: 16px; }
    .app-main { padding: 18px 14px 28px; }
    .page-hero { grid-template-columns: 1fr; padding: 24px 20px; border-radius: 18px; }
    .hero-badge { display: none; }
    .tool-grid { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .filter-bar, .compact-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
    .app-footer { align-items: flex-start; flex-direction: column; gap: 2px; }
    .quote-detail-fields { grid-template-columns: 1fr 1fr; }
    .quote-detail-field.is-wide { grid-column: span 2; }
}

@media (max-width: 390px) {
    .page-hero h1 { font-size: 27px; }
    .tool-card, .panel { padding: 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .field--full { grid-column: auto; }
    .record-card-head { flex-direction: column; }
    .quote-detail-heading { flex-direction: column; }
    .shipment-product-search, .shipment-item-fields { grid-template-columns: 1fr; }
    .vendor-add-row { grid-template-columns: 1fr; }
    .quote-detail-fields { grid-template-columns: 1fr; }
    .quote-detail-field.is-wide { grid-column: auto; }
}

@media (max-width: 340px) {
    .header-tools { gap: 5px; }
    .app-header { padding-inline: 8px; }
    .app-main { padding-inline: 10px; }
}

@media print {
    .app-header, .app-sidebar, .sidebar-overlay, .app-footer { display: none !important; }
    .app-shell { padding: 0 !important; }
    .app-main { padding: 0; }
    body { background: #fff; }
    @page quoteReport { size: A4 portrait; margin: 14mm; }
    body.is-printing-quote > :not(.quote-print-view) { display: none !important; }
    body.is-printing-quote .quote-print-view { display: block; page: quoteReport; color: #000; font-size: 10pt; }
    .quote-print-view h1 { margin: 0 0 6mm; font-size: 18pt; }
    .quote-print-view h2 { margin: 6mm 0 3mm; font-size: 12pt; break-after: avoid; }
    .quote-print-number { margin: 0 0 5mm; font-weight: bold; overflow-wrap: anywhere; }
    .quote-print-fields { margin: 0; }
    .quote-print-fields > div { display: grid; grid-template-columns: 30mm minmax(0, 1fr); border-bottom: 1px solid #bbb; }
    .quote-print-fields dt, .quote-print-fields dd { margin: 0; padding: 2mm; white-space: pre-wrap; overflow-wrap: anywhere; }
    .quote-print-fields dt { font-weight: bold; }
    .quote-print-view table { table-layout: fixed; border: 1px solid #bbb; font-size: 9pt; }
    .quote-print-view th, .quote-print-view td { padding: 2mm; border: 1px solid #bbb; white-space: pre-wrap; overflow-wrap: anywhere; color: #000; background: #fff; vertical-align: top; }
    .quote-print-view thead { display: table-header-group; }
    .quote-print-view tr { break-inside: avoid; }
    .quote-print-updated { margin-top: 4mm; font-size: 8pt; }
    @page shipmentReport { size: A4 portrait; margin: 12mm; }
    body.shipment-page:not(.is-printing-shipment) > .app-shell { display: none !important; }
    body.shipment-page:not(.is-printing-shipment) .shipment-print-notice { display: block; color: #000; }
    body.is-printing-shipment > :not(.shipment-print-set) { display: none !important; }
    body.is-printing-shipment .shipment-print-set { position: static; display: block; }
    .shipment-print-set .shipment-sheet { page: shipmentReport; margin: 0; break-after: page; break-inside: avoid; }
    .shipment-print-set .shipment-sheet:last-child { break-after: auto; }
    .shipment-doc-table thead { display: table-header-group; }
    .shipment-doc-table tr { break-inside: avoid; }
}

/* Task page only: gentle cards, grouped archives and native dialogs. */
.tasks-page .task-layout { grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); }
.tasks-page .task-layout.is-readonly { grid-template-columns: minmax(0, 1fr); }
.tasks-page .panel { border-radius: 22px; box-shadow: 0 8px 24px rgba(38, 68, 86, .06); }
.task-form-panel h2, .task-list-heading h2 { font-size: 21px; }
.task-required { font-size: 11px; color: #a63354; }
.task-primary { background: #af315c; }
#task-save { flex: 1; min-height: 48px; }
#task-description { height: auto; min-height: 0; line-height: 1.65; }
.task-counterpart-field { position: relative; }
.task-counterpart-row { display: grid; gap: 8px; }
.task-counterpart-options { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; max-height: 280px; overflow: auto; padding: 10px; border: 1px solid #cfdce9; border-radius: 16px; background: #fff; box-shadow: 0 12px 30px rgba(20, 43, 67, .16); }
.task-candidate-group { display: block; padding: 8px; border-bottom: 1px solid #e0e8ef; color: #526b82; font-size: 13px; }
.task-candidate { display: block; width: 100%; padding: 10px 8px; text-align: left; border: 0; border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.task-candidate:hover, .task-candidate:focus-visible { background: #edf5fa; }
.task-due-open { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 8px; min-height: 50px; padding: 10px 12px; border: 1px solid #b9cada; border-radius: 12px; background: #f2f7fc; color: #24415b; cursor: pointer; text-align: left; font-weight: 700; }
.task-list-heading, .task-list-heading-tools { display: flex; align-items: center; gap: 10px; }
.task-list-heading { flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.task-list-heading h2 { margin: 0; }
.task-list-heading-tools { flex-wrap: wrap; }
.task-filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; border: 1px solid #d4e0eb; border-radius: 15px; background: #f0f5fa; }
.task-filter-bar .field { min-width: 0; margin: 0; }
.task-filter-bar .field:last-child { grid-column: 1 / -1; }
.task-card { padding: 20px; border: 1px solid #d4dfeb; border-radius: 19px; background: #fff; box-shadow: 0 4px 12px rgba(30, 57, 79, .035); }
.task-card--soon { border-color: #e3cd94; background: #fff9e8; }
.task-card--overdue { border-color: #e7a9ba; background: #fff2f5; }
.task-card-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.task-card-heading h3 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.task-card--completed h3 { color: #71879b; }
.task-card-heading input[type=checkbox], .task-bulk-controls input { width: 19px; min-height: 19px; margin: 0; }
.task-person { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 5px 8px; border: 1px solid #e7cbd5; border-radius: 8px; color: #943953; background: #fff7fa; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.task-person-kind { padding: 2px 6px; border: 1px solid #cad9e9; border-radius: 5px; color: #285e90; background: #f0f6fc; font-size: 12px; }
.task-card-meta { margin: 10px 0 0; color: #637e94; font-size: 13px; overflow-wrap: anywhere; }
.task-card-preview { margin: 8px 0 0; color: #526e85; font-size: 14px; overflow-wrap: anywhere; }
.task-card-alert { margin: 10px 0 0; color: #96551c; font-weight: 800; overflow-wrap: anywhere; }
.task-card--overdue .task-card-alert { color: #b52b51; }
.task-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #d9e3ec; }
.task-card-actions .button, .task-bulk-controls .button { padding: 8px 11px; font-size: 13px; }
.task-card-edit { margin-left: auto; }
.task-button-neutral { color: #275375; border-color: #bbd1e5; background: #edf5fc; }
.task-button-complete { color: #087363; border-color: #a4d7ca; background: #e8f7f1; }
.task-button-return { color: #915714; border-color: #e5cca1; background: #fff4e2; }
.task-button-memo { color: #72509d; border-color: #d2c5e5; background: #f5effc; }
.task-button-delete { color: #a83252; border-color: #e5b3c2; background: #fff0f4; }
.task-bulk-controls { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; font-weight: 400; }
.task-bulk-controls label { display: inline-flex; align-items: center; gap: 6px; }
.task-empty { padding: 14px; color: #718496; }
.task-dialog { width: min(580px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); padding: 30px 26px 24px; overflow: auto; border: 1px solid #d9e3ee; border-radius: 24px; color: var(--ink); background: #fff; box-shadow: 0 18px 55px rgba(36, 48, 66, .18); }
.task-dialog::backdrop { background: rgba(51, 61, 78, .62); }
.task-dialog h2 { margin: 0 0 14px; font-size: 22px; text-align: center; }
#task-confirm-dialog, .partner-confirm-dialog, .user-confirm-dialog { width: min(440px, calc(100vw - 28px)); text-align: center; }
#task-confirm-dialog::before, #task-memo-dialog::before, .partner-confirm-dialog::before, .partner-detail-dialog::before, .user-confirm-dialog::before { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; background: #fff6eb; font-size: 25px; }
#task-confirm-dialog::before, .partner-confirm-dialog::before, .user-confirm-dialog::before { content: '💬'; }
#task-memo-dialog::before, .partner-detail-dialog::before { content: '📝'; background: #f6f0fc; }
#task-confirm-message, #partner-confirm-message, #user-confirm-message { margin: 0; color: #607993; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.task-dialog-actions > .button { flex: 1 1 100px; min-height: 44px; border-radius: 11px; }
.task-dialog .task-primary { border: 0; color: #fff; background: linear-gradient(110deg, #fa416b, #fb6b85); box-shadow: none; }
.task-dialog .task-primary:hover { background: linear-gradient(110deg, #ee355f, #f35c78); }
.task-dialog .button--secondary { color: #58718a; border-color: #dce5ee; background: #f1f6fb; }
.task-memo-content { padding: 18px; border: 1px solid #d2e0ec; border-radius: 15px; background: #f2f7fb; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-calendar-dialog { width: min(470px, calc(100vw - 28px)); }
.task-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-calendar-heading h2 { margin: 0; font-size: 20px; }
.task-calendar-weekdays, .task-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; text-align: center; }
.task-calendar-weekdays { margin-top: 20px; margin-bottom: 8px; color: #628097; font-weight: 700; }
.task-calendar-day { height: 40px; padding: 0; border: 1px solid transparent; border-radius: 10px; color: #314d63; background: #fff; cursor: pointer; font-weight: 700; }
.task-calendar-day:hover { background: #f4e9ef; }
.task-calendar-day.is-selected { border-color: #fa416b; color: #fff; background: linear-gradient(110deg, #fa416b, #fb6b85); }
.task-calendar-times { margin-top: 18px; padding: 14px; border: 1px solid #d1e0eb; border-radius: 16px; background: #f2f7fb; }
.task-calendar-times p { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.task-calendar-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.task-calendar-times label { display: block; margin-bottom: 6px; font-size: 13px; }
.task-print-view { display: none; }
.partners-page .master-layout { grid-template-columns: minmax(300px, 350px) minmax(0, 1fr); }
.partners-page .master-layout.is-readonly { grid-template-columns: minmax(0, 1fr); }
.partners-page .master-form { position: static; }
.partners-page .master-form .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.partners-page .master-form input, .partners-page .master-form select { font-size: 16px; }
.partners-page .master-form .field label { font-size: 15px; }
.partners-page .partner-save-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.partner-save-actions .button { padding-inline: 8px; }
#partner-cancel { margin-top: 12px; }
.partner-postal-status { margin: 7px 0 0; color: #637e94; font-size: 13px; line-height: 1.6; }
.partner-active-status { font-size: 15px; color: #476d66; }
.partner-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.partner-card-info { flex: 1 1 210px; min-width: 0; }
.partner-card-info h3 { margin: 8px 0 0; font-size: 23px; line-height: 1.5; overflow-wrap: anywhere; }
.partner-card-kinds, .partner-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.partner-card-kinds .task-person-kind { padding: 4px 9px; border-radius: 8px; font-size: 15px; }
.partner-card-actions .button { font-size: 16px; min-height: 46px; }
.partner-card--inactive { background: #f5f7fa; }
.partner-detail-content { padding: 10px 18px; border: 1px solid #d2e0ec; border-radius: 15px; background: #f2f7fb; }
.partner-detail-content > div { padding: 12px 0; border-bottom: 1px solid #dce5ee; }
.partner-detail-content > div:last-child { border-bottom: 0; }
.partner-detail-content dt { color: #607993; font-size: 14px; font-weight: 700; }
.partner-detail-content dd { margin: 5px 0 0; font-size: 18px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.users-page .master-form { position: static; }
.users-page .partner-save-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#user-cancel { margin-top: 12px; }
.user-card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.user-card-heading h3 { margin: 0; }
.user-card-heading .task-person-kind { padding: 4px 9px; font-size: 15px; border-radius: 8px; }
.user-card-login { margin: 9px 0 0; color: #637e94; font-size: 15px; overflow-wrap: anywhere; }
.user-archive-list { margin-top: 14px; }
@media (max-width: 1050px) { .partners-page .master-layout { grid-template-columns: minmax(0, 1fr); } }
.products-page .master-form { position: static; }
.notes-page .master-form { position: static; }
.notes-page .master-form input, .notes-page .master-form select, .notes-page .master-form textarea { font-size: 16px; }
.note-card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.note-card-heading h3 { margin: 0; }
.note-card-date { margin: 10px 0 0; color: #637e94; font-size: 16px; }
.note-detail-kinds { display: flex; justify-content: center; margin-bottom: 14px; }
.note-detail-dialog .task-memo-content { margin-top: 16px; font-size: 17px; }
.note-detail-dialog h2 { overflow-wrap: anywhere; }
.note-detail-dialog::before { content: '📝'; display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; background: #f6f0fc; font-size: 25px; }
.note-confirm-dialog { width: min(440px, calc(100vw - 28px)); text-align: center; }
.note-confirm-dialog::before { content: '💬'; display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; background: #fff6eb; font-size: 25px; }
#note-confirm-message { margin: 0; color: #607993; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1050px) { .notes-page .master-layout { grid-template-columns: minmax(0, 1fr); } }
.products-page .form-grid { grid-template-columns: minmax(0, 1fr); }
.products-page .master-form input, .products-page .master-form select, .products-page .master-form textarea { font-size: 16px; }
.product-card h3 { font-size: 24px; line-height: 1.5; }
.product-card-fields { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 12px 0; }
.product-card-fields > div { min-width: 70px; max-width: 100%; }
.product-card-fields dt { color: #668197; font-size: 14px; }
.product-card-fields dd { margin: 2px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.product-card-notes { margin-top: 14px; padding: 12px 16px; border: 1px solid #dce6ee; border-radius: 13px; background: #f3f7fb; }
.product-notes-label { color: #668197; font-size: 14px; font-weight: 700; }
.product-card-notes p { margin: 4px 0 0; font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.products-page .task-card-actions .button, .products-page .product-bulk .button { font-size: 15px; min-height: 44px; }
.product-bulk { margin: 14px 0; }
.category-state-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.product-category-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.product-category-actions .button { padding-inline: 8px; }
.product-confirm-dialog { width: min(440px, calc(100vw - 28px)); text-align: center; }
.product-confirm-dialog::before { content: '💬'; display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; background: #fff6eb; font-size: 25px; }
#product-confirm-message { margin: 0; color: #607993; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1050px) { .products-page .master-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .partner-card-actions { width: 100%; } .partner-card-info h3 { font-size: 21px; } .partner-detail-content { padding-inline: 12px; } }
@media (max-width: 1050px) { .tasks-page .task-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
 .task-card { padding: 16px; } .task-card-heading h3 { font-size: 19px; }
 .task-filter-bar { grid-template-columns: minmax(0, 1fr); }
 .task-card-edit { margin-left: 0; } .task-dialog { padding: 18px; }
 .task-calendar-heading .button { padding-inline: 10px; } .task-calendar-heading h2 { font-size: 17px; }
}
@media print {
 @page taskReport { size: A4 portrait; margin: 14mm; }
 body.is-printing-tasks > :not(.task-print-view) { display: none !important; }
 body.is-printing-tasks .task-print-view { display: block; page: taskReport; color: #000; font-family: 'Yu Gothic', Meiryo, sans-serif; font-size: 12pt; line-height: 1.5; }
 .task-print-view h1 { margin: 0 0 5mm; padding-bottom: 3mm; border-bottom: .5mm solid #000; font-size: 18pt; }
 .task-print-card { padding: 4mm; margin: 0 0 4mm; border: .3mm solid #000; border-radius: 2mm; break-inside: avoid; overflow-wrap: anywhere; }
 .task-print-card--long { break-inside: auto; }
 .task-print-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 3mm; }
 .task-print-heading h2 { margin: 0; font-size: 16pt; overflow-wrap: anywhere; }
 .task-print-checkbox { display: inline-block; flex: 0 0 5mm; width: 5mm; height: 5mm; border: .4mm solid #000; border-radius: .6mm; }
 .task-print-person { font-size: 12pt; }
 .task-print-meta { margin: 3mm 0; font-weight: 700; }
 .task-print-memo { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* Shipment redesign: scoped form, cards and modal preview. */
.shipment-page .shipment-layout { grid-template-columns: minmax(640px, 1fr) minmax(0, 1fr); }
.shipment-page .shipment-layout.is-readonly { grid-template-columns: 1fr; }
.shipment-page #shipment-form .form-grid { display: flex; flex-direction: column; gap: 14px; }
.shipment-page #shipment-form .field { width: 100%; min-width: 0; margin: 0; }
.shipment-page .shipment-field-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.shipment-page .shipment-item-fields { grid-template-columns: 1fr 2fr 1fr .8fr 1fr; }
.shipment-page #shipment-customer-name { margin-top: 8px; }
.shipment-page input[aria-haspopup=dialog] { cursor: pointer; background: #f4f8fc; }
.shipment-page .shipment-card { padding: 22px; border-radius: 20px; font-size: 17px; background: #fff; overflow-wrap: anywhere; }
.shipment-page .shipment-card h3 { font-size: 24px; margin: 0 0 12px; }
.shipment-page .shipment-card p { margin: 8px 0; white-space: pre-wrap; }
.shipment-page .shipment-card-dates { font-size: 16px; }
.shipment-page .shipment-carrier { font-size: 21px; font-weight: 700; }
.shipment-page .shipment-card.is-unissued { background: #fffbed; border-color: #e6d69e; }
.shipment-page .shipment-card.is-urgent { background: #fff1f3; border-color: #ec9cae; }
.shipment-page .shipment-alert { color: #ba244d; font-size: 23px; font-weight: 800; }
.shipment-page .shipment-card .record-card-actions { border-top: 1px solid #dce5ee; padding-top: 14px; margin-top: 16px; }
.shipment-page .shipment-edit-button { margin-right: 16px; }
.shipment-page .shipment-card input[type=checkbox], .shipment-page #shipment-bulk input { width: 22px; height: 22px; }
.shipment-wide-dialog { width: min(980px,calc(100vw - 30px)); }
.shipment-wide-dialog .quote-detail-field dt { font-size: 14px; }
.shipment-wide-dialog .quote-detail-field dd { font-size: 17px; }
.shipment-report-dialog { width: min(1480px,calc(100vw - 30px)); }
.shipment-report-dialog .shipment-report-preview { display: flex; gap: 18px; align-items: flex-start; background: #edf3f8; padding: 18px; }
.shipment-report-dialog .shipment-sheet { flex: 0 0 186mm; margin: 0; }
.shipment-calendar { width: min(470px,calc(100vw - 28px)); }
.shipment-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shipment-calendar-heading h2 { margin: 0; font-size: 20px; }
.shipment-calendar-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; margin-top: 24px; text-align: center; }
.shipment-calendar-days .button { padding: 8px 0; min-height: 42px; background: #fff; border-color: transparent; }
.shipment-calendar-days .button.is-selected { background: #fa5377; color: #fff; }
.shipment-weekday { font-size: 14px; font-weight: 700; padding-bottom: 12px; }
.shipment-print-choice { display: flex; align-items: center; gap: 12px; border: 1px solid #dce5ee; border-radius: 12px; padding: 14px; margin: 10px 0; background: #f5f8fc; font-size: 17px; }
.shipment-print-choice input { width: 22px; height: 22px; }
@media(max-width:1700px) { .shipment-page .shipment-layout { grid-template-columns: 1fr; } }
@media(max-width:650px) {
 .shipment-page .shipment-field-pair, .shipment-page .shipment-item-fields { grid-template-columns: 1fr; }
 .shipment-page .shipment-item-wide { grid-column: auto; }
 .shipment-page .shipment-card h3 { font-size: 21px; }
 .shipment-wide-dialog .quote-detail-fields { grid-template-columns: 1fr; }
 .shipment-calendar-heading { flex-wrap: wrap; }
 .shipment-page .shipment-edit-button { margin-right: 0; }
}
@media print { dialog::backdrop { display: none !important; } }

/* Shipment refinement: balanced cards and vertical report modal. */
.shipment-page .shipment-card h3 { font-size: 21px; }
.shipment-page .shipment-item-row > .form-actions { margin-top: 18px; clear: both; }
.shipment-page .shipment-card .record-card-actions { display: flex; justify-content: space-between; gap: 18px; }
.shipment-card-primary-actions, .shipment-card-secondary-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.shipment-card-secondary-actions { margin-left: auto; justify-content: flex-end; }
.shipment-report-dialog { width: min(850px,calc(100vw - 30px)); padding-top: 0; }
.shipment-report-toolbar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; background: #fff; border-bottom: 1px solid #dce5ee; }
.shipment-report-toolbar h2 { margin: 0; }
.shipment-report-toolbar .task-dialog-actions { margin: 0; }
.shipment-report-dialog .shipment-report-preview { display: block; }
.shipment-report-dialog .shipment-sheet { margin: 0 auto 18px; }
@media(max-width:650px) {
 .shipment-page .shipment-card h3 { font-size: 20px; }
 .shipment-page .shipment-card .record-card-actions { flex-direction: column; }
 .shipment-card-secondary-actions { margin-left: 0; justify-content: flex-start; }
 .shipment-report-toolbar .task-dialog-actions { width: 100%; }
}

/* Delivery requests: recipient-specific cards and A4 request form. */
.delivery-request-page .delivery-request-layout { grid-template-columns: minmax(310px,390px) minmax(0,1fr); }
.delivery-request-page .delivery-request-layout.is-readonly { grid-template-columns: minmax(0,1fr); }
.delivery-request-page .master-form .field { margin-bottom: 12px; }
.delivery-request-page #quote-form { font-size: 14px; line-height: 1.4; }
.delivery-request-page #quote-form .field label { margin-bottom: 5px; font-size: 12px; }
.delivery-request-page #quote-form :is(input:not([type=checkbox]):not([type=hidden]),select,textarea) { min-width: 0; min-height: 38px; padding: 8px 10px; font-size: 14px; line-height: 1.4; }
.delivery-request-page #quote-form textarea { min-height: 76px; }
.delivery-request-page #quote-form-panel > h2 { margin-bottom: 16px; font-size: 18px; }
.delivery-date-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.delivery-date-pair > .field { min-width: 0; }
.delivery-request-page #quote-form .delivery-recipient-group { margin-bottom: 12px; }
.delivery-request-page #quote-form .delivery-recipient-box { padding: 10px; }
.delivery-request-page #quote-form .delivery-recipient-row { margin-bottom: 8px; }
.delivery-request-page #quote-form .delivery-recipient-row:last-child { margin-bottom: 0; }
.delivery-request-page input[aria-haspopup=dialog] { cursor: pointer; background: #f4f8fc; }
.delivery-request-page .checkbox-row { gap: 18px; margin-bottom: 18px; }
.delivery-request-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.delivery-request-card { padding: 22px; border-radius: 20px; font-size: 17px; box-shadow: 0 3px 12px rgba(45,67,89,.04); }
.delivery-card-heading { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 12px; }
.delivery-request-card h3 { font-size: 22px; }
.delivery-request-card .badge { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.delivery-card-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 20px; margin: 18px 0; }
.delivery-card-fields > div { min-width: 0; }
.delivery-card-fields dt { color: var(--muted); font-size: 13px; }
.delivery-card-fields dd { margin: 3px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.delivery-answer-form { display: grid; grid-template-columns: minmax(100px,1fr) minmax(100px,1fr) auto; gap: 12px; align-items: end; padding: 16px; border: 1px solid #dce5ee; border-radius: 14px; background: #f3f8fc; }
.delivery-answer-form .field { margin: 0; }
.delivery-request-card .record-card-actions { padding-top: 14px; border-top: 1px solid #dce5ee; }
.delivery-report-dialog { width: min(850px,calc(100vw - 30px)); padding-top: 0; }
.delivery-report-toolbar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px 0; border-bottom: 1px solid #dce5ee; background: #fff; }
.delivery-report-toolbar h2, .delivery-report-toolbar .task-dialog-actions { margin: 0; }
#quote-report-preview { margin-top: 18px; padding: 18px; overflow-x: auto; background: #edf3f8; }
.delivery-sheet { box-sizing: border-box; width: 186mm; height: 273mm; padding: 3mm; margin: 0 auto; color: #000; background: #fff; font-family: 'Yu Gothic',Meiryo,sans-serif; font-size: 10pt; line-height: 1.35; }
.delivery-sheet .delivery-sheet-title { position: relative; min-height: 17mm; }
.delivery-sheet .delivery-sheet-title h1 { margin: 0; font-size: 19pt; letter-spacing: .3em; text-align: center; }
.delivery-sheet .delivery-sheet-title > span { position: absolute; right: 0; bottom: 3mm; font-size: 9pt; }
.delivery-sheet .delivery-addressee { height: 9mm; margin: 0; font-size: 13pt; text-align: left; overflow-wrap: anywhere; white-space: pre-wrap; }
.delivery-sheet .delivery-greeting { margin: 1mm 0 3mm; font-size: 10pt; }
.delivery-sheet .delivery-sheet-table { table-layout: fixed; width: 100%; border-collapse: collapse; border: .5mm solid #000; font-size: 9pt; }
.delivery-sheet .delivery-sheet-table th, .delivery-sheet .delivery-sheet-table td { border: .25mm solid #000; padding: 1mm 1.5mm; color: #000; background: #fff; white-space: normal; vertical-align: middle; }
.delivery-sheet .delivery-sheet-table th { width: 34mm; font-size: 9pt; }
.delivery-sheet .delivery-sheet-table .delivery-side-label { width: 8mm; padding: 1mm; writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .05em; text-align: center; }
.delivery-sheet-value { font-size: 11pt; height: 8mm; white-space: pre-wrap; overflow-wrap: anywhere; }
.delivery-sheet-value.is-address { height: 14mm; }
.delivery-sheet-notes { font-size: 11pt; height: 24mm; white-space: pre-wrap; overflow-wrap: anywhere; }
.delivery-sheet-response { height: 12mm; }
.delivery-sheet .delivery-cargo-table { margin-top: 3mm; }
.delivery-sheet-cargo { font-size: 11pt; height: 57mm; white-space: pre-wrap; overflow-wrap: anywhere; }
.delivery-sheet-footer { margin-top: 10mm; font-size: 10pt; }
.delivery-sheet-footer p { margin: 0 0 5mm; }
.delivery-sheet-sign { display: flex; justify-content: flex-end; align-items: end; gap: 3mm; font-size: 10pt; font-weight: 700; }
.delivery-reply-fax { margin-right:auto;white-space:nowrap;font-size:12pt;font-weight:800; }
.delivery-sheet-staff { flex-shrink:0;font-size:11pt;width: 27mm; height: 9mm; padding-bottom: 1mm; border-bottom: .4mm solid #000; text-align: center; overflow-wrap: anywhere; }
.delivery-request-page .quote-print-view.is-preparing { display: block; position: absolute; left: -10000px; top: 0; }
@media(max-width:1150px) { .delivery-request-page .delivery-request-layout { grid-template-columns: 1fr; } }
@media(max-width:650px) {
 .delivery-answer-form { grid-template-columns: 1fr; }
 .delivery-card-fields { grid-template-columns: 1fr; }
 .delivery-request-filters { gap: 10px; }
 .delivery-report-toolbar .task-dialog-actions { width: 100%; }
}
@media print {
 /* Keep browser-generated title/URL outside the printable area; sheet padding supplies the physical margins. */
 @page quoteReport { size: A4 portrait; margin: 0; }
 body.delivery-request-page.is-printing-quote .quote-print-view { position: static; display: block; }
 .delivery-request-page .quote-print-view .delivery-sheet { page: quoteReport; width:210mm;height:297mm;padding:15mm; margin: 0; break-inside: avoid; break-after: auto; }
 .delivery-request-page .quote-print-view .delivery-sheet h1 { margin: 0; font-size: 19pt; }
 .delivery-request-page .quote-print-view .delivery-sheet h2 { margin: 0; font-size: 13pt; }
 .delivery-request-page .quote-print-view .delivery-sheet table { table-layout: fixed; font-size: 9pt; }
 .delivery-request-page .quote-print-view .delivery-sheet th, .delivery-request-page .quote-print-view .delivery-sheet td { padding: 1mm 1.5mm; border: .25mm solid #000; }
 .delivery-request-page .quote-print-view .delivery-sheet .delivery-side-label { padding: 1mm; }
}

/* Delivery request refinements: grouped recipients and persistent filters. */
.delivery-recipient-group { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.delivery-recipient-group legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 800; }
.delivery-recipient-group legend small { margin-left: 6px; color: var(--muted); font-size: 11px; font-weight: 400; }
.delivery-required { color: #bd3158; }
.delivery-recipient-box { padding: 12px; border: 1px solid #c8d9eb; border-radius: 14px; background: #f0f5fb; }
.delivery-request-page .master-form .delivery-recipient-row { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 10px; margin: 0 0 10px; }
.delivery-request-page .master-form .delivery-recipient-row:last-child { margin-bottom: 0; }
.delivery-request-page .delivery-recipient-label { margin: 0; padding: 5px 4px; border-radius: 6px; background: #52657c; color: #fff; text-align: center; font-size: 12px; }
.delivery-request-page .delivery-recipient-label.is-required { background: #079477; }
.delivery-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 1 1 280px; min-width: 0; }
.delivery-carrier-badge { display: inline-block; padding: 7px 12px; border: 1px solid #b9d7e6; border-radius: 10px; background: #eaf4fb; color: #315d7c; font-size: 20px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; max-width: 100%; }
.delivery-request-card .delivery-card-title h3 { font-size: 20px; line-height: 1.4; }
.delivery-request-card .delivery-status-badge { margin-left: auto; padding: 8px 13px; border: 1px solid; border-radius: 12px; font-size: 17px; line-height: 1.4; }
.delivery-status-badge.is-waiting { color: #865b13; background: #fff3cf; border-color: #e9d294; }
.delivery-status-badge.is-answered { color: #166b58; background: #e5f5ed; border-color: #a3d9c2; }
.delivery-status-badge.is-deleted { color: #59637c; background: #eceff6; border-color: #cbd2e2; }
.delivery-filter-panel { margin: 0 0 12px; padding: 16px; border: 1px solid #c9d9e8; border-radius: 16px; background: #f3f7fc; box-shadow: 0 4px 12px rgba(45,67,89,.06); }
.delivery-filter-panel .field { margin-bottom: 12px; }
.delivery-filter-panel > .field:last-child, .delivery-filter-panel .delivery-request-filters .field { margin-bottom: 0; }
.delivery-filter-panel .delivery-request-filters { margin-bottom: 12px; }
@media(max-width:650px) {
 .delivery-filter-panel { padding: 12px; }
 .delivery-filter-panel label { margin-bottom: 4px; }
 .delivery-filter-panel input, .delivery-filter-panel select { min-height: 40px; padding: 8px 10px; }
 .delivery-carrier-badge, .delivery-request-card .delivery-card-title h3 { font-size: 18px; }
 .delivery-request-card .delivery-status-badge { font-size: 16px; }
}

/* Keep filters outside the scrolling cards so neither can cover the other. */
@media screen {
 .delivery-request-page .master-list { position: sticky; top: calc(var(--header-height) + 10px); display: flex; flex-direction: column; height: calc(100vh - var(--header-height) - 24px); height: calc(100dvh - var(--header-height) - 24px); min-height: 480px; padding: 16px; }
 .delivery-request-page .master-list .list-search-panel > h2 { margin-bottom: 8px; }
 .delivery-request-page .delivery-filter-panel { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px 10px; margin-bottom: 6px; padding: 8px 10px; border-radius: 12px; }
 .delivery-request-page .delivery-filter-panel .field { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
 .delivery-request-page .delivery-filter-panel > .field:first-child { grid-column: 1 / -1; }
 .delivery-request-page .delivery-filter-panel .delivery-request-filters { display: contents; }
 .delivery-request-page .delivery-filter-panel label { flex: 0 0 auto; margin: 0; font-size: 12px; line-height: 1.3; }
 .delivery-request-page .delivery-filter-panel input, .delivery-request-page .delivery-filter-panel select { min-width: 0; min-height: 32px; padding: 5px 8px; font-size: 13px; line-height: 1.4; }
 .delivery-request-page #quote-status { min-height: 26px; padding: 3px 0; }
 .delivery-request-page .master-list .list-search-panel > h2, .delivery-request-page .delivery-filter-panel, .delivery-request-page #quote-status { flex: 0 0 auto; }
 .delivery-request-page #quote-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; align-content: start; grid-auto-rows: max-content; padding: 2px 5px 6px 2px; }
 .delivery-request-page .delivery-request-card { padding: 16px; font-size: 16px; line-height: 1.35; }
 .delivery-request-page .delivery-card-heading { gap: 8px; }
 .delivery-request-page .delivery-carrier-badge { padding: 5px 10px; font-size: 18px; line-height: 1.35; }
 .delivery-request-page .delivery-card-title h3 { font-size: 18px; line-height: 1.35; }
 .delivery-request-page .delivery-status-badge { padding: 6px 10px; font-size: 16px; line-height: 1.35; }
 .delivery-request-page .delivery-card-fields { gap: 6px 14px; margin: 12px 0; }
 .delivery-request-page .delivery-card-fields dd { margin-top: 2px; font-size: 16px; }
 .delivery-request-page .delivery-answer-form { gap: 8px; padding: 12px; }
 .delivery-request-page .delivery-answer-form label { margin-bottom: 4px; }
 .delivery-request-page .delivery-answer-form input { min-height: 40px; padding: 8px 10px; font-size: 15px; }
 .delivery-request-page .delivery-answer-form .button { min-height: 40px; padding: 8px 12px; }
 .delivery-request-page .delivery-request-card .record-card-actions { margin-top: 10px; padding-top: 10px; }
}
@media screen and (max-width:500px) {
 .delivery-request-page .delivery-filter-panel { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 8px; }
 .delivery-request-page .delivery-filter-panel > .field:last-child { grid-column: 1 / -1; }
 .delivery-request-page .delivery-filter-panel .delivery-request-filters .field { display: block; }
 .delivery-request-page .delivery-filter-panel .delivery-request-filters label { display: block; margin-bottom: 3px; }
}
@media screen and (max-width:650px) {
 .delivery-request-page .master-list { top: calc(var(--header-height) + 6px); }
 .delivery-request-page .delivery-carrier-badge, .delivery-request-page .delivery-card-title h3 { font-size: 17px; }
 .delivery-request-page .delivery-status-badge { font-size: 15px; }
}

/* Compact master lists; task and user-management layouts stay independent. */
@media screen {
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list { position: sticky; top: calc(var(--header-height) + 10px); display: flex; flex-direction: column; height: calc(100vh - var(--header-height) - 24px); height: calc(100dvh - var(--header-height) - 24px); min-height: 480px; padding: 16px; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list .list-search-panel > h2 { flex: 0 0 auto; margin-bottom: 8px; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list .list-search-panel > .filter-bar { flex: 0 0 auto; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 0 0 6px; padding: 8px 10px; border: 1px solid #c9d9e8; border-radius: 12px; background: #f3f7fc; box-shadow: 0 4px 12px rgba(45,67,89,.06); }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .filter-bar > input { grid-column: 1 / -1; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .filter-bar > :is(input,select), .shipment-page #shipment-bulk select { min-width: 0; min-height: 32px; padding: 5px 8px; font-size: 13px; line-height: 1.4; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list .list-results-panel > .list-status { flex: 0 0 auto; min-height: 26px; padding: 3px 0; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; padding: 2px 5px 6px 2px; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list-scroll:focus-visible { outline: 2px solid #74b9ac; outline-offset: 2px; border-radius: 8px; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list-scroll .record-list { align-content: start; grid-auto-rows: max-content; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list-scroll :is(.task-card,.shipment-card) { padding: 16px; font-size: 16px; line-height: 1.35; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list-scroll h3 { font-size: 18px; line-height: 1.35; }
 :is(.notes-page,.partners-page) .partner-card { gap: 10px; }
 :is(.notes-page,.partners-page) .partner-card-info h3 { margin-top: 4px; }
 .notes-page .note-card-heading h3 { margin: 0; }
 .notes-page .note-card-date { margin-top: 6px; font-size: 16px; }
 .shipment-page .shipment-card h3 { margin-bottom: 6px; }
 .shipment-page .shipment-card p { margin: 4px 0; }
 .shipment-page .shipment-carrier, .shipment-page .shipment-alert { font-size: 18px; }
 :is(.shipment-page,.products-page) .master-list-scroll :is(.record-card-actions,.task-card-actions) { margin-top: 10px; padding-top: 10px; gap: 7px; }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list-scroll .button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
 .products-page .product-card-fields { gap: 6px 14px; margin: 10px 0; }
 .products-page .product-card-fields dt, .products-page .product-notes-label { font-size: 13px; }
 .products-page .product-card-fields dd, .products-page .product-card-notes p { font-size: 16px; }
 .products-page .product-card-notes { margin-top: 10px; padding: 8px 12px; }
 .products-page .product-bulk { gap: 7px; margin: 10px 0; }
 .shipment-page #shipment-bulk { flex: 0 0 auto; align-items: center; gap: 6px; font-size: 12px; }
 .shipment-page #shipment-bulk select { flex: 1 1 150px; width: auto; }
 .shipment-page #shipment-bulk .button { min-height: 32px; padding: 5px 8px; font-size: 12px; }
}
@media screen and (max-width:650px) {
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list { top: calc(var(--header-height) + 6px); }
 :is(.shipment-page,.notes-page,.partners-page,.products-page) .master-list-scroll h3 { font-size: 17px; }
}

/* Home dashboard: six pastel cards with server-counted active records. */
.dashboard-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.dashboard-card { --card-tint: #edf5fc; --card-border: #bed6e9; --card-ink: #315d7c; display: flex; flex-direction: column; min-width: 0; gap: 14px; padding: 20px; border: 1px solid var(--card-border); border-radius: 20px; background: var(--card-tint); box-shadow: 0 5px 16px rgba(35,58,79,.05); }
.dashboard-card--shipping { --card-tint: #fff5e5; --card-border: #ecd3a7; --card-ink: #856020; }
.dashboard-card--notes { --card-tint: #f5effb; --card-border: #d9c8eb; --card-ink: #715394; }
.dashboard-card--partners { --card-tint: #eaf7f1; --card-border: #b5dccc; --card-ink: #246956; }
.dashboard-card--products { --card-tint: #fff0f4; --card-border: #ebc1cf; --card-ink: #9b4b67; }
.dashboard-card--tasks { --card-tint: #eef2fc; --card-border: #c7d1eb; --card-ink: #4e6398; }
.dashboard-card-heading { display: flex; align-items: center; gap: 10px; }
.dashboard-card-heading h2 { margin: 0; color: var(--card-ink); font-size: 21px; line-height: 1.35; }
.dashboard-card-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.75); font-size: 25px; }
.dashboard-card-count { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--card-ink); font-size: 14px; }
.dashboard-card-count > div { display: flex; align-items: baseline; gap: 5px; }
.dashboard-card-count strong { font-size: 32px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dashboard-card .dashboard-card-link { margin-top: auto; padding: 9px 8px; min-height: 40px; border-color: var(--card-border); background: rgba(255,255,255,.85); color: var(--card-ink); font-size: 14px; text-decoration: none; }
.dashboard-count-error { margin: -6px 0 0; color: #8c4a53; font-size: 13px; }
@media(max-width:1100px) { .dashboard-grid { grid-template-columns: minmax(0,1fr); } }

/* Status sections replace accordions; list operations remain available in each state. */
.task-state-section { margin-top: 14px; }
.task-state-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #cedfeb; border-radius: 13px; color: #305473; background: #eff5fa; font-weight: 800; }
.task-state-section .task-archive-title::before { content: none; }
.task-state-heading .badge { margin-left: 8px; }
.task-state-section .task-cards { margin-top: 12px; }
.tasks-page .task-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; padding: 8px 10px; }
.tasks-page .task-filter-bar .field { display: flex; align-items: center; gap: 6px; }
.tasks-page .task-filter-bar .field:last-child { grid-row: 1; grid-column: 1 / -1; }
.tasks-page .task-filter-bar label { margin: 0; flex-shrink: 0; font-size: 12px; }
.tasks-page .task-filter-bar input, .tasks-page .task-filter-bar select { min-width: 0; width: 100%; min-height: 32px; padding: 5px 8px; font-size: 13px; }
@media screen and (max-width: 900px) {
 :is(.delivery-request-page, .shipment-page, .notes-page, .partners-page, .products-page) .master-form { display: none; }
 :is(.delivery-request-page, .shipment-page, .notes-page, .partners-page, .products-page) .master-layout { grid-template-columns: minmax(0, 1fr); }
 :is(.delivery-request-page, .shipment-page, .notes-page, .partners-page, .products-page) [data-desktop-edit], .notes-page #note-detail-edit { display: none; }
}
@media screen and (max-width: 650px) {
 .tasks-page .task-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .tasks-page .task-filter-bar .field:nth-child(2) { grid-column: 1 / -1; }
 .tasks-page .task-filter-bar .field:nth-child(3) { grid-column: 2; grid-row: 2; }
 .tasks-page .task-filter-bar .field:nth-child(3) label { display: none; }
}
/* One additional menu; keep the complete list readable at normal desktop heights. */
.sidebar-nav { padding-block: 12px; }
.sidebar-link { min-height: 56px; margin-bottom: 3px; gap: 10px; padding-block: 6px; }
.sidebar-link-copy strong { font-size: 17px; }
.sidebar-icon { flex-basis: 36px; width: 36px; height: 36px; }
@media screen and (max-height: 840px) {
 .sidebar-nav { padding-block: 7px; }
 .sidebar-link { min-height: 44px; margin-bottom: 2px; padding-block: 4px; }
 .sidebar-link-copy strong { font-size: 16px; line-height: 1.25; }
 .sidebar-link-copy small { line-height: 1.35; }
 .sidebar-icon { flex-basis: 32px; width: 32px; height: 32px; }
 .sidebar-footer { padding-block: 10px; }
}

/* Separate the fixed search panel from the white card-list panel. */
@media screen {
 .panel.master-list { padding:0;border:0;background:transparent;box-shadow:none;display:flex;flex-direction:column;gap:14px;min-width:0; }
 .master-list>.list-search-panel,.master-list>.list-results-panel { min-width:0;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 5px 18px rgba(38,68,86,.05);padding:16px; }
 .master-list>.list-search-panel { flex:0 0 auto; }
 .master-list>.list-results-panel { display:flex;flex-direction:column;gap:0; }
 :is(.delivery-request-page,.shipment-page,.notes-page,.partners-page,.products-page) .panel.master-list { padding:0; }
 :is(.delivery-request-page,.shipment-page,.notes-page,.partners-page,.products-page) .master-list>.list-results-panel { flex:1 1 auto;min-height:0; }
 .master-list .list-search-panel>.filter-bar,.master-list .list-search-panel>.delivery-filter-panel { margin-bottom:0; }
 .master-list .list-results-panel>.list-status { flex:0 0 auto; }
 .delivery-request-page #quote-deleted-actions { flex:0 0 auto;gap:10px;margin:0 0 14px; }
 .shipment-page #shipment-bulk { margin-bottom:12px; }
 .tasks-page .panel.master-list { border-radius:0;box-shadow:none; }
 .tasks-page .task-list-heading { margin-bottom:12px; }
 .tasks-page .list-results-panel>.task-state-section:first-of-type,.users-page .list-results-panel>.task-state-section:first-of-type { margin-top:12px; }
}
@media screen and (max-width:650px) {
 .panel.master-list { gap:12px; }
 .master-list>.list-search-panel,.master-list>.list-results-panel { padding:12px;border-radius:18px; }
 .delivery-request-page #quote-deleted-actions { gap:8px;margin-bottom:14px; }
}

/* Home menu grouped into four categories, with four compact cards per row. */
.dashboard-categories { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 18px; }
.dashboard-category { --category-color:#4489a1;min-width:0; }
.dashboard-category--information { --category-color:#7f6ba9; }.dashboard-category--management { --category-color:#b46c86; }.dashboard-category--daily { --category-color:#458c75; }
.dashboard-category-title { display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:8px 12px;border-left:5px solid var(--category-color);border-radius:5px 12px 12px 5px;background:rgba(255,255,255,.85);color:var(--category-color);font-size:18px;line-height:1.4; }
.dashboard-category .dashboard-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.dashboard-category .dashboard-card { gap:10px;padding:15px;border-radius:17px; }
.dashboard-category .dashboard-card-heading { gap:8px; }
.dashboard-category .dashboard-card-heading h3 { margin:0;color:var(--card-ink);font-size:18px;line-height:1.4; }
.dashboard-category .dashboard-card-icon { flex-basis:34px;width:34px;height:34px;border-radius:10px;font-size:21px; }
.dashboard-category .dashboard-card-count { font-size:12px;gap:6px;flex-wrap:wrap; }
.dashboard-category .dashboard-card-count strong { font-size:26px; }
.dashboard-category .dashboard-card-link { min-height:36px;font-size:12px;padding:7px 5px; }
.dashboard-card--users { --card-tint:#fff4e9;--card-border:#e6c9ac;--card-ink:#8a623a; }
.dashboard-card--calendar { --card-tint:#e8f7f6;--card-border:#b3dcd7;--card-ink:#2b7970; }
.dashboard-card-description { margin:0;color:var(--card-ink);font-size:12px;line-height:1.6; }
@media(max-width:1100px) { .dashboard-categories { grid-template-columns:minmax(0,1fr);gap:20px; } }
@media(max-width:900px) { .dashboard-category .dashboard-grid { grid-template-columns:minmax(0,1fr); }.dashboard-category-title { font-size:17px; }.dashboard-category .dashboard-card { padding:16px; } }

/* Match the delivery quote input density across the other business pages. */
:is(.shipment-page,.notes-page,.partners-page,.products-page,.tasks-page,.users-page) .master-form { font-size:14px;line-height:1.4; }
:is(.shipment-page,.notes-page,.partners-page,.products-page,.tasks-page,.users-page) .master-form > h2 { margin-bottom:16px;font-size:18px; }
:is(.shipment-page,.notes-page,.partners-page,.products-page,.tasks-page,.users-page) .master-form .field { margin-bottom:12px; }
:is(.shipment-page,.notes-page,.partners-page,.products-page,.tasks-page,.users-page) .master-form .field label { margin-bottom:5px;font-size:12px; }
:is(.shipment-page,.notes-page,.partners-page,.products-page,.tasks-page,.users-page) .master-form :is(input:not([type=checkbox]):not([type=hidden]),select,textarea) { min-width:0;min-height:38px;padding:8px 10px;font-size:14px;line-height:1.4; }
:is(.shipment-page,.notes-page,.partners-page,.products-page,.tasks-page,.users-page) .master-form textarea { min-height:76px; }
.shipment-page #shipment-form .form-grid { gap:12px; }
.shipment-page #shipment-form .field { margin:0; }
.shipment-page #shipment-form .shipment-field-pair { gap:10px; }
.shipment-page #shipment-form .shipment-item-editor { gap:12px;margin:12px 0; }
.tasks-page #task-form #task-description { line-height:1.4; }
.tasks-page #task-form .task-due-open { min-height:38px;padding:8px 10px;font-size:14px;line-height:1.4; }
/* Delivery quote cards: two compact metadata rows on wider cards. */
.delivery-request-page .delivery-request-card{container-type:inline-size;padding:12px}.delivery-request-page .delivery-card-fields{grid-template-columns:repeat(10,minmax(0,1fr));gap:6px 10px;margin:8px 0}.delivery-request-page .delivery-card-fields>div{grid-column:span 2}.delivery-request-page .delivery-card-fields>div:first-child{grid-column:span 3}.delivery-request-page .delivery-card-fields>div:nth-child(2){grid-column:span 7}.delivery-request-page .delivery-card-fields dt{font-size:11px;line-height:1.3}.delivery-request-page .delivery-card-fields dd{font-size:14px;line-height:1.35;margin:2px 0 0}.delivery-request-page .delivery-answer-form{padding:10px}.delivery-request-page .delivery-request-card .record-card-actions{margin-top:8px;padding-top:8px}
@container(max-width:600px){.delivery-request-page .delivery-card-fields{grid-template-columns:repeat(6,minmax(0,1fr))}.delivery-request-page .delivery-card-fields>div:first-child,.delivery-request-page .delivery-card-fields>div:nth-child(2){grid-column:span 3}}
@container(max-width:400px){.delivery-request-page .delivery-card-fields{grid-template-columns:repeat(4,minmax(0,1fr))}.delivery-request-page .delivery-card-fields>div:first-child,.delivery-request-page .delivery-card-fields>div:nth-child(2){grid-column:span 2}}

/* Customer substring search supplements the existing delivery customer select. */
.delivery-customer-search{position:relative;min-width:0;margin-bottom:6px}.delivery-customer-options{position:absolute;z-index:25;inset:calc(100% + 4px) 0 auto;max-height:240px;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;padding:4px;border:1px solid #b7cfdf;border-radius:10px;background:#fff;box-shadow:0 8px 24px #193c5b26}.delivery-customer-options[hidden]{display:none}.delivery-customer-option{display:block;width:100%;box-sizing:border-box;border:0;border-radius:6px;padding:10px 12px;text-align:left;background:#fff;color:#16324b;font:inherit;font-size:13px;line-height:1.45;white-space:normal;overflow-wrap:anywhere;cursor:pointer;touch-action:manipulation}.delivery-customer-option:hover,.delivery-customer-option[aria-selected=true]{background:#e8f5f1;color:#176b59}.delivery-customer-empty{margin:0;padding:10px;font-size:12px;color:#63788c;line-height:1.6}

/* Delivery customer: one combined searchable selector. */
.delivery-request-page .delivery-customer-search{display:grid;grid-template-columns:minmax(0,1fr) 36px;align-items:stretch;margin-bottom:0;gap:0}.delivery-request-page #quote-customer-search{box-sizing:border-box;width:100%;min-width:0;height:38px;min-height:38px;margin:0;border-top-right-radius:0;border-bottom-right-radius:0}.delivery-request-page #quote-customer-toggle{box-sizing:border-box;height:38px;min-height:38px;min-width:0;margin:0;padding:4px;border:1px solid #b9c8d5;border-top-left-radius:0;border-bottom-left-radius:0;background:#f0f6fa;color:#456579}.delivery-request-page #quote-customer[hidden]{display:none}
