/* ============================================
   FULLWIDTH ADMIN 2025 - INSPIRED BY START CARREIRAS
   ============================================ */

:root {
    /* Color Palette - Modern Blue/Purple */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutral Colors */
    --bg-main: #f8f9fc;
    --bg-sidebar: #1e293b;
    --bg-topbar: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Sidebar Width */
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
    
    /* Neumorphism */
    --neu-light: #ffffff;
    --neu-dark: #d1d9e6;
    
    /* Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   MAIN LAYOUT STRUCTURE
   ============================================ */

#container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ============================================
   SIDEBAR - IGUAL AO START CARREIRAS
   ============================================ */

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* Sidebar Header - Estilo Start Carreiras */
.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

.admin-sidebar.collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Sidebar Toggle */
.sidebar-toggle {
    position: absolute;
    right: 10px;
    top: 2rem;
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.sidebar-toggle i {
    font-size: 0.875rem;
    transition: var(--transition);
}

.admin-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* User Info - Estilo Start Carreiras */
.sidebar-user {
    padding: 1rem;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-user:hover {
    background: #f3f4f6;
}

.user-avatar-sidebar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
    transition: var(--transition);
}

.admin-sidebar.collapsed .user-info {
    opacity: 0;
    width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* Navigation Menu - Estilo Start Carreiras */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-title {
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    transition: var(--transition);
}

.admin-sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
}

.nav-items {
    list-style: none;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 0;
    transition: var(--transition-fast);
    position: relative;
    font-weight: 500;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #f9fafb;
    color: var(--gray-900);
    border-left-color: var(--gray-300);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.nav-icon {
    width: 20px;
    font-size: 1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.7;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    transition: var(--transition);
}

.admin-sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
}

.nav-badge {
    padding: 0.125rem 0.5rem;
    background: var(--danger);
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    transition: var(--transition);
}

.admin-sidebar.collapsed .nav-badge {
    opacity: 0;
    width: 0;
}

/* Submenu Styles - Start Carreiras */
.nav-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: var(--transition);
    color: var(--gray-400);
}

.nav-item.has-submenu .nav-link.open .nav-arrow i {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.open {
    max-height: 500px;
}

.submenu li {
    padding: 0;
}

.submenu li a {
    display: block;
    padding: 0.5rem 1rem 0.5rem 3rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.submenu li a:hover {
    background: #f9fafb;
    color: var(--gray-900);
    padding-left: 3.25rem;
}

/* ============================================
   TOP BAR
   ============================================ */

.admin-topbar {
    position: fixed;
    left: var(--sidebar-width);
    top: 0;
    right: 0;
    height: 70px;
    background: #f8f9fa;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 999;
    transition: var(--transition);
    box-shadow: none;
}

.admin-sidebar.collapsed ~ .admin-topbar {
    left: var(--sidebar-collapsed);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.02em;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.topbar-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.topbar-breadcrumb a:hover {
    color: var(--primary-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    width: 300px;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    transition: var(--transition-fast);
    background: var(--gray-50);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.topbar-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.topbar-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.topbar-btn .notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.admin-main {
    margin-left: var(--sidebar-width);
    padding-top: 70px;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    background: #f8f9fa;
    transition: var(--transition);
}

.admin-sidebar.collapsed ~ .admin-main {
    margin-left: var(--sidebar-collapsed);
    width: calc(100% - var(--sidebar-collapsed));
}

#content {
    max-width: none;
    padding: 0;
    margin: 0;
}

#content-main {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .admin-topbar {
        left: 0;
    }
    
    .admin-main {
        margin-left: 0;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 1rem;
    }
    
    .topbar-search {
        display: none;
    }
    
    .topbar-title {
        font-size: 1.25rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--gray-700);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }
}
