/* === Design Tokens & CSS Variables === */
:root {
    /* Módulos de Color: Institucional UMAEE */
    --umaee-blue: #0f2545;
    --umaee-blue-light: #1c3d70;
    --umaee-accent: #3a86ff;
    
    /* Light Mode */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #1e293b;
    --text-title: #0f2545; /* Azul oscuro en light mode */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    
    /* Dark Mode (Variables de apoyo) */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body.dark-mode {
    --bg-main: #0a0e17;
    --bg-surface: #161d2b;
    --text-primary: #ffffff;
    --text-title: #3a86ff; /* Azul brillante en dark mode */
    --text-muted: #a0aec0;
    --border-color: #2d3748;
    --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(22, 29, 43, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* === App Layout === */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
    width: 260px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--umaee-blue);
}

body.dark-mode .sidebar-header {
    color: var(--umaee-accent);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--umaee-accent);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 8px;
    font-size: 0.95rem;
}

.nav-link:hover {
    background-color: rgba(58, 134, 255, 0.05);
    color: var(--umaee-accent);
    transform: translateX(3px);
}

.nav-link.active {
    background-color: var(--umaee-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.3);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    display: grid;
    place-items: center;
}

.theme-toggle:hover {
    background-color: var(--bg-main);
    color: var(--umaee-accent);
}

/* === Main Content === */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-nav {
    height: 70px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 5;
}

.breadcrumb {
    font-size: 0.9rem;
    font-weight: 500;
}

.breadcrumb .separator {
    color: var(--text-muted);
    margin: 0 8px;
}

.breadcrumb .current {
    color: var(--umaee-accent);
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
}

/* === Cards and Utilities === */
.glass-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--umaee-blue), var(--umaee-accent));
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
