/* =========================================================
   ASSETS/CSS/STYLE.CSS - VERSÃO FINAL COMPLETA
   TEMA: WHATSAPP TECH (DARK + NEON GREEN)
   ========================================================= */

:root {
    /* --- PALETA DE CORES --- */
    
    /* Fundos */
    --bg-deep: #0b141a;       /* Fundo Principal (Preto Profundo) */
    --bg-surface: #202c33;    /* Fundo dos Cards/Menus (Cinza Escuro) */
    --bg-input: #111b21;      /* Fundo de Inputs */
    
    /* Destaques */
    --primary: #00e676;       /* Verde Neon (Principal) */
    --primary-hover: #00a855; /* Verde Escuro (Hover) */
    --secondary: #00f3ff;     /* Azul Ciano (Detalhes) */
    
    /* Texto */
    --text-main: #e9edef;     /* Branco Suave (Leitura) */
    --text-muted: #8696a0;    /* Cinza Azulado (Legendas) */
    --text-dark: #0b141a;     /* Texto para fundo claro (Botões) */
    
    /* Bordas e Sombras */
    --border: rgba(134, 150, 160, 0.15);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    
    /* Layout */
    --radius: 12px;           /* Arredondamento Padrão */
    --admin-sidebar-w: 260px; /* Largura da Barra Lateral */
    --header-h: 70px;         /* Altura do Header */
}

/* =========================================================
   1. RESET E BASE
   ========================================================= */
* {
    box-sizing: border-box;
    outline: none;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--primary-hover);
}

ul { list-style: none; }

/* =========================================================
   2. ESTRUTURA DO ADMIN (LAYOUT)
   ========================================================= */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* Barra Lateral (Sidebar) */
.admin-sidebar {
    width: var(--admin-sidebar-w);
    background: #111b21; /* Um tom mais escuro que os cards */
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

/* Logo na Sidebar */
.admin-brand {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.5px;
}
.admin-brand span { color: var(--primary); margin-left: 5px; }

/* Navegação */
.admin-nav {
    padding: 20px 0;
    overflow-y: auto;
    flex: 1;
}

.admin-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-muted);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(0, 230, 118, 0.05);
    color: var(--text-main);
    border-left-color: var(--primary);
}

.admin-nav a .icon { margin-right: 10px; width: 20px; text-align: center; }

/* Conteúdo Principal */
.admin-content {
    flex: 1;
    margin-left: var(--admin-sidebar-w);
    padding: 30px;
    width: calc(100% - var(--admin-sidebar-w));
    background: var(--bg-deep);
}

/* Topbar Mobile */
.admin-topbar {
    display: none; /* Escondido no Desktop */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.admin-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

/* =========================================================
   3. HEADER DO SITE PÚBLICO
   ========================================================= */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

.main-nav { display: flex; gap: 20px; }
.nav-btn {
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 20px;
    transition: 0.3s;
}
.nav-btn:hover, .nav-btn.active {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

/* =========================================================
   4. COMPONENTES E UTILITÁRIOS
   ========================================================= */

/* Container Geral */
.panel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards (Caixas Brancas/Cinzas) */
.panel-card, .trust-card, .form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

/* Títulos */
h1, h2, h3, h4 {
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 700;
}
h2 { font-size: 1.8rem; border-left: 4px solid var(--primary); padding-left: 15px; }

/* Botões */
.btn-primary, button[type="submit"], .btn-pay-now {
    background: var(--primary);
    color: var(--text-dark);
    font-weight: 700;
    border: none;
    padding: 12px 28px;
    border-radius: 50px; /* Pílula */
    cursor: pointer;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover, button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 230, 118, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}
.btn-secondary:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

/* Inputs de Formulário */
label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
}

/* Checkboxes */
input[type="checkbox"] {
    accent-color: var(--primary);
    transform: scale(1.2);
    margin-right: 8px;
}

/* Mensagens de Aviso */
.notice {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}
.notice.ok {
    background: rgba(0, 230, 118, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 230, 118, 0.3);
}
.notice.err {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* =========================================================
   5. DASHBOARD STATS (O GRID DE RETÂNGULOS)
   ========================================================= */
.profile-stats {
    display: grid;
    /* Cria colunas responsivas: cabe quantos cards de 240px couberem na tela */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    width: 100%;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Cores das bordas laterais para identificar cada card */
.stat-card:nth-child(1) { border-left: 4px solid #00ff88; } /* Verde */
.stat-card:nth-child(2) { border-left: 4px solid #00f3ff; } /* Azul */
.stat-card:nth-child(3) { border-left: 4px solid #bc13fe; } /* Roxo */
.stat-card:nth-child(4) { border-left: 4px solid #ff9f0a; } /* Laranja */

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.1;
}

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

/* =========================================================
   6. TABELAS (DESKTOP E MOBILE CARDS)
   ========================================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

thead { background: rgba(0,0,0,0.2); }

th {
    text-align: left;
    padding: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

/* Badges de Status */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}
.status-paid { background: rgba(0, 230, 118, 0.15); color: #00e676; }
.status-pending { background: rgba(255, 165, 0, 0.15); color: #ffa500; }
.status-canceled { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* =========================================================
   7. MEDIA QUERIES (RESPONSIVIDADE MÓVEL)
   ========================================================= */
@media (max-width: 900px) {
    /* Admin Sidebar Mobile */
    .admin-sidebar {
        transform: translateX(-100%); /* Esconde sidebar */
        width: 280px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    }
    .admin-sidebar.open {
        transform: translateX(0); /* Mostra sidebar */
    }

    .admin-content {
        margin-left: 0;
        width: 100%;
        padding: 20px 15px;
    }

    .admin-topbar {
        display: flex; /* Mostra botão de menu */
    }

    /* Header Público Mobile */
    .site-header {
        height: auto;
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    .main-nav { flex-wrap: wrap; justify-content: center; }

    /* Forms */
    .form-grid, div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important; /* Tudo em 1 coluna */
    }

    /* Tabelas viram Cards no Mobile */
    table, thead, tbody, th, td, tr { display: block; }
    
    /* Esconde cabeçalho da tabela */
    thead tr { position: absolute; top: -9999px; left: -9999px; }
    
    tr {
        background: rgba(255,255,255,0.02);
        border: 1px solid var(--border);
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
    }
    
    td {
        border: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        position: relative;
        padding: 10px 0 10px 45%; /* Espaço para o label */
        text-align: right;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    
    td:last-child { border-bottom: none; }
    
    /* Label simulado (ex: "Valor: R$ 50") */
    /* Nota: Para funcionar perfeitamente, o HTML precisaria de data-label="Nome". 
       Se não tiver, ele apenas empilha. Abaixo é um fallback genérico. */
    td::before {
        position: absolute;
        left: 0;
        width: 40%;
        text-align: left;
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.8rem;
        content: attr(data-label); /* Pega o atributo data-label do HTML se existir */
    }
}