/* Variáveis CSS */
:root {
    --bg: #0b0f14;
    --card: #121821;
    --muted: #8aa0b3;
    --text: #e9eef3;
    --primary: #7c5cff;
    --accent: #19c37d;
    --warn: #ffb020;
    --danger: #ff5d6c;
    --border: #1f2732;
    --sidebar-width: 250px;
}

/* Reset e estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* ===== ESTILOS DO HEADER ===== */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header-left h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

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

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    width: 250px;
    font-size: 14px;
}

.search-box::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
}

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

.icon-button {
    position: relative;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.icon-button .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Substituir emojis por ícones Font Awesome */
.icon-button.notifications::before {
    content: '\f0f3';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
}

.icon-button.messages::before {
    content: '\f0e0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
}

.user-menu {
    margin-left: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    cursor: pointer;
}

/* Menu dropdown do usuário */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background: var(--card);
    min-width: 200px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown:hover .user-dropdown-content {
    display: block;
}

.user-dropdown-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.3s;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-dropdown-item i {
    width: 16px;
    text-align: center;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 5px 0;
}

/* ===== ESTILOS RESPONSIVOS ===== */
@media (max-width: 768px) {
    .header-left h1 {
        font-size: 18px;
    }
    
    .search-box input {
        width: 150px;
    }
}

@media (max-width: 576px) {
    .search-box {
        display: none;
    }
    
    .header-left h1 {
        display: none;
    }
}

/* ===== ESTILOS GERAIS PARA ÍCONES ===== */
.icon-dashboard::before {
    content: '\f0e4';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-users::before {
    content: '\f0c0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-streamers::before {
    content: '\f03d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-gifts::before {
    content: '\f06b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-finance::before {
    content: '\f155';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-moderation::before {
    content: '\f024';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-reports::before {
    content: '\f201';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-settings::before {
    content: '\f013';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-logout::before {
    content: '\f2f5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-home::before {
    content: '\f015';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-live::before {
    content: '\f03d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-explore::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-messages::before {
    content: '\f0e0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-notifications::before {
    content: '\f0f3';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-profile::before {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

.icon-wallet::before {
    content: '\f155';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    width: 16px;
    display: inline-block;
}

/* ===== ANIMAÇÕES ===== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.icon-button.notifications.has-notifications .badge {
    animation: pulse 2s infinite;
}

/* ===== ESTADO ATIVO PARA MENU ===== */
.sidebar-nav li.active a {
    background: rgba(124, 92, 255, 0.1);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.sidebar-nav li.active a::before {
    color: var(--primary);
}

/* Layout do Dashboard */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav ul {
    list-style: none;
    padding: 10px 0;
}

.sidebar-nav li a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.3s;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    padding: 20px;
    flex: 1;
}

/* Página de Login */
.login-body {
    background: radial-gradient(1200px 600px at 80% -10%, rgba(124,92,255,.08), transparent 60%),
                radial-gradient(900px 500px at -10% -20%, rgba(25,195,125,.08), transparent 60%),
                var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    margin-bottom: 10px;
    color: var(--primary);
}

.login-header p {
    color: var(--muted);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 20px;
}

.btn-login:hover {
    background: #6a4ce6;
}

.login-footer {
    text-align: center;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert.error {
    background: rgba(255, 93, 108, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}

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

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0 5px;
}

.stat-change {
    font-size: 14px;
    color: var(--accent);
}

.stat-change.negative {
    color: var(--danger);
}

/* Tabelas */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.content-section {
    margin-bottom: 30px;
}

.content-section h2 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}


/* Estilos para formulários de usuário */
.user-form {
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* Avatar de usuário */
.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}


/* Formulários inline */
.role-form, .delete-form {
    display: inline;
}

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

.alert.success {
    background: rgba(25, 195, 125, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.table-responsive {
    overflow-x: auto;
}