/* assets/css/admin-style.css */
/* Design System: Soft UI + 10px Rule */

/* IMPORTAÇÃO DE MÓDULOS (Centralização de Estilos) */
/* Adicione novos módulos aqui conforme forem criados */
@import url('/app/dashboard/style.css');
@import url('/app/gestao-menus/style.css');
/* @import url('/app/usuarios/style.css');  -- Futuro */
/* @import url('/app/planos/style.css');    -- Futuro */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* --- REGRA DE OURO: 10px --- */
    --unit: 10px;
    
    --pad: var(--unit);            /* 10px */
    --gap: var(--unit);            /* 10px */
    --margin: var(--unit);         /* 10px */
    --radius: var(--unit);         /* 10px */
    --radius-pill: 50px;           /* Para botões redondos */

    /* --- PALETA SOFT UI --- */
    --bg-body: #F2F4F8;       
    --bg-surface: #FFFFFF;    
    --bg-input: #F8FAFC;
    
    --text-primary: #1E293B;  
    --text-secondary: #64748B;
    --text-light: #94A3B8;    
    
    --color-primary: #0F172A; 
    --color-accent: #3B82F6;  
    
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;

    --shadow-soft: 0 4px 20px -5px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 25px -5px rgba(0,0,0,0.1);
}

/* =========================================
   1. BASE
   ========================================= */
* { box-sizing: border-box; outline: none; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0; padding: 0;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; padding: 0; margin: 0; }

.custom-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: var(--radius); }

/* =========================================
   2. LAYOUT
   ========================================= */
.app-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    gap: var(--gap);
    padding: var(--pad);
}

/* SIDEBAR */
.app-sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-radius: var(--radius);
    display: flex; flex-direction: column;
    padding: var(--pad);
    gap: var(--gap);
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex; align-items: center; gap: var(--gap);
    padding: 10px;
    border-radius: var(--radius);
    color: var(--text-primary);
}

.brand-logo {
    width: 32px; height: 32px;
    background: var(--color-primary); color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.brand-text { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.5px; }

.sidebar-menu {
    flex: 1; overflow-y: auto;
    display: flex; flex-direction: column;
    gap: 5px; 
}

/* Links do Menu */
.menu-link {
    display: flex; align-items: center; gap: var(--gap);
    padding: 10px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 600; font-size: 0.9rem;
    transition: all 0.2s;
}
.menu-link:hover {
    background: var(--bg-input);
    color: var(--text-primary);
    transform: translateX(4px);
}
.menu-link.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}
.menu-link.active i { color: #fff; }
.icon-box { width: 20px; text-align: center; }

/* Botão Sair */
.btn-logout {
    width: 100%; border: none; background: transparent; 
    cursor: pointer; justify-content: flex-start;
    display: flex; align-items: center; gap: var(--gap);
    padding: 10px; color: var(--danger); font-weight: 600;
    border-radius: var(--radius);
    transition: 0.2s;
}
.btn-logout:hover { background: #FEE2E2; }

/* MAIN CONTENT */
.app-main {
    flex: 1; 
    display: flex; flex-direction: column;
    gap: var(--gap);
    min-width: 0;
}

/* TOPBAR */
.app-topbar {
    background: var(--bg-surface);
    height: 70px;
    border-radius: var(--radius);
    padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
}

.page-title { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.breadcrumbs { font-size: 0.8rem; color: var(--text-light); }
.breadcrumbs .current { font-weight: 600; color: var(--text-secondary); }

.topbar-right { display: flex; align-items: center; gap: 15px; }

/* Busca */
.search-pill {
    background: var(--bg-input);
    padding: 8px 15px;
    border-radius: var(--radius-pill);
    display: flex; align-items: center; gap: 10px;
    width: 250px;
}
.search-pill input { border: none; background: transparent; width: 100%; color: var(--text-primary); font-weight: 500; }

.btn-icon-soft {
    width: 38px; height: 38px; border-radius: 50%;
    background: #fff; border: 1px solid #E2E8F0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary);
    transition: 0.2s; position: relative;
}
.btn-icon-soft:hover { border-color: var(--color-accent); color: var(--color-accent); }
.dot-notify {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px; background: var(--danger);
    border-radius: 50%; border: 2px solid #fff;
}

/* Perfil */
.profile-pill {
    display: flex; align-items: center; gap: var(--gap);
    cursor: pointer;
}
.avatar-img {
    width: 32px; height: 32px;
    background: var(--color-primary); color: #fff;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem;
}
.profile-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }

/* CONTENT WRAPPER */
.app-content {
    flex: 1; overflow-y: auto;
    /* Margins internas virão dos módulos */
}

/* =========================================
   3. COMPONENTES GERAIS
   ========================================= */
.card-admin, .card-box {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: var(--margin);
}

.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-primary); color: #fff;
    border: none; padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

.form-control {
    width: 100%; padding: 10px;
    border-radius: var(--radius);
    border: 1px solid transparent; background: var(--bg-input);
    color: var(--text-primary); transition: 0.2s;
    margin-bottom: var(--margin);
}
.form-control:focus { background: #fff; border-color: var(--color-accent); }
.form-label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.85rem; }

/* MODAL */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px);
    z-index: 999; display: flex; align-items: center; justify-content: center;
    padding: var(--pad);
}
.modal-card {
    background: #fff; width: 100%; max-width: 500px;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; max-height: 90vh;
}
.modal-header, .modal-footer { padding: 15px; display: flex; align-items: center; justify-content: space-between; }
.modal-header { border-bottom: 1px solid #F1F5F9; }
.modal-footer { border-top: 1px solid #F1F5F9; background: #F8FAFC; border-radius: 0 0 var(--radius) var(--radius); }
.modal-body { padding: 20px; overflow-y: auto; }

/* TOASTS */
#toast-container {
    position: fixed; top: 20px; right: 20px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 2000;
}
.toast {
    background: #fff; padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    display: flex; align-items: center; gap: 10px;
    width: 300px; border-left: 4px solid var(--color-primary);
    animation: slideIn 0.3s ease;
    transition: 0.3s;
}
.toast-sucesso { border-color: var(--success); }
.toast-sucesso i { color: var(--success); }
.toast-erro { border-color: var(--danger); }
.toast-erro i { color: var(--danger); }

/* AUTH */
.auth-layout {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg-body);
}

/* ANIMATIONS */
.fade-in { animation: fadeIn 0.5s ease forwards; }
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.scale-in { animation: scaleIn 0.3s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }