/* ===================================================================
   PAINEL DE GESTÃO - TEMA BRANCO COM ROSA CLARO & MODO ESCURO
   =================================================================== */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fff5f8;
    --bg-tertiary: #ffeef3;
    --bg-hover: #ffe4ee;
    --bg-card: #ffffff;

    --accent-pink: #ff5c8d;
    --accent-pink-hover: #ff3d77;
    --accent-pink-soft: #ffeaf1;
    --accent-pink-border: #f8c9d9;
    --accent-gradient: linear-gradient(135deg, #ff759f 0%, #ff4b82 100%);

    --text-primary: #2d1c25;
    --text-secondary: #745f6b;
    --text-muted: #a6919e;

    --border-color: #f7d6e2;
    --border-light: #fcecf2;

    --color-green: #2ecc71;
    --color-red: #e74c3c;
    --color-blue: #3498db;
    --color-amber: #e67e22;
    --color-purple: #9b59b6;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 10px rgba(255, 92, 141, 0.08);
    --shadow-md: 0 8px 25px rgba(255, 92, 141, 0.12);
    --shadow-lg: 0 16px 40px rgba(255, 92, 141, 0.16);

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --sidebar-width: 260px;
}

[data-theme="dark"] {
    --bg-primary: #151117;
    --bg-secondary: #1d1720;
    --bg-tertiary: #271f2b;
    --bg-hover: #332838;
    --bg-card: #1f1823;

    --accent-pink: #ff6899;
    --accent-pink-hover: #ff85ae;
    --accent-pink-soft: #38212f;
    --accent-pink-border: #523046;
    --accent-gradient: linear-gradient(135deg, #ff6899 0%, #ff407d 100%);

    --text-primary: #fcf7fa;
    --text-secondary: #c9bac4;
    --text-muted: #857280;

    --border-color: #382c3c;
    --border-light: #2c2330;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.15s ease;
}

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

/* Tela de Login */
.login-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, var(--bg-tertiary) 0%, var(--bg-primary) 80%);
    z-index: 999;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 36px 32px;
}

.shield-badge {
    display: inline-block;
    background: var(--accent-pink-soft);
    color: var(--accent-pink);
    border: 1px solid var(--accent-pink-border);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Layout Geral */
.dashboard-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.brand-icon {
    font-size: 1.8rem;
}

.sidebar-brand h3 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--accent-pink);
}

.sidebar-brand small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

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

.nav-btn.active {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 92, 141, 0.35);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    font-size: 1.4rem;
}

.admin-profile strong {
    display: block;
    font-size: 0.88rem;
}

.admin-profile small {
    color: var(--accent-pink);
    font-weight: 700;
    font-size: 0.72rem;
}

.sidebar-actions {
    display: flex;
    gap: 6px;
}

/* Topbar */
.admin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
}

.admin-topbar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    flex-shrink: 0;
}

.topbar-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.topbar-title p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

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

/* Corpo do Conteúdo */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Grid de Métricas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

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

.stat-icon.pink { background: #ffeaf1; }
.stat-icon.green { background: #def7ec; }
.stat-icon.red { background: #fde8e8; }
.stat-icon.purple { background: #f3e8ff; }
.stat-icon.blue { background: #e1effe; }
.stat-icon.amber { background: #fef3c7; }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Painéis e Tabelas */
.cards-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.table-filters {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 600px;
}

.filter-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.admin-table th {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.admin-table tr:hover {
    background: var(--bg-hover);
}

/* Badges */
.badge-role {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-role.ceo { background: linear-gradient(135deg, #fef08a, #fde047); color: #854d0e; border: 1px solid #eab308; }
.badge-role.admin { background: #f3e8ff; color: #7e22ce; }
.badge-role.moderator { background: #e1effe; color: #1e429f; }
.badge-role.user { background: var(--bg-tertiary); color: var(--accent-pink); }

.badge-status {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-status.active { background: #def7ec; color: #03543f; }
.badge-status.banned { background: #fde8e8; color: #9b1c1c; }

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--accent-pink);
}

.btn-block {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-group input,
.form-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.alert-box {
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.alert-box.error {
    background: #fde8e8;
    color: #c81e1e;
}

.alert-box.success {
    background: #def7ec;
    color: #03543f;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    font-size: 0.9rem;
}

.db-action-buttons {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 12px;
}

/* Modais */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

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

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--accent-pink);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}
