/* ==========================================================
   SISTEMA DE GESTIÓN DEL CALENDARIO DE EXÁMENES
   Facultad de Medicina - UNNE
   ========================================================== */

body{
    background:#f4f6f9;
    font-family:"Segoe UI",Arial,sans-serif;
    color:#343a40;
}

/* ==========================================================
   SIDEBAR
   ========================================================== */

.sidebar{
    width:260px;
    min-height:100vh;
    background:#1d3557;
    color:#fff;
}

.sidebar .titulo{
    background:#16324f;
    padding:20px;
    text-align:center;
}

.sidebar img{
    width:90px;
}

.sidebar h5,
.sidebar h6{
    font-weight:bold;
    color:#fff;
}

.sidebar small{
    color:#d6dce5;
}

.sidebar a{
    color:#fff;
    text-decoration:none;
    display:block;
    padding:12px 18px;
    transition:.25s;
}

.sidebar a:hover{
    background:#457b9d;
    color:#fff;
}
.sidebar a.sidi-menu-activo{
    background:#457b9d;
    color:#fff;
    font-weight:700;
    border-left:4px solid #ffffff;
    padding-left:14px;
}
.sidebar hr{
    margin:10px 0;
    border-color:rgba(255,255,255,.20);
}

/* ==========================================================
   CONTENIDO
   ========================================================== */

.container-fluid{
    padding:25px;
}

.contenido{
    padding:30px;
}

/* ==========================================================
   TARJETAS
   ========================================================== */

.card{
    border:none;
    border-radius:15px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.card-header{
    font-weight:600;
}

.card-body{
    padding:25px;
}

.card h2{
    font-size:40px;
    font-weight:bold;
}

/* ==========================================================
   DASHBOARD
   ========================================================== */

.dashboard-card{
    transition:.30s;
}

.dashboard-card:hover{
    transform:translateY(-5px);
    box-shadow:0 12px 25px rgba(0,0,0,.18);
}

.dashboard-icon{
    font-size:48px;
    color:#0d6efd;
    margin-bottom:10px;
}

.dashboard-card h5{
    font-weight:600;
    margin-top:10px;
    margin-bottom:15px;
}

.dashboard-numero{
    font-size:44px;
    font-weight:bold;
    color:#0d6efd;
}

/* ==========================================================
   BOTONES
   ========================================================== */

.btn{
    border-radius:8px;
}

/* ==========================================================
   TABLAS
   ========================================================== */

.table{
    background:#fff;
    border-radius:10px;
}

.table thead th{
    vertical-align:middle;
}

.table td{
    vertical-align:middle;
}

/* ==========================================================
   FORMULARIOS
   ========================================================== */

.form-control,
.form-select{
    border-radius:8px;
}

.form-label{
    font-weight:600;
}

/* ==========================================================
   ALERTAS
   ========================================================== */

.alert{
    border-radius:10px;
}

/* ==========================================================
   QR
   ========================================================== */

.qr-preview{
    width:170px;
    height:170px;
    border:1px solid #dee2e6;
    border-radius:10px;
    padding:8px;
    background:#fff;
}

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

@media (max-width:768px){

    .sidebar{
        width:100%;
        min-height:auto;
    }

    .dashboard-numero{
        font-size:34px;
    }

    .dashboard-icon{
        font-size:36px;
    }

}
/* ==========================================
   SITIO PUBLICO
========================================== */

.public-body{
    background:#eef2f7;
}

.public-wrap{
    max-width:1400px;
    margin:auto;
    padding:30px;
}

.public-logo{
    width:130px;
}

.public-header{
    text-align:center;
    margin-bottom:40px;
}

.public-header h2{
    font-weight:700;
    color:#3b2c8f;
}

.public-header h4{
    color:#5f5f5f;
}

.public-card{
    border:none;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 5px 18px rgba(0,0,0,.10);
    transition:.30s;
    margin-bottom:25px;
}

.public-card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 30px rgba(0,0,0,.18);
}

.public-card-header{
    background:#5b2ca3;
    color:white;
    padding:15px;
    font-size:24px;
    font-weight:bold;
    text-align:center;
}

.public-card-body{
    padding:20px;
}

.public-card-body ul{
    list-style:none;
    margin:0;
    padding:0;
}

.public-card-body li{
    padding:8px 0;
    border-bottom:1px solid #ececec;
}

.public-card-body li:last-child{
    border-bottom:none;
}

.public-resumen{
    margin:35px 0;
}

.public-resumen h3{
    color:#5b2ca3;
    font-weight:bold;
}

.public-resumen h4{
    font-weight:bold;
}

.public-resumen p{
    margin:0;
    font-size:18px;
}

.public-btn{
    background:#5b2ca3;
    border:none;
}

.public-btn:hover{
    background:#472080;
}
/* ==========================================
   IMPRESIÓN A4 APAISADA
========================================== */

@page{
    size: A4 landscape;
    margin: 10mm;
}

@media print{

    body{
        background:#fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        .public-resumen{
    margin-bottom:20px;
}

.public-resumen .card{
    border:1px solid #999 !important;
    box-shadow:none !important;
}

.public-header img{
    width:70px;
}

.public-header h2{
    color:#5b2ca3 !important;
    font-size:26px;
    margin-bottom:5px;
}

.public-header h3{
    color:#666 !important;
    font-size:18px;
}

.public-header h4{
    color:#666 !important;
    font-size:16px;
}
    }
    

    /* Ocultar formulario y botones */
    form,
    button,
    .btn{
        display:none !important;
    }

    .public-wrap{
        width:100%;
        max-width:100%;
        margin:0;
        padding:0;
    }

    .public-header{
        margin-bottom:15px;
        text-align:center;
    }

    .public-logo{
        width:80px;
    }

    .row{
        display:flex;
        flex-wrap:wrap;
    }

    .col-lg-4,
    .col-md-6{
        width:33.33%;
        max-width:33.33%;
        flex:0 0 33.33%;
        padding:5px;
    }

    .public-card{
        border:1px solid #999 !important;
        box-shadow:none !important;
        page-break-inside:avoid;
        break-inside:avoid;
    }

    .public-card-header{
        background:#5b2ca3 !important;
        color:white !important;
        font-size:18px;
        padding:8px;
    }

    .public-card-body{
        font-size:12px;
        padding:10px;
    }

    h2{
        font-size:22px;
    }

    h3{
        font-size:18px;
    }

    h4{
        font-size:16px;
    }

    h5{
        font-size:14px;
    }
}

/* ==========================================================
   LOGIN - SISTEMA SIDI
   ========================================================== */

.login-body {
    min-height: 100vh;
    background: #f4f6f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    padding: 35px 40px;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    text-align: center;
}

.login-logo-sidi {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo-sidi img {
    width: 140px !important;
    height: 140px !important;
    object-fit: contain;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1d3557;
    margin-bottom: 5px;
}

.login-card p {
    color: #6c757d;
    margin-bottom: 25px;
}

.login-card form {
    text-align: left;
}

.login-card .form-label {
    font-weight: 600;
}

.login-card .btn {
    margin-top: 5px;
    padding: 11px;
    font-weight: 600;
}
/* ==========================================================
   IDENTIDAD SIDI - BARRA SUPERIOR
   ========================================================== */

.sidi-navbar {
    background: #16324f !important;
    min-height: 72px;
    padding: 8px 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
}

.sidi-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.sidi-navbar-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin-right: 12px;
}

.sidi-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.sidi-brand-text strong {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
}

.sidi-brand-text span {
    font-size: 12px;
    color: #dce9f5;
}

.sidi-brand-text small {
    font-size: 10px;
    color: #aebfd0;
    margin-top: 3px;
}
/* ==========================================================
   TARJETAS MODERNAS DEL DASHBOARD SIDI
   ========================================================== */

.dashboard-card-modern {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    min-height: 175px;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,.15);
}

.dashboard-card-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: #e8f1fb;
    color: #16324f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.dashboard-card-titulo {
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 5px;
}

.dashboard-card-numero {
    font-size: 42px;
    font-weight: 800;
    color: #16324f;
    line-height: 1;
}

.dashboard-card-linea {
    width: 35px;
    height: 3px;
    background: #0d6efd;
    border-radius: 5px;
    margin: 15px auto 0;
}
/* ==========================================================
   IDENTIDAD SIDI - SIDEBAR
   ========================================================== */

.sidi-sidebar-brand {
    margin-top: 15px;
    padding: 25px 15px 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.03);
}

.sidi-sidebar-brand img {
    width: 95px;
    height: 95px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

.sidi-sidebar-title {
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
}

.sidi-sidebar-subtitle {
    color: rgba(255,255,255,.75);
    font-size: 10px;
    line-height: 1.35;
    margin-top: 7px;
}

/* ==========================================================
   LOGOS INSTITUCIONALES - FACULTAD IZQUIERDA / SIDI CENTRADO
   ========================================================== */
.sidi-home-logos,
.sidi-public-logos {
    position: relative;
    width: 100%;
    height: 190px;
    margin: 0 auto 20px;
}
.sidi-home-facultad,
.sidi-public-logos .sidi-facultad-logo {
    position: absolute;
    left: 20px;
    top: 25px;
    width: 85px !important;
    height: 85px !important;
    max-width: 85px !important;
    object-fit: contain;
}
.sidi-home-logo,
.sidi-public-logos .sidi-logo {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 250px !important;
    height: 170px !important;
    max-width: 250px !important;
    max-height: 170px !important;
    object-fit: contain;
}
.public-home-logo.sidi-logo,
.reserva-logo.sidi-logo {
    width: 250px !important;
    height: 170px !important;
    max-width: 250px !important;
    max-height: 170px !important;
    object-fit: contain;
}
.login-logo-sidi img {
    width: 250px !important;
    height: 170px !important;
    max-width: 250px !important;
    object-fit: contain;
}
@media (max-width: 768px) {
    .sidi-home-logos, .sidi-public-logos { height: 155px; }
    .sidi-home-facultad, .sidi-public-logos .sidi-facultad-logo {
        left: 8px; top: 25px; width: 65px !important; height: 65px !important; max-width:65px !important;
    }
    .sidi-home-logo, .sidi-public-logos .sidi-logo, .public-home-logo.sidi-logo, .reserva-logo.sidi-logo {
        width: 190px !important; height: 130px !important; max-width:190px !important; max-height:130px !important;
    }
}


/* ==========================================================
   SIDI - AJUSTE RESPONSIVE ADMINISTRATIVO GENERAL
   Solo presentación; no modifica la estructura ni la lógica.
   ========================================================== */

/* Evitar que los elementos de contenido excedan su contenedor. */
body:has(.sidebar) {
    min-width: 0;
}

body:has(.sidebar) .container-fluid {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body:has(.sidebar) .card,
body:has(.sidebar) .card-body,
body:has(.sidebar) .row,
body:has(.sidebar) [class*="col-"] {
    min-width: 0;
}

body:has(.sidebar) img,
body:has(.sidebar) canvas,
body:has(.sidebar) video {
    max-width: 100%;
    height: auto;
}

/* Las tablas anchas deben desplazarse dentro de su propio bloque. */
body:has(.sidebar) .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body:has(.sidebar) table {
    max-width: 100%;
}

/* Formularios y textos extensos deben poder ajustarse. */
body:has(.sidebar) input,
body:has(.sidebar) select,
body:has(.sidebar) textarea {
    max-width: 100%;
    box-sizing: border-box;
}

body:has(.sidebar) td,
body:has(.sidebar) th {
    overflow-wrap: anywhere;
}

/* Reducir espacios en escritorio sin alterar las columnas del menú. */
@media (min-width: 769px) {
    body:has(.sidebar) > .container-fluid {
        padding: 12px;
    }

    body:has(.sidebar) .card-body {
        padding: 18px;
    }
}

/* Ajustes adicionales para pantallas pequeñas. */
@media (max-width: 768px) {
    body:has(.sidebar) > .container-fluid {
        padding: 8px;
    }

    body:has(.sidebar) .card-body {
        padding: 12px;
    }

    body:has(.sidebar) .btn {
        white-space: normal;
    }

    body:has(.sidebar) h1 {
        font-size: 1.6rem;
    }

    body:has(.sidebar) h2 {
        font-size: 1.4rem;
    }
}
