:root {
    /* === ПАЛИТРА ELITE v4.5 === */
    --bg-oled: #000000;
    --bg-glass: rgba(12, 12, 12, 0.9);
    --bg-card: #111111;
    
    /* Цвета */
    --neon-green: #00ff41;
    --neon-red: #ff3b30;
    --gold-primary: #ffd700;
    
    /* Размеры */
    --nav-height: 80px;
    --header-height: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body {
    margin: 0; padding: 0;
    background-color: var(--bg-oled);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    overflow: hidden; 
}

/* === ХЕДЕР === */
.app-header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-height);
    background: var(--bg-glass); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05); z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 16px; padding-top: env(safe-area-inset-top);
}
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px; }
.avatar-ring {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--neon-green);
    overflow: hidden; background: #000; display: flex; justify-content: center; align-items: center;
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
#avatar-fallback { color: var(--neon-green); font-weight: 800; font-size: 14px; }
.u-name { font-weight: 700; font-size: 14px; }
.u-email { font-size: 10px; color: var(--neon-green); }
.btn-icon { background: rgba(255,255,255,0.1); border:none; color:#fff; width:40px; height:40px; border-radius:50%; font-size:20px; display:flex; justify-content:center; align-items:center; }

/* === ОСНОВНОЙ СКРОЛЛ === */
#main-scroll {
    position: absolute; top: 0; bottom: 0; left: 0; right: 0;
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: calc(var(--nav-height) + 20px);
    padding-left: 16px; padding-right: 16px;
    overflow-y: auto;
}
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h1 { font-size: 28px; font-weight: 800; margin: 0; }

/* === PREMIUM MARKET (ЗОЛОТОЙ СТИЛЬ) === */
.premium-card {
    background: radial-gradient(circle at top right, #3a3200 0%, #050505 80%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px; padding: 24px;
    position: relative; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.card-glow {
    position: absolute; top: -50px; right: -50px; width: 150px; height: 150px;
    background: var(--gold-primary); filter: blur(80px); opacity: 0.2; pointer-events: none;
}
.plan-title { color: var(--gold-primary); font-size: 20px; font-weight: 900; margin-bottom: 5px; }
.plan-price { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 20px; }
.plan-price span { font-size: 14px; color: #888; font-weight: 400; }
.plan-features li { display: flex; align-items: center; gap: 10px; color: #ddd; margin-bottom: 12px; font-size: 13px; }
.plan-features i { color: var(--gold-primary); }
.btn-gold {
    width: 100%; background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    color: #000; border: none; padding: 16px; border-radius: 12px;
    font-size: 15px; font-weight: 800; text-transform: uppercase;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3); margin-top: 10px;
}

/* === АДМИНКА (ADMIN LIST) === */
#admin-user-list { display: flex; flex-direction: column; gap: 8px; }
.admin-user-item {
    background: #110505; border: 1px solid rgba(255, 59, 48, 0.3);
    padding: 12px 16px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
}
.u-role { font-size: 9px; background: #330000; color: var(--neon-red); padding: 2px 5px; border-radius: 4px; margin-left: 5px; }
.btn-ban { background: transparent; border: 1px solid var(--neon-red); color: var(--neon-red); padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 11px; }

/* === ПОЧТА И ФОРМЫ === */
.email-item { background: var(--bg-card); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 16px; margin-bottom: 10px; }
.email-item.unread { border-left: 3px solid var(--neon-green); background: linear-gradient(90deg, rgba(0,255,65,0.05), transparent); }
.sender { font-weight: 700; font-size: 15px; } .subject { color: #ccc; font-size: 13px; } .preview { color: #666; font-size: 12px; }

.field-wrap { background: #151515; border-radius: 12px; padding: 12px; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 15px; }
.field-wrap input, .field-wrap textarea { background: transparent; border: none; color: #fff; width: 100%; font-size: 16px; font-family: 'Inter', sans-serif; }
.btn-send-large { background: var(--neon-green); color: #000; width: 100%; padding: 16px; border: none; border-radius: 14px; font-weight: 800; display:flex; justify-content:center; align-items:center; gap:10px; }

/* === НАВИГАЦИЯ === */
.bottom-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; height: 65px;
    background: rgba(20,20,20,0.95); backdrop-filter: blur(20px); border-radius: 35px; border: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-around; align-items: center; z-index: 999;
}
.nav-btn { background: none; border: none; color: #555; display: flex; flex-direction: column; align-items: center; }
.nav-btn.active { color: #fff; }
.btn-circle { width: 50px; height: 50px; background: var(--neon-green); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #000; font-size: 22px; position: relative; top: -20px; box-shadow: 0 0 15px rgba(0,255,65,0.4); }

/* МОДАЛКИ */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-body { background: #111; width: 90%; border-radius: 20px; padding: 20px; border: 1px solid rgba(255,255,255,0.1); }
.reply-box { margin-top:15px; border-top:1px solid #333; padding-top:15px; }
.btn-reply-send { background: var(--neon-green); border: none; width: 40px; height: 40px; border-radius: 8px; font-size: 20px; float: right; }

.error-color { color: var(--neon-red); } .hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }