/* =============================================================================
    ESTILOS UNIFICADOS — Cátedra Ocampo
    Fuente canónica: styles.css  |  Unidades: rem  |  Base: 1rem = 16px
   ============================================================================= */


/* =============================================================================
    1. VARIABLES CSS
   ============================================================================= */
:root {
    /* Colores de tema (base oscura, usada en formularios) */
    --background-color:    #f0f0f050;
    --text-color:          #222222;
    --text-color-secondary:#222222;
    --input-background:    #ffffff;
    --border-color:        #92919186;
    --accent-color:        rgb(0 176 229);           /* valor canonical de styles.css */
    --error-color:         #ff453a;
    --success-color:       #00a92a;
    --section-background:  #1c1c1e;
    --header-background:   #1c1c1e;
    --separator-color:     rgba(56, 56, 58, 0.5);

    /* Colores semánticos de secciones */
    --asistencias: #414141;
    --estudiantes: #414141;
    --equipos:     #414141;
    --dg: blue;
    --dis: red;

    /* Colores especiales */
    --nuevo:      rgba(245, 250, 177, 0.93);
    --presencial: rgba(5, 124, 139, 0.849);
    --virtual:    rgb(13, 177, 13);
    --celeste:    rgb(0 176 229);

    /* Grises */
    --gris20: rgb(165, 165, 165);


}


/* =============================================================================
    2. RESET Y BASE
   ============================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    /* margin-top: 3rem; */
    padding: .5em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-theme body {
    background-color: var(--background-color);
    color: var(--text-color);
}

h1 {
    font-size: 1.15rem;
    text-align: center;
}

h2 {
    font-size: 1em !important;
}

h5 {
    font-size: .95rem !important;
}

h6 {
    color: #2c3e50;
    font-weight: 600;
    margin: 1rem;
    font-size: 0.8rem !important;
}

.table td {
    vertical-align: middle;
}

.text-white-50{
    font-size: 0.7em !important;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: var(--celeste);
    color: white;
    padding: 1em;
    border-radius: 1em;
    margin-bottom: 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.header h1 {
    font-size: 1.15em;
    margin-top: 1em;
}

.header p {
    opacity: 0.9;
    font-size: 1em;
}

/* =============================================================================
    3. NAVEGACIÓN
   ============================================================================= */
nav {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 1rem 0;
}

nav a {
    margin: 0 0 1rem 0;
}

.ios-header {
    text-align: center;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    box-shadow: 0 -0.125rem 1.25rem rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.25rem 0 0 0;
    border-bottom: 0.063rem solid #e9ecef;
    transform: translateY(calc(100% - 3rem));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ios-header h1 {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
    text-align: left;
    padding-left: 0.4em;
}

.navbar-brand img {
    height: 4rem;
}

.navbar-brand {
    text-decoration: none !important;
}

.logo {
    min-width: 5rem;
    margin: 1rem auto;
    text-align: center;
}


.logo h1 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 5px;
}
        
.logo p {
    color: #666;
    font-size: .9rem;
    font-weight: 700;
}

.header-logo {
    height: 2rem;
    margin-top: -0.5em;
    border-right: 0.063rem rgba(141, 141, 141, 0.658) solid;
    padding-right: 0.4rem;
}

.encabezado {
    display: inline-flex;
    align-items: center;
}


/* =============================================================================
    4. LAYOUT — CONTENEDORES
   ============================================================================= */
.center {
    text-align: center;
}

.container {
    /* margin-top: 4rem !important; */
    padding: 0.5em !important;
    max-width: 780px;
    margin: 0 auto;
}

.container-1 {
    margin-top: 1rem !important;
    padding: 0 0.5em !important;
}

.mb-4 {
    text-align: center;
    display: block;
    margin: 0 auto;
    max-width: 47.5rem;   /* 760px */
}

.row {
    padding: 0em !important;
}


/* =============================================================================
    5. CARDS
   ============================================================================= */
.card {
    /* background: white; */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 70%);
    border-radius: 1rem !important;
    box-shadow: 0 0.125rem 0.8rem rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !;
    padding: 1em;
    margin-bottom: 1em;
}

.card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.card-body {
    border-radius: 1rem;
    padding: .5rem !important;
}

.card-title {
    font-size: 1.2rem;
    text-align: center;
    text-decoration: none !important;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: .3rem;
}

.card-text {
    color: #34495e;
}

.card-subtitle {
    font-size: 0.8rem;
    font-weight: bold;
    color: rgb(212, 0, 255);
}

.card-header {
    border-radius: 0.8rem 0.8rem 0 0 !important;
}

.card-footer .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.card-footer .btn:hover {
    transform: scale(0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.card-nuevo {
    background: rgba(243, 220, 88, 0.356);
    border-radius: 1em;
    padding: 1.2em;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2, .card-nuevo h2 {
    color: #2c3e50;
    margin-bottom: 1em;
    font-size: 1.2em;
}

.subtitulo {
    color: white;
    background-color: rgba(0, 0, 0, 0.349);
    font-size: 1.2rem;
    padding: .5rem;
    margin: 1rem 0;
    border-radius: 1rem 1rem 0 0;
}


/* =============================================================================
    6. PANEL DE TARJETAS (dashboard)
   ============================================================================= */
.grupo-panel {
    display: flex;
    flex-direction: row;
    max-width: 40em;
    flex-wrap: wrap;
    justify-content: space-evenly;
    border-bottom: 0.063rem solid rgba(170, 170, 170, 0.767);
    margin: .5rem auto;
    padding: 0.5rem 0;
}

.tarjeta {
    width: 7rem;
    height: 7rem;
    border-radius: 1rem;
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    background-color: var(--background-color);
    border: 0.063rem solid var(--border-color);
    padding-top: 0.5rem;
}

.tarjeta .card-title {
    font-size: 1.1em;
    color: var(--section-background);
}

.tarjeta p {
    font-size: 0.7em;
}

.card-icon {
    font-size: 1.65rem;
    margin-bottom: 1rem;
    color: #172727;
}


/* =============================================================================
    7. BOTONES
   ============================================================================= */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    margin: 0;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* .btn-danger {
    background: white;
    color: red;
} */

.btn-ios {
    border-radius: 1.2rem;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-ios:hover {
    transform: translateY(-0.125rem);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-primary:hover {
    background: var(--accent-hover-color, #2c5aa0);
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background: var(--border-color);
    /* color: var(--accent-color); */
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-weight: 500;
    /* border: 0.125rem solid var(--accent-color); */
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-secondary:hover {
    background: var(--equipos);
    color: white;
    text-decoration: none;
}

.btn-outline-primary {
    border-radius: 1rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.2);
}

.btn-dark {
    background: linear-gradient(145deg, #1c1c1e, #2c2c2e);
    border: none;
}

.btn-small {
    padding: .5em 1em;
    font-size: 0.7em;
}

.btn-menu-top {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 0.063rem solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0.063rem 0.5rem rgba(0, 0, 0, 0.05);
    margin: 0;
    border-radius: 1rem;
    text-decoration: none;
}

.btn-menu-top:hover {
    transform: scale(0.96);
    box-shadow: 0 0.063rem 0.25rem rgba(0, 0, 0, 0.1);
}

.btn-eliminar {
    color: var(--error-color);
    border: none;
    padding: 0.4rem;
    background-color: var(--input-background);
}

.btn-activar {
    color: var(--success-color);
    border: none;
    padding: 0.4rem;
    background-color: var(--input-background);
}

/* Botones de sección */
.btn-estudiantes { color: #e6e6e6; background-color: var(--estudiantes); }
.btn-asistencias { color: #f8f8f8; background-color: var(--asistencias); }
.btn-equipos,
.equipos         { background-color: var(--equipos); color: #ffffff; }
.asistencias     { color: #f8f8f8; background-color: var(--asistencias); }


/* =============================================================================
    8. FORMULARIOS
   ============================================================================= */
.form-container {
    max-width: 50rem;
    margin: 0 auto;
    padding: 1rem;
}

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

.form-header h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-description {
    color: #dadada;
    margin-bottom: 1.5rem;
}

form {
    background: var(--background-color);
    border-radius: 1rem;
    padding: 0rem;
}

.form-group {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    /* border-bottom: 0.063rem solid var(--separator-color); */
    width: 85%;
    margin: auto;
}

.form-section {
    background-color: var(--section-background);
    border-radius: 1rem;
    padding: 0.6rem;
    margin-bottom: 1.5rem;
    border: 0.063rem solid var(--border-color);
}

.form-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

label {
    display: block;
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, select {
    width: 90%;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.3s;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 0.043rem solid var(--border-color);
    background-color: var(--input-background);
    color: var(--text-color);
    font-size: 0.85rem;
    transition: border-color 0.3s;
    margin-bottom: 0.5rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.periodos-grid {
    display: grid;
    gap: .5rem;
}

.periodo-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 1rem;
    padding: 1em;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1em;
    align-items: center;
    transition: all 0.3s;
}

.periodo-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.periodo-card.activo {
    border-color: #27ae60;
    background: #eafaf1;
}

.d-inline {
    background-color: #fff;
    padding: 0 !important;
}

/* Checkbox y radio base (Bootstrap-compatible) */
.form-check {
    display: flex;
    align-items: center;
}

.form-check-label {
    flex-grow: 1;
    margin-left: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
    --bs-form-check-bg: rgba(13, 109, 253, 0.399);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}


/* Grupos radio / checkbox del formulario de inscripción */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 70%;
    margin: 1.25rem auto;
    padding: 1.25rem 2.5rem;
    position: relative;
    justify-content: space-between;
    align-items: center;
    gap: 0.625rem;
}

.radio-group::before,
.radio-group::after {
    position: absolute;
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.radio-group::before { content: 'Nada'; left: 0; }
.radio-group::after  { content: 'Mucho'; right: 0; }

.checkbox-group {
    display: grid;
    align-items: center;
    gap: 0.6rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.checkbox-label:hover {
    background-color: rgba(56, 56, 58, 0.3);
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    height: 1.25rem;
    border: 0.125rem solid var(--accent-color);
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.063rem;
    width: 0.375rem;
    height: 0.625rem;
    border: solid white;
    border-width: 0 0.125rem 0.125rem 0;
    transform: rotate(45deg);
}

.radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.radio-option label,
.checkbox-option label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
}

input[type="radio"],
input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.radio-label input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 1.375rem;
    height: 1.375rem;
    border: 0.125rem solid var(--border-color);
    border-radius: 50%;
    margin: 0 0 0.3125rem;
    cursor: pointer;
    background-color: var(--input-background);
    transition: all 0.3s ease;
    position: relative;
}

.radio-label input[type="radio"]:checked {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    box-shadow: 0 0 0.3125rem rgba(10, 132, 255, 0.3);
}

.radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--input-background);
}

.radio-label input[type="radio"]:hover {
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.submit-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.3s;
}

.submit-btn:hover {
    opacity: 0.9;
}

.btn-login {
    background-color: var(--celeste);
    color: white;
    padding: .5rem 1rem;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.3s;
}

/* Campo requerido */
.required {
    color: var(--error-color);
    margin-left: 0.25rem;
    font-size: 1rem;
}

/* Inputs de redes sociales */
.social-input {
    margin-bottom: 1.2rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.social-icon {
    position: absolute;
    left: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.input-with-icon input {
    padding-left: 2.8125rem;
    border-radius: 0.625rem;
    height: 2.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    vertical-align: middle;
    line-height: normal;
}

#instagram {
    padding-left: 3.4375rem;
}

.input-with-icon input:focus {
    box-shadow: 0 0 0 0.25rem rgba(10, 132, 255, 0.3);
}

.social-input .input-with-icon input:focus,
.social-input .input-with-icon input:hover {
    border-color: var(--accent-color);
    transform: translateY(-0.125rem);
}

/* Carga de foto personalizada */
.photo-upload-container {
    display: flex;
    align-items: stretch;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
    flex-direction: column;
}

.file-input-hidden {
    position: absolute;
    width: 0.063rem;
    height: 0.063rem;
    padding: 0;
    margin: -0.063rem;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-name-display {
    background-color: var(--input-background);
    border-radius: 0.625rem;
    padding: 0.75rem;
    width: 100%;
    border: 0.063rem solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    padding-left: 2.8125rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 0.063rem 0.125rem rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.custom-file-button {
    background-color: var(--accent-color);
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
    height: 2.75rem;
    white-space: nowrap;
    margin-top: 0.625rem;
    width: 100%;
}

.custom-file-button:hover {
    background-color: #0071e3;
    transform: translateY(-0.125rem);
}

.foto-preview img {
    max-width: 100%;
    height: auto;
}

/* Iconos de redes sociales (inline SVG base64) */
.instagram-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23E1306C' d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E");
}

.photo-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%2332d74b' d='M149.1 64.8L138.7 96H64C28.7 96 0 124.7 0 160V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H373.3L362.9 64.8C356.4 45.2 338.1 32 317.4 32H194.6c-20.7 0-39 13.2-45.5 32.8zM256 384c-53 0-96-43-96-96s43-96 96-96s96 43 96 96s-43 96-96 96z'/%3E%3C/svg%3E");
}

/* Login */
.login-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1.05rem 3.75rem rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    width: 100%;
    max-width: 24rem;
}

.alert {
    padding: 0.75rem 0.9375rem;
    border-radius: 0.5rem;
    margin-bottom: 1.2rem;
    display: none;
}

.alert.error   { background: #fee; border-left: 0.25rem solid #e74c3c; color: #c0392b; }
.alert.success { background: #efd; border-left: 0.25rem solid #27ae60; color: #229954; }

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 1.2rem;
    color: #999;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: .5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: .5rem;
    font-size: .9rem;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--celeste);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.remember-me input[type="checkbox"] { margin-right: 0.5rem; }

.remember-me label {
    margin: 0;
    font-weight: normal;
    font-size: 0.8rem;
    color: var(--gris20);
}

.footer {
    text-align: center;
    margin-top: 1.875rem;
    padding-top: 1.25rem;
    border-top: 0.063rem solid #e0e0e0;
}

.footer p {
    color: var(--asistencias);
    text-decoration: none;
    font-size: 0.8rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.8rem;
}

.footer a:hover { text-decoration: underline; }


/* =============================================================================
    9. ESTUDIANTES — FOTOS Y CARDS
   ============================================================================= */
.estudiante-foto {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
    border: 0.125rem solid #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.estudiante-foto-grande {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 1rem auto;
    display: block;
    border: 0.125rem solid #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.estudiante-foto-historial {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    display: block;
    border: 0.125rem solid #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.estudiante-foto-card {
    width: 7.5rem;
    height: 7.5rem;
    object-fit: cover;
    border-radius: 50%;
    border: 0.1875rem solid #f0f0f0;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
}

.estudiante-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 0.063rem solid #ddd;
}

.estudiante-card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.1);
}

.ios-photo-frame {
    width: 12rem;
    height: 12rem;
    margin: 1rem auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
    background-color: #f5f5f7;
}

.ios-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carrera-text {
    margin-left: 2.25rem;
    font-size: 0.85em;
    color: #666;
}

.carrera-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.carrera-dis { color: #dc3545 !important; }
.carrera-dg  { color: #0d6efd !important; }

/* Secciones semánticas de cards */
.card-estudiantes .card-icon,
.card-estudiantes .card-title,
.card-estudiantes .card-text { color: var(--estudiantes); }

.card-asistencias .card-icon,
.card-asistencias .card-title,
.card-asistencias .card-text { color: var(--asistencias); }

.card-equipos .card-icon,
.card-equipos .card-title,
.card-equipos .card-text { color: var(--equipos); }


/* =============================================================================
    10. EQUIPOS
   ============================================================================= */
.equipo-card {
    border-left: 0.3125rem solid #17a2b8;
    margin-bottom: 1.25rem;
    height: 100%;
    transition: transform 0.3s ease;
}

.equipo-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.equipo-header {
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.team-header {
    background-color: #f8f9fa;
    border-radius: 1rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.05);
}

.team-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 0.9375rem;
}

.stat-item {
    text-align: center;
    padding: 0.625rem 0.9375rem;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.attendance-form {
    background-color: white;
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.list-group {
    display: grid !important;
    justify-content: start !important;
}

.miembros-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.miembros-lista li {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    flex-wrap: nowrap;
}

.miembros-lista .estudiante-foto {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
}

.equipo-card .miembros-lista li {
    margin-bottom: 0.3125rem;
    display: grid;
    grid-template-columns: 1fr 3fr;
    align-items: center;
}

.equipo-card .miembros-lista {
    list-style: none;
    font-size: 0.9em;
}

.equipo { font-size: 0.8rem; font-weight: 400; }

/* Colores de comisión y carrera */
.equipos-com1 { background-color: rgb(255, 0, 225); color: white; border-radius: 0.8rem 0.8rem 0 0 !important; }
.equipos-com2 { background-color: rgb(2, 117, 140);  color: white; border-radius: 0.8rem 0.8rem 0 0 !important; }

.comision-1              { border-left-color: #c003ef; }
.comision-1 .equipo-header {
    background: linear-gradient(135deg, #c003ef 0%, #d63de7 100%);
    color: white; padding-left: 1rem; border-radius: 0 1rem 0 0;
}

.comision-2              { border-left-color: var(--accent-color); }
.comision-2 .equipo-header {
    background: linear-gradient(135deg, #1a6872 0%, #2d8a95 100%);
    color: white; padding: 0; border-radius: 0.5rem 0.5rem 0 0;
}

.equipo-dg              { border-left-color: #05008f; }
.equipo-dg .equipo-header {
    background: linear-gradient(135deg, #05008f 0%, #4361ee 100%);
    color: white; padding: 0; border-radius: 0.5rem 0.5rem 0 0;
}

.equipo-dis             { border-left-color: #da0000; }
.equipo-dis .equipo-header {
    background: linear-gradient(135deg, #da0000 0%, #ef476f 100%);
    color: white; padding: 0; border-radius: 0.5rem 0.5rem 0 0;
}

.equipo-mixto           { border-left-color: #c003ef; }
.equipo-mixto .equipo-header {
    background: #c003ef;
    color: white; padding: 0; border-radius: 0 1rem 0 0;
}

.sin-equipo             { border-left-color: transparent; }
.sin-equipo .equipo-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.equipo-section {
    border-left: 0.25rem solid var(--accent-color);
    margin-bottom: 1rem;
}

.comisiones-titulo { font-size: 1.2rem; padding: 1em; }

/* Modales de equipo */
#equiposModal .modal-body { background-color: #f8f9fa; }
#detalleModal .modal-body { padding: 0; }
#detalleModal iframe      { width: 100%; height: 75vh; border: none; }


/* =============================================================================
    11. BADGES
   ============================================================================= */

.badge {
    margin: 0 1rem;
}

.badge-dis {
    background-color: var(--dis) !important;
    color: white;
    font-weight: 600;
    padding: 0.35em 1em;
    border-radius: 0 1rem 1rem 0;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.03125rem;
    box-shadow: 0 0.125rem 0.25rem rgba(239, 71, 111, 0.3);
    /* position: absolute; */
    top: 0;
    left: 10%;
}

.badge-dg {
    background-color: var(--dg) !important;
    color: white;
    font-weight: 600;
    padding: 0.35em 1em;
    border-radius: 0 1rem 1rem 0;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.03125rem;
    box-shadow: 0 0.125rem 0.25rem rgba(239, 71, 111, 0.3);
    /* position: absolute; */
    top: 0;
    left: 10%;
}

.badge .bg-primary {
    background-color: #05008f !important;
    color: white;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.03125rem;
    box-shadow: 0 0.125rem 0.25rem rgba(67, 97, 238, 0.3);
}

.badge .bg-danger {
    background-color: #da0000 !important;
    color: white;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.03125rem;
    box-shadow: 0 0.125rem 0.25rem rgba(239, 71, 111, 0.3);
}

.badge .bg-info {
    background-color: transparent !important;
    color: white;
    font-weight: 600;
    padding: 0 0 0 0.5rem;
    border-radius: 1rem;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.03125rem;
    box-shadow: 0 0.125rem 0.25rem rgba(6, 214, 160, 0.3);
}

.badge:hover {
    transform: translateY(-0.063rem);
    transition: transform 0.2s ease;
}

.badge-presencial {
    color: #fff;
    background-color: var(--presencial);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 0.3rem;
    width: 1.4rem;
    display: inline-flex;
    text-align: center;
    justify-content: space-around;
}

.badge-virtual {
    color: #fff;
    background-color: var(--virtual);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 0.3rem;
    width: 1.4rem;
    display: inline-flex;
    text-align: center;
    justify-content: space-around;
}

.badge-asistencia {
    font-size: 1rem;
    min-width: 2.3rem;
    font-weight: 900;
    border-radius: 0;
}

/* Colores helper compatibles con Tailwind/Bootstrap */
.bg-yellow-100 { background-color: #fef3c7 !important; }
.text-yellow-800 { color: #92400e !important; }
.bg-green-100 { background-color: #00c244 !important; color: #ffffff !important; }
.text-green-800 { color: #ffffff !important; }
.bg-red-100 { background-color: #e12626 !important; color: #ffffff !important; }
.text-red-800 { color: #ffffff !important; }
.bg-gray-100 { background-color: #e8e8e8 !important; }
.text-gray-400 { color: #5a5a5a !important; }
.text-gray-300 { color: #eaeaea !important; }


/* =============================================================================
    12. ASISTENCIAS — CLASES Y TABLA
   ============================================================================= */
.clase-pasada { opacity: 0.3; }

.clase-actual {
    border: 0.1875rem solid #198754;
    box-shadow: 0 0 0.625rem rgba(25, 135, 84, 0.3);
    border-width: 0.125rem;
    font-weight: bold;
}

.view-toggle { margin-bottom: 1.25rem; }

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

.asistencia-table th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
}

.asistencia-indicator {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.nota-display {
    font-size: 0.75rem;
    color: #6c757d;
}

.nota-cell {
    min-width: 3.5rem;
    text-align: center;
}

.table-sm th,
.table-sm td {
    padding: 0.5rem;
    vertical-align: middle;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Tabla visual (registros) */
.tabla-visual {
    width: 100%;
    border-collapse: collapse;
    overflow: auto;
}

.tabla-header {
    display: table-row;
    font-weight: 600;
}

.tabla-row {
    display: table-row;
    border-bottom: 0.063rem solid #dee2e6;
}

.tabla-row:hover { background: #f8f9fa; }

.tabla-cell {
    display: table-cell;
    padding: 0.5em;
    vertical-align: middle;
    border-bottom: 0.063rem solid #dee2e6;
    font-size: 0.9em;
    text-align: left;
}

.tabla-header .tabla-cell {
    font-weight: 700;
    color: var(--border-color);
    border-bottom: 0.125rem solid var(--border-color);
    font-size: 0.9em;
}

.clase-cell { text-align: center; }

.nota-badge {
    display: inline-block;
    padding: 0.1875rem;
    border-radius: 0.5em;
    font-size: 0.9em;
    font-weight: 600;
    min-width: 1em;
    text-align: center;
}

.nota-badge.presente { background: #d4edda; color: #155724; }
.nota-badge.ausente  { background: #f8d7da; color: #721c24; }
.nota-badge.sin-dato { background: #e2e3e5; color: #6c757d; }

.presente { color: rgb(7, 187, 7); }
.ausente  { color: rgb(255, 94, 0); }

.clase-link { color: rgb(0, 0, 0); text-decoration: none; font-weight: 300; }
.clase-link:hover { color: #6127ff; text-decoration: underline; }

.nombre-link { text-decoration: none; color: inherit; }
.nombre-link:hover { text-decoration: underline; color: #0d6efd; }

.attendance-number {
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    text-align: center;
    line-height: 1.2rem;
    font-size: 0.7rem;
    font-weight: 700;
}


/* =============================================================================
    13. BARRAS DE PROGRESO
   ============================================================================= */
.progress-container { margin: 0.5rem 0; }

.progress {
    height: 1.1em;
    border-radius: 0.375rem;
    background-color: rgb(225, 225, 225);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 0.375rem;
    transition: width 0.5s ease, background-color 0.5s ease;
    animation: progressAnimation 1s ease-in-out;
}

@keyframes progressAnimation {
    from { width: 0%; }
    to   { width: var(--progress-width); }
}

.progress-bar.bg-danger  { background: linear-gradient(90deg, #dc3545, #ff6b6b); }
.progress-bar.bg-warning { background: linear-gradient(90deg, #fd7e14, #ff9f43); }
.progress-bar.bg-info    { background: linear-gradient(90deg, #ffc107, #ffd93d); }
.progress-bar.bg-success { background: linear-gradient(90deg, #28a745, #51cf66); }

.bg-danger-gradient  { background: linear-gradient(90deg, #dc3545, #ff6b6b) !important; }
.bg-warning-gradient { background: linear-gradient(90deg, #fd7e14, #ff9f43) !important; }
.bg-info-gradient    { background: linear-gradient(90deg, #ffc107, #ffd93d) !important; }
.bg-success-gradient { background: linear-gradient(90deg, #28a745, #51cf66) !important; }
.progress-bar-solid  { background: var(--success) !important; }

.progress-text {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.125rem;
    font-weight: 500;
}

.progress-text .text-success { color: #28a745; font-weight: 600; }
.progress-text .text-warning { color: #fd7e14; font-weight: 600; }

.asistencia-info { margin-top: 0.5rem; padding: 0.25rem 0; }

.conocimiento-barra {
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.conocimiento-nivel {
    background: linear-gradient(90deg, #007AFF, #5856D6);
    border-radius: 0.25rem;
    height: 100%;
    transition: width 0.6s ease;
}


/* =============================================================================
    14. ESTADÍSTICAS
   ============================================================================= */
.estadisticas {
    display: flex;
    align-items: baseline;
    justify-content: space-around;
    align-content: space-between;
    justify-items: center;
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

.estadisticas .card-title {
    font-size: 0.8rem;
    text-align: center;
    color: #1c1c1e;
}

.estadisticas .col-md-3 { width: 20%; }

.estadisticas h2 {
    font-size: 1.2rem;
    text-align: center;
    color: var(--accent-color);
    font-weight: 700;
}

.periodo-badge {
    color: var(--text-color);
    font-weight: 500;
    font-size: .9rem;
    border-radius: 0;
    padding: 0;
    text-align: center;
    width: 100%;
    margin: 0 auto;
    text-decoration: underline;
}

.periodo-badge a {
    color: var(--error-color);
    font-weight: 500;
    font-size: 0.8em;
}

.periodo-badge.activo { 
    color: var(--text-color);
    font-weight: 700;
    font-size: .9rem;
    border-radius: 0;
    padding: 0;
    text-align: center;
    width: 100%;
    margin: 0 auto;
    text-decoration: underline;
}

.periodo-info h3 {
    color: #2c3e50;
    margin-bottom: .5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.periodo-details {
    display: flex;
    gap: .5rem;
    font-size: .8rem;
    color: var(--accent-color);
    font-weight: 900;
}

.periodo-details span {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.periodo-actions {
    display: flex;
    gap: .5rem;
}


/* =============================================================================
    15. ESTADOS DE COLORES GLOBALES
   ============================================================================= */
.nuevo    { background-color: var(--nuevo); }
.nueva    { background-color: var(--nuevo); padding: 1em; }
.editar   { color: var(--success-color); padding: .5em; }
.eliminar { color: var(--error-color); padding: .5em; }
/* =============================================================================
    16. MODAL — OVERLAY GENÉRICO
   ============================================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-overlay .modal-content {
    background-color: var(--section-background);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 90%;
    width: 31.25rem;
    text-align: center;
    box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.5);
    transform: translateY(1.25rem);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    margin-bottom: 1.5rem;
    text-align: center;
    background-color: var(--equipos);
}

.modal-header h2 { color: var(--text-color); margin-bottom: 1.5rem; }

.modal-title { text-align: center; color: #dee2e6; }

.modal-body {
    margin-bottom: 2rem;
}

.modal-body img {
    max-width: 100%;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.modal-footer button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-footer button:hover { background-color: #0071e3; }


/* =============================================================================
    17. MODAL DEL SISTEMA (procesando / éxito / error)
   ============================================================================= */
.sistema-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(0.3125rem);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.sistema-modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 1.25rem;
    padding: 2.5rem;
    max-width: 31.25rem;
    width: 90%;
    text-align: center;
    box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, 0.3);
    transform: translateY(1.875rem);
    transition: all 0.3s ease;
    position: relative;
    border: 0.063rem solid rgba(255, 255, 255, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

.sistema-modal.active .sistema-modal-content { transform: translateY(0); }

.sistema-modal-content::before {
    content: '';
    position: absolute;
    top: -0.125rem;
    left: -0.125rem;
    right: -0.125rem;
    bottom: -0.125rem;
    background: linear-gradient(45deg, #3498db, #2ecc71, #f39c12, #e74c3c);
    border-radius: 1.375rem;
    z-index: -1;
    opacity: 0;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(-1.25rem); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.sistema-modal-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    position: relative;
}

.sistema-modal-icon.loading {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.sistema-modal-icon.success {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    animation: successPulse 0.6s ease-out;
}

.sistema-modal-icon.error {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    animation: errorShake 0.6s ease-out;
}

.sistema-modal-icon.warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    animation: warningBounce 0.6s ease-out;
}

.loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 0.25rem solid rgba(255, 255, 255, 0.3);
    border-top: 0.25rem solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes successPulse {
    0%   { transform: scale(0.8); opacity: 0.5; }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-0.3125rem); }
    75%       { transform: translateX(0.3125rem); }
}

@keyframes warningBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40%                      { transform: translateY(-0.625rem); }
    60%                      { transform: translateY(-0.3125rem); }
}

.sistema-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.9375rem;
    color: #2c3e50;
    line-height: 1.3;
}

.sistema-modal-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #5a6c7d;
    margin-bottom: 1.5625rem;
    text-align: left;
}

.sistema-modal-message strong { color: #2c3e50; font-weight: 600; }

.sistema-modal-button {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 0.9375rem 1.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 3.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 9.375rem;
    box-shadow: 0 0.25rem 0.9375rem rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.sistema-modal-button:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 1.5625rem rgba(52, 152, 219, 0.4);
    background: linear-gradient(145deg, #2980b9, #3498db);
}

.sistema-modal-button:active {
    transform: translateY(0);
    box-shadow: 0 0.125rem 0.625rem rgba(52, 152, 219, 0.3);
}

/* Progress bar del sistema modal */
.progress-container {
    width: 100%;
    height: 0.5rem;
    background: #ecf0f1;
    border-radius: 0.625rem;
    margin: 1.5625rem 0;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 0.625rem;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


/* =============================================================================
    18. TOAST — NOTIFICACIONES
   ============================================================================= */
.toast {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 0.625rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-width: 17.5rem;
    max-width: 90%;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
    text-align: center;
    opacity: 0;
}

.toast.show    { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: rgba(46, 125, 50, 0.9); }
.toast.error   { background: rgba(211, 47, 47, 0.9); }

.toast-icon    { font-size: 1.25rem; color: white; }
.toast-message { color: white; font-weight: 500; flex-grow: 1; }

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0;
    opacity: 0.7;
    margin-left: auto;
}

.toast-close:hover { opacity: 1; }


/* =============================================================================
    19. ALERT IOS
   ============================================================================= */
.ios-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(250, 250, 250, 0.95);
    border-radius: 0.875rem;
    width: 16.875rem;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.2);
    z-index: 1100;
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: none;
}

.ios-alert.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ios-alert-header  { padding: 1.125rem 1rem 0; }

.ios-alert-title   { font-size: 1.0625rem; font-weight: 600; margin: 0 0 0.5rem; color: #000; }

.ios-alert-message { font-size: 0.8125rem; margin: 0 0 1.125rem; color: #333; padding: 0 1rem; }

.ios-alert-buttons {
    display: flex;
    border-top: 0.063rem solid rgba(0, 0, 0, 0.1);
}

.ios-alert-button {
    flex: 1;
    border: none;
    background: none;
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: #007AFF;
    cursor: pointer;
}

.ios-alert-button:not(:last-child) { border-right: 0.063rem solid rgba(0, 0, 0, 0.1); }
.ios-alert-button.cancel           { font-weight: 400; color: #FF3B30; }

.ios-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: none;
}

.ios-alert-overlay.active { display: block; opacity: 1; }


/* =============================================================================
    20. PÁGINA DE ÉXITO
   ============================================================================= */
.exito-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.exito-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    max-width: 31.25rem;
    width: 100%;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1);
    border: 0.063rem solid #e0e0e0;
}

.exito-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    color: white;
    font-size: 2.5rem;
    animation: bounceIn 0.6s ease-out;
}

.exito-title   { color: #2c5aa0; font-size: 2rem; margin-bottom: 1rem; font-weight: 600; }
.exito-message { color: #666; font-size: 1.1rem; line-height: 1.6; margin-bottom: 2rem; }

.exito-details {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.exito-details h3 { color: #2c5aa0; margin-bottom: 1rem; font-size: 1.2rem; }

.exito-details ul { list-style: none; padding: 0; margin: 0; }

.exito-details li {
    padding: 0.5rem 0;
    border-bottom: 0.063rem solid #e0e0e0;
    display: flex;
    align-items: center;
}

.exito-details li:last-child { border-bottom: none; }

.exito-details li::before {
    content: "✓";
    color: #4CAF50;
    font-weight: bold;
    margin-right: 0.5rem;
}

.exito-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.countdown {
    background: #e3f2fd;
    border: 0.063rem solid #bbdefb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 2rem 0;
    color: #1976d2;
    font-size: 0.9rem;
}


/* =============================================================================
    21. ANIMACIONES GLOBALES
   ============================================================================= */
@keyframes float {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-0.625rem); }
    100% { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(1.25rem); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { opacity: 1; transform: scale(1.05); }
    70%  { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}


/* =============================================================================
    22. PRINT
   ============================================================================= */
@media print {
    .no-print { display: none !important; }
    .equipo-section,
    .equipo-card { page-break-inside: avoid; break-inside: avoid; }
}


/* =============================================================================
    23. RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .card { margin-bottom: 1rem; }

    .card-title { font-size: 1.25rem; text-align: center; }

    .periodo-card {
        grid-template-columns: 1fr;
    }
    
    .periodo-actions {
        justify-content: flex-start;
    }

    .btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        min-width: 2.4rem;
        font-size: 0.8rem;
        padding: 0.5rem;
        text-align: center;
        font-weight: 400;
    }

    .estudiante-foto {
        width: 3rem;
        height: 3rem;
        margin-top: 0.7rem;
    }

    .form-section  { font-size: 0.85rem; }
    .form-description { font-size: 0.9rem; }
    .form-container { padding: 1rem 0.5rem; }

    form { padding: 0rem; }

    .radio-group {
        width: 90%;
    }

    .radio-group::before,
    .radio-group::after { font-size: 0.8rem; }

    .radio-label input[type="radio"] {
        width: 1.25rem;
        height: 1.25rem;
    }

    .sistema-modal-content { margin: 1rem; padding: 1.5rem; }
    .sistema-modal-title   { font-size: 1.3rem; }

    .exito-card    { padding: 1rem 1.5rem; }
    .exito-title   { font-size: 1.5rem; }
    .exito-actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .sistema-modal-content { margin: 1rem; padding: 1.5rem; }
    .sistema-modal-title   { font-size: 1.3rem; }
}

/* 
   Agregar al final de styles.css
   Sobreescribe la regla genérica .modal-footer button 
   para respetar los estilos de Bootstrap en cada botón 
*/

#eliminarEstudianteModal .modal-footer .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

#eliminarEstudianteModal .modal-footer .btn-secondary:hover {
    background-color: #5c636a;
}

#eliminarEstudianteModal .modal-footer .btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

#eliminarEstudianteModal .modal-footer .btn-danger:hover {
    background-color: #bb2d3b;
}

/* =============================================================================
    24. LOGIN
   ============================================================================= */

.header-login {
   /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background: var(--celeste);
    color: var(--text-color);
    padding: .5em;
    border-radius: 1em;
    margin-bottom: 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.header-login h1 {
    font-size: 1.2rem;
    font-weight: 600;
}

.header-login p{
    font-size: 0.8rem;
    text-align: center;
}

.cerrar-sesion {
    font-size: 0.8rem;
    border: none;
    background-color:var(--nuevo);
    margin: 0;
    font-weight: 600;
    line-height: 1rem;
    border-radius: .5rem;
    padding: .2rem 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: .5em;
    margin-bottom: .5rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    justify-content:space-between;
}
.user-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-color-secondary);
}