/**
 * Pantalla de acceso [datos_studio_panel] sin sesión: cubre viewport y reduce ruido del tema.
 */

body.ds-auth-gateway-active {
    overflow-x: hidden;
}

/* Ocultar barras laterales comunes (ajustar según tema si hiciera falta) */
body.ds-auth-gateway-active #secondary,
body.ds-auth-gateway-active .sidebar,
body.ds-auth-gateway-active #sidebar,
body.ds-auth-gateway-active aside.widget-area,
body.ds-auth-gateway-active .widget-area {
    display: none !important;
}

body.ds-auth-gateway-active #page,
body.ds-auth-gateway-active .site,
body.ds-auth-gateway-active .site-content,
body.ds-auth-gateway-active #content,
body.ds-auth-gateway-active .content-area,
body.ds-auth-gateway-active main {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
}

.ds-auth-gateway-root {
    --ds-accent: var(--color-primary, #f97316);
    --ds-bg: #0b0d12;
    --ds-card: rgba(255, 255, 255, 0.06);
    --ds-card-border: rgba(255, 255, 255, 0.10);
    --ds-text: rgba(255, 255, 255, 0.86);
    --ds-muted: rgba(255, 255, 255, 0.60);

    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    box-sizing: border-box;
    background:
        radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, var(--ds-accent) 18%, transparent), transparent 60%),
        radial-gradient(1100px 560px at 50% 110%, rgba(99, 102, 241, 0.10), transparent 60%),
        linear-gradient(165deg, #0f1117 0%, #07080c 100%);
    color: var(--ds-text);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

.ds-auth-gateway-inner {
    width: min(960px, 100%);
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 2.5vw, 28px);
}

.ds-auth-hero {
    width: min(860px, 100%);
    text-align: center;
    padding-top: clamp(8px, 1vw, 14px);
}

.ds-auth-kicker {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 16px;
    color: var(--color-primary) !important;
    font-weight: 600;
    text-shadow: 0 0 20px color-mix(in srgb, var(--color-primary) 22%, transparent);
    animation: daHintFade 0.9s ease both;
}

.ds-auth-title {
    margin: 0 0 14px;
    font-size: clamp(36px, 5.2vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    font-weight: 500;
    color: #fff;
    text-wrap: balance;
}

.ds-auth-accent {
    font-style: normal;
    background: linear-gradient(120deg, var(--ds-accent), color-mix(in srgb, var(--ds-accent) 55%, #fff));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ds-auth-subtitle {
    margin: 0;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.7;
}

.ds-auth-card {
    width: min(560px, 100%);
    border-radius: 22px;
    border: 1px solid var(--ds-card-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.04));
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
    padding: 22px 20px 18px;
}

.ds-auth-gateway-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ds-auth-tab {
    flex: 1;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    background: transparent;
    transition: background 0.15s, color 0.15s;
}

.ds-auth-tab.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ds-auth-gateway-panels {
    position: relative;
}

.ds-auth-panel {
    display: none;
}

.ds-auth-panel.is-active {
    display: block;
}

.ds-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ds-auth-heading {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
}

.ds-auth-step-title {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
}

.ds-auth-hint {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
}

.ds-auth-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
}

.ds-auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.30);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ds-auth-input:focus {
    border-color: color-mix(in srgb, var(--ds-accent) 65%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-accent) 18%, transparent);
}

/* Selector de plan (evita <select> nativo con fondo blanco del SO) */
.ds-auth-plan-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.ds-auth-plan-option {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.ds-auth-plan-option:hover {
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.ds-auth-plan-option.is-active {
    border-color: rgba(99, 102, 241, 0.75);
    background: rgba(99, 102, 241, 0.28);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.ds-auth-plan-option:focus-visible {
    outline: 2px solid rgba(249, 115, 22, 0.85);
    outline-offset: 2px;
}

.ds-auth-plan-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 28%, transparent);
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.ds-auth-plan-badge__label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
}

.ds-auth-plan-badge__value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary) !important;
}

.ds-auth-plan-hint {
    margin: -0.35rem 0 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.5);
}

.ds-auth-alert--dev {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}

.ds-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.ds-auth-check input {
    width: 16px;
    height: 16px;
}

.ds-auth-btn {
    margin-top: 8px;
    padding: 12px 18px;
    border-radius: 10px;
    border: 0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.ds-auth-btn:active {
    transform: scale(0.99);
}

.ds-auth-btn--primary {
    background: linear-gradient(135deg, var(--ds-accent), color-mix(in srgb, var(--ds-accent) 75%, #000));
    color: #0a0a0a;
}

.ds-auth-btn--primary:hover {
    opacity: 0.95;
}

.ds-auth-btn--ghost {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ds-auth-link,
.ds-auth-back {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.ds-auth-link:hover,
.ds-auth-back:hover {
    color: #fff;
    text-decoration: underline;
}

.ds-auth-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.ds-auth-step-actions .ds-auth-btn {
    flex: 1 1 auto;
    min-width: 120px;
    margin-top: 0;
}

.ds-auth-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.ds-auth-alert--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.ds-auth-note {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
}

.ds-auth-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .ds-auth-row2 {
        grid-template-columns: 1fr;
    }
}

.ds-auth-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ds-auth-gateway-footer {
    margin-top: auto;
    padding-top: 8px;
    text-align: center;
}

.ds-auth-gateway-footer p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}

.ds-auth-gateway-footer[aria-hidden="true"] {
    display: none;
}

.ds-auth-gateway-footer[aria-hidden="true"] p {
    display: none;
}

.ds-auth-gateway-footer:empty {
    display: none;
}

@keyframes daHintFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 0.9; transform: translateY(0); }
}

.ds-auth-step[hidden] {
    display: none !important;
}

/* Registro en un solo paso */
.ds-auth-register-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ds-auth-register-form .ds-auth-heading {
    margin: 0 0 0.25rem;
}

.ds-auth-register-form .ds-auth-hint {
    margin-bottom: 0.75rem;
}

.ds-auth-register-form .ds-auth-btn--primary {
    margin-top: 1rem;
}
