@import url('variables.css');

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

body {
    background-color: #f0f2f5;
    background-image: linear-gradient(#f5f5f5);
    color: var(--color-texto);
    display: block;
    height: 100vh;
    font-family: 'Roboto', sans-serif;
}

.dashboard-container {
    display: block;
    min-height: 100vh;
    background-color: #f0f2f5;
}

/* Contenido Principal Centrado y con Márgenes */
.main-content {
    width: 100%;
    height: auto;
    padding: 30px 20px;
    overflow: visible;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sub-header (Panel Principal - Estilo Azul Anterior) */
.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    max-width: 1400px;
    margin: 120px auto 20px auto;
    background: linear-gradient(90deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 74, 152, 0.15);
    color: white;
}

.barra-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 40px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.logo-izq img,
.logo-der img {
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.titulo-centro h1 {
    color: var(--color-primario);
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: none;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Ajustes Responsive para el header */
@media (max-width: 768px) {
    .barra-superior {
        flex-direction: column;
        gap: 15px;
        position: relative;
        /* Importante para móvil */
        background: rgba(0, 74, 152, 0.9);
    }

    .titulo-centro h1 {
        font-size: 1.2rem;
        color: white;
    }

    .sub-header {
        margin-top: 20px !important;
    }
}

.titulo-centro h1 {
    color: var(--color-primario);
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: none;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, var(--color-primario) 0%, var(--color-secundario) 100%);
    padding: 10px 40px;
    box-shadow: 0 4px 20px rgba(0, 74, 152, 0.2);
    height: auto;
    color: white;
    width: 100%;
    position: relative;
    z-index: 100;
}

.topbar-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
    background: white;
    padding: 5px 10px;
    border-radius: 8px;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.ruta-actual {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usuario-info {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 6px 15px;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

@supports not (background: rgba(var(--color-primario-rgb), 0.05)) {
    .usuario-info {
        background: #f0f2f5;
    }
}

.usuario-info span {
    font-weight: 600;
    color: var(--color-primario);
}

.usuario-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--color-primario), var(--color-secundario));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-salir {
    color: var(--color-rojo);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-salir:hover {
    transform: scale(1.1);
    background: #ffebee;
}

.section-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease;
    width: 97%;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.section-header h2 {
    color: var(--color-primario);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header h2 i {
    color: var(--color-secundario);
    background: rgba(0, 74, 152, 0.1);
    padding: 10px;
    border-radius: 10px;
    font-size: 1.2rem;
}

/* Botones dentro de cards */
button {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

/*Pie de pagina*/
.pie-pagina {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    border-top: 1px solid var(--borde);

}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.search-container input {
    padding: 10px 15px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.search-container button {
    padding: 10px 20px;
    background-color: var(--color-primario);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.search-container button:hover {
    opacity: 0.9;
}

.hidden {
    display: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 74, 152, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-icon {
    font-size: 3rem;
    color: var(--color-secundario);
    margin-bottom: 20px;
}

.modal-title {
    color: var(--color-primario);
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.modal-message {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-btn {
    background: var(--color-primario);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.modal-btn:hover {
    background: var(--color-secundario);
    transform: translateY(-2px);
}


/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }

    .topbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}