/* ==========================================================================
   YosGesCatCal - Estilos Oficiales DFP / UPNFM
   Copyright (c) 2026 Miguel Tortosa
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 100%;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333333;
}

header {
    background: #333;
    color: #eee;
    width: 100%;
}

#contenido {
    margin-left: 0;
    padding: 0;
    transition: margin-left .4s;
    min-height: 80vh;
}

/* ==========================================================================
   1. CABECERA INSTITUCIONAL (Cab.html)
   ========================================================================== */
.yos-header-container {
    width: 100%;
    background-color: #ffffff;
    padding: 10px 0;
    border-bottom: 2px solid #003366;
}

.yos-header-table {
    width: 100%;
    border-collapse: collapse;
}

.header-title-main {
    margin: 0;
    color: #FF9900;
    font-size: 1.8em;
    font-weight: 800;
}

.header-title-sub {
    margin: 5px 0;
    color: #003366;
    font-size: 1.3em;
    font-weight: 700;
}

/* ==========================================================================
   2. MENÚ PERSIANA ESTILO WINDOWS (Mnu.html)
   ========================================================================== */
.yos-wrapper {
    position: relative;
    display: inline-block;
    font-family: 'Tahoma', sans-serif;
    margin: 8px 15px;
    z-index: 1000;
}

#yos-logic-check {
    display: none !important;
}

.yos-boton {
    display: inline-block;
    background-color: #c0c0c0;
    color: black;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff; /* Relieve 3D clásico */
    cursor: pointer;
    user-select: none;
}

.yos-boton:hover {
    background-color: #d4d0c8;
}

.yos-persiana {
    display: none;
    position: absolute;
    top: 28px;
    left: 0;
    z-index: 9999;
    background-color: #c0c0c0;
    min-width: 280px;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5);
}

#yos-logic-check:checked ~ .yos-persiana {
    display: block !important;
}

.yos-lista {
    list-style: none !important;
    padding: 2px !important;
    margin: 0 !important;
}

.yos-lista li a {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    text-decoration: none !important;
    color: black !important;
    font-size: 12px;
    font-weight: 500;
}

.yos-lista li a:hover {
    background-color: #000080;
    color: white !important;
}

.yos-separador {
    height: 1px;
    background: #808080;
    margin: 4px 2px;
    border-bottom: 1px solid #fff;
}

/* ==========================================================================
   3. CONTENEDORES Y TARJETAS
   ========================================================================== */
.container {
    width: 95%;
    max-width: 1100px;
    margin: 20px auto;
    background: #ffffff;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

h1, h2 {
    color: #003366;
    margin-top: 0;
}

/* Barra de información del catedrático */
.info-superior {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #003366;
}

.user-nav-bar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 20px;
    font-size: 0.9em;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.user-nav-bar a {
    color: #dc3545;
    font-weight: bold;
    text-decoration: none;
}

.user-nav-bar a:hover {
    text-decoration: underline;
}

/* Formulario de Login */
.login-container {
    max-width: 420px;
    margin: 50px auto;
    text-align: center;
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.login-container h2 {
    color: #003366;
    margin-bottom: 25px;
    border-bottom: none;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1em;
}

.login-container button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #003366;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-container button[type="submit"]:hover {
    background-color: #00509e;
}

/* ==========================================================================
   4. TABLAS DE CARGA Y CALIFICACIONES
   ========================================================================== */
.tabla-yos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
}

.tabla-yos th {
    background-color: #003366;
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-size: 0.9em;
    text-transform: uppercase;
    border: 1px solid #002244;
}

.tabla-yos td {
    padding: 10px;
    border: 1px solid #dddddd;
    text-align: center;
    vertical-align: middle;
}

.tabla-yos tr:nth-child(even) {
    background-color: #f9f9f9;
}

.tabla-yos tr:hover {
    background-color: #f1f5f9;
    transition: 0.2s ease;
}

/* Badges de estado */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    display: inline-block;
    min-width: 90px;
}

.bg-ap { background-color: #28a745; } /* Verde - Aprobada */
.bg-re { background-color: #dc3545; } /* Rojo - Reprobada */
.bg-np { background-color: #6c757d; } /* Gris - No Presentada */

.badge-count {
    background-color: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: bold;
}

.badge-cerrada {
    background-color: #dc3545;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
    display: inline-block;
    border: 1px solid #b21f2d;
}

.badge-abierta {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
    display: inline-block;
    border: 1px solid #2e7d32;
}

.badge-locked {
    background-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

/* Botones interactivos */
.btn-sel {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease;
}

.btn-sel:hover {
    background-color: #218838;
}

.btn-yos-blue {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease;
}

.btn-yos-blue:hover {
    background-color: #0056b3;
}

.btn-grabar-todo {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    transition: background 0.2s ease;
}

.btn-grabar-todo:hover {
    background-color: #218838;
}

.btn-cerrar {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95em;
    transition: background 0.2s ease;
}

.btn-cerrar:hover {
    background-color: #c82333;
}

.btn-calificar {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-calificar:hover {
    background-color: #138496;
}

.btn-yos-grande {
    display: inline-block;
    padding: 20px 40px;
    background-color: #003366;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-yos-grande:hover {
    background-color: #00509e;
    color: #ffffff;
}

.btn-yos-success {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid #1e7e34;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin-bottom: 15px;
    transition: background 0.2s;
}

.btn-yos-success:hover {
    background-color: #218838;
    color: white;
}

.input-nota {
    width: 65px;
    padding: 8px;
    border: 1px solid #007bff;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
}

/* Encabezado especial para Alu_Calificar */
.header-yos {
    background-color: #003366;
    color: white;
    padding: 20px;
    border-radius: 6px 6px 0 0;
}

.header-yos h2 {
    margin: 0;
    font-size: 1.4em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    color: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.info-item {
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.9em;
}

.action-bar-calificar {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    align-items: center;
    flex-wrap: wrap;
}

.footer-actions {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-volver {
    color: #003366;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
}

.btn-volver:hover {
    text-decoration: underline;
}

/* ==========================================================================
   5. PIE Y AVISO
   ========================================================================== */
footer {
    text-align: center;
    padding: 0px 0;
    color: #6c757d;
    font-size: 0.9em;
}

.aviso-footer {
    text-align: center;
    padding: 0px;
    color: #495057;
    font-size: 0.9em;
}
