:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.985 0.008 80);
  --surface-strong: oklch(0.965 0.012 80);
  --ink: oklch(0.22 0.025 70);
  --muted: oklch(0.48 0.035 70);
  --faint: oklch(0.68 0.025 70);
  --border: oklch(0.9 0.015 80);
  --primary: oklch(0.58 0.14 80);
  --primary-soft: oklch(0.94 0.045 80);
  --accent: oklch(0.36 0.08 230);
  --success: oklch(0.48 0.13 155);
  --warning: oklch(0.58 0.15 70);
  --shadow: 0 16px 40px oklch(0.22 0.025 70 / 0.06);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 80% 10%, var(--primary-soft), transparent 34%), var(--bg); }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid var(--border); border-radius: 24px; background: var(--bg); box-shadow: var(--shadow); }
.login-card h1 { margin: 14px 0 10px; font-size: 31px; line-height: 1.15; letter-spacing: -0.04em; }
.login-copy { margin: 0 0 26px; color: var(--muted); line-height: 1.7; }
.stack-form { display: grid; gap: 14px; }
.stack-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.stack-form input, .stack-form select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; color: var(--ink); background: var(--surface); }
.stack-form input:focus, .stack-form select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.app-view { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; min-height: 100vh; padding: 24px 16px; border-right: 1px solid var(--border); background: var(--surface); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 28px; }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand span:not(.brand-mark) { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; text-align: left; font-size: 13px; }
.nav-item:hover, .nav-item.active { color: var(--ink); background: var(--primary-soft); }
.nav-item.active { font-weight: 700; }
.nav-item span { width: 20px; color: var(--accent); text-align: center; }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.text-button { padding: 0; border: 0; color: var(--accent); background: transparent; font-size: 11px; }
.main-shell { width: min(1160px, 100%); padding: 0 32px 64px; }
.main-shell > .topbar { padding-top: 28px; }
.main-shell > .topbar h1 { margin: 6px 0 0; font-size: 23px; letter-spacing: -0.03em; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; max-width: min(360px, calc(100% - 44px)); padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); background: var(--bg); box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; font-size: 13px; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { color: oklch(0.38 0.12 25); border-color: oklch(0.8 0.08 25); }
.narrow-panel { max-width: 620px; }
.settings-divider { height: 1px; margin: 28px 0 24px; background: var(--border); }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-label { align-content: end; display: flex !important; align-items: center; gap: 8px; min-height: 44px; }
.checkbox-label input { width: 18px; height: 18px; }
.inline-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 9px; margin: 20px 0; }
.inline-form input { min-height: 42px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.table-wrap { overflow: auto; margin-top: 20px; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.result-file { display: grid; place-items: center; width: 78px; height: 92px; padding: 8px; overflow: hidden; border-radius: 10px; color: var(--muted); background: var(--surface-strong); font-size: 11px; text-align: center; word-break: break-all; }
.upload-icon.accent { background: var(--primary); color: var(--ink); }

.app-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 18px; }
.brand-lockup, .topbar-actions, .summary-topline, .summary-meta, .panel-heading, .date-range { display: flex; align-items: center; }
.brand-lockup { gap: 12px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: oklch(1 0 0); background: var(--primary); font-weight: 800; box-shadow: 0 8px 18px oklch(0.58 0.14 80 / 0.23); }
.eyebrow, .section-kicker { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.brand-lockup h1 { margin: 2px 0 0; font-size: 18px; letter-spacing: -0.02em; }
.topbar-actions { gap: 12px; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.status-dot i { width: 7px; height: 7px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 4px oklch(0.48 0.13 155 / 0.12); }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); background: var(--bg); }
.icon-button:hover { color: var(--ink); border-color: var(--primary); }

.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 48px 0 38px; }
.hero-row h2 { max-width: 620px; margin: 12px 0 14px; font-size: clamp(32px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.05em; text-wrap: balance; }
.hero-copy { max-width: 620px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.period-control { min-width: 268px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.period-control label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.date-range { gap: 6px; color: var(--faint); font-size: 12px; }
.date-range input { min-width: 0; width: 112px; padding: 8px 7px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); background: var(--bg); font-size: 12px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr); gap: 20px; align-items: start; }
.primary-column, .side-column { display: grid; gap: 20px; }
.panel, .summary-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); box-shadow: var(--shadow); }
.panel { padding: 24px; }
.panel-heading { justify-content: space-between; gap: 16px; }
.panel-actions { display: flex; gap: 8px; align-items: center; }
.panel-heading h3 { margin: 7px 0 0; font-size: 20px; letter-spacing: -0.025em; }
.panel-copy { margin: 16px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.badge, .file-hint, .count-label { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.badge-muted, .file-hint { color: var(--muted); background: var(--surface-strong); }
.badge-warning { color: oklch(0.35 0.09 70); background: oklch(0.92 0.08 80); }
.count-label { color: var(--muted); padding-right: 0; }

.credential-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.credential-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.credential-form input, .credential-form select { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; color: var(--ink); background: var(--surface); font-size: 14px; }
.credential-form input:focus, .credential-form select:focus, .date-range input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.credential-form .button { align-self: end; }
.button { min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-weight: 700; font-size: 13px; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease; }
.button:active { transform: scale(0.98); }
.button-dark { color: oklch(1 0 0); background: var(--ink); }
.button-dark:hover { background: oklch(0.3 0.03 70); }
.button-light { color: var(--ink); border-color: var(--border); background: var(--bg); }
.button-light:hover { border-color: var(--primary); background: var(--primary-soft); }
.form-note { margin: 14px 0 0; color: var(--faint); font-size: 12px; }

.dropzone { display: grid; min-height: 178px; place-items: center; align-content: center; gap: 8px; margin-top: 20px; padding: 24px; border: 1px dashed oklch(0.72 0.06 80); border-radius: 18px; color: var(--muted); background: var(--surface); text-align: center; transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-icon { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 5px; border-radius: 50%; color: oklch(1 0 0); background: var(--accent); font-size: 21px; }
.drop-title { color: var(--ink); font-size: 15px; font-weight: 700; }
.drop-subtitle { color: var(--muted); font-size: 12px; }

.empty-state { display: grid; place-items: center; gap: 8px; min-height: 198px; padding: 30px; color: var(--muted); text-align: center; }
.empty-state p { margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.empty-state span:last-child { font-size: 12px; }
.empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-size: 24px; }
.result-list { display: grid; gap: 12px; margin-top: 20px; }
.result-item { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; padding: 13px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.result-thumb { width: 78px; height: 92px; object-fit: cover; border-radius: 10px; background: var(--surface-strong); }
.result-fields { min-width: 0; }
.result-title-row { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.result-title { margin: 0; color: var(--ink); font-size: 14px; font-weight: 750; line-height: 1.35; }
.result-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.result-field { display: grid; gap: 4px; }
.result-field span { color: var(--muted); font-size: 11px; }
.result-field input { width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); background: var(--bg); font-size: 12px; }
.result-field input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.record-status { color: oklch(0.38 0.1 70); font-size: 11px; white-space: nowrap; }

.summary-card { position: sticky; top: 18px; padding: 26px; color: oklch(1 0 0); border: 0; background: var(--accent); box-shadow: 0 20px 44px oklch(0.36 0.08 230 / 0.2); }
.summary-topline { justify-content: space-between; gap: 12px; }
.summary-label { color: oklch(0.9 0.025 230); font-size: 12px; }
.summary-card .badge-warning { color: oklch(0.35 0.09 70); background: oklch(0.93 0.1 80); }
.summary-card h3 { margin: 31px 0 7px; font-size: 18px; font-weight: 500; }
.amount-line { display: flex; align-items: baseline; gap: 5px; }
.amount-line span { color: oklch(0.83 0.03 230); font-size: 20px; }
.amount-line strong { font-size: 49px; line-height: 1; letter-spacing: -0.06em; }
.summary-meta { gap: 16px; margin-top: 20px; color: oklch(0.85 0.03 230); font-size: 12px; }
.summary-meta b { color: oklch(1 0 0); font-size: 17px; }
.summary-divider { height: 1px; margin: 24px 0 18px; background: oklch(0.92 0.02 230 / 0.22); }
.summary-footnote { margin: 0; color: oklch(0.84 0.03 230); font-size: 12px; line-height: 1.65; }
.approval-panel .panel-heading { align-items: center; }
.approval-text { min-height: 156px; margin: 20px 0 0; padding: 15px; overflow: auto; border: 1px solid var(--border); border-radius: 13px; color: var(--muted); background: var(--surface); font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.tip-callout { display: flex; gap: 10px; padding: 16px; border-radius: 16px; color: var(--muted); background: var(--primary-soft); }
.tip-icon { flex: 0 0 auto; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: oklch(1 0 0); background: var(--primary); font-weight: 700; font-size: 12px; }
.tip-callout p { margin: 0; font-size: 12px; line-height: 1.6; }
.tip-callout strong { color: var(--ink); }

@media (max-width: 820px) {
  .app-view { display: block; }
  .sidebar { position: sticky; z-index: 5; top: 0; min-height: auto; flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar-brand { padding: 0; }
  .sidebar-brand span:not(.brand-mark), .sidebar-foot { display: none; }
  .side-nav { display: flex; flex: 1; overflow-x: auto; gap: 4px; }
  .nav-item { flex: 0 0 auto; min-height: 38px; padding: 0 10px; }
  .main-shell { padding: 0 16px 44px; }
  .hero-row { align-items: stretch; flex-direction: column; gap: 24px; padding-top: 34px; }
  .period-control { width: 100%; }
  .date-range input { flex: 1; width: auto; }
  .workspace-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; order: -1; }
}

@media (max-width: 520px) {
  .login-card { padding: 28px 22px; }
  .app-shell { width: min(100% - 24px, 1120px); }
  .topbar { padding-top: 18px; }
  .status-dot { display: none; }
  .hero-row h2 { font-size: 38px; }
  .panel { padding: 18px; border-radius: 18px; }
  .credential-form { grid-template-columns: 1fr; }
  .credential-form .button { width: 100%; }
  .result-item { grid-template-columns: 64px minmax(0, 1fr); gap: 11px; padding: 10px; }
  .result-thumb { width: 64px; height: 78px; }
  .result-fields-grid { grid-template-columns: 1fr; gap: 8px; }
  .summary-card { padding: 21px; border-radius: 18px; }
  .panel-actions { flex-wrap: wrap; justify-content: flex-end; }
  .amount-line strong { font-size: 43px; }
  .inline-form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ================= v2 列表形态工作台 & 弹窗 ================= */

.button-lg { min-height: 50px; padding: 0 22px; border-radius: 13px; font-size: 14px; }
.button-lg .btn-icon { margin-right: 7px; font-weight: 800; }
.button-accent { color: oklch(1 0 0); background: var(--accent); }
.button-accent:hover { background: oklch(0.3 0.1 230); }
.button-danger { color: oklch(0.4 0.12 25); border: 1px solid oklch(0.85 0.06 25); background: oklch(0.97 0.015 25); }

.expense-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 40px 0 26px; }
.expense-hero h2 { max-width: 640px; margin: 10px 0 12px; font-size: clamp(27px, 4vw, 42px); line-height: 1.08; letter-spacing: -0.045em; text-wrap: balance; }
.expense-actions { display: flex; flex: 0 0 auto; gap: 12px; }

.expense-filterbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-bottom: 20px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 34px; gap: 6px; padding: 0 13px; border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 12px; }
.chip b { font-size: 15px; }
.chip-accent { color: oklch(0.28 0.09 230); background: oklch(0.94 0.04 230 / 0.35); }
.chip-ink { color: oklch(1 0 0); background: var(--ink); }
.chip-warn { color: oklch(0.35 0.09 70); background: oklch(0.93 0.08 80); }
.chip-muted { background: var(--surface-strong); }
.chip-success { color: oklch(0.3 0.09 155); background: oklch(0.92 0.05 155 / 0.4); }

.board-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.board-panel .panel-heading { align-items: center; }
.board-panel h3 { font-size: 18px; }
.result-item { grid-template-columns: 92px minmax(0, 1fr); }
.result-file { width: 92px; height: 100%; min-height: 92px; }
.lodging-main { min-width: 0; }
.lodging-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lodging-title { width: 100%; min-width: 0; margin: 0; padding: 2px 4px; border: 1px solid transparent; border-radius: 6px; outline: none; color: var(--ink); background: transparent; font-size: 15px; font-weight: 750; line-height: 1.3; }
.lodging-title:hover { border-color: var(--border); background: var(--bg); }
.lodging-title:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.record-status { color: oklch(0.38 0.1 70); font-size: 11px; }
.record-status.valid { color: var(--success); }
.invoice-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; margin: 8px 0 0; padding: 0 9px; border-radius: 999px; color: oklch(0.3 0.08 230); background: oklch(0.93 0.05 230 / 0.4); font-size: 11px; }
.invoice-chip button { padding: 0 4px; border: 0; color: oklch(0.3 0.08 230); background: transparent; font-size: 11px; }
.record-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.link-button { padding: 0; border: 0; color: var(--accent); background: transparent; font-size: 12px; }
.link-button.danger { color: oklch(0.42 0.1 25); }

.railway-list, .invoice-list { display: grid; gap: 10px; margin-top: 16px; }
.railway-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.railway-main { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; }
.railway-date { flex: 0 0 auto; min-width: 92px; color: var(--ink); font-weight: 750; font-size: 13px; }
.railway-route { flex: 1 1 200px; min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.railway-badge { flex: 0 0 auto; }
.railway-side { text-align: right; }
.railway-amount { color: var(--ink); font-size: 15px; font-weight: 800; }
.refund-input-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.refund-input-row input { flex: 1; min-width: 0; min-height: 34px; padding: 6px 10px; border: 1px solid oklch(0.8 0.08 70); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 12px; }
.refund-hint { color: var(--warning); font-size: 11px; }

.invoice-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.invoice-meta { min-width: 0; }
.invoice-name { display: block; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.invoice-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.invoice-actions { display: flex; align-items: center; gap: 8px; }
.invoice-actions select { max-width: 200px; min-height: 34px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 12px; }

.modal-mask { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 22px; background: oklch(0.22 0.025 70 / 0.42); backdrop-filter: blur(3px); }
.modal-card { width: min(560px, 100%); max-height: min(760px, calc(100vh - 44px)); display: flex; flex-direction: column; overflow: auto; padding: 24px; border-radius: 22px; background: var(--bg); box-shadow: 0 26px 70px oklch(0.2 0.02 70 / 0.25); }
.modal-card.modal-wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-head h3 { margin: 6px 0 0; font-size: 20px; letter-spacing: -0.02em; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.modal-hint { color: var(--faint); font-size: 11px; line-height: 1.6; }
.quick-actions { align-items: center; }
.quick-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rich-label { display: block; margin: 4px 0 8px; color: var(--muted); font-size: 12px; }
.rich-editor { min-height: 210px; max-height: 340px; overflow: auto; padding: 14px 16px; border: 1px solid var(--border); border-radius: 13px; outline: none; color: var(--ink); background: var(--surface); font: 13px/1.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.rich-editor:focus, .rich-editor:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rich-editor:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
.refund-zone { display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; border-radius: 12px; background: oklch(0.97 0.012 80); }
.refund-title { margin: 0; color: var(--warning); font-size: 12px; font-weight: 700; }
.upload-progress { display: grid; gap: 6px; margin-top: 14px; max-height: 220px; overflow: auto; }
.upload-progress-line { display: flex; gap: 8px; align-items: baseline; color: var(--muted); font-size: 12px; }
.upload-progress-line.ok { color: var(--success); }
.upload-progress-line.err { color: oklch(0.42 0.12 25); }

@media (max-width: 820px) {
  .expense-hero { align-items: stretch; flex-direction: column; gap: 20px; padding-top: 30px; }
  .expense-actions .button-lg { flex: 1; }
  .expense-filterbar { align-items: stretch; flex-direction: column; }
  .period-control { width: 100%; }
  .result-item { grid-template-columns: 1fr; }
  .result-file { width: 100%; height: auto; min-height: 0; padding: 14px 8px; }
  .railway-item, .invoice-item { grid-template-columns: 1fr; }
  .railway-side { text-align: left; }
  .modal-card { padding: 18px; border-radius: 18px; }
  .modal-foot { align-items: stretch; flex-direction: column; }
  .modal-foot .panel-actions { justify-content: stretch; flex-wrap: wrap; }
  .modal-foot .panel-actions .button { flex: 1 1 auto; }
  .invoice-actions { flex-wrap: wrap; }
  .invoice-actions select { max-width: none; flex: 1; }
}

/* 住宿明细：表格单行列表，单元格可直接编辑 */
.lodging-list { margin-top: 16px; }
.lodging-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.lodging-table-wrap table { min-width: 1080px; margin: 0; }
.lodging-table-wrap td { padding: 0 4px; border-bottom: 1px solid var(--border); }
.lodging-table-wrap tbody tr:last-child td { border-bottom: 0; }
.lodging-table-wrap tbody tr:hover { background: var(--surface); }
.cell-input { width: 100%; min-width: 64px; padding: 10px 6px; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 13px; text-align: center; }
.cell-input:hover { background: var(--surface-strong); }
.cell-input:focus { border-radius: 6px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--primary); }
input[type="date"].cell-input { min-width: 112px; }
input[type="number"].cell-input { min-width: 70px; }
input[type="text"].cell-input { min-width: 80px; }
td { vertical-align: middle; }
.invoice-cell { display: inline-flex; align-items: center; gap: 5px; max-width: 240px; overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.invoice-cell .link-button { flex: 0 0 auto; }
.muted-cell { color: var(--faint); }
