:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #718096;
  --paper: #f5f3ee;
  --panel: #fffdf9;
  --line: #ded9cf;
  --accent: #b34d2d;
  --accent-dark: #79331f;
  --teal: #2f7772;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0%, #eee4d2 0, transparent 35%), var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, .text-link { cursor: pointer; }
.topbar, main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 28px 0 22px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font: 700 2.1rem Georgia, serif; letter-spacing: -.04em; }
h2 { max-width: 740px; margin-bottom: 14px; font: 500 clamp(2rem, 4.8vw, 4.3rem)/.98 Georgia, serif; letter-spacing: -.055em; }
h3 { margin-bottom: 0; font-size: 1rem; }
.eyebrow { color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .16em; margin-bottom: 8px; }
.muted { color: var(--muted); }
nav { display: flex; align-items: center; gap: 14px; }
a { color: inherit; }
nav a, nav button, #reload-button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 9px 14px; text-decoration: none; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 36px; padding: 68px 0 46px; }
.hero .muted { max-width: 560px; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
button { border: 0; border-radius: 8px; padding: 10px 15px; background: #e5e0d6; color: var(--ink); }
button:hover, nav a:hover { border-color: var(--accent); color: var(--accent-dark); }
button.primary { background: var(--accent); color: white; box-shadow: 0 8px 20px #b34d2d33; }
.status-pill { border-radius: 999px; background: #dbece7; color: var(--teal); padding: 8px 12px; font-size: .78rem; white-space: nowrap; }
.panel { border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 91%, transparent); box-shadow: 0 18px 55px #4b3a2410; border-radius: 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px; }
label { display: grid; gap: 5px; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .03em; }
input, select { min-width: 160px; border: 1px solid var(--line); border-radius: 7px; padding: 9px; background: #fffefa; color: var(--ink); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; margin-top: 18px; }
.table-panel, .review-panel, .detail-panel { padding: 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { color: var(--muted); font-size: .7rem; text-align: left; text-transform: uppercase; letter-spacing: .08em; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td:first-child { font-weight: 700; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f7eee5; }
.state { display: inline-block; border-radius: 999px; padding: 4px 8px; font-size: .7rem; background: #eeeae2; }
.state.confirmed { background: #dbece7; color: var(--teal); }
.state.unpaid { color: var(--accent-dark); }
.review-items { display: grid; gap: 10px; }
.review-item { border-left: 3px solid var(--accent); padding: 9px 10px; background: #f8eee6; font-size: .8rem; }
.review-item strong { display: block; margin-bottom: 3px; }
.empty { color: var(--muted); padding: 20px 0; }
.text-link { display: inline-block; margin-top: 24px; color: var(--accent-dark); font-size: .82rem; }
.detail-panel { margin: 18px 0 60px; }
.detail-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.detail-card { background: #f5f0e8; border-radius: 10px; padding: 13px; }
.detail-card small { color: var(--muted); display: block; margin-bottom: 5px; }
.unit { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; }
.history-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 20px; }
.history-grid ul, .claim-history ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: .82rem; }
.claim-history { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; padding: 12px; background: #f5f0e8; border-radius: 10px; }
.claim-history small { color: var(--muted); display: block; margin-top: 8px; }
.app-version { position: fixed; right: 12px; bottom: 9px; color: #928c80; font: 10px ui-monospace, monospace; }
@media (max-width: 760px) { .topbar, main { width: min(100% - 24px, 1240px); } .hero { display: block; padding: 42px 0 28px; } .hero-actions { margin-top: 24px; } .dashboard-grid { grid-template-columns: 1fr; } .detail-columns, .history-grid, .claim-history { grid-template-columns: 1fr; } }
