:root {
  --ink: #152d35;
  --muted: #6d7e83;
  --line: #e4eaeb;
  --paper: #ffffff;
  --canvas: #f4f7f7;
  --teal: #0b6b63;
  --teal-dark: #07544e;
  --teal-soft: #e6f3f0;
  --orange: #d98542;
  --shadow: 0 16px 45px rgba(19, 47, 54, .08);
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--teal); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: "Consolas", monospace; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mt { margin-top: 18px; }
.mb0 { margin-bottom: 0; }
.w100 { width: 100%; }

/* 登录 */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.08fr) minmax(460px, .92fr); background: #fff; }
.login-brand { position: relative; overflow: hidden; padding: 64px clamp(42px, 7vw, 110px); color: #f4fffc; background: linear-gradient(145deg, #073e3b 0%, #0b6b63 58%, #20867b 100%); display: flex; flex-direction: column; justify-content: space-between; }
.login-brand::before, .login-brand::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.login-brand::before { width: 600px; height: 600px; right: -230px; top: -180px; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.02); }
.login-brand::after { width: 280px; height: 280px; left: -130px; bottom: 40px; }
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; font-weight: 700; font-size: 20px; letter-spacing: 2px; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); }
.brand-mark svg { width: 24px; height: 24px; }
.login-hero { position: relative; z-index: 1; max-width: 580px; margin: 70px 0; }
.login-hero .eyebrow { color: #a9d8ce; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 700; }
.login-hero h1 { font-size: clamp(34px, 4vw, 54px); line-height: 1.2; margin: 20px 0; letter-spacing: -1px; }
.login-hero p { font-size: 16px; color: #c6e3dd; line-height: 1.9; max-width: 480px; }
.login-footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; }
.login-features { display: flex; flex-wrap: wrap; gap: 12px 24px; color: #d9eee9; font-size: 13px; }
.login-features span::before { content: "✓"; margin-right: 8px; color: #8fd1c2; }
.login-signature { margin-left: auto; color: #a9d8ce; font-size: 12px; font-weight: 400; letter-spacing: 1.2px; white-space: nowrap; }
.login-panel { display: grid; place-items: center; padding: 45px; }
.login-box { width: min(420px, 100%); }
.login-box h2 { font-size: 28px; margin: 0 0 8px; }
.login-box > p { margin: 0 0 30px; color: var(--muted); }
.login-tabs { display: flex; background: #f0f4f4; border-radius: 11px; padding: 4px; margin-bottom: 26px; }
.login-tabs button { flex: 1; border: 0; padding: 10px; color: var(--muted); background: transparent; border-radius: 8px; }
.login-tabs button.active { background: #fff; color: var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,.06); font-weight: 600; }
.demo-note { margin-top: 22px; padding: 14px 16px; border-radius: 10px; background: #f5f8f8; color: var(--muted); font-size: 12px; line-height: 1.8; }

/* 表单 */
.field { margin-bottom: 17px; }
.field label { display: flex; justify-content: space-between; margin-bottom: 7px; font-weight: 600; font-size: 13px; }
.field label .optional { font-weight: 400; color: #94a1a5; font-size: 12px; }
.input, .field input, .field select, .field textarea, .table-input { width: 100%; border: 1px solid #dce5e6; background: #fff; border-radius: 9px; padding: 11px 12px; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .table-input:focus { border-color: #70aaa3; box-shadow: 0 0 0 3px rgba(11,107,99,.09); }
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.required { color: #c75e4a; }
.form-help { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.form-help.field-error { color: #b54735; font-weight: 500; }
.form-help.field-error:empty { display: none; }
.file-drop { border: 1.5px dashed #b9ccca; background: #f7fbfa; border-radius: 12px; padding: 24px; text-align: center; }
.file-drop input { border: 0; padding: 10px 0 0; box-shadow: none !important; background: transparent; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn { border: 1px solid transparent; border-radius: 9px; padding: 10px 17px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 5px 13px rgba(11,107,99,.17); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: #fff; border-color: #dce5e6; color: var(--ink); }
.btn-secondary:hover { border-color: #9fbab7; }
.btn-soft { background: var(--teal-soft); color: var(--teal); }
.btn-danger { background: #fff1ed; color: #b9503c; }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 13px 20px; width: 100%; }
.link-btn { border: 0; background: none; padding: 4px; color: var(--teal); font-weight: 600; }

/* 应用框架 */
.shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { background: #103c3b; color: #d8e9e5; padding: 25px 16px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20; }
.sidebar .brand-lockup { padding: 0 9px 25px; font-size: 17px; letter-spacing: 1px; }
.book-chip { margin: 0 6px 24px; padding: 13px; border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.06); }
.book-chip strong { display: block; color: #fff; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; }
.book-chip span { color: #9ec2bb; font-size: 11px; }
.nav { display: grid; gap: 6px; }
.nav button { border: 0; background: transparent; color: #b8d0cc; padding: 12px 14px; border-radius: 9px; text-align: left; display: flex; align-items: center; gap: 11px; }
.nav button:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav button.active { background: #f0f8f6; color: #0a5d56; font-weight: 700; }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.sidebar-bottom { margin-top: auto; padding: 16px 6px 0; border-top: 1px solid rgba(255,255,255,.1); }
.user-row { display: flex; align-items: center; gap: 10px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: #d4ebe5; color: #10584f; display: grid; place-items: center; font-weight: 700; flex: none; }
.user-row strong { color: #fff; display: block; font-size: 13px; }
.user-row span { color: #9fc0bb; font-size: 11px; }
.logout { color: #a9c8c2; margin-left: auto; border: 0; background: none; padding: 6px; }
.main { min-width: 0; }
.topbar { height: 75px; padding: 0 32px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.topbar h2 { margin: 0; font-size: 17px; }
.topbar-right { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 18px; }
.global-search { width: min(650px, 52vw); display: flex; align-items: center; gap: 8px; padding: 4px 5px 4px 12px; border: 1px solid #dce7e5; border-radius: 10px; background: #f5f9f8; }
.global-search > span { color: var(--teal); font-size: 19px; line-height: 1; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.global-search select { flex: none; max-width: 122px; border: 0; border-left: 1px solid #dce7e5; outline: 0; padding: 5px 3px 5px 8px; background: transparent; color: var(--ink); font-size: 12px; }
.global-search:focus-within { border-color: #82b3ac; box-shadow: 0 0 0 3px rgba(11,107,99,.07); }
.live-dot::before { content: ""; width: 7px; height: 7px; background: #49a184; display: inline-block; border-radius: 50%; margin-right: 7px; }
.mobile-menu { display: none; }
.content { padding: 30px 32px 45px; max-width: 1550px; margin: auto; }
.page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 25px; }
.page-heading h1 { font-size: 25px; margin: 0 0 7px; letter-spacing: -.5px; }
.page-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 数据展示 */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; padding: 21px; border: 1px solid #e8eeee; border-radius: var(--radius); box-shadow: 0 4px 15px rgba(18,52,56,.025); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.stat-icon { width: 33px; height: 33px; border-radius: 9px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; font-size: 16px; }
.stat-value { font-size: 31px; font-weight: 700; margin-top: 12px; letter-spacing: -1px; }
.stat-foot { margin-top: 5px; color: #8b999d; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 20px; }
#content > .card + .card, #content > .card + .stats-grid { margin-top: 20px; }
.card { background: #fff; border: 1px solid #e6eded; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(18,52,56,.025); overflow: hidden; }
.card-header { padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #edf1f1; }
.card-header h3 { margin: 0; font-size: 15px; }
.card-body { padding: 21px; }
.card-body.flush { padding: 0; }
.todo-list { display: grid; }
.todo-group + .todo-group { border-top: 7px solid var(--canvas); }
.todo-category { display: flex; align-items: center; justify-content: space-between; padding: 11px 20px; background: #f6f9f9; color: var(--teal-dark); font-size: 12px; }
.todo-category span { min-width: 23px; padding: 2px 7px; border-radius: 12px; background: var(--teal-soft); text-align: center; }
.todo-subgroup { border-bottom: 1px solid #edf1f1; background: #fbfdfc; }
.todo-subgroup summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 15px 10px 25px; color: var(--teal-dark); cursor: pointer; font-size: 13px; user-select: none; }
.todo-subgroup summary:hover { background: #f0f7f5; }
.todo-subgroup summary::marker { color: var(--teal); }
.todo-subgroup summary span { color: var(--teal-dark); font-size: 13px; font-weight: 700; }
.todo-subgroup summary span::after { content: ' · 点击展开'; }
.todo-subgroup[open] summary span::after { content: ' · 点击收起'; }
.todo-subgroup[open] summary { border-bottom: 1px solid #edf1f1; }
.todo-subgroup-items .todo-item { padding-left: 35px; background: #fff; }
.todo-item { display: flex; gap: 12px; align-items: center; padding: 15px 20px; border-bottom: 1px solid #edf1f1; }
.todo-item:last-child { border-bottom: 0; }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.todo-item strong { display: block; font-size: 13px; }
.todo-item > div > strong, .cell-title > strong { font-size: 13px; }
.todo-item .todo-progress-state { display: inline-flex; margin: 0 0 0 8px; padding: 2px 6px; border-radius: 4px; background: var(--teal-soft); color: var(--teal-dark); font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: 1px; }
.todo-item span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.todo-item > div > span, .cell-title > .cell-sub { font-size: 13px; font-weight: 500; }
.todo-item .link-btn { margin-left: auto; }
.todo-shipment-meta { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.todo-shipment-meta > div { min-width: 110px; }
.todo-shipment-meta span { font-size: 12px; font-weight: 700; }
.todo-shipment-meta strong { margin-top: 4px; font-size: 11px; font-weight: 500; }
@media (max-width: 760px) {
  .todo-item { flex-wrap: wrap; }
  .todo-shipment-meta { order: 3; width: 100%; margin: 4px 0 0 18px; gap: 24px; }
  .todo-shipment-meta > div { min-width: 0; flex: 1; }
}
.empty { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 30px; opacity: .45; margin-bottom: 10px; }
.filter-bar { display: flex; gap: 10px; padding: 15px 18px; background: #fff; border: 1px solid #e6eded; border-radius: 12px; margin-bottom: 15px; }
.filter-bar .input { width: min(340px, 100%); padding: 9px 12px; }
.filter-bar select { width: auto; min-width: 130px; border: 1px solid #dce5e6; border-radius: 9px; padding: 8px; background: #fff; }
.list-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px 0; color: var(--muted); font-size: 12px; }
.list-pagination > div { display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; letter-spacing: .5px; color: #7b8b90; font-weight: 600; background: #f8fafa; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 15px 16px; border-bottom: 1px solid #edf1f1; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f7fbfa; }
.shipment-order-groups { display: grid; gap: 10px; }
.shipment-order-group { border: 1px solid #e1eae8; border-radius: 10px; background: #fff; overflow: hidden; }
.shipment-order-group summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; cursor: pointer; background: #f7faf9; }
.shipment-order-group summary:hover { background: #f0f7f5; }
.shipment-order-group summary::marker { color: var(--teal); }
.shipment-order-title { min-width: 0; flex: 1; }
.shipment-order-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shipment-order-count { flex: none; color: var(--teal); font-size: 12px; font-weight: 600; }
.shipment-order-group[open] summary { border-bottom: 1px solid #e1eae8; }
.shipment-order-group td { padding-top: 13px; padding-bottom: 13px; }
.search-match-notice { margin: 0 0 14px; padding: 11px 14px; border: 1px solid #eed7ac; border-radius: 9px; background: #fff8e9; color: #80591f; font-size: 12px; }
tbody tr.item-search-match { background: #fff8e9; }
tbody tr.item-search-match td:first-child { box-shadow: inset 3px 0 #d9932c; }
td strong { font-weight: 600; }
.cell-title { max-width: 280px; }
.cell-title strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.cell-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; border-radius: 20px; padding: 5px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; background: #eef2f2; color: #596b70; }
.badge.done { background: #e6f4ed; color: #27735a; }
.badge.active { background: #e8f1f7; color: #356e93; }
.badge.wait { background: #fff1df; color: #9a642a; }
.badge.type { background: #f0eef9; color: #68588f; }
.badge.mode { background: #edf3f3; color: #4c696c; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.report-card { padding: 27px; }
.report-card .report-icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); border-radius: 13px; font-size: 22px; }
.report-card h3 { margin: 18px 0 8px; font-size: 18px; }
.report-card p { color: var(--muted); line-height: 1.8; min-height: 52px; }
.report-filter { display: grid; gap: 10px; margin: 18px 0; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.report-preview { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.report-preview .table-wrap { max-height: 62vh; overflow: auto; }
.report-preview table { width: max-content; min-width: 100%; }
.report-preview th { position: sticky; top: 0; z-index: 1; }
.report-preview td { min-width: 105px; max-width: 280px; white-space: pre-line; overflow-wrap: anywhere; }
.shipment-table { min-width: 1460px; }
.shipment-goods { min-width: 180px; }
.shipment-goods strong { font-size: 12px; font-weight: 500; }
.shipment-requisition-summary { min-width: 220px; max-width: 300px; }
.shipment-requisitions { display: block; padding: 5px 0 0; text-align: left; white-space: normal; }
.admin-code { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f1f6f5; color: #165d56; font-family: monospace; }

/* 弹窗 */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10,31,34,.46); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fade .15s ease-out; }
.modal { width: min(660px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 25px 90px rgba(5,32,35,.25); }
.modal.modal-lg { width: min(1060px, 100%); }
.modal-header { padding: 22px 25px; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-header h2 { margin: 0 0 5px; font-size: 20px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 12px; }
.modal-close { border: 0; background: #f1f5f5; color: #5d7276; border-radius: 50%; width: 32px; height: 32px; flex: none; }
.modal-body { padding: 24px 25px; }
.detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 17px; background: #f6f9f9; border-radius: 12px; margin-bottom: 22px; }
.detail-summary span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.detail-summary strong { font-size: 13px; overflow-wrap: anywhere; }
.detail-summary .summary-wide { grid-column: span 2; }
.section-title { margin: 24px 0 12px; display: flex; justify-content: space-between; align-items: center; }
.section-title h3 { margin: 0; font-size: 15px; }
.items-editor { border: 1px solid var(--line); border-radius: 11px; overflow-x: auto; }
.items-editor table { min-width: 800px; }
.items-editor td { padding: 8px; }
.items-editor th { padding: 10px 8px; }
.items-editor .table-input { padding: 8px; min-width: 80px; }
.items-editor .name-input { min-width: 150px; }
.timeline { padding-left: 4px; }
.timeline-item { position: relative; padding: 0 0 20px 23px; border-left: 1px solid #dfe9e7; }
.timeline-item::before { content: ""; position: absolute; width: 9px; height: 9px; background: #73a99f; border: 3px solid #e8f3f0; border-radius: 50%; left: -8px; top: 1px; box-sizing: content-box; }
.timeline-item:last-child { border-left-color: transparent; }
.timeline-item strong { display: block; font-size: 13px; }
.timeline-item p { color: var(--muted); font-size: 12px; margin: 5px 0 0; line-height: 1.6; }
.action-panel { border: 1px solid #cfe3de; background: #f3faf8; padding: 18px; border-radius: 12px; margin-top: 20px; }
.action-panel h3 { margin: 0 0 14px; color: #145e55; font-size: 15px; }
.notice { padding: 12px 14px; border-radius: 9px; background: #fff7e9; color: #886332; line-height: 1.7; font-size: 12px; }
.success-panel { padding: 22px; background: #edf8f3; border: 1px solid #d4ebe0; border-radius: 12px; }

#toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: grid; gap: 10px; pointer-events: none; }
.toast { background: #163f3c; color: #fff; padding: 13px 18px; border-radius: 10px; box-shadow: var(--shadow); max-width: 420px; animation: fade .2s; }
.toast.error { background: #934d3f; }
.loading { display: grid; place-items: center; min-height: 260px; color: var(--muted); }
.spinner { width: 25px; height: 25px; border: 3px solid #d9e8e5; border-top-color: var(--teal); border-radius: 50%; animation: spin .7s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 全局紧凑布局：减少无意义留白，保留清晰层级与可操作性 */
body { line-height: 1.45; }
.mt { margin-top: 12px; }
.field { margin-bottom: 10px; min-width: 0; }
.field label { margin-bottom: 4px; font-size: 12px; line-height: 1.35; }
.field label .optional { font-size: 11px; }
.input, .field input, .field select, .field textarea, .table-input { padding: 7px 9px; border-radius: 7px; }
.field textarea { min-height: 68px; }
.field-row { gap: 9px 12px; }
.form-help { margin-top: 4px; font-size: 11px; line-height: 1.45; }
.file-drop { padding: 15px; }
.file-drop input { padding-top: 7px; }
.form-actions { margin-top: 14px; padding-top: 12px; gap: 8px; }
.btn { padding: 8px 13px; border-radius: 7px; }
.btn-sm { padding: 5px 9px; }
.btn-lg { padding: 10px 16px; }
.sidebar { padding-top: 18px; }
.sidebar .brand-lockup { padding-bottom: 18px; }
.book-chip { margin-bottom: 16px; padding: 10px 11px; }
.book-chip strong { margin-bottom: 3px; }
.nav { gap: 4px; }
.nav button { padding: 9px 12px; }
.sidebar-bottom { padding-top: 12px; }
.topbar { height: 58px; padding: 0 24px; }
.topbar h2 { font-size: 16px; }
.topbar-right { gap: 13px; }
.global-search { padding-top: 3px; padding-bottom: 3px; }
.content { padding: 20px 24px 30px; }
.page-heading { margin-bottom: 16px; gap: 16px; }
.page-heading h1 { font-size: 22px; margin-bottom: 3px; }
.page-heading p { font-size: 12px; line-height: 1.5; }
.heading-actions { gap: 7px; }
.stats-grid { gap: 12px; margin-bottom: 14px; }
.stat-card { padding: 14px 15px; }
.stat-icon { width: 29px; height: 29px; font-size: 14px; }
.stat-value { font-size: 25px; margin-top: 6px; }
.stat-foot { margin-top: 3px; }
.dashboard-grid { gap: 14px; }
#content > .card + .card, #content > .card + .stats-grid { margin-top: 13px; }
.card { border-radius: 13px; }
.card-header { padding: 12px 15px; }
.card-body { padding: 14px 15px; }
.todo-group + .todo-group { border-top-width: 4px; }
.todo-category { padding: 8px 15px; }
.todo-item { padding: 10px 15px; gap: 10px; }
.todo-item span { margin-top: 2px; }
.empty { padding: 25px 16px; }
.empty-icon { font-size: 25px; margin-bottom: 6px; }
.filter-bar { padding: 9px 11px; margin-bottom: 10px; gap: 8px; }
.filter-bar .input { padding: 7px 9px; }
.filter-bar select { padding: 6px 8px; }
th { padding: 8px 12px; letter-spacing: .2px; }
td { padding: 9px 12px; font-size: 13px; line-height: 1.4; }
.cell-title strong { line-height: 1.4; }
.cell-sub { margin-top: 2px; line-height: 1.35; }
.order-item-count { white-space: nowrap; }
.badge { padding: 4px 8px; }
.shipment-order-groups { gap: 8px; }
.shipment-order-group summary { padding: 10px 12px; }
.shipment-order-group td { padding-top: 9px; padding-bottom: 9px; }
.search-match-notice { margin-bottom: 10px; padding: 8px 11px; }
.report-grid { gap: 13px; }
.report-card { padding: 17px; }
.report-card .report-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; }
.report-card h3 { margin: 10px 0 5px; font-size: 16px; }
.report-card p { font-size: 12px; line-height: 1.55; min-height: 0; margin: 6px 0 11px; }
.report-filter { gap: 8px; margin: 12px 0; }
.report-actions { gap: 8px; }
.modal-backdrop { padding: 16px; }
.modal { max-height: calc(100vh - 32px); border-radius: 14px; }
.modal.modal-lg { width: min(1280px, 100%); }
.modal-header { padding: 14px 18px; }
.modal-header h2 { font-size: 18px; margin-bottom: 3px; }
.modal-close { width: 29px; height: 29px; }
.modal-body { padding: 16px 18px; }
.detail-summary { gap: 10px 12px; padding: 12px; margin-bottom: 14px; border-radius: 10px; }
.detail-summary span { margin-bottom: 3px; }
.section-title { margin: 15px 0 9px; }
.section-title h3 { font-size: 14px; }
.items-editor td { padding: 6px; }
.items-editor th { padding: 8px 6px; }
.items-editor .table-input { padding: 6px; }
.timeline-item { padding-bottom: 14px; }
.timeline-item p { margin-top: 3px; line-height: 1.45; }
.action-panel { padding: 12px 14px; margin-top: 14px; border-radius: 10px; }
.action-panel h3 { margin-bottom: 9px; font-size: 18px; }
.action-panel p { margin: 7px 0; }
.notice { padding: 9px 11px; line-height: 1.5; }
.success-panel { padding: 16px; }
.loading { min-height: 180px; }
.toast { padding: 10px 14px; }
.compact-fields .field { margin-bottom: 0; }
@media (min-width: 761px) and (max-width: 1199px) {
  .field-row.compact-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .field-row.compact-fields, .field-row.three.compact-fields { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .modal-lg .detail-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .modal-lg .shipment-detail-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal-lg .shipment-detail-summary .summary-wide { grid-column: 1 / -1; }
}
.shipment-action .field-row { display: contents; }
.shipment-action .field { margin-bottom: 0; }
.shipment-action .form-actions { margin: 0; padding: 0; border: 0; }
.shipment-action .form-actions .btn { width: 100%; }
.shipment-action[data-action-name="eta"] textarea { resize: none; }
@media (min-width: 761px) {
  .shipment-action { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
  .shipment-action[data-action-name="arrive"], .shipment-action[data-action-name="clear"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shipment-action[data-action-name="eta"] .field { align-self: start; }
  .shipment-action[data-action-name="eta"] .field label { height: 17px; line-height: 17px; }
  .shipment-action[data-action-name="eta"] .field input, .shipment-action[data-action-name="eta"] .field textarea { min-height: 38px; height: 38px; }
  .shipment-action[data-action-name="eta"] .form-actions { align-self: start; margin-top: 21px; }
  .shipment-action[data-action-name="eta"] .form-actions .btn { height: 38px; }
}
@media (min-width: 1000px) {
  .shipment-action[data-action-name="depart"] { grid-template-columns: 200px 200px 230px; justify-content: start; }
  .shipment-action[data-action-name="eta"] { grid-template-columns: 200px 200px 200px; justify-content: start; }
  .shipment-action[data-action-name="arrive"], .shipment-action[data-action-name="clear"] { grid-template-columns: 200px 230px; justify-content: start; }
}

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr 1fr; }
  .login-brand { padding: 45px; }
  .detail-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .login-page { display: block; background: var(--canvas); }
  .login-brand { min-height: 270px; padding: 32px 26px; }
  .login-hero { margin: 45px 0 15px; }
  .login-hero h1 { font-size: 31px; margin: 12px 0; }
  .login-hero p, .login-features { display: none; }
  .login-panel { padding: 30px 22px; }
  .shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: .2s; width: 238px; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; margin-right: 12px; border: 0; background: none; font-size: 20px; }
  .topbar { height: auto; min-height: 58px; padding: 10px 15px; flex-wrap: wrap; }
  .topbar-right { margin-left: auto; }
  .global-search { order: 3; width: 100%; margin-top: 8px; }
  .topbar-right .timezone-label { display: none; }
  .content { padding: 16px 12px 25px; }
  .page-heading { display: block; }
  .heading-actions { margin-top: 12px; }
  .page-heading h1 { font-size: 21px; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 24px; }
  .report-grid { grid-template-columns: 1fr; }
  .field-row, .field-row.three, .field-row.compact-fields { grid-template-columns: 1fr; gap: 0; }
  .compact-fields .field { margin-bottom: 10px; }
  .shipment-action .field { margin-bottom: 10px; }
  .shipment-action .form-actions { margin-top: 10px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal, .modal.modal-lg { width: 100%; max-height: 94vh; border-radius: 14px 14px 0 0; }
  .modal-header, .modal-body { padding-left: 15px; padding-right: 15px; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar .input { width: 100%; }
  .detail-summary { gap: 10px; }
  #toast-root { left: 15px; right: 15px; bottom: calc(15px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}
