/* ===========================
   VSAT Hedge - Global Styles
   Premium Dark + Gold Theme
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0f0f0f;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --bg-input: #111111;
    --border-color: #2a2215;
    --border-accent: #c9a227;
    --text-primary: #f0e6d2;
    --text-secondary: #a09880;
    --text-muted: #6b6150;
    --accent-primary: #c9a227;
    --accent-secondary: #e6c44d;
    --accent-gradient: linear-gradient(135deg, #c9a227, #d4a017, #e6c44d);
    --accent-glow: rgba(201, 162, 39, 0.25);
    --gold: #c9a227;
    --gold-light: #e6c44d;
    --gold-dark: #8a6d14;
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(201, 162, 39, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===========================
   Animated Background
   =========================== */
.bg-animation {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-animation::before {
    content: '';
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(201,162,39,0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(201,162,39,0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(201,162,39,0.02) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}
@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.grid-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(201,162,39,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,162,39,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ===========================
   Auth Pages (Login/Register)
   =========================== */
.auth-container {
    position: relative; z-index: 1;
    display: flex; min-height: 100vh;
    align-items: center; justify-content: center;
    padding: 20px;
}

.auth-wrapper {
    display: flex; max-width: 520px; width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(201,162,39,0.08), 0 0 80px rgba(201,162,39,0.04);
    border: 1px solid var(--border-accent);
    flex-direction: column;
}

.auth-wrapper.with-branding {
    max-width: 1100px;
    flex-direction: row;
}

.auth-branding {
    flex: 1;
    background: linear-gradient(160deg, #1a1400, #0f0d06);
    padding: 60px 50px;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
    min-height: 600px;
    border-right: 1px solid var(--border-color);
}
.auth-branding::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.auth-branding .brand-content { position: relative; z-index: 1; }
.auth-branding .logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 38px; font-weight: 800;
    color: var(--gold-light); margin-bottom: 8px; letter-spacing: 2px;
    text-transform: uppercase;
}
.auth-branding .logo span { opacity: 0.6; font-weight: 400; }
.auth-branding .tagline {
    font-size: 16px; color: var(--text-secondary);
    margin-bottom: 36px; line-height: 1.7;
}
.auth-branding .features { list-style: none; }
.auth-branding .features li {
    color: var(--text-secondary); padding: 10px 0; font-size: 14px;
    display: flex; align-items: center; gap: 12px;
}
.auth-branding .features li .icon {
    width: 32px; height: 32px;
    background: rgba(201,162,39,0.12); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--gold-light);
}

.auth-form-section {
    flex: 1; padding: 48px 40px;
    display: flex; flex-direction: column; justify-content: center;
}
.auth-form-section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px; font-weight: 700;
    margin-bottom: 6px; color: var(--gold-light);
    text-transform: uppercase; letter-spacing: 1px;
}
.auth-form-section .subtitle {
    color: var(--text-muted); margin-bottom: 28px; font-size: 14px;
}

/* ===========================
   Form Elements
   =========================== */
.form-group { margin-bottom: 18px; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

.form-group label {
    display: block; font-size: 12px; font-weight: 700;
    color: var(--gold); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 13px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(201,162,39,0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px; font-family: 'Inter', sans-serif;
    transition: var(--transition); outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
.form-group input::placeholder { color: var(--text-muted); }

.form-group .input-icon { position: relative; }
.form-group .input-icon input { padding-left: 42px; }
.form-group .input-icon svg {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
    width: 16px; height: 16px;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 13px 26px; border: none;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 700;
    font-family: 'Inter', sans-serif; cursor: pointer;
    transition: var(--transition); text-decoration: none;
    white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--accent-gradient); color: #0a0a0a;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(201,162,39,0.35);
    color: #0a0a0a;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    color: var(--gold-light);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; transform: translateY(-1px); }

.btn-outline {
    background: transparent; color: var(--gold);
    border: 1px solid var(--gold);
}
.btn-outline:hover {
    background: rgba(201,162,39,0.1); color: var(--gold-light);
}

.btn-gold {
    background: var(--accent-gradient); color: #0a0a0a;
    font-weight: 700;
}
.btn-gold:hover { box-shadow: 0 4px 20px var(--accent-glow); color: #0a0a0a; }

.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-lg { padding: 16px 32px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===========================
   Alerts
   =========================== */
.alert {
    padding: 14px 20px; border-radius: var(--radius-sm);
    margin-bottom: 20px; font-size: 13px;
    display: flex; align-items: center; gap: 10px;
}
.alert-success { background: var(--success-bg); border: 1px solid rgba(34,197,94,0.3); color: var(--success); }
.alert-error { background: var(--danger-bg); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); }
.alert-warning { background: var(--warning-bg); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }
.alert-info { background: rgba(201,162,39,0.08); border: 1px solid rgba(201,162,39,0.2); color: var(--gold-light); }

/* ===========================
   Dashboard Layout
   =========================== */
.dashboard-wrapper {
    display: flex; min-height: 100vh; position: relative; z-index: 1;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100; transition: var(--transition);
}
.sidebar .sidebar-logo { padding: 0 24px; margin-bottom: 32px; }
.sidebar .sidebar-logo h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px; font-weight: 800;
    color: var(--gold-light); letter-spacing: 2px;
    text-transform: uppercase;
}
.sidebar .sidebar-logo p {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
    text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-nav { flex: 1; padding: 0 12px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; color: var(--text-secondary);
    text-decoration: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500;
    transition: var(--transition); margin-bottom: 2px;
}
.sidebar-nav a:hover {
    background: rgba(201,162,39,0.06); color: var(--gold-light);
}
.sidebar-nav a.active {
    background: rgba(201,162,39,0.1); color: var(--gold-light);
    font-weight: 600; border-left: 3px solid var(--gold);
}
.sidebar-nav a svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); }
.sidebar-footer .user-info { display: flex; align-items: center; gap: 12px; }
.sidebar-footer .user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    color: #0a0a0a; font-weight: 700; font-size: 14px;
}
.sidebar-footer .user-details { flex: 1; min-width: 0; }
.sidebar-footer .user-details .name {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-footer .user-details .email {
    font-size: 11px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Main content area */
.main-content {
    flex: 1; margin-left: 260px; padding: 32px; min-height: 100vh;
    min-width: 0; overflow-x: hidden;
}
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.page-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px; font-weight: 700; color: var(--text-primary);
}
.page-header .breadcrumb {
    font-size: 13px; color: var(--text-muted); margin-top: 4px;
}

/* Dashboard welcome header */
.welcome-header { margin-bottom: 28px; }
.welcome-header .welcome-label {
    font-size: 13px; color: var(--gold); font-weight: 500;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px;
}
.welcome-header .welcome-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px; font-weight: 700; color: var(--gold-light);
}

/* ===========================
   Cards
   =========================== */
.card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border-color); padding: 24px;
    transition: var(--transition);
}
.card:hover { border-color: rgba(201,162,39,0.2); }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.card-header h3 { font-size: 15px; font-weight: 600; color: var(--gold-light); }

/* ===========================
   Quadrant Grid (Dashboard)
   =========================== */
.quadrant-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; margin-bottom: 28px;
    align-items: stretch;
}
.quadrant-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px; position: relative; overflow: hidden;
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.quadrant-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--accent-gradient);
}

/* Status colors */
.quadrant-card.status-green::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.quadrant-card.status-green { border-color: rgba(34,197,94,0.3); }
.quadrant-card.status-red::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.quadrant-card.status-red { border-color: rgba(239,68,68,0.3); background: linear-gradient(180deg, rgba(239,68,68,0.04), var(--bg-card)); }
.quadrant-card.status-neutral { border-color: var(--border-color); }
.quadrant-card.status-neutral::before { background: var(--accent-gradient); }

/* Locked state */
.quadrant-card.locked { opacity: 0.5; pointer-events: none; filter: grayscale(0.6); }
.quadrant-card.locked .lock-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.75);
    display: flex; align-items: center; justify-content: center;
    z-index: 10; border-radius: var(--radius-lg); pointer-events: all;
}
.quadrant-card.locked .lock-overlay svg { width: 44px; height: 44px; color: var(--text-muted); }

/* Icon badges in card headers */
.q-icons { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.q-icon-badge {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.q-icon-badge.gold { background: rgba(201,162,39,0.15); color: var(--gold-light); border: 1px solid rgba(201,162,39,0.3); }
.q-icon-badge.green { background: rgba(34,197,94,0.12); color: var(--success); border: 1px solid rgba(34,197,94,0.25); }

.quadrant-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 16px;
}
.quadrant-header .q-title {
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 1px;
}
.quadrant-header .q-type {
    font-size: 10px; padding: 4px 10px; border-radius: 20px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.quadrant-header .q-type.main {
    background: rgba(201,162,39,0.12); color: var(--gold-light);
    border: 1px solid rgba(201,162,39,0.25);
}
.quadrant-header .q-type.hedge {
    background: rgba(34,197,94,0.1); color: var(--success);
    border: 1px solid rgba(34,197,94,0.25);
}

/* Quadrant action button */
.quadrant-action {
    margin-top: auto !important;
    padding-top: 16px;
}
.quadrant-action .btn {
    width: 100%; justify-content: center;
}

.quadrant-stats {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-bottom: 16px;
}
.stat-item {
    background: var(--bg-input); padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(42,34,21,0.5);
}
.stat-item .stat-label {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.stat-item .stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px; font-weight: 700; color: var(--text-primary);
}
.stat-item .stat-value.positive { color: var(--success); }
.stat-item .stat-value.negative { color: var(--danger); }

/* Wallet section */
.wallet-section {
    border-top: 1px solid var(--border-color); padding-top: 14px; margin-top: 6px;
}
.wallet-section h4 {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
}
.wallet-item {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.wallet-item label { font-size: 11px; color: var(--text-secondary); min-width: 70px; }
.wallet-item input {
    flex: 1; padding: 8px 10px;
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: 6px; color: var(--text-primary);
    font-size: 11px; font-family: 'SF Mono','Fira Code',monospace;
    outline: none; transition: var(--transition);
}
.wallet-item input:focus { border-color: var(--gold); }
.wallet-item input[readonly] { opacity: 0.6; cursor: default; }
.wallet-item .copy-btn {
    background: var(--bg-card-hover); border: 1px solid var(--border-color);
    color: var(--text-secondary); padding: 8px; border-radius: 6px;
    cursor: pointer; transition: var(--transition); display: flex; align-items: center;
}
.wallet-item .copy-btn:hover {
    background: var(--gold); color: #0a0a0a; border-color: var(--gold);
}

/* ===========================
   Status Badges
   =========================== */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-active { background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.badge-inactive { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239,68,68,0.3); }
.badge-pending { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }

/* ===========================
   Tables
   =========================== */
.table-wrapper {
    overflow-x: auto; border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
table { width: 100%; border-collapse: collapse; table-layout: auto; }
table thead th {
    background: var(--bg-input); padding: 10px 12px;
    text-align: left; font-size: 11px; font-weight: 700;
    color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color); white-space: nowrap;
}
table tbody td {
    padding: 10px 12px; font-size: 13px; color: var(--text-primary);
    border-bottom: 1px solid rgba(42,34,21,0.3);
    max-width: 200px; overflow: hidden; text-overflow: ellipsis;
}
table tbody td.no-truncate { max-width: none; overflow: visible; }
table tbody tr:hover { background: rgba(201,162,39,0.02); }
table tbody tr:last-child td { border-bottom: none; }

/* ===========================
   Modal
   =========================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.9); backdrop-filter: blur(8px);
    z-index: 1000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border-accent); padding: 32px;
    max-width: 500px; width: 100%; max-height: 90vh;
    overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 20px; margin-bottom: 8px; color: var(--gold-light); }
.modal .modal-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

/* ===========================
   Payment Section
   =========================== */
.payment-section {
    background: linear-gradient(135deg, rgba(201,162,39,0.06), rgba(201,162,39,0.02));
    border: 1px solid rgba(201,162,39,0.2);
    border-radius: var(--radius-lg); padding: 32px;
    text-align: center; margin: 24px 0;
}
.payment-section h3 { font-size: 20px; margin-bottom: 12px; color: var(--gold-light); }
.payment-section p { color: var(--text-secondary); margin-bottom: 20px; }
.crypto-address {
    background: var(--bg-input); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 16px;
    font-family: 'SF Mono','Fira Code',monospace; font-size: 14px;
    color: var(--gold-light); word-break: break-all; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center; gap: 12px;
}

/* ===========================
   Spinner / Toast
   =========================== */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid rgba(201,162,39,0.2);
    border-top-color: var(--gold);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-container {
    position: fixed; top: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 14px 20px;
    min-width: 300px; box-shadow: var(--shadow-md);
    display: flex; align-items: center; gap: 12px;
    animation: slideIn 0.3s ease-out;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===========================
   Activation Form
   =========================== */
.activation-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border-accent); padding: 32px;
    max-width: 600px; margin: 0 auto 28px;
}
.activation-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--gold-light); }
.activation-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

/* ===========================
   Admin Stats
   =========================== */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 20px;
    display: flex; align-items: center; gap: 14px;
}
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-card .stat-icon.purple { background: rgba(201,162,39,0.12); color: var(--gold); }
.stat-card .stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-card .stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-card .stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-info h3 {
    font-size: 22px; font-weight: 700; font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
}
.stat-card .stat-info p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===========================
   Locked Dashboard Overlay
   =========================== */
.locked-overlay { position: relative; }
.locked-overlay::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.4); backdrop-filter: blur(2px);
    border-radius: var(--radius-lg); z-index: 5;
}

/* ===========================
   Mobile Toggle Button
   =========================== */
.mobile-toggle {
    display: none; position: fixed; top: 16px; left: 16px; z-index: 200;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 10px;
    color: var(--text-primary); cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    -webkit-tap-highlight-color: transparent;
}
.mobile-toggle:active { background: var(--bg-card-hover); }

/* Sidebar overlay backdrop for mobile */
.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
    z-index: 99; opacity: 0; transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; opacity: 1; }

/* ===========================
   Responsive - Tablet (1024px)
   =========================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        padding-top: 16px;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }
    .sidebar .sidebar-logo { padding-left: 68px; }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: flex !important; align-items: center; justify-content: center; }

    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header > div:last-child { width: 100%; }
    .page-header h1 { font-size: 22px; }

    .quadrant-grid { gap: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ===========================
   Responsive - Mobile (768px)
   =========================== */
@media (max-width: 768px) {
    /* Auth pages */
    .auth-container { padding: 16px; }
    .auth-wrapper,
    .auth-wrapper.with-branding {
        flex-direction: column; max-width: 100%;
        border-radius: var(--radius-lg);
    }
    .auth-branding { min-height: auto; padding: 24px 20px; }
    .auth-branding .logo { font-size: 28px; }
    .auth-branding .tagline { font-size: 14px; margin-bottom: 20px; }
    .auth-form-section { padding: 24px 20px; }
    .auth-form-section h2 { font-size: 22px; }
    .auth-form-section .subtitle { font-size: 13px; margin-bottom: 20px; }

    /* Form rows stack vertically */
    .form-row { flex-direction: column; gap: 0; }
    .form-group { margin-bottom: 14px; }
    .form-group input,
    .form-group select,
    .form-group textarea { padding: 12px 14px; font-size: 14px; }
    .form-group .input-icon input { padding-left: 38px; }
    .form-group label { font-size: 11px; margin-bottom: 6px; }

    /* Main content */
    .main-content { padding: 16px; padding-top: 70px; }

    /* Page header */
    .page-header { margin-bottom: 20px; gap: 12px; }
    .page-header h1 { font-size: 20px; }
    .page-header .breadcrumb { font-size: 12px; }
    .page-header > div[style*="display:flex"] {
        width: 100%;
    }

    /* Welcome header */
    .welcome-header { margin-bottom: 20px; }
    .welcome-header .welcome-label { font-size: 11px; }
    .welcome-header .welcome-name { font-size: 22px; }

    /* Quadrant grid - single column */
    .quadrant-grid { grid-template-columns: 1fr; gap: 14px; }
    .quadrant-card { padding: 18px; }
    .quadrant-header { margin-bottom: 12px; }
    .quadrant-header .q-title { font-size: 12px; }
    .quadrant-header .q-type { font-size: 9px; padding: 3px 8px; }
    .q-icons { margin-bottom: 6px; }
    .q-icon-badge { width: 26px; height: 26px; }
    .q-icon-badge svg { width: 12px; height: 12px; }
    .quadrant-action { margin-top: 12px; }
    .quadrant-action .btn { padding: 12px 20px; font-size: 12px; }

    /* Quadrant stats */
    .quadrant-stats { gap: 8px; margin-bottom: 12px; }
    .stat-item { padding: 10px; }
    .stat-item .stat-label { font-size: 9px; }
    .stat-item .stat-value { font-size: 16px; }

    /* Wallet section mobile */
    .wallet-section { padding-top: 12px; }
    .wallet-section h4 { font-size: 10px; margin-bottom: 8px; }
    .wallet-item { flex-wrap: wrap; gap: 6px; }
    .wallet-item label { font-size: 10px; min-width: 60px; }
    .wallet-item input { font-size: 10px; padding: 7px 8px; min-width: 0; }
    .wallet-item .copy-btn { padding: 7px; }

    /* Stats grid - single column */
    .stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { padding: 16px; gap: 12px; }
    .stat-card .stat-icon { width: 40px; height: 40px; }
    .stat-card .stat-info h3 { font-size: 20px; }
    .stat-card .stat-info p { font-size: 11px; }

    /* Cards */
    .card { padding: 16px; border-radius: var(--radius-md); }
    .card-header { margin-bottom: 14px; }
    .card-header h3 { font-size: 14px; }

    /* Tables */
    .table-wrapper { border-radius: var(--radius-sm); }
    table thead th { padding: 10px 12px; font-size: 10px; white-space: nowrap; }
    table tbody td { padding: 10px 12px; font-size: 12px; }

    /* Buttons */
    .btn { padding: 11px 20px; font-size: 13px; }
    .btn-sm { padding: 7px 14px; font-size: 11px; }
    .btn-lg { padding: 14px 24px; font-size: 14px; }

    /* Alerts */
    .alert { padding: 12px 14px; font-size: 12px; }

    /* Badges */
    .badge { padding: 3px 10px; font-size: 10px; }

    /* Activation card */
    .activation-card { padding: 20px; margin-bottom: 20px; }
    .activation-card h3 { font-size: 16px; }
    .activation-card p { font-size: 13px; margin-bottom: 18px; }

    /* Payment section */
    .payment-section { padding: 20px; margin: 16px 0; }
    .payment-section h3 { font-size: 18px; }
    .payment-section p { font-size: 13px; }
    .crypto-address { padding: 12px; font-size: 12px; flex-direction: column; gap: 8px; }
    .crypto-address .copy-btn { width: 100%; justify-content: center; }

    /* Modal */
    .modal { padding: 24px 20px; margin: 12px; max-height: 85vh; }
    .modal h2 { font-size: 18px; }
    .modal .modal-subtitle { font-size: 13px; }

    /* Toast on mobile */
    .toast-container { top: 12px; right: 12px; left: 12px; }
    .toast { min-width: auto; width: 100%; font-size: 13px; padding: 12px 14px; }

    /* Sidebar footer */
    .sidebar-footer { padding: 14px 20px; }
    .sidebar-footer .user-avatar { width: 34px; height: 34px; font-size: 12px; }
    .sidebar-footer .user-details .name { font-size: 12px; }
    .sidebar-footer .user-details .email { font-size: 10px; }

    /* Referral code section in page header */
    .page-header code {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }

    /* Admin dashboard action buttons */
    .page-header div[style*="display:flex"] {
        flex-direction: column;
    }
    .page-header div[style*="display:flex"] .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================
   Responsive - Small phones (480px)
   =========================== */
@media (max-width: 480px) {
    .main-content { padding: 12px; padding-top: 66px; }

    .auth-container { padding: 10px; }
    .auth-form-section { padding: 20px 16px; }
    .auth-form-section h2 { font-size: 20px; }

    .page-header h1 { font-size: 18px; }

    .quadrant-card { padding: 14px; }
    .quadrant-stats { grid-template-columns: 1fr 1fr; gap: 6px; }
    .stat-item { padding: 8px; }
    .stat-item .stat-value { font-size: 14px; }
    .stat-item .stat-label { font-size: 8px; }

    .wallet-item { gap: 4px; }
    .wallet-item label { min-width: 50px; font-size: 9px; }
    .wallet-item input { font-size: 9px; padding: 6px; }

    .btn { padding: 10px 16px; font-size: 12px; letter-spacing: 0.3px; }
    .btn-lg { padding: 12px 20px; font-size: 13px; }

    .payment-section { padding: 16px; }
    .crypto-address { font-size: 11px; padding: 10px; }

    .stat-card { padding: 14px; }
    .stat-card .stat-icon { width: 36px; height: 36px; }
    .stat-card .stat-icon svg { width: 18px; height: 18px; }
    .stat-card .stat-info h3 { font-size: 18px; }

    .card { padding: 14px; }

    table thead th { padding: 8px 10px; font-size: 9px; }
    table tbody td { padding: 8px 10px; font-size: 11px; }

    .activation-card { padding: 16px; }

    /* Lock overlay icon smaller on mobile */
    .quadrant-card.locked .lock-overlay svg { width: 32px; height: 32px; }

    /* Status icon smaller */
    .quadrant-card .status-icon { width: 24px; height: 24px; top: 12px; right: 12px; }
    .quadrant-card .status-icon svg { width: 12px; height: 12px; }

    .welcome-header .welcome-name { font-size: 20px; }
    .quadrant-action .btn { padding: 10px 16px; font-size: 11px; }
}

/* ===========================
   Link styles & Utilities
   =========================== */
a { color: var(--gold-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }

/* Referral code box */
.referral-code-box { text-align: right; }
@media (max-width: 768px) {
    .referral-code-box { text-align: left; }
}

/* Gold accented status icon in quadrant */
.quadrant-card .status-icon {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.quadrant-card.status-green .status-icon {
    background: var(--success); color: #fff;
    box-shadow: 0 2px 8px rgba(34,197,94,0.4);
}
.quadrant-card.status-red .status-icon {
    background: var(--danger); color: #fff;
    box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}
.quadrant-card.status-neutral .status-icon {
    background: rgba(201,162,39,0.2); color: var(--gold-light);
}

/* Admin cards max-width override for mobile */
@media (max-width: 768px) {
    .card[style*="max-width"] { max-width: 100% !important; }
}
