.teacher-form-section {
    padding: 72px 0 96px;
    background-color: #ffffff;
    background-image:
        linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.9)),
        url('../images/fondovideoblanco.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

.teacher-form-card {
    background: #ffffff;
    border: 1px solid var(--ad-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px -10px rgba(18,25,56,.10);
    margin: 0 auto;
    max-width: 650px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.teacher-form-progress {
    background: rgba(148,163,184,.18);
    height: 4px;
}

.teacher-form-progress__bar {
    background: var(--ad-purple);
    height: 100%;
    transition: width .25s ease;
    width: 33%;
}

.teacher-form-header,
.teacher-form-step,
.teacher-form-success,
.teacher-form-alert { padding: 40px; }

.teacher-form-header {
    border-bottom: 1px solid var(--ad-border);
    padding-bottom: 20px;
    text-align: center;
}

.teacher-form-header h1,
.teacher-form-success h2 {
    color: #232835;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.teacher-form-header p,
.teacher-form-success p {
    color: #4e5362;
    font-size: .95rem;
    line-height: 1.6;
    margin: 8px 0 0;
}

.teacher-form-alert--error {
    background: #fff4f1;
    border-bottom: 1px solid #ffd2c6;
    color: #9f2414;
}

.teacher-form-alert ul { margin: 10px 0 0; padding-left: 18px; }

.teacher-form-step,
.teacher-form-success { display: none; }

.teacher-form-step.is-active,
.teacher-form-success.is-active { display: block; }

.teacher-form-step__title {
    align-items: center;
    border-bottom: 1px solid var(--ad-border);
    color: #232835;
    display: flex;
    font-size: 1.1rem;
    font-weight: 700;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 12px;
}

.teacher-form-step__title i { color: var(--ad-purple); }

.teacher-form-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-form-field {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.teacher-form-field[hidden] { display: none !important; }
.teacher-form-field--full { grid-column: 1 / -1; }

.teacher-form-field span,
.teacher-form-check span {
    color: #232835;
    font-size: .85rem;
    font-weight: 600;
}

.teacher-form-field input,
.teacher-form-field select,
.teacher-form-field textarea {
    background: #f3f5f8;
    border: 1px solid #c4cdd8;
    border-radius: 6px;
    color: #232835;
    font: inherit;
    font-size: .95rem;
    min-height: 46px;
    outline: none;
    padding: 12px 14px;
    width: 100%;
}

.teacher-form-field textarea { min-height: 110px; resize: vertical; }

.teacher-form-field input:focus,
.teacher-form-field select:focus,
.teacher-form-field textarea:focus {
    border-color: var(--ad-purple);
    box-shadow: 0 0 0 3px rgba(45, 14, 96,.10);
}

/* Oculta el select nativo solo cuando el JS ya lo ha mejorado */
.teacher-form-field select[data-teacher-native-select] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.ad-theme .teacher-form-select-trigger {
    align-items: center;
    background: #f3f5f8;
    border: 1px solid #c4cdd8;
    border-radius: 6px;
    color: #232835;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: .95rem;
    justify-content: space-between;
    min-height: 46px;
    outline: none;
    padding: 12px 14px;
    text-align: left;
    width: 100%;
}

.ad-theme .teacher-form-select-trigger i { color: #94a3b8; font-size: .78rem; }

.ad-theme .teacher-form-select-trigger:focus,
.ad-theme .teacher-form-select-trigger.is-open {
    border-color: var(--ad-purple);
    box-shadow: 0 0 0 3px rgba(45, 14, 96,.10);
}

.ad-theme .teacher-form-select-trigger.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.10);
}

.teacher-form-select-portal {
    background: #ffffff;
    border: 1px solid rgba(45, 14, 96,.30);
    border-radius: 10px;
    box-shadow: 0 18px 34px rgba(15,23,42,.14);
    display: none;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    position: fixed;
    scrollbar-color: rgba(45, 14, 96,.35) transparent;
    scrollbar-width: thin;
    z-index: 100000;
}

.teacher-form-select-portal.is-open { display: grid; gap: 4px; }

.ad-theme .teacher-form-select-portal button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #232835;
    cursor: pointer;
    font: inherit;
    padding: 9px 12px;
    text-align: left;
    width: 100%;
}

.ad-theme .teacher-form-select-portal button:hover,
.ad-theme .teacher-form-select-portal button.is-selected {
    background: rgba(45, 14, 96,.08);
    color: var(--ad-purple);
}

/* Radio / Checkbox */
.teacher-form-options {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-form-options--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.teacher-form-options label,
.teacher-form-check {
    align-items: center;
    background: #f3f5f8;
    border: 1px solid #c4cdd8;
    border-radius: 8px;
    color: #232835;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    transition: border-color .2s ease;
}

.teacher-form-options label:hover,
.teacher-form-check:hover { border-color: rgba(45, 14, 96,.35); }

.teacher-form-options input,
.teacher-form-check input {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 2px solid #cbd5e1;
    box-shadow: none;
    display: grid;
    flex: 0 0 auto;
    height: 18px;
    margin: 0;
    min-height: 0;
    outline: none;
    padding: 0;
    place-content: center;
    width: 18px;
}

.teacher-form-options input[type="radio"] { border-radius: 50%; }
.teacher-form-options input[type="checkbox"],
.teacher-form-check input[type="checkbox"] { border-radius: 4px; }

.teacher-form-options input::before,
.teacher-form-check input::before {
    background: var(--ad-purple);
    content: "";
    transform: scale(0);
    transition: transform .15s ease;
}

.teacher-form-options input[type="radio"]::before { border-radius: 50%; height: 8px; width: 8px; }
.teacher-form-options input[type="checkbox"]::before,
.teacher-form-check input[type="checkbox"]::before {
    clip-path: polygon(14% 44%, 0 65%, 46% 100%, 100% 18%, 80% 0, 40% 62%);
    height: 10px; width: 10px;
}

.teacher-form-options input:checked,
.teacher-form-check input:checked {
    background: rgba(45, 14, 96,.08);
    border-color: var(--ad-purple);
}

.teacher-form-options input:checked::before,
.teacher-form-check input:checked::before { transform: scale(1); }

/* Acciones */
.teacher-form-actions {
    align-items: center;
    border-top: 1px solid var(--ad-border);
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
}

.teacher-form-actions--end { justify-content: flex-end; }

/* Botones */
.teacher-form-btn {
    align-items: center;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ad-theme .teacher-form-btn--primary,
.ad-theme .teacher-form-btn--submit {
    background: linear-gradient(180deg, #4b168c 0%, #2d0e60 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(74,32,216,.18);
}

.ad-theme .teacher-form-btn--primary:hover,
.ad-theme .teacher-form-btn--submit:hover {
    background: linear-gradient(135deg, var(--ad-purple-hover, #6a2cf3), var(--ad-purple-hover-2, #8d3dff));
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(74,32,216,.24);
    color: #ffffff;
}

.ad-theme .teacher-form-btn--soft {
    background: transparent;
    border: 1px solid #c4cdd8;
    color: #4e5362;
}

.ad-theme .teacher-form-btn--soft:hover { border-color: rgba(45, 14, 96,.35); color: #232835; }

/* Éxito */
.teacher-form-success { text-align: center; }

.teacher-form-success__icon {
    align-items: center;
    background: rgba(22,163,74,.12);
    border-radius: 50%;
    color: #22c55e;
    display: flex;
    font-size: 2rem;
    height: 80px;
    justify-content: center;
    margin: 0 auto 20px;
    width: 80px;
}

.teacher-form-success .teacher-form-btn { margin-top: 28px; }

@media (max-width: 680px) {
    .teacher-form-section { padding: 52px 0; }
    .teacher-form-card { border-radius: 14px; }
    .teacher-form-header,
    .teacher-form-step,
    .teacher-form-success,
    .teacher-form-alert { padding: 28px 22px; }
    .teacher-form-grid,
    .teacher-form-options,
    .teacher-form-options--two { grid-template-columns: 1fr; }
    .teacher-form-actions { align-items: stretch; flex-direction: column-reverse; gap: 12px; }
    .teacher-form-actions--end { align-items: stretch; }
}
