/*
 * Acabado visual compartido de las pantallas de acceso
 * (login, verificación de código y registro de correo).
 * Se carga después de los estilos propios de cada página: solo ajusta
 * colores, bordes y sombras; no cambia estructura, tamaños ni lógica.
 */

:root {
    --auth-page-bg: #f7f5f2;
    --auth-page-glow: rgba(249, 118, 24, 0.16);
    --auth-card-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 30px 80px -28px rgba(28, 25, 23, 0.3);
    --auth-ring: 0 0 0 3px rgba(249, 118, 24, 0.18);
    --auth-heading: #1c1917;
    --card-bg: #ffffff;
    --text-main: #292524;
    --text-sub: #78716c;
    --border-color: #e7e2dc;
    --input-bg: #ffffff;
    --sede-hover: #fdf8f4;
    --sede-selected-bg: #fff4ec;
    --btn-cambiar-bg: #f4f1ed;
}

[data-theme="dark"] {
    --auth-page-bg: #0f0f11;
    --auth-page-glow: rgba(249, 118, 24, 0.12);
    --auth-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 80px -24px rgba(0, 0, 0, 0.75);
    --auth-ring: 0 0 0 3px rgba(249, 118, 24, 0.28);
    --auth-heading: #f5f5f4;
    --card-bg: #18181b;
    --text-main: #f5f5f4;
    --text-sub: #a8a29e;
    --border-color: #2e2e33;
    --input-bg: #111113;
    --sede-hover: #202024;
    --sede-selected-bg: rgba(249, 118, 24, 0.14);
    --btn-cambiar-bg: #26262b;
}

body {
    background:
        radial-gradient(1100px 520px at 50% -8%, var(--auth-page-glow), transparent 62%),
        var(--auth-page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-card,
.verify-card,
.setup-card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--auth-card-shadow);
}

h1 {
    color: var(--auth-heading);
    font-weight: 750;
    letter-spacing: -0.015em;
}

/* Marca "ECONOTEC" del login. */
.login-card h1 {
    letter-spacing: 0.06em;
}

.logo-img {
    padding: 0;
    box-shadow:
        0 0 0 5px var(--card-bg),
        0 0 0 6px var(--border-color),
        0 16px 34px -14px rgba(28, 25, 23, 0.55);
}

/* Campos */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"] {
    border-width: 1px;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
    border-color: #f97618;
    box-shadow: var(--auth-ring);
}

.captcha-question {
    border-width: 1px;
    border-color: rgba(249, 118, 24, 0.28);
    border-radius: 10px;
    font-weight: 700;
}

.email-pill {
    border-width: 1px;
    border-color: rgba(249, 118, 24, 0.26);
    border-radius: 10px;
    font-weight: 600;
}

/* Selector de sede */
.sede-card {
    border-width: 1px;
    border-radius: 14px;
}

.sede-card.selected {
    box-shadow: var(--auth-ring);
}

/* Botones */
button.primary,
.primary {
    border-radius: 10px;
    background: #f97618;
    font-weight: 650;
    box-shadow: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

button.primary:hover,
.primary:hover {
    background: #ea670f;
    transform: none;
    box-shadow: none;
}

button.primary:focus-visible,
.primary:focus-visible {
    outline: none;
    box-shadow: var(--auth-ring);
}

button.primary:disabled,
.primary:disabled {
    background: #d6d3d1;
    color: #ffffff;
}

[data-theme="dark"] button.primary:disabled,
[data-theme="dark"] .primary:disabled {
    background: #3a3a40;
    color: #a8a29e;
}

.modal-actions .btn-confirmar,
.confirm-actions .confirm-submit {
    background: #f97618;
    border-radius: 10px;
}

.modal-actions .btn-confirmar:hover,
.confirm-actions .confirm-submit:hover {
    background: #ea670f;
    transform: none;
    box-shadow: none;
}

.modal-actions .btn-cambiar {
    border-width: 1px;
    border-radius: 10px;
}

.modal-card,
.confirm-card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--auth-card-shadow);
}

.modal-card h2,
.confirm-card h2 {
    color: var(--auth-heading);
    letter-spacing: -0.01em;
}

.error,
.message {
    border-radius: 10px;
}

/* Pie y selector de tema */
.footer-link,
.theme-toggle-btn {
    border-width: 1px;
}

.footer-link:hover {
    transform: none;
    box-shadow: none;
}

@media (max-width: 520px) {
    .login-card,
    .verify-card,
    .setup-card,
    .modal-card,
    .confirm-card {
        border-radius: 16px;
    }
}

/* Graphite identity across all authentication steps. */
:root {
    --auth-page-bg: #182425;
    --card-bg: #f0f2ee;
    --input-bg: #fafbf8;
    --border-color: #ccd5cd;
    --text-main: #263630;
    --text-sub: #5c6d64;
    --auth-heading: #21332b;
}
[data-theme="dark"] {
    --auth-page-bg: #101a1b;
    --card-bg: #1e2c2d;
    --input-bg: #152223;
    --border-color: #3b504b;
    --text-main: #edf3ed;
    --text-sub: #b0c2b8;
    --auth-heading: #edf3ed;
}
body { background: radial-gradient(ellipse at 0 0, #365149 0, transparent 65%), var(--auth-page-bg); }
.auth-login { gap: clamp(36px, 7vw, 110px); padding: 40px 6vw; }
.auth-story { color: #eef4ef; width: min(510px, 45%); align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; padding: 25px 0; }
.auth-wordmark { font-size: 21px; font-weight: 800; letter-spacing: .15em; }
.auth-wordmark span { display: block; font-size: 9px; letter-spacing: .22em; color: #b4c4ba; margin-top: 10px; }
.auth-story-copy { padding: 65px 0; }
.auth-eyebrow { color: #fba46b; font-size: 10px; letter-spacing: .18em; font-weight: 700; }
.auth-story h2 { font-size: clamp(34px, 3.7vw, 55px); line-height: 1.12; letter-spacing: -.045em; margin: 24px 0; font-weight: 650; }
.auth-story h2 em { color: #ff984f; font-style: normal; }
.auth-story p { font-size: 15px; line-height: 1.8; max-width: 380px; color: #baccc1; }
.auth-capabilities { display: grid; gap: 16px; margin-top: 34px; color: #dce6df; font-size: 12px; }
.auth-capabilities span { padding-bottom: 16px; border-bottom: 1px solid #ffffff16; }
.auth-story-footer { font-size: 10px; letter-spacing: .16em; color: #b4c4ba; }
.auth-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f97618; margin-right: 8px; }
.auth-login .login-card { margin: 0; flex-shrink: 0; border-radius: 24px; border-top: 3px solid #f97618; padding: 28px 34px; box-shadow: 0 28px 70px #07100d55; }
.auth-login .logo-img { width: 78px; height: 78px; }
.auth-login .login-card h1 { font-size: 21px; }
.auth-login .sub { line-height: 1.6; }
button.primary, .primary, .modal-actions .btn-confirmar { color: #251c14; font-weight: 750; }
button.primary:disabled, .primary:disabled { background: #d2d9d3; color: #5e6e62; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #e86c16; outline-offset: 3px; }
@media (max-width: 850px) {
    .auth-login { flex-direction: column; padding: 24px 16px; gap: 22px; }
    .auth-story { width: 100%; max-width: 460px; align-self: center; padding: 0; }
    .auth-wordmark { font-size: 16px; }
    .auth-wordmark span { font-size: 8px; }
    .auth-story-copy, .auth-story-footer { display: none; }
    .auth-login .login-card { padding: 26px 24px; }
}
