:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #fff;
    --ink: #16202a;
    --muted: #697586;
    --line: #dde3e9;
    --accent: #009ee3;
    --accent-dark: #007eb5;
    --success: #087f5b;
    --success-bg: #e8f7f1;
    --warning: #9a6700;
    --warning-bg: #fff5d6;
    --danger: #b42318;
    --danger-bg: #fff0ee;
    --shadow: 0 18px 50px rgba(22, 32, 42, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 10% 0, #fff 0, transparent 32rem), var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
code { padding: .12rem .35rem; border-radius: .4rem; background: #eef2f5; font-size: .9em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .35rem; font-size: clamp(2rem, 4vw, 3.15rem); letter-spacing: -.05em; }
h2 { margin-bottom: .45rem; font-size: 1.3rem; letter-spacing: -.025em; }
.shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 70px; }
.hero { display: flex; align-items: center; gap: 18px; margin-bottom: 25px; }
.hero-copy { flex: 1; }
.brand-mark { display: grid; place-items: center; width: 58px; height: 58px; flex: 0 0 auto; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 900; box-shadow: 0 12px 30px rgba(0, 158, 227, .22); }
.eyebrow { margin-bottom: 5px; color: #607080; font-size: .72rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.subtitle, .sync-card p, .note { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.account-badge, .counter { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.75); color: #475467; font-size: .78rem; font-weight: 750; }
.logout { color: var(--muted); font-size: .86rem; font-weight: 700; text-decoration: none; }
.card { border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stats article { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.75); }
.stats span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.stats strong { font-size: 1.25rem; }
.sync-card { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 23px 25px; margin-bottom: 18px; }
.inline-form { display: flex; align-items: end; gap: 12px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .65fr); gap: 18px; align-items: start; }
.search-card, .rules-card, .results-card { padding: 25px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.search-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; }
label span { font-size: .82rem; font-weight: 750; }
input, select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd7df; border-radius: 11px; background: #fbfcfd; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,158,227,.11); background: #fff; }
.money-input { position: relative; }
.money-input b { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money-input input { padding-left: 28px; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-column: span 2; align-self: end; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 17px; border-radius: 11px; font-weight: 800; }
.primary { border: 0; background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-dark); }
.secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.compact { min-height: 42px; width: auto; }
button:disabled { opacity: .55; cursor: wait; }
.rule-list { display: grid; gap: 12px; padding-left: 20px; color: #475467; line-height: 1.45; }
.note { margin-top: 18px; padding: 14px; border-radius: 12px; background: #f6f8fa; font-size: .82rem; }
.alert { margin-top: 18px; padding: 13px 15px; border-radius: 11px; background: #eef6fb; color: #195b7a; font-weight: 650; }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.warning { background: var(--warning-bg); color: var(--warning); }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.results-card { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--muted); text-align: left; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; }
td { padding: 13px 10px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.amount { text-align: right; white-space: nowrap; }
.status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: .73rem; font-weight: 800; white-space: nowrap; }
.status.verified { background: var(--success-bg); color: var(--success); }
.status.review { background: var(--warning-bg); color: var(--warning); }
.payment-link { padding: 0; border: 0; background: none; color: var(--accent-dark); font-weight: 800; text-decoration: underline; text-decoration-style: dotted; }
.empty-row { padding: 34px; color: var(--muted); text-align: center; }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.login-card .brand-mark { margin-bottom: 22px; }
.login-form { display: grid; gap: 16px; margin-top: 24px; }
@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, 1fr); } .sync-card { align-items: stretch; flex-direction: column; } .inline-form { align-items: stretch; } .layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .shell { width: min(100% - 20px, 1240px); padding-top: 20px; } .hero { align-items: flex-start; flex-wrap: wrap; } .header-actions { width: 100%; justify-content: space-between; } .search-grid { grid-template-columns: 1fr; } .button-row { grid-column: auto; grid-template-columns: 1fr; } .inline-form { flex-direction: column; } .inline-form label, .inline-form button { width: 100%; } }
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .62); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(1050px, 100%); max-height: 92vh; overflow: auto; padding: 26px; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-heading, .json-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.5rem; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; }
.detail-grid div { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.detail-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.detail-grid strong { display: block; overflow-wrap: anywhere; font-size: .9rem; }
.json-heading { margin: 20px 0 9px; }
.json-view { max-height: 420px; overflow: auto; margin: 0; padding: 18px; border-radius: 14px; background: #111827; color: #e5e7eb; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.modal-open { overflow: hidden; }
@media (max-width: 820px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .detail-grid { grid-template-columns: 1fr; } .modal { padding: 10px; } .modal-card { padding: 18px; } }
