/* ─────────────────────────────────────────────────────────────
   WALLETCAMBIOS ADMIN — AUTH MODERN (CARD CENTRADA)
   Fondo full-screen oscuro + card flotante con logo y form.
   Brand-aware (light/dark vía data-theme). Built on theme.css.
   ───────────────────────────────────────────────────────────── */

.wc-admin-auth {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(1.5rem, 4vw, 3rem);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #e2e8f0;
    background:
        linear-gradient(135deg, #060c18 0%, #0b1437 45%, #0a3d49 100%);
}

/* ───── Fondo decorativo ──────────────────────────────────── */

.wc-admin-auth__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.wc-admin-auth__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
}

.wc-admin-auth__orb--a {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--brand) 0%, transparent 70%);
    top: -160px;
    left: -160px;
    opacity: .55;
}

.wc-admin-auth__orb--b {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, var(--brand-accent) 0%, transparent 70%);
    bottom: -140px;
    right: -140px;
    opacity: .45;
}

.wc-admin-auth__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
}

/* ───── Card central ──────────────────────────────────────── */

.wc-admin-auth__card {
    position: relative;
    width: 100%;
    max-width: 540px;
    padding: clamp(2.25rem, 4vw, 3.25rem) clamp(2rem, 4vw, 3rem);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(15, 23, 42, .06);
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, .55),
        0 16px 40px -16px rgba(54, 180, 194, .35),
        0 0 0 1px rgba(255, 255, 255, .8) inset;
}

.wc-admin-auth__logo {
    display: flex;
    justify-content: center;
    margin: 0 0 1.5rem;
}

.wc-admin-auth__logo img {
    max-height: 64px;
    width: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .4));
}

.wc-admin-auth__head {
    text-align: center;
    margin-bottom: 1.75rem;
    margin-top: 1.25rem;
}

.wc-admin-auth__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: .35rem .85rem;
    border-radius: 999px;
    background: rgba(54, 180, 194, 0.12);
    color: var(--brand-dark, #289aaa);
    border: 1px solid rgba(54, 180, 194, 0.25);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}

.wc-admin-auth__card .wc-admin-auth__head h1 {
    font-size: clamp(1.5rem, 2vw, 1.8rem) !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 .5rem !important;
    text-shadow: none !important;
    background: none !important;
    -webkit-text-fill-color: #0f172a !important;
}

.wc-admin-auth__card .wc-admin-auth__head p {
    margin: 0 !important;
    color: #64748b !important;
    font-size: .9rem !important;
    line-height: 1.55 !important;
}

/* ───── Form ──────────────────────────────────────────────── */

.wc-admin-auth__field {
    margin-bottom: 1.1rem;
}

.wc-admin-auth__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.wc-admin-auth__card .wc-admin-auth__label {
    display: inline-block !important;
    margin-bottom: .5rem !important;
    font-size: .82rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    letter-spacing: 0.01em !important;
}

.wc-admin-auth__link {
    font-size: .85rem;
    color: var(--brand-dark, #289aaa);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}

.wc-admin-auth__link:hover {
    color: var(--brand, #36b4c2);
    text-decoration: underline;
}

.wc-admin-auth__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wc-admin-auth__input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    background: transparent;
}

.wc-admin-auth__input-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
}

.wc-admin-auth__input-icon svg *,
.wc-admin-auth__input-icon svg path,
.wc-admin-auth__input-icon svg circle,
.wc-admin-auth__input-icon svg rect {
    fill: none !important;
    stroke: currentColor;
}

/* Usamos IDs (#username, #password) para superar la especificidad
   del legacy [data-theme="dark"] input:not(...):not(...):not(...) */

input#username.wc-admin-auth__input,
input#password.wc-admin-auth__input {
    width: 100% !important;
    height: 52px !important;
    padding: 0 1rem 0 46px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
    background-image: none !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a !important;
    font-size: .95rem !important;
    font-family: inherit !important;
    line-height: normal !important;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    box-sizing: border-box !important;
}

input#password.wc-admin-auth__input--password {
    padding-right: 48px !important;
}

input#username.wc-admin-auth__input::placeholder,
input#password.wc-admin-auth__input::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
}

input#username.wc-admin-auth__input::-webkit-input-placeholder,
input#password.wc-admin-auth__input::-webkit-input-placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
}

input#username.wc-admin-auth__input::-moz-placeholder,
input#password.wc-admin-auth__input::-moz-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

input#username.wc-admin-auth__input:hover,
input#password.wc-admin-auth__input:hover {
    border-color: #cbd5e1 !important;
    background-color: #ffffff !important;
}

input#username.wc-admin-auth__input:focus,
input#password.wc-admin-auth__input:focus {
    outline: none !important;
    background-color: #ffffff !important;
    border-color: var(--brand, #36b4c2) !important;
    box-shadow: 0 0 0 4px rgba(54, 180, 194, .18) !important;
}

/* Autofill override (Chrome rellena inputs con amarillo/oscuro) */
input#username.wc-admin-auth__input:-webkit-autofill,
input#username.wc-admin-auth__input:-webkit-autofill:hover,
input#username.wc-admin-auth__input:-webkit-autofill:focus,
input#password.wc-admin-auth__input:-webkit-autofill,
input#password.wc-admin-auth__input:-webkit-autofill:hover,
input#password.wc-admin-auth__input:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
    -webkit-box-shadow: 0 0 0 1000px #f8fafc inset !important;
    box-shadow: 0 0 0 1000px #f8fafc inset !important;
    caret-color: #0f172a !important;
}

.wc-admin-auth__toggle {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.wc-admin-auth__toggle:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, .05);
}

.wc-admin-auth__toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
}

.wc-admin-auth__toggle svg *,
.wc-admin-auth__toggle svg path,
.wc-admin-auth__toggle svg circle,
.wc-admin-auth__toggle svg rect {
    fill: none !important;
    stroke: currentColor;
}

.wc-admin-auth__submit svg *,
.wc-admin-auth__submit svg path {
    fill: none !important;
    stroke: currentColor;
}

.wc-admin-auth__secure svg *,
.wc-admin-auth__secure svg path,
.wc-admin-auth__secure svg rect {
    fill: none !important;
    stroke: currentColor;
}

.wc-admin-auth__captcha {
    margin: .25rem 0 1.25rem;
}

.wc-admin-auth__captcha .g-recaptcha,
.wc-admin-auth__captcha iframe {
    max-width: 100%;
}

/* ───── Submit ────────────────────────────────────────────── */

.wc-admin-auth__submit {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand, #36b4c2) 0%, var(--brand-dark, #289aaa) 100%);
    color: #ffffff;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    box-shadow:
        0 18px 30px -16px rgba(54, 180, 194, .65),
        0 0 0 1px rgba(255, 255, 255, .08) inset;
    transition: filter .2s ease, box-shadow .2s ease, transform .15s ease;
}

.wc-admin-auth__submit:hover {
    filter: brightness(1.08);
    box-shadow:
        0 22px 36px -14px rgba(54, 180, 194, .75),
        0 0 0 1px rgba(255, 255, 255, .12) inset;
}

.wc-admin-auth__submit:active { transform: translateY(1px); }

.wc-admin-auth__submit svg {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

.wc-admin-auth__submit:hover svg { transform: translateX(3px); }

.wc-admin-auth__submit:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(54, 180, 194, .25),
        0 18px 30px -16px rgba(54, 180, 194, .65);
}

.wc-admin-auth__forgot {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: .85rem;
}

.wc-admin-auth__secure {
    margin: 1rem 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-size: .78rem;
    color: #94a3b8;
    text-align: center;
}

.wc-admin-auth__secure svg {
    width: 14px;
    height: 14px;
    color: #10b981;
    flex-shrink: 0;
}

/* ───── Copyright bottom ──────────────────────────────────── */

.wc-admin-auth__copy {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    text-align: center;
    margin: 0;
    font-size: .75rem;
    color: rgba(226, 232, 240, .4);
    letter-spacing: 0.02em;
    white-space: normal;
    padding: 0 1rem;
}

/* ───── Responsive ────────────────────────────────────────── */

@media (max-width: 560px) {
    .wc-admin-auth {
        padding: 1.25rem;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
    }
    .wc-admin-auth__card {
        width: 100%;
        max-width: 100%;
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }
    .wc-admin-auth__orb--a { width: 340px; height: 340px; }
    .wc-admin-auth__orb--b { width: 300px; height: 300px; }
    .wc-admin-auth__copy {
        position: static;
        transform: none;
        margin: 1.5rem 0 0;
        text-align: center;
        color: rgba(226, 232, 240, .4);
        font-size: .75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wc-admin-auth__submit,
    .wc-admin-auth__submit svg,
    .wc-admin-auth__input,
    .wc-admin-auth__toggle,
    .wc-admin-auth__link { transition: none; }
}

/* ───── Legacy verification-code (2FA admin) ──────────────── */

.verification-code-wrapper {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, .5);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
}

.verification-code input { color: #ffffff !important; }

.verification-code .boxes span {
    border-color: rgba(255, 255, 255, .12) !important;
    color: var(--brand-light, #7dd8e2) !important;
    background: rgba(15, 23, 42, .5) !important;
    border-radius: 6px !important;
}
