/* ================================================================
   SPG Gold Jewels — Global Stylesheet
   Dark/Light theme with gold accent palette
   ================================================================ */

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

/* ================================================================
   CSS Custom Properties (Tokens)
   ================================================================ */
:root {
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-gradient: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    --font: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --transition: all 0.2s ease;
    --sidebar-width: 260px;
}

/* Dark Theme (default) */
:root,
body.dark {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(24, 24, 27, 0.8);
    --bg-input: #09090b;
    --bg-hover: rgba(255, 255, 255, 0.04);
    --border: rgba(63, 63, 70, 0.5);
    --border-input: #3f3f46;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --sidebar-bg: rgba(9, 9, 11, 0.95);
    --table-head: #09090b;
    --scrollbar: #3f3f46;
}

/* Light Theme */
body.light {
    --bg-primary: #f4f4f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #fafafa;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --border: #e4e4e7;
    --border-input: #d4d4d8;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --sidebar-bg: #ffffff;
    --table-head: #f4f4f5;
    --scrollbar: #d4d4d8;
}

/* ================================================================
   Base
   ================================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    font-family: var(--font);
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: var(--font);
    outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border-radius: 99px;
}

/* ================================================================
   Layout
   ================================================================ */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ================================================================
   Sidebar
   ================================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    gap: 24px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    backdrop-filter: blur(24px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    flex-shrink: 0;
}

.logo-text {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    color: var(--gold-500);
    background: rgba(245, 158, 11, 0.05);
}

.nav-item.active {
    background: var(--gold-500);
    color: #000;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.nav-item .icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* Main content area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-width: 0;
    transition: margin-left 0.3s ease;
}

/* Mobile Header */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* ================================================================
   Auth Pages (Login / Register)
   ================================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    opacity: 0.25;
}

.auth-bg-blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.4);
    top: 20%;
    left: -100px;
}

.auth-bg-blob-2 {
    width: 350px;
    height: 350px;
    background: rgba(217, 119, 6, 0.3);
    bottom: 15%;
    right: -80px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.5s ease;
}

.auth-card.wide {
    max-width: 680px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--gold-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25);
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Theme toggle absolute */
.theme-toggle-abs {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

/* ================================================================
   Card
   ================================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card.p-0 {
    padding: 0;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 99px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: 4px;
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-gold {
    background: var(--gold-gradient);
    color: #000;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.btn-gold:hover:not(:disabled) {
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gold-500);
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    background: var(--gold-600);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--bg-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.1);
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-full {
    width: 100%;
}

/* ================================================================
   Inputs
   ================================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding-left: 2px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-input.has-icon {
    padding-left: 44px;
}

.form-input.has-icon-right {
    padding-right: 44px;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.input-icon-right {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    background: none;
    border: none;
}

/* ================================================================
   Grid
   ================================================================ */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ================================================================
   Tables
   ================================================================ */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead tr {
    background: var(--table-head);
}

thead th {
    padding: 14px 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    white-space: nowrap;
}

tbody tr {
    border-top: 1px solid var(--border);
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: var(--bg-hover);
}

tbody td {
    padding: 14px 20px;
    vertical-align: middle;
}

/* ================================================================
   Badges / Pills
   ================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-active,
.badge-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-pending,
.badge-inactive {
    background: rgba(245, 158, 11, 0.1);
    color: var(--gold-500);
}

.badge-rejected,
.badge-topup {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-default {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
}

/* ================================================================
   Theme Toggle Button
   ================================================================ */
.theme-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    cursor: pointer;
}

.theme-btn:hover {
    color: var(--gold-500);
}

/* ================================================================
   Toast Notifications
   ================================================================ */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex !important;
    flex-direction: column;
    position: relative;
    padding: 0;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    min-width: 300px;
    max-width: 400px;
    overflow: hidden;
    animation: slideInRight 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    backdrop-filter: blur(20px);
    opacity: 1 !important;
    visibility: visible !important;
}

.toast.hiding {
    animation: slideOutRight 0.4s ease-in forwards;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 44px 16px 18px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.2;
}

.toast-message {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-progress {
    height: 3px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--gold-400);
}

.toast-success .toast-progress-bar {
    background: #10b981;
}

.toast-error .toast-progress-bar {
    background: #ef4444;
}

.toast-warning .toast-progress-bar {
    background: var(--gold-500);
}

.toast-info .toast-progress-bar {
    background: #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ================================================================
   Modal
   ================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-3xl);
    padding: 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ================================================================
   Captcha Box
   ================================================================ */
.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-input);
    background: var(--bg-input);
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 6px;
    color: var(--gold-500);
    user-select: none;
    position: relative;
}

.captcha-refresh {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.captcha-refresh:hover {
    color: var(--gold-500);
}

/* ================================================================
   Dashboard Header
   ================================================================ */
.dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.dash-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.dash-header p {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 14px;
}

.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ================================================================
   Tab Content
   ================================================================ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ================================================================
   Referral Card
   ================================================================ */
.referral-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.referral-url {
    flex: 1;
    padding: 12px 16px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================================
   Bonus Item
   ================================================================ */
.bonus-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--bg-input);
    border: 1px solid var(--border);
}

.bonus-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bonus-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.bonus-item-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.bonus-item-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-500);
}

/* ================================================================
   Maintenance Card
   ================================================================ */
.maintenance-card {
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.04);
    border-radius: var(--radius-2xl);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.maintenance-title {
    color: #f87171;
    font-weight: 700;
    font-size: 15px;
}

.maintenance-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* ================================================================
   Status pill
   ================================================================ */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ================================================================
   Hamburger Button
   ================================================================ */
.hamburger-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(245, 158, 11, 0.1);
    color: var(--gold-500);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border: none;
    cursor: pointer;
}

/* ================================================================
   Alert / Info Boxes
   ================================================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* ================================================================
   Mono / ID text
   ================================================================ */
.mono {
    font-family: 'Courier New', monospace;
}

.text-gold {
    color: var(--gold-500);
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: #10b981;
}

.text-danger {
    color: #ef4444;
}

/* ================================================================
   Spacing utilities
   ================================================================ */
.space-y-4>*+* {
    margin-top: 16px;
}

.space-y-6>*+* {
    margin-top: 24px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.mb-10 {
    margin-bottom: 40px;
}

.mt-auto {
    margin-top: auto;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

/* ================================================================
   Flex utilities
   ================================================================ */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.flex-1 {
    flex: 1;
}

/* ================================================================
   Animations
   ================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-fadein {
    animation: fadeInUp 0.4s ease;
}

/* ================================================================
   Loading Spinner
   ================================================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ================================================================
   Page header (tab title)
   ================================================================ */
.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* ================================================================
   Team / tree placeholder
   ================================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 24px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 380px;
    font-size: 14px;
}

/* ================================================================
   Responsive (max 768 px)
   ================================================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .mobile-header {
        display: flex;
    }

    .hamburger-btn {
        display: flex;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .auth-page {
        padding: 16px;
    }

    .dash-header {
        flex-direction: column;
    }

    .dash-header-actions {
        width: 100%;
    }

    .referral-input-row {
        flex-direction: column;
    }

    .referral-url {
        width: 100%;
    }

    .maintenance-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 22px;
    }

    .auth-title {
        font-size: 22px;
    }
}