/* * ROOT - Estilo Visual Hub (DARK MODE)
 * Versão consolidada com a paleta do Arsenal e UI Corporativa (Azul Facebook)
 */

:root {
    /* Cores de Destaque (Azul Facebook) */
    --root-blue: #1877F2;
    --root-blue-hover: #166FE5;
    --root-blue-alpha: rgba(24, 119, 242, 0.1);
    
    /* 🌙 Paleta Dark (Baseada no Arsenal/Gemini) */
    --root-bg: #131314;           /* Fundo principal */
    --root-sidebar-bg: #1e1f20;   /* Fundo lateral e cards */
    --root-card-bg: #1e1f20;
    --root-text-main: #e3e3e3;    /* Branco suave */
    --root-text-muted: #c4c7c5;   /* Cinza azulado */
    --root-border: #444746;       /* Bordas sutis */
    
    /* Sombras e Feedback */
    --root-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --root-active-bg: rgba(168, 199, 250, 0.12); /* Azul translúcido do Arsenal */
}

body.root-body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--root-bg);
    color: var(--root-text-main);
    transition: background-color 0.3s;
}

.root-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR (UX Arsenal: Compacta e elegante) --- */
.root-sidebar {
    width: 240px; 
    background-color: var(--root-sidebar-bg);
    border-right: 1px solid var(--root-border);
    display: flex;
    flex-direction: column;
    padding: 25px 15px; 
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
}

.root-sidebar-logo h2 {
    margin: 0;
    font-weight: 800;
    font-size: 20px; 
    letter-spacing: -0.5px;
    color: #ffffff;
}

.root-sidebar-logo h2 span {
    color: var(--root-blue);
}

.root-sidebar-logo p {
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    color: var(--root-text-muted);
    letter-spacing: 2px;
}

.root-nav {
    margin-top: 40px;
    flex: 1;
}

.nav-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--root-text-muted);
    margin: 30px 0 8px 12px;
    letter-spacing: 1px;
    opacity: 0.5;
}

.root-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--root-text-muted);
    font-weight: 600;
    font-size: 13.5px; 
    border-radius: 8px; 
    transition: all 0.2s;
    margin-bottom: 5px;
}

.root-nav a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.root-nav a:hover, .root-nav a.active {
    background-color: rgba(255, 255, 255, 0.08); /* Fundo sutil e neutro, sem ser azulão */
    color: #ffffff; /* Texto branco puro e claro */
}

.root-nav a.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.lock-icon {
    font-size: 10px;
    margin-left: auto;
}

/* --- MAIN CONTENT (UX Limpa) --- */
.root-main {
    flex: 1;
    padding: 30px 50px; 
}

.root-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.welcome-text h1 {
    margin: 0 0 4px 0;
    font-size: 22px; 
    font-weight: 800;
    color: #ffffff;
}

.welcome-text p {
    margin: 0;
    font-size: 13px;
    color: var(--root-text-muted);
}

.date-display {
    color: var(--root-text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* --- GRID DE FERRAMENTAS (HUB) --- */
.root-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.tool-card {
    background-color: var(--root-card-bg);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--root-border);
    box-shadow: var(--root-shadow);
    transition: transform 0.2s, border-color 0.2s;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--root-blue);
}

.tool-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--root-text-muted);
    margin-bottom: 20px;
}

.grana-icon {
    background-color: var(--root-blue-alpha);
    color: var(--root-blue);
}

.tool-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.tool-info p {
    margin: 0 0 25px 0;
    font-size: 13px;
    color: var(--root-text-muted);
    line-height: 1.5;
}

.badge-soon {
    font-size: 10px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block;
}

/* --- CONFIGURAÇÕES / PERFIL (CARDS ESPECÍFICOS) --- */
.root-card {
    background: var(--root-card-bg);
    border: 1px solid var(--root-border);
    border-radius: 16px; 
    padding: 25px;
}

.card-title {
    margin: 0 0 20px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--root-border);
    padding-bottom: 15px;
}

/* --- BOTÕES --- */
.btn-root {
    display: inline-block;
    background-color: var(--root-blue);
    color: #ffffff; /* Texto branco para dar contraste com o azul escuro */
    padding: 10px 20px; 
    border-radius: 8px; 
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    border: none;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
}

.btn-root:hover {
    background-color: var(--root-blue-hover);
    transform: scale(1.02);
}

.btn-root.disabled {
    background-color: var(--root-border);
    color: var(--root-text-muted);
    cursor: not-allowed;
}

/* --- FORMULÁRIOS --- */
.root-form-group {
    margin-bottom: 20px;
}

.root-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--root-text-muted);
}

.root-form-group input {
    width: 100%;
    height: 42px; 
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--root-border);
    background-color: rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.root-form-group input:focus {
    border-color: var(--root-blue);
}

.avatar-preview img, .user-info img {
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid var(--root-border);
}

/* --- ALERTAS --- */
.root-alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}

.root-alert.success {
    background-color: var(--root-blue-alpha);
    color: var(--root-blue);
    border-color: var(--root-blue);
}

.root-alert.error {
    background-color: rgba(220, 38, 38, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

/* --- FOOTER SIDEBAR (ESTILO ARSENAL) --- */
.root-sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--root-border);
    display: flex;
    flex-direction: column; /* Coloca os itens em coluna (um embaixo do outro) */
    gap: 15px;
}

.user-info-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-box img {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid var(--root-border);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-details .user-name {
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px; /* Evita que nomes gigantes quebrem o layout */
}

/* Badge de Plano */
.user-plan-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.badge-pro, .badge-premium {
    background-color: var(--root-blue-alpha);
    color: var(--root-blue);
    border: 1px solid var(--root-blue);
}

.badge-free {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--root-text-muted);
    border: 1px solid var(--root-border);
}

/* Botão de Sair */
.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--root-text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.logout-btn:hover {
    color: #EF4444; /* Vermelho de alerta ao passar o mouse */
    background-color: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

/* --- AJUSTES FINAIS DARK MODE --- */
.plan-status {
    background-color: rgba(255, 255, 255, 0.03); 
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--root-border);
}

.plan-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--root-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--root-blue);
}

.check-icon {
    color: var(--root-blue);
    font-size: 20px;
}

.root-form-group input:disabled, .input-disabled {
    background-color: rgba(0, 0, 0, 0.3) !important; 
    color: rgba(255, 255, 255, 0.4) !important;       
    border-color: var(--root-border) !important;
    cursor: not-allowed;
    opacity: 0.7;
}
.btn-root-outline {
    cursor: pointer;
    padding: 8px 15px;
    border: 1px solid var(--root-blue); /* Borda azul mantida */
    color: #ffffff; /* Texto claro e legível */
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    transition: all 0.2s;
}

.btn-root-outline:hover {
    background: var(--root-blue); /* Preenche com o azul no hover */
    color: #ffffff;
}

/* --- TABELAS (GESTÃO) --- */
.root-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.root-table th {
    text-align: left;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--root-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
    border-bottom: 1px solid var(--root-border);
}

.root-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--root-border);
    vertical-align: middle;
}

.root-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.root-table tbody tr:last-child td {
    border-bottom: none;
}