/* =============================================
   FACULDADE EDUVALE - Dark Neon Theme
   ============================================= */

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a25;
    
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00e5;
    --neon-green: #39ff14;
    --neon-yellow: #ffd700;
    --neon-orange: #ff6b00;
    --neon-purple: #b44dff;
    --neon-pink: #ff2d8a;
    
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.3), 0 0 40px rgba(0, 240, 255, 0.1);
    --glow-magenta: 0 0 10px rgba(255, 0, 229, 0.3), 0 0 40px rgba(255, 0, 229, 0.1);
    --glow-green: 0 0 10px rgba(57, 255, 20, 0.3), 0 0 40px rgba(57, 255, 20, 0.1);
    
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-muted: #555570;
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 240, 255, 0.2);
    
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --font-display: 'Orbitron', sans-serif;
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Exo 2', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0, 240, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 0, 229, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(57, 255, 20, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== TYPOGRAPHY ==================== */

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.brand-title {
    font-family: var(--font-display);
    font-weight: 800;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 0.05em;
}

/* ==================== LAYOUT ==================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ==================== HEADER ==================== */

.header {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo img {
    height: 40px;
}

.header-logo .brand-title {
    font-size: 1.2rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    object-fit: cover;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), #0088ff);
    color: #000;
    box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 60px rgba(0, 240, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
}

.btn-success {
    background: linear-gradient(135deg, var(--neon-green), #00cc44);
    color: #000;
    box-shadow: var(--glow-green);
}

.btn-success:hover {
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ff3366, #ff0044);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

.btn-magenta {
    background: linear-gradient(135deg, var(--neon-magenta), var(--neon-purple));
    color: #fff;
    box-shadow: var(--glow-magenta);
}

.btn-magenta:hover {
    box-shadow: 0 0 20px rgba(255, 0, 229, 0.5);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ==================== FORMS ==================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

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

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.file-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed rgba(0, 240, 255, 0.2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.file-upload:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.03);
}

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.file-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--neon-cyan);
    margin-bottom: 8px;
    display: none;
}

/* ==================== CARDS ==================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-glow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* ==================== STAT CARDS ==================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.cyan::before { background: linear-gradient(90deg, var(--neon-cyan), transparent); }
.stat-card.magenta::before { background: linear-gradient(90deg, var(--neon-magenta), transparent); }
.stat-card.green::before { background: linear-gradient(90deg, var(--neon-green), transparent); }
.stat-card.yellow::before { background: linear-gradient(90deg, var(--neon-yellow), transparent); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--neon-purple), transparent); }

.stat-card .stat-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card.cyan .stat-value { color: var(--neon-cyan); }
.stat-card.magenta .stat-value { color: var(--neon-magenta); }
.stat-card.green .stat-value { color: var(--neon-green); }
.stat-card.yellow .stat-value { color: var(--neon-yellow); }
.stat-card.purple .stat-value { color: var(--neon-purple); }

.stat-card .stat-label {
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ==================== TABLE ==================== */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: rgba(0, 240, 255, 0.05);
    padding: 14px 16px;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neon-cyan);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

tbody tr:hover {
    background: rgba(0, 240, 255, 0.02);
}

.avatar-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-cell img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

/* ==================== STATUS BADGES ==================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-pendente {
    background: rgba(255, 215, 0, 0.1);
    color: var(--neon-yellow);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.badge-aprovado {
    background: rgba(57, 255, 20, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.badge-rejeitado {
    background: rgba(255, 51, 102, 0.1);
    color: #ff3366;
    border: 1px solid rgba(255, 51, 102, 0.2);
}

/* ==================== REFERRAL TREE ==================== */

.tree-container {
    padding: 30px;
    overflow: auto;
    min-height: 400px;
    position: relative;
}

.tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.tree-root {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-avatar-wrapper {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
}

.tree-avatar-wrapper:hover {
    transform: scale(1.1);
}

.tree-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    background: var(--bg-secondary);
}

.tree-avatar.root-avatar {
    width: 90px;
    height: 90px;
    border-width: 4px;
    border-color: var(--neon-magenta);
    box-shadow: 0 0 25px rgba(255, 0, 229, 0.4);
}

.tree-avatar.pending {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    opacity: 0.7;
}

.tree-name {
    margin-top: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: center;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-name.root-name {
    font-size: 1rem;
    color: var(--neon-magenta);
    max-width: 130px;
}

.tree-children {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    position: relative;
    justify-content: center;
}

.tree-children::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: linear-gradient(180deg, var(--neon-cyan), transparent);
}

.tree-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.tree-branch::before {
    content: '';
    position: absolute;
    top: -15px;
    width: 2px;
    height: 15px;
    background: var(--neon-cyan);
    opacity: 0.5;
}

.tree-connector {
    position: absolute;
    top: -15px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
}

.tree-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.tree-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.tree-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--neon-green);
    color: #000;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== MODAL ==================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

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

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff3366;
    color: #ff3366;
}

/* ==================== TOAST ==================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    animation: toastIn 0.3s ease;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: var(--neon-green);
}

.toast.error {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: #ff3366;
}

.toast.info {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--neon-cyan);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== HERO / LOGIN PAGE ==================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1100px;
    width: 100%;
}

.hero-left h1 {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-left h1 span {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-left p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.hero-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.hero-feature-icon.cyan { background: rgba(0, 240, 255, 0.1); }
.hero-feature-icon.magenta { background: rgba(255, 0, 229, 0.1); }
.hero-feature-icon.green { background: rgba(57, 255, 20, 0.1); }

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta), var(--neon-green));
}

.login-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 28px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-tab.active {
    background: linear-gradient(135deg, var(--neon-cyan), #0088ff);
    color: #000;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

/* ==================== DASHBOARD ==================== */

.dashboard {
    padding: 30px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .icon {
    font-size: 1.5rem;
}

.codigo-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px dashed rgba(0, 240, 255, 0.3);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-top: 10px;
}

.codigo-box code {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--neon-cyan);
    letter-spacing: 0.1em;
    flex: 1;
}

.codigo-box .btn {
    flex-shrink: 0;
}

/* ==================== REGULAMENTO ==================== */

.regulamento-section {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.regulamento-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    border: 1px solid rgba(255, 0, 229, 0.3);
    border-radius: var(--radius-lg);
    color: var(--neon-magenta);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.regulamento-btn:hover {
    background: rgba(255, 0, 229, 0.1);
    border-color: var(--neon-magenta);
    box-shadow: var(--glow-magenta);
}

.regulamento-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ==================== ADMIN PANEL ==================== */

.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar .brand-title {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

.admin-sidebar-subtitle {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-heading);
    margin-bottom: 30px;
}

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

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.admin-nav-item:hover {
    background: rgba(0, 240, 255, 0.05);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
}

.admin-nav-item .nav-badge {
    margin-left: auto;
    background: var(--neon-magenta);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.admin-main {
    padding: 30px;
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* ==================== LOADING ==================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== RESPONSIVE ==================== */

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-left h1 {
        font-size: 2rem;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        z-index: 200;
        width: 260px;
        transition: left 0.3s;
    }
    
    .admin-sidebar.open {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-left h1 {
        font-size: 1.6rem;
    }
    
    .login-card {
        padding: 24px;
    }
    
    .tree-children {
        gap: 20px;
    }
    
    .tree-avatar {
        width: 50px;
        height: 50px;
    }
    
    .tree-avatar.root-avatar {
        width: 70px;
        height: 70px;
    }
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

/* ==================== UTILITY ==================== */

.text-cyan { color: var(--neon-cyan); }
.text-magenta { color: var(--neon-magenta); }
.text-green { color: var(--neon-green); }
.text-yellow { color: var(--neon-yellow); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mobile-menu-btn { display: none; }

/* Glow animation for key elements */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.4); }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--neon-cyan);
    text-decoration: none;
}
