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

:root {
    /* Cores principais - Tema CW3 Colmeia */
    --primary-gold: #FFD700;
    --primary-yellow: #FFC107;
    --accent-gold: #FFB300;
    --accent-orange: #FF8F00;

    /* Cores de fundo */
    --bg-dark: #000000;
    --bg-medium: #0a0a0a;
    --bg-light: #1a1a1a;

    /* Cores de elementos */
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);

    /* Cores de texto */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Sombras e efeitos */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(255, 215, 0, 0.4);
}

/* Animações */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;

    /* Fundo preto sólido — o favo de mel vem do canvas #honeycomb-bg */
    background: #070707;
    position: relative;
}

/* Favo de mel animado (canvas 2D) — fica atrás de todo o conteúdo */
#honeycomb-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 0;
    pointer-events: none;
}

/* Overlay idêntico ao hero da página da comunidade (COLMEIA CW3):
   brilho dourado no canto + leve escurecimento na base. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 70% at 30% 35%, rgba(245, 183, 10, 0.10), transparent 60%),
        linear-gradient(180deg, transparent 40%, #070707 95%);
    pointer-events: none;
    z-index: 1;
}

.page {
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* Tela de login: card centralizado no meio da tela */
#authPage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}


/* Logo com efeito moderno - Tema CW3 */
.logo {
    font-size: 44px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 3px;
    filter: drop-shadow(0 2px 10px rgba(255, 215, 0, 0.35));
}

.logo-small {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.tagline {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Container de autenticação com glassmorphism - Tema CW3 */
.auth-container {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    background: rgba(12, 12, 16, 0.72);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-radius: 20px;
    padding: 60px 56px;
    border: 1px solid rgba(255, 215, 0, 0.18);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Tabs modernos */
.auth-tabs {
    display: flex;
    margin-bottom: 35px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border-radius: 10px;
    position: relative;
}

.tab-btn.active {
    color: #000000;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.tab-btn:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

/* Formulários modernos */
/* Formulários de autenticação */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    box-sizing: border-box;
}

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

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: rgba(255, 215, 0, 0.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    border: none;
    border-radius: 12px;
    color: #000000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}

.auth-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.6);
}

/* Divider para separar métodos de login */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider span {
    margin: 0 15px;
    padding: 0 10px;
    background: var(--bg-dark);
}

/* Botão Discord */
.discord-login-btn {
    width: 100%;
    padding: 16px;
    background: #5865F2;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
}

.discord-login-btn:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(88, 101, 242, 0.4);
}

.discord-login-btn svg {
    width: 24px;
    height: 24px;
}

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

/* Discord Role Error Message */
.discord-role-error {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 82, 82, 0.1));
    border: 2px solid #ff6b6b;
    border-radius: 12px;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.discord-role-error .error-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.discord-role-error h3 {
    color: #ff6b6b;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.discord-role-error p {
    color: #e0e0e0;
    margin-bottom: 15px;
    line-height: 1.5;
}

.discord-role-error strong {
    color: #ffd93d;
    font-weight: 600;
}

.discord-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #5865f2;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.discord-join-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

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

/* Header moderno - Tema CW3 */
header {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 2px 20px rgba(255, 215, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 999;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
}

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

.header-actions button {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    border: none;
    border-radius: 8px;
    color: #000000;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.header-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

/* Botão de voltar estilizado */
header > button:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 50px;
    color: var(--primary-gold);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

header > button:first-child::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

header > button:first-child:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--primary-gold);
    transform: translateX(-5px);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

header > button:first-child:hover::before {
    width: 100%;
    height: 100%;
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Cards com glassmorphism - Tema CW3 */
.api-keys-section {
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

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

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-header button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    border: none;
    border-radius: 10px;
    color: #000000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.section-header button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Lista de API Keys */
.api-keys-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.api-key-item {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s;
    animation: pulse-glow 3s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 1;
}

.api-key-item:hover {
    background: rgba(255, 215, 0, 0.05);
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.api-key-info {
    flex: 1;
}

.api-key-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--primary-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.api-key-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.api-key-actions {
    display: flex;
    gap: 10px;
}

.api-key-actions {
    display: flex;
    gap: 12px;
}

.api-key-actions button {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    border: none;
    border-radius: 8px;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.api-key-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

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

.stat-card {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    transition: all 0.3s;
    animation: pulse-glow 3s ease-in-out infinite;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.4);
}

.stat-card h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Tabs modernos para detalhes */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.tabs .tab-btn {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
}

.tabs .tab-btn.active {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    color: #000000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.tabs .tab-btn:hover:not(.active) {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

/* Modal moderno */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px;
    max-width: 500px;
    width: 90%;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(255, 215, 0, 0.3);
    animation: pulse-glow 3s ease-in-out infinite;
}

.modal-content h2 {
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

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

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    border: 2px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #000000;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.6);
}

/* Notifications com estilo moderno */
#notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.notification {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(255, 215, 0, 0.2);
    animation: slideIn 0.3s ease, pulse-glow 3s ease-in-out infinite;
}

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.warning {
    border-left: 4px solid var(--primary-gold);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-yellow));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold));
}


/* Responsividade */
@media (max-width: 768px) {
    .logo {
        font-size: 36px;
    }

    .auth-container {
        margin: 40px 20px;
        padding: 30px 20px;
    }

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

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        position: relative;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .tabs {
        flex-direction: column;
    }

    .tabs .tab-btn {
        width: 100%;
    }

    .export-btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
}

/* Admin Page Styles */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border-color: var(--primary-gold);
}

.admin-stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-gold);
    margin: 10px 0;
}

.admin-stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.user-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}

.user-card:hover {
    background: rgba(255, 215, 0, 0.05);
    border-color: var(--primary-gold);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.4);
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.user-name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.admin-badge, .email-badge {
    flex-shrink: 0;
}

.admin-badge {
    background: linear-gradient(135deg, var(--primary-gold), var(--accent-orange));
    color: black;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.user-stats {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* User Details Modal */
.user-details-modal {
    max-width: 600px;
}

.user-details-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 20px;
}

.user-details-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-gold);
}

.user-details-header h2 {
    color: var(--primary-gold);
    margin-bottom: 5px;
}

.user-details-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-api-keys {
    max-height: 400px;
    overflow-y: auto;
}

.api-key-item {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.api-key-name {
    font-weight: bold;
    color: var(--primary-gold);
    margin-bottom: 8px;
}

.api-key-stats {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.api-key-value {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 4px;
    margin-top: 10px;
    word-break: break-all;
    font-size: 0.8rem;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gold);
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Fundos pretos destacados para áreas de conteúdo */
.container,
.auth-container,
.stat-card,
.log-item,
.error-item,
.raffle-entry,
.modal-content {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

body.dark-mode .container,
body.dark-mode .auth-container,
body.dark-mode .stat-card,
body.dark-mode .log-item,
body.dark-mode .error-item,
body.dark-mode .raffle-entry,
body.dark-mode .modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.2);
}
/* ---- Auth tabs ---- */
.auth-tabs { display: flex; gap: 0; margin-bottom: 20px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,215,0,0.3); }
.auth-tab { flex: 1; padding: 10px; background: transparent; color: var(--text-secondary,#aaa); border: none; cursor: pointer; font-size: 14px; font-weight: 600; transition: background 0.2s, color 0.2s; }
.auth-tab.active { background: rgba(255,215,0,0.15); color: #FFD700; }
.auth-panel { width: 100%; }
.email-subtabs { display: flex; gap: 0; margin-bottom: 16px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,215,0,0.2); }
.email-subtab { flex: 1; padding: 8px; background: transparent; color: var(--text-secondary,#aaa); border: none; cursor: pointer; font-size: 13px; transition: background 0.2s, color 0.2s; }
.email-subtab.active { background: rgba(255,215,0,0.1); color: #FFD700; }
.form-group { margin-bottom: 12px; }
.form-input { width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,215,0,0.3); border-radius: 6px; color: #fff; font-size: 14px; box-sizing: border-box; }
.form-input:focus { outline: none; border-color: #FFD700; }
.email-auth-btn { width: 100%; padding: 12px; background: #FFD700; color: #000; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 4px; }
.email-auth-btn:hover { background: #FFC200; }
.auth-error { color: #ff6b6b; font-size: 13px; margin: 8px 0; padding: 8px; background: rgba(255,107,107,0.1); border-radius: 6px; }

/* ---- Invite codes ---- */
.invite-codes-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.invite-code-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,215,0,0.15); border-radius: 8px; flex-wrap: wrap; }
.invite-code-row.used { opacity: 0.5; }
.invite-code-value { font-family: monospace; font-size: 15px; font-weight: 700; color: #FFD700; letter-spacing: 2px; flex-shrink: 0; }
.invite-code-status { flex: 1; font-size: 13px; color: var(--text-secondary,#aaa); }
.invite-code-date { font-size: 12px; color: var(--text-secondary,#888); }
.revoke-btn { padding: 4px 12px; background: rgba(255,80,80,0.15); color: #ff6b6b; border: 1px solid rgba(255,80,80,0.3); border-radius: 4px; cursor: pointer; font-size: 12px; }
.revoke-btn:hover { background: rgba(255,80,80,0.3); }

/* ---- Card de Códigos de Convite (admin) ---- */
.invite-codes-card { background: rgba(0,0,0,0.95); border: 1px solid rgba(255,215,0,0.35); border-radius: 12px; padding: 24px; margin-top: 32px; backdrop-filter: blur(10px); }
.invite-codes-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.invite-codes-card-header h2 { margin: 0 0 4px 0; font-size: 18px; color: #FFD700; }
.invite-codes-subtitle { margin: 0; font-size: 13px; color: var(--text-secondary, #aaa); }
.generate-code-btn { flex-shrink: 0; padding: 10px 20px; background: #FFD700; color: #000; border: none; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.generate-code-btn:hover { background: #FFC200; }

/* ---- Admin: usuarios section ---- */
.admin-users-section { margin-top: 30px; }
.admin-users-section h2 { margin-bottom: 16px; font-size: 18px; }

/* ---- Invite codes card — abaixo do container principal ---- */
.invite-codes-card { max-width: 1200px; margin: 0 auto 40px; padding: 24px 20px; }

/* ---- Invite codes — dentro do container admin ---- */
.invite-codes-inner { margin-top: 32px; background: rgba(255,215,0,0.04); border: 1px solid rgba(255,215,0,0.25); border-radius: 12px; padding: 24px; }

/* ---- Mini card de convites (abaixo do header admin) ---- */
.invite-mini-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 480px; margin: 16px auto 0; padding: 14px 20px; background: rgba(0,0,0,0.9); border: 1px solid rgba(255,215,0,0.35); border-radius: 10px; }
.invite-mini-label { font-size: 14px; font-weight: 600; color: #FFD700; }
.invite-mini-list { max-width: 480px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 6px; padding: 0 20px; }

/* ---- Forgot password link ---- */
.forgot-link { color: #FFD700; font-size: 13px; cursor: pointer; text-decoration: underline; }
.forgot-link:hover { color: #FFC200; }

/* ---- Avatar placeholder para usuários email ---- */
.user-avatar-placeholder { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,215,0,0.15); border: 2px solid rgba(255,215,0,0.4); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: bold; color: #FFD700; flex-shrink: 0; }

/* ---- Badge email no admin ---- */
.email-badge { background: rgba(100,180,255,0.2); color: #64b4ff; border: 1px solid rgba(100,180,255,0.4); border-radius: 4px; padding: 2px 6px; font-size: 10px; font-weight: 700; margin-left: 4px; }

/* ---- Manage codes button ---- */
.manage-codes-btn { padding: 10px 16px; background: transparent; color: #FFD700; border: 1px solid rgba(255,215,0,0.4); border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.manage-codes-btn:hover { background: rgba(255,215,0,0.1); }

/* ---- Invite codes modal ---- */
.invite-codes-modal-content { width: 90%; max-width: 760px; max-height: 85vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.invite-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid rgba(255,215,0,0.15); }
.invite-modal-header h2 { margin: 0; font-size: 18px; color: #FFD700; }
.invite-modal-actions { padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.invite-table-wrap { overflow-y: auto; flex: 1; padding: 0 24px 24px; }

/* ---- Invite codes table ---- */
.invite-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.invite-table th { text-align: left; padding: 10px 12px; color: #aaa; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.invite-table td { padding: 12px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.invite-table tr:hover td { background: rgba(255,255,255,0.02); }
.ic-code { font-family: monospace; font-size: 13px; color: #FFD700; letter-spacing: 1px; background: rgba(255,215,0,0.08); padding: 3px 8px; border-radius: 4px; }
.ic-badge { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.ic-pending { background: rgba(255,165,0,0.15); color: #FFA500; }
.ic-used { background: rgba(0,200,100,0.15); color: #00C864; }
.ic-revoked { background: rgba(255,80,80,0.15); color: #ff6b6b; }

/* ---- Delete user button ---- */
.delete-user-btn { width: 100%; padding: 10px; background: rgba(255,80,80,0.1); color: #ff6b6b; border: 1px solid rgba(255,80,80,0.3); border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: background 0.2s; }
.delete-user-btn:hover { background: rgba(255,80,80,0.25); }

/* ---- Delete button on user card ---- */
.user-delete-btn { flex-shrink: 0; background: rgba(255,80,80,0.1); border: 1px solid rgba(255,80,80,0.3); color: #ff6b6b; border-radius: 6px; padding: 6px 8px; cursor: pointer; font-size: 14px; transition: background 0.2s; }
.user-delete-btn:hover { background: rgba(255,80,80,0.3); }

/* ======== ADMIN USER LIST (professional) ======== */
.aul-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 10px; cursor: pointer; transition: background 0.15s; border: 1px solid transparent; }
.aul-row:hover { background: rgba(255,215,0,0.05); border-color: rgba(255,215,0,0.15); }
#discordUsersList { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }

.aul-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.aul-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,215,0,0.3); object-fit: cover; flex-shrink: 0; }
.aul-avatar-init { background: rgba(255,215,0,0.12); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #FFD700; }
.aul-names { min-width: 0; }
.aul-name { display: block; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aul-email { display: block; font-size: 12px; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.aul-center { display: flex; gap: 6px; flex-shrink: 0; }
.aul-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.3px; }
.aul-badge-admin { background: rgba(255,215,0,0.2); color: #FFD700; border: 1px solid rgba(255,215,0,0.4); }
.aul-badge-discord { background: rgba(88,101,242,0.2); color: #8b9eff; border: 1px solid rgba(88,101,242,0.3); }
.aul-badge-email { background: rgba(100,180,255,0.15); color: #64b4ff; border: 1px solid rgba(100,180,255,0.3); }

.aul-stats { display: flex; gap: 12px; font-size: 13px; color: #aaa; flex-shrink: 0; min-width: 100px; justify-content: flex-end; }
.aul-actions { flex-shrink: 0; width: 36px; display: flex; justify-content: center; }
.aul-delete-btn { background: transparent; border: none; color: #666; font-size: 16px; cursor: pointer; padding: 4px; border-radius: 4px; transition: color 0.15s, background 0.15s; }
.aul-delete-btn:hover { color: #ff6b6b; background: rgba(255,80,80,0.1); }

/* ======== USER DETAIL MODAL ======== */
.udm-content { background: #111; border: 1px solid rgba(255,215,0,0.2); border-radius: 16px; width: 92%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.udm-close { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,0.07); border: none; color: #aaa; font-size: 16px; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1; }
.udm-close:hover { color: #fff; background: rgba(255,255,255,0.12); }

.udm-header { display: flex; align-items: center; gap: 16px; padding: 24px 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.udm-header-info { min-width: 0; }
.udm-name { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.udm-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.udm-body { overflow-y: auto; padding: 20px 24px; flex: 1; }
.udm-info-grid { display: flex; flex-direction: column; gap: 0; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.udm-info-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.udm-info-row:last-child { border-bottom: none; }
.udm-info-label { font-size: 12px; color: #777; width: 110px; flex-shrink: 0; }
.udm-info-value { font-size: 13px; color: #ddd; word-break: break-all; }

.udm-section { margin-top: 4px; }
.udm-section-title { font-size: 13px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 10px; }
.udm-key-row { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; }
.udm-key-name { display: block; font-size: 14px; font-weight: 600; color: #FFD700; margin-bottom: 4px; }
.udm-key-stats { font-size: 12px; color: #888; }

.udm-footer { padding: 16px 24px; border-top: 1px solid rgba(255,80,80,0.1); }

/* ---- API key invalid state ---- */
.api-key-invalid { border-color: rgba(255,80,80,0.5) !important; }
.api-key-alert { background: rgba(255,80,80,0.1); border: 1px solid rgba(255,80,80,0.3); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; color: #ff8080; display: flex; align-items: center; gap: 8px; }
.api-key-main { display: flex; align-items: center; justify-content: space-between; }
.key-invalid-badge { font-size: 11px; font-weight: 700; background: rgba(255,80,80,0.2); color: #ff6b6b; border: 1px solid rgba(255,80,80,0.4); border-radius: 4px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }

/* ---- API key card layout fix ---- */
.api-key-item { display: flex !important; flex-direction: column !important; gap: 0 !important; justify-content: flex-start !important; align-items: stretch !important; }
.api-key-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.api-key-alert { margin-top: 14px; }

/* ---- API key action buttons ---- */
.btn-details { padding: 10px 16px; background: linear-gradient(135deg, #FFD700, #FFC107); color: #000; border: none; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; }
.btn-update-key { padding: 10px 16px; background: transparent; color: #FFD700; border: 1px solid rgba(255,215,0,0.5); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; }
.btn-update-key:hover { background: rgba(255,215,0,0.1); }
.btn-delete-key { padding: 10px 16px; background: transparent; color: #ff6b6b; border: 1px solid rgba(255,80,80,0.4); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; }
.btn-delete-key:hover { background: rgba(255,80,80,0.1); }
.api-key-actions { display: flex; gap: 8px; flex-wrap: nowrap; }
