/* ============================================================
   KrakenChkr — auth.css v12
   Login · Register · Reset Password
   ============================================================ */

.hacker-auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: #06041A;
    background-image:
        radial-gradient(ellipse 85% 50% at 50% -5%,  hsla(258,78%,52%,.22) 0%, transparent 70%),
        radial-gradient(ellipse 65% 40% at 50% 110%, hsla(258,78%,50%,.18) 0%, transparent 65%);
    position: relative;
    overflow: hidden;
}

/* Arcos decorativos de fondo */
.hacker-auth::before,
.hacker-auth::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid hsla(258,70%,65%,.055);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.hacker-auth::before { width: 560px; height: 560px; }
.hacker-auth::after  { width: 960px;  height: 960px; }

.hk-wrap {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

@keyframes cardRise {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.hk-card {
    background: rgba(11, 9, 28, 0.92);
    border: 1px solid rgba(124, 92, 245, 0.18);
    border-radius: 22px;
    padding: 36px 32px 32px;
    backdrop-filter: blur(28px) saturate(120%);
    -webkit-backdrop-filter: blur(28px) saturate(120%);
    box-shadow:
        0 24px 64px hsla(255, 80%, 12%, .65),
        inset 0 1px 0 hsla(258, 80%, 80%, .06);
    animation: cardRise .32s cubic-bezier(.22,.68,0,1.2) both;
}

/* ── Ícono superior ── */
.hk-icon-wrap {
    width: 54px; height: 54px;
    border-radius: 15px;
    border: 1px solid hsla(258,72%,65%,.28);
    background: rgba(18, 14, 42, .9);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 18px hsla(258,80%,58%,.18), inset 0 1px 0 hsla(258,80%,80%,.08);
}
.hk-icon-wrap svg { width: 26px; height: 26px; }

/* ── Branding (legacy — usado en páginas antiguas) ── */
.hk-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}
.hk-brand img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.hk-brand-name {
    font-family: var(--font-display);
    font-size: 1rem; font-weight: 700;
    color: hsl(var(--foreground));
}
.hk-brand-name span { color: hsl(var(--primary)); }

/* ── Títulos ── */
.hk-title {
    font-family: var(--font-display);
    font-size: 1.22rem; font-weight: 700;
    letter-spacing: -.02em;
    color: hsl(var(--foreground));
    text-align: center;
    margin-bottom: 5px;
}
.hk-subtitle {
    font-size: .78rem;
    color: hsl(var(--foreground-muted));
    text-align: center;
    line-height: 1.5;
    margin-bottom: 26px;
}

/* ── Campos con ícono (nuevo) ── */
.hk-field { margin-bottom: 12px; }

.hk-inp-box {
    display: flex; align-items: center; gap: 10px;
    background: rgba(22, 18, 50, .85);
    border: 1px solid rgba(124, 92, 245, .15);
    border-radius: 11px;
    padding: 0 14px;
    transition: border-color .18s, box-shadow .18s;
}
.hk-inp-box:focus-within {
    border-color: hsla(258,72%,65%,.6);
    box-shadow: 0 0 0 3px hsla(258,80%,68%,.13);
}

.hk-ico {
    color: #4A4678;
    display: flex; align-items: center; flex-shrink: 0;
}
.hk-ico svg { width: 15px; height: 15px; }

.hk-inp {
    flex: 1; min-width: 0;
    background: transparent; border: none;
    padding: 13px 0;
    font-family: var(--font-sans);
    font-size: .87rem;
    color: hsl(var(--foreground));
    outline: none;
    caret-color: hsl(var(--primary));
    -webkit-appearance: none;
}
.hk-inp::placeholder { color: #4A4678; }
.hk-inp:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgb(18 14 42) inset;
    -webkit-text-fill-color: hsl(var(--foreground));
}

/* Botón de ojo */
.hk-eye {
    background: none; border: none; cursor: pointer;
    color: #4A4678; padding: 0;
    display: flex; align-items: center; flex-shrink: 0;
    transition: color .15s;
}
.hk-eye:hover { color: hsl(var(--foreground-muted)); }
.hk-eye svg { width: 16px; height: 16px; }

/* ── Campos boxed (legacy — reset_password.php) ── */
.hk-label {
    display: block;
    font-size: .72rem; font-weight: 500;
    color: hsl(var(--foreground-muted));
    margin-bottom: 7px;
}
.hk-input {
    width: 100%;
    background: rgba(22,18,50,.85);
    border: 1px solid rgba(124,92,245,.15);
    border-radius: 11px;
    padding: 12px 14px;
    color: hsl(var(--foreground));
    font-family: var(--font-sans);
    font-size: .87rem;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    -webkit-appearance: none;
}
.hk-input::placeholder { color: #4A4678; }
.hk-input:focus {
    border-color: hsla(258,72%,65%,.6);
    box-shadow: 0 0 0 3px hsla(258,80%,68%,.13);
}
.hk-input.is-error {
    border-color: hsl(var(--error));
}

/* ── Hint / fortaleza ── */
.hk-hint {
    display: block;
    font-size: .67rem;
    color: hsl(var(--foreground-subtle));
    margin-top: 5px; padding-left: 2px;
    line-height: 1.4;
}

.hk-strength {
    display: flex; gap: 5px;
    margin-top: 7px;
}
.hk-seg {
    flex: 1; height: 2px; border-radius: 2px;
    background: rgba(124,92,245,.15);
    transition: background .2s;
}

/* ── Forgot ── */
.hk-forgot {
    display: flex; justify-content: flex-end;
    margin-bottom: 16px; margin-top: -2px;
}
.hk-forgot a {
    font-size: .72rem;
    color: #4A4678;
    text-decoration: none;
    transition: color .15s;
}
.hk-forgot a:hover { color: hsl(var(--primary)); }

/* ── Turnstile ── */
.cf-turnstile { margin-bottom: 14px; }

/* ── Botón principal ── */
.hk-btn {
    display: block; width: 100%;
    padding: 13px 0;
    background: hsl(var(--primary));
    color: #fff;
    font-family: var(--font-sans);
    font-size: .9rem; font-weight: 600;
    border: none; border-radius: 11px;
    cursor: pointer; letter-spacing: .01em;
    transition: opacity .15s, box-shadow .2s, transform .08s;
    box-shadow: 0 4px 20px hsla(var(--primary), .28);
    position: relative; overflow: hidden;
}
.hk-btn:hover {
    opacity: .9;
    box-shadow: 0 8px 28px hsla(var(--primary), .4);
}
.hk-btn:active  { transform: scale(.99); }
.hk-btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.hk-btn.loading { pointer-events: none; opacity: .7; }
.hk-btn.loading::before {
    content: '';
    display: inline-block;
    width: 13px; height: 13px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin .6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ── Divisor + switch ── */
.hk-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0 16px;
}
.hk-div-line { flex: 1; height: 1px; background: rgba(124,92,245,.15); }
.hk-div-txt  { font-size: .7rem; color: #4A4678; white-space: nowrap; }

.hk-switch {
    text-align: center;
    font-size: .78rem;
}
.hk-switch a {
    color: hsl(var(--primary));
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
}
.hk-switch a:hover { opacity: .82; }

/* ── Error box (inyectado por auth.js) ── */
.form-error-box {
    background: hsla(0,84%,60%,.08);
    border: 1px solid hsla(0,84%,60%,.25);
    color: #F87171;
    padding: 10px 14px;
    border-radius: 9px;
    margin-bottom: 14px;
    font-size: .82rem;
    line-height: 1.4;
}

/* ── Miscelánea legacy ── */
.hk-error {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 14px;
    background: hsla(var(--error), .08);
    border: 1px solid hsla(var(--error), .2);
    border-radius: 9px;
    font-size: .78rem;
    color: hsl(var(--error));
    margin-bottom: 18px;
}

.hk-footer {
    margin-top: 20px;
    font-size: .78rem;
    color: hsl(var(--foreground-muted));
    text-align: center;
}
.hk-footer a {
    color: hsl(var(--primary));
    font-weight: 500;
    text-decoration: none;
}
.hk-footer a:hover { text-decoration: underline; }

.hk-stepper { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.hk-step { display: flex; align-items: center; gap: 7px; flex: 1; font-size: .7rem; font-weight: 600; color: hsl(var(--foreground-subtle)); letter-spacing: .02em; }
.hk-step.active { color: hsl(var(--primary)); }
.hk-step.done   { color: hsl(var(--success)); }
.hk-step-num { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; flex-shrink: 0; }
.hk-step.active .hk-step-num { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: #fff; }
.hk-step.done .hk-step-num   { background: hsl(var(--success)); border-color: hsl(var(--success)); color: #fff; }
.hk-step-line { flex: 1; height: 1px; background: hsla(var(--border), .6); margin: 0 6px; }

@media (max-width: 480px) {
    .hk-card { padding: 28px 20px 24px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
