/* ==========================================================================
   Auth (login / register) — tema "Deportivo Oscuro"
   Sistema de apartado de canchas sintéticas
   ========================================================================== */

:root {
    --auth-bg-start: #0F172A;
    --auth-bg-end: #111C33;
    --auth-surface: #1E293B;
    --auth-surface-border: #2E3D52;
    --auth-primary: #22C55E;
    --auth-primary-hover: #16A34A;
    --auth-primary-soft: rgba(34, 197, 94, 0.12);
    --auth-text: #F1F5F9;
    --auth-text-muted: #94A3B8;
    --auth-error: #EF4444;
    --auth-error-soft: rgba(239, 68, 68, 0.12);
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--auth-surface-border) var(--auth-bg-start);
}

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background: var(--auth-bg-start);
}

::-webkit-scrollbar-thumb {
    background: var(--auth-surface-border);
    border-radius: 999px;
    border: 2px solid var(--auth-bg-start);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--auth-primary);
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at 15% 10%, rgba(34, 197, 94, 0.16), transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(34, 197, 94, 0.10), transparent 40%),
        linear-gradient(180deg, var(--auth-bg-start) 0%, var(--auth-bg-end) 100%);
    font-family: 'Figtree', ui-sans-serif, system-ui, sans-serif;
    color: var(--auth-text);
}

/* Marca / encabezado */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    text-decoration: none;
}

.auth-brand__icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    color: var(--auth-primary);
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.45));
}

.auth-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.auth-brand__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--auth-text);
    letter-spacing: 0.01em;
}

.auth-brand__tagline {
    font-size: 0.72rem;
    color: var(--auth-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Tarjeta */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-surface-border);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 20px 45px -20px rgba(0, 0, 0, 0.55);
}

.auth-card__header {
    margin-bottom: 1.5rem;
}

.auth-card__title {
    margin: 0 0 0.25rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--auth-text);
}

.auth-card__subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

/* Campos */
.auth-page label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    margin-top: 10px;
}

.auth-page input[type="text"],
.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page input[type="number"],
.auth-page input[type="tel"],
.auth-page select {
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 0.875rem;
    background: #16202F;
    border: 1px solid var(--auth-surface-border);
    border-radius: 10px;
    color: var(--auth-text);
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: normal;
    vertical-align: middle;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.auth-page select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.auth-page select:invalid,
.auth-page select option[value=""] {
    color: #5C6B80;
}

.auth-page input::placeholder {
    color: #5C6B80;
}

.auth-page input[type="text"]:focus,
.auth-page input[type="email"]:focus,
.auth-page input[type="password"]:focus,
.auth-page input[type="number"]:focus,
.auth-page input[type="tel"]:focus,
.auth-page select:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-soft);
    background: #182234;
}

.auth-page select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394A3B8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.25rem;
}

/* Password con botón mostrar/ocultar */
.auth-password-field {
    position: relative;
}

.auth-password-field input {
    padding-right: 2.75rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--auth-text-muted);
    display: flex;
    align-items: center;
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
}

.auth-password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Errores / estados */
.auth-page ul[class*="text-red"],
.auth-error-list {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    font-size: 0.8125rem;
    color: var(--auth-error);
}

.auth-status {
    background: var(--auth-primary-soft);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86EFAC;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

/* Remember me */
.auth-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.auth-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
    background: #16202F;
}

.auth-checkbox-row label {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    font-weight: 400;
}

/* Botón principal */
.auth-page button[type="submit"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, var(--auth-primary) 0%, var(--auth-primary-hover) 100%);
    border: none;
    border-radius: 10px;
    color: #06210F;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .15s ease, filter .15s ease;
    box-shadow: 0 8px 20px -8px rgba(34, 197, 94, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-page button[type="submit"]:hover {
    filter: brightness(1.06);
}

.auth-page button[type="submit"]:active {
    transform: translateY(1px);
}

.auth-page button[type="submit"]:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 2px;
}

/* Enlaces */
.auth-page a {
    color: var(--auth-text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color .15s ease;
}

.auth-page a:hover {
    color: var(--auth-primary);
}

.auth-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-footer-row .auth-submit-wrap {
    flex-shrink: 0;
    min-width: 140px;
}

/* Grid para formularios con varios campos (registro) */
.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

@media (max-width: 480px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }
}

.auth-field {
    margin-top: 1rem;
}

.auth-field:first-child {
    margin-top: 16px;
}

/* ==========================================================================
   Wizard (registro por pasos)
   ========================================================================== */

.wizard-steps-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.wizard-step-dot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-step-dot__num {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: #16202F;
    border: 1px solid var(--auth-surface-border);
    color: var(--auth-text-muted);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.wizard-step-dot__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    white-space: nowrap;
}

.wizard-step-dot.is-active .wizard-step-dot__num {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    color: #06210F;
}

.wizard-step-dot.is-active .wizard-step-dot__label,
.wizard-step-dot.is-done .wizard-step-dot__label {
    color: var(--auth-text);
}

.wizard-step-dot.is-done .wizard-step-dot__num {
    background: var(--auth-primary-soft);
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}

.wizard-step-line {
    flex: 1;
    height: 1px;
    background: var(--auth-surface-border);
    margin: 0 0.75rem;
}

.wizard-step {
    display: none;
}

.wizard-step.is-active {
    display: block;
}

.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.75rem;
}

.wizard-actions--end {
    justify-content: flex-end;
}

.wizard-actions button[type="button"].wizard-next,
.wizard-actions button[type="submit"] {
    width: auto;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(180deg, var(--auth-primary) 0%, var(--auth-primary-hover) 100%);
    border: none;
    border-radius: 10px;
    color: #06210F;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(34, 197, 94, 0.55);
    transition: filter .15s ease, transform .1s ease;
}

.wizard-actions button:hover {
    filter: brightness(1.06);
}

.wizard-actions button:active {
    transform: translateY(1px);
}

.wizard-actions .wizard-back {
    padding: 0.7rem 1.25rem;
    background: transparent;
    border: 1px solid var(--auth-surface-border);
    border-radius: 10px;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.wizard-back:hover {
    border-color: var(--auth-primary);
    color: var(--auth-text);
}

.auth-secondary-link {
    text-align: center;
    margin: 1.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
}

.auth-secondary-link a {
    color: var(--auth-primary);
    font-weight: 600;
    margin-left: 0.25rem;
}

@media (max-width: 480px) {
    .wizard-step-dot__label {
        display: none;
    }
}
