/* --- RESET & GERAL --- */
:root {
    --sidebar-width: 250px;
    --header-height: 60px;
    --primary-color: #4a90e2;
    --bg-color: #f4f6f9;
    --text-color: #333;
}

body, html {
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100%;
}

* { box-sizing: border-box; }
a { text-decoration: none; }

/* --- LOGIN PAGE (LAYOUT ESPECÍFICO) --- */
/* Adicionaremos a classe .login-body no body do login.php */
body.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white; padding: 40px; border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%; max-width: 400px; text-align: center;
}
.login-container input {
    width: 100%; padding: 12px; margin: 10px 0;
    border: 1px solid #ddd; border-radius: 5px; background: #f9f9f9;
}
.login-container button {
    width: 100%; padding: 12px; background: var(--primary-color);
    color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; margin-top: 10px;
}
.login-container button:hover { opacity: 0.9; }

/* --- DASHBOARD LAYOUT (GRID SYSTEM) --- */
.app-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr;
    grid-template-areas: 
        "sidebar header"
        "sidebar content";
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR (Lateral Esquerda) */
.sidebar {
    grid-area: sidebar;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

.sidebar nav { padding: 20px 0; flex-grow: 1; }

.sidebar nav a {
    display: block; padding: 15px 20px;
    color: #bdc3c7; border-left: 4px solid transparent;
    transition: all 0.3s;
}
.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255,255,255,0.05);
    color: white; border-left-color: var(--primary-color);
}
.sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.btn-logout { color: #e74c3c !important; font-weight: bold; display: block; }

/* HEADER (Topo Fixo) */
.top-header {
    grid-area: header;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 10;
}
.user-profile { display: flex; align-items: center; gap: 15px; }
.badge-plan { 
    padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase;
}
.badge-free { background: #e0e0e0; color: #555; }
.badge-pro { background: #f1c40f; color: #333; }

/* MAIN CONTENT (Área de Rolagem) */
.main-content {
    grid-area: content;
    overflow-y: auto; /* AQUI ESTÁ A CORREÇÃO DA ROLAGEM */
    padding: 30px;
    background-color: var(--bg-color);
}

/* --- COMPONENTES VISUAIS --- */
.card { background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); overflow: hidden; }
.btn-action { display: inline-block; padding: 10px 20px; background: var(--primary-color); color: white; border-radius: 5px; }

/* CSS ESPECÍFICO DO STEP 2 (IMAGENS) */
.page-block { margin-bottom: 30px; border: 1px solid #e1e4e8; border-radius: 8px; background: white; }
.page-header { padding: 15px 20px; background: #f8f9fa; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.upload-area { padding: 20px; background: #fafbfc; text-align: center; border-top: 1px solid #eee; }
.images-grid { display: flex; gap: 15px; padding: 20px; flex-wrap: wrap; }
.img-thumb { width: 120px; height: 120px; border-radius: 6px; object-fit: cover; border: 1px solid #ddd; }
.img-wrapper { position: relative; }
.btn-delete { position: absolute; top: -5px; right: -5px; background: red; color: white; width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px; font-size: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* ALERTA DE SUCESSO/ERRO */
.alert { padding: 15px; margin-bottom: 20px; border-radius: 5px; }
.alert-error { background: #ffebee; color: #c62828; }
.alert-success { background: #e8f5e9; color: #2e7d32; }

.btn-icon {
    width: 35px; height: 35px;
    background: #f8f9fa; border: 1px solid #ddd; border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.btn-icon:hover {
    background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transform: translateY(-2px);
}

/* --- BOTÃO DE UPGRADE NO TOPO --- */
.btn-upgrade-top {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%); /* Gradiente Dourado/Laranja */
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px; /* Bordas bem redondas */
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    transition: all 0.3s ease;
    margin-right: 20px; /* Espaço para o perfil do usuário */
    animation: pulse-gold 2s infinite; /* Animação de pulsar */
}

.btn-upgrade-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
    filter: brightness(1.1); /* Fica mais brilhante */
}

.btn-upgrade-top i {
    font-size: 1rem;
}

/* Animação suave de pulso (sombra expandindo) */
@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}


/* Adicione ou verifique se existe no style.css */
.btn-logout {
    color: #e74c3c !important; /* Vermelho */
    font-weight: bold;
    display: block;
    transition: all 0.3s;
}
.btn-logout:hover {
    background: rgba(231, 76, 60, 0.1) !important;
    color: #c0392b !important;
}