/* Páginas de cuenta del campus: entrar, registro, recuperar, planes y mi cuenta. */
.thl-auth-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 80px;
}

.thl-auth-card {
    width: min(480px, 100%);
    background: var(--thl-card);
    border: 1px solid var(--thl-border);
    border-radius: 24px;
    box-shadow: var(--thl-shadow);
    padding: 36px 32px;
}

.thl-auth-page.is-wide .thl-auth-card {
    width: min(760px, 100%);
}

.thl-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--thl-muted);
}

.thl-auth-brand img { max-height: 40px; }

.thl-auth-brand span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--thl-text);
    color: #fff;
    font-weight: 900;
    letter-spacing: .04em;
    font-size: 12px;
}

.thl-auth-context {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--thl-main) 10%, #fff);
    color: var(--thl-main);
    font-size: 13px;
    font-weight: 700;
}

.thl-auth-card h1,
.thl-auth-card h2,
.thl-auth-card h3 {
    font-family: inherit;
}

.thl-auth-card h1 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--thl-text);
}

.thl-auth-sub {
    margin: 0 0 22px;
    color: var(--thl-muted);
    font-size: 15px;
    line-height: 1.55;
}

.thl-auth-flash {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

.thl-auth-flash.is-error { background: #fcf0f1; color: #8a2424; }
.thl-auth-flash.is-ok { background: #edfaef; color: #0a5f19; }
.thl-auth-flash.is-info { background: #fff5e6; color: #8a5200; }
.thl-auth-flash a { color: inherit; font-weight: 800; }

.thl-auth-form { text-align: left; }

.thl-auth-form label {
    display: block;
    margin: 14px 0 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--thl-muted);
}

.thl-auth-form input[type="text"],
.thl-auth-form input[type="email"],
.thl-auth-form input[type="tel"],
.thl-auth-form input[type="password"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(17, 17, 17, .12);
    background: #faf8f5;
    font-size: 15px;
    color: var(--thl-text);
    box-shadow: none;
}

.thl-auth-form input:focus {
    outline: none;
    border-color: var(--thl-main);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--thl-main) 15%, #fff);
}

.thl-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.thl-auth-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--thl-text) !important;
    line-height: 1.5;
}

.thl-auth-check input { margin-top: 3px; accent-color: var(--thl-main); }
.thl-auth-check a { color: var(--thl-main); font-weight: 800; }

.thl-auth-hint {
    display: block;
    margin: 8px 0 0;
    color: var(--thl-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.thl-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 18px;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(17, 17, 17, .12);
    background: #fff;
    color: var(--thl-text);
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.thl-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(20, 20, 20, .08); }

.thl-auth-btn--primary {
    width: 100%;
    background: var(--thl-main);
    border-color: var(--thl-main);
    color: #fff;
}

.thl-auth-btn--primary:hover { filter: brightness(.95); }
.thl-auth-btn--small { min-height: 40px; padding: 8px 14px; font-size: 13px; margin-top: 0; width: auto; }
.thl-auth-btn--ghost { background: transparent; }

.thl-auth-links {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--thl-muted);
}

.thl-auth-links a { color: var(--thl-text); font-weight: 800; text-decoration: none; }
.thl-auth-links a:hover { color: var(--thl-main); }
.thl-auth-links span { margin: 0 8px; }

.thl-auth-support {
    margin: 26px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--thl-muted);
}

.thl-auth-support a { color: var(--thl-text); font-weight: 700; }

.thl-auth-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Planes */
.thl-auth-program-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #faf8f5;
}

.thl-auth-program-head img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; }
.thl-auth-program-head b { display: block; font-size: 17px; font-weight: 900; }
.thl-auth-program-head p { margin: 4px 0 0; color: var(--thl-muted); font-size: 13.5px; line-height: 1.5; }

.thl-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.thl-auth-form label.thl-plan {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--thl-text);
}
.thl-plan input { position: absolute; opacity: 0; inset: 0; }

.thl-plan-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 18px 16px;
    border-radius: 16px;
    border: 2px solid rgba(17, 17, 17, .1);
    background: #fff;
    transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.thl-plan.is-highlight .thl-plan-body { background: #faf8f5; }
.thl-plan:hover .thl-plan-body { transform: translateY(-2px); }
.thl-plan input:checked + .thl-plan-body { border-color: var(--thl-main); box-shadow: 0 0 0 3px color-mix(in srgb, var(--thl-main) 15%, #fff); }
.thl-plan input:focus-visible + .thl-plan-body { outline: 2px solid var(--thl-main); outline-offset: 2px; }

.thl-plan-badge {
    align-self: flex-start;
    margin-bottom: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--thl-main);
    color: #fff;
    font-size: 10.5px;
    font-weight: 900;
    font-style: normal;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.thl-plan-body b { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--thl-muted); }
.thl-plan-body strong { font-size: 24px; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.thl-plan-body small { font-size: 12.5px; color: var(--thl-muted); font-weight: 600; }
.thl-plan-body em { margin-top: 6px; font-size: 12px; font-style: normal; line-height: 1.45; color: var(--thl-muted); }

.thl-auth-programs { display: grid; gap: 10px; }

.thl-auth-program {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(17, 17, 17, .1);
    background: #fff;
    color: var(--thl-text);
    text-decoration: none;
    font-weight: 800;
}

.thl-auth-program:hover { border-color: var(--thl-main); }
.thl-auth-program span { font-size: 13px; color: var(--thl-main); }

/* Mi cuenta */
.thl-auth-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: -6px 0 18px;
    font-size: 13.5px;
}

.thl-auth-nav a { color: var(--thl-muted); font-weight: 700; text-decoration: none; }
.thl-auth-nav a:hover { color: var(--thl-text); }

.thl-auth-h2 {
    margin: 26px 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--thl-muted);
}

.thl-sub-card {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(17, 17, 17, .1);
    border-left: 5px solid var(--thl-main);
    background: #fff;
    margin-bottom: 12px;
}

.thl-sub-card.is-off { border-left-color: #c9c2b8; }

.thl-sub-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.thl-sub-card header b { display: block; font-size: 17px; font-weight: 900; }
.thl-sub-card header small { color: var(--thl-muted); font-size: 13px; font-weight: 600; }

.thl-sub-status {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edfaef;
    color: #0a5f19;
    font-size: 11px;
    font-weight: 900;
    font-style: normal;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.thl-sub-card.is-off .thl-sub-status { background: #f1ede7; color: var(--thl-muted); }

.thl-sub-facts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--thl-muted); }
.thl-sub-facts b { color: var(--thl-text); }
.thl-sub-facts .is-warn { flex-basis: 100%; color: #8a2424; font-weight: 700; }

.thl-sub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.thl-sub-actions form { margin: 0; }

@media (max-width: 640px) {
    .thl-auth-card { padding: 26px 20px; border-radius: 18px; }
    .thl-auth-card h1 { font-size: 24px; }
    .thl-auth-row { grid-template-columns: 1fr; gap: 0; }
    .thl-plan-grid { grid-template-columns: 1fr; }
    .thl-sub-card header { flex-direction: column; }
}

.thl-auth-confirm {
    margin: 0 0 22px;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--thl-main) 45%, transparent);
    background: color-mix(in srgb, var(--thl-main) 6%, #fff);
}

.thl-auth-confirm h2 {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.2;
}

.thl-auth-confirm ul {
    margin: 0 0 16px;
    padding-left: 18px;
    color: #333;
    font-size: 14px;
    line-height: 1.55;
}

.thl-auth-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.thl-auth-confirm-actions form { margin: 0; }
.thl-auth-confirm-actions .thl-auth-btn { width: auto; }

.thl-sub-switch {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed rgba(17, 17, 17, .12);
    font-size: 13px;
}

.thl-sub-switch label { color: #444; font-weight: 700; }

.thl-sub-switch select {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(17, 17, 17, .16);
    background: #fff;
    font: inherit;
    font-size: 13px;
}

.thl-auth-avatar {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 22px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(17, 17, 17, .08);
}

.thl-auth-avatar-img {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    overflow: hidden;
    background: #f3f0eb;
    border: 3px solid #fff;
    box-shadow: 0 10px 24px rgba(17, 17, 17, .12);
}

.thl-auth-avatar-img img { display: block; width: 100%; height: 100%; object-fit: cover; }

.thl-auth-avatar-body { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.thl-auth-avatar-body b { flex-basis: 100%; font-size: 15px; }
.thl-auth-avatar-body p { flex-basis: 100%; margin: 0 0 4px; color: #666; font-size: 13px; }
.thl-auth-avatar-body form { margin: 0; }

.thl-auth-file { position: relative; overflow: hidden; cursor: pointer; }
.thl-auth-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

@media (max-width: 560px) {
    .thl-auth-avatar { flex-direction: column; align-items: flex-start; }
}

/* Elección de forma de pago */
.thl-pay-choice { margin: 6px 0 10px; }
.thl-pay-summary {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    margin: 0 0 14px; padding: 12px 16px; border-radius: 12px;
    background: #f7f4ef; font-size: 14px; color: #333;
}
.thl-pay-summary a { margin-left: auto; color: var(--thl-main, #e84d2a); font-weight: 700; text-decoration: none; }
.thl-pay-choice h2 { margin: 0 0 14px; font-size: 20px; }
.thl-pay-methods { display: grid; gap: 12px; }
.thl-pay-method { margin: 0; }
.thl-pay-method button {
    display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
    padding: 16px 18px; border-radius: 16px; border: 2px solid rgba(17, 17, 17, .1);
    background: #fff; cursor: pointer; font: inherit; color: #111;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.thl-pay-method button:hover { border-color: var(--thl-main, #e84d2a); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(17, 17, 17, .08); }
.thl-pay-logo {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    font-weight: 900; letter-spacing: .02em; color: #fff; font-size: 15px;
}
.thl-pay-method--mercadopago .thl-pay-logo { background: #009ee3; }
.thl-pay-method--paypal .thl-pay-logo { background: #003087; }
.thl-pay-body { display: grid; gap: 2px; min-width: 0; }
.thl-pay-body b { font-size: 16px; }
.thl-pay-body strong { font-size: 18px; color: var(--thl-main, #e84d2a); }
.thl-pay-body strong small { font-size: 12px; font-weight: 600; color: #666; }
.thl-pay-body > small { font-size: 12.5px; color: #666; line-height: 1.4; }

/* Motivo de baja */
.thl-auth-confirm-form { margin: 14px 0 0; display: grid; gap: 8px; }
.thl-auth-confirm-form label { font-size: 13px; font-weight: 700; color: #444; }
.thl-auth-confirm-form select, .thl-auth-confirm-form textarea {
    width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(17, 17, 17, .14); background: #fff; font: inherit; font-size: 14px;
}
.thl-auth-confirm-form .thl-auth-confirm-actions { margin-top: 6px; }

/* Cambio de plan / forma de pago (online) */
.thl-sub-switch--online { flex-wrap: wrap; }
.thl-sub-switch--online > b { flex-basis: 100%; font-size: 14px; }
.thl-sub-switch-methods { display: flex; flex-wrap: wrap; gap: 6px 14px; flex-basis: 100%; font-size: 13px; }
.thl-sub-switch-methods label { font-weight: 600; color: #333; display: inline-flex; align-items: center; gap: 6px; }
.thl-sub-switch--online > small { flex-basis: 100%; color: #666; font-size: 12px; line-height: 1.45; }
