/* ============================================
   UNISIMO - Escritório Virtual
   Design System & Global Styles
   Paleta: Dourado (#C5A55A, #D4AF37) + Cinza Escuro (#2D2D2D, #1a1a2e)
   ============================================ */

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

:root {
    /* Cores Principais */
    --gold-primary: #C5A55A;
    --gold-light: #D4AF37;
    --gold-dark: #A8893E;
    --gold-gradient: linear-gradient(135deg, #C5A55A 0%, #D4AF37 50%, #E8C84A 100%);
    --gold-gradient-hover: linear-gradient(135deg, #D4AF37 0%, #E8C84A 50%, #C5A55A 100%);
    
    /* Escuros */
    --dark-primary: #0f0f1a;
    --dark-secondary: #1a1a2e;
    --dark-tertiary: #16213e;
    --dark-card: #1e1e35;
    --dark-surface: #252545;
    --dark-border: rgba(197, 165, 90, 0.15);
    
    /* Texto */
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c85;
    --text-gold: #C5A55A;
    
    /* Status */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Qualificações */
    --q-bronze: #CD7F32;
    --q-prata: #C0C0C0;
    --q-ouro: #FFD700;
    --q-esmeralda: #50C878;
    --q-diamante: #B9F2FF;
    --q-diamante-elite: #7DF9FF;
    --q-diamante-duplo: #6FFFE9;
    --q-diamante-triplo: #64FFDA;
    --q-diamante-imperial: #E040FB;
    --q-diamante-royal: #FF6F00;
    
    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.35);
    --shadow-gold: 0 4px 20px rgba(197, 165, 90, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

/* ============================================
   AUTH PAGES (Login, Cadastro, Recuperação)
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-primary);
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(197, 165, 90, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
    animation: authBgFloat 15s ease-in-out infinite;
}

@keyframes authBgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(2deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.auth-card {
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    animation: authCardAppear 0.6s ease-out;
}

@keyframes authCardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card .logo-wrapper {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .logo-wrapper img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(197, 165, 90, 0.3));
}

.auth-card h2 {
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

/* Form Styles */
.form-floating {
    margin-bottom: 20px;
    position: relative;
}

.form-floating .form-control,
.form-floating .form-select {
    background: var(--dark-tertiary);
    border: 1px solid var(--dark-border);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 16px 16px 8px;
    height: auto;
    min-height: 56px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-floating .form-control:focus,
.form-floating .form-select:focus {
    background: var(--dark-tertiary);
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
    color: var(--text-primary);
}

.form-floating label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    color: var(--gold-primary);
}

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

/* Custom Input Group */
.input-group-text {
    background: var(--dark-tertiary);
    border: 1px solid var(--dark-border);
    color: var(--gold-primary);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

/* Buttons */
.btn-gold {
    background: var(--gold-gradient);
    border: none;
    color: var(--dark-primary);
    font-weight: 700;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-gold:hover {
    background: var(--gold-gradient-hover);
    color: var(--dark-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover::before {
    left: 100%;
}

.btn-gold:active {
    transform: translateY(0);
}

.btn-gold-outline {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-gold-outline:hover {
    background: var(--gold-primary);
    color: var(--dark-primary);
    transform: translateY(-2px);
}

.btn-dark-subtle {
    background: var(--dark-tertiary);
    border: 1px solid var(--dark-border);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-dark-subtle:hover {
    background: var(--dark-surface);
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--dark-border);
}

.auth-links a {
    color: var(--text-secondary);
    font-size: 0.88rem;
    transition: var(--transition);
}

.auth-links a:hover {
    color: var(--gold-primary);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-secondary);
    border-right: 1px solid var(--dark-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: var(--dark-surface);
    border-radius: 4px;
}

.sidebar-logo {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--dark-border);
    flex-shrink: 0;
}

.sidebar-logo img {
    max-width: 140px;
    height: auto;
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid var(--dark-border);
    flex-shrink: 0;
}

.sidebar-user .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-qualification {
    font-size: 0.78rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Nav Menu */
.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 16px 24px 8px;
    font-weight: 700;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
    background: rgba(197, 165, 90, 0.08);
    color: var(--gold-primary);
    border-left-color: rgba(197, 165, 90, 0.3);
}

.sidebar-nav .nav-link.active {
    background: rgba(197, 165, 90, 0.12);
    color: var(--gold-primary);
    border-left-color: var(--gold-primary);
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--dark-border);
    flex-shrink: 0;
}

.sidebar-footer .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--danger);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.sidebar-footer .nav-link:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* Header */
.top-header {
    height: var(--header-height);
    background: var(--dark-secondary);
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 1040;
    backdrop-filter: blur(20px);
}

.top-header .page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.top-header .page-title span {
    color: var(--gold-primary);
}

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

.btn-toggle-sidebar {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

/* Content Area */
.content-area {
    padding: 32px;
    max-width: 1400px;
}

/* ============================================
   CARDS
   ============================================ */
.stat-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(197, 165, 90, 0.25);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.stat-card .stat-icon.gold {
    background: rgba(197, 165, 90, 0.15);
    color: var(--gold-primary);
}

.stat-card .stat-icon.green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.stat-card .stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.stat-card .stat-icon.purple {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-value.gold {
    color: var(--gold-primary);
}

.stat-card .stat-sub {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Panel Cards */
.panel-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

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

.panel-card .panel-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-card .panel-header h3 i {
    color: var(--gold-primary);
}

.panel-card .panel-body {
    padding: 24px 28px;
}

/* ============================================
   QUALIFICATION BADGE
   ============================================ */
.qualification-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qualification-badge.q-bronze {
    background: rgba(205, 127, 50, 0.15);
    color: var(--q-bronze);
    border: 1px solid rgba(205, 127, 50, 0.3);
}
.qualification-badge.q-prata {
    background: rgba(192, 192, 192, 0.15);
    color: var(--q-prata);
    border: 1px solid rgba(192, 192, 192, 0.3);
}
.qualification-badge.q-ouro {
    background: rgba(255, 215, 0, 0.15);
    color: var(--q-ouro);
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.qualification-badge.q-esmeralda {
    background: rgba(80, 200, 120, 0.15);
    color: var(--q-esmeralda);
    border: 1px solid rgba(80, 200, 120, 0.3);
}
.qualification-badge.q-diamante {
    background: rgba(185, 242, 255, 0.15);
    color: var(--q-diamante);
    border: 1px solid rgba(185, 242, 255, 0.3);
}
.qualification-badge.q-diamante-elite {
    background: rgba(125, 249, 255, 0.1);
    color: var(--q-diamante-elite);
    border: 1px solid rgba(125, 249, 255, 0.3);
}
.qualification-badge.q-diamante-duplo {
    background: rgba(111, 255, 233, 0.1);
    color: var(--q-diamante-duplo);
    border: 1px solid rgba(111, 255, 233, 0.3);
}
.qualification-badge.q-diamante-triplo {
    background: rgba(100, 255, 218, 0.1);
    color: var(--q-diamante-triplo);
    border: 1px solid rgba(100, 255, 218, 0.3);
}
.qualification-badge.q-diamante-imperial {
    background: rgba(224, 64, 251, 0.1);
    color: var(--q-diamante-imperial);
    border: 1px solid rgba(224, 64, 251, 0.3);
}
.qualification-badge.q-diamante-royal {
    background: rgba(255, 111, 0, 0.1);
    color: var(--q-diamante-royal);
    border: 1px solid rgba(255, 111, 0, 0.3);
}

/* ============================================
   QUALIFICATION HIGHLIGHT CARD
   ============================================ */
.qualification-highlight {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.qualification-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
}

.qualification-highlight .q-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(197, 165, 90, 0.15);
    color: var(--gold-primary);
    border: 2px solid rgba(197, 165, 90, 0.3);
    animation: qualPulse 3s ease-in-out infinite;
}

@keyframes qualPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(197, 165, 90, 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(197, 165, 90, 0); }
}

.qualification-highlight .q-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.qualification-highlight .q-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold-primary);
    margin: 8px 0;
    text-transform: uppercase;
}

.qualification-highlight .q-status {
    font-size: 0.88rem;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 8px;
}

.qualification-highlight .q-status.qualificado {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.qualification-highlight .q-status.nao-qualificado {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ============================================
   MATRIX TREE
   ============================================ */
.matrix-container {
    overflow-x: auto;
    padding: 20px 0;
}

.matrix-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    min-width: 600px;
}

.matrix-level {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.matrix-node {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    min-width: 100px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.matrix-node:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.matrix-node.empty {
    opacity: 0.4;
    border-style: dashed;
}

.matrix-node.active {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.08);
}

.matrix-node.root {
    border-color: var(--gold-primary);
    background: rgba(197, 165, 90, 0.12);
}

.matrix-node .node-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.matrix-node .node-id {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.matrix-node .node-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
}

.matrix-node .node-status.ativo {
    background: var(--success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.matrix-node .node-status.inativo {
    background: var(--danger);
}

/* Level indicator */
.matrix-level-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    background: var(--dark-tertiary);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}

/* ============================================
   TABLE STYLES
   ============================================ */
.table-dark-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-dark-custom thead th {
    background: var(--dark-tertiary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--dark-border);
    white-space: nowrap;
}

.table-dark-custom thead th:first-child {
    border-radius: var(--border-radius) 0 0 0;
}

.table-dark-custom thead th:last-child {
    border-radius: 0 var(--border-radius) 0 0;
}

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

.table-dark-custom tbody tr {
    transition: var(--transition);
}

.table-dark-custom tbody tr:hover {
    background: rgba(197, 165, 90, 0.05);
}

.table-dark-custom tbody tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.pago {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-badge.aguardando {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-badge.cancelado {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ============================================
   REFERRAL LINK
   ============================================ */
.referral-box {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    text-align: center;
}

.referral-box .referral-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.referral-box .referral-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.referral-link-input {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin: 0 auto;
}

.referral-link-input .form-control {
    background: var(--dark-tertiary);
    border: 1px solid var(--dark-border);
    color: var(--gold-primary);
    border-radius: var(--border-radius);
    font-family: 'Inter', monospace;
    font-size: 0.88rem;
    font-weight: 500;
}

.referral-link-input .form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
    color: var(--gold-primary);
}

/* ============================================
   MATERIAL PUBLICITÁRIO
   ============================================ */
.material-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.material-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-md);
}

.material-card .material-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(197, 165, 90, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--gold-primary);
}

.material-card .material-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.material-card .material-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state .empty-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ============================================
   CHARTS AREA
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1045;
    backdrop-filter: blur(4px);
}

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

/* ============================================
   LOADER
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--dark-border);
    border-top: 3px solid var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   SCROLLBAR CUSTOM
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--dark-surface);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; animation-fill-mode: both; }
.delay-2 { animation-delay: 0.2s; animation-fill-mode: both; }
.delay-3 { animation-delay: 0.3s; animation-fill-mode: both; }
.delay-4 { animation-delay: 0.4s; animation-fill-mode: both; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .btn-toggle-sidebar {
        display: block;
    }
    
    .content-area {
        padding: 20px 16px;
    }
    
    .top-header {
        padding: 0 16px;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 32px 24px;
    }
    
    .stat-card .stat-value {
        font-size: 1.4rem;
    }
    
    .content-area {
        padding: 16px 12px;
    }
    
    .panel-card .panel-body {
        padding: 16px;
    }
    
    .panel-card .panel-header {
        padding: 16px;
    }
}

/* ============================================
   SWAL CUSTOM (SweetAlert2)
   ============================================ */
.swal2-popup {
    background: var(--dark-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--dark-border) !important;
    border-radius: var(--border-radius-lg) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: var(--gold-gradient) !important;
    color: var(--dark-primary) !important;
    border: none !important;
    font-weight: 700 !important;
    border-radius: var(--border-radius) !important;
}

.swal2-cancel {
    background: var(--dark-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--dark-border) !important;
    border-radius: var(--border-radius) !important;
}

.swal2-input {
    background: var(--dark-tertiary) !important;
    border: 1px solid var(--dark-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--border-radius) !important;
}

/* ============================================
   BONUS TYPE BADGES
   ============================================ */
.bonus-type {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bonus-type.indicacao {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.bonus-type.construcao {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.bonus-type.lideranca {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

/* ============================================
   TRANSBORDO SELECTOR
   ============================================ */
.transbordo-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.transbordo-option {
    flex: 1;
    min-width: 80px;
    padding: 12px 8px;
    text-align: center;
    background: var(--dark-tertiary);
    border: 2px solid var(--dark-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.transbordo-option:hover {
    border-color: var(--gold-primary);
}

.transbordo-option.selected {
    border-color: var(--gold-primary);
    background: rgba(197, 165, 90, 0.12);
}

.transbordo-option .opt-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.transbordo-option.selected .opt-label {
    color: var(--gold-primary);
}

/* ============================================
   PASSWORD TOGGLE
   ============================================ */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 5;
    padding: 4px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--gold-primary);
}

/* ============================================
   AUTOCOMPLETE SUGGESTIONS
   ============================================ */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-border);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1060;
    display: none;
    box-shadow: var(--shadow-md);
}

.autocomplete-suggestions.show {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.88rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(197, 165, 90, 0.1);
}

.autocomplete-item.no-result {
    color: var(--text-muted);
    cursor: default;
    font-style: italic;
}

.autocomplete-item.no-result:hover {
    background: transparent;
}

.autocomplete-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(197, 165, 90, 0.15);
    color: var(--gold-primary);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    min-width: 40px;
    flex-shrink: 0;
}

.autocomplete-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-uf {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-primary);
    background: rgba(197, 165, 90, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ============================================
   RADIO CARDS (Etnia e Escolaridade)
   ============================================ */
.radio-card {
    display: block;
    cursor: pointer;
    background: var(--dark-tertiary);
    border: 2px solid var(--dark-border);
    border-radius: var(--border-radius);
    padding: 14px 18px;
    transition: var(--transition);
    margin-bottom: 2px;
}

.radio-card:hover {
    border-color: rgba(197, 165, 90, 0.4);
    background: rgba(197, 165, 90, 0.04);
}

.radio-card.selected {
    border-color: var(--gold-primary);
    background: rgba(197, 165, 90, 0.1);
}

.radio-card input[type="radio"] {
    display: none;
}

.radio-card-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.radio-card-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--dark-border);
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
    position: relative;
}

.radio-card.selected .radio-card-indicator {
    border-color: var(--gold-primary);
}

.radio-card.selected .radio-card-indicator::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-primary);
}

.radio-card-content strong {
    color: var(--text-primary);
    font-size: 0.92rem;
}

.radio-card-content span {
    color: var(--text-primary);
    font-size: 0.88rem;
}

.text-muted-custom {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    margin-top: 2px;
}

/* ============================================
   CEP LOADING INDICATOR
   ============================================ */
.cep-loading {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

/* ============================================
   UPLOAD ZONES
   ============================================ */
.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed var(--dark-border);
    border-radius: var(--border-radius);
    background: var(--dark-tertiary);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    padding: 24px 16px;
}

.upload-zone:hover {
    border-color: rgba(197, 165, 90, 0.5);
    background: rgba(197, 165, 90, 0.04);
}

.upload-zone.drag-over {
    border-color: var(--gold-primary);
    background: rgba(197, 165, 90, 0.1);
    transform: scale(1.01);
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.upload-zone-icon {
    font-size: 2.2rem;
    color: var(--gold-primary);
    opacity: 0.7;
    margin-bottom: 4px;
}

.upload-zone-content strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.upload-zone-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.upload-zone-formats {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.upload-zone-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.upload-zone-selected i {
    font-size: 1.6rem;
    color: #22c55e;
}

.upload-existing {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
