:root {
    --primary: #00a884;
    --secondary: #06cf9c;
    --dark: #111b21;
    --light: #f0f2f5;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: var(--light);
    margin: 0;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Ajuste para o main ocupar espaço correto quando houver sidebar */
main {
    display: flex;
    flex-direction: column;
}

/* Cards Modernos */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 2rem;
    transition: transform 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn-primary:hover { background: var(--secondary); }

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Layout de Login/Registro */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh; /* Centraliza verticalmente */
    padding: 20px;
}

.auth-container {
    width: 98%; /* Garante que ocupe quase tudo */
    max-width: none; /* Remove limite de largura */
    margin: 0 auto;
    text-align: center;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); /* Sombra suave e moderna */
}

.auth-container h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-size: 1.8rem;
}

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #3b4a54; font-size: 0.95rem; }
.form-group input {
    width: 100%;
    padding: 14px 16px; /* Input mais gordinho */
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 1rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.form-group input:focus {
    background-color: #fff;
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

/* Ajuste para o plugin de telefone intl-tel-input */
.iti { width: 100%; }

/* Links do rodapé do formulário (Voltar, Entrar, etc) */
.auth-footer {
    margin-top: 25px;
    font-size: 0.95rem;
    color: #54656f;
}
.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
.auth-footer a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Header */
header {
    background: var(--white);
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Esquerda (vazio), Centro (Logo), Direita (Nav) */
    align-items: center;
}
.logo { 
    grid-column: 2;
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-weight: bold; 
    font-size: 1.2rem;
    justify-self: center;
}
.logo img { height: 40px; }

nav {
    grid-column: 3;
    justify-self: end;
    display: flex;
    gap: 10px;
}

/* Botões menores no header */
nav .btn-primary, nav .btn-secondary {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Responsividade do Header */
@media (max-width: 768px) {
    header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 15px;
        gap: 10px;
    }
    .logo {
        grid-column: auto;
        justify-self: start;
    }
    nav {
        grid-column: auto;
        justify-self: end;
        display: flex;
        gap: 8px;
    }
    nav .btn-primary, nav .btn-secondary {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* --- Novo Layout do Dashboard --- */
.dashboard-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary);
    border-bottom: 1px solid #f0f0f0;
}

/* Botão de fechar no mobile (inicialmente oculto) */
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #fff; /* Ajustado para sidebar escura */
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #54656f;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: #f0f2f5;
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-menu li a i {
    width: 25px;
    margin-right: 10px;
    text-align: center;
}

.content-area {
    flex: 1;
    background: #f8f9fa;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 0; /* Padding controlado internamente */
}

.dashboard-header {
    background: #ffffff;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Altura fixa para consistência */
}

.dashboard-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--dark);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.user-profile .avatar {
    width: 35px;
    height: 35px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Botão Hamburguer (Mobile Toggle) */
.mobile-toggle {
    display: none; /* Oculto no Desktop */
    background: #fff;
    border: none;
    font-size: 1.4rem;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-right: 10px;
}

/* Overlay Escuro para Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* Responsividade Dashboard */
@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; }
    
    /* Sidebar Off-canvas */
    .sidebar { 
        position: fixed;
        top: 0;
        left: -280px; /* Escondido */
        width: 260px;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
        border-right: 1px solid #e0e0e0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.active { left: 0; } /* Mostra sidebar */
    .sidebar-overlay.active { display: block; }
    
    .sidebar-header { display: flex; justify-content: space-between; }
    .sidebar-close { display: block; }
    
    .mobile-toggle { display: block; }

    /* Ajustes do Header no Mobile */
    .dashboard-header { padding: 10px 15px; }
    .dashboard-header h2 { font-size: 1.1rem; }
    .user-profile span { display: none; } /* Esconde nome, deixa só a bolinha */
    .user-profile .avatar { width: 32px; height: 32px; font-size: 1rem; }
    .content-area { padding: 0; } /* Remove padding extra do container */
    
    /* Ajuste do menu para vertical no mobile */
    .sidebar-menu { display: block; overflow-x: visible; padding: 20px 0; }
    .sidebar-menu li a { border-left: 4px solid transparent; border-bottom: none; }
    .sidebar-menu li a:hover, .sidebar-menu li a.active { border-left-color: var(--primary); border-bottom: none; }
}
