:root {
    color-scheme: light;
    --ink: #17212b;
    --muted: #637080;
    --line: #dfe5ea;
    --paper: #ffffff;
    --canvas: #f4f6f7;
    --brand: #0d6b68;
    --brand-dark: #084c4a;
    --accent: #e2a83b;
    --danger: #a63737;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.5; }
a { color: inherit; }
.topbar { min-height: 72px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #102e31; color: white; }
.brand { font-size: 1.14rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand span { color: #f0bd5a; font-weight: 600; }
.topbar nav { display: flex; align-items: center; gap: 20px; }
.topbar nav a, .link-button { color: #eaf4f3; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; padding: 8px 0; }
.topbar nav a:hover, .link-button:hover { color: white; text-decoration: underline; }
.topbar form { margin: 0; }
.container { width: min(1180px, 92vw); margin: 42px auto 80px; }
.auth-container { width: min(480px, 92vw); min-height: 80vh; display: grid; place-items: center; margin-top: 0; }
.auth-card { width: 100%; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: 14px; padding: 34px; box-shadow: 0 18px 55px rgba(18, 38, 43, .08); }
h1, h2 { margin: 0 0 10px; line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: 1.35rem; }
p { margin: 0 0 18px; color: var(--muted); }
.eyebrow { color: var(--brand); margin: 0 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.page-heading { margin-bottom: 26px; }
.page-heading.split, .section-heading, .send-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 26px; margin-bottom: 30px; box-shadow: 0 8px 28px rgba(18, 38, 43, .04); }
.narrow { max-width: 700px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-grid .form-action { align-self: end; }
.stack { display: grid; gap: 18px; }
.stack.compact { min-width: 330px; }
label { display: grid; gap: 7px; font-weight: 700; font-size: .93rem; }
label span, .hint { color: var(--muted); font-size: .8rem; font-weight: 500; }
input, select, textarea { width: 100%; border: 1px solid #bdc8d0; border-radius: 8px; padding: 11px 12px; background: white; color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(13, 107, 104, .17); border-color: var(--brand); }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.checkbox input { width: auto; margin-top: 5px; }
.button-row { display: flex; gap: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid #b8c2c9; border-radius: 8px; padding: 10px 16px; background: white; color: var(--ink); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button.primary { border-color: var(--brand); background: var(--brand); color: white; }
.button.primary:hover { background: var(--brand-dark); }
.button.danger { border-color: var(--danger); background: var(--danger); color: white; }
.button.small { padding: 6px 11px; font-size: .88rem; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 30px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; background: #fafbfb; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.badge.success { color: #145b3c; background: #ddf4e8; }
.badge.neutral { color: #53606d; background: #edf0f2; }
.alert { border-radius: 9px; padding: 13px 15px; margin-bottom: 22px; font-weight: 650; }
.alert-success { color: #125a39; background: #dff5e9; border: 1px solid #b7e5ca; }
.alert-error { color: #862a2a; background: #fbe7e7; border: 1px solid #efc1c1; }
.warning-text { color: #9a5a00; font-weight: 700; }
.empty-state { padding: 32px; text-align: center; color: var(--muted); border: 1px dashed #b9c3c9; border-radius: 12px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.stat span { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat strong { display: block; margin-top: 4px; font-size: 1.55rem; }
.status-line { margin-top: 22px; }
.tariff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.money-input { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.money-input input { flex: 1; }
.notice { padding: 14px 16px; color: #4f5d68; background: #f3f7f7; border-left: 4px solid var(--brand); border-radius: 6px; }
.tariff-snapshot { padding-block: 18px; }
.tariff-snapshot summary { cursor: pointer; font-weight: 750; }
.snapshot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.snapshot-grid span { display: grid; gap: 3px; color: var(--muted); font-size: .82rem; }
.snapshot-grid strong { color: var(--ink); font-size: 1rem; }
@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; padding-block: 18px; }
    .topbar nav { width: 100%; overflow-x: auto; gap: 15px; }
    .container { margin-top: 28px; }
    .form-grid, .settings-grid, .stats-grid, .tariff-grid, .snapshot-grid { grid-template-columns: 1fr 1fr; }
    .page-heading.split, .section-heading, .send-card { flex-direction: column; }
    .stack.compact { min-width: 0; width: 100%; }
    .auth-card { padding: 24px; }
}
