/* ═══════════════════════════════════════════════════════════
   HALL CHAT — iOS Dark Theme
   Warm Dark · Vibrant Accents · Premium Feel
   ═══════════════════════════════════════════════════════════ */

:root {
    --tg-safe-top: 0px;
    --tg-safe-bottom: 0px;
    --bg-primary: #000000;
    --bg-secondary: #0c0c0e;
    --bg-card: #18181b;
    --bg-hover: #242428;
    --bg-input: #1c1c1e;
    --bg-elevated: #2c2c2e;

    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;

    --accent-blue: #0a84ff;
    --accent-green: #30d158;
    --accent-orange: #ff9f0a;
    --accent-red: #ff453a;
    --accent-purple: #bf5af2;
    --accent-teal: #64d2ff;
    --accent-pink: #ff375f;
    --accent-yellow: #ffd60a;

    --separator: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(10, 132, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow-x: hidden; overscroll-behavior: none; }
html { overflow: hidden; }
body { overflow-y: auto; }

body {
    font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', 'Inter', BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════ CANVAS GRID — handled by JS ═══════════ */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(10, 132, 255, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(191, 90, 242, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(48, 209, 88, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* ═══════════ SPLASH / LOADING SCREEN (Sparser style) ═══════════ */
.splash-screen {
    position: fixed;
    inset: 0;
    background: #07080C;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99998;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s;
    visibility: visible;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Triple ring loader */
.ld-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.ld-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.04);
    border-top-color: rgba(255, 255, 255, 0.25);
    animation: ldSpin 1.1s linear infinite;
}

.ld-ring2 {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    animation: ldSpin 1.7s linear infinite reverse;
}

.ld-ring3 {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-left-color: rgba(255, 255, 255, 0.08);
    animation: ldSpin 2.3s linear infinite;
}

.ld-s {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', system-ui, sans-serif;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.06);
    animation: ldBreath 2.5s ease-in-out infinite;
}

.ld-shimmer {
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    animation: ldBreath 2.5s ease-in-out infinite;
}

.ld-bar {
    width: 40px;
    height: 2px;
    border-radius: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.ld-bar-fill {
    width: 40%;
    height: 100%;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.2);
    animation: ldSlide 1.2s ease-in-out infinite;
}

@keyframes ldSpin { to { transform: rotate(360deg); } }
@keyframes ldBreath { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.5; } }
@keyframes ldSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* ═══════════ SKELETON LOADING ═══════════ */
.skeleton {
    background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 60%; }

.skeleton-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.skeleton-card {
    height: 80px;
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}

.skeleton-stat {
    height: 76px;
    border-radius: var(--radius-lg);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════ LAYOUT ═══════════ */
.app {
    min-height: 100vh;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 16px 130px;
    opacity: 0;
    transition: opacity 0.4s ease;
    position: relative;
    z-index: 1;
}

.app.visible { opacity: 1; }

#loginScreen { position: relative; z-index: 1; }

/* ═══════════ HEADER ═══════════ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    padding-top: calc(8px + var(--tg-safe-top));
    position: sticky;
    top: 0;
    background: rgba(10, 10, 14, 0.92);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-radius: 0 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 100;
}

.header-logo {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.5px;
}

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

.header-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.header-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.header-btn:active {
    transform: scale(0.92);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 5px 14px 5px 5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-pill:hover { background: var(--bg-hover); }
.user-pill:active { transform: scale(0.97); }

.user-pill .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3a3a3c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #e5e5ea;
}

.user-pill .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════ LOGIN SCREEN ═══════════ */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 24px;
    text-align: center;
}

.login-icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: #1c1c1e;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-icon .material-icons {
    font-size: 42px;
    color: #e5e5ea;
}

.login-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 300px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.input-group {
    position: relative;
}

.input-group .material-icons {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
}

.input-field {
    width: 100%;
    padding: 15px 14px 15px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.input-field:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-hover);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    max-width: 100%;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #0060df);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.45);
    filter: brightness(1.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #1a9e42);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(48, 209, 88, 0.25);
}

.btn-success:hover {
    box-shadow: 0 4px 20px rgba(48, 209, 88, 0.4);
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #c0392b);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 69, 58, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 4px 20px rgba(255, 69, 58, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-sm:not(.admin-payout-actions .btn-sm) {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-block { width: 100%; }

.login-error {
    color: #ff453a;
    font-size: 13px;
    display: none;
}

/* ═══════════ MAIN CONTENT — pages ═══════════ */
.page { display: none; }
.page.active { display: block; animation: pageIn 0.35s ease; }

@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════ CARDS ═══════════ */
.card {
    background: rgba(24, 24, 27, 0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: background 0.2s ease, border-color 0.2s;
}

.card:hover {
    background: rgba(36, 36, 40, 0.75);
    border-color: rgba(255, 255, 255, 0.11);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.card-title .material-icons {
    font-size: 20px;
    color: var(--accent-teal);
}

/* ═══════════ STAT CARDS ═══════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.stat-card.sc-green  { background: rgba(48, 209, 88, 0.10); border-color: rgba(48,209,88,0.2); }
.stat-card.sc-green .stat-value { color: #30d158; }

.stat-card.sc-blue   { background: rgba(10, 132, 255, 0.10); border-color: rgba(10,132,255,0.2); }
.stat-card.sc-blue .stat-value { color: #0a84ff; }

.stat-card.sc-orange { background: rgba(255, 159, 10, 0.10); border-color: rgba(255,159,10,0.2); }
.stat-card.sc-orange .stat-value { color: #ff9f0a; }

.stat-card.sc-pink   { background: rgba(255, 55, 95, 0.10); border-color: rgba(255,55,95,0.2); }
.stat-card.sc-pink .stat-value { color: #ff375f; }

.stat-card.sc-purple { background: rgba(191, 90, 242, 0.10); border-color: rgba(191,90,242,0.2); }
.stat-card.sc-purple .stat-value { color: #bf5af2; }

.stat-card.sc-red    { background: rgba(255, 69, 58, 0.10); border-color: rgba(255,69,58,0.2); }
.stat-card.sc-red .stat-value { color: #ff453a; }

.stat-card.sc-teal   { background: rgba(90, 200, 250, 0.10); border-color: rgba(90,200,250,0.2); }
.stat-card.sc-teal .stat-value { color: #5ac8fa; }

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
}

.stat-value.gold,
.stat-value.green,
.stat-value.purple {
    color: #ffffff;
    -webkit-text-fill-color: unset;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ═══════════ PROFILE ═══════════ */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 0;
}

.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #3a3a3c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: #e5e5ea;
    border: 2px solid rgba(255, 255, 255, 0.08);
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.profile-username {
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge-gifts {
    background: rgba(255, 55, 95, 0.15);
    color: #ff375f;
    border: none;
}

.badge-id {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.1);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.3px;
}

.badge-pending {
    background: linear-gradient(135deg, #ff9f0a, #e08800);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 159, 10, 0.3);
}

.badge-rejected {
    background: linear-gradient(135deg, #ff453a, #c0392b);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 69, 58, 0.3);
}

/* ═══════════ RANK CARD ═══════════ */
.rank-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    background: var(--bg-card);
}

.rank-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.rank-icon {
    font-size: 28px;
    line-height: 1;
}

.rank-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.rank-lvl {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.rank-progress-wrap {
    flex: 1;
    min-width: 0;
}

.rank-progress-bar {
    height: 5px;
    border-radius: 99px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-bottom: 5px;
}

.rank-progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease;
}

.rank-progress-label {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rank modal list */
.rank-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-modal-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s;
}

.rank-modal-current {
    border-width: 1.5px;
}

.rank-modal-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.rank-modal-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rank-modal-name {
    font-size: 14px;
    font-weight: 700;
}

.rank-modal-limit {
    font-size: 12px;
    color: var(--text-muted);
}

.rank-modal-lvl {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Цвета уровней */
.rank-0 { border-color: rgba(110,110,115,0.25); }
.rank-0 .rank-progress-fill { background: #6e6e73; }
.rank-0 .rank-name, .rank-0 .rank-modal-name { color: #a1a1a6; }
.rank-0 .rank-icon, .rank-0 .rank-modal-icon { color: #a1a1a6; }

.rank-1 { border-color: rgba(48,209,88,0.25); }
.rank-1 .rank-progress-fill { background: linear-gradient(90deg, #30d158, #25a244); }
.rank-1 .rank-name, .rank-1 .rank-modal-name { color: #30d158; }
.rank-1 .rank-icon, .rank-1 .rank-modal-icon { color: #30d158; }
.rank-1.rank-modal-current { border-color: rgba(48,209,88,0.5); background: rgba(48,209,88,0.05); }

.rank-2 { border-color: rgba(255,159,10,0.25); }
.rank-2 .rank-progress-fill { background: linear-gradient(90deg, #ff9f0a, #e08800); }
.rank-2 .rank-name, .rank-2 .rank-modal-name { color: #ff9f0a; }
.rank-2 .rank-icon, .rank-2 .rank-modal-icon { color: #ff9f0a; }
.rank-2.rank-modal-current { border-color: rgba(255,159,10,0.5); background: rgba(255,159,10,0.05); }

.rank-3 { border-color: rgba(10,132,255,0.25); }
.rank-3 .rank-progress-fill { background: linear-gradient(90deg, #0a84ff, #0060cc); }
.rank-3 .rank-name, .rank-3 .rank-modal-name { color: #0a84ff; }
.rank-3 .rank-icon, .rank-3 .rank-modal-icon { color: #0a84ff; }
.rank-3.rank-modal-current { border-color: rgba(10,132,255,0.5); background: rgba(10,132,255,0.05); }

.rank-4 { border-color: rgba(191,90,242,0.25); }
.rank-4 .rank-progress-fill { background: linear-gradient(90deg, #bf5af2, #9b3dd4); }
.rank-4 .rank-name, .rank-4 .rank-modal-name { color: #bf5af2; }
.rank-4 .rank-icon, .rank-4 .rank-modal-icon { color: #bf5af2; }
.rank-4.rank-modal-current { border-color: rgba(191,90,242,0.5); background: rgba(191,90,242,0.05); }

.rank-5 { border-color: rgba(255,214,10,0.35); background: rgba(255,214,10,0.04); }
.rank-5 .rank-progress-fill { background: linear-gradient(90deg, #ffd60a, #ffaa00); }
.rank-5 .rank-name, .rank-5 .rank-modal-name { color: #ffd60a; }
.rank-5 .rank-icon, .rank-5 .rank-modal-icon { color: #ffd60a; filter: drop-shadow(0 0 6px rgba(255,214,10,0.5)); }
.rank-5.rank-modal-current { border-color: rgba(255,214,10,0.5); background: rgba(255,214,10,0.05); }

/* ═══════════ CHART ═══════════ */
.chart-container {
    background: rgba(24, 24, 27, 0.4);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-radius: var(--radius-lg);
    padding: 16px 16px 12px;
    margin-bottom: 12px;
    height: 210px;
    border: 1px solid rgba(255,255,255,0.08);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 150px;
    padding: 20px 4px 0;
}

.chart-bar {
    flex: 1;
    max-width: 36px;
    min-height: 18px;
    background: linear-gradient(180deg, #0a84ff 0%, #0060c7 60%, rgba(0,96,223,0.4) 100%);
    border-radius: 8px 8px 2px 2px;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-shadow: 0 0 10px rgba(10, 132, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.chart-bar.payout-bar {
    background: linear-gradient(180deg, #30d158 0%, #1a9e42 60%, rgba(26,158,66,0.4) 100%);
    box-shadow: 0 0 10px rgba(48, 209, 88, 0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.bar-value {
    position: absolute;
    top: -18px;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.chart-labels {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.chart-labels span {
    flex: 1;
    max-width: 36px;
    text-align: center;
    font-size: 9px;
    color: var(--text-muted);
}

/* ═══════════ TOP WORKERS ═══════════ */
.top-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── PODIUM ── */
.podium-wrapper {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255,214,10,0.04) 0%, rgba(191,90,242,0.03) 50%, var(--bg-card) 100%);
    border: 1px solid rgba(255, 214, 10, 0.1);
    padding: 20px 10px 0;
}

.confetti-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiFall linear infinite;
    opacity: 0;
}

@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.8; }
    100% { transform: translateY(320px) rotate(720deg); opacity: 0; }
}

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding: 0 4px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 130px;
    animation: podiumRise 0.6s ease-out backwards;
}

.podium-place:nth-child(1) { animation-delay: 0.3s; }
.podium-place:nth-child(2) { animation-delay: 0.1s; }
.podium-place:nth-child(3) { animation-delay: 0.5s; }

@keyframes podiumRise {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.podium-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 6px;
    position: relative;
    z-index: 2;
}

.podium-place.first .podium-avatar {
    width: 60px;
    height: 60px;
    font-size: 22px;
    background: linear-gradient(135deg, #ffd60a, #ff9f0a);
    color: #000;
    box-shadow: 0 0 24px rgba(255, 214, 10, 0.35), 0 4px 12px rgba(0,0,0,0.3);
    border: 2px solid rgba(255, 214, 10, 0.5);
}

.podium-place.second .podium-avatar {
    background: linear-gradient(135deg, #c0c0c8, #8e8e93);
    color: #000;
    box-shadow: 0 0 16px rgba(192, 192, 200, 0.2), 0 4px 12px rgba(0,0,0,0.3);
    border: 2px solid rgba(192, 192, 200, 0.3);
}

.podium-place.third .podium-avatar {
    background: linear-gradient(135deg, #d28246, #a65c2a);
    color: #000;
    box-shadow: 0 0 16px rgba(210, 130, 70, 0.2), 0 4px 12px rgba(0,0,0,0.3);
    border: 2px solid rgba(210, 130, 70, 0.3);
}

.podium-crown {
    position: absolute;
    top: -16px;
    font-size: 18px;
    animation: crownFloat 2s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.podium-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.podium-profit {
    font-size: 13px;
    font-weight: 800;
    margin-top: 2px;
    margin-bottom: 8px;
}

.podium-place.first .podium-profit { color: #ffd60a; }
.podium-place.second .podium-profit { color: #c0c0c8; }
.podium-place.third .podium-profit { color: #d28246; }

.podium-bar {
    width: 100%;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    font-size: 24px;
    font-weight: 900;
    z-index: 1;
}

.podium-place.first .podium-bar {
    height: 90px;
    background: linear-gradient(180deg, rgba(255,214,10,0.25), rgba(255,159,10,0.08));
    color: #ffd60a;
    border: 1px solid rgba(255, 214, 10, 0.2);
    border-bottom: none;
}

.podium-place.second .podium-bar {
    height: 65px;
    background: linear-gradient(180deg, rgba(192,192,200,0.18), rgba(142,142,147,0.05));
    color: #c0c0c8;
    border: 1px solid rgba(192, 192, 200, 0.15);
    border-bottom: none;
}

.podium-place.third .podium-bar {
    height: 50px;
    background: linear-gradient(180deg, rgba(210,130,70,0.18), rgba(166,92,42,0.05));
    color: #d28246;
    border: 1px solid rgba(210, 130, 70, 0.15);
    border-bottom: none;
}

/* ── rest of top list ── */
.top-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(24,24,27,0.4);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.2s;
}

.top-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.top-item:hover { background: var(--bg-hover); }
.top-item:active { transform: scale(0.98); }

.top-rank {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.top-rank.gold { background: rgba(255, 214, 10, 0.18); color: #ffd60a; }
.top-rank.silver { background: rgba(192, 192, 200, 0.18); color: #c0c0c8; }
.top-rank.bronze { background: rgba(210, 130, 70, 0.18); color: #d28246; }
.top-rank.normal { background: var(--bg-hover); color: var(--text-muted); }

.top-info { flex: 1; min-width: 0; }
.top-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-payouts { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.top-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-green);
    white-space: nowrap;
}

/* ═══════════ TOOLS ═══════════ */
.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--separator);
}

.tool-card:hover { background: var(--bg-hover); }
.tool-card:active { transform: scale(0.98); }

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon .material-icons { font-size: 22px; }
.tool-icon.blue { background: rgba(10, 132, 255, 0.15); color: #0a84ff; }
.tool-icon.blue .material-icons { color: #0a84ff; }
.tool-icon.purple { background: rgba(191, 90, 242, 0.15); color: #bf5af2; }
.tool-icon.purple .material-icons { color: #bf5af2; }
.tool-icon.green { background: rgba(48, 209, 88, 0.15); color: #30d158; }
.tool-icon.green .material-icons { color: #30d158; }
.tool-icon.orange { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
.tool-icon.orange .material-icons { color: #ff9f0a; }
.tool-icon.red { background: rgba(255, 69, 58, 0.15); color: #ff453a; }
.tool-icon.red .material-icons { color: #ff453a; }
.tool-icon.teal { background: rgba(100, 210, 255, 0.15); color: #64d2ff; }
.tool-icon.teal .material-icons { color: #64d2ff; }

.tool-card-info { flex: 1; }
.tool-card-name { font-size: 15px; font-weight: 600; }
.tool-card-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ═══════════ PAYOUT FORM ═══════════ */
.payout-types {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.payout-type-btn {
    flex: 1;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.payout-type-btn.active {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: var(--bg-hover);
}

.payout-type-btn:hover:not(.active) {
    background: var(--bg-hover);
}

.payout-type-btn:active {
    transform: scale(0.97);
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--bg-hover);
}

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ═══════════ WALLET SAVED ═══════════ */
.wallet-saved {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 132, 255, 0.08);
    border: 1px solid rgba(10, 132, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.wallet-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-short {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Menlo', monospace;
    letter-spacing: 0.5px;
}

.wallet-edit-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-edit-btn:hover {
    background: rgba(255,255,255,0.14);
    color: var(--text-primary);
}

/* ═══════════ PAYOUTS LIST ═══════════ */

/* Individual payout card */
.po-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--separator);
    margin-bottom: 10px;
    overflow: hidden;
}

.po-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
}

.po-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.po-card-icon.pending  { background: rgba(255,159,10,0.12); }
.po-card-icon.approved { background: rgba(48,209,88,0.12); }
.po-card-icon.rejected { background: rgba(255,69,58,0.12); }

.po-card-main {
    flex: 1;
    min-width: 0;
}
.po-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.po-card-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.po-card-amount {
    font-size: 16px;
    font-weight: 700;
    color: #30d158;
    flex-shrink: 0;
    white-space: nowrap;
}

.po-card-rows {
    padding: 0 16px 6px;
}
.po-card-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.po-card-row .material-icons {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 1px;
    flex-shrink: 0;
}
.po-card-val {
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    line-height: 1.4;
}

.po-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 12px;
    border-top: 1px solid var(--separator);
}
.po-card-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}
.po-card-status .material-icons { font-size: 14px; }
.po-card-status.pending  { color: #ff9f0a; }
.po-card-status.approved { color: #30d158; }
.po-card-status.rejected { color: #ff453a; }

.po-card-id {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Admin pending payout card */
.po-admin-card {
    background: rgba(24,24,27,0.4);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
    margin-bottom: 10px;
}
.po-admin-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 10px;
}
.po-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.po-ton-addr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 10px;
    padding: 10px 12px;
    background: rgba(10,132,255,0.07);
    border: 1px solid rgba(10,132,255,0.18);
    border-radius: var(--radius-sm);
}
.po-ton-addr .material-icons { font-size: 16px; color: #0a84ff; flex-shrink: 0; }
.po-ton-text {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
    font-family: 'SF Mono','Fira Code',monospace;
    line-height: 1.4;
}
.po-copy-btn {
    background: rgba(10,132,255,0.12);
    border: none;
    border-radius: 8px;
    color: #0a84ff;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.po-copy-btn:hover { background: rgba(10,132,255,0.22); }
.po-copy-btn:active { transform: scale(0.9); }
.po-copy-btn .material-icons { font-size: 16px; }
.po-admin-details {
    padding: 0 16px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.po-admin-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    padding: 4px 8px;
    border-radius: 6px;
}
.po-admin-tag .material-icons { font-size: 12px; }
.po-admin-link {
    font-size: 12px;
    color: var(--text-secondary);
    word-break: break-all;
    padding: 0 16px 10px;
    line-height: 1.4;
}

.admin-payout-actions {
    display: flex;
    gap: 8px;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--separator);
    align-items: center;
}
.admin-payout-actions input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}
.admin-payout-actions input:focus {
    border-color: var(--accent-blue);
    outline: none;
}
.act-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.act-btn:active { transform: scale(0.92); }
.act-btn.approve { background: rgba(48,209,88,0.15); color: #30d158; }
.act-btn.reject  { background: rgba(255,69,58,0.15); color: #ff453a; }

/* iOS list style (legacy) */
.payout-list {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--separator);
    overflow: hidden;
}
.po {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--separator);
}
.po:last-child { border-bottom: none; }
.po-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.po-icon.pending  { background: rgba(255,159,10,0.1); }
.po-icon.approved { background: rgba(48,209,88,0.1); }
.po-icon.rejected { background: rgba(255,69,58,0.1); }
.po-info { flex: 1; min-width: 0; }
.po-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.po-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-right { text-align: right; flex-shrink: 0; }
.po-status { font-size: 12px; font-weight: 600; }
.po-status.pending  { color: #ff9f0a; }
.po-status.approved { color: #30d158; }
.po-status.rejected { color: #ff453a; }
.po-date { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.po-amount { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }

/* Legacy compat */
.payout-status {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.payout-status.pending  { background: rgba(255,159,10,0.12); color: #ff9f0a; }
.payout-status.approved { background: rgba(48,209,88,0.12);  color: #30d158; }
.payout-status.rejected { background: rgba(255,69,58,0.12);  color: #ff453a; }

/* ═══════════ REFERRAL ═══════════ */
.ref-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 12px 0;
}

.ref-link-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    font-weight: 500;
}

.ref-copy-btn {
    background: linear-gradient(135deg, var(--accent-blue), #0060df);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.ref-copy-btn:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(10, 132, 255, 0.45); }
.ref-copy-btn:active { transform: scale(0.95); }

/* ═══════════ ADMIN PANEL ═══════════ */
.admin-tabs {
    display: flex;
    gap: 3px;
    background: rgba(18,18,22,0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 16px;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.09);
    scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
    padding: 9px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.admin-tab.active {
    background: rgba(10,132,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(10,132,255,0.3);
    box-shadow: 0 2px 12px rgba(10,132,255,0.15);
}

.admin-tab:hover:not(.active) {
    color: var(--text-secondary);
}

/* Worker status in admin */
.worker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    border: 1px solid var(--separator);
}

.worker-item-info { flex: 1; min-width: 0; }
.worker-item-name { font-size: 14px; font-weight: 600; }
.worker-item-id { font-size: 11px; color: var(--text-muted); }

.worker-item-status select {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    -webkit-appearance: none;
}

/* ═══════════ BOTTOM NAV ═══════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    background: rgba(10, 10, 14, 0.55);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px 4px calc(24px + var(--tg-safe-bottom));
    z-index: 200;
}

/* Liquid glass sliding pill */
.nav-slider {
    position: absolute;
    top: 4px;
    left: 0;
    height: 52px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1),
                width   0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
    z-index: 0;
    will-change: transform, width;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    min-width: 56px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.nav-item.active { color: #ffffff; }
.nav-item.active::before { display: none; }

.nav-item:hover {
    color: var(--text-secondary);
}

.nav-item .material-icons {
    font-size: 22px;
}

.nav-label {
    font-size: 10px;
    font-weight: 600;
}

/* ═══════════ SECTION TITLES ═══════════ */
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.section-title .material-icons {
    font-size: 22px;
    color: var(--accent-blue);
}

/* ═══════════ MODAL ═══════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 300;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal-overlay.active { display: flex; }

.modal {
    background: rgba(18, 18, 22, 0.55);
    backdrop-filter: blur(48px) saturate(200%);
    -webkit-backdrop-filter: blur(48px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 12px 24px 32px;
    animation: modalSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* iOS drag handle — теперь рендерится через JS как .modal-handle */
.modal-handle {
    width: 40px;
    height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    margin: 0 auto 20px;
    cursor: grab;
}

/* Убираем дублирующий ::before */
.modal::before { display: none; }

/* ═══════════ TOAST ═══════════ */
.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-200px);
    opacity: 0;
    background: var(--bg-elevated);
    padding: 14px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    z-index: 500;
    box-shadow: var(--shadow-lg);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.35s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 340px;
    border: 1px solid var(--border);
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast.success { border-color: rgba(48, 209, 88, 0.5); background: linear-gradient(135deg, var(--bg-elevated), rgba(48, 209, 88, 0.08)); }
.toast.error { border-color: rgba(255, 69, 58, 0.5); background: linear-gradient(135deg, var(--bg-elevated), rgba(255, 69, 58, 0.08)); }
.toast.info { border-color: rgba(10, 132, 255, 0.5); background: linear-gradient(135deg, var(--bg-elevated), rgba(10, 132, 255, 0.08)); }

/* ═══════════ EMPTY STATE ═══════════ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .material-icons {
    font-size: 48px;
    margin-bottom: 14px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ═══════════ SCROLLBAR ═══════════ */
::-webkit-scrollbar { width: 0; height: 0; }

/* ═══════════ LOADING ═══════════ */
.spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
    display: flex;
    justify-content: center;
    padding: 48px;
}

/* ═══════════ IOS-STYLE LIST ═══════════ */
.ios-list {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--separator);
    overflow: hidden;
}

.ios-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--separator);
    transition: background 0.15s ease;
}

.ios-list-item:last-child { border-bottom: none; }
.ios-list-item:active { background: var(--bg-hover); }

/* ═══════════ FADE TRANSITIONS ═══════════ */
.fade-enter {
    opacity: 0;
    transform: translateY(6px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ═══════════ REAL AVATARS ═══════════ */
.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.profile-avatar img, .podium-avatar img, .user-pill .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ═══════════ WALLETS SECTION ═══════════ */
.wallets-section {
    margin-bottom: 16px;
}
.wallet-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--separator);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 6px;
    transition: all 0.2s;
}
.wallet-card:hover { background: var(--bg-hover); }
.wallet-card .wallet-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(10,132,255,0.12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wallet-card .wallet-icon .material-icons { font-size: 18px; color: #0a84ff; }
.wallet-card .wallet-info { flex: 1; min-width: 0; }
.wallet-card .wallet-addr {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    font-family: 'SF Mono','Menlo',monospace; letter-spacing: 0.3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wallet-card .wallet-label { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.wallet-card .wallet-del {
    width: 30px; height: 30px; border: none; border-radius: 8px;
    background: rgba(255,69,58,0.1); color: #ff453a;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.wallet-card .wallet-del:active { transform: scale(0.9); }
.wallet-card .wallet-del .material-icons { font-size: 16px; }
.wallet-card.selected { border-color: rgba(10,132,255,0.5); background: rgba(10,132,255,0.06); }

.wallet-add-form {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.wallet-add-form input {
    flex: 1 1 auto; min-width: 0; padding: 10px 12px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 13px; font-family: inherit; outline: none;
}
.wallet-add-form input:focus { border-color: rgba(255,255,255,0.2); }
.wallet-add-form button {
    padding: 10px 14px; border: none;
    background: linear-gradient(135deg, var(--accent-blue), #0060df);
    color: #fff; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; gap: 4px; white-space: nowrap;
    flex-shrink: 0; width: 100%;  justify-content: center;
}

/* ═══════════ WALLET SELECTOR IN PAYOUT ═══════════ */
.wallet-selector { margin-bottom: 12px; }
.wallet-selector .wallet-card { cursor: pointer; }

/* ═══════════ NFT LINKS (Admin) ═══════════ */
.nft-card {
    background: rgba(24,24,27,0.4);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 8px;
}
.nft-card-link {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.nft-card-link .material-icons { font-size: 16px; color: var(--accent-teal); flex-shrink: 0; }
.nft-card-link a {
    color: var(--accent-teal); font-size: 13px; font-weight: 600;
    text-decoration: none; word-break: break-all;
    transition: color 0.2s;
}
.nft-card-link a:hover { color: #0a84ff; text-decoration: underline; }
.nft-card-meta {
    display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); flex-wrap: wrap;
}
.nft-card-meta span { display: flex; align-items: center; gap: 3px; }
.nft-card-meta .material-icons { font-size: 13px; }

/* ═══════════ GIFT ESTIMATOR ═══════════ */
.btn-estimate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: rgba(100,210,255,0.12);
    border: 1px solid rgba(100,210,255,0.25);
    border-radius: 20px;
    color: #64d2ff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-estimate:hover { background: rgba(100,210,255,0.2); }
.btn-estimate:active { transform: scale(0.95); }
.btn-estimate:disabled { opacity: 0.4; pointer-events: none; }

.gift-estimate-card {
    background: rgba(18,18,22,0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(100,210,255,0.2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
}
.gift-estimate-card.loading { padding: 20px; }

.gift-estimate-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.gift-estimate-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.gift-estimate-count .material-icons { font-size: 16px; color: #64d2ff; }
.gift-estimate-price { font-size: 20px; font-weight: 800; }
.gift-estimate-note { font-size: 11px; color: var(--text-muted); padding-top: 2px; }

.gift-rows { display: flex; flex-direction: column; }
.gift-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.gift-row:last-child { border-bottom: none; }
.gift-row.invalid { opacity: 0.6; }
.gift-row.gift-used {
    background: rgba(255, 69, 58, 0.06);
    border-left: 3px solid #ff453a;
}

.gift-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-green);
    white-space: nowrap;
}

.gift-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 7px;
    border-radius: 4px;
}
.tag-black {
    background: rgba(255,255,255,0.08);
    color: #c0c0c8;
    border: 1px solid rgba(255,255,255,0.1);
}

/* ═══════════ NFT STATS CARD (admin) ═══════════ */
.gift-stats-card {
    background: rgba(18,18,22,0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(100,210,255,0.2);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}
.gift-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.gift-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.gift-stat .material-icons { font-size: 28px; }

/* ═══════════ CLICKABLE LINKS IN PAYOUTS ═══════════ */
.payout-links-list {
    display: flex; flex-direction: column; gap: 4px;
    padding: 0 16px 10px;
}
.payout-link-item {
    display: flex; align-items: center; gap: 6px; padding: 4px 0;
}
.payout-link-item .material-icons { font-size: 14px; color: var(--accent-teal); flex-shrink: 0; }
.payout-link-item a {
    color: var(--accent-teal); font-size: 12px; font-weight: 500;
    text-decoration: none; word-break: break-all; transition: color 0.2s;
}
.payout-link-item a:hover { color: #0a84ff; text-decoration: underline; }

/* ═══════════ TOOLS → MANUALS + INSTRUMENTS NAV ═══════════ */
.sub-nav-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.sub-nav-back {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary); transition: all 0.2s;
}
.sub-nav-back:hover { background: var(--bg-hover); color: var(--text-primary); }
.sub-nav-back:active { transform: scale(0.92); }
.sub-nav-title { font-size: 18px; font-weight: 700; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 375px) {
    .stat-value { font-size: 20px; }
    .section-title { font-size: 18px; }
    .login-title { font-size: 24px; }
}

/* ═══════════ HOME PERKS TIMELINE ═══════════ */
.perks-section {
    margin: 16px 0 20px;
}

.perks-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.perks-title .material-icons {
    font-size: 20px;
    color: #ffd60a;
}

.perks-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.perk-tier {
    position: relative;
    background: rgba(24, 24, 27, 0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.perk-tier.perk-current {
    background: rgba(24, 24, 27, 0.6);
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
}

.perk-tier.perk-locked {
    opacity: 0.55;
}

.perk-tier.perk-done {
    opacity: 0.75;
}

.perk-tier-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.perk-tier-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.perk-tier-badge .material-icons {
    font-size: 22px;
    color: #fff;
}

.perk-tier-info {
    flex: 1;
    min-width: 0;
}

.perk-tier-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.perk-tier-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.perk-tier-pct {
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
}

.perk-progress-track {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    margin: 12px 0 4px;
    overflow: hidden;
}

.perk-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.perk-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    transition: background 0.2s;
}

.perk-item.locked {
    opacity: 0.5;
}

.perk-item-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.perk-item-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.perk-item-text b {
    color: #fff;
    font-weight: 700;
}

.perk-connector {
    position: absolute;
    bottom: -12px;
    left: 36px;
    width: 2px;
    height: 12px;
    background: rgba(255,255,255,0.1);
    z-index: 1;
}

/* Parser Status Card */
.parser-status-card {
    background: rgba(18, 20, 30, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}
.parser-status-card.parser-active {
    border-color: rgba(48, 209, 88, 0.25);
}
.parser-status-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.parser-status-icon {
    font-size: 28px;
}
.parser-active .parser-status-icon {
    color: #30d158;
}
.parser-inactive .parser-status-icon {
    color: rgba(255,255,255,0.25);
}
.parser-status-info {
    flex: 1;
    min-width: 0;
}
.parser-status-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
.parser-status-label {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}
.parser-active .parser-status-label {
    color: #30d158;
}
.parser-status-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}
.badge-active {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
}
.badge-inactive {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.3);
}
.parser-status-exp,
.parser-status-stat,
.parser-status-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.parser-status-hint {
    font-style: italic;
    color: rgba(255,255,255,0.3);
}

/* ═══════════ NO ACCESS / PENDING SCREEN ═══════════ */
.noaccess-screen,
.pending-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.noaccess-wrap,
.pending-wrap {
    width: 100%;
    max-width: 380px;
}
.noaccess-icon,
.pending-icon {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: rgba(255, 69, 58, 0.1);
    border: 1px solid rgba(255, 69, 58, 0.2);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.noaccess-icon .material-icons {
    font-size: 48px;
    color: #ff453a;
}
.pending-icon {
    background: rgba(255, 159, 10, 0.1);
    border-color: rgba(255, 159, 10, 0.2);
}
.pending-icon .material-icons {
    font-size: 48px;
    color: #ff9f0a;
    animation: pendingPulse 2s ease-in-out infinite;
}
@keyframes pendingPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}
.noaccess-title,
.pending-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.noaccess-subtitle,
.pending-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 320px;
    line-height: 1.5;
    margin: 0 auto 24px;
}
.noaccess-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.noaccess-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.noaccess-step .material-icons {
    font-size: 24px;
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}
.noaccess-step span:last-child {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    line-height: 1.4;
}
.pending-screen .btn {
    margin-top: 16px;
}
.po-estimate-box {
    background: var(--bg-input);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 8px 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-sizing: border-box;
    max-width: calc(100% - 32px);
}
.po-card .po-estimate-box {
    margin: 6px 16px 8px;
    max-width: calc(100% - 32px);
}
.est-empty {
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.est-empty .material-icons { font-size: 14px; }
.est-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    gap: 8px;
}
.est-name {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.est-num { color: var(--text-muted); font-size: 11px; }
.est-price { color: #30d158; font-weight: 700; white-space: nowrap; }
.est-price.est-na { color: var(--text-muted); font-weight: 400; }
.est-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 4px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.est-total-val { color: #0a84ff; }
.est-payout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}
.est-payout-val { color: #ff9f0a; font-weight: 700; }
.est-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
}
.est-loading .material-icons { font-size: 16px; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1.2s linear infinite; }
