/* ==========================================================================
   eRupaiya Merchant Portal — Auth pages only
   (login, register, register_verify, register_set_pin,
    forgot_password, reset_password, 2fa_verify)
   Layout: left banner with Swiper slider, right form panel.
   ========================================================================== */

:root {
    --auth-primary: #243b64;
    --auth-primary-dark: #182b4b;
    --auth-primary-soft: #eef3fa;
    --auth-accent: #3ddc97;
    --auth-page-bg: #eef1f6;
    --auth-surface: #ffffff;
    --auth-text: #18202e;
    --auth-text-2: #4a5568;
    --auth-muted: #7a8496;
    --auth-border: #dfe4ec;
    --auth-border-strong: #c9d1de;
    --auth-danger: #c62828;
    --auth-danger-bg: #fdf0f0;
    --auth-success: #187847;
    --auth-success-bg: #edf8f2;
    --auth-radius-lg: 24px;
    --auth-radius: 12px;
    --auth-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html,
body.auth-body {
    margin: 0;
    padding: 0;
}

body.auth-body {
    min-height: 100vh;
    padding: 16px;
    background: var(--auth-page-bg);
    font-family: var(--auth-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 16px;
    max-width: 1480px;
    min-height: calc(100vh - 32px);
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Left banner
   -------------------------------------------------------------------------- */

.auth-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 40px 48px 44px;
    overflow: hidden;
    border-radius: var(--auth-radius-lg);
    color: #fff;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(61, 220, 151, 0.16) 0%, transparent 55%),
        radial-gradient(90% 70% at 0% 100%, rgba(98, 140, 214, 0.28) 0%, transparent 60%),
        linear-gradient(160deg, #2b4675 0%, #1b2f53 55%, #13223d 100%);
}

.auth-banner::after {
    /* soft fade so slide text stays readable over the mock UI */
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 62%;
    background: linear-gradient(180deg, rgba(19, 34, 61, 0) 0%, rgba(19, 34, 61, 0.92) 55%, #13223d 100%);
    pointer-events: none;
    z-index: 1;
}

.auth-banner-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
}

.auth-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.18);
}

/* Decorative dashboard mock (pure CSS) */

.auth-mock {
    position: absolute;
    top: 96px;
    left: 18%;
    width: 110%;
    height: 520px;
    perspective: 1400px;
    pointer-events: none;
    z-index: 0;
}

.auth-mock-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 640px;
    height: 460px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
    transform: rotateY(-14deg) rotateX(8deg) rotateZ(-3deg);
    transform-origin: left top;
    box-shadow: 0 30px 60px rgba(5, 12, 26, 0.35);
}

.auth-mock-card.is-back-2 {
    left: -90px;
    top: 56px;
    opacity: 0.35;
}

.auth-mock-card.is-back-1 {
    left: -45px;
    top: 28px;
    opacity: 0.6;
}

.auth-mock-card.is-front {
    display: grid;
    grid-template-columns: 190px 1fr;
    overflow: hidden;
}

.mock-side {
    padding: 18px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mock-logo {
    width: 34px;
    height: 34px;
    margin-bottom: 22px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3ddc97, #1f9e68);
    box-shadow: 0 6px 16px rgba(61, 220, 151, 0.35);
}

.mock-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    margin-bottom: 8px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.mock-nav.is-active {
    border: 1px solid rgba(61, 220, 151, 0.35);
    background: rgba(61, 220, 151, 0.16);
}

.mock-bar {
    height: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
}

.mock-side .mock-bar {
    margin: 16px 10px;
}

.mock-main {
    padding: 20px;
}

.mock-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.mock-stat {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.mock-stat-label {
    margin-bottom: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.mock-stat-value {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.mock-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mock-avatar {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
}

.mock-pill {
    flex: 0 0 56px;
    height: 18px;
    border-radius: 999px;
    background: rgba(61, 220, 151, 0.22);
}

/* Slider */

.auth-slider-area {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
}

.auth-slider {
    width: 100%;
    margin: 0;
}

.auth-slider .swiper-slide {
    padding-bottom: 4px;
}

.auth-slide-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 22px;
    border: 1px solid rgba(61, 220, 151, 0.35);
    border-radius: 14px;
    background: rgba(61, 220, 151, 0.14);
    color: var(--auth-accent);
}

.auth-slide-icon svg {
    width: 24px;
    height: 24px;
}

.auth-slide-title {
    margin: 0 0 14px;
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
}

.auth-slide-text {
    margin: 0;
    max-width: 500px;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
}

.auth-slider-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 34px;
}

.auth-slider-footer .swiper-pagination {
    position: static;
    display: flex;
    gap: 6px;
    width: auto;
}

.auth-slider-footer .swiper-pagination-bullet {
    width: 18px;
    height: 5px;
    margin: 0 !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transition: width 0.3s ease, background 0.3s ease;
}

.auth-slider-footer .swiper-pagination-bullet-active {
    width: 32px;
    background: #fff;
}

.auth-slider-nav {
    display: flex;
    gap: 8px;
}

.auth-slider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.auth-slider-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

.auth-slider-btn:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.auth-slider-btn svg {
    width: 16px;
    height: 16px;
}

/* --------------------------------------------------------------------------
   Right form panel
   -------------------------------------------------------------------------- */

.auth-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 32px 40px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    background: var(--auth-surface);
}

.auth-panel-main {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.auth-form-wrap {
    width: 100%;
    max-width: 408px;
}

.auth-logo {
    display: block;
    width: auto;
    height: 40px;
    margin-bottom: 32px;
}

.auth-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--auth-primary-soft);
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-primary);
}

.auth-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
}

.auth-steps span {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: var(--auth-border);
}

.auth-steps span.is-done {
    background: var(--auth-primary);
}

.auth-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.auth-subtitle {
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--auth-muted);
}

/* Alerts (server flash messages) */

.auth-alert {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert-error {
    border-color: #f3caca;
    background: var(--auth-danger-bg);
    color: var(--auth-danger);
}

.auth-alert-success {
    border-color: #c4e8d4;
    background: var(--auth-success-bg);
    color: var(--auth-success);
}

/* Fields */

.auth-field {
    margin-bottom: 18px;
}

.auth-field-last {
    margin-bottom: 24px;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.auth-label-row .auth-label {
    margin-bottom: 0;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.auth-input {
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 1px solid var(--auth-border-strong);
    border-radius: var(--auth-radius);
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: var(--auth-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.auth-input::placeholder {
    color: #a0a9b8;
}

.auth-input:hover {
    border-color: #aeb8c8;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(36, 59, 100, 0.12);
}

.auth-input[readonly] {
    background: #f6f8fb;
    color: var(--auth-text-2);
}

.auth-input.has-toggle {
    padding-right: 76px;
}

.auth-input.has-prefix {
    padding-left: 60px;
}

.auth-input-prefix {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0 12px 0 16px;
    border-right: 1px solid var(--auth-border);
    margin: 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-text-2);
    pointer-events: none;
}

.auth-input.is-code {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.auth-input.is-code::placeholder {
    letter-spacing: 0.4em;
}

.auth-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    min-width: 58px;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-primary);
    cursor: pointer;
}

.auth-toggle:hover {
    background: var(--auth-primary-soft);
}

.auth-toggle:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: 1px;
}

.auth-hint {
    display: block;
    margin-top: 7px;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Button */

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 12px 20px;
    border: 1px solid var(--auth-primary);
    border-radius: var(--auth-radius);
    background: var(--auth-primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
}

.auth-btn:hover {
    border-color: var(--auth-primary-dark);
    background: var(--auth-primary-dark);
}

.auth-btn:active {
    transform: translateY(1px);
}

.auth-btn:focus-visible {
    outline: 3px solid rgba(36, 59, 100, 0.28);
    outline-offset: 2px;
}

.auth-btn svg {
    width: 18px;
    height: 18px;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    font-size: 14px;
    color: var(--auth-text-2);
}

.auth-check input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--auth-primary);
}

/* Info note */

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid #dce5f2;
    border-radius: var(--auth-radius);
    background: var(--auth-primary-soft);
    font-size: 13px;
    line-height: 1.6;
    color: #3a4b66;
}

.auth-note-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: var(--auth-primary);
}

.auth-note strong {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    color: var(--auth-primary);
}

.auth-switch {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--auth-muted);
}

/* Footer */

.auth-panel-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-secure svg {
    width: 14px;
    height: 14px;
    color: var(--auth-success);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1199.98px) {
    .auth-banner {
        padding: 36px 36px 40px;
    }

    .auth-mock {
        left: 12%;
    }
}

@media (max-width: 991.98px) {
    body.auth-body {
        padding: 0;
        background: var(--auth-surface);
    }

    .auth-shell {
        display: block;
        min-height: 100vh;
    }

    .auth-banner {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 24px 20px;
        border: 0;
        border-radius: 0;
    }

    .auth-panel-main {
        align-items: flex-start;
        padding: 16px 0 32px;
    }

    .auth-panel-footer {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .auth-logo {
        height: 34px;
        margin-bottom: 26px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-subtitle {
        margin-bottom: 24px;
        font-size: 14px;
    }
}

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

/* Fallback: show only the first slide until Swiper has initialised */
.auth-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

/* ==========================================================================
   LOGIN PAGE ONLY  (body.auth-login)
   Left 50% image slider · right 50% plain form · Inter · #17AE67
   ========================================================================== */

body.auth-login {
    --login-primary: #17AE67;
    --login-primary-dark: #128a52;
    --login-primary-ring: rgba(23, 174, 103, 0.18);
    --login-text: #111827;
    --login-muted: #6b7280;
    --login-border: #d1d5db;

    padding: 0;
    background: #ffffff;
    color: var(--login-text);
}

/* Inter everywhere on the login page, no other font */
body.auth-login,
body.auth-login * {
    font-family: "Inter", sans-serif !important;
}

.login-shell {
    display: grid;
    grid-template-columns: 50% 50%;
    min-height: 100vh;
}

/* Left: 3 image slides, full flat overlay, content per slide */

.login-media {
    position: sticky;
    top: 0;
    align-self: start;
    min-width: 0;
    height: 100vh;
    height: 100dvh;
    padding: 16px;
}

.login-slider {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: #1f2937;
    overflow: hidden;
}

.login-slider .swiper-slide {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.login-slider .swiper-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 35% center;
}

/* Full overlay over the whole image (flat, no gradient) */
.login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 18, 12, 0.6);
}

.login-slide-content {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 88px;
    z-index: 2;
    max-width: 560px;
    color: #ffffff;
}

.login-slide-tag {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #17AE67;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.login-slide-title {
    margin: 0 0 12px;
    font-size: clamp(28px, 2.6vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.login-slide-text {
    margin: 0;
    max-width: 480px;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.login-slider .swiper-pagination {
    left: 48px !important;
    bottom: 48px !important;
    width: auto !important;
    text-align: left;
    line-height: 0;
}

.login-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 8px 0 0 !important;
    background: #ffffff;
    opacity: 0.5;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.login-slider .swiper-pagination-bullet-active {
    width: 24px;
    border-radius: 999px;
    background: #17AE67;
    opacity: 1;
}

.login-slider:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

/* Right: plain form, no background, no border */

.login-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    padding: 32px 48px 28px;
}

.login-main {
    position: relative;
}

.login-topbar {
    position: absolute;
    top: 28px;
    right: 32px;
    z-index: 3;
}

.login-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.login-help svg {
    width: 16px;
    height: 16px;
    color: var(--login-primary);
}

.login-help:hover {
    border-color: var(--login-primary);
    background: rgba(23, 174, 103, 0.06);
    color: var(--login-text);
}

.login-help:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--login-primary-ring);
}

.login-center {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.login-form-wrap {
    width: 100%;
    max-width: 420px;
}

.login-logo {
    display: block;
    height: 52px;
    width: auto;
    margin-bottom: 36px;
}

.login-title {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--login-text);
}

.login-subtitle {
    margin: 0 0 32px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--login-muted);
}

.login-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.login-alert-error {
    background: #fef2f2;
    color: #b91c1c;
}

.login-alert-success {
    background: #ecfdf5;
    color: #047857;
}

.login-field {
    margin-bottom: 22px;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.login-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.login-label-row .login-label {
    margin-bottom: 0;
}

.login-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    background: #ffffff;
    font-size: 15px;
    color: var(--login-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input::placeholder {
    color: #9ca3af;
}

.login-input:focus,
.pin-box:focus {
    outline: none;
    border-color: var(--login-primary);
    box-shadow: 0 0 0 4px var(--login-primary-ring);
}

/* 4 PIN boxes */

.pin-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.pin-box {
    width: 100%;
    height: 56px;
    padding: 0;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    background: #ffffff;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    color: var(--login-text);
    caret-color: var(--login-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pin-box.is-filled {
    border-color: var(--login-primary);
}

.login-error {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #b91c1c;
}

.login-error[hidden] {
    display: none;
}

.login-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--login-primary);
    text-decoration: none;
}

.login-link:hover {
    color: var(--login-primary-dark);
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 10px;
    background: var(--login-primary);
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-btn:hover {
    background: var(--login-primary-dark);
}

.login-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--login-primary-ring);
}

.login-switch {
    margin: 24px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--login-muted);
}

.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #f0f1f3;
    font-size: 13px;
}

.login-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
}

.login-legal a {
    color: var(--login-muted);
    text-decoration: none;
}

.login-legal a:hover {
    color: var(--login-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Login responsive ---------- */

/* Large desktops */
@media (min-width: 1600px) {
    .login-form-wrap {
        max-width: 440px;
    }

    .login-slide-content {
        left: 64px;
        bottom: 104px;
    }

    .login-slider .swiper-pagination {
        left: 64px !important;
        bottom: 60px !important;
    }
}

/* Small desktops / laptops / tablet landscape */
@media (max-width: 1279.98px) {
    .login-shell {
        grid-template-columns: 50% 50%;
    }

    .login-main {
        padding: 28px 32px 24px;
    }

    .login-slide-content {
        left: 32px;
        right: 32px;
        bottom: 76px;
    }

    .login-slider .swiper-pagination {
        left: 32px !important;
        bottom: 40px !important;
    }

    .login-slide-title {
        font-size: clamp(24px, 2.8vw, 32px);
    }

    .login-slide-text {
        font-size: 15px;
    }
}

/* Short screens (laptops with small height) */
@media (min-width: 992px) and (max-height: 720px) {
    .login-main {
        padding-top: 20px;
        padding-bottom: 16px;
    }

    .login-logo {
        height: 44px;
    }

    .login-center {
        padding: 24px 0;
    }

    .login-title {
        font-size: 28px;
    }

    .login-subtitle {
        margin-bottom: 24px;
    }

    .login-field {
        margin-bottom: 18px;
    }
}

/* Tablets and phones: single column */
@media (max-width: 991.98px) {
    .login-shell {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-media {
        display: none;
    }

    .login-main {
        flex: 1;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 20px 24px 24px;
    }

    .login-logo {
        height: 44px;
    }

    .login-center {
        align-items: center;
        padding: 40px 0;
    }

    .login-footer {
        justify-content: center;
        text-align: center;
    }
}

/* Tablet portrait (tall screens): show image banner on top */
@media (min-width: 600px) and (max-width: 991.98px) and (min-height: 800px) {
    .login-media {
        display: block;
        position: relative;
        align-self: stretch;
        width: 100%;
        height: 320px;
        padding: 16px 16px 0;
    }

    .login-main {
        min-height: 0;
    }

    .login-slide-content {
        bottom: 64px;
    }

    .login-slider .swiper-pagination {
        bottom: 32px !important;
    }
}

/* Phones */
@media (max-width: 599.98px) {
    .login-main {
        padding: 16px 20px 20px;
    }

    .login-logo {
        height: 36px;
    }

    .login-help {
        padding: 7px 12px;
        font-size: 12px;
    }

    .login-center {
        align-items: flex-start;
        padding: 36px 0 32px;
    }

    .login-title {
        font-size: 26px;
    }

    .login-subtitle {
        margin-bottom: 26px;
        font-size: 14px;
    }

    .pin-boxes {
        gap: 10px;
    }

    .pin-box {
        height: 52px;
        font-size: 20px;
    }

    .login-footer {
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
    }
}

/* Very small phones */
@media (max-width: 359.98px) {
    .login-main {
        padding: 14px 16px 16px;
    }

    .login-help span,
    .login-help {
        font-size: 12px;
    }

    .pin-boxes {
        gap: 8px;
    }

    .pin-box {
        height: 48px;
    }

    .login-legal {
        gap: 14px;
    }
}

/* Phone landscape (short height) */
@media (max-width: 991.98px) and (max-height: 480px) {
    .login-center {
        align-items: flex-start;
        padding: 20px 0;
    }
}

/* Login: PIN show/hide + forgot link */

.pin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    margin-right: -6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--login-muted);
    cursor: pointer;
}

.pin-toggle:hover {
    color: var(--login-text);
}

.pin-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--login-primary-ring);
}

.pin-toggle svg {
    width: 18px;
    height: 18px;
}

.pin-toggle .icon-eye-off,
.pin-toggle[aria-pressed="true"] .icon-eye {
    display: none;
}

.pin-toggle[aria-pressed="true"] .icon-eye-off {
    display: block;
}

.pin-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.pin-actions .pin-toggle {
    margin: 0 0 0 -6px;
}


/* Login: help badge position + logo spacing per screen */
@media (min-width: 992px) and (max-height: 720px) {
    .login-topbar { top: 20px; }
    .login-logo { margin-bottom: 24px; }
}

@media (max-width: 991.98px) {
    .login-topbar { top: 20px; right: 24px; }
}

@media (max-width: 599.98px) {
    .login-topbar { top: 16px; right: 20px; }
    .login-center { padding-top: 16px; }
    .login-logo { margin-bottom: 28px; }
}

@media (max-width: 359.98px) {
    .login-topbar { top: 14px; right: 16px; }
}

/* ==========================================================================
   REGISTER PAGE (body.auth-login.auth-register) — extras on top of login
   ========================================================================== */

.login-step {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--login-primary);
}

.login-steps {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
}

.login-steps span {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #e5e7eb;
}

.login-steps span.is-done {
    background: var(--login-primary);
}

.login-input-wrap {
    position: relative;
}

.login-input-prefix {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    padding-right: 12px;
    border-right: 1px solid #e5e7eb;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    color: #374151;
    pointer-events: none;
}

.login-input.has-prefix {
    padding-left: 62px;
}

.login-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--login-muted);
}

.login-consent {
    margin: 14px 0 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: var(--login-muted);
}

.login-consent .login-link {
    font-size: 13px;
}

.auth-register .login-logo {
    margin-bottom: 28px;
}

.auth-register .login-field {
    margin-bottom: 18px;
}

.auth-register .login-btn {
    margin-top: 8px;
}

@media (min-width: 992px) and (max-height: 820px) {
    .auth-register .login-logo {
        height: 44px;
        margin-bottom: 20px;
    }

    .auth-register .login-title {
        font-size: 26px;
    }

    .auth-register .login-subtitle {
        margin-bottom: 22px;
    }

    .auth-register .login-center {
        padding: 20px 0;
    }

    .auth-register .login-field {
        margin-bottom: 14px;
    }
}

@media (max-width: 599.98px) {
    .auth-register .login-title {
        font-size: 24px;
    }
}

/* ==========================================================================
   VERIFY PAGE (body.auth-verify) — 6-box OTP
   ========================================================================== */

.otp-boxes {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.otp-box {
    width: 100%;
    min-width: 0;
    height: 54px;
    padding: 0;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    background: #ffffff;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    color: var(--login-text);
    caret-color: var(--login-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.otp-box:focus {
    outline: none;
    border-color: var(--login-primary);
    box-shadow: 0 0 0 4px var(--login-primary-ring);
}

.otp-box.is-filled {
    border-color: var(--login-primary);
}

.auth-verify .login-field {
    margin-bottom: 22px;
}

.auth-verify .login-error + .login-hint,
.auth-verify .login-error:not([hidden]) {
    margin-top: 8px;
}

@media (max-width: 599.98px) {
    .otp-boxes {
        gap: 8px;
    }

    .otp-box {
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 359.98px) {
    .otp-boxes {
        gap: 6px;
    }

    .otp-box {
        height: 44px;
        font-size: 18px;
    }
}

/* Verify page: invalid state, shake, loading button */

.otp-boxes.is-invalid .otp-box {
    border-color: #dc2626;
    background: #fffafa;
}

.otp-boxes.is-invalid .otp-box:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.otp-boxes.shake {
    animation: otp-shake 0.4s ease;
}

@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.auth-verify .login-alert[hidden] {
    display: none;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:disabled {
    cursor: progress;
    opacity: 0.85;
}

.login-btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-spin 0.7s linear infinite;
}

.login-btn.is-loading .login-btn-spinner {
    display: inline-block;
}

@keyframes login-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   SET PIN PAGE (body.auth-setpin) — 4-box PIN groups
   ========================================================================== */

.otp-boxes.is-pin {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.otp-boxes.is-pin .otp-box {
    height: 56px;
}

.login-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0 0;
    font-size: 13px;
    color: var(--login-muted);
}

.login-note svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    color: var(--login-primary);
}

@media (max-width: 599.98px) {
    .otp-boxes.is-pin {
        gap: 10px;
    }

    .otp-boxes.is-pin .otp-box {
        height: 52px;
    }
}

/* Shared: red + shake for login PIN boxes (same as OTP / set-PIN boxes) */

.pin-boxes.is-invalid .pin-box {
    border-color: #dc2626;
    background: #fffafa;
}

.pin-boxes.is-invalid .pin-box:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.pin-boxes.shake {
    animation: otp-shake 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
    .pin-boxes.shake,
    .otp-boxes.shake {
        animation: none;
    }
}

.auth-login .login-alert[hidden] {
    display: none;
}

/* Lockout: disabled boxes + button while the countdown runs */

.pin-box:disabled,
.otp-box:disabled {
    background: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.login-btn.is-locked,
.login-btn.is-locked:hover {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 1;
    font-variant-numeric: tabular-nums;
}

.login-alert {
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   2FA SETUP PAGE (body.auth-2fa)
   ========================================================================== */

.auth-2fa .login-logo {
    margin-bottom: 28px;
}

.auth-2fa .login-subtitle {
    margin-bottom: 20px;
}

.tfa-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f6f7f9;
    font-size: 14px;
}

.tfa-account span {
    color: var(--login-muted);
}

.tfa-account strong {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--login-text);
}

.tfa-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tfa-step {
    position: relative;
    display: flex;
    gap: 16px;
    padding-bottom: 28px;
}

/* connecting line between step numbers */
.tfa-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: 6px;
    left: 13px;
    width: 2px;
    background: #e5e7eb;
}

.tfa-step:last-child {
    padding-bottom: 0;
}

.tfa-step-num {
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(23, 174, 103, 0.12);
    font-size: 13px;
    font-weight: 700;
    color: var(--login-primary);
}

.tfa-step-body {
    flex: 1;
    min-width: 0;
    padding-top: 3px;
}

.tfa-step-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--login-text);
}

.tfa-step-text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--login-muted);
}

.tfa-step-text strong {
    font-weight: 600;
    color: #374151;
}

/* QR */

.tfa-qr {
    display: inline-flex;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.tfa-qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 176px;
    height: 176px;
}

.tfa-qr-code img,
.tfa-qr-code canvas {
    display: block;
    width: 176px !important;
    height: 176px !important;
}

.tfa-qr-loading,
.tfa-qr-error {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: var(--login-muted);
}

.tfa-qr-error {
    color: #b91c1c;
}

/* Setup key */

.tfa-key {
    margin-top: 14px;
}

.tfa-key summary {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: var(--login-primary);
    cursor: pointer;
    list-style: none;
}

.tfa-key summary::-webkit-details-marker {
    display: none;
}

.tfa-key summary::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.2s ease;
}

.tfa-key[open] summary::after {
    transform: translateY(0) rotate(-135deg);
}

.tfa-key summary:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tfa-key summary:focus-visible {
    outline: none;
    border-radius: 4px;
    box-shadow: 0 0 0 3px var(--login-primary-ring);
}

.tfa-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 8px 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.tfa-key-value {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--login-text);
}

.tfa-key-btn {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.tfa-key-btn:hover {
    border-color: var(--login-primary);
    color: var(--login-primary);
}

.tfa-key-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--login-primary-ring);
}

.tfa-key-btn.is-done {
    border-color: var(--login-primary);
    color: var(--login-primary);
}

.tfa-key-hint {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--login-muted);
}

.tfa-key-hint strong {
    font-weight: 600;
    color: #374151;
}

.auth-2fa .otp-boxes {
    gap: 8px;
}

.auth-2fa .otp-box {
    height: 50px;
}

.auth-2fa .login-btn {
    margin-top: 4px;
}

@media (max-width: 599.98px) {
    .tfa-step {
        gap: 12px;
    }

    .tfa-step:not(:last-child)::before {
        left: 13px;
    }

    .tfa-qr-code,
    .tfa-qr-code img,
    .tfa-qr-code canvas {
        width: 160px !important;
        height: 160px !important;
    }

    .auth-2fa .otp-box {
        height: 44px;
        font-size: 18px;
    }

    .tfa-key-row {
        flex-wrap: wrap;
    }

    .tfa-key-value {
        flex-basis: 100%;
        margin-bottom: 4px;
    }
}

/* ---------- 2FA setup: compact, fits one screen ---------- */

.auth-2fa .login-form-wrap {
    max-width: 440px;
}

.auth-2fa .login-logo {
    height: 44px;
    margin-bottom: 20px;
}

.auth-2fa .login-step {
    margin-bottom: 8px;
}

.auth-2fa .login-title {
    margin-bottom: 8px;
    font-size: 26px;
}

.auth-2fa .login-subtitle {
    margin-bottom: 22px;
    font-size: 14px;
}

.tfa-mid {
    font-weight: 600;
    color: var(--login-text);
    white-space: nowrap;
}

.auth-2fa .tfa-step {
    padding-bottom: 22px;
}

.auth-2fa .tfa-step-title {
    margin-bottom: 12px;
    font-size: 15px;
}

.tfa-scan {
    display: flex;
    align-items: center;
    gap: 18px;
}

.auth-2fa .tfa-qr {
    flex: 0 0 auto;
    padding: 8px;
    border-radius: 12px;
}

.auth-2fa .tfa-qr-code,
.auth-2fa .tfa-qr-code img,
.auth-2fa .tfa-qr-code canvas {
    width: 128px !important;
    height: 128px !important;
}

.tfa-scan-text .tfa-step-text {
    margin-bottom: 8px;
}

.tfa-muted {
    font-size: 13px !important;
    color: #9ca3af !important;
}

.auth-2fa .tfa-key {
    margin-top: 10px;
}

.auth-2fa .tfa-key summary {
    font-size: 13px;
}

.auth-2fa .login-field {
    margin-bottom: 16px;
}

.auth-2fa .login-hint {
    margin-top: 6px;
}

.auth-2fa .otp-box {
    height: 48px;
}

/* Laptop screens (up to 900px tall): tighten so nothing scrolls */
@media (min-width: 992px) and (max-height: 900px) {
    .auth-2fa .login-center {
        padding: 12px 0;
    }

    .auth-2fa .login-main {
        padding-top: 16px;
        padding-bottom: 12px;
    }

    .auth-2fa .login-logo {
        height: 36px;
        margin-bottom: 14px;
    }

    .auth-2fa .login-title {
        font-size: 24px;
    }

    .auth-2fa .login-subtitle {
        margin-bottom: 16px;
    }

    .auth-2fa .tfa-step {
        padding-bottom: 16px;
    }

    .auth-2fa .tfa-qr-code,
    .auth-2fa .tfa-qr-code img,
    .auth-2fa .tfa-qr-code canvas {
        width: 112px !important;
        height: 112px !important;
    }

    .auth-2fa .otp-box {
        height: 44px;
    }

    .auth-2fa .login-btn {
        height: 46px;
    }

    .auth-2fa .login-footer {
        padding-top: 12px;
    }
}

@media (max-width: 599.98px) {
    .tfa-scan {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .auth-2fa .tfa-qr-code,
    .auth-2fa .tfa-qr-code img,
    .auth-2fa .tfa-qr-code canvas {
        width: 160px !important;
        height: 160px !important;
    }
}

/* 2FA: "Hide" toggle sits on the step title line; label kept for screen readers */
.auth-2fa .tfa-step-body {
    position: relative;
}

.auth-2fa .login-label-row {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
}

.auth-2fa .login-label-row .login-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (min-width: 992px) and (max-height: 900px) {
    .auth-2fa .login-topbar {
        top: 16px;
    }

    .auth-2fa .login-step {
        margin-bottom: 4px;
    }

    .auth-2fa .tfa-step-title {
        margin-bottom: 10px;
    }

    .auth-2fa .login-field {
        margin-bottom: 12px;
    }

    .auth-2fa .tfa-scan-text .tfa-step-text {
        font-size: 13px;
    }
}

/* Very short screens */
@media (min-width: 992px) and (max-height: 700px) {
    .auth-2fa .login-logo {
        height: 32px;
        margin-bottom: 10px;
    }

    .auth-2fa .login-title {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .auth-2fa .login-subtitle {
        margin-bottom: 12px;
        font-size: 13px;
    }

    .auth-2fa .tfa-step {
        padding-bottom: 12px;
    }

    .auth-2fa .tfa-qr-code,
    .auth-2fa .tfa-qr-code img,
    .auth-2fa .tfa-qr-code canvas {
        width: 100px !important;
        height: 100px !important;
    }

    .auth-2fa .tfa-muted {
        display: none;
    }

    .auth-2fa .otp-box {
        height: 40px;
        font-size: 18px;
    }

    .auth-2fa .login-btn {
        height: 42px;
    }
}

/* 2FA on tablets: no image banner, so the setup fits the screen */
@media (max-width: 991.98px) {
    .auth-2fa .login-media {
        display: none !important;
    }

    .auth-2fa .login-main {
        min-height: 100vh;
        min-height: 100dvh;
    }
}

/* 2FA on phones: QR beside the text, tighter spacing */
@media (max-width: 599.98px) {
    .auth-2fa .tfa-scan {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .auth-2fa .tfa-qr-code,
    .auth-2fa .tfa-qr-code img,
    .auth-2fa .tfa-qr-code canvas {
        width: 112px !important;
        height: 112px !important;
    }

    .auth-2fa .tfa-muted {
        display: none;
    }

    .auth-2fa .login-center {
        padding: 20px 0 16px;
    }

    .auth-2fa .login-logo {
        height: 32px;
        margin-bottom: 16px;
    }

    .auth-2fa .login-title {
        font-size: 22px;
    }

    .auth-2fa .login-subtitle {
        margin-bottom: 18px;
        font-size: 13px;
    }

    .auth-2fa .tfa-step {
        gap: 12px;
        padding-bottom: 16px;
    }

    .auth-2fa .otp-box {
        height: 44px;
    }
}

/* Leave room for the Hide toggle beside the step 2 title */
.auth-2fa .tfa-step:last-child .tfa-step-title {
    padding-right: 72px;
}

/* ==========================================================================
   2FA VERIFY (sign-in step 2) — body.auth-2fa-verify
   ========================================================================== */

.auth-2fa-verify .login-steps {
    max-width: 120px;
}

.auth-2fa-verify .otp-boxes {
    gap: 10px;
}

.auth-2fa-verify .otp-box {
    height: 56px;
}

.auth-2fa-verify .login-hint {
    margin-top: 8px;
}

@media (max-width: 599.98px) {
    .auth-2fa-verify .otp-box {
        height: 48px;
    }
}

@media (min-width: 992px) and (max-height: 900px) {
    .auth-2fa-verify .login-center {
        padding: 16px 0;
    }

    .auth-2fa-verify .login-logo {
        height: 40px;
        margin-bottom: 22px;
    }

    .auth-2fa-verify .login-note {
        margin-top: 16px;
    }

    .auth-2fa-verify .login-switch {
        margin-top: 18px;
    }
}

@media (max-width: 991.98px) {
    .auth-2fa-verify .login-center {
        padding: 24px 0;
    }

    .auth-2fa-verify .login-note {
        margin-top: 16px;
    }
}

@media (min-width: 600px) and (max-width: 991.98px) and (min-height: 800px) {
    .auth-2fa-verify .login-media {
        height: 280px;
    }
}

@media (max-width: 599.98px) {
    .auth-2fa-verify .login-center {
        padding: 12px 0;
    }

    .auth-2fa-verify .login-logo {
        margin-bottom: 20px;
    }

    .auth-2fa-verify .login-subtitle {
        margin-bottom: 20px;
    }

    .auth-2fa-verify .login-switch {
        margin-top: 16px;
    }
}

/* ==========================================================================
   HELP CENTER (merchant/auth/help.php) — body.hc-page
   ========================================================================== */
body.hc-page {
    --hc-primary: #17AE67;
    --hc-primary-dark: #128a52;
    --hc-primary-soft: #eaf7f0;
    --hc-ink: #111827;
    --hc-text: #374151;
    --hc-muted: #6b7280;
    --hc-faint: #9ca3af;
    --hc-line: #e5e7eb;
    --hc-bg: #f9fafb;
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--hc-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
.hc-page a { color: var(--hc-primary-dark); }
html:has(body.hc-page) { scroll-behavior: smooth; }
.hc-page [hidden] { display: none !important; }
.hc-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.hc-topbar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--hc-line);
}
.hc-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.hc-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.hc-brand img { height: 32px; width: auto; display: block; }
.hc-brand-tag {
    padding-left: 12px; border-left: 1px solid var(--hc-line);
    font-size: 15px; font-weight: 600; color: var(--hc-ink);
}
.hc-topnav { display: flex; align-items: center; gap: 22px; }
.hc-topnav a { font-size: 14px; font-weight: 500; color: var(--hc-text); text-decoration: none; }
.hc-topnav a:hover { color: var(--hc-primary-dark); }
.hc-btn {
    display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px;
    border-radius: 10px; font-weight: 600; text-decoration: none;
}
.hc-btn-ghost { border: 1px solid var(--hc-line); color: var(--hc-ink) !important; }
.hc-btn-ghost:hover { border-color: var(--hc-primary); }

/* Hero */
.hc-hero {
    padding: 64px 0 56px; text-align: center;
    background:
        radial-gradient(600px 240px at 50% 0%, rgba(23, 174, 103, .10), transparent 70%),
        linear-gradient(180deg, #f6fbf8 0%, #fff 100%);
    border-bottom: 1px solid var(--hc-line);
}
.hc-hero-title { margin: 0 0 8px; font-size: 36px; font-weight: 700; letter-spacing: -.025em; color: var(--hc-ink); }
.hc-hero-sub { margin: 0 auto 28px; max-width: 560px; font-size: 15px; color: var(--hc-muted); }
.hc-search {
    position: relative; display: flex; align-items: center; max-width: 620px; margin: 0 auto;
    height: 56px; padding: 0 16px 0 48px; border-radius: 14px; background: #fff;
    border: 1px solid var(--hc-line); box-shadow: 0 10px 30px -12px rgba(17, 24, 39, .18);
    transition: border-color .15s, box-shadow .15s;
}
.hc-search:focus-within { border-color: var(--hc-primary); box-shadow: 0 0 0 4px rgba(23, 174, 103, .15), 0 10px 30px -12px rgba(17, 24, 39, .18); }
.hc-search > i { position: absolute; left: 18px; font-size: 18px; color: var(--hc-faint); }
.hc-search input {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent;
    font: inherit; font-size: 15px; color: var(--hc-ink);
}
.hc-search input::placeholder { color: var(--hc-faint); }
.hc-kbd {
    flex: none; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--hc-line);
    background: var(--hc-bg); font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--hc-muted);
}
.hc-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; }
.hc-popular span { font-size: 13px; color: var(--hc-muted); }
.hc-popular button {
    padding: 5px 12px; border-radius: 999px; border: 1px solid var(--hc-line); background: #fff;
    font: inherit; font-size: 13px; color: var(--hc-text); cursor: pointer;
}
.hc-popular button:hover { border-color: var(--hc-primary); color: var(--hc-primary-dark); }

/* Sections */
.hc-main { padding-top: 48px; padding-bottom: 64px; }
.hc-section { margin-bottom: 48px; }
.hc-section-title { margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--hc-ink); letter-spacing: -.01em; }

.hc-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hc-topic {
    display: flex; flex-direction: column; gap: 4px; padding: 18px;
    border: 1px solid var(--hc-line); border-radius: 14px; background: #fff; text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hc-topic:hover { border-color: var(--hc-primary); box-shadow: 0 10px 24px -14px rgba(17, 24, 39, .25); transform: translateY(-2px); }
.hc-topic-icon {
    width: 40px; height: 40px; border-radius: 12px; margin-bottom: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--hc-primary-soft); color: var(--hc-primary-dark); font-size: 18px;
}
.hc-topic strong { font-size: 15px; font-weight: 600; color: var(--hc-ink); }
.hc-topic small { font-size: 13px; color: var(--hc-muted); line-height: 1.45; }
body.is-searching .hc-section { display: none; }

/* Articles */
.hc-articles-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.hc-toc { position: sticky; top: 88px; display: grid; gap: 2px; }
.hc-toc-title {
    margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--hc-faint);
}
.hc-toc a {
    padding: 7px 12px; border-left: 2px solid var(--hc-line);
    font-size: 13px; color: var(--hc-muted); text-decoration: none;
}
.hc-toc a:hover { color: var(--hc-ink); }
.hc-toc a.is-active { border-left-color: var(--hc-primary); color: var(--hc-ink); font-weight: 600; }

.hc-group { margin-bottom: 36px; scroll-margin-top: 84px; }
.hc-group-title {
    display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
    font-size: 17px; font-weight: 600; color: var(--hc-ink);
}
.hc-group-title i { color: var(--hc-primary); }

.hc-faq { border: 1px solid var(--hc-line); border-radius: 12px; background: #fff; }
.hc-faq + .hc-faq { margin-top: 8px; }
.hc-faq summary {
    position: relative; list-style: none; cursor: pointer;
    padding: 15px 48px 15px 18px; font-size: 15px; font-weight: 500; color: var(--hc-ink);
}
.hc-faq summary::-webkit-details-marker { display: none; }
.hc-faq summary::after {
    content: "\F282"; font-family: "bootstrap-icons"; position: absolute; right: 18px; top: 50%;
    transform: translateY(-50%); font-size: 14px; color: var(--hc-faint); transition: transform .2s;
}
.hc-faq[open] { border-color: #d1d5db; box-shadow: 0 6px 16px -10px rgba(17, 24, 39, .18); }
.hc-faq[open] summary { color: var(--hc-primary-dark); }
.hc-faq[open] summary::after { transform: translateY(-50%) rotate(180deg); color: var(--hc-primary); }
.hc-faq summary:focus-visible { outline: 2px solid var(--hc-primary); outline-offset: 2px; border-radius: 12px; }
.hc-answer { padding: 0 18px 16px; color: var(--hc-text); font-size: 14px; }
.hc-answer p { margin: 0 0 10px; }
.hc-answer p:last-child { margin-bottom: 0; }
.hc-answer ol, .hc-answer ul { margin: 0 0 10px; padding-left: 20px; }
.hc-answer li { margin-bottom: 6px; }
.hc-answer li:last-child { margin-bottom: 0; }
.hc-tip {
    display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--hc-bg);
    font-size: 13px; color: var(--hc-muted);
}
.hc-inline-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 600; text-decoration: none; }
.hc-checks { list-style: none; padding-left: 0 !important; }
.hc-checks li { position: relative; padding-left: 26px; }
.hc-checks li::before {
    content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0;
    color: var(--hc-primary);
}
.hc-dl { margin: 0; border: 1px solid var(--hc-line); border-radius: 10px; }
.hc-dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 12px; }
.hc-dl > div + div { border-top: 1px solid var(--hc-line); }
.hc-dl dt { font-weight: 600; color: var(--hc-ink); }
.hc-dl dd { margin: 0; }

.hc-empty {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 40px 20px; border: 1px dashed #d1d5db; border-radius: 14px; color: var(--hc-muted);
}
.hc-empty i { font-size: 24px; color: var(--hc-faint); }
.hc-empty strong { color: var(--hc-ink); }
body.is-searching .hc-toc { visibility: hidden; }

/* Contact */
.hc-contact {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center;
    margin-top: 24px; padding: 32px; border-radius: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #e5e7eb; scroll-margin-top: 84px;
}
.hc-contact h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #fff; }
.hc-contact p { margin: 0; color: #cbd5e1; }
.hc-contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hc-contact-card {
    display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
    text-decoration: none; transition: background .15s, border-color .15s;
}
.hc-contact-card:hover { background: rgba(255, 255, 255, .1); border-color: rgba(52, 211, 153, .6); }
.hc-contact-icon {
    width: 36px; height: 36px; border-radius: 10px; margin-bottom: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--hc-primary); color: #fff; font-size: 16px;
}
.hc-contact-card strong { color: #fff; font-size: 14px; }
.hc-contact-card small { color: #94a3b8; font-size: 12px; }

/* Footer */
.hc-footer { border-top: 1px solid var(--hc-line); padding: 20px 0; font-size: 13px; color: var(--hc-muted); }
.hc-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hc-footer nav { display: flex; gap: 20px; }
.hc-footer a { color: var(--hc-muted); text-decoration: none; }
.hc-footer a:hover { color: var(--hc-ink); }

/* Responsive */
@media (max-width: 991.98px) {
    .hc-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hc-articles-layout { grid-template-columns: minmax(0, 1fr); }
    .hc-toc { display: none; }
    .hc-contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
    .hc-topnav a:not(.hc-btn) { display: none; }
    .hc-brand img { height: 26px; }
    .hc-brand-tag { font-size: 14px; }
    .hc-hero { padding: 40px 0 36px; }
    .hc-hero-title { font-size: 28px; }
    .hc-search { height: 50px; }
    .hc-kbd { display: none; }
    .hc-topics { gap: 10px; }
    .hc-topic { padding: 14px; }
    .hc-topic small { display: none; }
    .hc-faq summary { font-size: 14px; }
    .hc-contact { padding: 22px; }
    .hc-contact-cards { grid-template-columns: minmax(0, 1fr); }
    .hc-contact-card { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
    .hc-contact-icon { margin: 0; }
    .hc-contact-card small { flex-basis: 100%; padding-left: 48px; margin-top: -6px; }
    .hc-dl > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
    .hc-topic, .hc-faq summary::after { transition: none; }
    .hc-topic:hover { transform: none; }
}
