/* ==========================================================================
   Clopix — Auth Pages (Login · Register · Reset Password)
   Completely overrides wp-login.php default styles.
   ========================================================================== */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
    --auth-black:   #0a0a0a;
    --auth-white:   #ffffff;
    --auth-gold:    #c9a97a;
    --auth-gold-d:  #a8855a;
    --auth-muted:   #6b7280;
    --auth-border:  #e5e7eb;
    --auth-error:   #dc2626;
    --auth-input-h: 48px;
    --auth-radius:  8px;
    --auth-font:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --auth-serif:   'Cormorant Garamond', Georgia, serif;
}

/* ── Full reset of WP defaults ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body.clopix-auth {
    display: flex !important;
    flex-direction: row-reverse !important; /* #login (right) first in source; panel second → visually left */
    min-height: 100vh !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--auth-white) !important;
    font-family: var(--auth-font);
}

/* ── Right panel: #login ─────────────────────────────────────────────────── */
body.clopix-auth #login {
    width: 480px !important;
    min-width: 340px;
    flex-shrink: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3rem) !important;
    background: var(--auth-white);
    position: relative;
    margin: 0 !important;
}

/* Hide WP logo h1 (the big WP SVG + "Log In" text) */
body.clopix-auth #login h1,
body.clopix-auth #login h1 a {
    display: none !important;
}

/* ── Form header (injected via login_message filter) ─────────────────────── */
.clopix-form-header {
    margin-bottom: 2rem;
    padding-bottom: 0;
}

.clopix-form-header__heading {
    font-family: var(--auth-serif);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--auth-black);
    margin: 0 0 0.5rem;
}

.clopix-form-header__sub {
    font-size: 0.875rem;
    color: var(--auth-muted);
    line-height: 1.6;
    margin: 0;
}

/* ── Login form containers ───────────────────────────────────────────────── */
body.clopix-auth #loginform,
body.clopix-auth #registerform,
body.clopix-auth #lostpasswordform,
body.clopix-auth #resetpassform {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* Labels — refined, not all-caps corporate */
body.clopix-auth #loginform label,
body.clopix-auth #registerform label,
body.clopix-auth #lostpasswordform label,
body.clopix-auth #resetpassform label {
    display: block !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    color: #374151 !important;
    margin-bottom: 7px !important;
    line-height: 1 !important;
}

/* Inputs — clean white, visible border, editorial feel */
body.clopix-auth #loginform input[type="text"],
body.clopix-auth #loginform input[type="password"],
body.clopix-auth #registerform input[type="text"],
body.clopix-auth #registerform input[type="email"],
body.clopix-auth #lostpasswordform input[type="text"],
body.clopix-auth #resetpassform input[type="password"] {
    width: 100% !important;
    height: 52px !important;
    background: #fff !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0 16px !important;
    font-family: var(--auth-font) !important;
    font-size: 0.9375rem !important;
    color: var(--auth-black) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
    margin-bottom: 0 !important;
}
body.clopix-auth #loginform input[type="text"]:focus,
body.clopix-auth #loginform input[type="password"]:focus,
body.clopix-auth #registerform input[type="text"]:focus,
body.clopix-auth #registerform input[type="email"]:focus,
body.clopix-auth #lostpasswordform input[type="text"]:focus,
body.clopix-auth #resetpassform input[type="password"]:focus {
    border-color: var(--auth-gold) !important;
    box-shadow: 0 0 0 3px rgba(201,169,122,0.12) !important;
    background: #fff !important;
}
body.clopix-auth #loginform input[type="text"]:hover,
body.clopix-auth #loginform input[type="password"]:hover,
body.clopix-auth #registerform input[type="text"]:hover,
body.clopix-auth #registerform input[type="email"]:hover,
body.clopix-auth #lostpasswordform input[type="text"]:hover,
body.clopix-auth #resetpassform input[type="password"]:hover {
    border-color: #9ca3af !important;
}

/* Field wrappers */
body.clopix-auth .user-login-wrap,
body.clopix-auth .user-pass-wrap,
body.clopix-auth .user-pass1-wrap,
body.clopix-auth .user-pass2-wrap {
    margin-bottom: 1.25rem !important;
    padding: 0 !important;
}

/* Reset WP's <p> tags inside forms */
body.clopix-auth #loginform p,
body.clopix-auth #registerform p,
body.clopix-auth #lostpasswordform p {
    margin-bottom: 1.25rem !important;
    padding: 0 !important;
}

/* Password show/hide toggle */
body.clopix-auth .wp-pwd { position: relative !important; }
body.clopix-auth button.wp-hide-pw {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    color: #9ca3af !important;
    padding: 4px !important;
    min-height: 0 !important;
    line-height: 1 !important;
}
body.clopix-auth button.wp-hide-pw:hover { color: var(--auth-black) !important; }


/* ── Submit button ───────────────────────────────────────────────────────── */
body.clopix-auth #wp-submit {
    display: block !important;
    width: 100% !important;
    height: 52px !important;
    background: var(--auth-black) !important;
    color: var(--auth-white) !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: var(--auth-font) !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.22s ease, transform 0.15s ease !important;
    box-shadow: none !important;
    margin-top: 1.5rem !important;
    text-shadow: none !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
    overflow: hidden !important;
}
body.clopix-auth #wp-submit:hover {
    background: var(--auth-gold) !important;
    transform: translateY(-1px) !important;
}
body.clopix-auth #wp-submit:active { transform: translateY(0) !important; }
body.clopix-auth #wp-submit:focus-visible {
    outline: 2px solid var(--auth-gold) !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}



/* ── #nav — rebuilt by JS ────────────────────────────────────────────────── */
body.clopix-auth #nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: transparent !important; /* hides any residual WP text nodes */
    padding: 0 !important;
    margin-top: 0 !important;
}

/* ── "— or —" divider ───────────────────────────────────────────────────── */
body.clopix-auth .clopix-nav-or {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin: 1.25rem 0 !important;
    color: #9ca3af !important;
}
body.clopix-auth .clopix-nav-or::before,
body.clopix-auth .clopix-nav-or::after {
    content: '' !important;
    flex: 1 !important;
    height: 1px !important;
    background: var(--auth-border) !important;
}
body.clopix-auth .clopix-nav-or span {
    font-size: 0.75rem !important;
    letter-spacing: 0.06em !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    text-transform: lowercase !important;
}

/* ── Full-width outline button (Register / Sign in) ─────────────────────── */
body.clopix-auth .clopix-nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 52px !important;
    background: transparent !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    font-family: var(--auth-font) !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--auth-black) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease !important;
}
body.clopix-auth .clopix-nav-btn:hover {
    border-color: var(--auth-gold) !important;
    color: var(--auth-gold) !important;
    background: rgba(201,169,122,0.04) !important;
}

/* ── "Having issues logging in? Reset your password here" ───────────────── */
body.clopix-auth .clopix-nav-footer {
    margin: 1.5rem 0 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 0.8125rem !important;
    color: #9ca3af !important;
    line-height: 1.5 !important;
}
body.clopix-auth .clopix-nav-footer a {
    color: var(--auth-muted) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    text-decoration-color: transparent !important;
    transition: color 0.2s, text-decoration-color 0.2s !important;
}
body.clopix-auth .clopix-nav-footer a:hover {
    color: var(--auth-gold) !important;
    text-decoration-color: var(--auth-gold) !important;
}

/* ── Remember me row — toggle switch ─────────────────────────────────────── */
body.clopix-auth .forgetmenot {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    float: none !important;
    margin: 0 !important;
    padding: 0.5rem 0 0 !important;
    line-height: 1 !important;
}
body.clopix-auth .forgetmenot label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--auth-muted) !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-left: 44px !important;  /* space for track */
    cursor: pointer !important;
    line-height: 20px !important;
    position: relative !important;
}

/* Hide native checkbox */
body.clopix-auth .forgetmenot input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

/* Toggle track */
body.clopix-auth .forgetmenot label::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 34px !important;
    height: 20px !important;
    background: #d1d5db !important;
    border-radius: 20px !important;
    transition: background 0.2s ease !important;
}

/* Toggle knob */
body.clopix-auth .forgetmenot label::after {
    content: '' !important;
    position: absolute !important;
    left: 3px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 14px !important;
    height: 14px !important;
    background: var(--auth-white) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    transition: transform 0.2s ease, left 0.2s ease !important;
}

/* Checked state */
body.clopix-auth .forgetmenot input[type="checkbox"]:checked + label::before {
    background: var(--auth-gold) !important;
}
body.clopix-auth .forgetmenot input[type="checkbox"]:checked + label::after {
    left: 17px !important;
}

/* Focus ring for accessibility */
body.clopix-auth .forgetmenot input[type="checkbox"]:focus-visible + label::before {
    box-shadow: 0 0 0 3px rgba(201,169,122,0.25) !important;
}

/* ── Hide "Go to clopix" back link ──────────────────────────────────────── */
body.clopix-auth #backtoblog { display: none !important; }

/* ── Error / notice / success messages ───────────────────────────────────── */

/* Shared base — dark card matching the confirmation card design */
body.clopix-auth #login_error,
body.clopix-auth.login .message,
body.clopix-auth #login .message,
body.clopix-auth.login .success,
body.clopix-auth #login .success {
    background: var(--auth-black) !important;
    border: none !important;
    border-left: 3px solid var(--auth-gold) !important;  /* overridden per variant below */
    border-radius: var(--auth-radius) !important;
    padding: 1rem 1.25rem !important;
    margin: 0 0 1.75rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.6 !important;
    color: rgba(255,255,255,0.7) !important;
    box-shadow: none !important;
}

/* Links inside messages */
body.clopix-auth #login_error a,
body.clopix-auth #login .message a,
body.clopix-auth #login .success a {
    color: var(--auth-gold) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

/* Error variant — red left border */
body.clopix-auth #login_error {
    border-left-color: #ef4444 !important;
    color: rgba(255,255,255,0.75) !important;
}

/* Notice / info variant — gold left border (default above) */
body.clopix-auth.login .message,
body.clopix-auth #login .message {
    border-left-color: var(--auth-gold) !important;
}

/* Success variant — green left border */
body.clopix-auth.login .success,
body.clopix-auth #login .success {
    border-left-color: #4ade80 !important;
}

/* ── Registration confirmation (?checkemail=registered) ─────────────────── */
/* Hide WP's default "Registration complete. Please check your email…" notice */
/* and replace it with our styled card below the header block                 */
body.clopix-auth.checkemail #login .message {
    display: none !important;
}

.clopix-confirm-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: var(--auth-black);
    border-radius: var(--auth-radius);
    padding: 1.5rem 1.625rem;
    margin-bottom: 1.75rem;
}

.clopix-confirm-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(201,169,122,0.12);
    border: 1.5px solid rgba(201,169,122,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clopix-confirm-card__icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--auth-gold);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.clopix-confirm-card__body {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
    margin: 0;
}

.clopix-confirm-card__body strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--auth-white);
    margin-bottom: 0.25rem;
}

.clopix-confirm-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 1.5rem;
    background: transparent;
    border: 1.5px solid rgba(201,169,122,0.35);
    border-radius: 6px;
    font-family: var(--auth-font);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--auth-gold);
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    margin-top: 0.25rem;
}

.clopix-confirm-card__action:hover {
    border-color: var(--auth-gold);
    background: rgba(201,169,122,0.08);
    color: var(--auth-gold);
}

/* ── Password strength meter ─────────────────────────────────────────────── */
body.clopix-auth #pass-strength-result {
    border-radius: 4px !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    text-align: center !important;
    border: none !important;
    margin-top: 6px !important;
    display: block !important;
    width: 100% !important;
    box-shadow: none !important;
}

/* ── Generate Password button ────────────────────────────────────────────── */
body.clopix-auth #wp-generate-pw {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 1.25rem !important;
    background: transparent !important;
    border: 1.5px solid rgba(201,169,122,0.45) !important;
    border-radius: 6px !important;
    font-family: var(--auth-font) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--auth-gold) !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
    margin-top: 0.75rem !important;
}
body.clopix-auth #wp-generate-pw:hover {
    border-color: var(--auth-gold) !important;
    background: rgba(201,169,122,0.07) !important;
}
body.clopix-auth.login-action-resetpass #wp-generate-pw,
body.clopix-auth.login-action-rp #wp-generate-pw {
    display: none !important;
}

/* Hide the password hint text ("The password should be at least twelve characters…") */
body.clopix-auth .pw-weak-text,
body.clopix-auth #pass-strength-result + p,
body.clopix-auth .resetpassform .description,
body.clopix-auth #resetpassform p.description {
    display: none !important;
}

/* Hide Sign In / Create Account nav on the reset-password page */
body.clopix-auth.login-action-resetpass #nav,
body.clopix-auth.login-action-rp #nav {
    display: none !important;
}

/* ── Left editorial panel ────────────────────────────────────────────────── */
.clopix-auth-panel {
    flex: 1;
    min-height: 100vh;
    background: var(--auth-black);
    position: relative;
    display: flex;
    overflow: hidden;
}

/* Diagonal gold accent */
.clopix-auth-panel::before {
    content: '';
    position: absolute;
    top: -10%; right: -5%;
    width: 55%; height: 70%;
    background: radial-gradient(ellipse at top right, rgba(201,169,122,0.12) 0%, transparent 65%);
    pointer-events: none;
}
/* Bottom gold line */
.clopix-auth-panel::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201,169,122,0.4), transparent);
}

/* Grain texture overlay */
.clopix-auth-panel__grain {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.35;
    pointer-events: none;
}

/* When a background image is set via customizer */
.clopix-auth-panel.has-bg-image {
    background-size: cover;
    background-position: center;
}
/* Suppress gold radial glow — photo provides visual depth */
.clopix-auth-panel.has-bg-image::before { display: none; }
/* Grain reads differently on photos — lift opacity slightly */
.clopix-auth-panel.has-bg-image .clopix-auth-panel__grain { opacity: 0.2; }

.clopix-auth-panel__inner {
    position: relative; z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    padding: clamp(2.5rem, 5vw, 4rem);
}

/* Logo */
.clopix-auth-panel__logo {
    font-family: var(--auth-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--auth-white);
    text-decoration: none;
    align-self: flex-start;
}
.clopix-auth-panel__logo:hover { color: var(--auth-gold); }

/* Content block */
.clopix-auth-panel__content { margin-top: auto; padding-bottom: 2rem; }

.clopix-auth-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--auth-gold);
    margin-bottom: 1.25rem;
}
.clopix-auth-panel__dot {
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--auth-gold);
    flex-shrink: 0;
}

.clopix-auth-panel__headline {
    font-family: var(--auth-serif);
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--auth-white);
    margin: 0 0 1.25rem;
}

.clopix-auth-panel__body {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.38);
    line-height: 1.65;
    max-width: 36ch;
    margin: 0;
}

/* Panel footer */
.clopix-auth-panel__footer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.2);
    margin: 0;
}

/* ── Hide WP's hardcoded notice banners ──────────────────────────────────── */
/* Register page: "Register For This Site" */
body.clopix-auth .message.register { display: none !important; }
body.clopix-auth.login-action-register p.message { display: none !important; }
/* Lost password page: instructional notice (our heading replaces it) */
body.clopix-auth.login-action-lostpassword .notice,
body.clopix-auth.login-action-lostpassword p.message { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — complete layout rethink (≤ 860px)
   Concept: dark editorial hero on top → white bottom-sheet form lifts over it.
   Fixes the DOM-ordering bug (panel is after #login in source, so we use
   order: -1 to visually promote it to the top of the column stack).
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {

    html { height: auto !important; }

    /* Dark canvas — the panel's background bleeds to screen edges */
    body.clopix-auth {
        flex-direction: column !important;
        height: auto !important;
        min-height: 100dvh !important;
        background: var(--auth-black) !important;
    }

    /* ── 1. Branded hero panel — moved to top of visual stack ── */
    .clopix-auth-panel {
        order: -1 !important;          /* fixes DOM-order: panel now appears first */
        flex: none !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: hidden !important;
        position: relative !important; /* reset sticky */
        top: auto !important;
        z-index: 1 !important;
    }

    /* No bottom separator — the rounded sheet handles the transition */
    .clopix-auth-panel::after { display: none !important; }

    /* Keep subtle radial glow, slightly stronger */
    .clopix-auth-panel::before {
        width: 80% !important;
        height: 90% !important;
        opacity: 0.8 !important;
    }

    /* Panel inner: column, centered, enough height to feel like a hero */
    .clopix-auth-panel__inner {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 3rem 2rem 3.5rem !important;
        min-height: 36vh !important;
        gap: 0 !important;
    }

    /* Logo: centred, prominent */
    .clopix-auth-panel__logo {
        font-size: 1.75rem !important;
        letter-spacing: 0.32em !important;
        align-self: center !important;
        margin-bottom: 1.5rem !important;
    }

    /* Show the editorial content block — this is the hero copy */
    .clopix-auth-panel__content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .clopix-auth-panel__eyebrow {
        justify-content: center !important;
        font-size: 0.65rem !important;
        margin-bottom: 0.875rem !important;
    }

    /* Headline — show it, use a comfortable mobile size */
    .clopix-auth-panel__headline {
        font-size: clamp(1.9rem, 7vw, 2.6rem) !important;
        text-align: center !important;
        letter-spacing: -0.025em !important;
        margin-bottom: 0 !important;
    }

    /* Hide body copy and copyright — headline is enough */
    .clopix-auth-panel__body,
    .clopix-auth-panel__footer { display: none !important; }

    /* ── 2. White form sheet — rounded top, lifts over the dark hero ── */
    body.clopix-auth #login {
        order: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        flex: 1 1 auto !important;
        justify-content: flex-start !important;
        padding: 2.25rem 1.5rem 4rem !important;
        background: var(--auth-white) !important;
        border-radius: 22px 22px 0 0 !important;
        margin-top: -22px !important;     /* overlaps the hero for the lift effect */
        margin-left: 0 !important;
        margin-right: 0 !important;
        position: relative !important;
        z-index: 2 !important;
        box-shadow: 0 -4px 32px rgba(0,0,0,0.18) !important;
    }

    /* Form containers — flat inside the sheet */
    body.clopix-auth #loginform,
    body.clopix-auth #registerform,
    body.clopix-auth #lostpasswordform,
    body.clopix-auth #resetpassform {
        background: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    /* ── 3. Form header — contextual heading inside the sheet ── */
    .clopix-form-header {
        margin-bottom: 1.75rem !important;
    }

    .clopix-form-header__heading {
        font-size: 1.75rem !important;
        letter-spacing: -0.01em !important;
        line-height: 1.1 !important;
    }

    .clopix-form-header__sub {
        font-size: 0.875rem !important;
        margin-top: 0.4rem !important;
        line-height: 1.55 !important;
    }

    /* ── 4. Inputs — large, round, touch-first ── */
    body.clopix-auth #loginform input[type="text"],
    body.clopix-auth #loginform input[type="password"],
    body.clopix-auth #registerform input[type="text"],
    body.clopix-auth #registerform input[type="email"],
    body.clopix-auth #lostpasswordform input[type="text"],
    body.clopix-auth #resetpassform input[type="password"] {
        height: 56px !important;
        font-size: 1rem !important;
        border-radius: 10px !important;
        padding: 0 18px !important;
    }

    body.clopix-auth .user-login-wrap,
    body.clopix-auth .user-pass-wrap,
    body.clopix-auth .user-pass1-wrap,
    body.clopix-auth .user-pass2-wrap {
        margin-bottom: 1rem !important;
    }

    /* Labels slightly larger for easy reading */
    body.clopix-auth #loginform label,
    body.clopix-auth #registerform label,
    body.clopix-auth #lostpasswordform label,
    body.clopix-auth #resetpassform label {
        font-size: 0.8125rem !important;
        margin-bottom: 8px !important;
    }

    /* ── 5. Primary submit — full-width, tall, solid black ── */
    body.clopix-auth #wp-submit {
        height: 56px !important;
        font-size: 0.875rem !important;
        border-radius: 10px !important;
        letter-spacing: 0.12em !important;
        margin-top: 1.5rem !important;
        line-height: 56px !important;
    }

    /* ── 6. Nav: switch between login/register ── */

    /* Zero WP's <p class="submit"> bottom margin so it doesn't add to the gap */
    body.clopix-auth #loginform p.submit,
    body.clopix-auth #registerform p.submit,
    body.clopix-auth #lostpasswordform p.submit,
    body.clopix-auth #resetpassform p.submit {
        margin-bottom: 0 !important;
    }

    body.clopix-auth #nav {
        margin-top: 1.5rem !important;
        padding-top: 0 !important;
        border-top: none !important;
    }

    /* Equal spacing above (from #nav margin-top) and below the first divider */
    body.clopix-auth .clopix-nav-or {
        margin: 0 0 1.5rem !important;
    }

    /* When a second "or" follows a button, give it the same top gap as the first */
    body.clopix-auth .clopix-nav-btn + .clopix-nav-or {
        margin-top: 1.5rem !important;
    }

    body.clopix-auth .clopix-nav-btn {
        height: 54px !important;
        font-size: 0.8125rem !important;
        border-radius: 10px !important;
    }

    body.clopix-auth .clopix-nav-footer {
        margin-top: 1.5rem !important;
        font-size: 0.875rem !important;
    }

    /* ── 7. Remember me ── */
    body.clopix-auth .forgetmenot {
        padding-top: 0.75rem !important;
    }
    body.clopix-auth .forgetmenot label {
        font-size: 0.875rem !important;
        padding-left: 48px !important;
        line-height: 22px !important;
    }
    body.clopix-auth .forgetmenot label::before {
        width: 38px !important;
        height: 22px !important;
    }
    body.clopix-auth .forgetmenot label::after {
        width: 16px !important;
        height: 16px !important;
    }
    body.clopix-auth .forgetmenot input[type="checkbox"]:checked + label::after {
        left: 19px !important;
    }

    /* ── 8. Error / info / success banners ── */
    body.clopix-auth #login_error,
    body.clopix-auth.login .message,
    body.clopix-auth #login .message,
    body.clopix-auth.login .success,
    body.clopix-auth #login .success {
        border-radius: 10px !important;
        padding: 1rem 1.25rem !important;
        font-size: 0.875rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* ── 9. Confirmation card ── */
    .clopix-confirm-card {
        border-radius: 12px !important;
        padding: 1.5rem !important;
    }

    /* ── 10. Generate password — full-width on mobile ── */
    body.clopix-auth #wp-generate-pw {
        width: 100% !important;
        height: 50px !important;
        font-size: 0.8125rem !important;
        border-radius: 8px !important;
        justify-content: center !important;
        margin-top: 1rem !important;
    }

    /* ── 11. Password strength meter ── */
    body.clopix-auth #pass-strength-result {
        font-size: 0.875rem !important;
        padding: 8px 14px !important;
        border-radius: 6px !important;
        margin-top: 10px !important;
    }
}

/* ── Small phones (≤ 480px) ─────────────────────────────────────────────── */
@media (max-width: 480px) {

    .clopix-auth-panel__inner {
        min-height: 32vh !important;
        padding: 2.25rem 1.5rem 3rem !important;
    }

    .clopix-auth-panel__logo {
        font-size: 1.5rem !important;
        margin-bottom: 1.25rem !important;
    }

    .clopix-auth-panel__headline {
        font-size: 1.75rem !important;
    }

    body.clopix-auth #login {
        padding: 2rem 1.25rem 3.5rem !important;
        border-radius: 18px 18px 0 0 !important;
        margin-top: -18px !important;
    }

    .clopix-form-header {
        margin-bottom: 1.5rem !important;
    }

    .clopix-form-header__heading {
        font-size: 1.55rem !important;
    }

    body.clopix-auth #loginform input[type="text"],
    body.clopix-auth #loginform input[type="password"],
    body.clopix-auth #registerform input[type="text"],
    body.clopix-auth #registerform input[type="email"],
    body.clopix-auth #lostpasswordform input[type="text"],
    body.clopix-auth #resetpassform input[type="password"] {
        height: 52px !important;
    }

    body.clopix-auth #wp-submit,
    body.clopix-auth .clopix-nav-btn {
        height: 52px !important;
        line-height: 52px !important;
    }
}

