        /* =========================================
           CSS STYLES
           ========================================= */
        :root {
            --bg-dark: #0f111a;
            --card-dark: #1a1d2d;
            --gold: #d4af37;
            --gold-light: #f9d976;
            --text-main: #ffffff;
            --text-muted: #8b92a5;
            --accent: #2962ff;
            --green: #00c853;
            --red: #ff3d00;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
        body { background-color: var(--bg-dark); color: var(--text-main); overflow: hidden; }

        /* =========================================
           PREMIUM AUTHENTICATION UI
           ========================================= */
        .auth-wrapper { display: flex; align-items: center; justify-content: center; height: 100vh; width: 100vw; position: absolute; top: 0; left: 0; z-index: 1000; background: radial-gradient(circle at center, #1a1d2d 0%, #0f111a 100%); }
        .auth-card { background: linear-gradient(145deg, #1a1d2d 0%, #11131c 100%); padding: 40px; border-radius: 20px; box-shadow: 0 15px 50px rgba(0,0,0,0.9); border: 1px solid rgba(212, 175, 55, 0.2); width: 100%; max-width: 420px; text-align: center; }
        .auth-card .logo { width: 80px; margin-bottom: 10px; filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4)); }
        .auth-card h2 { color: var(--gold); margin-bottom: 5px; font-weight: 800; letter-spacing: 1px; }
        .auth-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 30px; }
        
        /* =========================================
           INPUT GROUP ICONS (FIXED)
           ========================================= */
        .input-group {
            position: relative;
            margin-bottom: 15px;
        }

        /* Styles ONLY the left-side icons (Envelope & Lock) - FORCED */
        .input-group i:not(.toggle-password) {
            position: absolute !important;
            left: 18px !important;
            top: 50% !important;
            transform: translateY(-50%) !important;
            color: var(--text-muted) !important;
            font-size: 1.1rem !important;
            transition: 0.3s !important;
            pointer-events: none !important;
        }

        /* Styles ONLY the right-side eye icon */
        .input-group .toggle-password {
            position: absolute;
            right: 18px;
            left: auto !important; /* Forces it to stay on the right */
            top: 50%;
            transform: translateY(-50%);
            cursor: pointer;
            color: var(--text-muted);
            font-size: 1.1rem;
            z-index: 10;
            transition: color 0.3s;
        }

        .input-group .toggle-password:hover {
            color: var(--gold);
        }

        .input-group input { width: 100%; padding: 16px 15px 16px 50px !important; background: rgba(0, 0, 0, 0.5) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; color: white !important; border-radius: 12px; outline: none; font-size: 1rem; transition: all 0.3s ease; }
        .input-group input:focus { border-color: var(--gold) !important; box-shadow: 0 0 15px rgba(212, 175, 55, 0.1); }
        .input-group input:focus + i { color: var(--gold); }
        /* Fix Chrome Autofill turning inputs white */
        .input-group input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #11131c inset !important; -webkit-text-fill-color: white !important; }

        /* =========================================
           GOLD PREMIUM AUTH BUTTONS (STRETCHED)
           ========================================= */

        /* Fixes the horizontal squeezing of inputs */
        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
            width: 100%;
            align-items: stretch;
            text-align: left;
        }

        .auth-form .btn.primary { 
            width: 100% !important; /* Forces the button to stretch full width */
            padding: 16px !important; 
            border-radius: 12px !important; 
            font-size: 1.05rem !important; 
            margin-top: 10px !important; 
            background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%) !important; 
            border: none !important; 
            color: #0c0e15 !important; /* Dark blue-black for high contrast and luxury feel */
            font-weight: 700 !important; 
            letter-spacing: 0.5px !important;
            box-shadow: 0 5px 20px rgba(212, 175, 55, 0.25) !important; 
            display: flex !important;
            justify-content: center !important; 
            align-items: center !important;
            transition: all 0.3s ease !important; 
            cursor: pointer !important;
        }

        .auth-form .btn.primary:hover { 
            transform: translateY(-2px) !important; 
            box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5) !important; 
            filter: brightness(1.05); /* Slight bright glow on hover */
        }

        .auth-form .btn.primary:active {
            transform: translateY(1px) !important; /* Click down animation */
        }
                
        .btn-google { background: white !important; color: #444 !important; border: none !important; border-radius: 12px !important; font-size: 1.05rem !important; font-weight: 600 !important; transition: 0.3s !important; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px !important; width: 100%; }
        .btn-google:hover { background: #f8f9fa !important; box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important; transform: translateY(-2px); }
        .google-icon { width: 22px; height: 22px; }

        .auth-switch { color: var(--text-muted); font-size: 0.9rem; margin-top: 25px; }
        .auth-switch span { color: var(--gold); cursor: pointer; font-weight: bold; transition: 0.3s; }
        .auth-switch span:hover { text-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }
        
        .divider { display: flex; align-items: center; text-align: center; color: var(--text-muted); font-size: 0.85rem; margin: 20px 0; }
        .divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid rgba(255,255,255,0.1); }
        .divider:not(:empty)::before { margin-right: .5em; }
        .divider:not(:empty)::after { margin-left: .5em; }

        .app-container { display: flex; height: 100vh; }

        /* Sidebar & Navigation */
        .sidebar {
            width: 260px; background-color: var(--card-dark); padding: 20px 10px; 
            display: flex; flex-direction: column; border-right: 1px solid rgba(212, 175, 55, 0.2);
            overflow-y: auto;
        }

        .logo-container { text-align: center; margin-bottom: 30px; }
        .logo { width: 70px; filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5)); }
        .logo-container h2 { color: var(--gold); margin-top: 10px; font-weight: 800; letter-spacing: 1px; font-size: 1.2rem; }

        .nav-links { list-style: none; width: 100%; }
        .nav-links li {
            padding: 12px 15px; margin-bottom: 5px; cursor: pointer; border-radius: 8px; 
            color: var(--text-muted); transition: all 0.3s ease; display: flex; 
            align-items: center; justify-content: space-between; font-weight: 500;
        }
        .nav-links li .icon-text { display: flex; align-items: center; gap: 12px; }
        .nav-links li:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
        .nav-links li.active-tab {
            background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
            color: var(--gold); border-left: 3px solid var(--gold);
        }

        /* Sub-directories (Dropdowns) */
        .sub-menu { display: none; list-style: none; padding-left: 15px; margin-bottom: 5px; animation: slideDown 0.3s ease; }
        .sub-menu.open { display: block; }
        .sub-menu li { 
            display: flex !important;
            justify-content: flex-start !important;
            gap: 12px !important;
            align-items: center !important;
            padding: 10px 15px; 
            font-size: 0.9rem; 
            color: var(--text-muted); 
            border-left: 1px solid rgba(255,255,255,0.1); 
            border-radius: 0; 
            margin-bottom: 2px;
        }
        .sub-menu li:hover { color: var(--gold); border-left: 1px solid var(--gold); background: transparent; }
        .sub-menu li.active-tab { color: var(--gold); border-left: 2px solid var(--gold); background: transparent; }
        .chevron { transition: transform 0.3s; font-size: 0.8rem; }
        .chevron.rotate { transform: rotate(180deg); color: var(--gold); }

        @keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

        /* Main Content */
        .main-content { 
            flex: 1; 
            padding: 20px 40px; 
            overflow-y: auto; 
            scrollbar-gutter: stable; /* Keeps the workspace perfectly stable during transitions */
            background: var(--bg-dark); 
        }
        
        header { 
            display: flex; 
            justify-content: flex-end; 
            align-items: center; 
            margin-bottom: 20px; 
            position: sticky;
            top: 0;
            z-index: 999;
            padding: 10px 0;
            margin-top: -10px; 
            pointer-events: none; /* Allows clicks to pass through the empty transparent space */
        }
        .user-info { 
            display: flex; 
            align-items: center; 
            gap: 15px; 
            background: var(--card-dark); 
            padding: 8px 20px; 
            border-radius: 30px; 
            border: 1px solid rgba(255,255,255,0.05);
            pointer-events: auto; /* Reactivates clicking for your profile, bell, and logout button */
        }
        .user-info img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
        .badge { background: rgba(212, 175, 55, 0.2); color: var(--gold-light); font-size: 11px; padding: 3px 8px; border-radius: 12px; font-weight: bold; }

        /* View Switching */
        .view { display: none; animation: fadeIn 0.4s ease; }
        .view.active-view { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* Cards & Buttons */
        .card { background: var(--card-dark); padding: 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; }
        .btn { padding: 12px 25px; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
        .btn.primary { background: linear-gradient(45deg, var(--gold), #b8860b); color: #000; }
        .btn.primary:hover { box-shadow: 0 0 15px rgba(212, 175, 55, 0.5); transform: translateY(-2px); }
        .btn.secondary { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid rgba(255,255,255,0.1); }
        .btn.secondary:hover { background: rgba(255,255,255,0.1); }

        /* =========================================
           FORMS & INPUTS (UPDATED)
           ========================================= */
        .main-content input[type="text"], 
        .main-content input[type="email"],
        .main-content input[type="password"],
        .main-content input[type="date"], 
        .main-content input[type="number"], 
        .main-content select { 
            width: 100%; 
            padding: 15px; 
            margin-bottom: 15px; 
            background: #0f111a; 
            border: 1px solid rgba(255, 255, 255, 0.1); 
            color: white; 
            border-radius: 10px; 
            outline: none; 
            box-sizing: border-box; /* Ensures standard padding sizing */
        }

        input:focus, select:focus { border-color: var(--gold); }

        /* Style the live verification badges inside status containers */
        #contact-verify-status .badge,
        #send-verify-status .badge {
            padding: 4px 10px !important;
            font-size: 11px !important;
            border-radius: 6px !important;
            font-weight: 700 !important;
            margin-left: 8px !important;
            display: inline-flex !important;
            align-items: center !important;
            gap: 5px !important;
            vertical-align: middle !important;
        }
        
        /* GLOBAL DASHBOARD STYLES */
        .stats-grid { 
            display: grid; 
            /* Forces exactly 4 equal-width columns */
            grid-template-columns: repeat(4, 1fr); 
            gap: 20px; 
            margin-bottom: 20px; 
        }

        /* Prevents the cards from squishing on smaller laptop or tablet screens */
        @media (max-width: 1300px) {
            .stats-grid { grid-template-columns: repeat(2, 1fr); }
        }
        
        @media (max-width: 768px) {
            .stats-grid { grid-template-columns: 1fr; }
        }

        .stat-box { background: linear-gradient(145deg, #1a1d2d 0%, #11131c 100%); padding: 20px; border-radius: 15px; border: 1px solid rgba(212, 175, 55, 0.2); text-align: center; }
        .stat-box h4 { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px;}
        .stat-box h2 { color: var(--gold); font-size: 1.8rem; }

        /* Prevent table column drift on zoom */
        table {
            table-layout: fixed !important;
            width: 100% !important;
        }

        /* Layout for Charts */
        .charts-grid { 
            display: grid; 
            grid-template-columns: minmax(250px, 1fr) minmax(400px, 2fr); 
            gap: 20px; 
            margin-bottom: 20px; 
            min-height: 260px; 
        }
        .chart-container { background: rgba(0,0,0,0.3); border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; flex-direction: column; position: relative; overflow: hidden; height: 100%;}
        .mock-chart { width: 100%; height: 100%; background: radial-gradient(ellipse at bottom left, rgba(212,175,55,0.1) 0%, transparent 70%); border-bottom: 2px solid var(--gold); position: absolute; bottom: 0; clip-path: polygon(0% 100%, 0% 80%, 10% 85%, 20% 60%, 30% 70%, 40% 40%, 50% 50%, 60% 20%, 70% 30%, 80% 10%, 90% 15%, 100% 0%, 100% 100%); opacity: 0.5;}
        
        .ad-space { width: 100%; height: 90px; background: linear-gradient(45deg, #2a0845, #6441A5); border-radius: 15px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.8); border: 1px dashed rgba(255,255,255,0.3); cursor: pointer; }

        /* MY WALLET STYLES */
        .wallet-header { text-align: center; background: linear-gradient(145deg, #1a1d2d 0%, #11131c 100%); border: 1px solid rgba(212, 175, 55, 0.3); position: relative; overflow: hidden; padding: 40px 40px 60px 40px; border-radius: 20px; margin-bottom: 20px;}
        .gold-text { font-size: 3.5rem; margin: 10px 0; background: linear-gradient(to right, var(--gold), var(--gold-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
        .wallet-address-box { background: rgba(0,0,0,0.4); padding: 15px 25px; border-radius: 10px; display: inline-flex; align-items: center; gap: 15px; border: 1px solid rgba(255,255,255,0.1); margin-top: 15px;}
        .address-text { font-family: monospace; font-size: 1.2rem; color: var(--text-muted); letter-spacing: 2px; }
        .transfer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

        /* Profile Layout */
        .profile-upload-section { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; background: rgba(0,0,0,0.2); padding: 20px; border-radius: 15px; }
        .profile-upload-section img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }

        /* Chat Layout */
        .chat-container { display: flex; flex-direction: column; height: 65vh; }
        .chat-box { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 15px; }
        .chat-message { max-width: 100%; padding: 12px 18px; border-radius: 15px; background: rgba(255,255,255,0.05); font-size: 0.95rem; }
        .chat-message.self { align-self: flex-end; background: rgba(212, 175, 55, 0.15); border: 1px solid rgba(212, 175, 55, 0.3); border-bottom-right-radius: 2px; }
        .chat-message.other { align-self: flex-start; border-bottom-left-radius: 2px; }
        .chat-input { display: flex; gap: 10px; margin-top: 15px; }
        .chat-input input { flex: 1; margin: 0; }

        /* Exchange Layout */
        .exchange-rates { display: flex; gap: 20px; margin-bottom: 20px; }
        .rate-box { flex: 1; background: rgba(0,0,0,0.3); padding: 20px; border-radius: 15px; text-align: center; border: 1px solid rgba(255,255,255,0.05); }
        .rate-box h3 { color: var(--text-muted); font-size: 1rem; margin-bottom: 10px; }
        .rate-box .price { font-size: 1.8rem; color: var(--gold); font-weight: bold; }

        /* =========================================
           QR SCANNER UI FIX
           ========================================= */
        #reader { border: none !important; background: transparent !important; }
        #reader button { 
            background: linear-gradient(45deg, var(--gold), #b8860b) !important; 
            color: #000 !important; 
            padding: 10px 20px !important; 
            border: none !important; 
            border-radius: 8px !important; 
            font-weight: bold !important; 
            cursor: pointer !important; 
            margin-bottom: 10px !important; 
        }
        #reader a { color: var(--text-muted) !important; text-decoration: none !important; font-size: 0.9rem !important; }
        #reader a:hover { color: var(--gold) !important; }
        #reader span { color: var(--text-main) !important; }

        /* =========================================
        AT COIN PREMIUM CUSTOM MODAL
        ========================================= */
        .alert-overlay {
            position: fixed;
            top: 0; left: 0;
            width: 100vw; height: 100vh;
            background: rgba(15, 17, 26, 0.75); 
            backdrop-filter: blur(8px); 
            display: flex; align-items: center; justify-content: center;
            z-index: 1000000; 
            opacity: 0; transition: opacity 0.2s ease;
            pointer-events: none;
        }
        .alert-overlay.show {
            opacity: 1;
            pointer-events: auto;
        }
        .alert-box {
            background: linear-gradient(145deg, #1a1d2d 0%, #11131c 100%);
            border: 1px solid rgba(212, 175, 55, 0.3);
            border-radius: 20px;
            padding: 35px 25px;
            width: 90%; max-width: 380px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
            transform: scale(0.85); transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.2);
        }
        .alert-overlay.show .alert-box {
            transform: scale(1);
        }
        .alert-icon {
            font-size: 3.5rem;
            margin-bottom: 20px;
            filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.2));
        }
        .alert-title {
            color: var(--text-main);
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 12px;
            letter-spacing: 0.5px;
        }
        .alert-message {
            color: var(--text-muted);
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 25px;
        }
        .alert-btn {
            background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
            border: none;
            color: #0c0e15;
            padding: 14px 28px;
            font-weight: 700;
            border-radius: 12px;
            cursor: pointer;
            font-size: 0.95rem;
            box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
            transition: all 0.3s ease;
            width: 100%;
            letter-spacing: 0.5px;
        }
        .alert-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
        }
        .alert-btn:active {
            transform: translateY(1px);
        }

        /* Keep main directory headers gold when hovered or open */
        .nav-item.has-submenu:hover {
            color: var(--gold) !important;
        }
        .nav-item.has-submenu.menu-open {
            color: var(--gold) !important;
            background: rgba(255, 255, 255, 0.02);
        }

        /* =========================================
           PREMIUM ORBITAL LOADER STYLES
           ========================================= */
        .loader-wrapper {
            position: fixed;
            top: 0; left: 0;
            width: 100vw; height: 100vh;
            background: radial-gradient(circle at center, #1a1d2d 0%, #0f111a 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 15000; /* Overlays authentication screen on initial load */
            opacity: 1;
            transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
        }

        /* Smooth fade-out once Firebase state is determined */
        .loader-wrapper.fade-out {
            opacity: 0;
            pointer-events: none;
            transform: scale(1.05);
        }

        /* 1. Scale up the orbital path ring */
        .orbit-ring {
            position: absolute;
            width: 300px; /* Increased from 220px */
            height: 300px; /* Increased from 220px */
            border: 1.5px dashed rgba(212, 175, 55, 0.2); /* Thicker line */
            border-radius: 50%;
            z-index: 1;
            box-shadow: 0 0 20px rgba(212, 175, 55, 0.03) inset;
        }

        /* 2. Scale up the rotating container */
        .orbit-container {
            position: absolute;
            width: 300px; /* Increased from 220px */
            height: 300px; /* Increased from 220px */
            z-index: 2;
            animation: orbit-spin 22s linear infinite;
        }

        /* 3. Scale up individual icons and adjust their orbit distance */
        .orbit-icon {
            position: absolute;
            top: 50%; left: 50%;
            width: 52px; /* Increased from 38px */
            height: 52px; /* Increased from 38px */
            margin-top: -26px; /* Centered accurately on the ring (half of 52px) */
            margin-left: -26px; /* Centered accurately on the ring (half of 52px) */
            display: flex; align-items: center; justify-content: center;
            background: rgba(15, 17, 26, 0.95);
            border: 1.5px solid rgba(212, 175, 55, 0.4);
            color: var(--gold-light);
            border-radius: 50%;
            font-size: 1.35rem; /* Larger icon icon size (from 1rem) */
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.15);
            
            /* Orbit translation radius expanded to -150px (half of the 300px ring) */
            transform: rotate(calc(360deg / 7 * var(--i))) translateY(-150px) rotate(calc(-360deg / 7 * var(--i)));
        }

        /* Upright counter-rotation to keep the icons always facing up */
        .orbit-icon i {
            animation: icon-upright-counter 22s linear infinite;
        }

        /* Centered floating AT Coin logo */
        .loader-center {
            position: absolute;
            width: 125px; /* Increased from 85px */
            height: 125px; /* Increased from 85px */
            z-index: 3;
            display: flex; align-items: center; justify-content: center;
        }
        .loader-coin {
            width: 100%; height: 100%;
            filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.5));
            animation: coin-pulse 2s ease-in-out infinite alternate;
        }

        /* Soft gold pulse on status text */
        .loader-text {
            margin-top: 35px;
            color: var(--text-muted);
            font-size: 1rem;
            letter-spacing: 2px;
            font-weight: 500;
            text-transform: uppercase;
            text-align: center;
            filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
        }
        .loader-text span {
            color: var(--gold);
            font-weight: bold;
            animation: dot-blink 1.4s infinite both;
        }
        .loader-text span:nth-child(2) { animation-delay: .2s; }
        .loader-text span:nth-child(3) { animation-delay: .4s; }

        /* =========================================
           KEYFRAME ANIMATIONS
           ========================================= */
        @keyframes orbit-spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        @keyframes icon-upright-counter {
            from { transform: rotate(0deg); }
            to { transform: rotate(-360deg); }
        }

        @keyframes coin-pulse {
            0% { transform: scale(0.96); filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.45)); }
            100% { transform: scale(1.04); filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.8)); }
        }

        @keyframes dot-blink {
            0% { opacity: .2; }
            20% { opacity: 1; }
            100% { opacity: .2; }
        }

        /* =========================================
           DASHBOARD STANDING & STATUS DOTS
           ========================================= */
        .status-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            display: inline-block;
            background-color: var(--green);
            box-shadow: 0 0 8px var(--green);
            margin-left: 8px;
            animation: pulse-dot 1.5s infinite alternate;
            transition: all 0.3s ease;
        }
        .status-dot.offline {
            background-color: var(--red);
            box-shadow: 0 0 8px var(--red);
        }
        @keyframes pulse-dot {
            0% { transform: scale(0.85); opacity: 0.65; }
            100% { transform: scale(1.1); opacity: 1; }
        }

        .status-btn {
            background: rgba(0, 0, 0, 0.45);
            border: 1px solid var(--green);
            color: var(--green);
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.8rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
            box-shadow: 0 0 10px rgba(0, 200, 83, 0.08);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            flex-shrink: 0;
        }
        .status-btn:hover {
            transform: translateY(-2px);
            background: rgba(0, 200, 83, 0.12);
            box-shadow: 0 0 15px rgba(0, 200, 83, 0.25);
        }
        .status-btn.warning {
            border-color: #ffa000;
            color: #ffa000;
            box-shadow: 0 0 10px rgba(255, 160, 0, 0.08);
        }
        .status-btn.warning:hover {
            background: rgba(255, 160, 0, 0.12);
            box-shadow: 0 0 15px rgba(255, 160, 0, 0.25);
        }
        .status-btn.banned {
            border-color: var(--red);
            color: var(--red);
            box-shadow: 0 0 10px rgba(255, 61, 0, 0.08);
        }
        .status-btn.banned:hover {
            background: rgba(255, 61, 0, 0.12);
            box-shadow: 0 0 15px rgba(255, 61, 0, 0.25);
        }

        /* Dynamic Payment Instruction box */
        .payment-instructions {
            background: rgba(0, 0, 0, 0.25);
            padding: 12px 15px;
            border-radius: 8px;
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 15px;
            border-left: 3px solid var(--gold);
            line-height: 1.45;
        }

        /* Premium dropdown for years */
        .year-filter-select {
            background: rgba(0,0,0,0.3) !important;
            color: var(--gold) !important;
            border: 1px solid var(--gold) !important;
            border-radius: 6px !important;
            padding: 4px 10px !important;
            font-size: 0.75rem !important;
            cursor: pointer;
            outline: none;
        }
        .year-filter-select option {
            background: var(--card-dark) !important;
            color: var(--text-main) !important;
        }

        .live-badge {
            background: rgba(0, 200, 83, 0.15) !important; 
            color: var(--green) !important;
            padding: 5px 15px !important;
            border-radius: 20px !important;
            font-size: 0.75rem !important;
            font-weight: bold !important;
            min-width: 120px !important; /* Forces it to stretch */
            text-align: center !important;
            display: inline-block !important;
            margin-bottom: 15px;
        }

        
        .live-data {
            background: rgba(212, 175, 55, 0.15) !important; 
            color: var(--gold) !important;
            padding: 5px 15px !important;
            border-radius: 20px !important;
            font-size: 0.75rem !important;
            font-weight: bold !important;
            min-width: 120px !important; /* Forces it to stretch */
            text-align: center !important;
            display: inline-block !important;
            margin-bottom: 15px;
        }

        /* Crop only the TradingView link/logo off the right edge of the ticker tape */
        #dashboard .tradingview-widget-container {
            position: relative;
            overflow: hidden;
            width: 100%;
        }
        #dashboard .tradingview-widget-container iframe {
            width: calc(100% + 112px) !important;
        }

        /* Force the select box to match your input fields */
#noti-user-select {
    width: 100% !important;
    padding: 15px !important;
    background: #0f111a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 10px !important;
    outline: none !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Style the dropdown options themselves */
#noti-user-select option {
    background-color: #1a1d2d !important;
    color: white !important;
    padding: 10px !important;
}

/* Updated Modal Container */
#liveness-modal {
    display: none; 
    position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh; 
    background: rgba(0,0,0,0.95); 
    z-index: 20000;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
}

.camera-frame {
    width: 300px; 
    height: 300px;
    border: 4px solid var(--gold);
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: #000;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
           PREMIUM VIRTUAL CREDIT CARD
           ========================================= */
        .at-virtual-card {
            width: 400px;  /* Slightly wider to fit the numbers */
            height: 240px; /* Slightly taller to give breathing room */
            background: linear-gradient(135deg, #1a1d2d 0%, #0a0c13 100%);
            border-radius: 20px;
            border: 1px solid rgba(212, 175, 55, 0.3);
            box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 20px rgba(212, 175, 55, 0.05);
            position: relative;
            overflow: hidden;
            padding: 25px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            flex-shrink: 0;
            margin: 0 auto; 
        }

        .at-virtual-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 25px 60px rgba(212, 175, 55, 0.15), inset 0 0 30px rgba(212, 175, 55, 0.1);
        }

        /* Large Faint Watermark Logo on the Right */
        .card-watermark {
            position: absolute;
            right: -40px;
            bottom: -40px;
            width: 220px !important;
            opacity: 0.06;
            pointer-events: none;
            filter: grayscale(100%);
            z-index: 1;
        }

        /* Scattered Small Watermark Coins */
        .small-watermark {
            position: absolute;
            opacity: 0.18; /* High enough to be visible, low enough to blend in */
            filter: grayscale(100%); /* This matches the exact color of the big logo! */
            pointer-events: none;
            z-index: 1;
        }
        .sw-1 { width: 35px !important; top: 25%; left: 35%; }
        .sw-2 { width: 25px !important; top: 46%; left: 33%; }
        .sw-3 { width: 40px !important; top: 15%; left: 55%; }
        .sw-4 { width: 30px !important; top: 45%; left: 50%; }
        .sw-5 { width: 45px !important; top: 70%; left: 45%; }
        .sw-6 { width: 24px !important; top: 38%; left: 22%; } 

        /* Top Row: Small Logo + Brand */
        .card-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            z-index: 2;
        }
        
        .card-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .card-brand img { width: 45px !important; height: auto !important; } 
        .card-brand span { color: #ffffff !important; font-weight: 800 !important; letter-spacing: 2px !important; font-size: 1.1rem !important; }
        .card-type { color: #d4af37 !important; font-size: 0.75rem !important; text-transform: uppercase !important; letter-spacing: 2px !important; font-weight: bold !important; }

        /* EMV Gold Chip */
        .card-chip {
            width: 45px;
            height: 35px;
            min-height: 35px; /* Forces browser to NEVER squash it */
            flex-shrink: 0;   /* Prevents flexbox from flattening it */
            background: linear-gradient(135deg, #f9d976 0%, #b8860b 100%);
            border-radius: 6px;
            position: relative;
            z-index: 2;
            box-shadow: 0 2px 5px rgba(0,0,0,0.5);
            overflow: hidden;
            border: 1px solid rgba(0,0,0,0.2);
            margin-top: 15px;
        }

        .card-chip::before { content: ''; position: absolute; width: 100%; height: 1px; background: rgba(0,0,0,0.3); top: 30%; }
        .card-chip::after { content: ''; position: absolute; width: 100%; height: 1px; background: rgba(0,0,0,0.3); top: 70%; }

        /* Card Numbers */
        .card-number {
            font-family: 'Courier New', Courier, monospace !important;
            font-size: 1.45rem !important; /* Scaled down slightly to fit */
            color: #ffffff !important;
            letter-spacing: 3px !important; /* Tightened spacing slightly */
            font-weight: 700 !important; /* <-- ADDED: Makes the numbers bold & embossed */
            text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;
            z-index: 2;
            margin-top: 15px;
            text-align: left !important;
            white-space: nowrap !important; /* Forces the numbers to stay on ONE line */
        }

        /* Bottom Row: Name and Expiry */
        .card-bottom {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            z-index: 2;
        }

        .card-holder {
            display: flex;
            flex-direction: column;
            text-align: left;
        }
        .card-label { color: #8b92a5 !important; font-size: 0.6rem !important; text-transform: uppercase !important; letter-spacing: 1px !important; margin-bottom: 3px !important; }
        .card-name { color: #ffffff !important; font-size: 1.1rem !important; text-transform: uppercase !important; letter-spacing: 2px !important; font-weight: 600 !important; text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;}
        .card-expiry { color: #ffffff !important; font-size: 0.9rem !important; font-family: 'Courier New', Courier, monospace !important; font-weight: bold !important;}

        /* Frosted Glass Lock Overlay for Level 1 */
        .card-lock-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(15, 17, 26, 0.85); /* Dark translucent background */
            backdrop-filter: blur(6px); /* Frosted glass effect */
            z-index: 20;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            color: var(--text-muted); cursor: pointer; transition: all 0.3s ease;
        }
        .card-lock-overlay:hover {
            background: rgba(15, 17, 26, 0.7);
            color: var(--gold);
        }
        .card-lock-overlay i { font-size: 2.5rem; margin-bottom: 12px; }
        .card-lock-overlay span { font-weight: 700; font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; }

        /* Constrain high-res QR codes on screen to keep them sharp and properly sized */
        #qrcode-container img, 
        #qrcode-container canvas {
            width: 130px !important;
            height: 130px !important;
            display: block;
        }

        #card-back-qr img, 
        #card-back-qr canvas {
            width: 65px !important; /* Increased from 50px to match the new 75px box with padding */
            height: 65px !important; /* Increased from 50px to match the new 75px box with padding */
            display: block;
        }


        /* VIP / Business Level 3 Card - Updated with Custom Background */
        .at-virtual-card.vip {
            background-image: url('https://firebasestorage.googleapis.com/v0/b/at-coin-bdc49.firebasestorage.app/o/cardlogo%2Fbusiness-card-back.webp?alt=media&token=08fdb7df-3108-40d8-a91d-b98056da2b30') !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
            box-shadow: 0 20px 40px rgba(0,0,0,0.5) !important;
        }
        .at-virtual-card.vip .card-brand span, 
        .at-virtual-card.vip .card-number,
        .at-virtual-card.vip .card-name,
        .at-virtual-card.vip .card-expiry {
            color: #0f111a !important; /* Dark blue/black text */
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5) !important; /* White glowing shadow instead of black */
        }
        .at-virtual-card.vip .card-label {
            color: #333333 !important;
            font-weight: 800 !important;
        }
        .at-virtual-card.vip .card-type {
            color: #0f111a !important;
            font-weight: 900 !important;
            letter-spacing: 3px !important;
            /* Matches the clean, subtle embossed edge of the AT COIN logo and numbers */
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5) !important;
        }
        /* Make watermarks crisp and etched into the gold */
        .at-virtual-card.vip .small-watermark,
        .at-virtual-card.vip .card-watermark {
            filter: grayscale(100%) contrast(150%) !important; /* Removes color but keeps the sharp details */
            mix-blend-mode: multiply !important; /* Burns the coin's details naturally into the gold */
            opacity: 0.12 !important; /* Perfect etching transparency */
        }
        /* Platinum/Silver EMV chip for the Gold card */
        .at-virtual-card.vip .card-chip {
            background: linear-gradient(135deg, #ffffff 0%, #b0bec5 100%) !important;
            box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
        }

        /* Premium / Silver Level 2 Card - Updated with Custom Background */
        .at-virtual-card.premium {
            background-image: url('https://firebasestorage.googleapis.com/v0/b/at-coin-bdc49.firebasestorage.app/o/cardlogo%2Fpremiumsilvercard.jpg?alt=media&token=ce1fb338-1691-4dbb-aef1-f9f6e3d99f40') !important;
            background-size: cover !important;
            background-position: center !important;
            background-repeat: no-repeat !important;
            border: 1px solid rgba(255, 255, 255, 0.4) !important;
            box-shadow: 0 20px 50px rgba(0,0,0,0.6) !important;
        }
        /* Style text/details beautifully to ensure high readability on the silver card */
        .at-virtual-card.premium .card-brand span, 
        .at-virtual-card.premium .card-number,
        .at-virtual-card.premium .card-name,
        .at-virtual-card.premium .card-expiry {
            color: #11131c !important; /* Elegant slate dark text */
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6) !important;
        }
        .at-virtual-card.premium .card-label {
            color: #4a4a4a !important;
            font-weight: 800 !important;
        }
        .at-virtual-card.premium .card-type {
            color: #1a237e !important; /* Deep royal blue for PREMIUM type contrast */
            font-weight: 900 !important;
            letter-spacing: 3px !important;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5) !important;
        }
        .at-virtual-card.premium .support-text {
            color: #333333 !important;
            font-weight: 600;
        }
        .at-virtual-card.premium .small-watermark,
        .at-virtual-card.premium .card-watermark {
            filter: grayscale(100%) contrast(120%) !important;
            mix-blend-mode: multiply !important;
            opacity: 0.15 !important;
        }
        /* Gold EMV chip for a luxurious contrast on the silver background */
        .at-virtual-card.premium .card-chip {
            background: linear-gradient(135deg, #f9d976 0%, #b8860b 100%) !important;
            box-shadow: 0 2px 5px rgba(0,0,0,0.4) !important;
        }

        /* 3D FLIP CONTAINER */
        .flip-card-container {
            width: 400px;
            height: 240px;
            perspective: 1000px;
            margin: 0 auto;
            flex-shrink: 0;
            cursor: pointer; /* Tells the user they can click it */
        }
        .flip-card-inner {
            width: 100%;
            height: 100%;
            position: relative;
            transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy smooth flip */
            transform-style: preserve-3d;
        }
        /* When we add the 'is-flipped' class, it rotates */
        .flip-card-container.is-flipped .flip-card-inner {
            transform: rotateY(180deg);
        }
        /* Position both sides */
        .at-virtual-card.front, .at-virtual-card.back {
            position: absolute !important;
            top: 0; left: 0;
            width: 100% !important; height: 100% !important;
            backface-visibility: hidden; /* Hides the back when looking at the front */
            margin: 0 !important; 
        }
        
        /* BACK OF CARD STYLES */
        .at-virtual-card.back {
            transform: rotateY(180deg);
            padding: 0 !important; /* Edge to edge for the mag stripe */
            display: flex;
            flex-direction: column;
        }
        .mag-stripe {
            width: 100%;
            height: 45px;
            background: #000;
            margin-top: 25px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.5);
        }
        .back-content {
            padding: 15px 25px;
            display: flex;
            flex-direction: column;
            gap: 15px;
            flex: 1;
        }
        .signature-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .signature-strip {
            background-color: #e0e0e0;
            /* Replace failing gradient with a 100% canvas-supported SVG stripe pattern */
            background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M-2 10L10 -2M-2 2L2 -2M6 10L10 6' stroke='%23cccccc' stroke-width='2'/%3E%3C/svg%3E");
            height: 35px;
            flex: 1;
            display: flex;
            align-items: center;
            padding: 0 10px;
            font-family: 'Brush Script MT', 'Segoe Print', cursive; /* Looks like handwriting */
            font-size: 1.2rem;
            color: #333;
            border-radius: 4px;
        }
        
        .cvv-box {
            background-color: #ffffff !important; /* Force pure white for canvas */
            height: 35px;
            padding: 0 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            color: #000000 !important;
            font-family: 'Courier New', Courier, monospace;
            font-weight: bold;
            font-size: 1rem;
            /* Replace failing inset shadow with a solid inner border */
            border: 1px solid #b0bec5; 
            box-shadow: none !important; 
            position: relative;
            z-index: 2;
        }
        .back-bottom {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-top: auto;
            margin-bottom: 10px;
        }
        .support-text {
            color: #8b92a5;
            font-size: 0.65rem;
            max-width: 65%;
            line-height: 1.5;
        }
        .at-virtual-card.vip .support-text { color: #333 !important; font-weight: 600; }
        
        .small-qr-box {
            width: 75px; /* Increased from 60px */
            height: 75px; /* Increased from 60px */
            background: #fff;
            padding: 5px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0,0,0,0.5);
            display: flex; align-items: center; justify-content: center;
        }

        /* =========================================
           FAQ ACCORDION STYLES
           ========================================= */
        .faq-item {
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            margin-bottom: 12px;
            transition: all 0.3s ease;
        }
        .faq-item:hover { border-color: rgba(212, 175, 55, 0.3); }
        .faq-question {
            padding: 18px 20px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--text-main);
            font-weight: 600;
            font-size: 0.95rem;
        }
        .faq-question i { transition: transform 0.3s ease; color: var(--gold); }
        .faq-answer {
            display: none;
            padding: 0 20px 20px 20px;
            color: var(--text-muted);
            font-size: 0.85rem;
            line-height: 1.6;
            border-top: 1px dashed rgba(255,255,255,0.05);
            margin-top: 5px;
            padding-top: 15px;
        }
        .faq-item.active .faq-answer { display: block; animation: fadeIn 0.4s ease; }
        .faq-item.active .faq-question i { transform: rotate(180deg); }

        /* =========================================
           RICH TEXT LEGAL EDITOR STYLES
           ========================================= */
        .editor-toolbar {
            display: flex; gap: 8px; background: #1a1d2d; padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px 12px 0 0; border-bottom: none; flex-wrap: wrap; align-items: center;
        }
        .editor-btn {
            background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); padding: 8px 12px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; font-family: 'Segoe UI', Tahoma, sans-serif;
        }
        .editor-btn:hover { background: rgba(212,175,55,0.15); color: var(--gold); border-color: var(--gold); }
        .editor-content {
            background: #0f111a; border: 1px solid rgba(255,255,255,0.1); border-radius: 0 0 12px 12px; min-height: 450px; padding: 30px; color: var(--text-main); outline: none; overflow-y: auto; line-height: 1.7; font-size: 0.95rem;
        }
        .editor-content:focus { border-color: var(--gold); box-shadow: inset 0 0 15px rgba(212,175,55,0.05); }

        /* Ensure the editor font size dropdown options match the dark theme */
        .custom-font-size option {
            background-color: #1a1d2d;
            color: white;
            font-size: 0.9rem;
        }
        
        /* Render styles for both the Editor AND User Views */
        .legal-dynamic-content h2, .editor-content h2 { color: var(--gold); margin: 25px 0 15px 0; font-size: 1.4rem; font-weight: 800; }
        .legal-dynamic-content h3, .editor-content h3 { color: var(--gold-light); margin: 20px 0 10px 0; font-size: 1.15rem; font-weight: 700; }
        .legal-dynamic-content p, .editor-content p { margin-bottom: 15px; }
        .legal-dynamic-content ul, .editor-content ul { padding-left: 25px; margin-bottom: 15px; list-style-type: disc; }
        .legal-dynamic-content ol, .editor-content ol { padding-left: 25px; margin-bottom: 15px; list-style-type: decimal; }
        .legal-dynamic-content a, .editor-content a { color: #2962ff; text-decoration: underline; font-weight: bold; cursor: pointer; }

        .card-locked-ui {
            filter: grayscale(1) brightness(0.7);
            pointer-events: none;
            transition: all 0.3s ease;
        }

       /* Completely hide all default Google Translate widgets, frames, and bars */
        iframe.goog-te-banner-frame,
        .goog-te-banner-frame,
        .goog-te-balloon-frame,
        .skiptranslate,
        .goog-te-gadget,
        .goog-logo-link,
        #google_translate_element,
        [class*="VIpgJd"],
        [id*="VIpgJd"],
        iframe[class*="goog"],
        iframe[id*="goog"],
        iframe[class*="translate"],
        iframe[id*="translate"] {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            pointer-events: none !important;
            width: 0px !important;
            height: 0px !important;
            position: absolute !important;
            top: -9999px !important;
            left: -9999px !important;
        }
        body {
            top: 0px !important;
            position: static !important;
        }

        /* Completely hide Google's floating hover bubbles, tooltips, and loading spinners */
        #goog-gt-tt,
        .goog-te-balloon-frame,
        .goog-tooltip,
        .goog-tooltip:hover,
        .goog-te-spinner-pos,
        .goog-te-gadget-icon,
        .goog-te-spinner,
        .goog-te-spinner-frame {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            pointer-events: none !important;
            width: 0px !important;
            height: 0px !important;
        }
        /* Prevent Google Translate from triggering hover scripts that cause flickering/disappearing text */
        font {
            pointer-events: none !important;
        }

        /* Ensure Google's highlight class never overrides your text color */
        .goog-text-highlight {
            background-color: transparent !important;
            box-shadow: none !important;
            color: inherit !important;
        }

        /* Completely block the Google Translate Chrome Extension icon from showing on your site */
        #gtx-trans,
        .gtx-trans,
        [id*="gtx-trans"],
        [class*="gtx-trans"] {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        
        /* =========================================
           CUSTOM SELECT DROPDOWN OPTION STYLES
           ========================================= */
        #custom-language-select {
            color: var(--text-muted) !important;
            font-family: 'Segoe UI', sans-serif !important;
            font-weight: 500 !important;
        }
        #custom-language-select:hover {
            border-color: var(--gold) !important;
            color: var(--gold) !important;
        }
        #custom-language-select option {
            background-color: #1a1d2d !important;
            color: var(--text-main) !important;
            font-family: 'Segoe UI', sans-serif !important;
            font-size: 0.85rem !important;
            padding: 10px !important;
        }
