@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0052cc;
    --primary-light: #4c9aff;
    --secondary-color: #00b8d9;
    --accent-color: #ff5630;
    --bg-color: #f4f5f7;
    --text-primary: #172b4d;
    --text-secondary: #5e6c84;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    background-image: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.3);
}

/* CARDS & CONTAINERS (Glassmorphism) */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 20px;
    flex: 1;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
}

/* FORMS */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: #fafbfc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,82,204,0.1);
    background: #fff;
}

/* AUTH PAGES */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 80px);
}

.auth-card {
    width: 100%;
    max-width: 450px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--primary-color);
}

/* HERO SECTION */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 0;
    gap: 4rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* DASHBOARD SIDEBAR LAYOUT */
.dashboard-layout {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 250px;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-decoration: none;
}

.sidebar-links {
    list-style: none;
    flex: 1;
}

.sidebar-links li {
    margin-bottom: 5px;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-links a:hover, .sidebar-links a.active {
    background: rgba(0,82,204,0.08);
    color: var(--primary-color);
}

.sidebar-links a i {
    width: 20px;
    text-align: center;
}

.sidebar-user {
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.dashboard-layout .container {
    margin: 2rem auto;
    width: 100%;
    max-width: 1200px;
}

.top-header {
    display: flex; /* Visible en todas las pantallas */
    padding: 10px 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.header-banner {
    max-height: 50px;
    width: auto;
    border-radius: 8px;
}

.user-welcome-header {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .nav-links {
        display: none; /* Hide main horizontal nav links */
    }
    
    /* MOBILE SIDEBAR */
    .dashboard-layout {
        flex-direction: column;
    }
    .top-header {
        display: flex;
    }
    .sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
        width: 260px;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 10px 0 20px rgba(0,0,0,0.2);
    }
    
    /* RESPONSIVE TABLES (CARDS) */
    .card-table, .card-table thead, .card-table tbody, .card-table th, .card-table td, .card-table tr { 
        display: block; 
    }
    .card-table thead tr { 
        display: none;
    }
    .card-table tr { 
        margin-bottom: 1.5rem;
        background: #fff;
        border-radius: 12px;
        padding: 10px 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        border: 1px solid #dfe1e6;
    }
    .card-table td { 
        border: none;
        border-bottom: 1px dashed #edf2f7; 
        position: relative;
        padding: 10px 10px 10px 45%; 
        text-align: right;
        min-height: 45px;
    }
    .card-table td:last-child { border-bottom: none; }
    .card-table td[colspan] { 
        padding-left: 10px; 
        text-align: center; 
    }
    .card-table td::before { 
        content: attr(data-label); 
        position: absolute;
        left: 10px;
        width: 40%; 
        padding-right: 10px; 
        white-space: nowrap;
        font-weight: 600;
        color: var(--text-secondary);
        text-align: left;
        top: 50%;
        transform: translateY(-50%);
    }
    .card-table td[colspan]::before {
        content: none;
    }
}
