:root { color-scheme: light; --ink: #17233b; --muted: #66748a; --line: #dce3ec; --blue: #1458c5; --green: #15803d; --surface: #fff; --bg: #f3f6fa; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
.topbar { min-height: 64px; padding: 0 4vw; display: flex; align-items: center; gap: 30px; background: #101c32; color: #eef5ff; }
.brand { font-size: 18px; font-weight: 750; letter-spacing: .02em; }
.topbar nav { display: flex; gap: 22px; flex: 1; color: #c2d0e3; }
.topbar nav a:hover { color: #fff; }
.topbar form { margin: 0; }
.container { width: min(1120px, calc(100% - 32px)); margin: 34px auto 72px; }
.container-narrow { width: min(450px, calc(100% - 32px)); margin-top: 9vh; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.025em; }
h2 { margin-bottom: 8px; font-size: 19px; }
.muted { color: var(--muted); }
.eyebrow { color: #3d65a4; text-transform: uppercase; font-size: 12px; font-weight: 750; letter-spacing: .09em; margin-bottom: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 5px 20px rgba(26, 46, 77, .035); }
.login-card { padding: 34px; }
.login-card h1 { font-size: 30px; }
.new-package-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-left: 4px solid #3279df; }
.new-package-card p { margin-bottom: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer; transition: .12s ease; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: #0e479f; }
.button-secondary { background: #e8effa; color: #194c98; }
.button-secondary:hover { background: #dbe8fa; }
.button-finish { background: #168348; color: #fff; }
.button-finish:hover:not(:disabled) { background: #106b3a; }
.button-quiet { min-height: 34px; padding: 6px 10px; color: #d5e1f2; background: transparent; border-color: #44536b; }
.button-wide { width: 100%; }
.section-block { margin-top: 34px; }
.section-heading { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading a, .text-link, .back-link { color: #1858b4; font-weight: 650; }
.back-link { display: inline-block; margin: 0 0 20px; }
.record-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.record-card { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.record-card:hover { border-color: #95b6e9; box-shadow: 0 4px 16px rgba(30, 80, 145, .08); }
.record-card strong { overflow-wrap: anywhere; font-size: 16px; }
.record-top { display: flex; justify-content: space-between; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: #eaf0f7; color: #52647c; font-size: 12px; font-weight: 700; }
.badge-open { background: #fff3d6; color: #936200; }
.badge-closed { background: #def4e7; color: #17683a; }
.badge-large { padding: 8px 12px; font-size: 13px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px 16px; border-bottom: 1px solid #edf0f5; white-space: nowrap; }
th { color: #627189; background: #fafbfd; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
.code-cell { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.scan-card { display: grid; grid-template-columns: 42px 1fr; column-gap: 16px; align-items: start; }
.step-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: #286bd0; font-size: 16px; font-weight: 800; }
.scan-instructions p { margin-bottom: 0; }
.scan-form { grid-column: 2; display: flex; gap: 10px; margin-top: 18px; }
.scan-input { flex: 1; min-width: 100px; min-height: 56px; padding: 11px 14px; border: 2px solid #8da9d1; border-radius: 10px; background: #fbfdff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 19px; }
.scan-input:focus, input:focus { outline: 3px solid rgba(47, 113, 213, .15); border-color: #3776d0; }
.finish-form { grid-column: 2; display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.small { font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 7px; color: #4a5970; font-size: 13px; font-weight: 700; }
input:not([type=hidden]) { min-height: 42px; width: 100%; padding: 9px 11px; border: 1px solid #c8d2e0; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.scan-input { min-height: 56px !important; font-size: 19px !important; }
.lookup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lookup-grid .card h2 { margin-bottom: 18px; }
.result-card { padding: 22px; }
.result-summary { display: flex; flex-wrap: wrap; gap: 34px; margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.result-summary > div { display: flex; flex-direction: column; gap: 6px; }
.result-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 19px; overflow-wrap: anywhere; }
.code-list { padding: 0; margin: 0; list-style: none; border-top: 1px solid #edf0f5; }
.code-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid #edf0f5; }
.code-list time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.empty-state { padding: 26px; border: 1px dashed #cad4e2; border-radius: 10px; color: var(--muted); text-align: center; background: rgba(255,255,255,.55); }
.messages { display: grid; gap: 9px; margin-bottom: 18px; }
.notice { padding: 12px 14px; border-radius: 9px; font-size: 14px; }
.notice-success { color: #12623a; background: #e0f4e8; }
.notice-danger { color: #922e36; background: #fde8ea; }
.notice-warning { color: #795a0b; background: #fff2d2; }
.notice-info { color: #20568b; background: #e4f1ff; }
@media (max-width: 700px) {
  .topbar { padding: 0 16px; gap: 14px; }
  .topbar nav { gap: 12px; }
  .container { margin-top: 22px; }
  .page-heading, .new-package-card { align-items: flex-start; flex-direction: column; }
  .scan-card { grid-template-columns: 34px 1fr; gap: 12px; padding: 18px; }
  .scan-form { flex-direction: column; }
  .finish-form { align-items: flex-start; flex-direction: column; }
  .lookup-grid { grid-template-columns: 1fr; }
  .code-list li { align-items: flex-start; flex-direction: column; gap: 5px; }
}
