:root {
    --bg: #f6f7f4;
    --surface: #ffffff;
    --surface-soft: #f1f5f2;
    --surface-tint: #e9f3ee;
    --text: #111916;
    --muted: #5e6a64;
    --muted-strong: #3f4d47;
    --line: #dce3de;
    --line-strong: #c8d2cc;
    --accent: #087f5b;
    --accent-dark: #056445;
    --accent-soft: #dff4ec;
    --gold: #c8860d;
    --gold-dark: #a76b06;
    --blue: #2457a6;
    --danger: #b42318;
    --danger-dark: #8f1d14;
    --shadow-sm: 0 8px 22px rgba(18, 28, 23, 0.06);
    --shadow-md: 0 18px 46px rgba(18, 28, 23, 0.10);
    --radius: 8px;
}

/* Final theme overrides (kept last to cover legacy page-specific rules). */
body{background:radial-gradient(circle at 8% 0%,rgba(8,122,91,.08),transparent 28rem),radial-gradient(circle at 92% 8%,rgba(53,106,230,.06),transparent 26rem),var(--bg)}
.topbar{background:rgba(255,255,255,.9);border-bottom-color:rgba(208,213,221,.75)}
.topbar-inner{min-height:76px}.brand-logo{max-height:46px}.nav{gap:6px}.nav a{position:relative;transition:.18s ease}.nav a.active{color:var(--accent-dark);background:var(--accent-soft)}.nav a.active:after{content:"";position:absolute;right:12px;bottom:3px;left:12px;height:2px;border-radius:2px;background:var(--accent)}
.user-chip{display:flex;align-items:center;gap:8px;min-width:0;padding:5px 10px 5px 5px;border:1px solid var(--line);border-radius:999px;background:#fff}.user-chip>span{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;color:#fff;background:linear-gradient(135deg,var(--accent),var(--blue));font-size:13px;font-weight:900}.user-chip small{max-width:110px;overflow:hidden;color:var(--muted-strong);font-weight:800;text-overflow:ellipsis;white-space:nowrap}
.page-head h1,.auth-panel h1{color:var(--text);letter-spacing:-.045em}.card{border-radius:14px;border-color:rgba(228,231,236,.95);box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.card:hover{border-color:#d6dbe3;box-shadow:0 2px 4px rgba(16,24,40,.04),0 14px 34px rgba(16,24,40,.08)}
.metric{min-height:142px}.metric:before{inset:18px auto auto 18px;width:38px;height:4px;border-radius:99px}.metric span{margin-top:12px;letter-spacing:.055em}.metric strong{letter-spacing:-.045em}
.btn,button,input[type=submit]{min-height:46px;border-radius:11px}.btn:hover,button:hover,input[type=submit]:hover{transform:translateY(-1px)}input,select,textarea{min-height:48px;border-radius:11px;transition:border-color .16s ease,box-shadow .16s ease}input:focus,select:focus,textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 4px rgba(8,122,91,.12)}
.table-wrap{border-radius:12px}th{background:#f8fafc;letter-spacing:.055em}tbody tr{transition:background .15s ease}tbody tr:hover{background:#fafcfb}.badge{gap:6px;border:1px solid rgba(0,0,0,.08)}.badge:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.dashboard-hero{border-radius:20px;box-shadow:0 22px 50px rgba(8,70,54,.16)}.quick-action{border-radius:15px;transition:transform .2s ease,box-shadow .2s ease}.quick-action:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(16,24,40,.12)}
.admin-layout{grid-template-columns:270px minmax(0,1fr);gap:28px}.admin-menu{top:96px;gap:5px;padding:12px;border-radius:16px}.admin-menu a{display:flex;align-items:center;gap:10px;min-height:44px;border-radius:10px;transition:.16s ease}.admin-menu a:hover{color:var(--accent-dark);background:#f2f7f5;transform:translateX(2px)}.admin-menu a.active{color:#fff;background:linear-gradient(135deg,var(--accent-dark),var(--accent));box-shadow:0 8px 18px rgba(8,122,91,.2)}
.auth-login-card{border-radius:20px}.auth-login-card:before{height:6px;background:linear-gradient(90deg,var(--accent),#24b47e,var(--blue))}
@media(max-width:1100px){.user-chip small{display:none}.user-chip{padding-right:5px}.admin-layout{grid-template-columns:230px minmax(0,1fr);gap:18px}}@media(max-width:980px){.user-chip{display:none}.topbar-inner{min-height:68px}.admin-layout{display:block}}@media(max-width:720px){body{padding-bottom:76px}.bottom-nav{border-top:1px solid var(--line);background:rgba(255,255,255,.94);box-shadow:0 -8px 26px rgba(16,24,40,.08);backdrop-filter:blur(16px)}.bottom-nav a.active{color:var(--accent-dark)}.bottom-nav a.active span{background:var(--accent-soft)}}

/* Modern interface system — shared by customer and administration areas. */
:root { --bg:#f4f7fb; --surface:#fff; --surface-soft:#f7f9fc; --text:#101828; --muted:#667085; --muted-strong:#344054; --line:#e4e7ec; --line-strong:#d0d5dd; --accent:#087a5b; --accent-dark:#056047; --accent-soft:#e8f7f1; --gold:#d79614; --blue:#356ae6; --danger:#d92d20; --shadow-sm:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.06); --shadow-md:0 20px 48px rgba(16,24,40,.12); --radius:14px; }
body { background:radial-gradient(circle at 8% 0%,rgba(8,122,91,.08),transparent 28rem),radial-gradient(circle at 92% 8%,rgba(53,106,230,.06),transparent 26rem),var(--bg); letter-spacing:-.006em; }
.topbar { border-bottom-color:rgba(208,213,221,.75); background:rgba(255,255,255,.88); }
.topbar-inner { min-height:76px; }
.brand-logo { max-height:46px; }
.brand-mark { border-radius:12px; background:linear-gradient(135deg,var(--accent),#14a879); }
.nav { gap:6px; }
.nav a { position:relative; transition:color .18s ease,background .18s ease,transform .18s ease; }
.nav a:hover { transform:translateY(-1px); }
.nav a.active { color:var(--accent-dark); background:var(--accent-soft); }
.nav a.active::after { content:""; position:absolute; right:12px; bottom:3px; left:12px; height:2px; border-radius:2px; background:var(--accent); }
.user-chip { display:flex; align-items:center; gap:8px; min-width:0; padding:5px 10px 5px 5px; border:1px solid var(--line); border-radius:999px; background:#fff; }
.user-chip>span { display:grid; place-items:center; width:32px; height:32px; flex:0 0 auto; border-radius:50%; color:#fff; background:linear-gradient(135deg,var(--accent),var(--blue)); font-size:13px; font-weight:900; }
.user-chip small { max-width:110px; overflow:hidden; color:var(--muted-strong); font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.shell { margin-top:38px; }
.page-head { align-items:center; margin-bottom:26px; }
.page-head h1,.auth-panel h1 { color:var(--text); font-size:clamp(30px,3.6vw,46px); letter-spacing:-.045em; }
.page-head p { max-width:720px; font-size:15px; }
.card { border-color:rgba(228,231,236,.95); border-radius:var(--radius); box-shadow:var(--shadow-sm); transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.card:hover { border-color:#d6dbe3; box-shadow:0 2px 4px rgba(16,24,40,.04),0 14px 34px rgba(16,24,40,.08); }
.metric { min-height:142px; padding:24px; }
.metric::before { inset:18px auto auto 18px; width:38px; height:4px; border-radius:99px; }
.metric span { margin-top:12px; letter-spacing:.055em; }
.metric strong { letter-spacing:-.045em; }
.btn,button,input[type="submit"] { min-height:46px; border-radius:11px; box-shadow:0 1px 2px rgba(16,24,40,.08); }
.btn:hover,button:hover,input[type="submit"]:hover { transform:translateY(-1px); box-shadow:0 10px 22px rgba(8,122,91,.2); }
input,select,textarea { min-height:48px; border-radius:11px; background:#fff; transition:border-color .16s ease,box-shadow .16s ease; }
input:hover,select:hover,textarea:hover { border-color:#98a2b3; }
input:focus,select:focus,textarea:focus { outline:0; border-color:var(--accent); box-shadow:0 0 0 4px rgba(8,122,91,.12); }
.field label { color:#344054; font-size:13px; letter-spacing:.01em; }
.table-wrap { border-radius:12px; border-color:var(--line); }
th { padding-top:14px; padding-bottom:14px; color:#475467; background:#f8fafc; letter-spacing:.055em; }
td { padding-top:15px; padding-bottom:15px; }
tbody tr { transition:background .15s ease; }
tbody tr:hover { background:#fafcfb; }
.badge { gap:6px; border:1px solid rgba(0,0,0,.08); }
.badge::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.alert { border:1px solid rgba(0,0,0,.08); box-shadow:var(--shadow-sm); }
.dashboard-hero { border-radius:20px; box-shadow:0 22px 50px rgba(8,70,54,.16); }
.quick-action { border-radius:15px; transition:transform .2s ease,box-shadow .2s ease; }
.quick-action:hover { transform:translateY(-3px); box-shadow:0 14px 30px rgba(16,24,40,.12); }
.plan-card { border-top:0; overflow:hidden; }
.admin-layout { grid-template-columns:270px minmax(0,1fr); gap:28px; }
.admin-menu { top:96px; gap:5px; padding:12px; border-radius:16px; }
.admin-menu a { display:flex; align-items:center; gap:10px; min-height:44px; padding:10px 12px; border-radius:10px; transition:all .16s ease; }
.admin-menu a:hover { color:var(--accent-dark); background:#f2f7f5; transform:translateX(2px); }
.admin-menu a.active { color:#fff; background:linear-gradient(135deg,var(--accent-dark),var(--accent)); box-shadow:0 8px 18px rgba(8,122,91,.2); }
.admin-menu-icon { display:inline-flex; width:19px; height:19px; }
.admin-menu-icon svg { width:100%; height:100%; fill:currentColor; }
.admin-layout>section>.page-head h1 { font-size:clamp(30px,3vw,42px); }
.auth-login-wrap { min-height:calc(100vh - 180px); place-items:center; }
.auth-login-card { border-radius:20px; padding:clamp(24px,5vw,36px); }
.auth-login-card::before { height:6px; background:linear-gradient(90deg,var(--accent),#24b47e,var(--blue)); }
.auth-login-copy h1 { letter-spacing:-.05em; }
@media (max-width:1100px) { .user-chip small{display:none}.user-chip{padding-right:5px}.admin-layout{grid-template-columns:230px minmax(0,1fr);gap:18px} }
@media (max-width:980px) { .user-chip{display:none}.topbar-inner{min-height:68px}.admin-layout{display:block} }
@media (max-width:720px) { body{padding-bottom:76px}.topbar-inner{gap:8px}.brand-logo{max-width:132px;max-height:38px}.language-switch{margin-left:auto}.shell{margin-top:22px;margin-bottom:34px}.card{padding:18px}.grid{gap:14px}.page-head{margin-bottom:18px}.dashboard-hero{border-radius:16px}.bottom-nav{border-top:1px solid var(--line);background:rgba(255,255,255,.94);box-shadow:0 -8px 26px rgba(16,24,40,.08);backdrop-filter:blur(16px)}.bottom-nav a.active{color:var(--accent-dark)}.bottom-nav a.active span{background:var(--accent-soft)}.footer{margin-bottom:88px;text-align:center} }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important} }

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 0;
}

body {
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, #ffffff 0, var(--bg) 210px),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(1440px, calc(100% - 48px));
    min-height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: max-content;
    font-size: 15px;
    font-weight: 850;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 190px;
    max-height: 42px;
    object-fit: contain;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    color: #fff;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(8, 127, 91, 0.24);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 4px;
    min-width: 0;
}

.nav a,
.language-switch a,
.tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 760;
    white-space: nowrap;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.nav-icon svg,
.quick-action svg,
.avatar-bubble svg,
.help-pill svg,
.bottom-nav svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.nav a:hover,
.language-switch a:hover,
.language-switch .active,
.tab-link.active {
    color: var(--text);
    background: var(--surface-soft);
}

.language-switch {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.language-switch a {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.mobile-admin-link,
.mobile-logout-link {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--danger);
    background: var(--surface);
    font-weight: 900;
}

.mobile-admin-link {
    color: var(--accent-dark);
}

.mobile-admin-link span,
.mobile-logout-link span {
    display: inline-flex;
    width: 19px;
    height: 19px;
}

.mobile-admin-link svg,
.mobile-logout-link svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.mobile-admin-link strong,
.mobile-logout-link strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.mobile-admin-link:hover {
    color: #fff;
    background: var(--accent);
    box-shadow: none;
}

.mobile-logout-link:hover {
    color: #fff;
    background: var(--danger);
    box-shadow: none;
}

.btn,
button,
input[type="submit"] {
    touch-action: manipulation;
}

.card,
.metric,
.table-wrap,
.auth-login-card,
.wallet-card {
    border-radius: 10px;
}

.card {
    box-shadow: var(--shadow-sm);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

input,
select,
textarea,
button,
.btn,
.btn-secondary {
    max-width: 100%;
}

@media (max-width: 980px) {
    .topbar-inner {
        width: min(100% - 24px, 1440px);
    }

    .nav {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }
}

@media (max-width: 720px) {
    .shell,
    .footer {
        width: min(100% - 24px, 1440px);
        margin-top: 20px;
    }

    .page-head {
        gap: 12px;
    }

    .page-head h1,
    .auth-panel h1 {
        font-size: clamp(26px, 9vw, 36px);
    }
}

.shell {
    width: min(1440px, calc(100% - 48px));
    margin: 34px auto 54px;
}

.footer {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 14px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-head h1,
.auth-panel h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.04;
    font-weight: 900;
}

.page-head p,
.auth-panel p,
.muted {
    margin: 7px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.card h2,
.card h3 {
    margin-top: 0;
}

.metric {
    position: relative;
    min-height: 128px;
    overflow: hidden;
}

.metric::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--accent);
}

.metric:nth-child(2)::before {
    background: var(--gold);
}

.metric:nth-child(3)::before {
    background: var(--blue);
}

.metric:nth-child(4)::before {
    background: var(--muted-strong);
}

.metric span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    margin-top: 9px;
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1;
    font-weight: 900;
}

.metric small {
    display: block;
    margin-top: 9px;
    color: var(--muted);
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 300px;
    border-top: 4px solid var(--accent);
}

.plan-card h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
}

.plan-price {
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 920;
    line-height: 1;
}

.plan-details {
    display: grid;
    gap: 0;
    color: var(--muted);
}

.plan-details div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.plan-details strong {
    color: var(--muted-strong);
    text-align: right;
}

.plan-details strong small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.15;
    font-weight: 800;
}

.plan-details .plan-total-return {
    margin-top: 4px;
    border-bottom: 0;
}

.plan-details .plan-total-return span,
.plan-details .plan-total-return strong,
.plan-details .plan-total-return strong small {
    color: var(--accent-dark);
    font-weight: 950;
}

.plan-card form {
    margin-top: auto;
}

.btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    background: var(--accent);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background: var(--accent-dark);
    box-shadow: 0 10px 20px rgba(8, 127, 91, 0.16);
}

.btn:active,
button:active,
input[type="submit"]:active {
    transform: translateY(1px);
}

.btn-secondary {
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    background: #e5ece7;
    box-shadow: none;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-gold {
    background: var(--gold);
}

.btn-gold:hover {
    background: var(--gold-dark);
    box-shadow: 0 10px 20px rgba(200, 134, 13, 0.16);
}

.btn-block {
    width: 100%;
}

form {
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 15px;
}

.field label {
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 850;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
}

input[type="checkbox"] {
    width: auto;
    min-height: 0;
    margin-right: 6px;
}

.check-row {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: var(--text);
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(8, 127, 91, 0.15);
    border-color: var(--accent);
}

.auth-wrap {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 190px);
    padding: 24px 0;
}

.auth-panel {
    width: min(480px, 100%);
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    padding: 8px 11px;
    border: 1px solid rgba(8, 127, 91, .18);
    border-radius: var(--radius);
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 13px;
    font-weight: 900;
}

.auth-badge span {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.auth-badge svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.auth-panel .card {
    margin-top: 18px;
    box-shadow: var(--shadow-md);
}

.auth-login-wrap {
    place-items: start center;
    min-height: auto;
    padding: clamp(22px, 5vh, 46px) 0 48px;
}

.auth-login-panel {
    width: min(500px, 100%);
}

.auth-login-card {
    position: relative;
    display: grid;
    gap: 18px;
    overflow: hidden;
    padding: clamp(22px, 4vw, 30px);
    border-color: rgba(8, 127, 91, .18);
    border-top: 1px solid rgba(8, 127, 91, .18);
    box-shadow: 0 18px 42px rgba(18, 28, 23, .10);
}

.auth-login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), #39d98a, var(--blue));
}

.auth-login-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}

.auth-login-brand img {
    display: block;
    width: auto;
    max-width: 150px;
    max-height: 42px;
    object-fit: contain;
}

.auth-login-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    font-size: 18px;
    font-weight: 950;
}

.auth-login-copy {
    display: grid;
    gap: 7px;
}

.auth-login-copy span {
    width: max-content;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(8, 127, 91, .18);
    border-radius: var(--radius);
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-login-copy h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 42px);
    line-height: 1.04;
    font-weight: 950;
}

.auth-login-copy p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 16px;
}

.auth-login-form {
    display: grid;
    gap: 14px;
}

.auth-login-form .field {
    margin: 0;
}

.auth-login-form input {
    min-height: 50px;
    border-color: var(--line-strong);
    background: #fbfdfb;
    font-size: 16px;
}

.auth-login-form input::placeholder {
    color: #9aa39d;
}

.auth-login-form button {
    min-height: 50px;
    font-size: 16px;
}

.auth-login-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.auth-login-footer span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 760;
}

.auth-login-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 14px;
    font-weight: 900;
}

.auth-login-footer a:hover {
    color: #fff;
    background: var(--accent);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    color: var(--muted-strong);
    background: #fafbf9;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

td {
    font-size: 14px;
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.badge-success {
    color: #075b41;
    background: #dff5ea;
}

.badge-warning {
    color: #7a4e08;
    background: #fff1ce;
}

.badge-danger {
    color: #8e241b;
    background: #ffe0dc;
}

.badge-muted {
    color: #4f5a50;
    background: #edf1ed;
}

.alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: var(--radius);
    font-weight: 800;
}

.alert-success {
    color: #075b41;
    background: #dff5ea;
}

.alert-danger {
    color: #8e241b;
    background: #ffe0dc;
}

.alert-info {
    color: #173f78;
    background: #dfeaff;
}

.qr-box {
    display: grid;
    place-items: center;
    min-height: 310px;
    padding: 18px;
    background: var(--surface-soft);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.qr-box img {
    width: min(270px, 100%);
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.admin-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
}

.admin-layout > section {
    min-width: 0;
}

.admin-menu {
    position: sticky;
    top: 88px;
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.admin-menu a {
    padding: 12px 13px;
    border-radius: var(--radius);
    color: var(--muted-strong);
    font-weight: 850;
}

.admin-menu a:hover,
.admin-menu a.active {
    color: var(--text);
    background: var(--surface-soft);
}

.admin-mobile-menu {
    display: none;
}

.admin-layout .table-wrap table {
    min-width: 920px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.actions input,
.actions select {
    width: auto;
    max-width: 220px;
}

.actions .btn,
.actions button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 13px;
}

.invite-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.invite-box input {
    flex: 1;
    min-width: 0;
}

.invite-box .btn,
.invite-box button {
    flex: 0 0 auto;
}

.level-box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: clamp(22px, 4vw, 34px);
    border-radius: 0 0 32px 32px;
    background:
        radial-gradient(circle at 86% 18%, rgba(255, 255, 255, .34) 0 58px, transparent 60px),
        linear-gradient(135deg, #5b8ff4 0%, #45d4c8 56%, #30d7b4 100%);
    box-shadow: var(--shadow-md);
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.user-welcome p {
    margin: 0;
    color: #fff;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 900;
}

.user-welcome small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, .86);
    font-weight: 700;
}

.avatar-bubble,
.help-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: var(--accent);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 28px rgba(8, 74, 91, .18);
}

.avatar-bubble svg {
    width: 28px;
    height: 28px;
}

.help-pill {
    width: 48px;
    height: 48px;
    color: #fff;
    background: rgba(255, 255, 255, .23);
    border: 1px solid rgba(255, 255, 255, .45);
}

.wallet-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: min(760px, 100%);
    margin-top: 24px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 24px 42px rgba(10, 75, 85, .18);
    backdrop-filter: blur(10px);
}

.wallet-card span,
.wallet-card small {
    display: block;
    color: var(--muted-strong);
    font-weight: 760;
}

.wallet-card strong {
    display: block;
    margin: 9px 0 3px;
    font-size: clamp(30px, 6vw, 44px);
    line-height: 1;
    font-weight: 900;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0 24px;
}

.quick-action {
    display: grid;
    justify-items: center;
    gap: 9px;
    min-height: 110px;
    padding: 18px 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-align: center;
}

.quick-action span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.quick-action svg {
    width: 25px;
    height: 25px;
}

.quick-action strong {
    font-size: 14px;
}

.action-blue span {
    color: #2d6cdf;
    background: #e4eeff;
}

.action-orange span {
    color: #ef7b2d;
    background: #fff0e6;
}

.action-green span {
    color: #087f5b;
    background: #def7ed;
}

.action-gold span {
    color: #a76b06;
    background: #fff1ce;
}

.action-indigo span {
    color: #536dfe;
    background: #e8ebff;
}

.soft-metrics {
    margin-top: 8px;
}

.section-title {
    margin-top: 34px;
}

.visual-plan {
    overflow: hidden;
    padding: 0;
    border-top: 0;
}

.plan-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-soft);
}

.plan-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plan-image span {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(8, 127, 91, .88);
    font-size: 12px;
    font-weight: 900;
}

.plan-offer-ribbon {
    position: absolute;
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    padding: 8px 11px;
    border-radius: 999px;
    color: #281800;
    background: #ffd166;
    box-shadow: 0 10px 22px rgba(40, 24, 0, .16);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.plan-offer-note {
    margin: 6px 0 10px;
    color: #a15c00;
    font-size: 13px;
    font-weight: 850;
}

.plan-content,
.visual-plan .plan-details,
.visual-plan form {
    padding-right: 18px;
    padding-left: 18px;
}

.plan-content {
    padding-top: 18px;
}

.visual-plan form {
    padding-bottom: 18px;
}

.plan-price small {
    color: var(--muted);
    font-size: 15px;
    font-weight: 750;
}

.plan-cop-price {
    margin: 8px 0 0;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 850;
}

.referral-rate-card {
    margin-bottom: 22px;
}

.referral-rate-list {
    display: grid;
    gap: 10px;
}

.referral-rate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.referral-rate-row span {
    color: var(--muted-strong);
    font-weight: 850;
}

.referral-rate-row strong {
    color: var(--accent-dark);
    font-size: 22px;
    line-height: 1;
    font-weight: 920;
}

.bottom-nav {
    display: none;
}

.conversion-box {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(8, 127, 91, .18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(91, 143, 244, .14), rgba(48, 215, 180, .18)),
        #fff;
}

.conversion-box span,
.conversion-box small {
    display: block;
    color: var(--muted-strong);
    font-weight: 800;
}

.conversion-box strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1;
    font-weight: 920;
}

.conversion-box p {
    margin: 8px 0 8px;
    color: var(--accent);
    font-size: 22px;
    font-weight: 900;
}

.icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    color: var(--accent);
    background: var(--accent-soft);
}

.icon-title svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.share-card {
    border-color: rgba(36, 87, 166, .18);
    background:
        linear-gradient(135deg, rgba(36, 87, 166, .08), rgba(8, 127, 91, .08)),
        var(--surface);
}

.support-card .btn,
.profile-card .btn,
.withdraw-card .btn {
    margin-top: 14px;
}

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .topbar-inner {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px 14px;
        width: min(100% - 28px, 1440px);
        padding: 12px 0;
    }

    .brand {
        min-height: 38px;
    }

    .nav {
        order: 3;
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .language-switch {
        margin-left: auto;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid-2,
    .form-grid,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-menu {
        position: static;
        grid-template-columns: repeat(4, minmax(120px, 1fr));
        max-height: none;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 15px;
        padding-bottom: 76px;
    }

    .shell,
    .footer {
        width: min(100% - 24px, 1440px);
    }

    .shell {
        margin-top: 22px;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        gap: 14px;
        grid-template-columns: 1fr;
    }

    .card {
        padding: 17px;
    }

    .metric {
        min-height: 112px;
    }

    .plan-card {
        min-height: 0;
    }

    .btn,
    button,
    input[type="submit"] {
        width: 100%;
    }

    .actions,
    .actions form {
        width: 100%;
    }

    .actions input,
    .actions select,
    .actions .btn,
    .actions button {
        width: 100%;
        max-width: none;
    }

    .invite-box {
        flex-direction: column;
    }

    .admin-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-menu-desktop {
        display: none;
    }

    .admin-mobile-menu {
        display: block;
    }

    .topbar .nav {
        display: none;
    }

    .mobile-admin-link,
    .mobile-logout-link {
        display: inline-flex;
    }

    .dashboard-hero {
        margin-right: -12px;
        margin-left: -12px;
        border-radius: 0 0 28px 28px;
    }

    .wallet-card {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 18px;
    }

    .quick-actions {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .quick-action {
        min-height: 86px;
        padding: 11px 4px;
        border: 0;
        box-shadow: none;
    }

    .quick-action span {
        width: 39px;
        height: 39px;
    }

    .quick-action strong {
        font-size: 11px;
        line-height: 1.15;
    }

    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
        min-height: 66px;
        padding: 7px 8px 8px;
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -12px 28px rgba(18, 28, 23, .08);
        backdrop-filter: blur(12px);
    }

    .admin-layout {
        gap: 12px;
    }

    .admin-mobile-menu.card {
        position: sticky;
        top: 70px;
        z-index: 18;
        padding: 0;
        border-radius: 10px;
    }

    .admin-mobile-links {
        max-height: 58vh;
        overflow: auto;
        padding: 8px;
    }

    .admin-mobile-links a {
        min-height: 44px;
        padding: 10px;
        font-size: 14px;
    }

    .admin-compact-section {
        padding: 12px;
    }

    .visibility-toggle-grid {
        grid-template-columns: 1fr;
    }

    .visibility-toggle {
        min-height: 48px;
    }

    .nav-builder-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .page-head p,
    .muted {
        font-size: 13px;
        line-height: 1.35;
    }

    .admin-layout .table-wrap {
        margin-right: -12px;
        margin-left: -12px;
        border-radius: 0;
    }

    .bottom-nav a {
        display: grid;
        justify-items: center;
        gap: 3px;
        color: var(--muted-strong);
        font-size: 12px;
        font-weight: 760;
    }

    .bottom-nav span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
    }

    .bottom-nav-home span {
        width: 44px;
        height: 44px;
        margin-top: -23px;
        border-radius: 50%;
        color: #fff;
        background: var(--accent);
        box-shadow: 0 12px 22px rgba(8, 127, 91, .25);
    }

    .bottom-nav-home svg {
        width: 23px;
        height: 23px;
    }

    th,
    td {
        padding: 11px 10px;
        font-size: 13px;
    }
}

@media (max-width: 460px) {
    .topbar-inner {
        gap: 8px;
        width: min(100% - 18px, 1440px);
    }

    .shell,
    .footer {
        width: min(100% - 18px, 1440px);
    }

    .brand {
        max-width: calc(100% - 204px);
    }

    .brand-logo {
        max-width: min(118px, 100%);
        max-height: 38px;
    }

    .brand span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav a {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 13px;
    }

    .mobile-admin-link,
    .mobile-logout-link {
        width: 40px;
    }

    .admin-menu {
        grid-template-columns: 1fr;
    }

    .admin-mobile-links {
        grid-template-columns: 1fr;
    }

    .page-head h1,
    .auth-panel h1 {
        font-size: 30px;
    }

    .auth-login-wrap {
        min-height: auto;
        padding: 16px 0 38px;
    }

    .auth-login-card {
        gap: 17px;
        padding: 22px;
    }

    .auth-login-brand img {
        max-width: 150px;
        max-height: 42px;
    }

    .auth-login-copy h1 {
        font-size: 32px;
    }

    .auth-login-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-login-footer a {
        width: 100%;
    }
}

/* Modern responsive polish shared by the public app and admin screens. */
.card,
.metric,
.table-wrap,
.auth-login-card,
.wallet-card {
    border-radius: 10px;
}

.card {
    box-shadow: var(--shadow-sm);
}

input,
select,
textarea,
button,
.btn,
.btn-secondary {
    max-width: 100%;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 980px) {
    .nav {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }
}

@media (max-width: 720px) {
    .shell,
    .footer {
        width: min(100% - 24px, 1440px);
        margin-top: 20px;
    }

    .page-head {
        gap: 12px;
    }
}

/* Global polish pass */
body {
    background:
        linear-gradient(180deg, #ffffff 0, #f4f8f6 240px, #f6f7f4 100%),
        var(--bg);
}

.topbar {
    box-shadow: 0 8px 30px rgba(18, 28, 23, 0.04);
}

.brand-mark {
    background: linear-gradient(135deg, var(--accent), #2b6cdf);
}

.page-head:not(.section-title) {
    position: relative;
    overflow: hidden;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(239, 247, 243, .95)),
        var(--surface);
    box-shadow: var(--shadow-sm);
}

.page-head:not(.section-title)::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--accent), #2b6cdf);
}

.page-head:not(.section-title) h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-title {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.card {
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card:hover {
    border-color: rgba(8, 127, 91, .22);
    box-shadow: var(--shadow-md);
}

.table-wrap {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: #fbfdfb;
}

.auth-wrap {
    position: relative;
}

.auth-panel {
    position: relative;
}

.auth-panel h1 {
    color: var(--text);
}

.auth-panel .card {
    border-top: 4px solid var(--accent);
}

.auth-panel .tab-link {
    margin-top: 8px;
    width: 100%;
}

.field input,
.field select,
.field textarea {
    box-shadow: 0 1px 0 rgba(18, 28, 23, .04);
}

.field input:disabled {
    color: var(--muted);
    background: var(--surface-soft);
}

.brand-preview {
    display: block;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    object-fit: contain;
}

.brand-preview-favicon {
    width: 74px;
    height: 74px;
}

.brand-preview-logo {
    width: min(260px, 100%);
    height: 78px;
}

.admin-menu {
    padding: 14px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius);
    color: var(--accent);
    background: var(--accent-soft);
}

.admin-menu-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.admin-menu a.active .admin-menu-icon,
.admin-menu a:hover .admin-menu-icon {
    color: #fff;
    background: var(--accent);
}

.admin-mobile-menu.card {
    padding: 0;
    overflow: hidden;
}

.admin-mobile-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    cursor: pointer;
    list-style: none;
}

.admin-mobile-summary::-webkit-details-marker {
    display: none;
}

.admin-mobile-summary-text {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.admin-mobile-summary-text strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.1;
}

.admin-mobile-summary-text small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-mobile-summary i {
    display: block;
    width: 10px;
    height: 10px;
    margin-left: auto;
    border-right: 2px solid var(--muted-strong);
    border-bottom: 2px solid var(--muted-strong);
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.admin-mobile-menu[open] .admin-mobile-summary i {
    transform: rotate(225deg);
}

.admin-mobile-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 14px 14px;
}

.admin-mobile-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    padding: 9px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted-strong);
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.15;
}

.admin-mobile-links a.active,
.admin-mobile-links a:hover {
    border-color: rgba(8, 127, 91, .18);
    color: var(--text);
    background: var(--accent-soft);
}

.admin-mobile-links a.active .admin-menu-icon,
.admin-mobile-links a:hover .admin-menu-icon {
    color: #fff;
    background: var(--accent);
}

.admin-plans-mobile-list {
    display: none;
}

.admin-plan-mobile-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.admin-plan-mobile-head {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.admin-plan-mobile-thumb {
    width: 88px;
    height: 58px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--surface-soft);
}

.admin-plan-mobile-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
}

.admin-plan-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.admin-plan-mobile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 13px;
}

.admin-plan-mobile-stats div {
    min-width: 0;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.admin-plan-mobile-stats span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-plan-mobile-stats strong {
    display: block;
    margin-top: 3px;
    font-size: 15px;
    line-height: 1.15;
}

.admin-plan-mobile-total {
    grid-column: 1 / -1;
}

.admin-plan-mobile-offer {
    margin: 10px 0 0;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 850;
}

.admin-plan-mobile-actions {
    display: grid;
    gap: 8px;
    margin-top: 13px;
}

.admin-plan-mobile-actions form {
    display: block;
}

.admin-plan-mobile-actions .btn,
.admin-plan-mobile-actions button {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    font-size: 13px;
}

.admin-plan-mobile-empty {
    padding: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted-strong);
    background: var(--surface-soft);
    font-weight: 850;
}

.plan-calculator {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 2px 0 18px;
}

.plan-calculator article {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(8, 127, 91, .16);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.plan-calculator span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
}

.plan-calculator strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
    line-height: 1;
}

.finance-kpis,
.finance-panel {
    margin-top: 22px;
}

.finance-panel .table-wrap table {
    min-width: 980px;
}

.support-card,
.profile-card,
.withdraw-card {
    min-height: 100%;
}

.support-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.support-rule {
    border-top: 4px solid var(--accent);
}

.support-rule span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.support-rule strong {
    display: block;
    margin: 8px 0;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.05;
}

.support-text,
.support-videos {
    margin-top: 22px;
}

.support-text p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.7;
}

.support-video-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.quick-action:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 127, 91, .18);
    box-shadow: var(--shadow-md);
}

.visual-plan:hover .plan-image img {
    transform: scale(1.025);
}

.plan-image img {
    transition: transform 220ms ease;
}

.invite-box .btn {
    flex: 0 0 auto;
}

.qr-box {
    min-height: 340px;
}

.conversion-box {
    box-shadow: var(--shadow-sm);
}

@media (max-width: 980px) {
    .page-head:not(.section-title) {
        align-items: flex-start;
    }

    .admin-menu {
        padding: 12px;
    }
}

@media (max-width: 720px) {
    .topbar {
        position: sticky;
    }

    .topbar-inner {
        gap: 10px;
        min-height: 60px;
    }

    .language-switch {
        border-color: rgba(8, 127, 91, .22);
    }

    .page-head:not(.section-title) {
        padding: 18px 16px;
    }

    .card:hover {
        transform: none;
    }

    .table-wrap {
        border-radius: var(--radius);
    }

    .admin-menu a {
        gap: 8px;
        padding: 10px;
        font-size: 13px;
    }

    .admin-menu-icon {
        width: 28px;
        height: 28px;
    }

    .plan-calculator {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .support-info-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        display: none;
    }
}

@media (max-width: 520px) {
    .plan-calculator {
        grid-template-columns: 1fr;
    }
}

.finance-layout {
    display: grid;
    grid-template-columns: minmax(290px, .85fr) minmax(0, 1.75fr);
    gap: 24px;
    align-items: start;
    margin-top: 10px;
}

.plans-column,
.finance-column {
    min-width: 0;
}

.plans-list,
.investment-list,
.movement-list {
    display: grid;
    gap: 16px;
}

.dashboard-plans {
    margin-top: 24px;
}

.dashboard-plans .plans-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.compact-plan {
    box-shadow: var(--shadow-md);
}

.compact-plan .plan-image {
    aspect-ratio: 1.65 / 1;
}

.compact-plan h3 {
    margin-bottom: 8px;
}

.finance-head {
    align-items: flex-end;
}

.finance-head .btn {
    flex: 0 0 auto;
}

.finance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.finance-summary-wide {
    margin-top: -4px;
    margin-bottom: 20px;
}

.finance-page {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 18px;
    align-items: start;
}

.finance-chip {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(8, 127, 91, .14);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(91, 143, 244, .12), rgba(48, 215, 180, .14)),
        #fff;
    box-shadow: var(--shadow-sm);
}

.finance-chip span,
.investment-stats span,
.movement-item span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 800;
}

.finance-chip strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1;
    font-weight: 900;
}

.finance-card {
    margin-bottom: 18px;
}

.investment-item,
.movement-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.investment-item {
    padding: 16px;
}

.investment-head,
.movement-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.investment-head strong,
.movement-item strong {
    display: block;
    color: var(--text);
}

.investment-progress {
    height: 10px;
    margin: 14px 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
}

.investment-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #30d7b4);
}

.investment-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.investment-stats div {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    background: var(--surface-soft);
}

.investment-stats strong {
    display: block;
    margin-top: 5px;
    font-size: 16px;
    line-height: 1.1;
}

.movement-item {
    padding: 14px 16px;
}

.movement-item div {
    min-width: 0;
}

.movement-item div:last-child {
    flex: 0 0 auto;
    text-align: right;
}

.betting-head {
    align-items: center;
}

.betting-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .34fr);
    align-items: stretch;
    padding: 26px;
    border: 1px solid rgba(17, 32, 28, .08);
    border-radius: calc(var(--radius) + 6px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92) 0, rgba(255, 255, 255, .84) 100%);
    box-shadow: 0 20px 52px rgba(16, 28, 24, .10);
}

.betting-hero-politics {
    background:
        linear-gradient(135deg, rgba(8, 127, 91, .15), rgba(36, 87, 166, .12)),
        linear-gradient(180deg, #ffffff 0, #f5faf8 100%);
}

.betting-hero-lottery {
    background:
        linear-gradient(135deg, rgba(209, 137, 34, .18), rgba(197, 78, 52, .12)),
        linear-gradient(180deg, #ffffff 0, #fff8f1 100%);
}

.betting-hero-casino {
    background:
        linear-gradient(135deg, rgba(5, 118, 121, .18), rgba(29, 61, 138, .14)),
        linear-gradient(180deg, #ffffff 0, #f4f8ff 100%);
}

.betting-hero-copy {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.betting-entry-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.betting-entry-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 12px 14px;
    border: 1px solid rgba(8, 127, 91, .16);
    border-radius: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow-sm);
    text-align: center;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.betting-entry-link:hover,
.betting-entry-link:focus-visible,
.betting-entry-link.is-active {
    border-color: rgba(8, 127, 91, .3);
    background: linear-gradient(180deg, #ffffff 0, #f3fbf7 100%);
    box-shadow: 0 16px 32px rgba(8, 127, 91, .10);
    transform: translateY(-1px);
}

.betting-entry-link.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), #1b8a83);
}

.betting-entry-link strong {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 900;
}

.betting-hero-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.betting-hero-toolbar .btn {
    width: auto;
    min-width: 158px;
}

.betting-hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, .86);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(17, 32, 28, .08);
}

.betting-hero-copy > p {
    max-width: 720px;
    color: var(--muted-strong);
    font-size: 15px;
    line-height: 1.5;
}

.betting-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.betting-hero-stats article {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.betting-hero-stats span,
.betting-hero-stats small {
    display: block;
    color: var(--muted-strong);
}

.betting-hero-stats span {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.betting-hero-stats strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    font-weight: 950;
}

.betting-hero-stats small {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 760;
    line-height: 1.35;
}

.betting-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.betting-hero .betting-head-actions {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.betting-head-actions .btn {
    min-width: 128px;
}

.betting-hero-note {
    margin: 0;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .56);
    border-radius: 18px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .80);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 760;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
}

.balance-pill {
    flex: 0 0 auto;
    min-width: 170px;
    padding: 14px 16px;
    border: 1px solid rgba(8, 127, 91, .16);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.balance-pill span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.balance-pill strong {
    display: block;
    margin-top: 5px;
    font-size: 24px;
    line-height: 1;
}

.sports-preset-field {
    align-self: stretch;
    grid-column: 1 / -1;
}

.sports-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sports-preset-grid button {
    display: grid;
    gap: 5px;
    min-height: 74px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #fff;
    box-shadow: none;
    text-align: left;
}

.sports-preset-grid button:hover,
.sports-preset-grid button:focus-visible {
    border-color: rgba(8, 127, 91, .35);
    background: #f6fbf8;
}

.sports-preset-grid strong {
    font-size: 13px;
    line-height: 1.15;
}

.sports-preset-grid small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.admin-compact-section {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.admin-compact-section h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.15;
}

.visibility-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.visibility-toggle {
    display: grid;
    grid-template-columns: 18px 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.visibility-toggle-wide {
    max-width: 360px;
}

.visibility-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.visibility-toggle span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.visibility-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.visibility-toggle strong {
    min-width: 0;
    font-size: 14px;
    line-height: 1.15;
}

.nav-builder-list {
    display: grid;
    gap: 10px;
}

.nav-builder-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 120px minmax(180px, .65fr);
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.nav-builder-row-sub {
    background: #fbfdfc;
}

.nav-builder-row label {
    margin: 0;
}

.nav-builder-row small {
    display: block;
    margin-bottom: 5px;
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.betting-subnav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.betting-module-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.betting-module-link {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(8, 127, 91, .18);
    border-radius: calc(var(--radius) + 2px);
    color: inherit;
    background:
        linear-gradient(180deg, #ffffff 0, #f7fbf8 100%);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.betting-module-link:hover,
.betting-module-link:focus-visible,
.betting-module-link.is-active {
    border-color: rgba(8, 127, 91, .3);
    box-shadow: 0 16px 32px rgba(8, 127, 91, .10);
    transform: translateY(-1px);
}

.betting-module-link span,
.betting-module-link small {
    color: var(--muted-strong);
}

.betting-module-link span {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.betting-module-link strong {
    color: var(--text);
    font-size: 19px;
    line-height: 1.15;
    font-weight: 900;
}

.betting-module-link small {
    font-size: 12px;
    font-weight: 760;
}

.betting-subnav-link {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 2px);
    color: inherit;
    background:
        linear-gradient(180deg, #ffffff 0, #fbfcfc 100%);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.betting-subnav-link:hover,
.betting-subnav-link:focus-visible,
.betting-subnav-link.is-active {
    border-color: rgba(8, 127, 91, .26);
    background:
        linear-gradient(180deg, #ffffff 0, #f4fbf7 100%);
    box-shadow: 0 16px 32px rgba(8, 127, 91, .10);
    transform: translateY(-1px);
}

.betting-subnav-link span,
.betting-subnav-link small {
    color: var(--muted-strong);
}

.betting-subnav-link span {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.betting-subnav-link strong {
    color: var(--text);
    font-size: 19px;
    line-height: 1.15;
    font-weight: 900;
}

.betting-subnav-link small {
    font-size: 12px;
    font-weight: 760;
}

.betting-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .36fr);
    gap: 20px;
    align-items: start;
}

.sports-filter-bar {
    display: grid;
    gap: 12px;
    margin: 18px 0 20px;
    padding: 16px;
    border: 1px solid var(--bet-dark-line);
    border-radius: 8px;
    background: rgba(9, 21, 34, .96);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .20);
}

.sports-search-field {
    display: grid;
    gap: 7px;
}

.sports-search-field span {
    color: var(--bet-dark-muted-strong);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.sports-search-field input {
    min-height: 46px;
    border-radius: 8px;
    font-size: 16px;
}

.sports-league-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.sports-league-filter button,
.sports-league-filter a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--bet-dark-line);
    border-radius: 999px;
    color: var(--bet-dark-text);
    background: rgba(15, 28, 45, .92);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.sports-league-filter button.is-active,
.sports-league-filter button:hover,
.sports-league-filter button:focus-visible,
.sports-league-filter a.is-active,
.sports-league-filter a:hover,
.sports-league-filter a:focus-visible {
    border-color: rgba(31, 208, 157, .55);
    background: rgba(16, 128, 104, .96);
}

.sports-filter-empty {
    margin: 0;
    color: var(--bet-dark-muted);
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .betting-entry-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.bet-market-list {
    display: grid;
    gap: 18px;
}

.bet-market-card {
    display: grid;
    gap: 16px;
}

.bet-market-accordion {
    gap: 0;
    overflow: hidden;
    padding: 0;
}

.bet-market-accordion:hover {
    transform: none;
}

.bet-market-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.bet-market-summary::-webkit-details-marker {
    display: none;
}

.market-summary-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.market-kicker,
.market-option-count {
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.market-summary-main strong {
    color: var(--text);
    font-size: 20px;
    line-height: 1.15;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.market-summary-main > span:not(.market-kicker) {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}

.market-summary-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.market-option-count {
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--surface-soft);
    white-space: nowrap;
}

.market-chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted-strong);
    border-bottom: 2px solid var(--muted-strong);
    transform: rotate(45deg);
    transition: transform 160ms ease;
}

.bet-market-accordion[open] .market-chevron {
    transform: rotate(225deg);
}

.bet-market-body {
    display: grid;
    gap: 14px;
    padding: 0 20px 20px;
    border-top: 1px solid var(--line);
}

.market-select-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(36, 87, 166, .16);
    border-radius: var(--radius);
    background: #eef4ff;
}

.market-select-help span,
.market-selection-note {
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 800;
}

.market-select-help strong {
    flex: 0 0 auto;
    color: #173f78;
    font-size: 13px;
    font-weight: 900;
}

.vote-candidate-picker {
    display: grid;
    grid-template-columns: minmax(120px, .22fr) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.vote-candidate-picker span {
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vote-candidate-picker select {
    min-height: 40px;
}

.vote-range-help {
    margin-top: -6px;
}

.lottery-play-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.lottery-draw-strip,
.lottery-number-grid,
.lottery-series-row,
.lottery-raffle-row,
.lottery-result-card {
    display: grid;
    gap: 10px;
}

.lottery-draw-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lottery-raffle-row {
    grid-template-columns: auto repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.lottery-raffle-row > span {
    align-self: center;
    color: #061f59;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.lottery-raffle-row button {
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid #d9e1ed;
    border-radius: 8px;
    color: #061f59;
    background: #fff;
    text-align: left;
    box-shadow: none;
}

.lottery-raffle-row button:hover,
.lottery-raffle-row button:focus-visible,
.lottery-raffle-row button.is-selected {
    border-color: #062b7e;
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px #062b7e;
    transform: none;
}

.lottery-raffle-row strong,
.lottery-raffle-row small {
    display: block;
}

.lottery-raffle-row strong {
    font-size: 16px;
    line-height: 1.1;
    font-weight: 950;
}

.lottery-raffle-row small {
    margin-top: 4px;
    color: #31517f;
    font-size: 12px;
    font-weight: 850;
}

.lottery-draw-strip > div,
.lottery-number-entry {
    min-width: 0;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.lottery-draw-strip span,
.lottery-number-entry span,
.lottery-result-card > span,
.lottery-series-row small {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.lottery-draw-strip strong,
.lottery-number-entry strong {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.1;
    font-weight: 950;
}

.lottery-result-card {
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
    align-items: center;
    padding: 14px;
    border: 1px solid #d9e1ed;
    border-radius: var(--radius);
    background: #f2f6fc;
}

.lottery-result-card div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.lottery-result-card strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #061f59;
    background: #fff;
    font-size: 13px;
    line-height: 1;
    font-weight: 950;
}

.lottery-result-card small {
    color: #31517f;
    font-size: 12px;
    font-weight: 850;
}

.lottery-number-entry strong {
    font-size: 34px;
    letter-spacing: 0;
}

.lottery-number-entry small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    font-weight: 760;
}

.lottery-number-grid {
    grid-template-columns: minmax(132px, .32fr) minmax(0, 1fr);
    align-items: stretch;
}

.lottery-ball-board {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 9px;
    max-height: 278px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow-y: auto;
}

.lottery-ball {
    display: inline-grid;
    place-items: center;
    aspect-ratio: 1;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #7a8491;
    background: #edf0f3;
    font-size: 13px;
    font-weight: 950;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .04);
}

.lottery-ball:hover,
.lottery-ball:focus-visible,
.lottery-ball.is-selected {
    color: #051b4a;
    background: #ffe900;
    box-shadow: none;
    transform: none;
}

.lottery-series-row {
    grid-template-columns: minmax(150px, auto) 100px minmax(0, 1fr);
    align-items: center;
}

.lottery-series-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.lottery-series-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.lottery-series-row input[type="text"] {
    min-height: 40px;
}

.lottery-series-row small {
    line-height: 1.25;
    text-transform: none;
}

.lottery-line-card {
    display: grid;
    grid-template-columns: minmax(86px, auto) minmax(0, 1fr) minmax(150px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: #e7ebf3;
}

.lottery-line-card > span {
    color: #061f59;
    font-size: 18px;
    font-weight: 950;
    text-transform: uppercase;
}

.lottery-line-balls {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.lottery-line-balls strong {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 999px;
    color: #061f59;
    background: #ffe900;
    font-size: 14px;
    line-height: 1;
    font-weight: 950;
}

.lottery-line-balls .lottery-line-series {
    color: #fff;
    background: #f20c4f;
}

.lottery-line-card small {
    color: #1c335e;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 850;
}

.lottery-line-clear {
    min-height: 36px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #062b7e;
    font-size: 12px;
    font-weight: 950;
}

.bet-market-lottery .bet-option-list {
    display: none;
}

.bet-option-list {
    display: grid;
    gap: 8px;
}

.bet-option-row {
    display: grid;
    grid-template-columns: 22px 46px minmax(0, 1fr) minmax(128px, .28fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 68px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: #fff;
    box-shadow: none;
    text-align: left;
}

.betting-shell-sports .bet-market-card {
    border-radius: 8px;
}

.betting-shell-sports .bet-market-summary {
    padding: 16px;
}

.betting-shell-sports .market-summary-main strong {
    font-size: 18px;
}

.betting-shell-sports .bet-option-row {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 12px;
    border-radius: 8px;
}

.betting-shell-sports .bet-option-avatar,
.betting-shell-sports .bet-option-row .bet-option-action {
    display: none;
}

.betting-shell-sports .bet-option-pricing strong {
    font-size: 18px;
}

.bet-option-row:hover,
.bet-option-row:focus-visible,
.bet-option-row.is-selected {
    border-color: var(--accent);
    background: #f6fbf8;
    box-shadow: 0 10px 20px rgba(8, 127, 91, .10);
    transform: none;
}

.bet-option-row:disabled {
    background: #fafafa;
}

.bet-option-check {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid var(--line-strong);
    border-radius: 5px;
    background: #fff;
}

.bet-option-row.is-selected .bet-option-check {
    border-color: var(--accent);
    background: var(--accent);
}

.bet-option-row.is-selected .bet-option-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.bet-option-avatar {
    display: block;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-soft);
    object-fit: cover;
    object-position: top center;
}

.bet-option-initials {
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(135deg, hsl(var(--avatar-hue) 70% 30%), hsl(calc(var(--avatar-hue) + 26) 72% 45%));
}

.bet-option-initials span {
    font-size: 15px;
    line-height: 1;
    font-weight: 950;
}

.bet-option-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.bet-option-copy strong {
    font-size: 15px;
    line-height: 1.18;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.bet-option-copy small,
.bet-option-pricing small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    font-weight: 760;
    overflow-wrap: anywhere;
}

.bet-option-pricing {
    display: grid;
    justify-items: end;
    gap: 3px;
    min-width: 0;
    text-align: right;
}

.bet-option-pricing strong {
    color: var(--accent-dark);
    font-size: 16px;
    line-height: 1;
    font-weight: 950;
}

.bet-option-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 6px;
    color: #fff;
    background: var(--accent);
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.bet-option-row.is-selected .bet-option-action {
    background: var(--blue);
}

.bet-option-row:disabled .bet-option-action {
    color: var(--muted-strong);
    background: var(--surface-soft);
}

.market-bet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 2px;
}

.market-bet-footer .btn {
    flex: 0 0 auto;
}

.bet-market-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.bet-market-top span,
.bet-market-meta span,
.bet-option-card label span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.bet-market-top h2 {
    margin: 5px 0 0;
}

.bet-market-top p {
    margin: 7px 0 0;
    color: var(--muted);
}

.bet-market-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.bet-market-meta div {
    min-width: 0;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.bet-market-meta strong {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.2;
}

.ballot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 14px;
}

.ballot-card {
    display: grid;
    grid-template-rows: auto 106px auto auto auto auto;
    align-content: start;
    gap: 7px;
    min-width: 0;
    min-height: 285px;
    padding: 10px;
    border: 2px solid var(--line-strong);
    border-radius: 6px;
    color: var(--text);
    background:
        linear-gradient(180deg, #fff 0, #fff 74%, #f7faf8 100%);
    box-shadow: 0 8px 16px rgba(18, 28, 23, .08);
    cursor: pointer;
    text-align: center;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ballot-card:hover,
.ballot-card:focus-visible,
.ballot-card.is-selected {
    border-color: var(--accent);
    background:
        linear-gradient(180deg, #fff 0, #fff 70%, #eef7f2 100%);
    box-shadow: 0 18px 34px rgba(8, 127, 91, .18);
}

.ballot-card:focus-visible {
    outline: 3px solid rgba(8, 127, 91, .18);
    outline-offset: 2px;
}

.ballot-card:active {
    transform: translateY(1px);
}

.ballot-card:disabled {
    cursor: not-allowed;
}

.ballot-role {
    display: block;
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ballot-photo {
    display: block;
    width: 100%;
    max-width: 104px;
    height: 104px;
    margin: 0 auto;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: var(--surface-soft);
    object-fit: cover;
    object-position: top center;
}

.ballot-initials {
    display: grid;
    place-items: center;
    color: #fff;
    background:
        linear-gradient(135deg, hsl(var(--avatar-hue) 70% 30%), hsl(calc(var(--avatar-hue) + 26) 72% 45%));
}

.ballot-initials span {
    font-size: 26px;
    font-weight: 950;
    line-height: 1;
}

.ballot-card strong {
    display: grid;
    align-items: center;
    min-height: 42px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.12;
}

.ballot-party {
    display: grid;
    place-items: center;
    min-height: 28px;
    padding: 4px 6px;
    color: #fff;
    background:
        linear-gradient(90deg, var(--accent) 0, var(--blue) 100%);
    font-size: 11px;
    font-weight: 950;
    line-height: 1.05;
    text-transform: uppercase;
}

.ballot-odds {
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 950;
}

.ballot-return {
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 760;
    line-height: 1.3;
}

.ballot-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: auto;
    border-radius: 6px;
    color: #fff;
    background: var(--accent);
    font-size: 13px;
    font-weight: 950;
}

.ballot-card-blank {
    grid-template-rows: minmax(136px, 1fr) auto auto auto;
    place-items: center;
    background: #fff;
}

.ballot-card-blank .ballot-blank-text {
    display: grid;
    place-items: center;
    min-height: 136px;
    color: var(--text);
    font-size: 20px;
    font-weight: 850;
    line-height: 1.16;
    text-transform: uppercase;
}

.my-bets-card {
    position: sticky;
    top: 88px;
}

.bet-slip-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.bet-slip-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.bet-slip-head span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.bet-slip-head h2 {
    margin: 3px 0 0;
    font-size: 22px;
    line-height: 1.12;
}

.bet-slip-head > strong {
    flex: 0 0 auto;
    color: var(--accent-dark);
    font-size: 20px;
    line-height: 1.1;
    font-weight: 950;
}

.bet-slip-rule {
    margin: 0;
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.35;
    font-weight: 850;
}

.my-bets-card h2 {
    margin-bottom: 12px;
}

.my-bets-card h2:not(:first-of-type) {
    margin-top: 22px;
}

.bet-history-item {
    align-items: flex-start;
}

.bet-history-item span {
    line-height: 1.35;
}

.slip-leg-list {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.slip-leg-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.bet-dialog {
    width: min(430px, calc(100% - 28px));
    max-height: calc(100vh - 28px);
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    overflow: visible;
}

.bet-dialog::backdrop {
    background: rgba(17, 25, 22, .58);
    backdrop-filter: blur(4px);
}

.bet-ticket {
    position: relative;
    display: grid;
    gap: 14px;
    width: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 24px 70px rgba(18, 28, 23, .24);
}

.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--muted-strong);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    font-size: 12px;
}

.dialog-close:hover {
    color: var(--text);
    background: #e5ece7;
    box-shadow: none;
}

.bet-ticket-head {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding-right: 76px;
}

.ticket-avatar {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border: 2px solid var(--line-strong);
    border-radius: 6px;
    color: #fff;
    background:
        linear-gradient(135deg, hsl(var(--avatar-hue) 70% 30%), hsl(calc(var(--avatar-hue) + 26) 72% 45%));
    overflow: hidden;
}

.ticket-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.ticket-avatar span {
    font-size: 26px;
    font-weight: 950;
}

.bet-ticket-head span,
.ticket-amount-field span,
.ticket-totals span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.bet-ticket-head h2 {
    margin: 3px 0;
    font-size: 22px;
    line-height: 1.12;
}

.bet-ticket-head strong {
    color: var(--accent-dark);
    font-size: 18px;
}

.ticket-selected-list {
    display: grid;
    gap: 8px;
}

.ticket-selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.ticket-selected-item span {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.ticket-selected-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ticket-selected-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 760;
    overflow-wrap: anywhere;
}

.ticket-selected-item strong {
    flex: 0 0 auto;
    color: var(--accent-dark);
    font-size: 14px;
}

.ticket-selected-remove {
    flex: 0 0 auto;
    width: auto;
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    color: var(--danger);
    background: #fff;
    font-size: 12px;
    font-weight: 900;
}

.ticket-selected-remove:hover {
    color: #fff;
    background: var(--danger);
    box-shadow: none;
}

.ticket-amount-field input {
    margin-top: 6px;
}

.ticket-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ticket-totals div {
    min-width: 0;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.ticket-totals strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.ticket-submit {
    width: 100%;
}

.history-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.history-summary-grid article {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.history-summary-grid span,
.history-money-grid span,
.history-ticket-head span:first-child {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.history-summary-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    line-height: 1;
}

.history-summary-grid small,
.history-money-grid small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.history-positive {
    color: var(--accent-dark);
}

.history-negative {
    color: var(--danger);
}

.history-section {
    margin-top: 26px;
}

.history-section-title {
    margin-bottom: 14px;
}

.history-section-title h2 {
    margin: 0;
}

.history-ticket-list {
    display: grid;
    gap: 16px;
}

.history-ticket-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-left: 5px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.history-ticket-won {
    border-left-color: var(--accent);
}

.history-ticket-lost {
    border-left-color: var(--danger);
}

.history-ticket-pending {
    border-left-color: var(--gold);
}

.history-ticket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.history-ticket-head h3 {
    margin: 4px 0 0;
    font-size: 24px;
    line-height: 1.1;
}

.history-ticket-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
}

.history-money-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.history-money-grid div {
    min-width: 0;
    padding: 13px;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.history-money-grid strong {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.history-leg-list {
    display: grid;
    gap: 8px;
}

.history-leg-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.history-leg-row strong {
    display: block;
    color: var(--text);
}

.history-leg-row span:not(.badge) {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.history-leg-row > div:last-child {
    display: grid;
    justify-items: end;
    gap: 6px;
    text-align: right;
}

.history-table-wrap table {
    min-width: 980px;
}

.history-row-lost {
    background: #fffafa;
}

.history-row-won {
    background: #fbfffd;
}

.admin-bet-edit-grid {
    margin-top: 22px;
}

.inline-editor summary {
    cursor: pointer;
    color: var(--accent-dark);
    font-weight: 850;
}

.stack-form,
.result-form {
    display: grid;
    gap: 8px;
}

.stack-form {
    min-width: 220px;
    margin-top: 10px;
}

.result-form {
    grid-template-columns: minmax(135px, 1fr) auto;
    align-items: center;
}

.result-form button,
.settle-form button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
}

.settle-form {
    margin-top: 16px;
}

.market-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.market-actions form {
    margin: 0;
}

.market-actions .btn,
.market-actions button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 13px;
}

.admin-bets-mobile-list {
    display: none;
}

.admin-bet-mobile-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.admin-bet-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-bet-mobile-head h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
}

.admin-bet-mobile-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.admin-bet-mobile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.admin-bet-mobile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 13px;
}

.admin-bet-mobile-stats div {
    min-width: 0;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.admin-bet-mobile-stats span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-bet-mobile-stats strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.2;
}

.admin-bet-mobile-result,
.admin-bet-mobile-editor,
.admin-bet-mobile-actions {
    margin-top: 13px;
}

.admin-bet-mobile-result {
    grid-template-columns: 1fr;
}

.admin-bet-mobile-editor {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.admin-bet-mobile-editor .stack-form {
    min-width: 0;
}

.admin-bet-mobile-actions {
    display: grid;
    gap: 8px;
}

.admin-bet-mobile-actions form {
    display: block;
}

.admin-bet-mobile-actions .btn,
.admin-bet-mobile-actions button,
.admin-bet-mobile-result button {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    font-size: 13px;
}

.admin-bet-mobile-empty {
    padding: 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted-strong);
    background: var(--surface-soft);
    font-weight: 850;
}

.nested-admin-card {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.nested-admin-card h2 {
    margin-top: 0;
}

.user-detail-card .metric {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.betting-shell {
    display: grid;
    gap: 20px;
}

.betting-shell [hidden] {
    display: none !important;
}

.betting-shell-dark {
    --bet-dark-bg: #08111d;
    --bet-dark-surface: rgba(10, 20, 34, .90);
    --bet-dark-surface-2: rgba(14, 27, 45, .94);
    --bet-dark-panel: rgba(16, 30, 49, .88);
    --bet-dark-line: rgba(115, 144, 171, .18);
    --bet-dark-line-strong: rgba(143, 181, 216, .34);
    --bet-dark-text: #f4f8ff;
    --bet-dark-muted: #9db0c6;
    --bet-dark-muted-strong: #c6d6e8;
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid rgba(90, 123, 154, .16);
    border-radius: calc(var(--radius) + 14px);
    background:
        radial-gradient(circle at top left, rgba(14, 151, 120, .18), transparent 34%),
        radial-gradient(circle at top right, rgba(35, 131, 214, .18), transparent 28%),
        linear-gradient(180deg, #07101b 0, #0a1422 56%, #0c1827 100%);
    box-shadow: 0 28px 72px rgba(2, 8, 18, .38);
}

.betting-shell-dark > * {
    position: relative;
    z-index: 1;
}

.betting-shell-dark .page-head:not(.betting-hero),
.betting-shell-dark .betting-hero,
.betting-shell-dark .card,
.betting-shell-dark .history-ticket-card,
.betting-shell-dark .bet-ticket {
    border-color: var(--bet-dark-line);
    background: var(--bet-dark-surface);
    box-shadow: 0 20px 46px rgba(0, 0, 0, .24);
}

.betting-shell-dark .betting-hero-politics {
    background:
        radial-gradient(circle at top left, rgba(11, 168, 119, .18), transparent 32%),
        radial-gradient(circle at right center, rgba(50, 96, 190, .20), transparent 28%),
        linear-gradient(180deg, rgba(9, 21, 34, .97) 0, rgba(11, 24, 40, .95) 100%);
}

.betting-shell-dark .betting-hero-lottery {
    background:
        radial-gradient(circle at top left, rgba(215, 144, 44, .20), transparent 30%),
        radial-gradient(circle at right center, rgba(205, 71, 45, .18), transparent 28%),
        linear-gradient(180deg, rgba(16, 20, 31, .97) 0, rgba(18, 24, 36, .95) 100%);
}

.betting-shell-dark .betting-hero-casino {
    background:
        radial-gradient(circle at top left, rgba(13, 145, 119, .18), transparent 32%),
        radial-gradient(circle at right center, rgba(41, 116, 214, .18), transparent 30%),
        linear-gradient(180deg, rgba(9, 19, 32, .97) 0, rgba(11, 23, 38, .95) 100%);
}

.betting-shell-dark .betting-hero-sports {
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(14, 125, 102, .18), rgba(33, 91, 151, .16)),
        linear-gradient(180deg, rgba(8, 19, 31, .98) 0, rgba(8, 17, 29, .96) 100%);
}

.betting-shell-sports .betting-entry-link {
    border-radius: 8px;
    min-height: 48px;
}

.betting-shell-sports .betting-entry-link strong {
    font-size: 14px;
}

.betting-shell-sports .betting-hero-kicker,
.betting-shell-sports .balance-pill,
.betting-shell-sports .betting-hero-stats article,
.betting-shell-sports .betting-hero-note {
    border-radius: 8px;
}

.betting-shell-dark,
.betting-shell-dark .market-summary-main strong,
.betting-shell-dark .bet-slip-head h2,
.betting-shell-dark .history-ticket-head h3,
.betting-shell-dark .history-table strong,
.betting-shell-dark .my-bets-card h2,
.betting-shell-dark .bet-ticket-head h2 {
    color: var(--bet-dark-text);
}

.betting-shell-dark .muted,
.betting-shell-dark .betting-hero-copy > p,
.betting-shell-dark .betting-hero-note,
.betting-shell-dark .betting-hero-stats small,
.betting-shell-dark .market-summary-main > span:not(.market-kicker),
.betting-shell-dark .bet-option-copy small,
.betting-shell-dark .bet-option-pricing small,
.betting-shell-dark .lottery-number-entry small,
.betting-shell-dark .ticket-selected-copy small,
.betting-shell-dark .bet-slip-rule,
.betting-shell-dark .history-summary-grid small,
.betting-shell-dark .history-leg-row span:not(.badge),
.betting-shell-dark .history-ticket-head p,
.betting-shell-dark .history-table .muted {
    color: var(--bet-dark-muted);
}

.betting-shell-dark .betting-entry-link,
.betting-shell-dark .betting-hero-kicker,
.betting-shell-dark .betting-hero-stats article,
.betting-shell-dark .betting-hero-note,
.betting-shell-dark .balance-pill,
.betting-shell-dark .betting-module-link,
.betting-shell-dark .betting-subnav-link,
.betting-shell-dark .market-option-count,
.betting-shell-dark .bet-market-meta div,
.betting-shell-dark .market-select-help,
.betting-shell-dark .vote-candidate-picker,
.betting-shell-dark .ticket-selected-item,
.betting-shell-dark .ticket-totals div,
.betting-shell-dark .history-summary-grid article,
.betting-shell-dark .history-money-grid div,
.betting-shell-dark .history-leg-row {
    border-color: var(--bet-dark-line);
    background: var(--bet-dark-panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.betting-shell-dark .betting-entry-link,
.betting-shell-dark .betting-module-link,
.betting-shell-dark .betting-subnav-link {
    color: var(--bet-dark-text);
}

.betting-shell-dark .betting-entry-link:hover,
.betting-shell-dark .betting-entry-link:focus-visible,
.betting-shell-dark .betting-module-link:hover,
.betting-shell-dark .betting-module-link:focus-visible,
.betting-shell-dark .betting-subnav-link:hover,
.betting-shell-dark .betting-subnav-link:focus-visible,
.betting-shell-dark .betting-subnav-link.is-active {
    border-color: var(--bet-dark-line-strong);
    background: rgba(20, 36, 57, .96);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .24);
}

.betting-shell-dark .betting-entry-link.is-active,
.betting-shell-dark .betting-module-link.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent) 0, #209fd8 100%);
    color: #fff;
}

.betting-shell-dark .betting-hero-kicker,
.betting-shell-dark .market-kicker,
.betting-shell-dark .market-option-count,
.betting-shell-dark .betting-hero-stats span,
.betting-shell-dark .bet-market-meta span,
.betting-shell-dark .bet-slip-head span,
.betting-shell-dark .ticket-amount-field span,
.betting-shell-dark .ticket-totals span,
.betting-shell-dark .lottery-draw-strip span,
.betting-shell-dark .lottery-number-entry span,
.betting-shell-dark .lottery-series-row small,
.betting-shell-dark .history-summary-grid span,
.betting-shell-dark .history-money-grid span,
.betting-shell-dark .history-ticket-head span:first-child,
.betting-shell-dark .bet-ticket-head span {
    color: var(--bet-dark-muted-strong);
}

.betting-shell-dark .betting-hero-stats strong,
.betting-shell-dark .bet-market-meta strong,
.betting-shell-dark .lottery-draw-strip strong,
.betting-shell-dark .lottery-number-entry strong,
.betting-shell-dark .lottery-series-toggle {
    color: var(--bet-dark-text);
}

.betting-shell-dark .balance-pill strong,
.betting-shell-dark .bet-slip-head > strong,
.betting-shell-dark .bet-option-pricing strong,
.betting-shell-dark .history-summary-grid strong,
.betting-shell-dark .history-money-grid strong,
.betting-shell-dark .ticket-selected-item strong,
.betting-shell-dark .bet-ticket-head strong {
    color: #7de8c0;
}

.betting-shell-dark .bet-market-body {
    border-top-color: var(--bet-dark-line);
}

.betting-shell-dark .bet-option-row,
.betting-shell-dark .ballot-card,
.betting-shell-dark .table-wrap,
.betting-shell-dark .bet-dialog::backdrop {
    border-color: var(--bet-dark-line);
}

.betting-shell-dark .bet-option-row,
.betting-shell-dark .ballot-card,
.betting-shell-dark .history-table tbody tr td,
.betting-shell-dark .history-table thead th {
    background: rgba(8, 17, 30, .82);
    color: var(--bet-dark-text);
}

.betting-shell-dark .bet-option-row:hover,
.betting-shell-dark .bet-option-row:focus-visible,
.betting-shell-dark .bet-option-row.is-selected,
.betting-shell-dark .ballot-card:hover,
.betting-shell-dark .ballot-card:focus-visible,
.betting-shell-dark .ballot-card.is-selected {
    border-color: rgba(31, 208, 157, .56);
    background: rgba(10, 28, 39, .96);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .26);
}

.betting-shell-dark .lottery-play-panel {
    border-color: rgba(218, 225, 235, .94);
    background: #f8fbff;
    color: #061f59;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
}

.betting-shell-dark .lottery-draw-strip > div,
.betting-shell-dark .lottery-number-entry,
.betting-shell-dark .lottery-result-card {
    border: 1px solid #e0e6ef;
    background: #fff;
    box-shadow: none;
}

.betting-shell-dark .lottery-ball-board {
    border-color: #e0e6ef;
    background: #fff;
}

.betting-shell-dark .lottery-draw-strip span,
.betting-shell-dark .lottery-number-entry span,
.betting-shell-dark .lottery-result-card > span,
.betting-shell-dark .lottery-series-row small,
.betting-shell-dark .lottery-number-entry small,
.betting-shell-dark .lottery-result-card small {
    color: #31517f;
}

.betting-shell-dark .lottery-draw-strip strong,
.betting-shell-dark .lottery-number-entry strong,
.betting-shell-dark .lottery-result-card strong,
.betting-shell-dark .lottery-series-toggle {
    color: #061f59;
}

.betting-shell-dark .bet-option-row:disabled {
    background: rgba(8, 15, 24, .68);
}

.betting-shell-dark .bet-option-check,
.betting-shell-dark .ticket-selected-remove,
.betting-shell-dark input,
.betting-shell-dark select,
.betting-shell-dark textarea {
    border-color: var(--bet-dark-line);
    background: rgba(6, 13, 23, .92);
    color: var(--bet-dark-text);
}

.betting-shell-dark input::placeholder,
.betting-shell-dark textarea::placeholder {
    color: rgba(157, 176, 198, .78);
}

.betting-shell-dark .lottery-series-row input[type="text"] {
    border-color: #cfd8e6;
    background: #fff;
    color: #061f59;
}

.betting-shell-dark .lottery-series-row input[type="text"]::placeholder {
    color: #7083a4;
}

.betting-shell-dark .ticket-selected-remove:hover,
.betting-shell-dark .btn-secondary:hover,
.betting-shell-dark .btn-secondary:focus-visible {
    background: rgba(20, 34, 52, .98);
}

.betting-shell-dark .btn-secondary {
    border: 1px solid var(--bet-dark-line);
    color: var(--bet-dark-text);
    background: rgba(8, 16, 28, .92);
    box-shadow: none;
}

.betting-shell-dark .history-row-lost td {
    background: rgba(49, 18, 24, .68);
}

.betting-shell-dark .history-row-won td {
    background: rgba(9, 43, 29, .56);
}

.betting-shell-dark .history-table {
    color: var(--bet-dark-text);
}

.betting-shell-dark .history-table thead th {
    border-bottom-color: var(--bet-dark-line);
}

.betting-shell-dark .history-table tbody td,
.betting-shell-dark .history-table tbody tr + tr td {
    border-color: var(--bet-dark-line);
}

@media (max-width: 1080px) {
    .finance-layout {
        grid-template-columns: 1fr;
    }

    .finance-page {
        grid-template-columns: 1fr;
    }

    .betting-layout {
        grid-template-columns: 1fr;
    }

    .history-summary-grid,
    .history-money-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .my-bets-card {
        position: static;
    }

    .plans-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .finance-summary {
        grid-template-columns: 1fr;
    }

    .finance-head {
        align-items: stretch;
    }

    .finance-head .btn {
        width: 100%;
    }

    .betting-head,
    .bet-market-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .betting-hero {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 8px;
    }

    .betting-hero-copy {
        gap: 12px;
    }

    .betting-hero-copy h1 {
        font-size: 26px;
        line-height: 1.08;
    }

    .betting-hero-copy > p,
    .betting-hero-note {
        font-size: 13px;
    }

    .betting-hero-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .betting-hero-toolbar .btn {
        width: 100%;
        min-width: 0;
    }

    .betting-entry-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .betting-entry-link {
        flex: 0 0 auto;
        min-width: 132px;
        min-height: 44px;
        padding: 10px;
        border-radius: 8px;
    }

    .betting-entry-link strong {
        font-size: 13px;
    }

    .betting-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .betting-hero-stats article {
        padding: 10px;
        border-radius: 8px;
    }

    .betting-hero-stats span {
        font-size: 9px;
    }

    .betting-hero-stats strong {
        font-size: 22px;
    }

    .betting-hero-stats small {
        display: none;
    }

    .betting-module-nav,
    .betting-subnav {
        grid-template-columns: 1fr;
    }

    .betting-head-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .betting-head-actions .btn {
        width: 100%;
    }

    .balance-pill {
        width: 100%;
    }

    .bet-market-summary {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
    }

    .market-summary-side {
        justify-content: space-between;
        width: 100%;
    }

    .bet-market-body {
        padding: 0 14px 14px;
    }

    .bet-market-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .market-select-help,
    .market-bet-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .market-select-help strong {
        flex: 0 0 auto;
    }

    .vote-candidate-picker {
        grid-template-columns: 1fr;
    }

    .lottery-draw-strip,
    .lottery-number-grid,
    .lottery-series-row,
    .lottery-raffle-row,
    .lottery-result-card {
        grid-template-columns: 1fr;
    }

    .lottery-result-card div {
        justify-content: flex-start;
    }

    .lottery-ball-board {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        max-height: 330px;
    }

    .lottery-line-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .market-bet-footer .btn {
        width: 100%;
    }

    .sports-filter-bar {
        position: sticky;
        top: 0;
        z-index: 10;
        margin: 12px 0;
        padding: 12px;
        border-radius: 8px;
    }

    .sports-search-field input {
        min-height: 44px;
    }

    .betting-shell-sports .bet-option-row {
        grid-template-columns: 20px minmax(0, 1fr) minmax(70px, auto);
    }

    .betting-shell-sports .bet-option-copy strong {
        font-size: 14px;
    }

    .betting-shell-sports .bet-option-pricing small {
        display: none;
    }

    .betting-shell-sports .my-bets-card {
        position: sticky;
        bottom: 0;
        z-index: 12;
        margin: 0 -12px -12px;
        border-radius: 8px 8px 0 0;
    }

    .history-ticket-head {
        flex-direction: column;
    }

    .history-leg-row {
        grid-template-columns: 1fr;
    }

    .history-leg-row > div:last-child {
        justify-items: start;
        text-align: left;
    }

    .bet-option-row {
        grid-template-columns: 22px 42px minmax(0, 1fr);
        gap: 10px;
        min-height: 0;
    }

    .bet-option-avatar {
        width: 42px;
        height: 42px;
    }

    .bet-option-pricing {
        grid-column: 3;
        justify-items: start;
        text-align: left;
    }

    .bet-option-action {
        grid-column: 1 / -1;
        width: 100%;
    }

    .ballot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ballot-card {
        min-height: 265px;
        padding: 8px;
    }

    .ballot-photo {
        max-width: 96px;
        height: 96px;
    }

    .ticket-totals {
        grid-template-columns: 1fr;
    }

    .investment-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .finance-layout {
        gap: 12px;
    }

    .investment-head,
    .movement-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .movement-item div:last-child {
        text-align: left;
    }

    .investment-stats {
        grid-template-columns: 1fr;
    }

    .history-summary-grid,
    .history-money-grid {
        grid-template-columns: 1fr;
    }

    .ballot-card {
        grid-template-rows: auto 86px auto auto auto auto;
        min-height: 248px;
    }

    .ballot-photo {
        max-width: 86px;
        height: 86px;
    }

    .ballot-card strong {
        min-height: 38px;
        font-size: 13px;
    }

    .ballot-party,
    .ballot-return {
        font-size: 11px;
    }

    .ballot-card-blank {
        grid-template-rows: minmax(116px, 1fr) auto auto auto;
    }

    .ballot-card-blank .ballot-blank-text {
        min-height: 116px;
        font-size: 18px;
    }

    .bet-ticket {
        padding: 18px;
    }

    .bet-ticket-head {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
        padding-right: 62px;
    }

    .ticket-avatar {
        width: 62px;
        height: 62px;
    }

    .bet-ticket-head h2 {
        font-size: 19px;
    }

    .dialog-close {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 720px) {
    .topbar-inner {
        gap: 10px;
    }

    .admin-menu-desktop {
        display: none;
    }

    .admin-mobile-menu {
        display: block;
    }

    .admin-plans-table {
        display: none;
    }

    .admin-plans-mobile-list {
        display: grid;
        gap: 12px;
    }

    .admin-plan-mobile-card {
        padding: 13px;
    }

    .admin-bet-options-table,
    .admin-market-bets-table,
    .admin-markets-table {
        display: none;
    }

    .admin-bets-mobile-list {
        display: grid;
        gap: 12px;
    }

    .admin-bet-mobile-card {
        padding: 13px;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) table,
    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) thead,
    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) tbody,
    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) tr,
    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) tbody {
        display: grid;
        gap: 12px;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) tr {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) td {
        display: grid;
        grid-template-columns: minmax(88px, .38fr) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 11px 12px;
        border-bottom: 1px solid var(--line);
        font-size: 13px;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) tr:last-child td,
    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) td:last-child {
        border-bottom: 0;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) td[colspan] {
        display: block;
        text-align: center;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) td[colspan]::before {
        display: none;
    }

    .admin-layout .table-wrap img {
        max-width: 100%;
    }

    .admin-layout .table-wrap .actions,
    .admin-layout .table-wrap .market-actions,
    .admin-layout .table-wrap .result-form,
    .admin-layout .table-wrap .stack-form {
        min-width: 0;
        width: 100%;
    }

    .admin-layout .table-wrap td > *,
    .admin-layout .table-wrap input,
    .admin-layout .table-wrap select,
    .admin-layout .table-wrap textarea {
        min-width: 0 !important;
        max-width: 100%;
    }
}

@media (max-width: 460px) {
    .topbar-inner {
        gap: 8px;
    }

    .admin-mobile-links {
        grid-template-columns: 1fr;
    }

    .admin-plan-mobile-head {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 10px;
    }

    .admin-plan-mobile-thumb {
        width: 74px;
        height: 50px;
    }

    .admin-plan-mobile-stats {
        grid-template-columns: 1fr;
    }

    .admin-plan-mobile-total {
        grid-column: auto;
    }

    .admin-bet-mobile-head {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-bet-mobile-stats {
        grid-template-columns: 1fr;
    }

    .admin-layout .table-wrap:not(.admin-plans-table):not(.admin-bet-options-table):not(.admin-market-bets-table):not(.admin-markets-table) td {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* Final cascade for the 2026 interface refresh. */
:root{--bg:#f4f7fb;--surface:#fff;--surface-soft:#f7f9fc;--text:#101828;--muted:#667085;--muted-strong:#344054;--line:#e4e7ec;--line-strong:#d0d5dd;--accent:#087a5b;--accent-dark:#056047;--accent-soft:#e8f7f1;--gold:#d79614;--blue:#356ae6;--danger:#d92d20;--shadow-sm:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.06);--shadow-md:0 20px 48px rgba(16,24,40,.12);--radius:14px}
body{background:radial-gradient(circle at 8% 0%,rgba(8,122,91,.08),transparent 28rem),radial-gradient(circle at 92% 8%,rgba(53,106,230,.06),transparent 26rem),var(--bg)}
.topbar{background:rgba(255,255,255,.9);border-bottom-color:rgba(208,213,221,.75)}.topbar-inner{min-height:76px}.brand-logo{max-height:46px}.nav{gap:6px}.nav a{position:relative;transition:.18s ease}.nav a.active{color:var(--accent-dark);background:var(--accent-soft)}.nav a.active:after{content:"";position:absolute;right:12px;bottom:3px;left:12px;height:2px;border-radius:2px;background:var(--accent)}
.user-chip{display:flex;align-items:center;gap:8px;min-width:0;padding:5px 10px 5px 5px;border:1px solid var(--line);border-radius:999px;background:#fff}.user-chip>span{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:50%;color:#fff;background:linear-gradient(135deg,var(--accent),var(--blue));font-size:13px;font-weight:900}.user-chip small{max-width:110px;overflow:hidden;color:var(--muted-strong);font-weight:800;text-overflow:ellipsis;white-space:nowrap}
.page-head h1,.auth-panel h1{color:var(--text);letter-spacing:-.045em}.card{border-radius:14px;border-color:rgba(228,231,236,.95);box-shadow:var(--shadow-sm);transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}.card:hover{border-color:#d6dbe3;box-shadow:0 2px 4px rgba(16,24,40,.04),0 14px 34px rgba(16,24,40,.08)}
.metric{min-height:142px}.metric:before{inset:18px auto auto 18px;width:38px;height:4px;border-radius:99px}.metric span{margin-top:12px;letter-spacing:.055em}.metric strong{letter-spacing:-.045em}.btn,button,input[type=submit]{min-height:46px;border-radius:11px}.btn:hover,button:hover,input[type=submit]:hover{transform:translateY(-1px)}input,select,textarea{min-height:48px;border-radius:11px;transition:border-color .16s ease,box-shadow .16s ease}input:focus,select:focus,textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 4px rgba(8,122,91,.12)}
.table-wrap{border-radius:12px}th{background:#f8fafc;letter-spacing:.055em}tbody tr:hover{background:#fafcfb}.badge{gap:6px;border:1px solid rgba(0,0,0,.08)}.badge:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.dashboard-hero{border-radius:20px;box-shadow:0 22px 50px rgba(8,70,54,.16)}.quick-action{border-radius:15px;transition:transform .2s ease,box-shadow .2s ease}.quick-action:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(16,24,40,.12)}
.admin-layout{grid-template-columns:270px minmax(0,1fr);gap:28px}.admin-menu{top:96px;gap:5px;padding:12px;border-radius:16px}.admin-menu a{display:flex;align-items:center;gap:10px;min-height:44px;border-radius:10px;transition:.16s ease}.admin-menu a:hover{color:var(--accent-dark);background:#f2f7f5;transform:translateX(2px)}.admin-menu a.active{color:#fff;background:linear-gradient(135deg,var(--accent-dark),var(--accent));box-shadow:0 8px 18px rgba(8,122,91,.2)}.auth-login-card{border-radius:20px}
@media(max-width:1100px){.user-chip small{display:none}.user-chip{padding-right:5px}.admin-layout{grid-template-columns:230px minmax(0,1fr);gap:18px}}@media(max-width:980px){.user-chip{display:none}.topbar-inner{min-height:68px}.admin-layout{display:block}}@media(max-width:720px){body{padding-bottom:76px}.bottom-nav{border-top:1px solid var(--line);background:rgba(255,255,255,.94);box-shadow:0 -8px 26px rgba(16,24,40,.08);backdrop-filter:blur(16px)}.bottom-nav a.active{color:var(--accent-dark)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* Invers+ corporate palette and professional finish. */
:root{
    --bg:#f5f7fa;--surface:#fff;--surface-soft:#f7f9fc;--surface-tint:#ecf8ef;
    --text:#071a34;--muted:#617087;--muted-strong:#35445a;
    --line:#e1e7ef;--line-strong:#cbd5e1;
    --accent:#07962e;--accent-dark:#057824;--accent-soft:#e8f7ec;
    --blue:#0b3a6f;--navy:#031a38;--navy-soft:#eaf0f7;
    --gold:#b7790b;--gold-dark:#925f08;--danger:#c92a2a;--danger-dark:#a61e1e;
    --shadow-sm:0 1px 2px rgba(3,26,56,.04),0 8px 26px rgba(3,26,56,.065);
    --shadow-md:0 22px 52px rgba(3,26,56,.14)
}
body{color:var(--text);background:radial-gradient(circle at 0 0,rgba(7,150,46,.075),transparent 30rem),radial-gradient(circle at 100% 0,rgba(11,58,111,.07),transparent 34rem),#f5f7fa}
::selection{color:#fff;background:var(--blue)}
.topbar{background:rgba(255,255,255,.92);box-shadow:0 1px 0 rgba(3,26,56,.04)}
.brand-logo{filter:saturate(.94) contrast(1.04)}
.brand-mark{background:linear-gradient(145deg,var(--navy),var(--blue));box-shadow:0 8px 20px rgba(3,26,56,.2)}
.nav a.active{color:var(--navy);background:var(--navy-soft)}.nav a.active:after{background:var(--accent)}
.language-switch{background:#f7f9fc}.language-switch .active{color:#fff;background:var(--navy)}
.user-chip>span{background:linear-gradient(145deg,var(--navy),var(--blue));box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.page-head h1,.auth-panel h1{color:var(--navy)}
.card{box-shadow:var(--shadow-sm)}.card:hover{border-color:#cbd6e3;box-shadow:0 2px 4px rgba(3,26,56,.04),0 16px 36px rgba(3,26,56,.09)}
.metric:before{background:var(--accent)}.metric:nth-child(2):before{background:var(--blue)}.metric:nth-child(3):before{background:#2b6cb0}.metric:nth-child(4):before{background:#64748b}
.metric strong,.plan-price{color:var(--navy)}
.btn,button,input[type=submit]{background:linear-gradient(135deg,var(--accent-dark),var(--accent));box-shadow:0 2px 5px rgba(5,120,36,.18)}
.btn:hover,button:hover,input[type=submit]:hover{background:linear-gradient(135deg,#04661e,var(--accent-dark));box-shadow:0 10px 24px rgba(5,120,36,.23)}
.btn-secondary{color:var(--navy);background:#f7f9fc;border-color:var(--line-strong);box-shadow:none}.btn-secondary:hover{color:var(--navy);background:#edf1f6;box-shadow:none}
.btn-gold{background:#a66f0a}.btn-danger{background:var(--danger)}
input,select,textarea{color:var(--navy);border-color:var(--line-strong)}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(11,58,111,.12)}
.table-wrap{box-shadow:0 1px 2px rgba(3,26,56,.025)}th{color:#42526a;background:#f6f8fb}tbody tr:hover{background:#f8fafc}
.badge-success{color:#057824;background:#e7f7eb}.badge-warning{color:#845608;background:#fff5d9}.badge-danger{color:#a61e1e;background:#ffebeb}.badge-muted{color:#475569;background:#edf1f6}
.alert-success{color:#056b21;background:#e9f8ed}.alert-danger{color:#a61e1e;background:#fff0f0}.alert-info{color:#0b3a6f;background:#edf4fc}
.dashboard-hero{background:linear-gradient(135deg,#031a38 0%,#082e59 58%,#075b36 145%);box-shadow:0 24px 54px rgba(3,26,56,.22)}
.wallet-card{border-color:rgba(255,255,255,.14);background:rgba(255,255,255,.09);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.quick-action{border-color:var(--line);background:#fff}.quick-action strong{color:var(--navy)}
.quick-action.action-blue span,.quick-action.action-indigo span{color:#fff;background:var(--blue)}.quick-action.action-green span{color:#fff;background:var(--accent)}.quick-action.action-orange span{color:#fff;background:#b7790b}
.plan-card{border-color:#dce4ed}.plan-card:hover{border-color:#b9c8d8}.plan-total-return span,.plan-total-return strong{color:var(--accent-dark)!important}
.admin-menu{background:var(--navy);border-color:rgba(255,255,255,.05);box-shadow:0 18px 42px rgba(3,26,56,.17)}.admin-menu a{color:#c5d1df}.admin-menu a:hover{color:#fff;background:rgba(255,255,255,.08)}.admin-menu a.active{color:#fff;background:linear-gradient(135deg,#057824,#0aa537);box-shadow:0 8px 20px rgba(0,0,0,.2)}
.auth-login-card{border-color:#d8e2ec;box-shadow:0 24px 58px rgba(3,26,56,.13)}.auth-login-card:before{background:linear-gradient(90deg,var(--navy),var(--blue) 55%,var(--accent))}.auth-login-copy span,.auth-badge{color:var(--accent-dark);background:var(--accent-soft);border-color:#c9ead2}
.auth-login-footer a{color:var(--navy);background:var(--navy-soft)}.auth-login-footer a:hover{color:#fff;background:var(--navy)}
.bottom-nav a.active{color:var(--accent-dark)}.bottom-nav a.active span{background:var(--accent-soft)}
@media(max-width:980px){.admin-mobile-summary{color:#fff;background:var(--navy)}.admin-mobile-menu[open] .admin-mobile-summary{border-bottom-color:rgba(255,255,255,.1)}.admin-mobile-links{background:#fff}}

/* Responsive hardening: 320px phones through wide desktop. */
img,svg,video,canvas{max-width:100%}
.shell,.admin-layout,.admin-layout>section,.card,.page-head,.auth-panel{min-width:0}
.quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
.actions>*{min-width:0}
@media(max-width:980px){
    .admin-layout{display:grid;grid-template-columns:minmax(0,1fr)}
    .admin-menu-desktop{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:720px){
    .topbar-inner{flex-wrap:nowrap;align-items:center;padding:9px 0}
    .topbar .nav,.user-chip{display:none}
    .brand{min-width:0;max-width:none;flex:1}
    .brand-logo{width:auto;max-width:min(132px,100%);height:auto}
    .language-switch{flex:none}
    .mobile-admin-link,.mobile-logout-link{flex:none}
    .quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
    .quick-action{min-width:0}
    .quick-action strong{overflow-wrap:anywhere}
    .page-head>.actions,.page-head>.btn{width:100%}
}
@media(max-width:380px){
    .topbar-inner{width:calc(100% - 16px);gap:5px}
    .brand-logo{max-width:96px}
    .language-switch{gap:1px;padding:3px}
    .language-switch a{padding:4px 6px}
    .mobile-admin-link,.mobile-logout-link{width:36px;min-height:36px}
    .shell,.footer{width:calc(100% - 16px)}
    .card{padding:15px}
    .wallet-card{grid-template-columns:1fr}
    .quick-action{padding-inline:2px}
    .quick-action span{width:36px;height:36px}
    .bottom-nav{padding-inline:4px}
    .bottom-nav a{font-size:10px}
    .form-grid{grid-template-columns:minmax(0,1fr)}
}

.monitor-head{align-items:center}.monitor-live{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #c9ead2;border-radius:999px;color:var(--accent-dark);background:var(--accent-soft);font-size:13px;font-weight:850;white-space:nowrap}.monitor-live i{width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 5px rgba(7,150,46,.12)}
.monitor-server-grid{margin:20px 0}.monitor-gauge-card{display:grid;gap:12px}.monitor-gauge-card>div{display:flex;align-items:center;justify-content:space-between;gap:16px}.monitor-gauge-card span{color:var(--muted-strong);font-weight:800}.monitor-gauge-card strong{color:var(--navy);font-size:24px}.monitor-gauge-card progress{width:100%;height:10px;overflow:hidden;border:0;border-radius:99px;background:#e8edf3}.monitor-gauge-card progress::-webkit-progress-bar{background:#e8edf3}.monitor-gauge-card progress::-webkit-progress-value{border-radius:99px;background:linear-gradient(90deg,var(--blue),var(--accent))}.monitor-gauge-card progress::-moz-progress-bar{border-radius:99px;background:linear-gradient(90deg,var(--blue),var(--accent))}.monitor-gauge-card small{color:var(--muted)}
.monitor-section{margin-top:20px}.monitor-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.monitor-section-head h2{margin:0}.monitor-section-head p{margin:4px 0 0;color:var(--muted)}
@media(max-width:720px){.monitor-live{white-space:normal}.monitor-server-grid{grid-template-columns:1fr}.monitor-section{padding:15px}}

.compact-plan .plan-content{gap:7px}.compact-plan .plan-price{color:var(--navy);font-size:clamp(30px,3vw,40px);letter-spacing:-.045em}.compact-plan .plan-cop-price{margin:0;color:var(--muted);font-size:13px;font-weight:750}.compact-plan .plan-details{border-top:1px solid var(--line)}.compact-plan .plan-details>div{align-items:center;min-height:52px}.compact-plan .plan-details span{max-width:62%;line-height:1.25}.compact-plan .plan-details strong{font-size:15px}.compact-plan .plan-capital-row{background:#f8fafc}.compact-plan .plan-total-return{margin:3px -8px -4px;padding:14px 8px!important;border:1px solid #c9ead2!important;border-radius:10px;background:var(--accent-soft)}.compact-plan .plan-total-return span{color:var(--accent-dark)!important;font-weight:900}.compact-plan .plan-total-return span small{display:block;margin-top:3px;color:var(--muted)!important;font-size:11px;font-weight:700}.compact-plan .plan-total-return strong{color:var(--accent-dark)!important;font-size:18px}

/* Balanced brand palette: navy structure, emerald actions, teal data, gold value. */
:root{--navy:#041b36;--navy-2:#0a3158;--teal:#087f8c;--teal-soft:#e8f5f6;--premium:#bf8a24;--premium-dark:#8d6519;--premium-soft:#fbf4e5}
.page-head{position:relative;overflow:hidden;padding:24px 26px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(115deg,#fff 0%,#f8fbfd 58%,#eef7f3 100%);box-shadow:var(--shadow-sm)}.page-head:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(180deg,var(--accent),#2677c9)}
.dashboard-plans .page-head,.section-title{padding:0;border:0;background:transparent;box-shadow:none}.dashboard-plans .page-head:before,.section-title:before{display:none}
.dashboard-hero{background:linear-gradient(135deg,#03172f 0%,#09345e 55%,#08634d 125%)}
.wallet-card>div:first-child strong{color:#fff}.wallet-card>div:last-child strong{color:#d9eff5}
.quick-action{position:relative;overflow:hidden}.quick-action:after{content:"";position:absolute;inset:auto 0 0;height:3px;background:currentColor;opacity:.35}.quick-action.action-blue span{background:linear-gradient(145deg,#1555a1,#2677c9)}.quick-action.action-orange span{background:linear-gradient(145deg,#956817,#c9952e)}.quick-action.action-green span{background:linear-gradient(145deg,#057824,#0aa33a)}.quick-action.action-indigo span{background:linear-gradient(145deg,#086875,#0c93a2)}
.soft-metrics .metric:nth-child(1):before,.monitor-metrics .metric:nth-child(1):before{background:var(--teal)}.soft-metrics .metric:nth-child(2):before,.monitor-metrics .metric:nth-child(2):before{background:#2677c9}.soft-metrics .metric:nth-child(3):before,.monitor-metrics .metric:nth-child(3):before{background:var(--premium)}.soft-metrics .metric:nth-child(4):before,.monitor-metrics .metric:nth-child(4):before{background:var(--accent)}
.plans-list .plan-card:nth-child(3n+1){border-top:3px solid var(--teal)}.plans-list .plan-card:nth-child(3n+2){border-top:3px solid var(--premium)}.plans-list .plan-card:nth-child(3n){border-top:3px solid var(--accent)}
.plans-list .plan-card:nth-child(3n+2) .plan-price{color:var(--premium-dark)}.plans-list .plan-card:nth-child(3n+2) .plan-image>span{background:var(--premium-dark)}
.plan-offer-ribbon{background:linear-gradient(135deg,#8d6519,#d0a13e)!important}.plan-image>span{background:rgba(4,27,54,.9)!important;backdrop-filter:blur(8px)}
.compact-plan .plan-capital-row{margin-inline:-8px;padding-inline:8px!important;background:var(--premium-soft)}.compact-plan .plan-capital-row span,.compact-plan .plan-capital-row strong{color:var(--premium-dark)}
.compact-plan .plan-total-return{border-color:#bfe3d0!important;background:linear-gradient(135deg,#e9f8ef,#f4fbf7)}
.admin-menu a:nth-child(2) .admin-menu-icon,.admin-menu a:last-child .admin-menu-icon{color:#66d9e8}.admin-menu a:nth-child(4) .admin-menu-icon{color:#f0c76f}.admin-menu a.active .admin-menu-icon{color:#fff}
.table-wrap th{border-bottom:2px solid #d8e2ec}.table-wrap tbody tr:nth-child(even){background:#fbfcfe}.table-wrap tbody tr:hover{background:#f0f7f7}
.badge-success{border-color:#bce4c8}.badge-warning{border-color:#ecd69d}.badge-danger{border-color:#efbaba}.alert-info{border-left:4px solid var(--teal)}
.monitor-gauge-card:first-child progress::-webkit-progress-value{background:linear-gradient(90deg,#1555a1,var(--teal))}.monitor-gauge-card:last-child progress::-webkit-progress-value{background:linear-gradient(90deg,var(--premium),var(--accent))}
.footer{padding-top:18px;border-top:1px solid var(--line);text-align:center}
@media(max-width:720px){.page-head{padding:18px 19px}.dashboard-plans .page-head,.section-title{padding:0}.plans-list .plan-card{border-top-width:3px}.table-wrap tbody tr:nth-child(even){background:#fff}}

/* Premium login treatment — preserves the existing clean structure. */
body:has(.auth-login-wrap){background:radial-gradient(circle at 12% 18%,rgba(7,150,46,.12),transparent 25rem),radial-gradient(circle at 88% 14%,rgba(191,138,36,.12),transparent 23rem),linear-gradient(145deg,#f7fafc 0%,#edf3f7 52%,#f8f5ed 100%)}
.auth-login-wrap{position:relative;isolation:isolate}.auth-login-wrap:before,.auth-login-wrap:after{content:"";position:absolute;z-index:-1;border-radius:50%;filter:blur(1px);pointer-events:none}.auth-login-wrap:before{top:8%;left:7%;width:150px;height:150px;border:1px solid rgba(7,150,46,.13);box-shadow:inset 0 0 0 22px rgba(255,255,255,.25)}.auth-login-wrap:after{right:8%;bottom:12%;width:110px;height:110px;border:1px solid rgba(191,138,36,.16);box-shadow:inset 0 0 0 17px rgba(255,255,255,.22)}
.auth-login-panel{perspective:1000px}.auth-login-card{gap:21px;border:1px solid rgba(203,213,225,.86);background:linear-gradient(150deg,rgba(255,255,255,.98),rgba(255,255,255,.92));box-shadow:0 28px 70px rgba(4,27,54,.16),0 3px 10px rgba(4,27,54,.05);backdrop-filter:blur(18px)}.auth-login-card:before{height:6px;background:linear-gradient(90deg,var(--navy) 0 37%,var(--premium) 37% 58%,var(--accent) 58% 100%)}.auth-login-card:after{content:"";position:absolute;top:0;right:0;width:120px;height:120px;background:radial-gradient(circle at 100% 0,rgba(191,138,36,.1),transparent 68%);pointer-events:none}
.auth-login-brand{min-height:50px;padding-bottom:17px;border-bottom:1px solid #e7ebf0}.auth-login-brand img{max-width:170px;max-height:50px}.auth-login-brand strong{color:var(--navy);font-size:18px}
.auth-login-copy span{position:relative;padding-left:27px;color:var(--premium-dark);border-color:#ead8ae;background:var(--premium-soft);letter-spacing:.055em}.auth-login-copy span:before{content:"";position:absolute;left:11px;width:7px;height:7px;border-radius:50%;background:var(--premium);box-shadow:0 0 0 4px rgba(191,138,36,.12)}.auth-login-copy h1{color:var(--navy);font-size:clamp(34px,5vw,44px)}.auth-login-copy p{color:#586981}
.auth-login-form .field label{color:var(--navy)}.auth-login-form input{border-color:#cad5e2;background:#fbfcfe}.auth-login-form input:hover{border-color:#8ea2b8}.auth-login-form input:focus{border-color:var(--teal);box-shadow:0 0 0 4px rgba(8,127,140,.12);background:#fff}.auth-login-form button{background:linear-gradient(135deg,#057824,#0aa33a);box-shadow:0 8px 20px rgba(5,120,36,.2)}.auth-login-form button:hover{background:linear-gradient(135deg,#04651e,#078e2d);box-shadow:0 12px 26px rgba(5,120,36,.26)}
.auth-login-footer{border-top-color:#e4e9ef}.auth-login-footer a{color:var(--navy);border:1px solid #d7e0ea;background:#edf2f7}.auth-login-footer a:hover{color:#fff;border-color:var(--navy);background:var(--navy)}
@media(max-width:720px){body:has(.auth-login-wrap){background:linear-gradient(165deg,#eff7f2 0%,#f5f7fa 48%,#faf6ec 100%)}.auth-login-wrap:before,.auth-login-wrap:after{display:none}.auth-login-card{border-radius:18px;box-shadow:0 20px 48px rgba(4,27,54,.14)}.auth-login-brand{min-height:44px}.auth-login-brand img{max-width:150px}.auth-login-footer{align-items:stretch;flex-direction:column}.auth-login-footer a{width:100%}}
