/* ============================================================
   GYMBEEM THEME - COLOR SYSTEM (10 THEMES) - FINAL
   ============================================================ */

/* ============================================================
   ROOT VARIABLES - LIGHT MODE (DEFAULT)
   ============================================================ */
:root {
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --primary-rgb: 37, 99, 235;
    
    --secondary: #10B981;
    --secondary-light: #34D399;
    --secondary-dark: #059669;
    --secondary-rgb: 16, 185, 129;
    
    --accent: #F59E0B;
    --accent-light: #FBBF24;
    --accent-dark: #D97706;
    --accent-rgb: 245, 158, 11;
    
    --danger: #EF4444;
    --danger-light: #F87171;
    --danger-dark: #DC2626;
    --danger-rgb: 239, 68, 68;
    
    --bg: #F6F8FB;
    --bg-card: #FFFFFF;
    --bg-input: #F3F4F6;
    --bg-hover: #F3F4F6;
    
    --text: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    
    --border: #E8EDF5;
    --border-light: #F3F4F6;
    
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
    
    --glow-color: rgba(37,99,235,0.15);
    --glow-soft: rgba(37,99,235,0.05);
    
    --theme-name: 'Light';
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;
    --primary-rgb: 59, 130, 246;
    
    --secondary: #34D399;
    --secondary-light: #6EE7B7;
    --secondary-dark: #10B981;
    --secondary-rgb: 52, 211, 153;
    
    --accent: #FBBF24;
    --accent-light: #FCD34D;
    --accent-dark: #F59E0B;
    --accent-rgb: 251, 191, 36;
    
    --danger: #F87171;
    --danger-light: #FCA5A5;
    --danger-dark: #EF4444;
    --danger-rgb: 248, 113, 113;
    
    --bg: #0F172A;
    --bg-card: #1E293B;
    --bg-input: #334155;
    --bg-hover: #273549;
    
    --text: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --border: #334155;
    --border-light: #273549;
    
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
    
    --glow-color: rgba(59,130,246,0.15);
    --glow-soft: rgba(59,130,246,0.05);
    
    --theme-name: 'Dark';
}

/* ============================================================
   PINK ENERGY
   ============================================================ */
[data-theme="pink"] {
    --primary: #FF4FA3;
    --primary-light: #FF80BF;
    --primary-dark: #E8358A;
    --primary-rgb: 255, 79, 163;
    
    --secondary: #FF80BF;
    --secondary-light: #FFB3D9;
    --secondary-dark: #FF4FA3;
    --secondary-rgb: 255, 128, 191;
    
    --accent: #FFD84D;
    --accent-light: #FFE680;
    --accent-dark: #FFD020;
    --accent-rgb: 255, 216, 77;
    
    --danger: #FF6B8A;
    --danger-light: #FF99B3;
    --danger-dark: #E85575;
    --danger-rgb: 255, 107, 138;
    
    --bg: #FFF7FB;
    --bg-card: #FFFFFF;
    --bg-input: #FFE8F0;
    --bg-hover: #FFDCE8;
    
    --text: #4A1A2E;
    --text-secondary: #A64D7A;
    --text-muted: #CC80A8;
    
    --border: #FFDCE8;
    --border-light: #FFE8F0;
    
    --shadow: 0 4px 12px rgba(255,79,163,0.12);
    --shadow-lg: 0 8px 24px rgba(255,79,163,0.18);
    --shadow-xl: 0 16px 48px rgba(255,79,163,0.25);
    
    --glow-color: rgba(255,79,163,0.25);
    --glow-soft: rgba(255,79,163,0.08);
    
    --theme-name: 'Pink Energy';
}

/* ============================================================
   MIDNIGHT NEON
   ============================================================ */
[data-theme="neon"] {
    --primary: #00E5FF;
    --primary-light: #66F0FF;
    --primary-dark: #00B8D4;
    --primary-rgb: 0, 229, 255;
    
    --secondary: #7C4DFF;
    --secondary-light: #B388FF;
    --secondary-dark: #651FFF;
    --secondary-rgb: 124, 77, 255;
    
    --accent: #00FFC8;
    --accent-light: #66FFD8;
    --accent-dark: #00D4A0;
    --accent-rgb: 0, 255, 200;
    
    --danger: #FF4081;
    --danger-light: #FF80AB;
    --danger-dark: #F50057;
    --danger-rgb: 255, 64, 129;
    
    --bg: #050816;
    --bg-card: #101827;
    --bg-input: #1A2438;
    --bg-hover: #243048;
    
    --text: #E8F0FE;
    --text-secondary: #8899CC;
    --text-muted: #556688;
    
    --border: #1A2A4A;
    --border-light: #0F1A30;
    
    --shadow: 0 4px 12px rgba(0,229,255,0.08);
    --shadow-lg: 0 8px 24px rgba(0,229,255,0.12);
    --shadow-xl: 0 16px 48px rgba(0,229,255,0.18);
    
    --glow-color: rgba(0,229,255,0.15);
    --glow-soft: rgba(0,229,255,0.04);
    
    --theme-name: 'Midnight Neon';
}

/* ============================================================
   AURORA FLOW
   ============================================================ */
[data-theme="aurora"] {
    --primary: #00FF87;
    --primary-light: #66FFB3;
    --primary-dark: #00CC6A;
    --primary-rgb: 0, 255, 135;
    
    --secondary: #4DC9F6;
    --secondary-light: #8ADBFF;
    --secondary-dark: #1A8BC0;
    --secondary-rgb: 77, 201, 246;
    
    --accent: #A855F7;
    --accent-light: #C084FC;
    --accent-dark: #7C3AED;
    --accent-rgb: 168, 85, 247;
    
    --danger: #F472B6;
    --danger-light: #F9A8D4;
    --danger-dark: #DB2777;
    --danger-rgb: 244, 114, 182;
    
    --bg: #0A0A1A;
    --bg-card: rgba(20, 20, 40, 0.75);
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-hover: rgba(255, 255, 255, 0.08);
    
    --text: #F0F4FF;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.04);
    
    --shadow: 0 4px 24px rgba(0, 255, 135, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 255, 135, 0.12);
    --shadow-xl: 0 16px 64px rgba(0, 255, 135, 0.16);
    
    --glow-color: rgba(0, 255, 135, 0.15);
    --glow-soft: rgba(0, 255, 135, 0.04);
    
    --theme-name: 'Aurora Flow';
}

/* ============================================================
   COSMIC GLASS
   ============================================================ */
[data-theme="cosmic"] {
    --primary: #7C3AED;
    --primary-light: #A855F7;
    --primary-dark: #6D28D9;
    --primary-rgb: 124, 58, 237;
    
    --secondary: #06B6D4;
    --secondary-light: #22D3EE;
    --secondary-dark: #0891B2;
    --secondary-rgb: 6, 182, 212;
    
    --accent: #D946EF;
    --accent-light: #E879F9;
    --accent-dark: #C026D3;
    --accent-rgb: 217, 70, 239;
    
    --danger: #EF4444;
    --danger-light: #F87171;
    --danger-dark: #DC2626;
    --danger-rgb: 239, 68, 68;
    
    --bg: #050510;
    --bg-card: rgba(10, 10, 30, 0.8);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-hover: rgba(255, 255, 255, 0.06);
    
    --text: #F0F0FF;
    --text-secondary: #94A3B8;
    --text-muted: #4A5568;
    
    --border: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.02);
    
    --shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
    --shadow-lg: 0 8px 40px rgba(124, 58, 237, 0.12);
    --shadow-xl: 0 16px 64px rgba(124, 58, 237, 0.16);
    
    --glow-color: rgba(124, 58, 237, 0.12);
    --glow-soft: rgba(124, 58, 237, 0.04);
    
    --theme-name: 'Cosmic Glass';
}

/* ============================================================
   LIQUID ENERGY
   ============================================================ */
[data-theme="liquid"] {
    --primary: #00D4FF;
    --primary-light: #66E5FF;
    --primary-dark: #0099CC;
    --primary-rgb: 0, 212, 255;
    
    --secondary: #FF6B6B;
    --secondary-light: #FF9999;
    --secondary-dark: #E53E3E;
    --secondary-rgb: 255, 107, 107;
    
    --accent: #FFD93D;
    --accent-light: #FFE680;
    --accent-dark: #F5A623;
    --accent-rgb: 255, 217, 61;
    
    --danger: #FF6B6B;
    --danger-light: #FF9999;
    --danger-dark: #E53E3E;
    --danger-rgb: 255, 107, 107;
    
    --bg: #0A0A1A;
    --bg-card: rgba(20, 20, 40, 0.7);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-hover: rgba(255, 255, 255, 0.06);
    
    --text: #F0F4FF;
    --text-secondary: #94A3B8;
    --text-muted: #4A5568;
    
    --border: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.02);
    
    --shadow: 0 4px 24px rgba(0, 212, 255, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 212, 255, 0.10);
    --shadow-xl: 0 16px 64px rgba(0, 212, 255, 0.14);
    
    --glow-color: rgba(0, 212, 255, 0.12);
    --glow-soft: rgba(0, 212, 255, 0.04);
    
    --theme-name: 'Liquid Energy';
}

/* ============================================================
   SUNSET PULSE
   ============================================================ */
[data-theme="sunset"] {
    --primary: #FF6B35;
    --primary-light: #FF8A5C;
    --primary-dark: #E85D2C;
    --primary-rgb: 255, 107, 53;
    
    --secondary: #FF4785;
    --secondary-light: #FF7AAA;
    --secondary-dark: #E8356A;
    --secondary-rgb: 255, 71, 133;
    
    --accent: #F7931E;
    --accent-light: #F9A84D;
    --accent-dark: #D47A0E;
    --accent-rgb: 247, 147, 30;
    
    --danger: #FF4785;
    --danger-light: #FF7AAA;
    --danger-dark: #E8356A;
    --danger-rgb: 255, 71, 133;
    
    --bg: #1A0A0A;
    --bg-card: rgba(30, 15, 15, 0.8);
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-hover: rgba(255, 255, 255, 0.06);
    
    --text: #FFF5F0;
    --text-secondary: #D4A08A;
    --text-muted: #8A6050;
    
    --border: rgba(255, 107, 53, 0.10);
    --border-light: rgba(255, 107, 53, 0.05);
    
    --shadow: 0 4px 24px rgba(255, 107, 53, 0.08);
    --shadow-lg: 0 8px 40px rgba(255, 107, 53, 0.12);
    --shadow-xl: 0 16px 64px rgba(255, 107, 53, 0.16);
    
    --glow-color: rgba(255, 107, 53, 0.15);
    --glow-soft: rgba(255, 107, 53, 0.05);
    
    --theme-name: 'Sunset Pulse';
}

/* ============================================================
   HYPER ENERGY
   ============================================================ */
[data-theme="hyper"] {
    --primary: #00E5FF;
    --primary-light: #66F0FF;
    --primary-dark: #00B8D4;
    --primary-rgb: 0, 229, 255;
    
    --secondary: #FF6B00;
    --secondary-light: #FF8F33;
    --secondary-dark: #E85D00;
    --secondary-rgb: 255, 107, 0;
    
    --accent: #FFD700;
    --accent-light: #FFE44D;
    --accent-dark: #F5A623;
    --accent-rgb: 255, 215, 0;
    
    --danger: #FF2D55;
    --danger-light: #FF5A7A;
    --danger-dark: #E81A4A;
    --danger-rgb: 255, 45, 85;
    
    --bg: #0A0A0A;
    --bg-card: #141414;
    --bg-input: #1E1E1E;
    --bg-hover: #282828;
    
    --text: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #4A5568;
    
    --border: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.02);
    
    --shadow: 0 4px 24px rgba(0, 229, 255, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 229, 255, 0.10);
    --shadow-xl: 0 16px 64px rgba(0, 229, 255, 0.14);
    
    --glow-color: rgba(0, 229, 255, 0.15);
    --glow-soft: rgba(0, 229, 255, 0.05);
    
    --theme-name: 'Hyper Energy';
}

/* ============================================================
   iOS GLASS
   ============================================================ */
[data-theme="ios"] {
    --primary: #007AFF;
    --primary-light: #409CFF;
    --primary-dark: #0055CC;
    --primary-rgb: 0, 122, 255;
    
    --secondary: #34C759;
    --secondary-light: #5DD97B;
    --secondary-dark: #28A745;
    --secondary-rgb: 52, 199, 89;
    
    --accent: #FF9500;
    --accent-light: #FFB340;
    --accent-dark: #E68A00;
    --accent-rgb: 255, 149, 0;
    
    --danger: #FF3B30;
    --danger-light: #FF6B60;
    --danger-dark: #E8352A;
    --danger-rgb: 255, 59, 48;
    
    --bg: #F2F2F7;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-input: rgba(255, 255, 255, 0.48);
    --bg-hover: rgba(255, 255, 255, 0.12);
    
    --text: #1C1C1E;
    --text-secondary: #8E8E93;
    --text-muted: #AEAEB2;
    
    --border: rgba(255, 255, 255, 0.30);
    --border-light: rgba(255, 255, 255, 0.15);
    
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.12);
    
    --glow-color: rgba(0, 122, 255, 0.12);
    --glow-soft: rgba(0, 122, 255, 0.04);
    
    --theme-name: 'iOS Glass';
}

/* ============================================================
   GLOBAL STYLES - HARUS PAKAI VARIABLE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    padding-top: var(--header-height, 44px);
    padding-bottom: calc(var(--nav-height, 64px) + var(--safe-bottom, 0px) + 8px);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
    background: var(--primary);
    color: white;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   CARD
   ============================================================ */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    color: var(--text);
}

.card:active {
    transform: scale(0.99);
}

.card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card .card-title svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
}

.card .text-muted,
.card .text-secondary {
    color: var(--text-secondary) !important;
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    border: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 48px;
    min-width: 80px;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--glow-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--glow-color);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-success {
    background: var(--secondary);
    color: white;
}

.btn-success:hover {
    background: var(--secondary-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 36px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn svg {
    stroke: currentColor;
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
}

.badge-primary {
    background: var(--glow-soft);
    color: var(--primary);
}

.badge-success {
    background: rgba(var(--secondary-rgb), 0.1);
    color: var(--secondary);
}

.badge-warning {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
}

.badge-danger {
    background: rgba(var(--danger-rgb), 0.1);
    color: var(--danger);
}

.badge-gray {
    background: var(--bg-input);
    color: var(--text-secondary);
}

/* ============================================================
   FORM
   ============================================================ */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow-soft);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================================
   TOAST
   ============================================================ */
/* ============================================================
   TOAST - FIXED FOR MOBILE
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: calc(var(--nav-height, 64px) + var(--safe-bottom, 0px) + 80px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: 92%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 500;
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { border-left: 4px solid var(--secondary); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--accent); }
.toast-info { border-left: 4px solid var(--primary); }

/* ============================================================
   TOAST - RESPONSIVE
   ============================================================ */
@media (max-width: 576px) {
    #toast-container {
        width: 94%;
        bottom: calc(var(--nav-height, 64px) + var(--safe-bottom, 0px) + 70px);
        max-width: 100%;
        left: 3%;
        transform: none;
    }
    
    .toast {
        font-size: 12px;
        padding: 12px 14px;
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 400px) {
    #toast-container {
        width: 96%;
        bottom: calc(var(--nav-height, 64px) + var(--safe-bottom, 0px) + 60px);
        left: 2%;
        transform: none;
    }
    
    .toast {
        font-size: 11px;
        padding: 10px 12px;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    #toast-container {
        bottom: calc(var(--nav-height, 64px) + var(--safe-bottom, 0px) + 50px);
    }
}

/* ============================================================
   LOADER
   ============================================================ */
#pageLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#pageLoader.active,
#pageLoader.show {
    display: flex !important;
}

#pageLoader .loader-content {
    background: var(--bg-card);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    min-width: 160px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

#pageLoader .loader-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: loaderSpin 0.8s linear infinite;
    margin: 0 auto 12px auto;
}

#pageLoader .loader-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 32px 16px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state .empty-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state .empty-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ============================================================
   PROGRESS
   ============================================================ */
.progress {
    height: 6px;
    background: var(--bg-input);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    background: var(--primary);
    transition: width 0.5s ease;
}

/* ============================================================
   SWITCH / TOGGLE
   ============================================================ */
.toggle-switch {
    display: inline-block;
    width: 44px;
    height: 24px;
    background: var(--bg-input);
    border-radius: 12px;
    border: 2px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-switch .toggle-slider {
    display: block;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle-switch.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--glow-color);
}

.toggle-switch.active .toggle-slider {
    left: 21px;
}

.toggle-switch:active .toggle-slider {
    transform: scale(0.9);
}

/* ============================================================
   SKELETON
   ============================================================ */
.skeleton {
    background: var(--bg-input);
    border-radius: 6px;
    min-height: 16px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary); }
.text-warning { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-white { color: #FFFFFF; }
.text-dark { color: var(--text); }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide { animation: slideUp 0.3s ease; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 360px) {
    .card { padding: 12px; }
    .btn {
        font-size: 13px;
        padding: 10px 16px;
        min-height: 40px;
    }
}

@media (max-width: 400px) {
    #toast-container {
        width: 95%;
        bottom: calc(var(--nav-height, 64px) + var(--safe-bottom, 0px) + 10px);
    }
}

/* ============================================================
   iOS GLASS - TRANSPARENCY FIX
   ============================================================ */
[data-theme="ios"] .card,
[data-theme="ios"] .quick-settings,
[data-theme="ios"] .profile-tabs,
[data-theme="ios"] .stats-summary-item,
[data-theme="ios"] .modal-content {
    background: var(--bg-card) !important;
    backdrop-filter: blur(30px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.4) !important;
    border: 0.5px solid var(--border) !important;
}

[data-theme="ios"] .member-card .card-front,
[data-theme="ios"] .member-card .card-back {
    background: var(--bg-card) !important;
    backdrop-filter: blur(40px) saturate(1.6) !important;
    -webkit-backdrop-filter: blur(40px) saturate(1.6) !important;
}

[data-theme="ios"] .quick-settings-item {
    background: transparent !important;
}

[data-theme="ios"] .profile-tab {
    background: transparent !important;
}

[data-theme="ios"] .profile-tab.active {
    background: rgba(255, 255, 255, 0.60) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* iOS Glass Dark Mode */
@media (prefers-color-scheme: dark) {
    [data-theme="ios"] {
        --bg: #0A0A0A;
        --bg-card: rgba(28, 28, 30, 0.78);
        --bg-input: rgba(28, 28, 30, 0.48);
        --text: #F2F2F7;
        --text-secondary: #8E8E93;
        --text-muted: #636366;
        --border: rgba(255, 255, 255, 0.12);
        --border-light: rgba(255, 255, 255, 0.06);
    }
    
    [data-theme="ios"] .profile-tab.active {
        background: rgba(255, 255, 255, 0.08) !important;
    }
}

/* ============================================================
   iOS GLASS - FIX QR CODE ON CARD BACK
   ============================================================ */
[data-theme="ios"] .card-back {
    background: rgba(28, 28, 30, 0.92) !important;
    backdrop-filter: blur(40px) saturate(1.6) !important;
    -webkit-backdrop-filter: blur(40px) saturate(1.6) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="ios"] .card-back .qr-box {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="ios"] .card-back #qrcode {
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[data-theme="ios"] .card-back #qrcode canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 220px !important;
    max-height: 220px !important;
    margin: 0 auto !important;
}

[data-theme="ios"] .card-back::before {
    display: none !important;
}

[data-theme="ios"] .card-back .status-badge-back {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="ios"] .card-back .last-attendance-section {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="ios"] .card-back .progress-bar-container {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="ios"] .card-back .progress-bar {
    background: #007AFF !important;
}

[data-theme="ios"] .card-back .flip-hint {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.4) !important;
}