:root {
    --bg: #080b12;
    --bg-elevated: #0f1419;
    --bg-card: #121820;
    --bg-card-hover: #181f2a;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --text: #f1f5f9;
    --text-muted: #64748b;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.12);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.12);
    --yellow: #eab308;
    --yellow-bg: rgba(234, 179, 8, 0.12);
    --purple: #a855f7;
    --purple-bg: rgba(168, 85, 247, 0.12);
    --radius: 14px;
    --radius-sm: 10px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --sidebar-w: 240px;
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: #818cf8; }

.icon, [data-lucide] {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon svg, [data-lucide] svg { width: 100%; height: 100%; display: block; }
.icon-sm, .icon-sm svg { width: 14px; height: 14px; }
.empty-icon svg { width: 40px; height: 40px; opacity: 0.35; }

.container { max-width: 1200px; margin: 0 auto; padding: 28px 28px 48px; }

/* App shell + sidebar */
.app-layout { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,.08), transparent); }
.app-main > .container { flex: 1; width: 100%; max-width: 1200px; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 14px;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 24px;
    font-weight: 700;
    font-size: 1rem;
}
.brand-mark { color: var(--primary); display: flex; }
.brand-mark svg { width: 22px; height: 22px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all .15s ease;
    text-decoration: none;
}
.sidebar-link:hover { background: var(--bg-card); color: var(--text); text-decoration: none; }
.sidebar-link.active {
    background: var(--primary-glow);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.25);
}
.sidebar-link.active .icon { color: var(--primary); }
.sidebar-nav-badge {
    margin-left: auto; padding: 2px 7px; border-radius: 999px;
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: #fecaca; background: rgba(239, 68, 68, 0.18); border: 1px solid rgba(239, 68, 68, 0.45);
    line-height: 1.3; flex-shrink: 0;
}
.sidebar-link.active .sidebar-nav-badge {
    color: #fff; background: rgba(239, 68, 68, 0.85); border-color: rgba(239, 68, 68, 0.9);
}
.sidebar-nav-badge--count {
    min-width: 20px;
    text-align: center;
    color: #fff;
    background: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 70%, #fff);
}
.sidebar-link.active .sidebar-nav-badge--count {
    color: #fff;
    background: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 70%, #fff);
}
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.sidebar-version {
    padding: 0 12px 2px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    opacity: 0.75;
}
.app-footer {
    padding: 16px 24px 18px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.app-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.app-footer-copy {
    margin: 0;
    font-size: 0.68rem;
    color: var(--text-muted);
    opacity: 0.82;
}
.app-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.app-footer-nav a {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.app-footer-nav a:hover,
.app-footer-nav a.is-active { color: var(--text); }
.app-footer-nav a.is-active { font-weight: 600; }
.app-footer-sep {
    margin: 0 8px;
    font-size: 0.62rem;
    color: var(--text-muted);
    opacity: 0.35;
    user-select: none;
}
.app-footer-company {
    margin: 0;
    font-size: 0.68rem;
    color: var(--text-muted);
    opacity: 0.72;
}
.legal-document { max-width: 760px; }
.legal-entity--inline {
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.legal-entity--inline .legal-entity-list {
    display: grid;
    gap: 10px;
    margin: 0;
}
.legal-entity--inline .legal-entity-list dt {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.legal-entity--inline .legal-entity-list dd {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}
.legal-entity--inline .legal-entity-list a { color: var(--primary); text-decoration: none; }
.legal-entity--inline .legal-entity-list a:hover { text-decoration: underline; }
.admin-legal-preview {
    padding: 16px 18px;
    background: var(--bg);
    border-style: dashed;
}
.admin-legal-preview-label { margin: 16px 0 8px; font-size: 0.78rem; }
.admin-form-actions--split {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.page-login .app-footer {
    border-top: none;
    padding: 12px 0 0;
    margin-top: 10px;
}
.legal-document-updated {
    margin: 0 0 16px; font-size: 0.78rem; color: var(--text-muted);
}
.legal-document-intro {
    margin: 0 0 24px; line-height: 1.65; color: var(--text);
}
.legal-document-section { margin-bottom: 22px; }
.legal-document-section:last-child { margin-bottom: 0; }
.legal-document-section h2 {
    margin: 0 0 8px; font-size: 1rem; font-weight: 600;
}
.legal-document-section p {
    margin: 0; line-height: 1.65; color: var(--text-muted); font-size: 0.9rem;
}
.sidebar-logout:hover { color: var(--red); }
.sidebar-logout:hover .icon { color: var(--red); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-topbar,
.mobile-bottom-nav { display: none; }

@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 8000;
        padding: 10px 14px;
        background: rgba(15, 20, 25, 0.92);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(12px);
    }
    .mobile-topbar-brand {
        font-weight: 700;
        font-size: 1rem;
        min-width: 0;
        flex: 1;
    }
    .mobile-topbar--admin .mobile-topbar-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .mobile-topbar-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--bg-card);
        color: var(--text-muted);
        flex-shrink: 0;
    }
    .mobile-topbar-back .icon svg { width: 18px; height: 18px; }
    .mobile-topbar-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    .mobile-topbar-action {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        color: var(--text-muted);
        border: 1px solid var(--border);
        background: var(--bg-card);
    }
    .mobile-topbar-action .icon svg { width: 18px; height: 18px; }
    .mobile-topbar-action.active,
    .mobile-topbar-notify.active {
        color: var(--primary);
        border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    }
    .mobile-topbar-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--primary);
        color: #fff;
        font-size: 0.58rem;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
    }

    .app-layout { flex-direction: column; min-height: 100vh; }
    .sidebar { display: none; }

    .app-main {
        flex: 1;
        min-height: 0;
        width: 100%;
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    .app-main > .container {
        padding: 16px 14px 28px;
    }

    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 7990;
        padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: rgba(15, 20, 25, 0.96);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(12px);
    }
    .mobile-bottom-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 6px 4px;
        border-radius: 10px;
        color: var(--text-muted);
        font-size: 0.62rem;
        font-weight: 600;
        text-decoration: none;
        min-width: 0;
    }
    .mobile-bottom-link .icon svg { width: 20px; height: 20px; }
    .mobile-bottom-link span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-bottom-link.active {
        color: var(--primary);
        background: color-mix(in srgb, var(--primary) 12%, transparent);
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 20px;
    }
    .page-header h1 { font-size: 1.35rem; }
    .page-header-actions { width: 100%; }
    .page-header-actions .btn { width: 100%; justify-content: center; }
    .card { padding: 18px 16px; }
    .form-card { padding: 20px 16px; }
    .funds-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .funds-tab {
        justify-content: center;
        width: 100%;
        padding: 12px 10px;
    }
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    .password-change-overlay { padding: 12px; align-items: flex-end; }
    .password-change-modal {
        width: 100%;
        max-height: min(90dvh, 640px);
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
    }

    .dash-header { margin-bottom: 18px; }
    .dash-header h1 { font-size: 1.45rem; }
    .dash-header--split { align-items: stretch; }
    .balance-hero-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 18px;
        gap: 14px;
    }
    .balance-hero-action {
        margin-left: 0;
        width: 100%;
    }
    .balance-hero-value { font-size: 1.85rem; word-break: break-word; }
    .stats-grid-modern,
    .stats-grid-4 { grid-template-columns: 1fr; }
    .system-status-grid { grid-template-columns: 1fr; }
    .admin-subnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .admin-subnav::-webkit-scrollbar { display: none; }
    .admin-subnav-link { flex-shrink: 0; }
    .page-admin .admin-subnav-wrap {
        position: sticky;
        top: calc(52px + env(safe-area-inset-top, 0px));
        z-index: 7900;
        margin: 0 -14px 14px;
        padding: 0 14px 6px;
        background: linear-gradient(to bottom, var(--bg) 75%, transparent);
    }
    .page-admin .admin-subnav {
        margin-left: 0;
        margin-right: 0;
        padding: 4px;
        margin-bottom: 0;
        gap: 6px;
        border-radius: 12px;
    }
    .page-admin .admin-subnav-link {
        padding: 8px 11px;
        font-size: 0.78rem;
    }
    .page-admin .dash-header { margin-bottom: 10px; }
    .page-admin .dash-header h1 { font-size: 1.35rem; }
    .page-admin .dash-eyebrow { font-size: 0.68rem; margin-bottom: 4px; }
    .page-admin .dash-subtitle { font-size: 0.8rem; margin-top: 6px; }
    .page-admin .dash-header--split {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .page-admin .dash-header--split > .btn,
    .page-admin .dash-header--split > a.btn {
        width: 100%;
        justify-content: center;
    }
    .page-admin .admin-section { padding: 16px; margin-bottom: 14px; }
    .page-admin .admin-section-head:has(.btn) {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 16px 0;
    }
    .page-admin .admin-section-head:has(.btn) .btn { width: 100%; justify-content: center; }
    .page-admin .admin-section-head:not(:has(.btn)) { padding: 14px 16px 0; }
    .page-admin .admin-section--flush .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .page-admin .admin-section--flush .table {
        min-width: 640px;
        font-size: 0.8rem;
    }
    .page-admin .admin-section--flush .table th,
    .page-admin .admin-section--flush .table td { padding: 10px 8px; }
    .page-admin .table td.actions { white-space: nowrap; vertical-align: middle; }
    .page-admin .table td.actions .btn-sm {
        padding: 6px 10px;
        font-size: 0.72rem;
    }
    .page-admin .admin-hub { gap: 12px; margin-bottom: 14px; }
    .page-admin .admin-hub-group { padding: 16px; }
    .page-admin .admin-user-create-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-admin .admin-user-create-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .page-admin .admin-user-create-actions .btn { width: 100%; justify-content: center; }
    .page-admin .admin-user-row-stats { gap: 12px 16px; }
    .page-admin .admin-user-row-stat { flex: 1 1 calc(50% - 8px); }
    .page-admin .admin-balance-head {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .page-admin .admin-balance-tabs { flex-wrap: wrap; gap: 6px; }
    .page-admin .admin-balance-tab { flex: 1 1 calc(50% - 3px); justify-content: center; text-align: center; }
    .page-admin .admin-quick-delta { gap: 6px; }
    .page-admin .admin-quick-delta .btn {
        flex: 1 1 calc(33.333% - 4px);
        min-width: 0;
        padding-left: 6px;
        padding-right: 6px;
    }
    .page-admin .admin-form-actions,
    .page-admin .admin-form-actions--split {
        flex-direction: column;
        align-items: stretch;
    }
    .page-admin .admin-form-actions .btn,
    .page-admin .admin-form-actions--split .btn { width: 100%; justify-content: center; }
    .page-admin .admin-input--compact,
    .page-admin .admin-fake-trades-card .admin-input--compact { max-width: none; width: 100%; }
    .page-admin .admin-stats-presentation-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .page-admin .admin-stats-presentation-actions { flex-direction: column; }
    .page-admin .admin-stats-presentation-actions .btn { width: 100%; justify-content: center; }
    .page-admin .admin-stat-hero { padding: 18px 16px; }
    .page-admin .admin-stat-hero-value { font-size: 1.65rem; }
    .page-admin .admin-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .page-admin .admin-stats-grid--3 { grid-template-columns: 1fr; }
    .page-admin .admin-stat-tile { padding: 14px 12px; }
    .page-admin .admin-stat-tile-value { font-size: 1.1rem; }
    .page-admin .admin-system-pill { font-size: 0.68rem; }
    .page-admin .dash-header .admin-system-badges { width: 100%; }
    .page-admin .tx-item-admin {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-admin .tx-item-admin .actions {
        width: 100%;
        flex-direction: column;
    }
    .page-admin .tx-item-admin .actions .btn { width: 100%; justify-content: center; }
    .page-admin .admin-user-delete-card .admin-form-actions .btn { width: 100%; }
    .page-admin .contest-bots-settings-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-admin .contest-bots-create-card .admin-form-actions .btn { width: 100%; }
    .mobile-bottom-nav--admin .mobile-bottom-link { font-size: 0.58rem; }
    .app-shell--admin .app-main {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    .flash-credentials { max-width: 100%; }
    .flash-credentials .flash-text code { word-break: break-all; }
    .toast-stack {
        top: calc(58px + env(safe-area-inset-top, 0px));
        right: 10px;
        left: 10px;
        max-width: none;
        align-items: stretch;
    }
    .flash { min-width: 0; }
    .app-footer { padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px)); }
    .profile-account-links { display: block; }
}

/* Login */
.page-login {
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}
.page-login--centered {
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99,102,241,.12), transparent);
}
.page-login--centered .login-card {
    width: 100%; max-width: 400px; margin: 24px;
}

.login-shell {
    position: relative;
    width: 100%;
    min-height: 100vh;
}
.login-shell-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.login-shell-bg .login-hero-glow--1 {
    width: 560px; height: 560px; top: -180px; left: 5%;
}
.login-shell-bg .login-hero-glow--2 {
    width: 480px; height: 480px; bottom: -140px; right: 8%;
}
.login-shell-bg .login-hero-grid {
    mask-image: radial-gradient(ellipse 90% 70% at 40% 45%, #000 15%, transparent 80%);
}

.login-page {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(36px, 5vw, 64px);
    width: 100%;
    min-height: 100vh;
    padding: 40px clamp(20px, 4vw, 48px);
    max-width: 1060px;
    margin: 0 auto;
}
.login-hero {
    flex: 1 1 520px;
    max-width: 580px;
    display: flex;
    align-items: center;
}
.login-hero-glow {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55;
}
.login-hero-glow--1 {
    background: rgba(99, 102, 241, 0.22);
}
.login-hero-glow--2 {
    background: rgba(168, 85, 247, 0.14);
}
.login-hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
}
.login-hero-content {
    position: relative; z-index: 1; max-width: 580px; width: 100%;
}
.login-hero-brand {
    display: inline-flex; align-items: center; gap: 10px;
    margin-bottom: 28px; font-weight: 700; font-size: 0.95rem;
}
.login-hero-brand-mark { color: var(--primary); display: flex; }
.login-hero-brand-mark svg { width: 22px; height: 22px; }
.login-hero-eyebrow {
    display: inline-block; margin-bottom: 14px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--primary); padding: 5px 10px; border-radius: 999px;
    background: var(--primary-glow); border: 1px solid rgba(99,102,241,.25);
}
.login-hero-title {
    font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 700; line-height: 1.2;
    margin-bottom: 10px; letter-spacing: -0.02em;
}
.login-hero-lead {
    color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; max-width: 520px;
    margin-bottom: 20px;
}
.login-hero-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.login-hero-feature {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--bg-card) 85%, transparent);
    border: 1px solid var(--border);
}
.login-hero-feature-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}
.login-hero-feature-icon svg {
    width: 20px; height: 20px;
    display: block; flex-shrink: 0;
}
.login-hero-feature strong {
    display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 2px;
}
.login-hero-feature > div > span {
    display: block; font-size: 0.74rem; color: var(--text-muted); line-height: 1.4;
}
.login-hero-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
}
.login-hero-coins { display: flex; flex-wrap: wrap; gap: 8px; }
.login-hero-coin {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted);
}
.login-hero-coin img { display: block; }
.login-hero-coin-more {
    color: var(--primary);
    font-weight: 600;
    font-style: normal;
    font-size: 0.7rem;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.login-hero-stack { display: flex; gap: 6px; }
.login-hero-stack-item {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 5px 9px; border-radius: 6px;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
}
.login-hero-stack-item--accent {
    color: var(--purple); background: var(--purple-bg); border-color: rgba(168,85,247,.25);
}

.login-panel {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 0 0 360px;
    width: 100%;
    max-width: 380px;
    padding: 0;
    background: none;
    gap: 12px;
}
.login-panel-foot {
    margin-top: 0; max-width: 380px; width: 100%; text-align: center;
    font-size: 0.72rem; color: var(--text-muted); line-height: 1.45;
}
.login-panel-foot p + p { margin-top: 2px; }
.login-panel-foot-invest { white-space: nowrap; }
@media (max-width: 400px) {
    .login-panel-foot-invest {
        white-space: normal;
        font-size: 0.68rem;
    }
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow);
}
.login-header { text-align: center; margin-bottom: 20px; }
.login-logo { color: var(--primary); display: flex; justify-content: center; margin-bottom: 16px; }
.login-logo svg { width: 36px; height: 36px; }
.login-header h1, .login-header h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }
.login-header p { color: var(--text-muted); font-size: 0.875rem; }

.password-change-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 8, 16, 0.78);
    backdrop-filter: blur(6px);
}
.password-change-modal {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
}
.password-change-modal-head { margin-bottom: 18px; text-align: center; }
.password-change-modal-head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.password-change-modal-head p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}
.password-change-form .form-group { margin-bottom: 14px; }
.password-change-form .form-group:last-of-type { margin-bottom: 18px; }

.login-register-note {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
    text-align: center;
}
.login-register-note strong {
    display: block;
    color: var(--text);
    font-size: 0.82rem;
    margin-bottom: 6px;
}
.login-register-note > span.login-register-text {
    display: block;
    margin-bottom: 4px;
}
.login-register-telegram-line {
    display: block;
    white-space: nowrap;
}
.login-register-link {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.login-register-link.login-register-telegram-line {
    margin-top: 0;
}
.login-register-link:hover { color: #818cf8; text-decoration: underline; }

@media (max-width: 960px) {
    .login-page {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
        padding: 32px 24px 40px;
        max-width: none;
    }
    .login-shell { min-height: auto; }
    .login-hero {
        order: 0;
        flex: none;
        max-width: none;
    }
    .login-hero-content { max-width: none; }
    .login-hero-features { margin-bottom: 16px; }
    .login-panel {
        order: 1;
        flex: none;
        max-width: none;
    }
}
@media (max-width: 560px) {
    .login-hero-features { grid-template-columns: 1fr; }
    .login-card { padding: 28px 22px; }
}

.input-wrap { position: relative; }
.input-wrap .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-wrap .input-icon svg { width: 16px; height: 16px; }
.input-wrap input { padding-left: 40px !important; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color .15s;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.35); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; }
.btn-green { background: #15803d; color: #fff; }
.btn-green:hover { background: #166534; }
.btn-red { background: #b91c1c; color: #fff; }
.btn-red:hover { background: #991b1b; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.section-flush { padding: 20px 22px; }

/* Dashboard header */
.dash-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.dash-header .btn-ghost {
    background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted);
}
.dash-header .btn-ghost:hover { border-color: var(--primary); color: var(--text); background: var(--primary-glow); }
.sidebar-divider { height: 1px; background: var(--border); margin: 12px 8px; }
.sidebar-link-admin { margin-top: 4px; }
.admin-user-delete-card { border-color: color-mix(in srgb, var(--red) 28%, var(--border)); }
.admin-user-delete-card .admin-section-title { color: color-mix(in srgb, var(--red) 80%, #fff); }
.moderator-readonly-note { padding: 0 1.25rem 1rem; margin: 0; }
.sidebar-link-sub { padding-left: 28px; font-size: 0.8125rem; }
.sidebar-link-sub .icon svg { width: 16px; height: 16px; }
.dash-eyebrow { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.dash-header h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }

/* Balance hero */
.balance-hero { margin-bottom: 20px; padding: 0; overflow: hidden; }
.balance-hero-inner {
    display: flex; align-items: center; gap: 20px; padding: 28px 28px;
    background: linear-gradient(135deg, rgba(99,102,241,.12) 0%, transparent 60%);
    flex-wrap: wrap;
}
.balance-hero-body { flex: 1; min-width: 0; }
.balance-hero-action { margin-left: auto; flex-shrink: 0; }
.balance-hero-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--primary-glow); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.2);
}
.balance-hero-icon svg { width: 24px; height: 24px; }
.balance-hero-value { font-size: 2.25rem; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }
.bot-pill {
    margin-left: auto; display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
    background: var(--bg); border: 1px solid var(--border);
}
.bot-pill small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.7rem; }
.bot-pill-active { border-color: rgba(34,197,94,.3); background: var(--green-bg); color: var(--green); }
.bot-pill-active svg { color: var(--green); }
.bot-pill-off { color: var(--text-muted); }
.bot-pill-idle { border-color: rgba(234,179,8,.3); background: var(--yellow-bg); color: var(--yellow); }

/* Stats */
.stats-grid { display: grid; gap: 14px; margin-bottom: 24px; }
.stats-grid-modern { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stats-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-card-modern {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px;
    transition: border-color .15s;
}
.stat-card-modern:hover { border-color: var(--border-strong); }
.stat-card-link { text-decoration: none; color: inherit; cursor: pointer; }
.stat-card-link:hover { border-color: rgba(99,102,241,.3); text-decoration: none; }
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon-green { background: var(--green-bg); color: var(--green); }
.stat-icon-blue { background: var(--primary-glow); color: var(--primary); }
.stat-icon-yellow { background: var(--yellow-bg); color: var(--yellow); }
.stat-icon-purple { background: var(--purple-bg); color: var(--purple); }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.stat-value-sm { font-size: 0.95rem; font-weight: 600; }

/* System status */
.system-status {
    padding: 22px 24px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--green) 5%, var(--bg-card)), var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--green) 18%, var(--border));
}
.system-status-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    margin-bottom: 18px; flex-wrap: wrap;
}
.system-status-header h2 {
    display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 4px;
}
.system-status-subtitle { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.system-status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
    background: var(--green-bg); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
    white-space: nowrap;
}
.system-status-badge svg { width: 14px; height: 14px; }
.system-status-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.system-status-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border);
    min-height: 72px;
}
.system-status-icon {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary);
}
.system-status-icon svg { width: 18px; height: 18px; }
.system-status-body { flex: 1; min-width: 0; }
.system-status-label {
    display: block; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 3px;
}
.system-status-body strong { font-size: 0.84rem; font-weight: 600; line-height: 1.35; }
.system-status-foot {
    margin: 14px 0 0; font-size: 0.75rem; color: var(--text-muted);
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    background: var(--text-muted); opacity: 0.45;
}
.status-dot-live {
    background: var(--green); opacity: 1;
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent);
    animation: status-pulse 2s ease-in-out infinite;
}
.status-dot-idle { background: var(--yellow); opacity: 1; }
@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 40%, transparent); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

/* Dash grid */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-section { margin-bottom: 20px; }
.dash-section:last-child { margin-bottom: 0; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } .system-status-grid { grid-template-columns: 1fr; } }

/* Section */
.section { margin-bottom: 24px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.section-header h2 { font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.section-icon svg { width: 18px; height: 18px; color: var(--text-muted); }
.link { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.link:hover { color: var(--primary); text-decoration: none; }
.link-icon { display: inline-flex; align-items: center; gap: 6px; }
.link-arrow, .link-arrow svg { width: 18px; height: 18px; }

.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

/* Crypto market widget */
.crypto-market { overflow: hidden; }
.crypto-market-header { align-items: flex-start !important; }
.crypto-market-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; font-weight: 400; }
.crypto-market-live {
    font-size: 0.8rem; font-weight: 600; color: var(--green);
    white-space: nowrap; padding-top: 2px;
}
.crypto-market-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.crypto-market-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 16px; border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid color-mix(in srgb, var(--coin) 28%, var(--border));
    min-height: 168px;
    min-width: 0;
}
.crypto-market-card-top {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.crypto-market-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crypto-market-id .crypto-logo { width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; }
.crypto-market-id strong { display: block; font-size: 0.875rem; font-weight: 700; line-height: 1.2; }
.crypto-market-id span { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.crypto-market-badge {
    font-size: 0.7rem; font-weight: 600; padding: 4px 8px; border-radius: 999px;
    white-space: nowrap; flex-shrink: 0;
}
.crypto-market-badge.is-up { background: var(--green-bg); color: var(--green); }
.crypto-market-badge.is-down { background: var(--red-bg); color: var(--red); }
.crypto-market-price {
    font-size: clamp(1.25rem, 2vw, 1.65rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1;
}
.crypto-market-chart { margin-top: auto; height: 56px; width: 100%; }
.crypto-sparkline { display: block; width: 100%; height: 100%; }
@media (max-width: 960px) {
    .crypto-market-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .crypto-market-card-top { flex-wrap: wrap; }
    .crypto-market-badge { margin-left: 46px; }
}

/* Crypto cards modern */
.crypto-grid-modern { display: flex; flex-direction: column; gap: 8px; }
.crypto-card-modern {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    text-decoration: none; color: inherit; transition: all .15s;
}
.crypto-card-modern:hover { background: var(--bg-card-hover); border-color: var(--border); text-decoration: none; }
.coin-badge {
    width: 40px; height: 40px; border-radius: 10px;
    background: color-mix(in srgb, var(--coin) 18%, transparent);
    color: var(--coin);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--coin) 30%, transparent);
}
.crypto-card-body { flex: 1; min-width: 0; }
.crypto-card-body .crypto-name { display: block; font-size: 0.8rem; color: var(--text-muted); }
.crypto-card-body .crypto-price { font-size: 0.95rem; font-weight: 600; }
.crypto-change { font-size: 0.8rem; font-weight: 600; }

/* Transaction list */
.tx-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.tx-list-hint { margin: 12px 20px 16px; font-size: 0.8125rem; color: var(--text-muted); }
.tx-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 10px; border-radius: var(--radius-sm);
    transition: background .12s;
}
.tx-item:hover { background: var(--bg-card-hover); }
.tx-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.tx-icon svg { width: 18px; height: 18px; }
.tx-icon-up { background: var(--green-bg); color: var(--green); }
.tx-icon-down { background: var(--red-bg); color: var(--red); }
.tx-icon-pending { background: var(--yellow-bg); color: var(--yellow); }
.tx-body { flex: 1; min-width: 0; }
.tx-title { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-muted); }
.tx-amount { font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.tx-hash { font-size: 0.7rem; opacity: .7; }
.tx-item-admin { flex-wrap: wrap; }
.tx-item-admin .actions { display: flex; gap: 8px; }

/* Quick links admin */
.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 640px) { .quick-links { grid-template-columns: 1fr; } }
.quick-link {
    display: flex; align-items: center; gap: 12px; padding: 16px 18px;
    text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.875rem;
    transition: all .15s;
}
.quick-link:hover { border-color: rgba(99,102,241,.3); transform: translateY(-2px); text-decoration: none; color: var(--text); }
.quick-link svg { color: var(--primary); width: 20px; height: 20px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--primary-glow); color: #818cf8; }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: rgba(255,255,255,.05); color: var(--text-muted); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.875rem; }
.alert-flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.alert-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.alert-flex > .icon,
.alert-icon svg { width: 18px; height: 18px; }
.alert-flex > .icon { width: 36px; height: 36px; border-radius: 10px; padding: 9px; box-sizing: border-box; }
.alert-success {
    background: linear-gradient(135deg, rgba(34,197,94,.1) 0%, rgba(34,197,94,.04) 100%);
    color: var(--text); border: 1px solid rgba(34,197,94,.22);
}
.alert-success .alert-icon,
.alert-success.alert-flex > .icon { background: var(--green-bg); color: var(--green); }
.alert-error {
    background: linear-gradient(135deg, rgba(239,68,68,.1) 0%, rgba(239,68,68,.04) 100%);
    color: var(--text); border: 1px solid rgba(239,68,68,.22);
}
.alert-error .alert-icon,
.alert-error.alert-flex > .icon { background: var(--red-bg); color: var(--red); }
.alert-warning {
    background: linear-gradient(135deg, rgba(234,179,8,.1) 0%, rgba(234,179,8,.04) 100%);
    color: var(--text); border: 1px solid rgba(234,179,8,.22);
}
.alert-warning .alert-icon,
.alert-warning.alert-flex > .icon { background: var(--yellow-bg); color: var(--yellow); }
.alert-link { margin-left: auto; font-weight: 600; color: var(--primary); }
.alert-link:hover { color: #818cf8; text-decoration: none; }

/* Flash toasts (prawy gorny rog) */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: min(400px, calc(100vw - 32px));
    pointer-events: none;
}
.flash {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 12px 14px 12px 12px; border-radius: 12px;
    width: 100%; min-width: 280px;
    box-shadow: 0 8px 32px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.05);
    animation: toast-in .4s cubic-bezier(.21, 1, .34, 1);
    transition: opacity .25s, transform .25s;
    pointer-events: auto;
    backdrop-filter: blur(12px);
}
.flash.is-dismissed { opacity: 0; transform: translateX(16px); pointer-events: none; }
.flash-icon {
    width: 32px; height: 32px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.flash-icon svg { width: 16px; height: 16px; }
.flash-text { font-size: 0.875rem; font-weight: 500; line-height: 1.4; color: var(--text); padding-right: 4px; }
.flash-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; margin-left: auto; flex-shrink: 0;
    border: none; border-radius: 8px; background: transparent;
    color: var(--text-muted); cursor: pointer; transition: background .15s, color .15s;
}
.flash-close svg { width: 14px; height: 14px; }
.flash-close:hover { background: rgba(255,255,255,.06); color: var(--text); }
.flash-success { background: rgba(18, 24, 32, 0.92); border: 1px solid rgba(34,197,94,.35); }
.flash-success .flash-icon { background: var(--green-bg); color: var(--green); box-shadow: inset 0 0 0 1px rgba(34,197,94,.2); }
.flash-error { background: rgba(18, 24, 32, 0.92); border: 1px solid rgba(239,68,68,.35); }
.flash-error .flash-icon { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px rgba(239,68,68,.2); }
.flash-credentials { align-items: flex-start; max-width: min(420px, calc(100vw - 32px)); }
.flash-credentials .flash-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.flash-credentials .flash-text strong { font-size: 0.875rem; margin-bottom: 2px; }
.flash-credentials .flash-text code {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
}
.flash-credentials-note {
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
}
.flash-credentials-dismiss { margin: 0; flex-shrink: 0; }
@keyframes toast-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 640px) {
    .toast-stack { top: 12px; right: 12px; left: 12px; max-width: none; align-items: stretch; }
    .flash { min-width: 0; }
}

/* Tables (other pages) */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { text-align: left; padding: 10px 12px; color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); font-weight: 600; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); }
.table tr:hover td { background: var(--bg-card-hover); }
.actions { white-space: nowrap; display: flex; gap: 8px; }

/* Crypto page, deposit, etc. */
.crypto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.crypto-grid-full { margin-top: 24px; }
.crypto-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; text-decoration: none; color: inherit; transition: all .15s;
}
.crypto-card:hover { border-color: rgba(99,102,241,.3); text-decoration: none; }
.crypto-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.crypto-symbol { font-weight: 700; }
.crypto-card-static:hover { border-color: var(--border); }
.chart-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); }
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.chart-price { font-size: 1.4rem; font-weight: 700; margin-top: 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crypto-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.crypto-tab { padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.crypto-tab.active, .crypto-tab:hover { border-color: var(--primary); color: var(--text); text-decoration: none; background: var(--primary-glow); }
.chart-periods { display: flex; gap: 6px; }
.period-btn { padding: 6px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; font-family: inherit; }
.period-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.deposit-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.deposit-layout-single { max-width: 920px; }
.deposit-usdt-badge {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 20px;
    border-radius: var(--radius-sm); background: color-mix(in srgb, #26a17b 10%, var(--bg));
    border: 1px solid color-mix(in srgb, #26a17b 25%, var(--border));
}
.deposit-usdt-badge strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.deposit-usdt-badge > div span { font-size: 0.8rem; color: var(--text-muted); }
.crypto-network-badge {
    margin-left: auto; padding: 6px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
    background: var(--purple-bg); color: var(--purple); border: 1px solid color-mix(in srgb, var(--purple) 25%, transparent);
    white-space: nowrap;
}
.crypto-network-box { margin-bottom: 16px; }
.crypto-network-display {
    padding: 12px 14px; border-radius: var(--radius-sm); margin-top: 6px; margin-bottom: 8px;
    background: color-mix(in srgb, var(--purple) 8%, var(--bg)); border: 1px solid color-mix(in srgb, var(--purple) 22%, var(--border));
    font-size: 0.92rem; font-weight: 600; color: var(--purple);
}
.crypto-network-warning {
    margin: 0; font-size: 0.78rem; color: var(--yellow); line-height: 1.45;
}
.network-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.network-option { display: block; min-width: 0; }
.network-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.network-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.network-option-card:hover {
    border-color: color-mix(in srgb, var(--network-color) 40%, var(--border));
    background: color-mix(in srgb, var(--network-color) 5%, var(--bg));
}
.network-option input:focus-visible + .network-option-card {
    outline: 2px solid color-mix(in srgb, var(--network-color) 55%, var(--primary));
    outline-offset: 2px;
}
.network-option input:checked + .network-option-card {
    border-color: color-mix(in srgb, var(--network-color) 55%, var(--border));
    background: color-mix(in srgb, var(--network-color) 10%, var(--bg));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--network-color) 22%, transparent);
}
.network-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(145deg, var(--network-color), color-mix(in srgb, var(--network-color) 72%, #000));
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent);
}
.network-option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.network-option-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}
.network-option-chain {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.network-option-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: transparent;
    background: var(--bg-elevated);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.network-option-check svg { width: 13px; height: 13px; }
.network-option input:checked + .network-option-card .network-option-check {
    border-color: var(--network-color);
    background: var(--network-color);
    color: #fff;
}
@media (max-width: 640px) {
    .network-picker { grid-template-columns: 1fr; }
}
.deposit-usdt-logo { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; }
.deposit-info-list {
    list-style: none; display: flex; flex-direction: column; gap: 10px;
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;
}
.deposit-info-list li { padding-left: 14px; position: relative; }
.deposit-info-list li::before {
    content: ''; position: absolute; left: 0; top: 8px; width: 5px; height: 5px;
    border-radius: 50%; background: var(--primary);
}
.deposit-info-card h3 { font-size: 0.95rem; margin-bottom: 12px; }
.funds-tabs {
    display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.funds-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
    background: var(--bg-card); border: 1px solid var(--border);
}
.funds-tab:hover { color: var(--text); border-color: var(--border-strong); }
.funds-tab.active {
    color: var(--text); border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    background: color-mix(in srgb, var(--primary) 10%, var(--bg-card));
}
.funds-tab svg { width: 16px; height: 16px; }
.deposit-guide-link {
    display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 10px;
    margin-top: 16px; padding-top: 14px; font-size: 0.82rem; color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.deposit-guide-link svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 1px; }
.deposit-guide-link .link {
    display: inline-flex; align-items: center; gap: 4px; width: 100%;
    margin-top: 2px; white-space: normal;
}
.guide-deposit-why {
    display: flex; gap: 16px; align-items: flex-start;
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-card));
}
.guide-deposit-why h2 { font-size: 1rem; margin-bottom: 8px; }
.deposit-why-card {
    display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; margin-bottom: 16px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-card));
}
.deposit-why-icon { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.deposit-why-card h2 { font-size: 0.95rem; margin-bottom: 8px; }
.deposit-why-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }
.withdraw-balance {
    font-size: 1.35rem; font-weight: 700; color: var(--green);
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--green-bg); border: 1px solid rgba(34, 197, 94, 0.2);
}
@media (max-width: 768px) { .deposit-layout { grid-template-columns: 1fr; } }
.form-card { max-width: 100%; }
.form-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; }
.crypto-select { display: flex; gap: 8px; }
.crypto-option input { display: none; }
.crypto-option span { display: block; padding: 8px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.crypto-option input:checked + span { border-color: var(--primary); background: var(--primary-glow); color: #818cf8; }
.wallet-box { background: var(--bg); border-radius: var(--radius-sm); padding: 12px; }
.wallet-address { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.wallet-address code { flex: 1; font-size: 0.75rem; word-break: break-all; color: var(--green); }
.info-card h3 { margin-bottom: 16px; font-size: 1rem; }
.rate-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }

.waiting-card { max-width: 480px; margin: 40px auto; text-align: center; }
.waiting-icon { font-size: 3rem; margin-bottom: 12px; }
.deposit-ref-box {
    display: inline-flex; flex-direction: column; gap: 4px; align-items: center;
    margin: 16px 0 4px; padding: 12px 20px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border);
}
.deposit-ref-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.deposit-ref-value { font-size: 1.1rem; font-weight: 700; color: var(--primary); letter-spacing: 0.04em; }
.detail-hash { font-size: 0.75rem; word-break: break-all; text-align: right; max-width: 55%; color: var(--text-muted); }
.timer { margin: 28px 0; }
.timer-value { display: block; font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary); }
.timer-label { font-size: 0.85rem; color: var(--text-muted); }
.waiting-details { text-align: left; margin: 24px 0; }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }

.history-filters {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.history-filter {
    padding: 8px 16px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
    color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border);
    text-decoration: none; transition: all .15s;
}
.history-filter:hover {
    color: var(--text); border-color: var(--border-strong); text-decoration: none;
}
.history-filter.active {
    color: #818cf8; border-color: rgba(99,102,241,.45); background: var(--primary-glow);
}

.history-pagination {
    display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 6px;
    margin-top: 16px; max-width: 100%; overflow-x: auto; padding-bottom: 4px;
}
.history-page-btn.is-disabled {
    opacity: 0.35; pointer-events: none;
}
.history-page-ellipsis {
    min-width: 28px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.875rem; color: var(--text-muted); user-select: none;
}
.history-page-btn {
    min-width: 36px; height: 36px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: 0.8125rem; font-weight: 600;
    color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border);
    text-decoration: none; transition: all .15s;
}
.history-page-btn:hover {
    color: var(--text); border-color: var(--border-strong); text-decoration: none;
}
.history-page-btn.active {
    color: #818cf8; border-color: rgba(99,102,241,.45); background: var(--primary-glow);
}
.history-page-btn--nav { padding: 0 8px; }
.history-page-arrow { width: 16px; height: 16px; }
.history-page-arrow--prev { transform: rotate(180deg); }
.history-pagination-meta { text-align: center; font-size: 0.78rem; margin: 10px 0 0; }

.admin-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.admin-layout-side { display: grid; gap: 16px; align-content: start; }
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }

/* Contest bots */
.contest-bots-settings-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.contest-bots-settings-head .admin-section-title { margin-bottom: 0; }
.contest-bots-status {
    flex-shrink: 0; padding: 4px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.contest-bots-status--on {
    color: #4ade80; background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.28);
}
.contest-bots-status--off {
    color: var(--text-muted); background: var(--bg-elevated); border: 1px solid var(--border);
}
.contest-bots-features {
    list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px;
}
.contest-bots-features li {
    display: flex; align-items: flex-start; gap: 10px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45;
}
.contest-bots-features li svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; color: var(--primary); opacity: 0.85; }
.contest-bots-toggle-form { display: grid; gap: 14px; margin: 0; }
.toggle-switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg);
    border: 1px solid var(--border); cursor: pointer;
}
.toggle-switch-copy { display: grid; gap: 4px; min-width: 0; }
.toggle-switch-copy strong { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.toggle-switch-copy small { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }
.toggle-switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-switch-slider {
    position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong);
    transition: background .2s ease; cursor: pointer;
}
.toggle-switch-slider::before {
    content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
    transition: transform .2s ease;
}
.toggle-switch input:checked + .toggle-switch-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-switch-slider::before { transform: translateX(20px); }
.toggle-switch input:focus-visible + .toggle-switch-slider { outline: 2px solid var(--primary); outline-offset: 2px; }

.contest-bots-create-card .admin-section-title { margin-bottom: 14px; }
.contest-bots-create-form { display: grid; gap: 14px; }
.contest-bots-count-input {
    display: flex; align-items: stretch; gap: 0; border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden; background: var(--bg);
}
.contest-bots-count-btn {
    width: 44px; border: none; background: var(--bg-elevated); color: var(--text);
    font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: background .15s;
}
.contest-bots-count-btn:hover { background: color-mix(in srgb, var(--primary) 12%, var(--bg-elevated)); }
.contest-bots-count-field {
    flex: 1; min-width: 0; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
    border-radius: 0; text-align: center; font-size: 1.1rem; font-weight: 700; background: transparent;
}
.contest-bots-count-field:focus { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); }

.contest-bots-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 36px 20px; text-align: center; color: var(--text-muted);
}
.contest-bots-empty svg { width: 32px; height: 32px; opacity: 0.45; }
.contest-bots-empty p { margin: 0; font-size: 0.875rem; max-width: 36ch; }

.admin-bot-login { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.admin-bot-login .profile-avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 0.7rem; }
.admin-bot-avatar-cell { white-space: nowrap; }
.admin-bot-avatar-form,
.admin-bot-avatar-remove { display: inline-flex; vertical-align: middle; }
.admin-bot-upload-btn { position: relative; cursor: pointer; margin: 0; }
.admin-bot-upload-input { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }

/* Panel admina */
.page-admin .dash-header { margin-bottom: 12px; }
.page-admin .dash-subtitle { margin-top: 8px; font-size: 0.84rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-admin .dash-header--split {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.admin-subnav-wrap { margin-bottom: 20px; }
.admin-subnav {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0;
    padding: 6px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border);
}
.admin-subnav-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px; border-radius: 10px; font-size: 0.82rem; font-weight: 600;
    color: var(--text-muted); transition: background 0.15s, color 0.15s;
}
.admin-subnav-link .icon { width: 16px; height: 16px; }
.admin-subnav-link:hover { color: var(--text); background: var(--bg-elevated); }
.admin-subnav-link.active {
    color: var(--text); background: color-mix(in srgb, var(--primary) 14%, var(--bg-elevated));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}
.admin-subnav-link.active .icon { color: var(--primary); }
.sidebar-group-label {
    padding: 10px 12px 4px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-muted); opacity: 0.85;
}
.sidebar-group-label:first-of-type { padding-top: 4px; }
.admin-hub {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px;
}
.admin-recent-users { grid-column: 1 / -1; }
@media (max-width: 768px) { .admin-hub { grid-template-columns: 1fr; } }
.admin-hub-group { padding: 18px 20px; }
.admin-hub-title {
    display: flex; align-items: center; gap: 8px; font-size: 0.92rem; margin-bottom: 12px;
}
.admin-hub-links { display: grid; gap: 8px; }
.admin-hub-link {
    display: block; padding: 12px 14px; border-radius: 12px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    transition: border-color 0.15s, transform 0.15s;
}
.admin-hub-link:hover { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); transform: translateY(-1px); }
.admin-hub-link strong { display: block; font-size: 0.88rem; margin-bottom: 3px; }
.admin-hub-link span { display: block; font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }
.admin-section { padding: 20px 22px; margin-bottom: 16px; }
.admin-section--flush { padding: 0; overflow: hidden; }
.admin-section--flush .table-wrap { margin: 0; }
.admin-section--narrow { max-width: 520px; }
.admin-section-title {
    display: flex; align-items: center; gap: 8px; font-size: 0.95rem; margin-bottom: 14px;
}
.admin-section-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 22px 0;
}
.admin-section-head .admin-section-title { margin-bottom: 0; }
.admin-section-meta {
    font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
    padding: 4px 10px; border-radius: 999px; background: var(--bg-elevated); border: 1px solid var(--border);
}
.admin-sections { display: grid; gap: 16px; max-width: 720px; }
.admin-form-actions { display: flex; justify-content: flex-start; }
.admin-queue { margin-top: 4px; }
.admin-queue .section-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.admin-users-table .profile-avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 0.62rem; }
.table-wrap--compact { overflow-x: visible; }
.admin-users-table-date { font-size: 0.78rem; white-space: nowrap; }

/* Admin users page */
.admin-user-create-panel {
    margin-bottom: 20px; overflow: hidden;
    opacity: 0; transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease;
}
.admin-user-create-panel.is-open { opacity: 1; transform: translateY(0); }
.admin-user-create-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px;
}
.admin-user-create-head .admin-section-title { margin-bottom: 6px; }
.admin-user-create-head .form-note { margin: 0; }
.admin-user-create-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 900px) { .admin-user-create-grid { grid-template-columns: 1fr; } }
.admin-user-create-note {
    display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 18px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--primary) 8%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    font-size: 0.82rem; color: var(--text-muted); line-height: 1.45;
}
.admin-user-create-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.admin-user-create-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.admin-created-credentials {
    margin-bottom: 16px;
    border-color: color-mix(in srgb, var(--green) 35%, var(--border));
    background: linear-gradient(135deg, color-mix(in srgb, var(--green) 8%, var(--bg-card)), var(--bg-card));
}
.admin-created-credentials-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px;
}
.admin-created-credentials-head .admin-section-title { margin-bottom: 6px; }
.admin-created-credentials-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.admin-created-credentials-list dt {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.admin-created-credentials-list dd { margin: 0; }
.admin-created-credentials-list code {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    word-break: break-all;
}
.admin-created-credentials-password code {
    border-color: color-mix(in srgb, var(--green) 30%, var(--border));
    color: var(--green);
}
.admin-created-credentials-actions { margin-top: 12px; }
@media (max-width: 900px) {
    .admin-created-credentials-list { grid-template-columns: 1fr; }
}

.admin-user-list { display: grid; }
.admin-user-list-empty { padding: 32px 22px; text-align: center; font-size: 0.875rem; }
.admin-user-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.9fr) minmax(220px, 1fr) auto;
    gap: 12px 16px; align-items: center;
    padding: 14px 22px; border-bottom: 1px solid var(--border);
}
.admin-user-row:last-child { border-bottom: none; }
.admin-user-row-stats { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
@media (max-width: 960px) {
    .admin-user-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "identity action"
            "tags tags"
            "stats stats";
    }
    .admin-user-row-identity { grid-area: identity; }
    .admin-user-row-action { grid-area: action; justify-self: end; }
    .admin-user-row-tags { grid-area: tags; }
    .admin-user-row-stats { grid-area: stats; }
}
.admin-user-row-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-user-row-names { min-width: 0; display: grid; gap: 2px; }
.admin-user-row-login { font-size: 0.92rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-row-email { font-size: 0.76rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-row-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-user-tag {
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
    font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-elevated); border: 1px solid var(--border);
}
.admin-user-tag svg { width: 12px; height: 12px; }
.admin-user-row-stat { display: grid; gap: 2px; min-width: 0; }
.admin-user-row-stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.admin-user-row-stat-value { font-size: 0.86rem; font-weight: 600; white-space: nowrap; }
.admin-user-row-stat--muted .admin-user-row-stat-value { font-weight: 500; color: var(--text-muted); font-size: 0.8rem; }
.admin-user-row-action { justify-self: end; }

.admin-user-cell-login { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.admin-ip { font-size: 0.76rem; color: var(--text-muted); }
.badge-role { text-transform: uppercase; font-size: 0.62rem; letter-spacing: 0.04em; }
.badge-role-admin { background: color-mix(in srgb, var(--primary) 18%, transparent); color: color-mix(in srgb, var(--primary) 85%, #fff); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.badge-role-moderator { background: color-mix(in srgb, #f59e0b 18%, transparent); color: color-mix(in srgb, #f59e0b 85%, #fff); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.badge-role-user { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.admin-user-manage {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr); gap: 16px; align-items: start;
}
@media (max-width: 960px) { .admin-user-manage { grid-template-columns: 1fr; } }
.admin-user-manage-side { display: grid; gap: 16px; align-content: start; }
.admin-user-manage-main { display: grid; gap: 16px; align-content: start; }
.admin-user-manage-forms { display: grid; gap: 16px; }
.admin-user-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-status-badge {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-status-badge--ban { color: #f87171; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.28); }
.admin-status-badge--freeze { color: #38bdf8; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.25); }
.admin-status-badge--warn { color: #fbbf24; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.28); }
.admin-status-badge--boost { color: #a78bfa; background: rgba(167, 139, 250, 0.12); border: 1px solid rgba(167, 139, 250, 0.28); }

.admin-panel-card .admin-panel-form,
.admin-panel-card .admin-moderation-form,
.admin-panel-card .admin-notify-user-form { display: grid; gap: 14px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .admin-form-grid, .admin-form-grid--2 { grid-template-columns: 1fr; } }
.admin-form-check { display: flex; align-items: flex-end; }
.admin-input,
.admin-textarea {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    font: inherit; transition: border-color .15s, box-shadow .15s;
}
.admin-input:focus,
.admin-textarea:focus {
    outline: none; border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}
.admin-input--compact { max-width: 120px; }
.admin-textarea { min-height: 88px; resize: vertical; line-height: 1.45; }

.admin-balance-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px;
}
.admin-balance-head .admin-section-title { margin-bottom: 0; }
.admin-balance-current {
    font-size: 1.35rem; font-weight: 800; color: var(--primary);
    font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.admin-balance-tabs {
    display: flex; gap: 6px; margin: 14px 0 16px; padding: 4px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.admin-balance-tab {
    flex: 1; border: none; background: transparent; color: var(--text-muted);
    padding: 8px 12px; border-radius: calc(var(--radius-sm) - 2px); font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: background .15s, color .15s;
}
.admin-balance-tab:hover { color: var(--text); }
.admin-balance-tab.active {
    background: color-mix(in srgb, var(--primary) 14%, var(--bg-elevated));
    color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}
.admin-balance-panel.is-hidden { display: none; }
.admin-quick-delta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.admin-quick-delta .btn { min-width: 52px; font-variant-numeric: tabular-nums; }

.admin-subscription-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border); font-size: 0.84rem;
}
.admin-subscription-summary strong { font-weight: 700; color: var(--text); }
.admin-subscription-row {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
}
.admin-subscription-row .form-group { flex: 0 0 auto; margin: 0; }
.admin-moderation-form { display: grid; gap: 12px; }
.admin-moderation-form .toggle-switch-row { margin: 0; }

.admin-section-desc { margin: -4px 0 12px; font-size: 0.82rem; line-height: 1.45; }
.admin-boost-form,
.admin-fake-trades-form { display: grid; gap: 14px; }
.admin-boost-status {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border); font-size: 0.84rem;
}
.admin-boost-status--active {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--bg));
}
.admin-boost-status--active strong { color: var(--primary); }
.admin-form-check--center { align-items: center; }
.admin-fake-trades-card .admin-input--compact { max-width: 160px; }

/* Admin stats & system */
.admin-stats-presentation { margin-bottom: 16px; }
.admin-stats-presentation-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px;
}
.admin-stats-presentation-head .admin-section-title { margin-bottom: 6px; }
.admin-stats-presentation-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-stat-hero {
    display: flex; align-items: flex-start; gap: 20px; padding: 24px 26px; margin-bottom: 24px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--bg-card)), var(--bg-card));
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
}
.admin-stat-hero-icon {
    flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
}
.admin-stat-hero-icon svg { width: 26px; height: 26px; }
.admin-stat-hero-label { margin: 0 0 6px; font-size: 0.82rem; color: var(--text-muted); }
.admin-stat-hero-value { margin: 0 0 12px; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.admin-stat-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.78rem; color: var(--text-muted); }

.admin-stats-section { margin-bottom: 22px; }
.admin-stats-section-title {
    display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 700;
    margin: 0 0 12px; color: var(--text);
}
.admin-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.admin-stats-grid--3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.admin-stat-tile {
    padding: 16px 18px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    display: grid; gap: 6px;
}
.admin-stat-tile--highlight {
    border-color: color-mix(in srgb, #4ade80 35%, var(--border));
    background: color-mix(in srgb, #4ade80 6%, var(--bg-card));
}
.admin-stat-tile-label { font-size: 0.76rem; color: var(--text-muted); }
.admin-stat-tile-value { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.admin-stat-tile small { font-size: 0.72rem; line-height: 1.35; }
.admin-stats-footnote { font-size: 0.8rem; margin: 8px 0 0; }

.page-admin .dash-header .admin-system-badges {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end;
}
.admin-system-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 999px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted);
}
.admin-system-pill svg { width: 13px; height: 13px; }
.admin-system-pill--prod { color: #38bdf8; border-color: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.1); }

.admin-system-metrics--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .admin-system-metrics--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .admin-system-metrics--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.admin-system-fleet-summary { padding-top: 20px; }
.admin-system-fleet-summary-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.admin-system-fleet-summary-head .admin-section-title { margin-bottom: 0; }
.admin-system-fleet-stats {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px;
}
@media (max-width: 1100px) { .admin-system-fleet-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .admin-system-fleet-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-system-fleet-stats div {
    padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border);
    display: grid; gap: 4px;
}
.admin-system-fleet-stats span { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.admin-system-fleet-stats strong { font-size: 0.88rem; font-weight: 700; }

.admin-system-bot-engines {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px;
}
@media (max-width: 960px) { .admin-system-bot-engines { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .admin-system-bot-engines { grid-template-columns: 1fr; } }
.admin-system-bot-engine {
    padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border);
}
.admin-system-bot-engine-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
}
.admin-system-bot-engine-head strong { font-size: 0.82rem; }
.admin-system-bot-engine p { margin: 0 0 4px; font-size: 0.74rem; color: var(--text-muted); line-height: 1.4; }
.admin-system-bot-engine small { font-size: 0.72rem; color: var(--primary); font-weight: 600; }

.admin-system-tier-load { display: grid; gap: 14px; margin-top: 4px; }
.admin-system-tier-load-title {
    margin: 0 0 2px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted);
}
.admin-system-tier-bar {
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border);
}
.admin-system-tier-bar-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px;
}
.admin-system-tier-bar-label { display: grid; gap: 2px; min-width: 0; }
.admin-system-tier-bar-label span { color: var(--text); font-weight: 700; font-size: 0.82rem; }
.admin-system-tier-bar-label small { font-size: 0.68rem; color: var(--text-muted); line-height: 1.35; }
.admin-system-tier-bar-track {
    height: 6px; border-radius: 999px; background: var(--bg-elevated); overflow: hidden; margin-bottom: 10px;
}
.admin-system-tier-bar-track span {
    display: block; height: 100%; border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #818cf8));
}
.admin-system-tier-bar-track--warn span {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.admin-system-tier-bar-track--err span {
    background: linear-gradient(90deg, #f87171, #ef4444);
}
.admin-system-tier-metrics {
    display: flex; flex-wrap: wrap; gap: 6px 12px;
}
.admin-system-tier-metrics span {
    font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
    padding: 3px 8px; border-radius: 999px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}

.admin-system-vps-table { font-size: 0.8rem; }
.admin-system-vps-table code.admin-system-node-id {
    font-size: 0.76rem; padding: 2px 6px; border-radius: 4px;
    background: var(--bg-elevated); color: var(--primary);
}

.admin-system-micro-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
@media (max-width: 1100px) { .admin-system-micro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .admin-system-micro-grid { grid-template-columns: 1fr; } }
.admin-system-micro {
    padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border);
}
.admin-system-micro-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
}
.admin-system-micro-head code { font-size: 0.72rem; color: var(--text); word-break: break-all; }
.admin-system-micro-meta { display: grid; gap: 4px; margin: 0; }
.admin-system-micro-meta div { display: flex; justify-content: space-between; gap: 8px; font-size: 0.74rem; }
.admin-system-micro-meta dt { margin: 0; color: var(--text-muted); text-transform: lowercase; }
.admin-system-micro-meta dd { margin: 0; font-weight: 600; }

.admin-system-dev-note {
    margin-top: 16px; font-size: 0.72rem; text-align: center; opacity: 0.65;
}

.admin-system-metrics {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
    padding: 0; overflow: hidden; margin-bottom: 20px;
    background: var(--border); border: 1px solid var(--border);
}
@media (max-width: 900px) { .admin-system-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-system-metric {
    padding: 18px 20px; background: var(--bg-card); display: grid; gap: 6px;
}
.admin-system-metric-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.admin-system-metric-value { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.admin-system-local { font-size: 0.76rem !important; font-weight: 500 !important; color: var(--text-muted) !important; max-width: 220px; margin-left: auto; }

.admin-system-integrations {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px;
}
.admin-system-integration {
    padding: 14px 16px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border);
}
.admin-system-integration-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px;
}
.admin-system-integration-head strong { font-size: 0.86rem; }
.admin-system-integration p { margin: 0 0 6px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; }
.admin-system-integration small { font-size: 0.72rem; }

.admin-system-pill--version { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.admin-system-pill--ok { color: #4ade80; border-color: rgba(74, 222, 128, 0.3); background: rgba(74, 222, 128, 0.08); }
.admin-system-pill--warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.08); }
.admin-system-pill--err { color: #f87171; border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }

.admin-system-layout {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
@media (max-width: 960px) { .admin-system-layout { grid-template-columns: 1fr; } }
.admin-system-card--wide { grid-column: 1 / -1; }
.admin-system-list { display: grid; gap: 10px; margin: 0; }
.admin-system-list div {
    display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
    padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 0.84rem;
}
.admin-system-list div:last-child { border-bottom: none; padding-bottom: 0; }
.admin-system-list dt { margin: 0; color: var(--text-muted); flex-shrink: 0; }
.admin-system-list dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.admin-system-status {
    display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
}
.admin-system-status--ok { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.admin-system-status--warn { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.admin-system-status--err { color: #f87171; background: rgba(248, 113, 113, 0.12); }
.admin-system-note { margin: 14px 0 0; font-size: 0.78rem; line-height: 1.45; }
.admin-system-features {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.admin-system-feature {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px;
    border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border);
}
.admin-system-feature-icon {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.admin-system-feature-icon svg { width: 18px; height: 18px; }
.admin-system-feature strong { display: block; font-size: 0.86rem; margin-bottom: 4px; }
.admin-system-feature p { margin: 0; font-size: 0.76rem; color: var(--text-muted); line-height: 1.45; }

.account-blocked-wrap {
    min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
.account-blocked-card {
    max-width: 440px; width: 100%; text-align: center; padding: 36px 28px;
}
.account-blocked-icon {
    width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
}
.account-blocked-icon svg { width: 30px; height: 30px; }
.account-blocked-icon--ban {
    color: #f87171; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.25);
}
.account-blocked-icon--freeze {
    color: #38bdf8; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.25);
}
.account-blocked-card h1 { margin: 0 0 12px; font-size: 1.35rem; }
.account-blocked-card p { margin: 0 0 22px; color: var(--text-muted); line-height: 1.55; font-size: 0.92rem; }

.withdraw-blocked-card {
    padding: 18px 20px; border-color: rgba(251, 191, 36, 0.35);
    background: color-mix(in srgb, #fbbf24 6%, var(--bg-card));
}
.withdraw-blocked-card h2 { margin: 0 0 8px; font-size: 1rem; color: #fbbf24; }
.withdraw-blocked-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.45; }
.form-card--disabled { opacity: 0.72; }
.withdraw-fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.withdraw-limit-info { display: block; margin-top: 6px; }
.admin-inline-form { display: grid; gap: 12px; max-width: 420px; }
.admin-subscription-status { font-size: 0.88rem; margin: 0 0 8px; }
.admin-subscription-form { display: grid; gap: 14px; }
.admin-subscription-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.admin-subscription-actions .form-group { flex: 1; min-width: 100px; margin: 0; }
.admin-subscription-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-layout--notifications { display: grid; gap: 16px; max-width: 720px; }

/* Admin notifications composer */
.admin-notify-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start;
}
@media (max-width: 960px) { .admin-notify-grid { grid-template-columns: 1fr; } }

.notify-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.notify-card-head {
    display: flex; gap: 14px; align-items: flex-start; padding: 22px 22px 0;
}
.notify-card-icon {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.notify-card-icon svg { width: 20px; height: 20px; }
.notify-card-icon--broadcast {
    color: #818cf8; background: color-mix(in srgb, var(--primary) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
}
.notify-card-icon--user {
    color: #38bdf8; background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.notify-card-head-text { min-width: 0; }
.notify-card-head-text .admin-section-title { margin-bottom: 6px; font-size: 1rem; }
.notify-card-head-text p { margin: 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }

.notify-compose-form {
    display: flex; flex-direction: column; flex: 1; padding: 18px 22px 22px; gap: 0;
}
.notify-field { margin-bottom: 16px; }
.notify-field label {
    display: block; margin-bottom: 8px; font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.notify-field--message { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; }
.notify-field--message label { flex-shrink: 0; }

.notify-input,
.notify-textarea,
.notify-select {
    width: 100%; font-family: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
.notify-input { padding: 13px 16px; font-size: 0.95rem; font-weight: 600; }
.notify-input--title { font-size: 1rem; }
.notify-input::placeholder,
.notify-textarea::placeholder { color: color-mix(in srgb, var(--text-muted) 75%, transparent); font-weight: 400; }
.notify-input:focus,
.notify-textarea:focus,
.notify-select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.notify-textarea {
    min-height: 180px; padding: 16px 18px; line-height: 1.65; font-size: 0.92rem;
    resize: none; overflow: hidden; flex: 1;
}

.notify-select-wrap { position: relative; }
.notify-select-wrap .notify-select-icon {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text-muted); pointer-events: none;
}
.notify-select {
    padding: 13px 40px 13px 16px; font-size: 0.92rem; font-weight: 500;
    appearance: none; cursor: pointer;
}

.notify-form-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.notify-char-count {
    font-size: 0.76rem; font-variant-numeric: tabular-nums; color: var(--text-muted);
}
.notify-char-count--warn { color: var(--yellow); }

.stat-card-modern .stat-hint { display: block; font-size: 0.68rem; margin-top: 2px; }
.admin-info-list { display: grid; gap: 10px; margin: 0; }
.admin-info-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.84rem; }
.admin-info-list dt { color: var(--text-muted); margin: 0; }
.admin-info-list dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.admin-soon-panel { opacity: 0.92; }
.admin-soon-badge {
    display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 999px;
    font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted); background: var(--bg-elevated); border: 1px solid var(--border);
}
.admin-soon-panel .form-group input[disabled],
.admin-soon-panel .form-group select[disabled],
.admin-soon-panel .checkbox-label input[disabled] { opacity: 0.65; cursor: not-allowed; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0 20px; }
.settings-section-title { font-size: 1rem; margin-bottom: 6px; }
.settings-section-desc { font-size: 0.85rem; margin-bottom: 16px; max-width: 52ch; }
.empty-state { text-align: center; padding: 40px 24px; color: var(--text-muted); }
.empty-state p { margin-top: 12px; font-size: 0.875rem; }

/* Install */
.page-install { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; }
.install-wrap { width: 100%; max-width: 560px; }
.install-header { text-align: center; margin-bottom: 32px; }
.install-header h1 { font-size: 1.5rem; font-weight: 700; }
.install-steps { display: flex; align-items: center; justify-content: center; margin-bottom: 28px; gap: 0; flex-wrap: wrap; }
.install-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 70px; }
.install-step .step-num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; background: var(--bg-card); border: 2px solid var(--border); color: var(--text-muted); }
.install-step.active .step-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.install-step.done .step-num { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.install-step .step-label { font-size: 0.7rem; color: var(--text-muted); }
.install-step-line { width: 24px; height: 2px; background: var(--border); margin: 0 4px 16px; }
.install-step-line.done { background: var(--green); }
.install-card h2 { margin-bottom: 16px; font-size: 1.1rem; }
.install-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 100px; gap: 12px; }
.req-list { list-style: none; margin: 16px 0; }
.req-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.req-item.ok .req-icon { color: var(--green); }
.req-item.fail .req-icon { color: var(--red); }
.req-label { flex: 1; }
.temp-password { font-size: 1.1rem; color: var(--green); font-weight: 700; letter-spacing: 0.05em; }

.lang-switcher { display: flex; gap: 4px; align-items: center; }
.lang-switcher-login { justify-content: center; margin-bottom: 20px; }
.lang-btn { padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; text-decoration: none; color: var(--text-muted); border: 1px solid var(--border); background: var(--bg); }
.lang-btn:hover { color: var(--text); border-color: var(--primary); text-decoration: none; }
.lang-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* BOT AI page */
.bot-toggle-form { margin: 0; }
.bot-no-balance-alert { align-items: center; }
.bot-no-balance-alert .btn-sm { padding: 8px 16px; font-size: 0.8rem; margin-left: auto; flex-shrink: 0; }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.bot-status-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    padding: 20px 24px; margin-bottom: 20px;
    position: relative;
}
.bot-status-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--border);
    margin: 2px 0;
}
.bot-status-item--trades .bot-status-value { color: var(--text); }
.bot-status-item .stat-label { display: block; margin-bottom: 6px; }
.bot-status-value {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.95rem; font-weight: 600;
}
.bot-status-value svg { width: 16px; height: 16px; }
.bot-tiers-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
    margin-bottom: 20px;
}
.bot-tier-card {
    display: flex; flex-direction: column; gap: 16px;
    padding: 20px; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    min-height: 100%;
}
.bot-tier-card.is-active {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 25%, transparent);
}
.bot-tier-card.is-locked { opacity: 0.72; }
.bot-tier-card-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.bot-tier-card-head h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.bot-tier-card-head p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.bot-tier-badges {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.bot-tier-badges .bot-tier-badge { margin-bottom: 0; }
.bot-tier-badge {
    display: inline-block; font-size: 0.68rem; font-weight: 600;
    letter-spacing: 0.02em; padding: 3px 8px; border-radius: 999px;
    background: var(--yellow-bg); color: var(--yellow); margin-bottom: 8px;
}
.bot-tier-slots-badge {
    display: inline-block; font-size: 0.68rem; font-weight: 600;
    letter-spacing: 0.02em; padding: 3px 8px; border-radius: 999px;
    background: transparent; color: var(--purple);
    border: 1px solid color-mix(in srgb, var(--purple) 45%, var(--border));
}
.bot-tier-slots-badge.is-full {
    background: var(--red-bg); color: var(--red);
    border-color: color-mix(in srgb, var(--red) 45%, var(--border));
}
.bot-tier-slots-badge--new {
    background: var(--green-bg); color: var(--green);
    border-color: color-mix(in srgb, var(--green) 45%, var(--border));
}
.bot-tier-active-pill {
    display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 600;
    padding: 5px 10px; border-radius: 999px; background: var(--green-bg); color: var(--green);
    white-space: nowrap;
}
.bot-tier-active-pill svg { width: 14px; height: 14px; }
.bot-tier-lock { color: var(--text-muted); }
.bot-tier-lock svg { width: 18px; height: 18px; }
.bot-tier-stats {
    list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px;
    flex: 1;
}
.bot-tier-stats li span {
    display: block; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 2px;
}
.bot-tier-stats li strong { font-size: 0.85rem; font-weight: 600; }
.bot-tier-stat-subscription {
    grid-column: 1 / -1;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--primary) 8%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
}
.bot-tier-stat-subscription span { color: var(--primary); }
.bot-tier-stat-subscription strong { font-size: 0.9rem; }
.bot-tier-form { margin-top: auto; }
.btn-block { width: 100%; justify-content: center; }
.bot-tier-locked-msg {
    display: flex; align-items: center; gap: 8px; margin-top: auto;
    padding: 12px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px dashed var(--border);
    font-size: 0.78rem; color: var(--text-muted);
}
.bot-tier-locked-msg svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--yellow); }
.bot-tier-purchase-hint {
    margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.45;
}
.bot-tier-purchase-hint .link { display: inline-block; margin-top: 4px; }
select {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg); color: var(--text);
    font-size: 0.875rem;
}
@media (max-width: 960px) {
    .bot-status-bar { grid-template-columns: repeat(2, 1fr); }
    .bot-tiers-grid { grid-template-columns: 1fr; }
}

/* Poradnik */
.page-guide .guide-hero {
    display: flex; gap: 20px; align-items: flex-start; padding: 28px 24px; margin-bottom: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--bg-card)), var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
}
.guide-hero-icon {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary);
}
.guide-hero-icon svg { width: 26px; height: 26px; }
.guide-hero h1 { font-size: 1.35rem; margin-bottom: 8px; }
.guide-hero-lead { color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; max-width: 720px; }
.guide-section { padding: 24px; margin-bottom: 16px; }
.guide-section h2 {
    display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin-bottom: 16px;
}
.guide-section .section-icon { width: 18px; height: 18px; color: var(--primary); }
.guide-prose { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; margin-bottom: 16px; }
.guide-tech-row {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
    margin-bottom: 20px;
}
.guide-tech-item {
    padding: 16px; border-radius: var(--radius-sm); background: var(--bg);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
}
.guide-tech-item h3 { font-size: 0.88rem; margin-bottom: 6px; color: var(--primary); }
.guide-tech-item p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.guide-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.guide-step {
    display: flex; gap: 16px; padding: 16px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border);
}
.guide-step-num {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; background: var(--primary); color: #fff;
}
.guide-step h3 { font-size: 0.92rem; margin-bottom: 6px; }
.guide-step p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }
.guide-feature-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.guide-feature {
    padding: 16px; border-radius: var(--radius-sm); background: var(--bg);
    border: 1px solid var(--border);
}
.guide-feature-icon {
    width: 36px; height: 36px; border-radius: 10px; margin-bottom: 10px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary);
}
.guide-feature-icon svg { width: 18px; height: 18px; }
.guide-feature h3 { font-size: 0.88rem; margin-bottom: 6px; }
.guide-feature p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.guide-strategy-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.guide-strategy {
    padding: 16px; border-radius: var(--radius-sm); background: var(--bg);
    border: 1px solid var(--border); min-height: 100%;
}
.guide-strategy-head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
    color: var(--primary);
}
.guide-strategy-head svg { width: 20px; height: 20px; }
.guide-strategy-tag {
    font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-muted); background: var(--bg-card); padding: 3px 7px; border-radius: 999px;
    border: 1px solid var(--border);
}
.guide-strategy h3 { font-size: 0.85rem; margin-bottom: 6px; }
.guide-strategy p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.guide-tiers-table-wrap { overflow-x: auto; }
.guide-tiers-table { font-size: 0.85rem; }
.guide-pricing-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px;
}
.guide-pricing-grid--tiers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.guide-pricing-card {
    padding: 18px; border-radius: var(--radius-sm); background: var(--bg);
    border: 1px solid var(--border);
}
.guide-pricing-icon {
    width: 36px; height: 36px; border-radius: 10px; margin-bottom: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--green-bg); color: var(--green);
}
.guide-pricing-icon--premium {
    background: var(--purple-bg); color: var(--purple);
}
.guide-pricing-icon--pro {
    background: linear-gradient(135deg, var(--purple-bg), color-mix(in srgb, var(--primary) 15%, transparent));
    color: var(--purple);
    border: 1px solid color-mix(in srgb, var(--purple) 30%, var(--border));
    box-shadow: 0 0 12px color-mix(in srgb, var(--purple) 20%, transparent);
}
.guide-pricing-icon svg { width: 18px; height: 18px; }
.guide-pricing-card h3 { font-size: 0.9rem; margin-bottom: 8px; }
.guide-pricing-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }
.guide-pricing-note {
    padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 12px;
    background: color-mix(in srgb, var(--primary) 6%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
}
.guide-pricing-note strong { display: block; font-size: 0.85rem; margin-bottom: 6px; }
.guide-pricing-note p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; margin: 0; }
.guide-pricing-foot { margin-bottom: 0; font-size: 0.8rem; }
.guide-tiers-footnote { margin-top: 12px; margin-bottom: 0; font-size: 0.8rem; }
.guide-session-card {
    display: flex; gap: 20px; align-items: flex-start;
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-card));
}
.guide-session-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary) 15%, transparent); color: var(--primary);
}
.guide-session-icon svg { width: 22px; height: 22px; }
.guide-session-card h2 { font-size: 1rem; margin-bottom: 8px; }
.guide-checklist { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.guide-checklist li {
    display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted);
}
.guide-checklist svg { width: 16px; height: 16px; flex-shrink: 0; }
.guide-checklist li:has(svg:first-child) svg { color: var(--green); }
.guide-checklist li:nth-child(n+3) svg { color: var(--red); }
.guide-cta {
    display: flex; align-items: center; gap: 16px; padding: 20px 24px; flex-wrap: wrap;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
}
.guide-cta > svg { width: 28px; height: 28px; color: var(--primary); flex-shrink: 0; }
.guide-cta strong { display: block; margin-bottom: 4px; }
.guide-cta p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.guide-cta .btn { margin-left: auto; }
.bot-guide-teaser {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
    padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius-sm);
    font-size: 0.82rem; color: var(--text-muted);
    background: color-mix(in srgb, var(--primary) 8%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
}
.bot-guide-teaser svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }
.bot-guide-teaser .link { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; white-space: nowrap; }
@media (max-width: 960px) {
    .guide-feature-grid, .guide-strategy-grid, .guide-pricing-grid, .guide-pricing-grid--tiers, .guide-tech-row { grid-template-columns: 1fr; }
    .guide-cta .btn { margin-left: 0; width: 100%; }
    .bot-guide-teaser .link { margin-left: 0; }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-hero { flex-direction: column; align-items: flex-start; }
}

/* Profil */
.page-profile .profile-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    flex-wrap: wrap; padding: 24px; margin-bottom: 16px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--bg-card)), var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
}
.profile-hero-main { display: flex; align-items: center; gap: 20px; min-width: 0; }
.profile-avatar {
    width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--avatar-color), color-mix(in srgb, var(--avatar-color) 70%, #000));
    color: #fff; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--avatar-color) 35%, transparent);
}
.profile-avatar-lg { width: 72px; height: 72px; border-radius: 20px; font-size: 1.25rem; }
.profile-avatar--photo { overflow: hidden; background: var(--bg-elevated); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.profile-avatar--photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.profile-hero-body h2 { font-size: 1.35rem; margin-bottom: 4px; }
.profile-hero-name { color: var(--text); font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.profile-hero-email { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 10px; }
.profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.profile-upload-input { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.profile-upload-btn { position: relative; cursor: pointer; }
.profile-account-form .form-group { margin-bottom: 14px; }
.profile-account-form .profile-name-grid { margin-bottom: 14px; }
.profile-account-form .form-note { margin: 2px 0 16px; line-height: 1.45; }
.profile-name-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) {
    .profile-name-grid { grid-template-columns: 1fr; }
    .profile-avatar-actions { width: 100%; }
    .profile-plan-bar-meta { margin-left: 0; width: 100%; }
}
.profile-hero-meta {
    display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.78rem; color: var(--text-muted);
}
.profile-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.profile-account-links { padding: 0; overflow: hidden; grid-column: 1 / -1; display: none; }
.profile-link-list { display: flex; flex-direction: column; }
.profile-link-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; color: var(--text); font-weight: 500; font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.profile-link-item:last-child { border-bottom: 0; }
.profile-link-item .icon svg { width: 18px; height: 18px; color: var(--text-muted); }
.profile-link-item--logout { color: var(--red); }
.profile-link-item--logout .icon svg { color: var(--red); }
.profile-plan-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px 16px;
    flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 6%, var(--bg-card)), var(--bg-card));
    border-color: color-mix(in srgb, var(--primary) 14%, var(--border));
}
.profile-plan-bar-main {
    display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 0;
}
.profile-plan-bar-main > .icon {
    width: 18px; height: 18px; flex-shrink: 0;
    color: color-mix(in srgb, var(--primary) 80%, #fff);
}
.profile-plan-title { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.profile-plan-label {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted); flex-shrink: 0;
}
.profile-plan-bar-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto;
}
.profile-form-card { padding: 18px 20px; }
.profile-plan-tier {
    font-size: 0.95rem; font-weight: 700; line-height: 1.2;
    color: color-mix(in srgb, var(--primary) 85%, #fff);
}
.profile-plan-badge {
    flex-shrink: 0; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 3px 8px; border-radius: 999px; line-height: 1.2;
}
.profile-plan-badge--active {
    background: color-mix(in srgb, var(--green) 16%, transparent);
    color: var(--green);
    border: 1px solid color-mix(in srgb, var(--green) 32%, transparent);
}
.profile-plan-badge--free {
    background: color-mix(in srgb, var(--text-muted) 10%, transparent);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.profile-plan-badge--expired {
    background: color-mix(in srgb, var(--red, #ef4444) 14%, transparent);
    color: var(--red, #ef4444);
    border: 1px solid color-mix(in srgb, var(--red, #ef4444) 30%, transparent);
}
.profile-plan-stat {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 8px; border-radius: 8px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    font-size: 0.74rem; font-weight: 600; color: var(--text); line-height: 1.2;
}
.profile-plan-stat .icon { width: 13px; height: 13px; color: var(--text-muted); flex-shrink: 0; }
.profile-plan-stat--muted { color: var(--text-muted); font-weight: 500; }
.profile-plan-stat--warn { color: var(--red, #ef4444); border-color: color-mix(in srgb, var(--red, #ef4444) 25%, var(--border)); }
.profile-plan-cta { flex-shrink: 0; margin-left: 2px; }
.profile-form-card h3 {
    display: flex; align-items: center; gap: 8px; font-size: 0.95rem; margin-bottom: 16px;
}
.profile-details { display: grid; gap: 12px; margin-bottom: 16px; }
.profile-details dt { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 3px; }
.profile-details dd { font-size: 0.88rem; font-weight: 600; margin: 0; line-height: 1.4; }
.profile-form-card .form-note { margin-bottom: 12px; }

/* Konkursy / nagrody */
body.page-rewards .app-main > .container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-content: start;
}
body.page-rewards .dash-header {
    grid-column: 1 / -1;
}
.page-rewards .rewards-section {
    padding: 24px;
    margin-bottom: 0;
    height: 100%;
}
.rewards-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.rewards-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
}
.rewards-section .section-icon svg { color: var(--primary); }
.rewards-period {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}
.rewards-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
    max-width: 62ch;
}
.rewards-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}
.rewards-countdown-wrap {
    flex: 1 1 300px;
    min-width: 0;
}
.rewards-countdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.countdown-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.countdown-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.countdown-head-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--primary) 12%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    color: var(--primary);
}
.countdown-head-icon svg {
    width: 14px;
    height: 14px;
}
.countdown-head-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.countdown-timer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    overflow: hidden;
}
.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    padding: 8px 6px;
    border-right: 1px solid var(--border);
}
.countdown-unit:last-child {
    border-right: none;
}
.countdown-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--text);
    transition: color 0.2s ease, transform 0.2s ease;
}
.countdown-value.is-tick {
    color: #818cf8;
    transform: translateY(-1px);
}
.countdown-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.countdown-ended {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}
.countdown-ended.is-hidden,
.countdown-timer.is-hidden,
.countdown-shell.is-hidden {
    display: none;
}
.rewards-meta-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.rewards-prize-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.rewards-prize-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 0.82rem;
}
.rewards-prize-item--1 { border-color: rgba(251, 191, 36, 0.35); }
.rewards-prize-item--2 { border-color: rgba(203, 213, 225, 0.35); }
.rewards-prize-item--3 { border-color: rgba(217, 119, 6, 0.35); }
.rewards-prize-place {
    font-weight: 700;
    color: var(--text-muted);
}
.rewards-prize-amount {
    font-weight: 700;
    color: var(--text);
}
.rewards-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 20px 0 8px;
    text-align: center;
}
.rewards-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    padding-top: 8px;
}
.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    min-width: 0;
}
.podium-place--1 { order: 2; }
.podium-place--2 { order: 1; }
.podium-place--3 { order: 3; }
.podium-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
}
.podium-medal svg { width: 16px; height: 16px; }
.podium-place--1 .podium-rank-badge { color: #fbbf24; }
.podium-place--2 .podium-rank-badge { color: #cbd5e1; }
.podium-place--3 .podium-rank-badge { color: #d97706; }
.podium-avatar { margin-top: 2px; }
.podium-name {
    font-size: 0.92rem;
    font-weight: 700;
    word-break: break-word;
    max-width: 100%;
}
.podium-name--empty { color: var(--text-muted); font-weight: 500; }
.podium-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    border: 1px dashed var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
}
.podium-stats {
    display: grid;
    gap: 8px;
    width: 100%;
}
.podium-stats dt {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.podium-stats dd {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}
.podium-prize { color: #fbbf24; }
.podium-block {
    width: 100%;
    margin-top: 4px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 18%, var(--bg-card)), var(--bg-elevated));
    border: 1px solid var(--border);
    border-bottom: none;
}
.podium-place--1 .podium-block { height: 96px; }
.podium-place--2 .podium-block { height: 72px; }
.podium-place--3 .podium-block { height: 56px; }
.podium-place--1 .podium-block {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.18), var(--bg-elevated));
    border-color: rgba(251, 191, 36, 0.25);
}
.podium-place--2 .podium-block {
    background: linear-gradient(180deg, rgba(203, 213, 225, 0.12), var(--bg-elevated));
    border-color: rgba(203, 213, 225, 0.18);
}
.podium-place--3 .podium-block {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.14), var(--bg-elevated));
    border-color: rgba(217, 119, 6, 0.22);
}
.podium-place--empty { opacity: 0.65; }
.rewards-leaderboard {
    list-style: none;
    display: grid;
    gap: 8px;
}
.rewards-leaderboard-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}
.rewards-leaderboard-row--prize {
    border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-elevated));
}
.rewards-leaderboard-row--1 {
    border-color: rgba(251, 191, 36, 0.28);
    background: rgba(251, 191, 36, 0.06);
}
.rewards-leaderboard-row--2 {
    border-color: rgba(203, 213, 225, 0.2);
    background: rgba(203, 213, 225, 0.05);
}
.rewards-leaderboard-row--3 {
    border-color: rgba(217, 119, 6, 0.22);
    background: rgba(217, 119, 6, 0.06);
}
.rewards-rank {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 36px;
    font-weight: 700;
    font-size: 0.9rem;
}
.rewards-rank-medal svg { width: 16px; height: 16px; }
.rewards-rank-medal--1 { color: #fbbf24; }
.rewards-rank-medal--2 { color: #cbd5e1; }
.rewards-rank-medal--3 { color: #d97706; }
.rewards-avatar { width: 40px; height: 40px; border-radius: 12px; font-size: 0.8rem; }
.rewards-leaderboard-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rewards-leaderboard-name {
    font-weight: 600;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rewards-leaderboard-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.rewards-leaderboard-prize {
    font-weight: 700;
    font-size: 0.88rem;
    color: #fbbf24;
    white-space: nowrap;
}
@media (max-width: 1024px) {
    body.page-rewards .app-main > .container {
        grid-template-columns: 1fr;
    }
    .page-rewards .rewards-section {
        margin-bottom: 0;
    }
}
@media (max-width: 720px) {
    .rewards-podium {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .podium-place--1,
    .podium-place--2,
    .podium-place--3 { order: unset; }
    .podium-block { display: none; }
    .podium-place {
        flex-direction: row;
        text-align: left;
        padding: 14px;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background: var(--bg-elevated);
    }
    .podium-stats { width: auto; margin-left: auto; text-align: right; }
    .rewards-leaderboard-row {
        grid-template-columns: auto auto 1fr;
    }
    .rewards-leaderboard-prize {
        grid-column: 2 / -1;
        justify-self: end;
        margin-top: -4px;
    }
    .countdown-unit { min-height: 52px; padding: 7px 4px; }
    .countdown-value { font-size: 1.05rem; }
}

/* Powiadomienia */
.page-notifications .notifications-list {
    display: grid;
    gap: 12px;
}
.notification-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 18px 20px;
    align-items: flex-start;
}
.notification-item--unread {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-card));
}
.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 12%, var(--bg));
    color: var(--primary);
}
.notification-icon svg { width: 20px; height: 20px; }
.notification-item--contest_reward .notification-icon {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}
.notification-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.notification-message {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 8px;
}
.notification-time { font-size: 0.78rem; }
