/* ============================================================
   AURA Auth Login — CSS autosuficiente (sin Tailwind CDN)
   Pensado para Microsoft Edge / Tracking Prevention.
   ============================================================ */

.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--background, #F8FAFC);
    color: var(--text-main, #0F172A);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.auth-pane {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1.5rem;
    background: var(--surface, #fff);
}

@media (min-width: 1024px) {
    .auth-pane {
        width: 50%;
        padding: 2rem 5rem;
    }
}

@media (min-width: 1280px) {
    .auth-pane { padding-left: 8rem; padding-right: 8rem; }
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-brand__mark {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: #FFEDD5;
    color: var(--primary, #FF7A20);
}

.auth-brand__name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main, #0F172A);
}

.auth-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 0;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    align-self: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-divider {
    position: relative;
    text-align: center;
}
.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid var(--border, #E2E8F0);
}
.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 0.75rem;
    background: var(--surface, #fff);
    color: var(--text-muted, #64748B);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-field label,
.auth-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main, #0F172A);
}

.auth-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.auth-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary, #FF7A20);
    text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

.auth-field-icon {
    position: relative;
}

.auth-field-icon__glyph {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #64748B);
    pointer-events: none;
    z-index: 1;
}

.auth-page input[type="text"],
.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page .auth-input {
    display: block;
    width: 100%;
    height: 3.5rem;
    box-sizing: border-box;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 0.75rem;
    background: var(--background, #F8FAFC);
    color: var(--text-main, #0F172A);
    font: inherit;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.auth-page .auth-input {
    padding-left: 2.75rem !important;
    padding-right: 1rem !important;
}

.auth-page .auth-input--password {
    padding-right: 3rem !important;
}

.auth-page input:focus,
.auth-page .auth-input:focus {
    border-color: var(--primary, #FF7A20) !important;
    box-shadow: 0 0 0 3px rgba(255, 122, 32, 0.18) !important;
}

.auth-toggle-pass {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-muted, #64748B);
    cursor: pointer;
}
.auth-toggle-pass:hover {
    color: var(--text-main, #0F172A);
    background: var(--surface-container, #F1F5F9);
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    width: fit-content;
}
.auth-check input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--primary, #FF7A20);
}
.auth-check span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #64748B);
}

.auth-error {
    display: none;
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
}
.auth-error.is-visible,
.auth-error:not(.hidden) {
    display: block;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3.5rem;
    border: 0;
    border-radius: 0.75rem;
    background: var(--primary, #FF7A20);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 122, 32, 0.22);
}
.auth-btn:hover { background: var(--primary-hover, #E96A10); }
.auth-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.auth-btn--ghost {
    width: auto;
    height: 3rem;
    padding: 0 1.25rem;
    background: transparent;
    color: var(--text-main, #0F172A);
    border: 1px solid var(--border, #E2E8F0);
    box-shadow: none;
}
.auth-btn--ghost:hover {
    background: var(--surface-container, #F1F5F9);
}
.auth-btn--secondary {
    height: 3rem;
    background: var(--primary, #FF7A20);
}

.auth-provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 3rem;
    height: 3rem;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 0.75rem;
    background: var(--background, #F8FAFC);
    color: var(--text-main, #0F172A);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.auth-provider-btn:hover {
    background: var(--surface-container, #F1F5F9);
}
.auth-provider-btn svg { flex-shrink: 0; }

.auth-sso-soon {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    border: 1px dashed var(--border, #E2E8F0);
    border-radius: 0.75rem;
    background: transparent;
    color: var(--text-muted, #64748B);
    font: inherit;
    font-weight: 600;
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-providers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .auth-providers-grid--2 {
        grid-template-columns: 1fr 1fr;
    }
}

.auth-hint {
    display: none;
    font-size: 0.75rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}
.auth-hint:not(.hidden) { display: block; }

.auth-foot {
    font-size: 0.875rem;
    color: var(--text-muted, #64748B);
    text-align: right;
}
@media (max-width: 639px) {
    .auth-foot { display: none; }
}

.auth-hero {
    display: none;
    position: relative;
    overflow: hidden;
    background: #0f172a;
    color: #fff;
    min-height: 100vh;
}
@media (min-width: 1024px) {
    .auth-hero {
        display: flex;
        width: 50%;
    }
}
.auth-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 20% 15%, rgba(255, 122, 32, 0.55), transparent 60%),
        radial-gradient(ellipse 55% 45% at 85% 75%, rgba(255, 122, 32, 0.22), transparent 55%),
        linear-gradient(155deg, #0f172a 0%, #1e293b 48%, #0b1220 100%);
}
.auth-hero__glow {
    position: absolute;
    right: -10%;
    bottom: -20%;
    width: 70%;
    height: 55%;
    background: radial-gradient(circle, rgba(255, 122, 32, 0.28), transparent 70%);
    pointer-events: none;
}
.auth-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    height: 100%;
    width: 100%;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
}
@media (min-width: 1280px) {
    .auth-hero__inner { padding: 5rem; }
}
.auth-hero__brand {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}
.auth-hero__card {
    max-width: 32rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    padding: 2rem;
    color: #fff;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}
.auth-hero__card p:first-child {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}
.auth-hero__card p:last-child {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    opacity: 0.85;
}

/* Tabs / progress already in aura-components; reinforce visibility */
.auth-page .auth-tabs { margin-bottom: 1.5rem; }
.auth-page .hidden { display: none !important; }
.auth-page [hidden] { display: none !important; }

.auth-step-actions {
    display: flex;
    gap: 0.75rem;
}
.auth-step-actions .auth-btn--secondary,
.auth-step-actions .auth-btn {
    flex: 1;
    height: 3rem;
}

.auth-summary {
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 0.75rem;
    background: var(--background, #F8FAFC);
    padding: 1rem;
    font-size: 0.875rem;
}
.auth-summary p { margin: 0 0 0.35rem; }

.auth-mfa-code {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.35em;
}

#register-app .auth-field input,
#tab-panel-register input[type="text"],
#tab-panel-register input[type="email"],
#tab-panel-register input[type="password"] {
    height: 3rem;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}
