:root {
  --ink: #17243a; --muted: #71809a; --line: #e7edf5; --bg: #f4f7fb;
  --blue: #2d63dc; --green: #16845b; --amber: #b66b00; --red: #cf4c50; --nav: #111c33;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.app { min-height: 100vh; display: grid; grid-template-columns: 242px 1fr; }
aside { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 30px 17px; color: #fff; background: var(--nav); }
.logo { display: flex; align-items: center; gap: 12px; padding: 0 10px 33px; }
.logo strong, .logo small { display: block; }
.logo strong { font-size: 16px; }
.logo small { margin-top: 4px; color: #8ea0bb; font-size: 11px; letter-spacing: 1px; }
.brand-mark { display: flex; justify-content: center; gap: 4px; margin-bottom: 20px; }
.brand-mark span { width: 18px; height: 18px; border-radius: 50%; background: #e24d4d; }
.brand-mark span:nth-child(2) { background: #e9aa2d; }
.brand-mark span:nth-child(3) { background: #32a66c; }
.brand-mark.small { margin: 0; }
.brand-mark.small span { width: 11px; height: 11px; }
nav { display: grid; gap: 6px; }
nav button { position: relative; border: 0; border-radius: 10px; padding: 13px 14px; color: #afbdd2; background: transparent; font-size: 14px; text-align: left; cursor: pointer; transition: background .18s, color .18s; }
nav button::before { display: inline-block; width: 22px; color: #8db1ff; font-size: 16px; }
nav button:nth-child(1)::before { content: "▦"; } nav button:nth-child(2)::before { content: "＋"; }
nav button:nth-child(3)::before { content: "◷"; } nav button:nth-child(4)::before { content: "✓"; }
nav button:nth-child(5)::before { content: "♙"; }
nav button:hover, nav button.active { color: #fff; background: #294f9c; box-shadow: 0 8px 20px #00000025; }
.aside-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding: 19px 10px 0; border-top: 1px solid #293957; color: #b8c0ce; }
.aside-bottom span strong, .aside-bottom span small { display: block; }
.aside-bottom span small { margin-top: 3px; color: #8ea0bb; font-size: 11px; }
.aside-bottom button { border: 0; color: #8ea0bb; background: none; font-size: 13px; cursor: pointer; }
main { position: relative; z-index: 0; min-width: 0; padding: 31px 38px 36px; overflow: hidden; isolation: isolate; }
main::before, main::after { position: absolute; z-index: -1; pointer-events: none; content: ""; background: center / contain no-repeat; mix-blend-mode: multiply; filter: grayscale(.25) saturate(.7); }
main::before { top: 78px; right: -44px; width: 318px; height: 520px; opacity: .065; background-image: url("/assets/traffic-light-standard.jpg"); transform: rotate(-4deg); }
main::after { right: 254px; bottom: -165px; width: 276px; height: 450px; opacity: .045; background-image: url("/assets/traffic-light-arrow.jpg"); transform: rotate(5deg); }
main > * { position: relative; z-index: 1; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; }
h1, h2, p { margin-top: 0; }
header h1 { margin-bottom: 7px; font-size: 27px; letter-spacing: .2px; }
header p, .dialog-head p { margin: 0; color: var(--muted); font-size: 14px; }
.primary, .secondary, .warning { border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 600; cursor: pointer; }
.primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px #2d63dc38; }
.primary:disabled { opacity: .55; cursor: not-allowed; }
.secondary { color: #495267; background: #eef1f6; }
.warning { color: #a86100; background: #fff0e0; }
.primary, .secondary, .warning, .more, .icon-btn, .filters button { transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .18s; }
.primary:not(:disabled):hover, .secondary:not(:disabled):hover, .warning:not(:disabled):hover, .more:not(:disabled):hover, .icon-btn:not(:disabled):hover { border-color: #1f4fb6; color: #fff; background: #2257c7; box-shadow: 0 7px 14px #2257c733; }
.primary:not(:disabled):hover { transform: translateY(-1px); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stats article { position: relative; min-height: 118px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 4px 18px #24365308; }
.stats article::before { position: absolute; top: 0; right: 18px; left: 18px; height: 3px; border-radius: 0 0 4px 4px; content: ""; background: #4976df; }
.stats article:nth-child(2)::before { background: #e8a82c; }.stats article:nth-child(3)::before { background: #2aae72; }.stats article:nth-child(4)::before { background: #df5a5d; }
.stats span { display: block; color: var(--muted); font-size: 14px; }.stats strong { display: block; margin-top: 10px; font-size: 31px; }.stats i { position: absolute; top: 23px; right: 18px; width: 30px; height: 30px; border-radius: 10px; opacity: .16; }
.blue { background: var(--blue); }.amber { background: var(--amber); }.green { background: var(--green); }.red { background: var(--red); }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 4px 18px #24365308; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; padding: 16px 19px; border-bottom: 1px solid var(--line); }.filters { display: flex; gap: 4px; }
.filters button { border: 0; border-radius: 8px; padding: 8px 12px; color: var(--muted); background: transparent; cursor: pointer; }.filters button.active { color: #2e62d1; background: #eaf1ff; font-weight: 600; }
.filters button:not(.active):hover { color: #fff; background: #2257c7; }
.search { width: 270px; border: 1px solid #dfe6f0; border-radius: 9px; padding: 9px 12px; outline: none; }
.search:focus, input:focus, textarea:focus, select:focus { border-color: #8daae9; outline: 0; box-shadow: 0 0 0 3px #2d63dc14; }
.table-wrap { overflow-x: auto; }table { width: 100%; min-width: 900px; border-collapse: collapse; }th { padding: 13px 19px; color: #8794a7; background: #fafbfd; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-align: left; }td { padding: 15px 19px; border-top: 1px solid #eff2f6; font-size: 14px; }tbody tr { cursor: pointer; }tbody tr:hover { background: #f9fbff; }td small { display: block; margin-top: 5px; color: var(--muted); }
.badge { display: inline-block; border-radius: 20px; padding: 5px 10px; font-size: 12px; font-weight: 600; }.badge.pending { color: #af720a; background: #fff4df; }.badge.sent { color: #2860ba; background: #eaf2ff; }.badge.doing { color: #138158; background: #e7f8f1; }.badge.done { color: #2262ac; background: #e8f3ff; }.badge.danger { color: #bf3e3e; background: #ffeded; }.badge.closed { color: #666; background: #eef0f3; }.urgent, .priority, .overdue { color: var(--red) !important; }
.task-actions { display: flex; flex-wrap: wrap; gap: 7px; }.more { border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; color: #526079; background: #fff; cursor: pointer; }.empty { padding: 50px; color: var(--muted); text-align: center; }
dialog { width: min(680px, calc(100vw - 28px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 20px 70px #17203335; }dialog::backdrop { background: #0b142373; backdrop-filter: blur(2px); }dialog form, #detail { padding: 26px; }.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }.dialog-head h2 { margin-bottom: 5px; font-size: 21px; }.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #7b8495; background: #f1f3f6; font-size: 23px; line-height: 30px; cursor: pointer; }.dialog-back { flex: 0 0 auto; min-width: 88px; min-height: 46px; border: 1px solid #dfe6f0; border-radius: 10px; padding: 0 20px; color: #42536d; background: #f3f6fa; font-size: 15px; font-weight: 700; line-height: 44px; cursor: pointer; transition: background .18s, color .18s, border-color .18s, box-shadow .18s; }.dialog-back:hover { border-color: #1f4fb6; color: #fff; background: #2257c7; box-shadow: 0 7px 14px #2257c733; }.dialog-back:focus-visible { outline: 3px solid #2d63dc2e; outline-offset: 2px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.form-grid label { font-size: 13px; font-weight: 600; }.form-grid b { color: var(--red); }.form-grid input, .form-grid select, .form-grid textarea { display: block; width: 100%; margin-top: 7px; border: 1px solid #dfe3ea; border-radius: 8px; padding: 10px 11px; outline: none; background: #fff; }.form-grid textarea { resize: vertical; }.form-grid .full { grid-column: 1 / -1; }.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }.error { min-height: 18px; margin-top: 10px; color: var(--red); font-size: 13px; }.eyebrow { color: var(--blue); font-size: 12px; font-weight: 700; }.detail-status { display: flex; gap: 10px; margin-bottom: 20px; }.priority { border-radius: 20px; padding: 5px 10px; background: #fff0f0; font-size: 12px; font-weight: 600; }.detail-dialog dl { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 12px; }.detail-dialog dl div { padding: 15px 18px; border-bottom: 1px solid var(--line); }.detail-dialog dl div:nth-child(odd) { border-right: 1px solid var(--line); }.detail-dialog dt { color: var(--muted); font-size: 12px; }.detail-dialog dd { margin: 7px 0 0; font-weight: 600; }.note { margin-top: 18px; border-radius: 10px; padding: 15px 18px; background: #f7f8fa; }.note span { color: var(--muted); font-size: 12px; }.note p { margin: 8px 0 0; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 15% 12%, #e7efff, transparent 36%), radial-gradient(circle at 85% 86%, #e8f7f0, transparent 30%), var(--bg); }.login-card { width: min(438px, 100%); border: 1px solid var(--line); border-radius: 20px; padding: 28px 38px 38px; background: #fff; box-shadow: 0 22px 58px #17203317; }.login-product { position: relative; display: grid; place-items: center; height: 148px; margin: -10px 0 3px; overflow: hidden; }.login-product::before { position: absolute; width: 210px; height: 112px; border-radius: 50%; content: ""; background: radial-gradient(ellipse, #eaf1ff 0%, #f8fbff 62%, transparent 72%); }.login-product img { position: relative; width: 148px; height: 148px; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 8px 10px #1720332b); }.login-card .brand-mark { margin-bottom: 12px; }.login-card h1 { margin-bottom: 8px; font-size: 23px; letter-spacing: .2px; text-align: center; }.login-card > p { margin-bottom: 28px; color: var(--muted); font-size: 13px; text-align: center; }.login-card label { display: block; margin-top: 15px; font-size: 13px; font-weight: 600; }.login-card input { width: 100%; margin-top: 7px; border: 1px solid #dfe3ea; border-radius: 9px; padding: 11px; outline: none; }.wide { width: 100%; margin-top: 8px; }
@media (max-width: 900px) { .app { grid-template-columns: 1fr; }aside { position: static; height: auto; flex-direction: row; align-items: center; padding: 14px 16px; }.logo { padding: 0; }.logo small { display: none; }nav { display: none; }.aside-bottom { gap: 12px; margin: 0 0 0 auto; border: 0; padding: 0; }main { padding: 22px 16px; }main::before { top: 115px; right: -90px; opacity: .04; }main::after { display: none; }.stats { grid-template-columns: 1fr 1fr; }.toolbar { flex-direction: column; align-items: stretch; }.search { width: 100%; } }
@media (max-width: 560px) { header { align-items: flex-start; gap: 12px; }header h1 { font-size: 21px; }header .primary { padding: 10px 12px; }.stats { gap: 10px; }.stats article { min-height: 100px; padding: 15px; }.stats strong { font-size: 26px; }.form-grid, .detail-dialog dl { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.detail-dialog dl div:nth-child(odd) { border-right: 0; }.filters { overflow: auto; }.filters button { white-space: nowrap; }dialog form, #detail { padding: 20px; } }
/* Mobile-first refinements: navigation remains reachable, tables scroll inside their card only. */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
@media (max-width: 680px) {
  .app { display: block; }
  aside { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto; min-height: 0; padding: 10px 12px 8px; box-shadow: 0 2px 12px #0913273d; }
  .logo { gap: 8px; padding: 0; }.logo strong { font-size: 14px; }.logo small { display: none; }
  .brand-mark.small span { width: 9px; height: 9px; }
  nav { display: flex; grid-column: 1 / -1; gap: 5px; margin: 9px -12px -2px; padding: 0 12px 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav::-webkit-scrollbar, .filters::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { display: none; }
  nav button { flex: 0 0 auto; min-height: 40px; padding: 9px 11px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
  nav button::before { width: 18px; font-size: 14px; }
  .aside-bottom { gap: 8px; margin: 0; padding: 0; border: 0; }.aside-bottom span small { display: none; }.aside-bottom button { min-height: 36px; padding: 6px 0; }
  main { min-height: calc(100vh - 102px); padding: 18px 12px calc(24px + env(safe-area-inset-bottom)); }main::before { top: 160px; right: -115px; opacity: .035; }main::after { display: none; }
  header { flex-wrap: wrap; margin-bottom: 18px; }header h1 { margin-bottom: 4px; font-size: 22px; }header p { font-size: 12px; }header .primary { min-height: 42px; padding: 10px 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }.stats article { min-height: 94px; padding: 13px; border-radius: 12px; }.stats span { font-size: 12px; }.stats strong { margin-top: 7px; font-size: 25px; }.stats i { top: 16px; right: 12px; width: 24px; height: 24px; }
  .panel { border-radius: 12px; }.toolbar { gap: 10px; padding: 11px; }.filters { gap: 4px; width: calc(100% + 2px); padding-bottom: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; }.filters button { flex: 0 0 auto; min-height: 38px; padding: 8px 11px; font-size: 12px; }.search { width: 100%; min-height: 44px; font-size: 16px; }
  .table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }.table-wrap::after { display: block; padding: 8px 12px; color: var(--muted); content: "左右滑动查看完整任务信息"; font-size: 11px; text-align: right; }table { min-width: 690px; }th { padding: 11px 13px; }td { padding: 13px; font-size: 13px; }
  input, select, textarea { font-size: 16px !important; }.primary, .secondary, .warning { min-height: 44px; }.task-actions { flex-wrap: nowrap; gap: 6px; }.more { min-height: 36px; padding: 6px 9px; white-space: nowrap; }
  dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); margin: 10px auto; border-radius: 14px; overflow-y: auto; }.detail-dialog { max-height: calc(100dvh - 20px); }.dialog-head { gap: 12px; margin-bottom: 18px; }.dialog-head h2 { font-size: 19px; }.icon-btn { flex: 0 0 38px; width: 38px; height: 38px; }.dialog-back { min-width: 88px; min-height: 46px; }.form-grid { gap: 14px; }.form-grid input, .form-grid select, .form-grid textarea { min-height: 44px; }.dialog-actions { position: sticky; bottom: -20px; margin: 20px -20px -20px; padding: 12px 20px; background: #fff; box-shadow: 0 -7px 16px #1720330d; }.dialog-actions .primary, .dialog-actions .secondary { flex: 1; padding-right: 10px; padding-left: 10px; }.empty { padding: 36px 20px; }
  .login-wrap { min-height: 100dvh; padding: 18px; }.login-card { padding: 20px 22px 28px; border-radius: 16px; }.login-product { height: 98px; margin: -4px 0 2px; }.login-product::before { width: 148px; height: 76px; }.login-product img { width: 98px; height: 98px; }.login-card .brand-mark { margin-bottom: 9px; }.login-card h1 { font-size: 20px; line-height: 1.35; }.login-card input { min-height: 46px; font-size: 16px; }.wide { min-height: 46px; }
}
@media (max-width: 380px) { .logo strong { font-size: 13px; }.aside-bottom span strong { font-size: 12px; }nav button { padding-right: 9px; padding-left: 9px; }header .primary { width: 100%; }.stats strong { font-size: 23px; } }
@media print { @page { size: A4 portrait; margin: 0; } html, body { width: 210mm; height: 297mm; overflow: hidden !important; background: #fff !important; }.printing-shipment-report > *:not(.shipment-report-dialog), body:not(.printing-shipment-report) > *:not(.detail-dialog) { display: none !important; }.detail-dialog, .shipment-report-dialog { position: static; display: block !important; width: 210mm; max-height: none; margin: 0; border: 0; box-shadow: none; background: #fff; }.shipment-report-dialog #shipmentReport { display: flex; align-items: center; justify-content: center; min-height: 297mm; padding: 0; overflow: hidden; }.shipment-report-toolbar, .icon-btn, .dialog-actions { display: none !important; }.shipment-report-sheet { width: calc(190mm / var(--report-print-scale, 1)); margin: 0; border: 0; border-radius: 0; box-shadow: none; zoom: var(--report-print-scale, 1); }.shipment-report-sheet { padding: 15px 17px; }.shipment-report-head { padding-bottom: 12px; border-bottom-width: 3px; }.shipment-report-head h2 { margin-top: 3px; font-size: 23px; }.shipment-report-head p { font-size: 9px; }.shipment-report-customer { margin: 12px 0 14px; }.shipment-report-customer div { min-height: auto; padding: 8px 10px; }.shipment-report-customer span,.shipment-report-logistics span { margin-bottom: 3px; font-size: 9px; }.shipment-report-customer strong,.shipment-report-logistics strong { font-size: 11px; }.shipment-report-section { margin-top: 12px; }.shipment-report-section h3 { margin-bottom: 6px; font-size: 12px; }.shipment-report-table > div { min-height: 28px; padding: 6px 10px; font-size: 10px; }.shipment-report-table-head { min-height: 25px !important; font-size: 9px !important; }.shipment-report-logistics div { min-height: auto; padding: 7px 10px; }.shipment-report-tracking { padding: 9px 10px; }.shipment-report-tracking h3 { margin-bottom: 6px; }.shipment-report-tracking h3 .badge { padding: 3px 7px; font-size: 9px; }.shipment-report-latest { margin-bottom: 5px; padding: 6px 8px; font-size: 10px; }.shipment-report-tracking ol { padding-top: 0; }.shipment-report-tracking li { grid-template-columns: 108px 1fr; gap: 8px; padding: 4px 0 4px 13px; font-size: 9px; line-height: 1.3; }.shipment-report-tracking li::before { top: 8px; width: 5px; height: 5px; border-width: 1px; }.shipment-report-tracking li::after { top: 14px; bottom: -5px; left: 2px; width: 1px; }.shipment-report-tracking time { font-size: 9px; }.shipment-report-note { margin-top: 10px; padding: 6px 8px; font-size: 9px; }.shipment-report-note p { margin-top: 2px; }.shipment-report-sheet footer { margin-top: 12px; padding-top: 7px; font-size: 9px; } }


/* ===== 阶段2：登录页升级 ===== */
.login-card input { border-color: var(--border); }
.login-card input:focus { border-color: var(--primary); outline: 2px solid var(--primary-light); }
.login-card .primary.wide { margin-top: 22px; }
.login-foot { display: block; margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; }
