:root {
  --ink: #17211d;
  --muted: #6b756f;
  --line: #dfe5e1;
  --paper: #f6f8f6;
  --white: #ffffff;
  --green: #176b55;
  --green-dark: #0e4f3e;
  --green-soft: #e3f1eb;
  --orange: #df6b35;
  --orange-soft: #fff0e8;
  --yellow-soft: #fff7d8;
  --red-soft: #fde8e6;
  --shadow: 0 10px 30px rgba(25, 48, 39, .07);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
.topbar { height: 70px; padding: 0 32px; display: flex; align-items: center; gap: 30px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--orange); font-weight: 800; font-size: 17px; box-shadow: 0 5px 15px rgba(223,107,53,.24); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.topbar nav { display: flex; align-items: center; gap: 7px; flex: 1; }
.topbar nav a { padding: 9px 13px; color: var(--muted); border-radius: 9px; }
.topbar nav a:hover, .topbar nav a.active { color: var(--green-dark); background: var(--green-soft); }
.logout-form { margin: 0; }
.page-shell { max-width: 1440px; margin: 0 auto; padding: 36px 32px 70px; }
.page-heading, .detail-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.page-heading.compact { margin-bottom: 20px; }
.review-filter-form { width: 220px; display: grid; gap: 6px; }
.review-filter-form label { color: var(--muted); font-size: 10px; font-weight: 650; }
.review-filter-form select { padding-block: 9px; }
.eyebrow { margin: 0 0 8px; letter-spacing: .15em; color: var(--orange); font-size: 10px; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 30px; letter-spacing: -.035em; margin-bottom: 8px; }
h2 { font-size: 16px; margin-bottom: 4px; }
.muted { color: var(--muted); margin-bottom: 0; }
.small-text { font-size: 12px; }
.button { appearance: none; border: 0; border-radius: 10px; padding: 10px 15px; font: inherit; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.button.primary { background: var(--green); color: white; box-shadow: 0 5px 15px rgba(23,107,85,.18); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { background: var(--green-soft); color: var(--green-dark); }
.button.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.button.small { padding: 7px 11px; font-size: 12px; }
.button.wide { width: 100%; }
.button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.stat-card.accent { background: var(--green-dark); color: white; border-color: transparent; }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card.accent span, .stat-card.accent small { color: #bcd7cd; }
.stat-card strong { display: block; font-size: 25px; margin: 11px 0 3px; letter-spacing: -.03em; }
.stat-card small { font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(280px, .9fr); gap: 20px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { min-height: 66px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0 0 3px; }
.panel-heading p, .panel-heading a { margin: 0; color: var(--muted); font-size: 11px; }
.panel-heading a { color: var(--green); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 11px 15px; color: var(--muted); background: #fbfcfb; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.data-table td { padding: 13px 15px; border-top: 1px solid #edf0ee; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfdfc; }
.data-table tbody tr.review-saving { opacity: .55; pointer-events: none; }
.product-image-heading { width: 82px; }
.selection-heading, .selection-cell { width: 46px; text-align: center !important; padding-left: 14px !important; padding-right: 4px !important; }
.expense-checkbox { width: 17px; height: 17px; margin: 0; accent-color: var(--green); cursor: pointer; }
.product-image-cell { width: 82px; padding-right: 4px !important; }
.product-thumb { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f0f3f1; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb-empty { padding: 5px; color: var(--muted); background: #f2f4f3; text-align: center; }
.product-thumb-empty span { font-size: 9px; line-height: 1.25; }
.title-link { font-weight: 650; }
.title-link:hover { color: var(--green); }
.cell-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.align-right { text-align: right !important; }
.amount { font-variant-numeric: tabular-nums; font-weight: 720; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 10px; white-space: nowrap; }
.badge.neutral { color: #53605a; background: #edf0ee; }
.badge.confirmed, .badge.positive { color: #0d6249; background: #dcf2e8; }
.badge.personal { color: #9a4124; background: var(--orange-soft); }
.badge.warning { color: #846514; background: var(--yellow-soft); }
.badge.invoice { color: #3b566e; background: #e8f1f8; }
.quick-decision-form { margin: 0; }
.quick-decision-select { width: auto; max-width: 170px; padding: 5px 28px 5px 9px; border: 0; border-radius: 999px; font-size: 10px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.quick-decision-select:hover, .quick-decision-select:focus { box-shadow: 0 0 0 3px rgba(23,107,85,.1); }
.quick-decision-select.is-reimbursable { color: #0d6249; background-color: #dcf2e8; }
.quick-decision-select.is-personal { color: #9a4124; background-color: var(--orange-soft); }
.quick-decision-select.is-pending { color: #846514; background-color: var(--yellow-soft); }
.quick-decision-select.is-other { color: #3b566e; background-color: #e8f1f8; }
.quick-decision-select.is-no-invoice { color: #654b15; background-color: #f4ead1; }
.reimbursement-cell { min-width: 126px; }
.reimbursement-status-form { margin: 0; }
.reimbursement-status-select { width: auto; min-width: 74px; padding: 5px 28px 5px 9px; border: 0; border-radius: 999px; font-size: 10px; font-weight: 650; cursor: pointer; }
.reimbursement-status-select:hover, .reimbursement-status-select:focus { box-shadow: 0 0 0 3px rgba(23,107,85,.1); }
.reimbursement-status-select.is-unreimbursed { color: #53605a; background-color: #edf0ee; }
.reimbursement-status-select.is-submitted { color: #76520c; background-color: #fff0c4; }
.reimbursement-status-select.is-reimbursed { color: #0d6249; background-color: #dcf2e8; }
.reimbursement-batch-detail { display: block; max-width: 190px; margin-top: 5px; color: var(--green-dark); font-size: 9px; line-height: 1.35; }
.reimbursement-batch-detail.missing { color: #9a4124; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.bulk-review-bar { min-height: 58px; padding: 10px 16px; display: flex; align-items: center; justify-content: flex-end; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.bulk-review-form { width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.bulk-review-form strong { margin-right: auto; color: var(--green-dark); font-size: 12px; }
.bulk-review-actions { display: flex; align-items: center; gap: 9px; }
.bulk-review-actions .button { white-space: nowrap; }
.bulk-review-separator { color: var(--muted); font-size: 11px; white-space: nowrap; }
.bulk-review-form select { width: min(190px, 100%); padding-block: 8px; }
.review-save-status { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: min(360px, calc(100vw - 48px)); padding: 11px 14px; color: white; background: var(--green-dark); border-radius: 10px; box-shadow: 0 10px 28px rgba(14,79,62,.25); font-size: 12px; font-weight: 650; }
.review-save-status.error { background: #8a3028; box-shadow: 0 10px 28px rgba(138,48,40,.22); }
.task-list { padding: 5px 17px 12px; }
.task-row { padding: 13px 3px; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid #edf0ee; }
.task-row:last-child { border-bottom: 0; }
.task-row strong, .task-row small { display: block; }
.task-row strong { font-size: 12px; margin-bottom: 4px; }
.task-row small { color: var(--muted); font-size: 10px; }
.empty-state { color: var(--muted); padding: 28px; text-align: center; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
input, select, textarea { width: 100%; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid #ccd5d0; border-radius: 9px; font: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23,107,85,.1); }
.filter-bar input { flex: 1 1 300px; max-width: 420px; }
.filter-bar select { max-width: 180px; }
.pagination { padding: 16px 20px; display: flex; justify-content: center; align-items: center; gap: 20px; color: var(--muted); border-top: 1px solid var(--line); }
.pagination a { color: var(--green); font-weight: 700; }
.back-link { display: inline-block; color: var(--muted); font-size: 11px; margin-bottom: 20px; }
.hero-amount { font-size: 31px; font-weight: 800; letter-spacing: -.04em; }
.hero-amount small { display: block; text-align: right; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(320px, .72fr); gap: 20px; align-items: start; }
.detail-main { display: grid; gap: 20px; }
.detail-side { min-width: 0; }
.sticky-panel { position: sticky; top: 90px; padding-bottom: 20px; }
.sticky-panel > *:not(hr) { margin-left: 20px; margin-right: 20px; }
.sticky-panel > .eyebrow { margin-top: 20px; }
.sticky-panel hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.suggestion-line { display: flex; justify-content: space-between; margin: 11px 0; }
.suggestion-line span { color: var(--muted); }
.reason-box { padding: 13px; background: var(--paper); border-radius: 10px; line-height: 1.65; font-size: 12px; }
.evidence-grid { padding: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.evidence-card { min-width: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fbfcfb; }
.evidence-preview { display: block; }
.evidence-card img, .file-icon { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: grid; place-items: center; background: var(--green-soft); color: var(--green-dark); font-size: 20px; font-weight: 800; }
.evidence-preview span { display: block; padding: 10px; }
.evidence-card strong, .evidence-card small { display: block; }
.evidence-card strong { font-size: 11px; }
.evidence-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.evidence-delete-form { padding: 0 10px 10px; text-align: right; }
.evidence-delete-button { border: 0; padding: 3px 0; color: #a8392f; background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.evidence-delete-button:hover, .evidence-delete-button:focus-visible { text-decoration: underline; }
.evidence-empty { grid-column: 1/-1; }
.detail-list { margin: 0; padding: 6px 20px 18px; }
.detail-list div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf0ee; }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; word-break: break-all; }
.timeline { padding: 12px 20px 20px; }
.timeline-row { display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding: 9px 0; }
.timeline-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline-row strong { font-size: 11px; }
.timeline-row p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.stack-form { display: grid; gap: 14px; }
.stack-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.review-form { margin-top: 16px; }
.button-row { display: grid; grid-template-columns: .7fr 1.3fr; gap: 8px; }
.field-error { color: #a8392f; }
.messages { margin-bottom: 16px; }
.message { padding: 12px 14px; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); }
.message.error { background: var(--red-soft); color: #8a3028; }
.login-wrap { min-height: calc(100vh - 150px); display: grid; place-items: center; }
.login-card { width: min(410px, 100%); padding: 34px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.login-card h1 { margin-bottom: 7px; }
.login-card .stack-form { margin-top: 24px; }
@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
  .topbar { padding: 0 18px; }
  .brand { min-width: auto; }
  .brand small { display: none; }
  .page-shell { padding: 26px 18px 50px; }
}
@media (max-width: 640px) {
  .topbar { height: auto; min-height: 64px; flex-wrap: wrap; gap: 8px; padding-block: 9px; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; }
  .topbar nav a { padding: 7px 10px; white-space: nowrap; }
  .logout-form { margin-left: auto; }
  .page-heading, .detail-heading { align-items: flex-start; flex-direction: column; }
  .review-filter-form { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 20px; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar input, .filter-bar select { max-width: none; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .bulk-review-form { flex-wrap: wrap; }
  .bulk-review-form strong { width: 100%; }
  .bulk-review-actions { width: 100%; flex-wrap: wrap; }
  .bulk-review-separator { width: 100%; }
  .bulk-review-form select { flex: 1; min-width: 190px; }
}
