:root {
    --primary: #FFD700;
    --primary-light: #FFE86B;
    --primary-dark: #B8860B;
    --accent: #FFA500;
    --bg: #0e1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2230;
    --glass-bg: rgba(22, 27, 34, 0.8);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 215, 0, 0.3);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --success: #0edc9d;
    --danger: #f85149;
    --warning: #d29922;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input { font-family: inherit; }

.gold-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hidden { display: none !important; }

/* ============ BACKGROUND ============ */
.bg-animated {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
}
.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.bg-glow {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.08;
}
.bg-glow-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; right: -100px; }
.bg-glow-2 { width: 500px; height: 500px; background: var(--accent); bottom: -200px; left: -100px; }

/* ============ VIEWS ============ */
.view { display: none; min-height: 100vh; }
.view.active { display: block; }

/* ============ NAVBAR ============ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 1rem 0;
    background: rgba(14, 17, 23, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}
.navbar.scrolled { background: rgba(14, 17, 23, 0.95); }
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 1.3rem; font-weight: 800; font-family: 'Outfit', sans-serif;
}
.btn-admin-enter {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: 8px;
    background: rgba(255, 215, 0, 0.1); color: var(--primary);
    font-weight: 600; font-size: 0.85rem; border: 1px solid rgba(255, 215, 0, 0.2);
    transition: var(--transition);
}
.btn-admin-enter:hover { background: rgba(255, 215, 0, 0.2); }
.btn-logout { background: rgba(248, 81, 73, 0.1); color: var(--danger); border-color: rgba(248, 81, 73, 0.2); }
.btn-logout:hover { background: rgba(248, 81, 73, 0.2); }

/* ============ ADMIN TABS ============ */
.admin-nav-tabs {
    display: flex; gap: 0.25rem;
    background: var(--bg-card); border-radius: 10px; padding: 4px;
}
.admin-tab {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: 8px;
    font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
    transition: var(--transition);
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active {
    background: rgba(255, 215, 0, 0.15); color: var(--primary);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    max-width: 1200px; margin: 0 auto; padding: 6rem 1.5rem 3rem;
}

/* ============ HERO LANDING ============ */
.hero-landing {
    text-align: center; padding: 4rem 0 2rem;
}
.hero-badge {
    display: inline-block; padding: 0.4rem 1rem; border-radius: 999px;
    background: rgba(255, 215, 0, 0.1); border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--primary); font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.15; margin-bottom: 1rem;
}
.hero-desc {
    font-size: 1.1rem; color: var(--text-secondary); max-width: 500px; margin: 0 auto 2.5rem;
}

/* ============ SEARCH ============ */
.search-box {
    max-width: 500px; margin: 0 auto; position: relative;
}
.search-input-wrap {
    display: flex; align-items: center; gap: 0.75rem;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 12px; padding: 0.75rem 1rem;
    transition: var(--transition);
}
.search-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}
.search-input-wrap input {
    flex: 1; background: none; border: none; color: var(--text-primary);
    font-size: 1rem; outline: none;
}
.search-input-wrap input::placeholder { color: var(--text-secondary); }
.btn-search {
    padding: 0.5rem 1.2rem; border-radius: 8px;
    background: var(--primary); color: #000; font-weight: 700; font-size: 0.9rem;
    transition: var(--transition);
}
.btn-search:hover { background: var(--primary-light); transform: scale(1.03); }

.search-suggestions {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 10px; overflow: hidden; z-index: 10;
    max-height: 240px; overflow-y: auto;
}
.search-suggestion {
    padding: 0.75rem 1rem; cursor: pointer; display: flex; justify-content: space-between;
    align-items: center; transition: var(--transition);
}
.search-suggestion:hover { background: var(--bg-card-hover); }
.search-suggestion .ss-name { font-weight: 600; }
.search-suggestion .ss-amount { color: var(--primary); font-weight: 700; }

/* ============ CLIENT RESULT (Landing) ============ */
.client-result {
    max-width: 500px; margin: 2rem auto;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 2rem; text-align: center;
}

/* ============ CLIENT DETAIL (Full Page) ============ */
.client-detail {
    max-width: 600px; margin: 2rem auto;
}
.detail-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 2.5rem; text-align: center;
    position: relative; overflow: hidden;
}
.detail-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.detail-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255, 215, 0, 0.1); border: 3px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.2rem; font-size: 2rem; font-weight: 800; color: var(--primary);
    font-family: 'Outfit', sans-serif;
}
.detail-name { font-size: 1.5rem; margin-bottom: 0.3rem; }
.detail-phone { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }

.detail-status {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.2rem; border-radius: 999px; font-weight: 700;
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}
.detail-status.active { background: rgba(14, 220, 157, 0.15); color: var(--success); }
.detail-status.overdue { background: rgba(210, 153, 34, 0.15); color: var(--warning); }
.detail-status.suspended { background: rgba(248, 81, 73, 0.15); color: var(--danger); }
.detail-status .status-dot {
    width: 8px; height: 8px; border-radius: 50%; background: currentColor;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.detail-amount {
    font-size: 2.5rem; font-weight: 900; font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
}
.detail-amount-label { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

.detail-timer {
    display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem;
}
.timer-unit {
    background: rgba(255, 215, 0, 0.08); border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 12px; padding: 0.8rem 1rem; min-width: 72px;
}
.timer-num {
    font-size: 1.8rem; font-weight: 900; font-family: 'Outfit', sans-serif;
    color: var(--primary); display: block; line-height: 1;
}
.timer-label {
    font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.08em; margin-top: 0.3rem; display: block;
}

.detail-warn {
    background: rgba(248, 81, 73, 0.1); border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 12px; padding: 1.2rem; margin-bottom: 1.5rem;
    animation: warnPulse 2s infinite;
}
@keyframes warnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.2); }
    50% { box-shadow: 0 0 20px 4px rgba(248, 81, 73, 0.15); }
}
.detail-warn-title {
    color: var(--danger); font-size: 1.1rem; font-weight: 800; margin-bottom: 0.3rem;
}
.detail-warn-text { color: var(--text-secondary); font-size: 0.85rem; }

.detail-referral {
    background: rgba(255, 215, 0, 0.05); border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 12px; padding: 1.5rem; margin-top: 1.5rem;
}
.detail-referral h4 {
    color: var(--primary); font-size: 0.9rem; margin-bottom: 0.8rem;
    display: flex; align-items: center; gap: 0.5rem; justify-content: center;
}
.referral-count {
    font-size: 2rem; font-weight: 900; font-family: 'Outfit', sans-serif;
    color: var(--text-primary); margin-bottom: 0.3rem;
}
.referral-count-label { color: var(--text-secondary); font-size: 0.8rem; margin-bottom: 1rem; }

.referral-progress { margin-bottom: 1rem; }
.progress-bar-bg {
    height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 4px; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 4px; transition: width 1s ease;
}
.progress-labels {
    display: flex; justify-content: space-between; margin-top: 0.4rem;
    font-size: 0.75rem; color: var(--text-secondary);
}

.referral-goals { margin-top: 1rem; }
.referral-goal-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0; border-bottom: 1px solid var(--glass-border);
}
.referral-goal-item:last-child { border: none; }
.goal-info { display: flex; align-items: center; gap: 0.5rem; }
.goal-check {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--glass-border); display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; transition: var(--transition);
}
.goal-check.achieved {
    background: var(--success); border-color: var(--success); color: #000;
}
.goal-target { font-size: 0.85rem; font-weight: 600; }
.goal-reward { color: var(--primary); font-size: 0.85rem; font-weight: 600; }

.detail-actions {
    display: flex; gap: 0.75rem; justify-content: center; margin-top: 1.5rem;
}

/* ============ SUSPENDED ============ */
.suspended-screen {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 2rem;
}
.suspended-icon {
    margin-bottom: 1.5rem;
    animation: suspendedBounce 2s infinite;
}
@keyframes suspendedBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.suspended-title { font-size: 2rem; margin-bottom: 0.8rem; color: var(--danger); }
.suspended-text { color: var(--text-secondary); max-width: 400px; margin-bottom: 2rem; line-height: 1.7; }

/* ============ BUTTONS ============ */
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.5rem; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #000; font-weight: 700; font-size: 0.9rem;
    transition: var(--transition); border: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3); }
.btn-full { width: 100%; justify-content: center; }
.btn-secondary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.5rem; border-radius: 10px;
    background: rgba(255, 255, 255, 0.06); color: var(--text-primary);
    font-weight: 600; font-size: 0.9rem; border: 1px solid var(--glass-border);
    transition: var(--transition);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.btn-danger {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.5rem; border-radius: 10px;
    background: rgba(248, 81, 73, 0.15); color: var(--danger);
    font-weight: 600; font-size: 0.9rem; border: 1px solid rgba(248, 81, 73, 0.3);
    transition: var(--transition);
}
.btn-danger:hover { background: rgba(248, 81, 73, 0.25); }
.btn-success {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.5rem; border-radius: 10px;
    background: rgba(14, 220, 157, 0.15); color: var(--success);
    font-weight: 600; font-size: 0.9rem; border: 1px solid rgba(14, 220, 157, 0.3);
    transition: var(--transition);
}
.btn-success:hover { background: rgba(14, 220, 157, 0.25); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; border-radius: 8px; }

/* ============ ADMIN ============ */
.admin-content { padding-top: 7rem; }
.section-title {
    font-size: 1.6rem; margin-bottom: 1.5rem;
}
.section-header-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.2rem; gap: 1rem; flex-wrap: wrap;
}
.section-header-row h3 { font-size: 1.1rem; }

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; animation: fadeUp 0.4s ease; }

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

/* ============ STATS GRID ============ */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 1.5rem;
    position: relative; overflow: hidden; transition: var(--transition);
}
.stat-card:hover { border-color: var(--glass-border-hover); transform: translateY(-2px); }
.stat-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-total::after { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.stat-active::after { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-overdue::after { background: linear-gradient(90deg, var(--warning), #f59e0b); }
.stat-suspended::after { background: linear-gradient(90deg, var(--danger), #ef4444); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.stat-total .stat-icon { background: rgba(255, 215, 0, 0.1); color: var(--primary); }
.stat-active .stat-icon { background: rgba(14, 220, 157, 0.1); color: var(--success); }
.stat-overdue .stat-icon { background: rgba(210, 153, 34, 0.1); color: var(--warning); }
.stat-suspended .stat-icon { background: rgba(248, 81, 73, 0.1); color: var(--danger); }
.stat-value { font-size: 1.8rem; font-weight: 900; font-family: 'Outfit', sans-serif; margin-bottom: 0.2rem; }
.stat-label { color: var(--text-secondary); font-size: 0.85rem; }

/* ============ CLIENTS GRID ============ */
.clients-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.client-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 1.5rem; cursor: pointer;
    transition: var(--transition); position: relative; overflow: hidden;
}
.client-card:hover { border-color: var(--glass-border-hover); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.client-card::before {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
}
.client-card.status-active::before { background: var(--success); }
.client-card.status-overdue::before { background: var(--warning); }
.client-card.status-suspended::before { background: var(--danger); }

.client-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.8rem; }
.client-card-name { font-weight: 700; font-size: 1rem; }
.client-card-status {
    padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.client-card.status-active .client-card-status { background: rgba(14, 220, 157, 0.15); color: var(--success); }
.client-card.status-overdue .client-card-status { background: rgba(210, 153, 34, 0.15); color: var(--warning); }
.client-card.status-suspended .client-card-status { background: rgba(248, 81, 73, 0.15); color: var(--danger); }

.client-card-amount { font-size: 1.4rem; font-weight: 900; font-family: 'Outfit', sans-serif; color: var(--primary); }
.client-card-info { color: var(--text-secondary); font-size: 0.8rem; margin-top: 0.4rem; }
.client-card-referrals {
    display: inline-flex; align-items: center; gap: 0.3rem;
    margin-top: 0.6rem; font-size: 0.75rem; color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04); padding: 0.2rem 0.6rem; border-radius: 6px;
}

/* ============ FILTER BAR ============ */
.filter-bar {
    display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.filter-btn {
    padding: 0.4rem 1rem; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04); color: var(--text-secondary);
    font-size: 0.85rem; font-weight: 500; border: 1px solid var(--glass-border);
    transition: var(--transition);
}
.filter-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.filter-btn.active { background: rgba(255, 215, 0, 0.15); color: var(--primary); border-color: rgba(255, 215, 0, 0.3); }

/* ============ SETTINGS ============ */
.settings-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem;
}
.settings-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 1.5rem;
}
.settings-card h3 {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 1rem; margin-bottom: 0.4rem;
}
.settings-desc { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1.2rem; }
.settings-form { display: flex; flex-direction: column; gap: 0.8rem; }
.settings-form input {
    width: 100%; padding: 0.7rem 1rem; border-radius: 10px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 0.95rem; outline: none;
    transition: var(--transition);
}
.settings-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1); }

.amount-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.amount-inputs label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.amount-inputs input {
    padding: 0.6rem 0.8rem; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 0.9rem; outline: none;
}
.amount-inputs input:focus { border-color: var(--primary); }

.time-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.time-inputs label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.time-inputs input {
    padding: 0.6rem 0.8rem; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 0.9rem; outline: none;
}
.time-inputs input:focus { border-color: var(--primary); }

/* ============ REFERRAL GOALS (Settings) ============ */
.referral-goals-list { margin-bottom: 1rem; }
.referral-goal-row {
    display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem;
}
.referral-goal-row input {
    flex: 1; padding: 0.5rem 0.8rem; border-radius: 8px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 0.85rem; outline: none;
}
.referral-goal-row input:focus { border-color: var(--primary); }
.btn-remove-goal {
    width: 32px; height: 32px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center;
    background: rgba(248, 81, 73, 0.1); color: var(--danger);
    border: 1px solid rgba(248, 81, 73, 0.2); transition: var(--transition);
}
.btn-remove-goal:hover { background: rgba(248, 81, 73, 0.2); }

/* ============ LOGIN ============ */
.login-card {
    max-width: 400px; margin: 8rem auto 0; text-align: center;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 3rem 2rem;
}
.login-icon { margin-bottom: 1.2rem; }
.login-card h2 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.login-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }

.pin-input-group {
    display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 1.5rem;
}
.pin-digit {
    width: 56px; height: 64px; text-align: center;
    font-size: 1.5rem; font-weight: 800; font-family: 'Outfit', sans-serif;
    background: rgba(255, 255, 255, 0.04); border: 2px solid var(--glass-border);
    border-radius: 12px; color: var(--text-primary); outline: none;
    transition: var(--transition); -webkit-text-security: disc;
}
.pin-digit:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15); }
.pin-digit.error {
    border-color: var(--danger); animation: shake 0.4s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.pin-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.8rem; font-weight: 500; }

/* ============ MODALS ============ */
.modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.modal.hidden { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal-card {
    position: relative; width: 100%; max-width: 480px;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden;
    animation: modalIn 0.3s ease;
}
.modal-card-lg { max-width: 600px; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--glass-border);
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem; border-top: 1px solid var(--glass-border);
    display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ============ FORM ============ */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 0.4rem;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"] {
    width: 100%; padding: 0.7rem 1rem; border-radius: 10px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 0.95rem; outline: none;
    transition: var(--transition);
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1); }

.amount-options {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
}
.amount-option {
    padding: 0.7rem; border-radius: 10px; text-align: center;
    background: rgba(255, 255, 255, 0.04); border: 2px solid var(--glass-border);
    cursor: pointer; transition: var(--transition); font-weight: 700;
    font-family: 'Outfit', sans-serif; font-size: 0.95rem;
}
.amount-option:hover { border-color: rgba(255, 215, 0, 0.4); }
.amount-option.selected {
    border-color: var(--primary); background: rgba(255, 215, 0, 0.1); color: var(--primary);
}

/* ============ TOAST ============ */
.toast-container {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
    padding: 0.8rem 1.2rem; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--glass-border);
    font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.toast.success { border-color: rgba(14, 220, 157, 0.3); }
.toast.error { border-color: rgba(248, 81, 73, 0.3); }
.toast.warning { border-color: rgba(210, 153, 34, 0.3); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(20px); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .admin-nav-tabs { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .clients-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .detail-timer { gap: 0.5rem; }
    .timer-unit { min-width: 60px; padding: 0.6rem 0.7rem; }
    .timer-num { font-size: 1.4rem; }
    .amount-options { grid-template-columns: 1fr; }
    .admin-tab-bar-mobile {
        display: flex; gap: 0.25rem; overflow-x: auto;
        padding: 0.5rem 1.5rem; margin-top: 4rem;
        background: rgba(14, 17, 23, 0.6);
        border-bottom: 1px solid var(--glass-border);
    }
}
@media (min-width: 769px) {
    .admin-tab-bar-mobile { display: none; }
}
