/* =========================================
   SISTEMA DE DESIGN GLASSMORPHISM MODERN
   Autor: Antigravity
   Versão: 2.0 (Ultra Modern)
   ========================================= */

:root {
    /* Paleta de Cores Premium (Neon & Dark) */
    --cor-primaria: #6366f1;
    /* Indigo Vibrante */
    --cor-primaria-hover: #4f46e5;
    --cor-secundaria: #a855f7;
    /* Roxo Neon */
    --cor-fundo-body: #0f172a;
    /* Azul Noturno Profundo */

    /* Sistema de Vidro (Glassmorphism) */
    --vidro-fundo: rgba(30, 41, 59, 0.7);
    --vidro-borda: 1px solid rgba(255, 255, 255, 0.1);
    --vidro-brilho: rgba(255, 255, 255, 0.05);
    --sombra-vidro: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: 12px;

    /* Tipografia */
    --fonte-principal: 'Inter', system-ui, -apple-system, sans-serif;
    --texto-principal: #f8fafc;
    --texto-secundario: #94a3b8;

    /* Animações */
    --transicao-suave: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================
   LAYOUT SPLIT MODERNO (Login Lateral)
   ========================================= */

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Evita scroll se a imagem for grande */
    font-family: 'Inter', sans-serif;
    color: #fff;
    height: 100vh;
    display: flex;
}

/* Área da Direita (Fundo Gigante) */
.login-background-area {
    flex: 1;
    /* Ocupa todo o espaço restante */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
}

/* Opcional: Overlay escuro sobre a imagem se precisar */
.login-background-area::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    /* Leve escurecimento */
}

/* Coluna da Esquerda (Login) */
.login-sidebar {
    width: 100%;
    max-width: 480px;
    /* Largura fixa da barra lateral */
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    /* Quase preto, toque moderno */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    z-index: 10;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    /* Sombra para destacar do fundo */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.login-content {
    width: 100%;
    max-width: 320px;
    animation: slideInLeft 0.6s ease-out;
}

/* Logo na Sidebar */
.sidebar-logo {
    text-align: center;
    margin-bottom: 3rem;
}

.sidebar-logo img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

/* Inputs Modernos */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.modern-input {
    width: 100%;
    background: #1e293b;
    /* Cor sólida escura */
    border: 2px solid transparent;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modern-input:focus {
    outline: none;
    background: #0f172a;
    border-color: #6366f1;
    /* Cor primária */
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: 0.3s;
}

.modern-input:focus+.input-icon {
    color: #6366f1;
}

/* Botão Gradiente */
.btn-modern {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

/* Links do Rodapé */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

.login-footer a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
    color: #a855f7;
}

/* Responsividade */
@media (max-width: 900px) {
    .login-sidebar {
        max-width: 100%;
        /* Ocupa tela toda no mobile/tablet */
        background: rgba(10, 10, 10, 0.98);
    }

    .login-background-area {
        display: none;
        /* Esconde a imagem de fundo em telas pequenas */
    }
}

/* =========================================
   DASHBOARD / ÁREA INTERNA
   ========================================= */

/* Layout Grid Principal */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
    /* Fundo base claro */
    overflow-x: hidden;
}

body.dark-mode .dashboard-wrapper {
    background-color: #0f172a;
    /* Fundo base escuro */
}

/* Sidebar (Menu Lateral) */
.glass-sidebar {
    width: 280px;
    background: #0f172a;
    /* Sempre escuro na sidebar */
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    /* Centraliza logo */
    justify-content: center;
    align-items: center;
    height: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header img {
    max-height: 45px;
    width: auto;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

.menu-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin: 1.5rem 0 0.5rem 1rem;
    font-weight: 600;
}

.menu-item {
    display: block;
    padding: 0.8rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item:hover,
.menu-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    color: #fff;
    transform: translateX(5px);
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #6366f1;
    /* Ícone sempre roxo */
}

.menu-item.active i {
    color: #a855f7;
    /* Ícone ativo roxo neon */
    filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5));
}

/* Submenus (Treeview) */
.has-treeview>a {
    position: relative;
    justify-content: space-between;
}

.has-treeview .nav-treeview {
    display: none;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

.menu-open>.nav-treeview {
    display: block;
    animation: fadeIn 0.3s ease;
}

.nav-treeview .menu-item {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

/* Header (Topo) */
.glass-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 280px;
    /* Largura da sidebar */
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    transition: left 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .glass-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Área de Conteúdo Principal */
.main-content {
    margin-left: 280px;
    margin-top: 70px;
    /* Altura do header */
    padding: 2rem;
    width: calc(100% - 280px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Cards de Dashboard Modernos */
.info-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

body.dark-mode .info-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.info-card:hover {
    transform: translateY(-5px);
}

.card-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.card-details h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

body.dark-mode .card-details h3 {
    color: #f8fafc;
}

.card-details p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Sidebar Toggle */
.sidebar-toggle-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6366f1;
}

@media (max-width: 992px) {
    .glass-sidebar {
        transform: translateX(-100%);
        /* Esconde sidebar */
    }

    .glass-sidebar.open {
        transform: translateX(0);
    }

    .glass-header {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle-btn {
        display: block;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}