﻿:root {
    /* Layout responsivo e minimalista */
    --sidebar-width: 260px;
    --topbar-height: 65px;
    
    /* ðŸŽ¯ PALETA OFICIAL - Unificada com Design System */
    --primary-color: #667eea;          /* Azul Principal Oficial */
    --secondary-color: #764ba2;        /* Roxo SecundÃ¡rio Oficial */
    --primary-light: #8B9FEE;          /* Azul Claro derivado */
    --background-main: var(--color-background);        /* âœ… Mantido */
    --background-card: var(--color-surface);        /* âœ… Mantido */
    --text-primary: var(--color-text);           /* âœ… Mantido */
    --text-secondary: var(--color-text-muted);         /* âœ… Mantido */
    --border-light: var(--color-border);           /* âœ… Mantido */
    --border-main: var(--color-border);            /* âœ… Mantido */
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.05);
    
    /* ðŸŽ¨ Gradiente Premium */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: var(--background-main);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    line-height: 1.6;
}

/* Barra Superior Minimalista e Funcional */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--background-card);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-subtle);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    margin-right: 16px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 32px;
    letter-spacing: -0.025em;
}

.search-bar {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border-radius: 8px;
    border: 1px solid var(--border-main);
    background: var(--background-main);
    color: var(--text-primary);
    outline: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    background: var(--background-card);
}

.search-bar::before {
    content: 'ðŸ”';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 24px;
}

.notifications, .user-profile {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--background-main);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 1rem;
}

.notifications:hover, .user-profile:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.logout-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Sidebar Minimalista e Organizada */
.sidebar {
    width: var(--sidebar-width);
    background: var(--background-card);
    border-right: 1px solid var(--border-light);
    height: calc(100vh - var(--topbar-height));
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    overflow-y: auto;
    transition: all 0.2s ease;
    z-index: 999;
}

.main-menu ul {
    list-style: none;
    padding: 16px 12px;
}

.main-menu li {
    margin-bottom: 4px;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

.main-menu li i {
    margin-right: 12px;
    font-size: 1.125rem;
    min-width: 24px;
    text-align: center;
    display: inline-block;
    font-style: normal;
}

.main-menu li:hover {
    background: var(--background-main);
    color: var(--text-primary);
}

.main-menu li.active {
    background: var(--primary-color);
    color: white;
}

.main-menu li.active i {
    color: white;
}

/* Ãrea de ConteÃºdo Limpa e Funcional */
.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 24px;
    transition: all 0.2s ease;
    min-height: calc(100vh - var(--topbar-height));
}

.module-header {
    margin-bottom: 24px;
    background: var(--background-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow-subtle);
}

/* Ocultar header padrão quando módulo tem header próprio */
.module-content:has(.module-header-premium) ~ .module-header,
.module-content .module-header-premium ~ .module-header,
.content-area:has(.module-header-premium) .module-header {
    display: none !important;
}

.module-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.025em;
}

.breadcrumb {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb::before {
    content: 'ðŸ“';
    font-size: 0.875rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--background-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-subtle);
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-card .label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.module-content {
    background: var(--background-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    min-height: 400px;
}

.welcome-message {
    text-align: center;
    padding: 48px 24px;
}

.welcome-message h2 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.welcome-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* Design Responsivo Simplificado */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        background: var(--background-card);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .content-area {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .search-bar {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    :root {
        --topbar-height: 60px;
        --sidebar-width: 240px;
    }
    
    .top-bar {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 1.125rem;
        margin-right: 16px;
    }
    
    .search-bar {
        max-width: 160px;
    }
    
    .user-actions {
        gap: 8px;
        margin-left: 16px;
    }
    
    .notifications, .user-profile {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .module-header {
        padding: 16px 20px;
    }
    
    .module-header h1 {
        font-size: 1.25rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }
}

@media (max-width: 576px) {
    .search-bar {
        display: none;
    }
    
    .logo {
        font-size: 1rem;
        margin-right: 8px;
    }
    
    .content-area {
        padding: 12px;
    }
    
    .module-content {
        padding: 16px;
    }
    
    .welcome-message {
        padding: 32px 16px;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .welcome-message p {
        font-size: 0.875rem;
    }
}

/* TransiÃ§Ãµes suaves e funcionais */
.sidebar, .content-area, .main-menu li {
    transition: all 0.2s ease;
}

.stat-card, .module-header, .module-content {
    transition: all 0.2s ease;
}
