/*
 * Vendofy — panel logowania na stronie „Moje konto" (wygląd jak w VendoLearning)
 * oraz sekcja „Logowanie dwuetapowe (2FA)" w „Moje konto → Szczegóły konta".
 *
 * Szablony: woocommerce/myaccount/ (karta logowania, reset hasła, ustawianie
 * hasła), includes/class-vendo-2fa-account.php (sekcja 2FA).
 *
 * ── KOLORY ─────────────────────────────────────────────────────────────────
 * Wpisane na sztywno, bez zmiennych CSS:
 *     akcent        #7c3aed   (najechanie #6d28d9, jasne tło #f5f3ff)
 *     tekst         #1f2937   (przygaszony #6b7280)
 *     ramki         #e0e0e0   (pola #c4c4c4)
 *     sukces        #15803d   błąd #b91c1c
 *
 * ── WŁASNY WYGLĄD ──────────────────────────────────────────────────────────
 * Nadpisuj zwykłym CSS-em (Wygląd → Dostosuj → Dodatkowy CSS albo arkusz
 * motywu). Właściwości, o które spierają się motywy i Elementor, mają tu
 * !important — w nadpisaniu dodaj !important i ten sam albo mocniejszy selektor:
 *
 *     .vendo-login .vendo-login__submit { background: #111827 !important; }
 *     .vendo-login .vendo-login__submit:hover { background: #000 !important; }
 *     .vendo-login .vendo-login__input:focus { border-color: #111827 !important; }
 *     .vendo-login .vendo-login__link { color: #111827 !important; }
 *
 * Najważniejsze klasy: .vendo-login (całość), __card (karta), __panel (ekran),
 * __title, __subtitle, __text, __field, __label, __input, __pass (pole hasła
 * z okiem), __eye, __check, __msg (.is-ok / .is-error), __submit
 * (.is-loading, --secondary), __links, __link, __rules (.is-met / .is-missing),
 * __notices, __foot; sekcja 2FA: .vendo-2fa, __btn (--danger, --ghost),
 * __input, __qr, __secret, __codes, __code-list.
 *
 * ── DLACZEGO !important ────────────────────────────────────────────────────
 * Motywy i Elementor stylują pola selektorami w rodzaju
 * `.elementor-kit-5 input:not([type="button"]):not([type="submit"])` (0,3,1),
 * a WooCommerce dokłada `.woocommerce form.login { border… }`. Wymuszamy tylko
 * właściwości, o które faktycznie trwa spór.
 *
 * Copyright (c) 2024-obecnie Igor Roman. Wszelkie prawa zastrzeżone.
 */

/* ===========================================================================
   KARTA
   =========================================================================== */

.vendo-login {
    display: block !important;
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    margin: 0 auto !important;
    padding: 24px 0 !important;
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
}

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

/* Ekrany karty chowamy atrybutem hidden — motywy potrafią nadpisać display
   formularzy, a WooCommerce bez JavaScriptu wymusza
   `.woocommerce-no-js form.woocommerce-form-login { display: block !important }`. */
.vendo-login [hidden],
.vendo-login form.vendo-login__panel[hidden] {
    display: none !important;
}

.vendo-login__card {
    position: relative;
    width: 100%;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.vendo-login .vendo-login__title {
    margin: 0 0 12px !important;
    padding: 0 !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    font-size: 1.4em !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
}

.vendo-login .vendo-login__subtitle {
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    font-size: 1.15em !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
}

.vendo-login .vendo-login__text {
    margin: 0 0 16px !important;
    color: #6b7280;
}

.vendo-login .vendo-login__account {
    margin: -6px 0 16px !important;
    color: #6b7280;
    font-size: 0.92em;
    overflow-wrap: anywhere;
}
.vendo-login .vendo-login__account strong {
    color: #1f2937;
    font-weight: 600;
}

/* WooCommerce obrysowuje form.login / form.register — w karcie to podwójna ramka. */
.vendo-login form.vendo-login__form {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

/* ===========================================================================
   POLA
   =========================================================================== */

.vendo-login .vendo-login__field {
    margin: 0 0 14px;
}

.vendo-login .vendo-login__label {
    display: block !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.vendo-login .vendo-login__input {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    background: #ffffff !important;
    border: 1px solid #c4c4c4 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    outline: none !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    font-size: 1em !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.vendo-login .vendo-login__input::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.vendo-login .vendo-login__input:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25) !important;
}

.vendo-login .vendo-login__input[aria-invalid="true"] {
    border-color: #b91c1c !important;
}
.vendo-login .vendo-login__input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.2) !important;
}

/* Kod z aplikacji — szerokie odstępy, łatwiej przepisać. */
.vendo-login .vendo-login__input--code {
    font-size: 1.15em !important;
    letter-spacing: 0.15em !important;
}

/* Autouzupełnianie Chrome maluje pole na żółto — przywracamy białe tło. */
.vendo-login .vendo-login__input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #1f2937 !important;
}

/* Pole dla menedżerów haseł — obecne w formularzu, niewidoczne na ekranie. */
.vendo-login .vendo-login__sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --- Pole hasła z podglądem (oko) --- */
.vendo-login .vendo-login__pass {
    position: relative;
}

.vendo-login .vendo-login__pass .vendo-login__input {
    padding-right: 46px !important;
}

.vendo-login .vendo-login__eye {
    position: absolute !important;
    top: 50% !important;
    right: 6px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #6b7280 !important;
    font-size: inherit !important;
    line-height: 1 !important;
    cursor: pointer;
    transform: translateY(-50%);
}
.vendo-login .vendo-login__eye:hover,
.vendo-login .vendo-login__eye:focus {
    background: transparent !important;
    color: #7c3aed !important;
}
.vendo-login .vendo-login__eye:focus-visible {
    outline: 2px solid #7c3aed !important;
    outline-offset: 1px;
}

.vendo-login .vendo-login__eye svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.vendo-login .vendo-login__eye .vendo-login__eye-closed,
.vendo-login .vendo-login__eye[aria-pressed="true"] .vendo-login__eye-open {
    display: none;
}
.vendo-login .vendo-login__eye[aria-pressed="true"] .vendo-login__eye-closed {
    display: block;
}

/* --- Zapamiętaj mnie --- */
.vendo-login .vendo-login__check {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    color: #1f2937 !important;
    font-size: 1em !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    cursor: pointer;
}
.vendo-login .vendo-login__check input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #7c3aed;
    cursor: pointer;
}

/* ===========================================================================
   KOMUNIKAT W KARCIE (wynik wysyłki)
   =========================================================================== */

.vendo-login .vendo-login__msg {
    min-height: 1.2em;
    margin: 0 0 12px;
    font-size: 0.95em;
    line-height: 1.45;
}
.vendo-login .vendo-login__msg.is-ok {
    color: #15803d;
}
.vendo-login .vendo-login__msg.is-error {
    color: #b91c1c;
}
.vendo-login .vendo-login__msg ul {
    margin: 4px 0 0 !important;
    padding: 0 0 0 1.2em !important;
}
.vendo-login .vendo-login__msg li {
    margin: 0 !important;
    list-style: disc !important;
}

/* ===========================================================================
   PRZYCISKI I LINKI
   =========================================================================== */

/* WooCommerce dokłada .woocommerce-form-login__submit { float: left } — w karcie przycisk zajmuje całą szerokość. */
.vendo-login .vendo-login__submit {
    display: flex !important;
    float: none !important;
    clear: both;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 13px 18px !important;
    background: #7c3aed !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-align: center;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: normal;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.vendo-login .vendo-login__submit:hover,
.vendo-login .vendo-login__submit:focus {
    background: #6d28d9 !important;
    color: #ffffff !important;
}
.vendo-login .vendo-login__submit:focus-visible {
    outline: 2px solid #7c3aed !important;
    outline-offset: 2px;
}
.vendo-login .vendo-login__submit:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Stan „wysyłanie": tekst z data-loading i kręcące się kółko. */
.vendo-login .vendo-login__submit.is-loading::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: vendo-login-spin 0.8s linear infinite;
}
.vendo-login .vendo-login__submit.is-loading:disabled {
    opacity: 0.85;
}

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

.vendo-login .vendo-login__submit--secondary {
    background: #6b7280 !important;
}
.vendo-login .vendo-login__submit--secondary:hover,
.vendo-login .vendo-login__submit--secondary:focus {
    background: #4b5563 !important;
}

.vendo-login .vendo-login__links {
    margin: 14px 0 0 !important;
    color: #1f2937;
    font-size: 0.92em;
    text-align: center;
}
.vendo-login .vendo-login__links--muted {
    margin-top: 8px !important;
    color: #6b7280;
}

.vendo-login .vendo-login__link {
    color: #7c3aed !important;
    font-weight: 400;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    border: 0 !important;
    box-shadow: none !important;
}
.vendo-login .vendo-login__link:hover,
.vendo-login .vendo-login__link:focus {
    color: #6d28d9 !important;
}

.vendo-login .vendo-login__foot {
    margin: 20px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid #e0e0e0;
    color: #6b7280;
    font-size: 0.92em;
    text-align: center;
}
.vendo-login .vendo-login__foot p { margin: 0 0 8px; }
.vendo-login .vendo-login__foot p:last-child { margin-bottom: 0; }
.vendo-login .vendo-login__foot a { color: #7c3aed; }

/* ===========================================================================
   WYMAGANIA HASŁA (○ → ✓)
   =========================================================================== */

.vendo-login .vendo-login__rules-title,
.woocommerce-EditAccountForm .vendo-login__rules-title {
    margin: 10px 0 0 !important;
    color: #6b7280;
    font-size: 0.88em;
    font-weight: 600;
}

.vendo-login .vendo-login__rules,
.woocommerce-EditAccountForm .vendo-login__rules {
    margin: 6px 0 0 !important;
    padding: 10px 12px !important;
    list-style: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.88em;
    line-height: 1.4;
}

.vendo-login .vendo-login__rules li,
.woocommerce-EditAccountForm .vendo-login__rules li {
    position: relative;
    margin: 0 0 4px !important;
    padding: 0 0 0 22px !important;
    list-style: none !important;
    transition: color 0.2s ease;
}
.vendo-login .vendo-login__rules li:last-child,
.woocommerce-EditAccountForm .vendo-login__rules li:last-child {
    margin-bottom: 0 !important;
}
.vendo-login .vendo-login__rules li::marker,
.woocommerce-EditAccountForm .vendo-login__rules li::marker {
    content: none;
}
.vendo-login .vendo-login__rules li::before,
.woocommerce-EditAccountForm .vendo-login__rules li::before {
    content: "○";
    position: absolute;
    left: 2px;
    top: 0;
}
.vendo-login .vendo-login__rules li.is-met,
.woocommerce-EditAccountForm .vendo-login__rules li.is-met {
    color: #15803d;
}
.vendo-login .vendo-login__rules li.is-met::before,
.woocommerce-EditAccountForm .vendo-login__rules li.is-met::before {
    content: "✓";
}
.vendo-login .vendo-login__rules li.is-missing,
.woocommerce-EditAccountForm .vendo-login__rules li.is-missing {
    color: #b91c1c;
}

.woocommerce-EditAccountForm .vendo-login__msg {
    margin: 0 0 12px;
    color: #b91c1c;
    font-size: 0.95em;
}
.woocommerce-EditAccountForm .vendo-login__msg ul {
    margin: 4px 0 0;
    padding-left: 1.2em;
}

/* ===========================================================================
   KOMUNIKATY WOOCOMMERCE W KARCIE
   =========================================================================== */

.vendo-login .vendo-login__notices:empty,
.vendo-login .woocommerce-notices-wrapper:empty {
    display: none;
}

.vendo-login .woocommerce-error,
.vendo-login .woocommerce-message,
.vendo-login .woocommerce-info,
.vendo-login .wc-block-components-notice-banner {
    display: block !important;
    position: relative !important;
    width: auto !important;
    margin: 0 0 16px !important;
    padding: 10px 12px !important;
    background: #f5f3ff !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    font-size: 0.95em !important;
    line-height: 1.45 !important;
    list-style: none !important;
    text-align: left !important;
}

/* Ikona z fontu WooCommerce nachodzi na tekst — w karcie jej nie ma. */
.vendo-login .woocommerce-error::before,
.vendo-login .woocommerce-message::before,
.vendo-login .woocommerce-info::before {
    content: none !important;
    display: none !important;
}
.vendo-login .wc-block-components-notice-banner > svg {
    display: none !important;
}
/* WooCommerce ustawia fokus na komunikacie (czytniki ekranu go odczytują) —
   bez grubej ramki fokusu motywu wokół ramki komunikatu. */
.vendo-login .woocommerce-error:focus,
.vendo-login .woocommerce-message:focus,
.vendo-login .woocommerce-info:focus,
.vendo-login .wc-block-components-notice-banner:focus {
    outline: none !important;
}

.vendo-login .woocommerce-error,
.vendo-login .wc-block-components-notice-banner.is-error {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
}

.vendo-login .woocommerce-message,
.vendo-login .wc-block-components-notice-banner.is-success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #166534 !important;
}

/* „Wylogowaliśmy Cię po bezczynności" i podobne — jak w VendoLearning. */
.vendo-login .woocommerce-info,
.vendo-login .wc-block-components-notice-banner.is-info {
    background: #fff7ed !important;
    border-color: #fed7aa !important;
    color: #9a3412 !important;
}

.vendo-login .woocommerce-error li,
.vendo-login .woocommerce-message li,
.vendo-login .woocommerce-info li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.vendo-login .woocommerce-error li + li {
    margin-top: 4px !important;
}

/* ===========================================================================
   „SZCZEGÓŁY KONTA" — LOGOWANIE DWUETAPOWE (2FA)
   =========================================================================== */

.vendo-2fa {
    clear: both;
    max-width: 560px;
    margin: 32px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid #e0e0e0;
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.5;
}

.vendo-2fa *,
.vendo-2fa *::before,
.vendo-2fa *::after {
    box-sizing: border-box;
}

.vendo-2fa [hidden] {
    display: none !important;
}

.vendo-2fa .vendo-2fa__title {
    margin: 0 0 12px !important;
    padding: 0 !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    font-size: 1.25em !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-transform: none !important;
}

.vendo-2fa .vendo-2fa__hint {
    margin: 0 0 14px !important;
    color: #6b7280;
    font-size: 0.95em;
}
.vendo-2fa .vendo-2fa__hint.is-warn,
.vendo-2fa .vendo-2fa__warn {
    color: #b45309;
}
.vendo-2fa .vendo-2fa__warn {
    margin: 0 0 14px !important;
    padding: 10px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    font-size: 0.95em;
}

.vendo-2fa .vendo-2fa__status {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px !important;
    color: #15803d;
    font-weight: 600;
}
.vendo-2fa .vendo-2fa__badge {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.8em;
    line-height: 1;
}
.vendo-2fa .vendo-2fa__since {
    display: block;
    color: #6b7280;
    font-size: 0.9em;
    font-weight: 400;
}

.vendo-2fa .vendo-2fa__steps {
    margin: 4px 0 16px 1.2em !important;
    padding: 0 !important;
    color: #374151;
    font-size: 0.95em;
    line-height: 1.5;
}
.vendo-2fa .vendo-2fa__steps li {
    margin: 0 0 2px;
    list-style: decimal;
}

.vendo-2fa .vendo-2fa__setup {
    margin-top: 12px;
}

/* Kod QR — wstawiany SVG na białym tle (aplikacje gorzej czytają kod na kolorze). */
.vendo-2fa .vendo-2fa__qr {
    display: inline-block;
    width: 100%;
    max-width: 220px;
    margin: 0 0 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    line-height: 0;
}
.vendo-2fa .vendo-2fa__qr svg {
    display: block;
    width: 100%;
    height: auto;
}
.vendo-2fa .vendo-2fa__qr:empty {
    display: none;
}

.vendo-2fa .vendo-2fa__secret {
    display: inline-block;
    max-width: 100%;
    margin: 0 0 16px;
    padding: 8px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #1f2937;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05em;
    letter-spacing: 0.15em;
    word-break: normal;
    overflow-wrap: break-word; /* łamanie między grupami po 4 znaki, nie w środku grupy */
    user-select: all;
}

.vendo-2fa .vendo-2fa__form {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
}

.vendo-2fa .vendo-2fa__field {
    max-width: 320px;
    margin: 0 0 12px;
}

.vendo-2fa .vendo-2fa__label {
    display: block !important;
    margin: 0 0 4px !important;
    color: #1f2937 !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.vendo-2fa .vendo-2fa__input {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    background: #ffffff !important;
    border: 1px solid #c4c4c4 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    outline: none !important;
    color: #1f2937 !important;
    font-family: inherit !important;
    font-size: 1.1em !important;
    letter-spacing: 0.12em !important;
    line-height: 1.4 !important;
}
.vendo-2fa .vendo-2fa__input:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.25) !important;
}

.vendo-2fa .vendo-2fa__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.vendo-2fa .vendo-2fa__btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 18px !important;
    background: #7c3aed !important;
    border: 1px solid #7c3aed !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer;
}
.vendo-2fa .vendo-2fa__btn:hover,
.vendo-2fa .vendo-2fa__btn:focus {
    background: #6d28d9 !important;
    border-color: #6d28d9 !important;
    color: #ffffff !important;
}
.vendo-2fa .vendo-2fa__btn:focus-visible {
    outline: 2px solid #7c3aed !important;
    outline-offset: 2px;
}
.vendo-2fa .vendo-2fa__btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.vendo-2fa .vendo-2fa__btn.is-loading::before {
    content: "";
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: vendo-login-spin 0.8s linear infinite;
}

.vendo-2fa .vendo-2fa__btn--danger {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}
.vendo-2fa .vendo-2fa__btn--danger:hover,
.vendo-2fa .vendo-2fa__btn--danger:focus {
    background: #991b1b !important;
    border-color: #991b1b !important;
}

.vendo-2fa .vendo-2fa__btn--ghost {
    background: #ffffff !important;
    border-color: #ddd6fe !important;
    color: #6d28d9 !important;
}
.vendo-2fa .vendo-2fa__btn--ghost:hover,
.vendo-2fa .vendo-2fa__btn--ghost:focus {
    background: #f5f3ff !important;
    border-color: #c4b5fd !important;
    color: #5b21b6 !important;
}

.vendo-2fa .vendo-2fa__msg {
    min-height: 1.2em;
    margin: 0 0 12px;
    font-size: 0.95em;
}
.vendo-2fa .vendo-2fa__msg:empty {
    min-height: 0;
    margin: 0;
}
.vendo-2fa .vendo-2fa__msg.is-ok { color: #15803d; }
.vendo-2fa .vendo-2fa__msg.is-error { color: #b91c1c; }

/* Kody zapasowe — czytelne do przepisania i wydruku. */
.vendo-2fa .vendo-2fa__codes {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.vendo-2fa .vendo-2fa__codes-title {
    margin: 0 0 8px !important;
    color: #1f2937 !important;
    font-size: 1em !important;
    font-weight: 700 !important;
}
.vendo-2fa .vendo-2fa__code-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05em;
    letter-spacing: 0.08em;
}
.vendo-2fa .vendo-2fa__code-list li {
    margin: 0 !important;
    padding: 4px 0 !important;
    list-style: none !important;
}

/* ===========================================================================
   MAŁE EKRANY I PREFERENCJE
   =========================================================================== */

@media (max-width: 480px) {
    .vendo-login { padding: 12px 0 !important; }
    .vendo-login__card { padding: 20px 16px; }
    .vendo-2fa .vendo-2fa__code-list { grid-template-columns: 1fr; }
    .vendo-2fa .vendo-2fa__actions .vendo-2fa__btn { width: 100% !important; }
}

/* iOS powiększa stronę przy fokusie pola z pismem < 16px. */
@media (pointer: coarse) {
    .vendo-login .vendo-login__input,
    .vendo-2fa .vendo-2fa__input {
        font-size: 16px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vendo-login .vendo-login__submit.is-loading::before,
    .vendo-2fa .vendo-2fa__btn.is-loading::before {
        animation-duration: 2.4s;
    }
    .vendo-login *,
    .vendo-2fa * {
        transition: none !important;
    }
}
