:root {
    color-scheme: dark;
    --bg: #080f1a;
    --surface: #111d2e;
    --surface-raised: #142237;
    --surface-soft: #17283e;
    --line: #25364e;
    --text: #f3f6fc;
    --muted: #9cacc1;
    --subtle: #71849e;
    --lime: #b0f452;
    --lime-strong: #a4eb3b;
    --green-soft: #193329;
    --purple-soft: #29223f;
    --purple: #c4a4ff;
    --danger: #ff8291;
    --font: "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
.app-shell { min-height: 100vh; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 4; display: flex; width: 248px; flex-direction: column; padding: 28px 18px 18px; border-right: 1px solid rgba(148, 166, 189, .12); background: #0c1523; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 1px 5px; font-size: 22px; font-weight: 900; letter-spacing: -.7px; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: #0c1722; background: var(--lime); }
.brand-mark .icon { width: 21px; height: 21px; stroke-width: 2.2; }
.brand-lime, .brand i { color: var(--lime); font-style: normal; }
.sidebar-label { margin: 47px 11px 11px; color: var(--subtle); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.side-nav { display: grid; gap: 5px; }
.nav-link { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-weight: 700; transition: background .16s ease, color .16s ease; }
.nav-link .icon { width: 18px; height: 18px; color: #8293aa; }
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-link.active { border-color: rgba(176,244,82,.12); color: var(--lime); background: rgba(176,244,82,.09); }
.nav-link.active .icon { color: var(--lime); }
.sidebar-spacer { flex: 1; min-height: 30px; }
.sidebar-tip { padding: 16px; border: 1px solid #26384e; border-radius: 14px; background: linear-gradient(145deg, #16243a, #111e30); }
.tip-icon { display: grid; width: 32px; height: 32px; place-items: center; margin-bottom: 12px; border-radius: 9px; color: var(--lime); background: var(--green-soft); }
.tip-icon .icon { width: 17px; height: 17px; }
.sidebar-tip strong { font-size: 13px; }
.sidebar-tip p { margin: 5px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.sidebar-tip a, .terms-callout a { color: var(--lime); font-size: 12px; font-weight: 800; }
.sidebar-tip a span, .terms-callout a span { padding-left: 4px; font-size: 17px; }
.profile-row { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 12px 1px 0; border-top: 1px solid rgba(148,166,189,.13); }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid #334761; border-radius: 50%; color: var(--lime); background: #21334b; font-size: 14px; font-weight: 900; }
.avatar-small { width: 34px; height: 34px; }
.profile-name { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
.profile-name strong, .profile-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-name strong { font-size: 12px; }
.profile-name small { color: var(--subtle); font-size: 10px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 9px; color: var(--subtle); background: transparent; }
.icon-button:hover { color: var(--lime); background: rgba(255,255,255,.055); }
.icon-button .icon { width: 17px; height: 17px; }
.logout-button { width: 30px; }

.main-column { min-height: 100vh; margin-left: 248px; }
.topbar { display: flex; height: 70px; align-items: center; justify-content: space-between; padding: 0 max(36px, calc((100vw - 1200px) / 2)); border-bottom: 1px solid rgba(148,166,189,.11); color: var(--muted); font-size: 13px; }
.topbar-user { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 700; }
.topbar-user form { margin: 0; }
.logout-avatar { padding: 0; cursor: pointer; }
.logout-avatar:hover { border-color: var(--lime); }
.topbar-user .avatar { display: none; }
.main-content { width: min(1120px, 100%); margin: 0 auto; padding: 38px 42px 64px; }
.mobile-nav { display: none; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.page-heading h1 { margin: 5px 0 4px; font-size: clamp(29px, 3vw, 37px); font-weight: 900; letter-spacing: -1.2px; line-height: 1.18; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--lime); font-size: 10px; font-weight: 900; letter-spacing: 1.2px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 900; transition: transform .12s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button .icon { width: 17px; height: 17px; }
.button-primary { border-color: var(--lime); color: #0a1119; background: var(--lime); }
.button-primary:hover { border-color: var(--lime-strong); background: var(--lime-strong); }
.button-secondary { border-color: var(--line); color: var(--text); background: var(--surface); }
.button-secondary:hover { border-color: #3c526e; background: var(--surface-soft); }
.button-quiet { color: var(--muted); background: transparent; }
.button-quiet:hover { color: var(--text); background: rgba(255,255,255,.04); }
.button-full { width: 100%; }
.heading-action { flex: 0 0 auto; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.summary-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.spending-card { min-height: 202px; padding: 22px 24px; background: radial-gradient(ellipse at 92% 9%, rgba(176,244,82,.07), transparent 34%), var(--surface); }
.card-topline, .metric-meta, .plan-top, .panel-heading, .section-heading, .game-stat-top, .game-stat-bottom { display: flex; align-items: center; justify-content: space-between; }
.card-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; }
.card-icon .icon { width: 20px; height: 20px; }
.green-icon { color: var(--lime); background: var(--green-soft); }
.purple-icon { color: var(--purple); background: var(--purple-soft); }
.period-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid rgba(160,177,200,.14); border-radius: 30px; color: var(--muted); background: rgba(8,15,26,.32); font-size: 11px; font-weight: 700; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(176,244,82,.35); }
.metric-label { display: block; margin-top: 16px; color: var(--muted); font-size: 13px; }
.metric-value { margin: 0; color: var(--text); font-size: clamp(34px, 4vw, 44px); font-weight: 900; letter-spacing: -1.4px; line-height: 1.2; }
.metric-meta { justify-content: flex-start; gap: 18px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.metric-meta span { display: inline-flex; align-items: center; gap: 6px; }
.metric-meta .icon { width: 15px; height: 15px; color: var(--lime); }
.insight-card { display: flex; min-height: 202px; align-items: center; gap: 14px; padding: 20px; transition: border-color .15s ease, transform .15s ease; }
.insight-card:hover { transform: translateY(-2px); border-color: #526647; }
.insight-card > span:nth-child(2) { display: grid; flex: 1; gap: 4px; }
.insight-card strong { font-size: 15px; }
.insight-card small { color: var(--muted); font-size: 12px; }
.insight-card > .icon { color: var(--lime); }
.section-heading { align-items: flex-end; margin: 35px 0 14px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: -.25px; }
.section-heading p, .panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.text-link { color: var(--lime); font-size: 12px; font-weight: 900; }
.text-link span { margin-left: 4px; font-size: 16px; }
.transaction-panel { padding: 3px 20px; }
.transaction-row, .history-row { display: flex; min-height: 76px; align-items: center; gap: 13px; border-bottom: 1px solid rgba(148,166,189,.14); }
.transaction-row:last-child, .history-row:last-child { border-bottom: 0; }
.game-badge { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; color: #d3dded; background: #21334a; }
.game-badge .icon { width: 21px; height: 21px; }
.game-color-1 { color: #ff91a2; background: #362634; }
.game-color-2 { color: #ffd17a; background: #383127; }
.game-color-3 { color: #9bdbeb; background: #20343c; }
.transaction-main { display: grid; min-width: 0; flex: 1; gap: 2px; }
.transaction-main strong { overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.transaction-main small { overflow: hidden; color: var(--subtle); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.transaction-main small span { padding: 0 4px; color: #526780; }
.transaction-amount { white-space: nowrap; font-size: 13px; font-weight: 900; }
.row-edit { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--subtle); }
.row-edit:hover { color: var(--lime); background: rgba(255,255,255,.05); }
.row-edit .icon { width: 16px; height: 16px; }
.premium-banner { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 16px 19px; border: 1px solid #283d4c; border-radius: 14px; background: linear-gradient(110deg, #142638, #111d2d); }
.banner-crown { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--lime); background: var(--green-soft); }
.banner-crown .icon { width: 20px; height: 20px; }
.premium-banner > div { flex: 1; }
.premium-banner strong { font-size: 13px; }
.premium-banner p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.premium-banner > a { flex: 0 0 auto; color: var(--lime); font-size: 12px; font-weight: 900; }

.filter-panel { display: grid; grid-template-columns: 1.5fr 1.05fr 1fr 1fr auto; align-items: end; gap: 12px; padding: 17px; }
.field { display: grid; min-width: 0; gap: 7px; color: #c9d2df; font-size: 12px; font-weight: 700; }
.field > span:first-child b { color: var(--lime); }
.field > span:first-child small { color: var(--subtle); font-weight: 500; }
.field input, .field select, .field textarea, .input-prefix, .month-picker input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--text); background: #0e1929; }
.field input, .field select { height: 43px; padding: 0 12px; font-size: 13px; }
.field select { color-scheme: dark; }
.field textarea { min-height: 93px; padding: 11px 12px; resize: vertical; font-size: 13px; }
.field input::placeholder, .field textarea::placeholder { color: #687c95; }
.field input:focus, .field select:focus, .field textarea:focus, .input-prefix:focus-within, .month-picker input:focus { border-color: #8bc843; box-shadow: 0 0 0 3px rgba(176,244,82,.08); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; z-index: 1; left: 12px; width: 17px; height: 17px; color: #8599b3; pointer-events: none; }
.input-wrap input { padding-left: 39px; }
.input-wrap:has(input[type="date"]) input { color-scheme: dark; }
.filter-actions { display: flex; align-items: center; gap: 2px; }
.filter-actions .button { min-height: 42px; padding: 0 12px; font-size: 11px; }
.period-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 17px; padding: 16px 19px; }
.period-total .metric-label { margin: 0 0 2px; font-size: 12px; }
.period-total strong { color: var(--lime); font-size: 24px; font-weight: 900; letter-spacing: -.5px; }
.count-pill { padding: 6px 10px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.transaction-heading { margin: 26px 0 10px; }
.transaction-heading h2 { margin: 0; font-size: 16px; }
.transaction-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.row-actions { display: flex; align-items: center; gap: 2px; }
.delete-action:hover { color: var(--danger); background: rgba(255,130,145,.08); }
.empty-state { display: grid; min-height: 225px; justify-items: center; align-content: center; padding: 28px 18px; text-align: center; }
.empty-mark { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 10px; border-radius: 13px; color: var(--lime); background: var(--green-soft); }
.empty-mark .icon { width: 21px; height: 21px; }
.empty-state > strong { font-size: 15px; }
.empty-state > p { max-width: 350px; margin: 4px 0 15px; color: var(--muted); font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; color: var(--muted); font-size: 12px; }
.pagination > div { display: flex; gap: 8px; }
.pagination .button { min-height: 36px; font-size: 11px; }
.is-disabled { opacity: .42; cursor: default; }
.is-disabled:hover { transform: none; }

.compact-heading { align-items: flex-start; margin-bottom: 23px; }
.back-link { display: flex; align-items: center; gap: 5px; margin: -4px 0 13px; color: var(--muted); font-size: 12px; font-weight: 800; }
.back-link:hover { color: var(--lime); }
.back-link .icon { width: 16px; height: 16px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 17px; }
.editor-panel { display: grid; gap: 17px; padding: 22px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 1px solid; border-radius: 11px; font-size: 12px; line-height: 1.5; }
.notice .icon { width: 17px; height: 17px; margin-top: 1px; }
.notice p { margin: 0; }
.notice-green { border-color: #2b493c; color: #bfd0c5; background: rgba(25,51,41,.75); }
.notice-green .icon { color: var(--lime); }
.notice-amber { border-color: #51422b; color: #dccba6; background: rgba(52,42,27,.56); }
.notice-amber .icon { color: #e6bd73; }
.input-prefix { display: flex; height: 46px; align-items: center; gap: 9px; padding: 0 12px; color: var(--muted); font-weight: 800; }
.input-prefix input { height: 42px; padding: 0; border: 0; background: transparent; font-size: 15px; font-weight: 800; }
.input-prefix input:focus { outline: 0; box-shadow: none; }
.field-hint { color: var(--subtle); font-size: 10px; font-weight: 500; }
.form-submit { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; }
.form-aside { padding: 19px; }
.form-aside h3, .checkout-aside h3, .reassurance-card h3 { margin: 15px 0 6px; font-size: 15px; font-weight: 900; }
.form-aside > p, .checkout-aside > p, .reassurance-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.aside-divider { height: 1px; margin: 18px 0 14px; background: rgba(148,166,189,.16); }
.privacy-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.privacy-line .icon { width: 15px; height: 15px; color: var(--lime); }

.stats-heading { align-items: center; }
.month-picker { display: flex; align-items: center; gap: 8px; padding: 7px 9px 7px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.month-picker label { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.month-picker input { width: 135px; height: 30px; padding: 0 5px; border: 0; background: transparent; color-scheme: dark; font-size: 11px; }
.month-picker button { display: grid; width: 29px; height: 29px; place-items: center; border: 0; border-radius: 7px; color: var(--lime); background: var(--green-soft); }
.month-picker button .icon { width: 15px; height: 15px; }
.stats-total { display: grid; gap: 2px; margin: 0 0 17px; }
.stats-total .metric-label { margin: 0; }
.stats-total > strong { color: var(--lime); font-size: clamp(38px, 5vw, 52px); font-weight: 900; letter-spacing: -1.7px; line-height: 1.15; }
.total-note { color: var(--subtle); font-size: 11px; }
.stats-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 14px; }
.mini-stat { display: flex; align-items: center; gap: 12px; padding: 16px; }
.mini-stat > div { display: grid; min-width: 0; gap: 1px; }
.mini-stat > div strong { overflow: hidden; font-size: clamp(16px, 2vw, 22px); font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.mini-stat > div span { color: var(--muted); font-size: 11px; }
.chart-panel, .game-breakdown { margin-top: 14px; padding: 19px; }
.panel-heading { margin-bottom: 15px; }
.bar-chart { display: grid; height: 199px; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; padding: 0 2px; border-bottom: 1px solid #304158; background: repeating-linear-gradient(to bottom, transparent 0, transparent 42px, rgba(155,174,197,.09) 43px, transparent 44px); }
.bar-column { display: flex; min-width: 0; height: 100%; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar-value { overflow: hidden; max-width: 100%; height: 20px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.bar-column:has(.bar-highlight) .bar-value { color: var(--lime); }
.bar-track { display: flex; width: min(48px, 64%); height: 145px; align-items: flex-end; overflow: hidden; border-radius: 7px 7px 2px 2px; background: rgba(40,56,77,.36); }
.bar-fill { width: 100%; min-height: 0; border-radius: 7px 7px 2px 2px; background: #57936e; transition: height .25s ease; }
.bar-fill.bar-highlight { background: var(--lime); }
.bar-label { height: 25px; padding-top: 6px; color: var(--subtle); font-size: 10px; }
.game-stat-row { margin-top: 15px; }
.game-stat-top { gap: 12px; font-size: 12px; }
.game-stat-top strong:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-stat-top strong:last-child { white-space: nowrap; }
.game-progress { height: 5px; overflow: hidden; margin: 7px 0 4px; border-radius: 5px; background: #2a394f; }
.game-progress span { display: block; height: 100%; border-radius: inherit; background: #b3a0ff; }
.game-stat-row:nth-of-type(3n) .game-progress span { background: #69c8d6; }
.game-stat-row:nth-of-type(4n) .game-progress span { background: var(--lime); }
.game-stat-bottom { color: var(--subtle); font-size: 10px; }
.empty-inline { padding: 15px 0 3px; color: var(--muted); font-size: 12px; }
.disclaimer-line { display: flex; align-items: flex-start; gap: 7px; margin: 14px 0 0; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.disclaimer-line .icon { width: 14px; height: 14px; margin-top: 1px; }
.premium-gate { display: grid; justify-items: start; gap: 8px; margin-top: 14px; padding: 21px; background: radial-gradient(ellipse at 90% 10%, rgba(176,244,82,.07), transparent 36%), var(--surface); }
.premium-gate .eyebrow { margin-top: 6px; }
.premium-gate h2 { margin: 0; font-size: 19px; font-weight: 900; }
.premium-gate p { max-width: 560px; margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.auth-demo { display: grid; gap: 1px; margin-top: 14px; padding: 9px 12px; border: 1px dashed #3d5267; border-radius: 9px; color: var(--muted); background: rgba(17,29,46,.65); font-size: 10px; }
.auth-demo strong { color: var(--lime); font-size: 10px; }

.premium-status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-active, .status-text { color: var(--lime); }
.premium-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(240px, .7fr); align-items: start; gap: 17px; }
.plan-card, .active-plan-card { padding: 24px; }
.plan-card h2, .active-plan-card h2 { margin: 20px 0 0; font-size: 16px; font-weight: 900; }
.plan-price { margin: 3px 0 0; color: var(--lime); font-size: 33px; font-weight: 900; letter-spacing: -.8px; }
.plan-price span { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.plan-description { margin: 5px 0 17px; color: var(--muted); font-size: 12px; }
.feature-list { display: grid; gap: 14px; margin: 22px 0; }
.feature-list > div { display: flex; align-items: center; gap: 10px; color: #d9e1eb; font-size: 12px; }
.feature-check { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--lime); background: var(--green-soft); }
.feature-check .icon { width: 16px; height: 16px; }
.premium-aside { display: grid; gap: 12px; }
.reassurance-card { padding: 16px; }
.reassurance-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--purple); background: var(--purple-soft); }
.reassurance-icon .icon { width: 17px; height: 17px; }
.reassurance-card h3 { margin-top: 10px; font-size: 13px; }
.reassurance-card p { font-size: 11px; }
.terms-callout { display: grid; gap: 4px; padding: 3px 3px 0; color: var(--muted); font-size: 11px; }
.terms-callout a { font-size: 11px; }
.active-plan-card { max-width: 720px; margin: 0 auto; }
.plan-top .status-text { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 900; }
.plan-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 18px 0 0; padding-top: 15px; border-top: 1px solid rgba(148,166,189,.17); }
.plan-dates > span { display: grid; gap: 2px; }
.plan-dates small { color: var(--muted); font-size: 10px; }
.plan-dates strong { font-size: 12px; }
.compact-features { grid-template-columns: 1fr 1fr; margin-top: 19px; }
.active-plan-card > .button { margin-top: 17px; }
.cancel-form { margin-top: 12px; }
.text-button { padding: 4px 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--danger); }
.terms-document { max-width: 790px; padding: 27px; }
.terms-document h2 { margin: 15px 0 8px; font-size: 21px; }
.terms-document h3 { margin: 24px 0 5px; font-size: 14px; }
.terms-document p { color: #c1ccda; font-size: 13px; line-height: 1.8; }
.terms-document .notice { margin-top: 24px; }
.terms-document .form-submit { margin-top: 23px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; align-items: start; gap: 17px; }
.checkout-panel { gap: 18px; padding: 21px; }
.checkout-plan { display: flex; align-items: center; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #0e1929; }
.checkout-plan > div:nth-child(2) { display: grid; flex: 1; gap: 2px; }
.checkout-plan > div:nth-child(2) strong { font-size: 13px; }
.checkout-plan > div:nth-child(2) small, .checkout-price small { color: var(--muted); font-size: 10px; }
.checkout-price { display: grid; text-align: right; }
.checkout-price strong { color: var(--lime); font-size: 17px; }
.payment-options { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.payment-options legend { margin-bottom: 10px; font-size: 14px; font-weight: 900; }
.payment-option { display: flex; min-height: 51px; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #0e1929; cursor: pointer; }
.payment-option:has(input:checked) { border-color: #829f54; background: rgba(176,244,82,.05); }
.payment-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.payment-icon { display: grid; width: 29px; height: 29px; place-items: center; color: var(--muted); }
.payment-icon .icon { width: 19px; height: 19px; }
.payment-option > span:nth-of-type(2) { flex: 1; font-size: 12px; font-weight: 700; }
.radio-indicator { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #60748d; border-radius: 50%; }
.payment-option input:checked ~ .radio-indicator { border-color: var(--lime); }
.payment-option input:checked ~ .radio-indicator::after { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); content: ""; }
.payment-option:focus-within { outline: 2px solid rgba(176,244,82,.4); outline-offset: 2px; }
.checkout-total { display: flex; align-items: center; justify-content: space-between; padding: 2px 0 14px; border-bottom: 1px solid var(--line); }
.checkout-total > span { font-size: 12px; }
.checkout-total > strong { font-size: 21px; font-weight: 900; }
.agreement-box label { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.6; cursor: pointer; }
.agreement-box input { width: 17px; height: 17px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--lime); }
.agreement-box a, .terms-document a { color: var(--lime); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.checkout-aside { padding: 18px; }
.checkout-aside > a { display: inline-block; margin-top: 13px; color: var(--lime); font-size: 11px; font-weight: 800; }
.active-intro { display: grid; justify-items: center; margin: 6px 0 23px; text-align: center; }
.success-check { display: grid; width: 53px; height: 53px; place-items: center; margin-bottom: 14px; border-radius: 50%; color: var(--lime); background: var(--green-soft); }
.success-check .icon { width: 30px; height: 30px; stroke-width: 2.4; }
.active-intro h1 { margin: 5px 0 2px; font-size: 27px; font-weight: 900; letter-spacing: -.7px; }
.active-intro p { margin: 0; color: var(--muted); font-size: 12px; }
.active-benefits { max-width: 720px; margin: 14px auto 0; padding: 18px 20px; }
.active-benefits .section-heading { margin: 0; }
.active-benefits .feature-list { grid-template-columns: 1fr 1fr; }
.feature-unlocked { color: var(--lime); font-size: 11px; font-weight: 800; }
.active-actions { display: flex; max-width: 720px; flex-wrap: wrap; align-items: center; gap: 9px; margin: 15px auto 0; }
.active-actions .text-link { padding: 8px 4px; }
.subscription-history { padding: 3px 19px; }
.history-row { gap: 12px; }
.history-row .card-icon { width: 35px; height: 35px; }
.history-status { padding: 5px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }

.alert { position: relative; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 17px; padding: 12px 38px 12px 13px; border: 1px solid; border-radius: 11px; font-size: 12px; }
.alert > .icon { width: 17px; height: 17px; margin-top: 1px; }
.alert-success { border-color: #2b493c; color: #d0e4d4; background: #14281f; }
.alert-success > .icon { color: var(--lime); }
.alert-error { border-color: #653640; color: #ffd0d5; background: #2a1820; }
.alert-error > .icon { color: var(--danger); }
.alert-close { position: absolute; top: 5px; right: 8px; padding: 2px 6px; border: 0; color: inherit; background: transparent; font-size: 20px; }

.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 35px 20px; background: radial-gradient(ellipse at 12% 2%, rgba(176,244,82,.055), transparent 33%), var(--bg); }
.auth-card { width: min(100%, 410px); }
.auth-brand { margin: 0 0 35px; }
.auth-intro { margin-bottom: 23px; }
.auth-intro h1 { margin: 8px 0 7px; font-size: clamp(29px, 7vw, 35px); font-weight: 900; letter-spacing: -1.1px; line-height: 1.12; }
.auth-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-status, .auth-error { margin: 13px 0; padding: 10px 12px; border: 1px solid; border-radius: 9px; font-size: 11px; }
.auth-status { border-color: #2b493c; color: #d0e4d4; background: #14281f; }
.auth-error { border-color: #653640; color: #ffd0d5; background: #2a1820; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 20px 0; padding: 4px; border-radius: 11px; background: var(--surface); }
.auth-tabs a { display: grid; min-height: 36px; place-items: center; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.auth-tabs a.selected { color: var(--lime); background: #203426; }
.form-stack { display: grid; gap: 15px; }
.auth-card .field { font-size: 12px; }
.auth-card .field input { height: 46px; }
.auth-card .button { min-height: 48px; margin-top: 3px; font-size: 14px; }
.auth-card .button span { font-size: 18px; }
.forgot-link { margin: -7px 0 -3px; text-align: right; }
.forgot-link a { color: var(--lime); font-size: 11px; font-weight: 800; }
.auth-foot { margin: 17px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.auth-foot a { color: var(--lime); font-weight: 900; }
.auth-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 21px; padding: 11px 12px; border-radius: 11px; color: var(--muted); background: var(--surface); }
.auth-note .icon { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; }
.auth-note p { margin: 0; font-size: 10px; line-height: 1.55; }

@media (min-width: 1500px) {
    .main-content { padding-right: 56px; padding-left: 56px; }
}
@media (max-width: 1100px) {
    .sidebar { width: 218px; padding-right: 14px; padding-left: 14px; }
    .main-column { margin-left: 218px; }
    .main-content { padding-right: 27px; padding-left: 27px; }
    .topbar { padding-right: 27px; padding-left: 27px; }
    .filter-panel { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
    .filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 760px) {
    body { font-size: 14px; }
    .sidebar { display: none; }
    .main-column { margin: 0; }
    .topbar { height: 50px; padding: 0 20px; border-bottom: 0; font-size: 10px; }
    .topbar-user { gap: 8px; font-size: 11px; }
    .topbar-user .avatar { display: grid; width: 29px; height: 29px; font-size: 11px; }
    .main-content { width: 100%; padding: 13px 20px 102px; }
    .mobile-nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; min-height: 73px; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 5px 12px max(5px, env(safe-area-inset-bottom)); border-top: 1px solid #263548; background: rgba(10,17,28,.97); backdrop-filter: blur(16px); }
    .mobile-nav a { display: grid; min-height: 52px; justify-items: center; align-content: center; gap: 3px; color: var(--subtle); }
    .mobile-nav .icon { width: 19px; height: 19px; }
    .mobile-nav span { font-size: 9px; font-weight: 700; }
    .mobile-nav a.active { color: var(--lime); }
    .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 21px; }
    .page-heading h1 { font-size: 29px; }
    .page-heading p { font-size: 12px; }
    .eyebrow { font-size: 9px; }
    .heading-action { min-height: 38px; gap: 6px; margin-top: 14px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
    .heading-action .icon { width: 15px; height: 15px; }
    .summary-grid { grid-template-columns: 1fr; gap: 11px; }
    .spending-card { min-height: 183px; padding: 17px; }
    .metric-label { margin-top: 12px; font-size: 11px; }
    .metric-value { font-size: 38px; }
    .metric-meta { margin-top: 9px; font-size: 11px; }
    .insight-card { min-height: 78px; padding: 13px; }
    .section-heading { margin-top: 26px; }
    .section-heading h2 { font-size: 15px; }
    .transaction-panel { padding: 1px 12px; }
    .transaction-row { min-height: 68px; gap: 10px; }
    .game-badge { width: 37px; height: 37px; }
    .transaction-main strong, .transaction-amount { font-size: 12px; }
    .transaction-main small { font-size: 10px; }
    .premium-banner { flex-wrap: wrap; gap: 10px; padding: 13px; }
    .banner-crown { width: 33px; height: 33px; }
    .premium-banner > div { min-width: calc(100% - 50px); }
    .premium-banner strong { font-size: 12px; }
    .premium-banner p { font-size: 10px; }
    .premium-banner > a { margin-left: 43px; font-size: 11px; }
    .filter-panel { grid-template-columns: 1fr 1fr; gap: 11px; padding: 13px; }
    .search-field, .filter-actions { grid-column: 1 / -1; }
    .field { font-size: 11px; }
    .field input, .field select { height: 40px; font-size: 11px; }
    .filter-actions { justify-content: flex-start; }
    .period-total { margin-top: 12px; padding: 12px; }
    .period-total strong { font-size: 20px; }
    .period-total .metric-label { font-size: 10px; }
    .count-pill { padding: 5px 8px; font-size: 9px; }
    .transaction-heading { margin-top: 22px; }
    .row-actions { gap: 0; }
    .row-actions .icon-button { width: 29px; height: 29px; }
    .pagination { font-size: 10px; }
    .pagination .button { min-height: 32px; padding: 0 9px; font-size: 10px; }
    .compact-heading { margin-bottom: 17px; }
    .back-link { margin: -1px 0 10px; font-size: 11px; }
    .form-layout, .premium-grid, .checkout-layout { grid-template-columns: 1fr; gap: 12px; }
    .editor-panel, .checkout-panel { gap: 14px; padding: 15px; }
    .form-aside, .checkout-aside { padding: 14px; }
    .form-aside h3, .checkout-aside h3 { margin-top: 9px; font-size: 13px; }
    .form-aside > p, .checkout-aside > p { font-size: 11px; }
    .form-submit { justify-content: stretch; }
    .form-submit .button { flex: 1; }
    .stats-heading { align-items: flex-start; }
    .stats-heading .month-picker { margin-top: 6px; }
    .month-picker { gap: 4px; padding: 5px 6px 5px 9px; }
    .month-picker label { display: none; }
    .month-picker input { width: 117px; font-size: 10px; }
    .month-picker button { width: 27px; height: 27px; }
    .stats-total > strong { font-size: 43px; }
    .stats-cards { gap: 9px; }
    .mini-stat { gap: 9px; padding: 12px 10px; }
    .mini-stat .card-icon { width: 31px; height: 31px; border-radius: 9px; }
    .mini-stat .card-icon .icon { width: 17px; height: 17px; }
    .mini-stat > div strong { font-size: 14px; }
    .mini-stat > div span { font-size: 9px; }
    .chart-panel, .game-breakdown { padding: 14px; }
    .panel-heading h2 { font-size: 14px; }
    .panel-heading p { font-size: 10px; }
    .bar-chart { height: 180px; gap: 5px; }
    .bar-track { height: 129px; }
    .bar-value { font-size: 8px; }
    .bar-label { font-size: 9px; }
    .premium-status { margin-top: 4px; padding: 6px 8px; font-size: 9px; }
    .plan-card, .active-plan-card { padding: 17px; }
    .plan-price { font-size: 30px; }
    .feature-list { gap: 11px; margin: 17px 0; }
    .feature-list > div { gap: 8px; font-size: 11px; }
    .feature-check { width: 27px; height: 27px; }
    .premium-aside { grid-template-columns: 1fr 1fr; gap: 8px; }
    .reassurance-card { padding: 12px; }
    .reassurance-card h3 { font-size: 11px; }
    .reassurance-card p { font-size: 10px; }
    .terms-callout { grid-column: 1 / -1; padding-left: 2px; }
    .disclaimer-line { font-size: 10px; }
    .terms-document { padding: 17px; }
    .premium-gate { padding: 16px; }
    .premium-gate h2 { font-size: 16px; }
    .terms-document h2 { font-size: 18px; }
    .terms-document h3 { margin-top: 18px; font-size: 13px; }
    .terms-document p { font-size: 12px; }
    .checkout-plan { gap: 8px; padding: 11px; }
    .checkout-plan .card-icon { width: 33px; height: 33px; }
    .checkout-plan > div:nth-child(2) strong { font-size: 11px; }
    .checkout-price strong { font-size: 14px; }
    .checkout-price small { font-size: 9px; }
    .active-intro { margin: 2px 0 18px; }
    .active-intro h1 { font-size: 22px; }
    .active-benefits { padding: 14px; }
    .active-benefits .feature-list { grid-template-columns: 1fr; }
    .active-actions { display: grid; grid-template-columns: 1fr; }
    .active-actions .text-link { text-align: center; }
    .history-row { flex-wrap: wrap; gap: 9px; padding: 10px 0; }
    .history-row .transaction-main { flex-basis: calc(100% - 55px); }
    .history-row .transaction-amount { margin-left: 44px; }
    .history-status { margin-left: auto; }
    .alert { font-size: 11px; }
}
@media (max-width: 390px) {
    .main-content { padding-right: 15px; padding-left: 15px; }
    .topbar { padding-right: 15px; padding-left: 15px; }
    .page-heading h1 { font-size: 26px; }
    .heading-action { max-width: 130px; white-space: normal; }
    .filter-panel { padding: 11px; }
    .filter-actions { flex-wrap: wrap; }
    .transaction-row { gap: 8px; }
    .game-badge { width: 33px; height: 33px; }
    .row-actions .icon-button { width: 26px; }
    .transaction-amount { font-size: 11px; }
}
