/* ============================================================
   Arkoder — Páginas de autenticación (acceso, registro, recuperar)
   Sistema de diseño coherente con css/landing.css: dark +
   gradiente esmeralda, glassmorphism.
   ============================================================ */

:root {
    --bg: #05060b;
    --bg-2: #0a0d17;
    --surface: #0d1120;
    --surface-2: #121731;
    --line: rgba(148, 163, 184, .13);
    --line-strong: rgba(148, 163, 184, .26);
    --text: #e6eaf2;
    --muted: #8f99b0;
    --muted-2: #5d677e;
    --green-deep: #0f241b;
    --green-hover: #153a2e;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --grad: linear-gradient(100deg, #059669 0%, #10b981 45%, #34d399 100%);
    --red: #f87171;
    --amber: #fbbf24;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-head: 'Space Grotesk', 'Inter', sans-serif;
    --radius: 16px;
    --nav-h: 72px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Fondo decorativo sutil */
    background-image:
        radial-gradient(1200px 600px at 80% -10%, rgba(16, 185, 129, .12), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(16, 185, 129, .08), transparent 60%);
    background-attachment: fixed
}

a {
    color: var(--emerald-400);
    text-decoration: none
}

a:hover {
    color: var(--emerald-500)
}

/* ----------------------------------------------------------
   Navegación superior simple
   ---------------------------------------------------------- */
.auth-nav {
    position: relative;
    z-index: 20;
    background: rgba(5, 6, 11, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    height: var(--nav-h);
}

.container {
    width: 100%;
    max-width: var(--maxw, 1180px);
    margin: 0 auto;
    padding: 0 24px
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h)
}

.auth-nav .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: var(--font-head)
}

.auth-nav .brand img {
    display: block
}

.auth-brand-nombre {
    font-size: 1.15rem;
    letter-spacing: .2px
}

.auth-nav-derecha {
    display: flex;
    align-items: center;
    gap: 18px
}

/* Selector de idioma reutilizado de landing */
.nav-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted-2)
}

.nav-lang a {
    color: var(--muted);
    letter-spacing: .4px;
    padding: 2px
}

.nav-lang a:hover {
    color: var(--text)
}

.nav-lang a.on {
    color: var(--emerald-400)
}

.nav-lang .sep {
    opacity: .5
}

/* Botón de volver */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: .92rem;
    border-radius: 999px;
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s ease;
    line-height: 1.2;
    text-decoration: none
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text)
}

.btn-ghost:hover {
    border-color: var(--emerald-500);
    color: var(--emerald-400)
}

.btn-primary {
    background: var(--grad);
    color: #04110c;
    font-weight: 700;
    box-shadow: 0 8px 24px -10px rgba(16, 185, 129, .55)
}

.btn-primary:hover {
    filter: brightness(1.06);
    color: #04110c;
    transform: translateY(-1px)
}

/* ----------------------------------------------------------
   Contenedor central (tarjeta)
   ---------------------------------------------------------- */
.auth-wrap {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 24px 80px
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 36px 34px;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7)
}

.auth-card-wide {
    max-width: 560px
}

.auth-card-head {
    text-align: center;
    margin-bottom: 30px
}

.auth-card-head .auth-logo {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px -8px rgba(16, 185, 129, .6)
}

.auth-card-head h1 {
    font-family: var(--font-head);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.2px
}

.auth-card-head p {
    color: var(--muted);
    margin-top: 8px;
    font-size: .95rem
}

/* ----------------------------------------------------------
   Formularios
   ---------------------------------------------------------- */
.campo {
    margin-bottom: 18px
}

.campo label {
    display: block;
    font-size: .84rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text)
}

.campo .req {
    color: var(--emerald-400)
}

.input-wrap {
    position: relative
}

.campo input[type="text"],
.campo input[type="email"],
.campo input[type="password"],
.campo select,
.campo input:not([type]) {
    width: 100%;
    padding: 12px 14px;
    background: rgba(10, 13, 23, .6);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--text);
    font-size: .95rem;
    font-family: var(--font-body);
    transition: border-color .2s, box-shadow .2s
}

.campo input:focus,
.campo select:focus {
    outline: none;
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .18)
}

.campo input::placeholder {
    color: var(--muted-2)
}

.campo select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f99b0' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center
}

.campo input.error,
.campo select.error {
    border-color: var(--red)
}

.fila-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

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

/* Texto de ayuda bajo un campo */
.campo-ayuda {
    display: block;
    color: var(--muted-2);
    font-size: .78rem;
    margin-top: 6px
}

/* Resumen (p. ej. el email elegido en el paso 2 del registro) */
.resumen-cuenta {
    background: rgba(10, 13, 23, .5);
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .88rem;
    color: var(--muted);
    margin-bottom: 20px;
    word-break: break-all
}

.resumen-cuenta strong {
    color: var(--text)
}

/* Botonera inferior del paso 2 */
.fila-acciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px
}

@media (max-width: 480px) {
    .fila-acciones {
        flex-direction: column
    }

    .fila-acciones .btn {
        width: 100%;
        justify-content: center
    }
}

.mensaje-error {
    color: var(--red);
    font-size: .8rem;
    margin-top: 6px
}

.errores {
    background: rgba(248, 113, 113, .1);
    border: 1px solid rgba(248, 113, 113, .35);
    color: var(--red);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: .88rem;
    list-style: none
}

.errores li {
    margin-left: 0
}

.errores li+li {
    margin-top: 4px
}

/* Alertas flash */
.alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: .9rem;
    border: 1px solid transparent
}

.alert-ok {
    background: rgba(16, 185, 129, .12);
    border-color: rgba(16, 185, 129, .4);
    color: var(--emerald-400)
}

.alert-error {
    background: rgba(248, 113, 113, .1);
    border-color: rgba(248, 113, 113, .35);
    color: var(--red)
}

/* ----------------------------------------------------------
   Controles de formulario (extras del login)
   ---------------------------------------------------------- */
.fila-opciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 20px;
    font-size: .88rem
}

.check-recordar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer
}

.check-recordar input {
    accent-color: var(--emerald-500)
}

.link-olvidaste {
    color: var(--emerald-400);
    font-size: .88rem
}

.btn-bloque {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 13px 20px
}

/* Pie de tarjeta (enlaces bajo el formulario) */
.auth-card-pie {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: .9rem;
    color: var(--muted)
}

.auth-card-pie a {
    font-weight: 600
}

/* ----------------------------------------------------------
   Estados / mensajes de éxito (recuperación / registro)
   ---------------------------------------------------------- */
.auth-ok {
    text-align: center;
    padding: 10px 0
}

.auth-ok .ok-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(16, 185, 129, .15);
    border: 1px solid rgba(16, 185, 129, .4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-400);
    font-size: 1.6rem
}

.auth-ok h2 {
    font-family: var(--font-head);
    font-size: 1.35rem;
    margin-bottom: 8px
}

.auth-ok p {
    color: var(--muted)
}

.pasos {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-bottom: 28px
}

.paso {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-2);
    font-size: .85rem;
    font-weight: 600
}

.paso .num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem
}

.paso.activo {
    color: var(--emerald-400)
}

.paso.activo .num {
    background: var(--grad);
    border-color: transparent;
    color: #04110c;
    font-weight: 700
}

/* ----------------------------------------------------------
   Pie de página (footer mínimo)
   ---------------------------------------------------------- */
.auth-footer {
    border-top: 1px solid var(--line);
    padding: 22px 24px;
    text-align: center;
    color: var(--muted-2);
    font-size: .85rem;
    background: rgba(5, 6, 11, .6)
}

.auth-footer a {
    color: var(--muted);
    margin: 0 6px
}

.auth-footer a:hover {
    color: var(--emerald-400)
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 540px) {
    .auth-wrap {
        padding: 40px 16px 60px
    }

    .auth-card {
        padding: 30px 22px 26px
    }

    .btn-auth-volver {
        display: none
    }
}