*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #09080a;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.06);
    --border-bright: rgba(255, 255, 255, 0.15);
    --text: #f3f3f6;
    --text-muted: rgba(255, 255, 255, 0.4);
    --text-dim: rgba(255, 255, 255, 0.15);
    
    --primary: #ff6b1a;
    --primary-dim: rgba(255, 107, 26, 0.12);
    --primary-glow: rgba(255, 107, 26, 0.4);
    --gold: #ffb300;
    --green: #00cc66;
    --nav-h: 74px;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg); color: var(--text); font-family: 'Exo 2', sans-serif;
    min-height: 100vh; display: flex; flex-direction: column;
    overflow-x: hidden; -webkit-font-smoothing: antialiased; user-select: none;
}

/* ─── АНИМИРОВАННЫЙ БЭКГРАУНД ─── */
.bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-canvas::before {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 50px 50px; animation: gridMovement 25s linear infinite;
}
@keyframes gridMovement { from { background-position: 0 0; } to { background-position: 50px 50px; } }
.bg-glow-1 {
    position: absolute; width: 450px; height: 450px;
    background: radial-gradient(circle, rgba(255,107,26,0.06) 0%, transparent 75%);
    top: -80px; right: -80px; animation: floatCircle 10s ease-in-out infinite alternate;
}
.bg-glow-2 {
    position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,179,0,0.04) 0%, transparent 75%);
    bottom: 50px; left: -100px; animation: floatCircle 14s ease-in-out infinite alternate-reverse;
}
@keyframes floatCircle { from { transform: translate(0,0) scale(1); } to { transform: translate(25px, 35px) scale(1.1); } }

/* ─── SPLASH SCREEN LOADING ─── */
#loading-screen {
    position: fixed; inset: 0; background: var(--bg); z-index: 200;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
#loading-screen.hide { opacity: 0; transform: scale(1.05); pointer-events: none; }
.loader-icon { position: relative; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.loader-icon i { font-size: 32px; color: var(--primary); animation: pulseHeart 1.2s ease-in-out infinite; }
@keyframes pulseHeart { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.loader-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-title { font-family: 'Rajdhani', sans-serif; font-size: 28px; font-weight: 700; letter-spacing: 2px; }
.loader-title span { color: var(--primary); }
.loader-bar-wrap { width: 150px; height: 3px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.loader-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--gold)); animation: loadProgress 1.5s ease forwards; }
@keyframes loadProgress { to { width: 100%; } }

/* ─── ШАПКА ТЕГА ─── */
header {
    position: sticky; top: 0; z-index: 10; padding: 16px 20px;
    background: rgba(9,8,10,0.75); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo-icon {
    width: 36px; height: 36px; background: linear-gradient(135deg, rgba(255,107,26,0.2), rgba(255,107,26,0.02));
    border: 1px solid rgba(255,107,26,0.25); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--primary);
}
.header-title { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: 0.5px; }
.header-title span { color: var(--primary); }

/* ─── МЕЙН ЛЕЙАУТ ─── */
main { flex: 1; position: relative; z-index: 1; padding: 20px 16px calc(var(--nav-h) + 20px); max-width: 480px; width: 100%; margin: 0 auto; }
.panel { display: none; animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.panel.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.section-label { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); margin: 20px 0 10px; }
.section-label:first-child { margin-top: 0; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ─── HERO КАРТОЧКА СТАТИСТИКИ ─── */
.stats-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 26px 20px; text-align: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 0%, rgba(255,107,26,0.06) 0%, transparent 75%); }
.hero-eyebrow { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.hero-main-stat { font-family: 'Rajdhani', sans-serif; font-size: 44px; font-weight: 700; color: var(--gold); filter: drop-shadow(0 0 15px rgba(255,179,0,0.2)); margin-bottom: 6px; }
.currency-badge { font-size: 24px; color: var(--text-muted); margin-left: 2px; }
.hero-sub-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); background: rgba(255,255,255,0.02); border: 1px solid var(--border); padding: 5px 14px; border-radius: 20px; }

/* GRID ДОЛЕЙ СКИДОК */
.discount-reports-grid { display: flex; flex-direction: column; gap: 8px; }
.report-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.report-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.report-value { text-align: right; }
.report-count { font-size: 14px; font-weight: 700; color: var(--text); }
.report-sum { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── ВИТРИНА КАРТОЧКИ И ФИЛЬТРЫ ─── */
.filter-pills { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.filter-pills::-webkit-scrollbar { display: none; }
.pill {
    flex: 1; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    color: var(--text-muted); font-family: 'Exo 2', sans-serif; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: all 0.2s;
}
.pill.active { background: var(--primary-dim); border-color: rgba(255,107,26,0.4); color: var(--primary); box-shadow: 0 4px 12px rgba(255,107,26,0.1); }

.accounts-list { display: flex; flex-direction: column; gap: 8px; }
.acc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acc-info { display: flex; align-items: center; gap: 12px; }
.acc-icon { width: 44px; height: 44px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--gold); }
.acc-pool-name { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.acc-pool-sub { font-size: 11px; color: var(--text-muted); }

.btn-claim {
    background: linear-gradient(135deg, rgba(255,107,26,0.2), rgba(255,107,26,0.08)); border: 1px solid rgba(255,107,26,0.35);
    color: var(--primary); font-family: 'Exo 2', sans-serif; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.btn-claim:active { transform: scale(0.96); background: rgba(255,107,26,0.25); }

/* ─── BOTTOM SHEET MODAL (ЧЕК) ─── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 100; backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.modal-overlay.active { opacity: 1; pointer-events: all; }

.receipt-modal {
    position: fixed; bottom: -100%; left: 0; right: 0; z-index: 101;
    background: #0d0c10; border-top: 1px solid var(--border-bright); border-radius: 24px 24px 0 0;
    padding: 24px 20px 34px; box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
    transition: bottom 0.35s cubic-bezier(0.25, 1, 0.5, 1); max-height: 80vh; overflow-y: auto;
}
.receipt-modal.active { bottom: 0; }
.modal-close { position: absolute; top: 16px; right: 20px; background: var(--surface); border: none; color: var(--text-muted); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }

.receipt-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--primary); }
.receipt-header h3 { font-family: 'Rajdhani', sans-serif; font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.receipt-field { background: rgba(255,255,255,0.01); border: 1px solid var(--border); padding: 12px 14px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.field-label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.field-value { font-family: monospace; font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.btn-copy { background: transparent; border: none; color: var(--primary); cursor: pointer; padding: 2px; font-size: 13px; }

/* ─── СИСТЕМНЫЕ СТИЛИ (NAV, TOAST, SHIMMER) ─── */
nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; height: var(--nav-h); background: rgba(9,8,10,0.9); backdrop-filter: blur(20px); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-around; }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: transparent; border: none; cursor: pointer; color: var(--text-muted); gap: 4px; padding: 12px 0; position: relative; }
.nav-btn i { font-size: 18px; transition: transform 0.2s; }
.nav-btn span { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; font-family: 'Exo 2', sans-serif; }
.nav-btn.active { color: var(--primary); }
.nav-btn.active i { transform: translateY(-1px); }
.nav-indicator { position: absolute; bottom: 6px; width: 24px; height: 2px; border-radius: 1px; background: var(--primary); transform: scaleX(0); transition: transform 0.2s ease; }
.nav-btn.active .nav-indicator { transform: scaleX(1); }

#toast-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 6px; pointer-events: none; width: 310px; }
.toast { background: #131217; border: 1px solid var(--border-bright); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; animation: toastIn 0.3s forwards; }
.toast.success { border-color: rgba(0,204,102,0.3); } .toast.success i { color: var(--green); }
.toast.error { border-color: rgba(255,107,26,0.3); } .toast.error i { color: var(--primary); }
.toast.out { animation: toastOut 0.25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: scale(0.95) translateY(-5px); } }

.shimmer { background: linear-gradient(90deg, var(--surface) 0%, rgba(255,255,255,0.05) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmerAnim 1.5s infinite; border-radius: 12px; }
@keyframes shimmerAnim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }