body {
    font-family: 'Ubuntu', sans-serif;
    background: #044b8b;
    background-image: linear-gradient(135deg, #044b8b 0%, #063d73 100%);
    min-height: 100vh;
    margin: 0;
}

button,
input,
select,
textarea,
summary,
label,
p,
span,
h1,
h2,
h3,
h4,
h5,
h6,
a,
div {
    font-family: 'Ubuntu', sans-serif;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-variation-settings:
        'FILL' 0,
        'wght' 500,
        'GRAD' 0,
        'opsz' 24;
}

/* Contenedor principal */

.glass-card {
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 24px 70px #0f172a;
    max-height: 92vh;
    overflow-y: auto;
}

/* Encabezado */

.login-brand {
    text-align: center;
    margin-bottom: 1.6rem;
}

.login-brand-title {
    color: #0f172a;
    font-size: 1.9rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.login-brand-subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

/* Pasos superiores */

.login-step {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.65rem;
}

.step-button {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.step-button-current {
    background: #044b8b;
    color: #ffffff;
}

.step-button-done {
    background: #e8f1fa;
    color: #044b8b;
}

.step-button-muted {
    background: #e2e8f0;
    color: #64748b;
    cursor: default;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #cbd5e1;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

/* Formularios */

.login-input,
.login-select {
    display: block;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
}

.login-input:focus,
.login-select:focus {
    border-color: #044b8b;
    box-shadow: 0 0 0 4px #d9eafa;
    outline: none;
}

.login-input::placeholder {
    color: #94a3b8;
}

/* Select con flecha */

.select-wrap {
    position: relative;
}

.select-wrap select {
    padding-right: 2.9rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.select-arrow {
    position: absolute;
    right: 1.05rem;
    top: 50%;
    width: 18px;
    height: 12px;
    margin-top: -6px;
    pointer-events: none;
}

.select-arrow:before {
    content: '';
    position: absolute;
    left: 2px;
    top: 1px;
    width: 11px;
    height: 11px;
    border-right: 3px solid #5f7894;
    border-bottom: 3px solid #5f7894;
    transform: rotate(45deg);
    border-radius: 1px;
}

/* Password con ojo */

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 3.4rem;
}

.password-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    margin-top: -1.1rem;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    background: #f1f5f9;
    color: #044b8b;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.password-toggle:hover {
    background: #e8f1fa;
}

/* Botones */

.login-btn-primary {
    display: block;
    width: 100%;
    background: #044b8b;
    color: #ffffff;
    border: 1px solid #044b8b;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font-weight: 700;
    box-shadow: 0 10px 22px #cbd5e1;
    cursor: pointer;
}

.login-btn-primary:hover {
    background: #063d73;
    border-color: #063d73;
    color: #ffffff;
}

.login-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 4px #d9eafa;
}

.login-help {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.login-alert {
    border-radius: 16px;
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Seleccion de semestre */

.semester-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.semester-grid-8 {
    max-width: 432px;
}

.semester-grid-10 {
    max-width: 550px;
}

.semester-grid-other {
    max-width: 550px;
}

.semester-option {
    width: 94px;
    height: 94px;
    min-height: 94px;
    margin: 0.35rem;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
    text-align: center;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.semester-option:hover {
    border-color: #044b8b;
    background: #f8fafc;
}

.semester-option-selected {
    border-color: #044b8b;
    background: #e8f1fa;
    color: #044b8b;
}

.semester-number {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Bloques major y minor */

.login-choice-area,
.login-minor-area {
    margin-top: 8px;
}

.login-major-columns,
.login-minor-columns {
    display: flex;
    align-items: flex-start;
    margin-left: -6px;
    margin-right: -6px;
}

.login-major-column,
.login-minor-column {
    flex: 1;
    min-width: 0;
    padding-left: 6px;
    padding-right: 6px;
}

.login-choice-card,
.login-minor-card {
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 12px;
}

.login-choice-card-selected {
    border-color: #044b8b;
    background: #f8fbff;
}

.login-choice-card[open],
.login-minor-card[open],
.login-nested-minor-card[open] {
    border-color: #b8cbe0;
}

.login-choice-summary,
.login-minor-summary {
    cursor: pointer;
    padding: 13px 14px;
    min-height: 76px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-choice-summary::-webkit-details-marker,
.login-minor-summary::-webkit-details-marker {
    display: none;
}

.login-choice-radio-wrap {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.login-choice-title,
.login-minor-title {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    flex: 1;
}

.login-minor-summary-text {
    min-width: 0;
    flex: 1;
}

.login-choice-content,
.login-minor-content {
    border-top: 1px solid #eef2f7;
    padding: 12px 14px 14px;
}

.login-column-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.login-ramos-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-ramos-list li {
    color: #334155;
    font-size: 13px;
    line-height: 1.35;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.login-ramos-list li:last-child {
    border-bottom: 0;
}

.login-minor-empty {
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
}

/* Minor electivo */

.login-elective-option-simple {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px 13px;
    margin-bottom: 10px;
    cursor: pointer;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.login-elective-option-simple input {
    margin-right: 10px;
}

.login-elective-details-list {
    margin-top: 10px;
}

.login-elective-radio-wrap {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.login-nested-minor-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    margin-bottom: 8px;
    overflow: hidden;
}

.login-nested-minor-card-selected {
    border-color: #044b8b;
    background: #f8fbff;
}

.login-nested-minor-summary {
    cursor: pointer;
    padding: 11px 12px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.login-nested-minor-summary::-webkit-details-marker {
    display: none;
}

.login-nested-minor-title {
    flex: 1;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.login-nested-minor-content {
    border-top: 1px solid #eef2f7;
    padding: 8px 12px 10px;
}

/* Flechas de acordeon */

.summary-icon {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 22px;
    margin-left: 1rem;
    flex-shrink: 0;
    cursor: pointer;
}

.summary-icon:before {
    content: '';
    position: absolute;
    left: 4px;
    top: 3px;
    width: 11px;
    height: 11px;
    border-right: 3px solid #5f7894;
    border-bottom: 3px solid #5f7894;
    transform: rotate(45deg);
    border-radius: 1px;
    transition: transform 0.2s ease, top 0.2s ease;
}

/* Cerrado: flecha hacia abajo.
   Abierto: SOLO la flecha directa de ese acordeon apunta hacia arriba. */

details[open] > summary .summary-icon:before {
    transform: rotate(225deg);
    top: 8px;
}

/* Paso de avance */

.avance-box {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    overflow: hidden;
}

.avance-box-title {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem;
}

.avance-main-details {
    background: #ffffff;
}

.avance-main-summary {
    cursor: pointer;
    padding: 1rem;
    background: #ffffff;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.avance-semestres-list {
    border-top: 1px solid #e2e8f0;
}

.estado-details {
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.estado-details:last-child {
    border-bottom: 0;
}

.estado-summary {
    cursor: pointer;
    padding: 1rem;
    background: #ffffff;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.estado-select {
    font-size: 0.86rem;
}

.estado-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem;
}

.estado-row:last-child {
    border-bottom: 0;
}

.estado-row > div:first-child {
    flex: 1;
    padding-right: 0.75rem;
}

.estado-row .select-wrap {
    min-width: 210px;
}

/* Buscador */

.hidden-search {
    display: none;
}

/* Pantallas medianas */

@media (max-width: 1024px) {
    .glass-card {
        max-width: 92vw;
    }
}

/* Tablet y celular */

@media (max-width: 820px) {
    .login-major-columns,
    .login-minor-columns {
        display: block;
        margin-left: 0;
        margin-right: 0;
    }

    .login-major-column,
    .login-minor-column {
        padding-left: 0;
        padding-right: 0;
    }

    .login-choice-summary,
    .login-minor-summary {
        min-height: 1px;
    }
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
    }

    .glass-card {
        border-radius: 22px;
        padding: 1.5rem;
        max-height: 94vh;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .login-brand {
        margin-bottom: 1.25rem;
    }

    .login-brand-title {
        font-size: 1.55rem;
    }

    .login-brand-subtitle {
        font-size: 0.86rem;
    }

    .login-step {
        margin-bottom: 1.35rem;
    }

    .step-button {
        width: 34px;
        height: 34px;
        font-size: 0.86rem;
    }

    .step-line {
        width: 22px;
        margin-left: 0.4rem;
        margin-right: 0.4rem;
    }

    .semester-grid-8 {
        max-width: 360px;
    }

    .semester-grid-10,
    .semester-grid-other {
        max-width: 450px;
    }

    .semester-option {
        width: 76px;
        height: 76px;
        min-height: 76px;
        border-radius: 16px;
        margin: 0.25rem;
    }

    .semester-number {
        font-size: 1rem;
    }

    .estado-row {
        display: block;
        padding: 0.9rem;
    }

    .estado-row > div:first-child {
        padding-right: 0;
        margin-bottom: 0.75rem;
    }

    .estado-row .select-wrap {
        min-width: 100%;
    }

    .avance-box-title {
        padding: 0.95rem;
    }

    .avance-main-summary,
    .estado-summary {
        padding: 0.95rem;
    }
}

/* Celulares pequenos */

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .glass-card {
        border-radius: 20px;
        padding: 1.15rem;
        max-height: 96vh;
    }

    .login-brand-title {
        font-size: 1.35rem;
    }

    .login-brand-subtitle {
        font-size: 0.8rem;
    }

    .step-button {
        width: 31px;
        height: 31px;
        font-size: 0.8rem;
    }

    .step-line {
        width: 15px;
        margin-left: 0.28rem;
        margin-right: 0.28rem;
    }

    .login-input,
    .login-select {
        border-radius: 13px;
        padding: 0.78rem 0.9rem;
        font-size: 0.9rem;
    }

    .password-wrap input {
        padding-right: 3rem;
    }

    .password-toggle {
        width: 2rem;
        height: 2rem;
        margin-top: -1rem;
        right: 0.55rem;
    }

    .login-btn-primary {
        border-radius: 13px;
        padding: 0.85rem 0.9rem;
        font-size: 0.94rem;
    }

    .semester-grid-8,
    .semester-grid-10,
    .semester-grid-other {
        max-width: 300px;
    }

    .semester-option {
        width: 64px;
        height: 64px;
        min-height: 64px;
        margin: 0.22rem;
        border-radius: 15px;
    }

    .semester-number {
        font-size: 0.95rem;
    }

    .login-choice-summary,
    .login-minor-summary {
        padding: 12px 13px;
    }

    .login-choice-content,
    .login-minor-content {
        padding: 10px 13px 12px;
    }

    .login-elective-option-simple {
        padding: 11px 12px;
    }

    .login-nested-minor-summary {
        padding: 10px 11px;
    }

    .avance-box {
        border-radius: 18px;
    }

    .avance-box-title h3 {
        font-size: 0.98rem;
    }

    .avance-box-title p {
        font-size: 0.84rem;
    }

    .estado-summary,
    .avance-main-summary {
        font-size: 0.92rem;
    }
}