/* =====================================================
   CONFIGURACIÓN GENERAL
===================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
}


/* =====================================================
   TÍTULO / ENCABEZADO
===================================================== */

.titulo-biblioteca {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, .35), transparent 35%),
        linear-gradient(135deg, #0f172a, #1e3a8a);

    color: white;
    padding: 38px 20px;

    text-align: center;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, .18);
}

.titulo-contenido {
    max-width: 1200px;
    margin: auto;
}

.logo {
    font-size: 52px;
    margin-bottom: 8px;
}

.titulo-biblioteca h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.5px;
}

.titulo-biblioteca p {
    margin: 10px 0 0;
    color: #dbeafe;
    font-size: 16px;
}


/* =====================================================
   BARRA DE NAVEGACIÓN
===================================================== */

.barra-navegacion {
    background: rgba(255, 255, 255, .94) !important;

    border-bottom: 1px solid #e2e8f0;

    box-shadow:
        0 4px 20px rgba(15, 23, 42, .07);

    position: sticky;
    top: 0;
    z-index: 1000;

    backdrop-filter: blur(12px);
}

.barra-navegacion .navbar-brand {
    color: #1e3a8a !important;
    font-weight: 700;
    font-size: 20px;
}

.barra-navegacion .nav-link {
    color: #475569 !important;

    font-weight: 500;

    padding: 10px 15px !important;

    border-radius: 10px;

    margin: 3px;

    transition: all .25s ease;
}

.barra-navegacion .nav-link:hover {
    background: #eff6ff;
    color: #2563eb !important;

    transform: translateY(-1px);
}

.barra-navegacion .nav-link.active {
    background: #2563eb;
    color: white !important;

    box-shadow:
        0 4px 12px rgba(37, 99, 235, .25);
}


/* =====================================================
   CONTENIDO PRINCIPAL
===================================================== */

main {
    width: 100%;
    max-width: 1500px;

    margin: auto;

    padding: 35px 25px;
}


/* =====================================================
   BIENVENIDA
===================================================== */

.bienvenida {
    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 90% 20%,
            rgba(255, 255, 255, .15),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8,
            #1e3a8a
        );

    color: white;

    padding: 40px;

    border-radius: 22px;

    box-shadow:
        0 15px 35px rgba(37, 99, 235, .20);

    margin-bottom: 30px;
}

.bienvenida::after {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    right: -80px;
    bottom: -100px;

    border-radius: 50%;

    background: rgba(255, 255, 255, .08);
}

.bienvenida h1 {
    position: relative;
    z-index: 1;

    font-size: 34px;
    font-weight: 700;

    margin-bottom: 10px;
}

.bienvenida p {
    position: relative;
    z-index: 1;

    margin: 0;

    color: #dbeafe;

    font-size: 17px;
}


/* =====================================================
   TARJETAS DE ESTADÍSTICAS
===================================================== */

.stat-card {
    background: white;

    border-radius: 18px;

    padding: 24px;

    display: flex;
    align-items: center;

    gap: 18px;

    min-height: 135px;

    border: 1px solid #e2e8f0;

    box-shadow:
        0 5px 20px rgba(15, 23, 42, .05);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.stat-card:hover {
    transform: translateY(-6px);

    border-color: #bfdbfe;

    box-shadow:
        0 15px 30px rgba(15, 23, 42, .10);
}

.stat-icon {
    width: 62px;
    height: 62px;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
        135deg,
        #dbeafe,
        #eff6ff
    );

    color: #2563eb;

    font-size: 28px;

    flex-shrink: 0;
}

.stat-card span {
    display: block;

    color: #64748b;

    font-size: 14px;

    margin-bottom: 4px;
}

.stat-card h2 {
    margin: 0;

    color: #1e3a8a;

    font-size: 31px;

    font-weight: 700;
}


/* =====================================================
   PANELES
===================================================== */

.panel {
    background: white;

    border-radius: 18px;

    padding: 26px;

    border: 1px solid #e2e8f0;

    box-shadow:
        0 5px 20px rgba(15, 23, 42, .05);

    margin-bottom: 25px;

    transition: box-shadow .25s ease;
}

.panel:hover {
    box-shadow:
        0 10px 28px rgba(15, 23, 42, .08);
}


/* =====================================================
   TÍTULOS DE SECCIONES
===================================================== */

.titulo-seccion {
    color: #1e3a8a;

    font-size: 24px;

    font-weight: 700;

    margin-bottom: 22px;

    padding-bottom: 13px;

    border-bottom: 1px solid #e2e8f0;

    position: relative;
}

.titulo-seccion::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: -1px;

    width: 55px;
    height: 3px;

    background: #2563eb;

    border-radius: 10px;
}


/* =====================================================
   BOTONES GRANDES
===================================================== */

.boton-grande {
    border: none;

    border-radius: 12px;

    padding: 15px 20px;

    font-size: 16px;

    font-weight: 600;

    transition: all .25s ease;

    box-shadow:
        0 4px 12px rgba(15, 23, 42, .08);
}

.boton-grande:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 20px rgba(15, 23, 42, .12);
}


/* =====================================================
   TABLAS
===================================================== */

.table {
    margin-bottom: 0;

    vertical-align: middle;
}

.table thead th {
    background: #1e3a8a;

    color: white;

    border: none;

    padding: 15px;

    font-weight: 600;
}

.table thead th:first-child {
    border-radius: 10px 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 10px 0 0;
}

.table tbody td {
    padding: 15px;

    border-color: #e2e8f0;
}

.table tbody tr {
    transition: background .2s ease;
}

.table tbody tr:hover {
    background: #f8fafc;
}


/* =====================================================
   FORMULARIOS
===================================================== */

.form-control,
.form-select {
    border: 1px solid #cbd5e1;

    border-radius: 10px;

    padding: 11px 14px;

    transition: all .2s ease;
}

.form-control:hover,
.form-select:hover {
    border-color: #94a3b8;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .12);
}


/* =====================================================
   REPORTES
===================================================== */

.reporte-card {
    background: white;

    border: 1px solid #e2e8f0;

    border-radius: 18px;

    padding: 28px;

    text-align: center;

    height: 100%;

    transition: all .25s ease;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, .05);
}

.reporte-card:hover {
    transform: translateY(-7px);

    border-color: #bfdbfe;

    box-shadow:
        0 15px 30px rgba(15, 23, 42, .10);
}

.reporte-icono {
    font-size: 45px;

    margin-bottom: 15px;
}

.reporte-card h4 {
    color: #1e3a8a;

    font-weight: 700;
}

.reporte-card p {
    color: #64748b;
}


/* =====================================================
   MODALES
===================================================== */

.modal-content {
    border: none;

    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 25px 60px rgba(15, 23, 42, .25);
}

.modal-header {
    background: linear-gradient(
        135deg,
        #1e3a8a,
        #2563eb
    );

    color: white;

    border: none;

    padding: 20px 25px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
}


/* =====================================================
   BADGES
===================================================== */

.badge {
    padding: 7px 11px;

    border-radius: 8px;

    font-weight: 600;
}


/* =====================================================
   BOTONES BOOTSTRAP
===================================================== */

.btn {
    border-radius: 10px;

    font-weight: 600;

    transition: all .25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #2563eb;

    border-color: #2563eb;

    box-shadow:
        0 4px 12px rgba(37, 99, 235, .18);
}

.btn-primary:hover {
    background: #1d4ed8;

    border-color: #1d4ed8;
}


/* =====================================================
   SECCIONES
===================================================== */

.seccion {
    animation: aparecer .4s ease;
}

@keyframes aparecer {

    from {
        opacity: 0;

        transform:
            translateY(15px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =====================================================
   LOGIN
===================================================== */

.pantalla-login {
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at top right,
            rgba(59, 130, 246, .30),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #0f172a,
            #1e3a8a
        );

    padding: 20px;
}

.login-card {
    width: 100%;

    max-width: 420px;

    background: rgba(255, 255, 255, .98);

    padding: 40px;

    border-radius: 22px;

    text-align: center;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, .25);
}

.logo-biblioteca {
    font-size: 60px;

    margin-bottom: 10px;
}

.login-card h1 {
    color: #1e3a8a;

    font-weight: 700;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {

    .titulo-biblioteca {
        padding: 28px 15px;
    }

    .titulo-biblioteca h1 {
        font-size: 26px;
    }

    .logo {
        font-size: 42px;
    }

    main {
        padding: 25px 15px;
    }

    .bienvenida {
        padding: 28px;

        border-radius: 18px;
    }

    .bienvenida h1 {
        font-size: 26px;
    }

    .stat-card {
        padding: 20px;
    }

    .panel {
        padding: 20px;
    }

    .titulo-seccion {
        font-size: 21px;
    }

    .table {
        font-size: 14px;
    }

    .login-card {
        padding: 30px 20px;
    }

}


/* =====================================================
   BARRA DE DESPLAZAMIENTO
===================================================== */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: #e2e8f0;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;

    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}