/* ==========================================================
   InTeraNet random login UI
   08 — Editorial Monochrome
   11 — Cardless Minimal
   ========================================================== */

html[data-login-ui] {
    color-scheme: light;
    min-height: 100%;
}

html[data-login-ui] body.auth-page {
    --auth-page-bg: #f7f8fc;
    --bg-primary: #f4f6fb;
    --bg-secondary: #ffffff;
    --text-primary: #171b26;
    --text-secondary: #555d70;
    --text-muted: #747c90;
    --border-color: #d2d8e7;
    --accent-color: #6759ff;
    --accent-hover: #5548e8;
    --danger: #c83f4d;
    --success: #248a55;

    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding:
        max(34px, env(safe-area-inset-top))
        max(24px, env(safe-area-inset-right))
        max(34px, env(safe-area-inset-bottom))
        max(24px, env(safe-area-inset-left)) !important;
    color: var(--text-primary);
    background: var(--auth-page-bg) !important;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;
}

html[data-login-ui] body.auth-page .auth-container {
    position: relative;
    z-index: 2;
    width: min(100%, 420px);
    max-width: 420px;
    min-height: 0;
    padding: 34px 32px;
    animation: loginUiEnter .36s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes loginUiEnter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html[data-login-ui] body.auth-page .auth-container > div:first-child {
    margin-bottom: 20px !important;
}

html[data-login-ui] body.auth-page .auth-container > div:first-child img {
    display: block;
    height: 60px !important;
    width: auto;
    margin: 0 auto 8px !important;
}

html[data-login-ui] body.auth-page .auth-container > div:first-child p {
    margin: 0;
    color: var(--text-muted) !important;
    font-size: 13px !important;
    line-height: 1.45;
}

html[data-login-ui] body.auth-page .auth-container .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 24px;
}

html[data-login-ui] body.auth-page .auth-container .tab {
    display: grid;
    place-items: center;
    min-height: 43px;
    padding: 0;
    cursor: pointer;
    user-select: none;
}

html[data-login-ui] body.auth-page .auth-container .form-group {
    margin-bottom: 16px;
}

html[data-login-ui] body.auth-page .auth-container label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}

html[data-login-ui] body.auth-page .auth-container input {
    width: 100%;
    min-height: 44px;
    color: var(--text-primary);
    background: var(--bg-primary);
    caret-color: var(--accent-color);
}

html[data-login-ui] body.auth-page .auth-container input::placeholder {
    color: #8a91a2;
    opacity: 1;
}

html[data-login-ui] body.auth-page .auth-container button,
html[data-login-ui] body.auth-page .auth-container #googleBtn {
    min-height: 43px;
}

html[data-login-ui] body.auth-page #forgotLink {
    color: var(--text-muted) !important;
    text-underline-offset: 3px;
}

html[data-login-ui] body.auth-page #oauthArea > div:first-child {
    color: var(--text-muted) !important;
}

html[data-login-ui] body.auth-page #oauthArea > div:first-child span {
    background: var(--border-color) !important;
}

html[data-login-ui] body.auth-page .auth-container .error-message,
html[data-login-ui] body.auth-page .auth-container .success-message {
    border-radius: 10px;
}

html[data-login-ui] body.auth-page #getAppBtn {
    z-index: 20 !important;
    top: max(14px, env(safe-area-inset-top)) !important;
    right: max(14px, env(safe-area-inset-right)) !important;
}

/* ==========================================================
   08 — Editorial Monochrome
   ========================================================== */

html[data-login-ui="editorial"] body.auth-page {
    --auth-page-bg: #ece9e1;
    --bg-primary: transparent;
    --bg-secondary: #f7f5ef;
    --text-primary: #111111;
    --text-secondary: #111111;
    --text-muted: #6c6b64;
    --border-color: #111111;
    --accent-color: #111111;
    --accent-hover: #2d2d2d;
    --danger: #a1222c;
    --success: #176f41;

    background:
        linear-gradient(rgba(0,0,0,.043) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,.043) 1px, transparent 1px),
        #ece9e1 !important;
    background-size: 32px 32px !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container {
    color: #111;
    background: #f7f5ef !important;
    border: 2px solid #111 !important;
    border-radius: 0 !important;
    box-shadow: 12px 12px 0 #111 !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container > div:first-child img {
    filter: grayscale(1) contrast(1.28);
}

html[data-login-ui="editorial"] body.auth-page .auth-container > div:first-child p {
    color: #111 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px !important;
    font-weight: 500;
    letter-spacing: -.025em;
}

html[data-login-ui="editorial"] body.auth-page .auth-container .tabs {
    border-bottom: 2px solid #111 !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container .tab {
    color: #111 !important;
    border: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
    box-shadow: none !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container .tab.active {
    color: #fff !important;
    background: #111 !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container label {
    color: #111 !important;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .035em;
}

html[data-login-ui="editorial"] body.auth-page .auth-container input {
    border: 1px solid #111 !important;
    border-radius: 0 !important;
    color: #111 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container input:focus {
    border-color: #111 !important;
    background: #fffdf8 !important;
    box-shadow: 4px 4px 0 rgba(17,17,17,.18) !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container button[type="submit"] {
    border: 1px solid #111 !important;
    border-radius: 0 !important;
    color: #fff !important;
    background: #111 !important;
    box-shadow: none !important;
    text-transform: uppercase;
    letter-spacing: .055em;
}

html[data-login-ui="editorial"] body.auth-page .auth-container button[type="submit"]:hover {
    color: #111 !important;
    background: #f7f5ef !important;
    transform: none !important;
    box-shadow: 4px 4px 0 #111 !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container .secondary,
html[data-login-ui="editorial"] body.auth-page .auth-container #adminLink {
    border: 1px solid #111 !important;
    border-radius: 0 !important;
    color: #111 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-login-ui="editorial"] body.auth-page #googleBtn {
    border: 1px solid #111 !important;
    border-radius: 0 !important;
    color: #111 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-login-ui="editorial"] body.auth-page #forgotLink {
    color: #111 !important;
}

html[data-login-ui="editorial"] body.auth-page #togglePassword,
html[data-login-ui="editorial"] body.auth-page #toggleSignupPassword {
    color: #111 !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-container .error-message,
html[data-login-ui="editorial"] body.auth-page .auth-container .success-message {
    border-radius: 0 !important;
    background: transparent !important;
}

html[data-login-ui="editorial"] body.auth-page #getAppBtn {
    border: 1px solid #111 !important;
    border-radius: 0 !important;
    color: #fff !important;
    background: #111 !important;
    box-shadow: 5px 5px 0 rgba(17,17,17,.28) !important;
}

/* ==========================================================
   11 — Cardless Minimal
   ========================================================== */

html[data-login-ui="cardless"] body.auth-page {
    --auth-page-bg: #f7f8fc;
    --bg-primary: #f4f6fb;
    --bg-secondary: transparent;
    --text-primary: #161924;
    --text-secondary: #272d3c;
    --text-muted: #747c90;
    --border-color: #d2d8e7;
    --accent-color: #6759ff;
    --accent-hover: #5548e8;

    background:
        radial-gradient(circle at 50% 38%, rgba(117,103,255,.075), transparent 27rem),
        #f7f8fc !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container {
    color: #161924;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container .tabs {
    border-bottom: 1px solid #d8ddea !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container .tab {
    color: #6d7484 !important;
    border-bottom: 2px solid transparent !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container .tab.active {
    color: #6759ff !important;
    border-bottom-color: #6759ff !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container input {
    border: 1px solid #d2d8e7 !important;
    border-radius: 12px !important;
    color: #202534 !important;
    background: #f4f6fb !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container input:focus {
    border-color: #7567ff !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(117,103,255,.09) !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container button[type="submit"] {
    border: 0 !important;
    border-radius: 12px !important;
    color: #fff !important;
    background: linear-gradient(90deg, #6e61ff, #5548e8) !important;
    box-shadow: 0 10px 24px rgba(100,83,255,.20) !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container button[type="submit"]:hover {
    background: linear-gradient(90deg, #6255f5, #4c40d8) !important;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(100,83,255,.27) !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-container .secondary,
html[data-login-ui="cardless"] body.auth-page .auth-container #adminLink {
    border: 1px solid #d2d8e7 !important;
    border-radius: 11px !important;
    color: #252b39 !important;
    background: #fff !important;
}

html[data-login-ui="cardless"] body.auth-page #googleBtn {
    border: 1px solid #d2d8e7 !important;
    border-radius: 11px !important;
    color: #252b39 !important;
    background: #fff !important;
    box-shadow: none !important;
}

html[data-login-ui="cardless"] body.auth-page #getAppBtn {
    border: 0 !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: #6759f2 !important;
    box-shadow: 0 8px 20px rgba(103,89,242,.25) !important;
}

/* ==========================================================
   Responsive behavior
   ========================================================== */

@media (max-width: 600px) {
    html[data-login-ui] body.auth-page {
        align-items: flex-start;
        padding:
            max(76px, calc(env(safe-area-inset-top) + 58px))
            16px
            max(24px, env(safe-area-inset-bottom))
            16px !important;
    }

    html[data-login-ui] body.auth-page .auth-container {
        width: 100%;
        max-width: 460px;
        min-height: 0 !important;
        padding: 28px 22px !important;
    }

    html[data-login-ui="editorial"] body.auth-page .auth-container {
        width: calc(100% - 10px);
        margin-right: 10px;
        box-shadow: 8px 8px 0 #111 !important;
    }

    html[data-login-ui="cardless"] body.auth-page .auth-container {
        padding-inline: 10px !important;
    }

    html[data-login-ui] body.auth-page #getAppBtn {
        max-width: calc(100vw - 28px);
        white-space: nowrap;
    }
}

@media (max-height: 760px) and (min-width: 601px) {
    html[data-login-ui] body.auth-page {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-login-ui] body.auth-page .auth-container {
        animation: none;
    }
}

/* ===== LOGIN_REFERENCE_LOGO_AND_PASSWORD_ICONS_V2 ===== */

/*
 * Use the real /logo.png asset inside the same centered 58px identity mark
 * used by the reference concepts.
 */
html[data-login-ui] body.auth-page .auth-brand-mark {
    position: relative;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    isolation: isolate;
}

html[data-login-ui] body.auth-page .auth-brand-image {
    position: relative;
    z-index: 2;
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: contain;
}

/* Editorial: print-like monochrome identity treatment. */
html[data-login-ui="editorial"] body.auth-page .auth-brand-mark {
    padding: 7px;
    border: 2px solid #111;
    background: #f7f5ef;
    box-shadow: 5px 5px 0 #111;
}

html[data-login-ui="editorial"] body.auth-page .auth-brand-image {
    filter: grayscale(1) contrast(1.35);
}

/* Cardless: a quiet modern identity halo without adding a card. */
html[data-login-ui="cardless"] body.auth-page .auth-brand-mark::before {
    content: "";
    position: absolute;
    inset: -5px;
    z-index: 0;
    border-radius: 18px;
    background:
        radial-gradient(
            circle at 30% 25%,
            rgba(117, 103, 255, .20),
            transparent 62%
        );
}

html[data-login-ui="cardless"] body.auth-page .auth-brand-image {
    filter:
        drop-shadow(0 9px 18px rgba(103, 89, 242, .18));
}

/*
 * Password controls:
 * - remove the emoji glyph;
 * - keep the control inside the password field;
 * - use accessible SVG eye / eye-off icons;
 * - preserve the production click handlers.
 */
html[data-login-ui] body.auth-page .auth-password-field {
    position: relative;
    width: 100%;
}

html[data-login-ui] body.auth-page .auth-password-field > input {
    padding-right: 52px !important;
}

html[data-login-ui] body.auth-page .auth-password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 7px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 4;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    color: var(--text-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
    cursor: pointer;
    transition:
        color .16s ease,
        background .16s ease,
        box-shadow .16s ease,
        transform .16s ease !important;
}

html[data-login-ui] body.auth-page .auth-password-toggle svg {
    width: 19px;
    height: 19px;
    display: block;
    pointer-events: none;
}

html[data-login-ui] body.auth-page .auth-password-toggle:hover {
    color: var(--text-primary) !important;
    background: rgba(117, 103, 255, .09) !important;
    transform:
        translateY(-50%)
        scale(1.04) !important;
}

html[data-login-ui] body.auth-page .auth-password-toggle:focus-visible {
    outline: none !important;
    color: var(--text-primary) !important;
    background: rgba(117, 103, 255, .11) !important;
    box-shadow:
        0 0 0 3px rgba(117, 103, 255, .18) !important;
}

/* Editorial variant keeps the icon strict and monochrome. */
html[data-login-ui="editorial"] body.auth-page .auth-password-toggle {
    border-radius: 0 !important;
    color: #111 !important;
}

html[data-login-ui="editorial"] body.auth-page .auth-password-toggle:hover,
html[data-login-ui="editorial"] body.auth-page .auth-password-toggle:focus-visible {
    color: #fff !important;
    background: #111 !important;
    box-shadow: none !important;
}

/* Cardless variant uses the reference purple interaction language. */
html[data-login-ui="cardless"] body.auth-page .auth-password-toggle {
    color: #6f668f !important;
}

html[data-login-ui="cardless"] body.auth-page .auth-password-toggle:hover,
html[data-login-ui="cardless"] body.auth-page .auth-password-toggle:focus-visible {
    color: #5c4fe5 !important;
    background: rgba(117, 103, 255, .10) !important;
}

/* ===== END LOGIN_REFERENCE_LOGO_AND_PASSWORD_ICONS_V2 ===== */

/* ===== LOGIN_REFERENCE_ICON_AND_REMEMBER_FIX_V3 ===== */

/*
 * Use the exact reference identity icon as inline SVG.
 * The login screen no longer displays /logo.png.
 */
html[data-login-ui] body.auth-page .auth-brand-mark {
    color: #7264ff;
}

html[data-login-ui] body.auth-page .auth-brand-reference-icon {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Neutralize the old image-only treatment from the prior stage. */
html[data-login-ui] body.auth-page .auth-brand-image {
    display: none !important;
}

/* Editorial keeps the imported icon strictly monochrome. */
html[data-login-ui="editorial"] body.auth-page .auth-brand-mark {
    color: #111;
}

/* Cardless keeps the reference purple identity color. */
html[data-login-ui="cardless"] body.auth-page .auth-brand-mark {
    color: #7264ff;
}

/*
 * Restore compact checkbox sizing.
 * The generic text-input rules previously produced the tall surrounding box.
 */
html[data-login-ui] body.auth-page .auth-container input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    flex: 0 0 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 3px !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    vertical-align: middle;
    cursor: pointer;
}

html[data-login-ui="editorial"]
body.auth-page
.auth-container
input[type="checkbox"] {
    accent-color: #111 !important;
}

html[data-login-ui="cardless"]
body.auth-page
.auth-container
input[type="checkbox"] {
    accent-color: #6759ff !important;
}

html[data-login-ui]
body.auth-page
.auth-container
input[type="checkbox"]:focus,
html[data-login-ui]
body.auth-page
.auth-container
input[type="checkbox"]:focus-visible,
html[data-login-ui]
body.auth-page
.auth-container
input[type="checkbox"]:checked {
    outline: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Keep the Remember me row tightly aligned after removing the oversized box. */
html[data-login-ui]
body.auth-page
#loginForm
.form-group:has(#rememberMe) {
    min-height: 18px;
    align-items: center !important;
    gap: 9px !important;
}

html[data-login-ui]
body.auth-page
#loginForm
.form-group:has(#rememberMe)
label {
    line-height: 16px;
}

/* ===== END LOGIN_REFERENCE_ICON_AND_REMEMBER_FIX_V3 ===== */

/* ===== EDITORIAL_PASSWORD_TOGGLE_HOVER_VISIBILITY_V4 ===== */

/*
 * Keep the SVG above the Editorial hover surface and explicitly force its
 * paths to the contrasting foreground color.
 */
html[data-login-ui]
body.auth-page
.auth-password-toggle {
    isolation: isolate !important;
    overflow: visible !important;
}

html[data-login-ui]
body.auth-page
.auth-password-toggle svg {
    position: relative !important;
    z-index: 3 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit !important;
    pointer-events: none !important;
}

html[data-login-ui]
body.auth-page
.auth-password-toggle svg path,
html[data-login-ui]
body.auth-page
.auth-password-toggle svg circle {
    stroke: currentColor !important;
}

/* Editorial default: black icon on the paper-colored input. */
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle svg,
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle svg path,
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle svg circle {
    color: #111 !important;
    stroke: #111 !important;
}

/* Editorial hover/focus: white icon remains visible on the black square. */
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle:hover svg,
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle:focus-visible svg,
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle:hover svg path,
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle:hover svg circle,
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle:focus-visible svg path,
html[data-login-ui="editorial"]
body.auth-page
.auth-password-toggle:focus-visible svg circle {
    color: #fff !important;
    stroke: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
}

/* ===== END EDITORIAL_PASSWORD_TOGGLE_HOVER_VISIBILITY_V4 ===== */
