:root {
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #161b22;
  --panel-light: #1c2330;
  --line: #30363d;
  --text: #f0f6fc;
  --muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --red: #f85149;
  --yellow: #d29922;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
main { width: min(1100px, 100%); margin: auto; padding: 22px 22px 110px; }
header, .section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
header h1 { margin: 0; font-size: 27px; }
header p { margin-bottom: 0; }
h2 { margin: 26px 0 12px; font-size: 20px; }
h3 { margin-top: 0; }
.card h2, .card .section-title h2 { margin-top: 0; }
.eyebrow { color: var(--accent); letter-spacing: 2px; font-size: 11px; margin: 0 0 5px; }
.muted, .hint, .empty { color: var(--muted); }
.hint { font-size: 12px; line-height: 1.5; margin-bottom: 0; }
.empty { padding: 20px 4px; text-align: center; }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.summary div, .card, .balance-card, .stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 17px; }
.summary span, .balance-card span, .stat-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.summary strong { word-break: break-word; font-size: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
label { display: block; color: var(--muted); font-size: 12px; margin: 12px 0; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 11px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
textarea { min-height: 72px; resize: vertical; }
button { border: 0; border-radius: 8px; padding: 11px 16px; background: var(--accent); color: #07111f; font-weight: 700; cursor: pointer; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--red); border: 1px solid var(--line); }
button.wide { width: 100%; margin-top: 12px; }
button + button { margin-left: 5px; }
button:disabled { opacity: .55; cursor: wait; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.split.even { grid-template-columns: 1fr 1fr; }
.checks { display: flex; gap: 24px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 8px; color: var(--text); }
.checks input { width: auto; margin: 0; }
.compact { width: auto; min-width: 145px; margin: 0; }
.badge { color: var(--green); font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); white-space: normal; margin-top: 5px; max-width: 230px; }
.status { display: inline-block; border-radius: 20px; padding: 4px 8px; background: var(--panel-light); font-size: 11px; }
.status.completed, .status.paid { color: var(--green); }
.status.refunded, .status.denied, .status.rejected { color: var(--red); }
.status.pending_payment, .status.requested, .status.manual_review, .status.approved { color: var(--yellow); }
.file-link { display: block; margin-top: 5px; padding: 5px 8px; font-size: 11px; }
.message { position: sticky; top: 8px; z-index: 10; padding: 13px; border: 1px solid var(--accent); border-radius: 9px; background: #10243a; box-shadow: 0 8px 25px #0008; }
.alerts { display: grid; gap: 8px; }
.alert { border-left: 3px solid var(--red); background: var(--panel); padding: 12px; font-size: 13px; }
.balance-grid, .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.balance-card strong, .stat-card strong { font-size: 20px; }
.balance-card small, .stat-card small { display: block; color: var(--muted); margin-top: 7px; line-height: 1.45; }
.balance-card.positive { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); }
.balance-card.negative { border-color: var(--red); }
.calc-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.calc-result div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 15px; }
.calc-result span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.calc-result .net { border-color: var(--green); }
.bottom-nav { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); background: #111720f5; border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
.bottom-nav button { min-width: 0; padding: 11px 3px; background: transparent; color: var(--muted); font-size: 11px; }
.bottom-nav button.active { color: var(--accent); background: #58a6ff15; }
[hidden] { display: none !important; }
@media (min-width: 800px) { .bottom-nav { width: 650px; left: 50%; right: auto; transform: translateX(-50%); bottom: 12px; border: 1px solid var(--line); border-radius: 16px; } main { padding-bottom: 115px; } }
@media (max-width: 600px) { main { padding: 15px 13px 100px; } header h1 { font-size: 23px; } .summary { grid-template-columns: 1fr 1fr; gap: 8px; } .summary div { padding: 13px; } .summary strong { font-size: 14px; } .split.even { grid-template-columns: 1fr; gap: 0; } .section-title { align-items: flex-start; } .section-title h2 { margin-top: 10px; } th, td { padding: 10px; } }
