* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    background: #f5f7fa;
}

body.ywl-auth {
    min-height: 100vh;
    color: #172033;
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.ywl-auth button,
body.ywl-auth input {
    font: inherit;
}

/* Yoeweb supplies its own password visibility control. Avoid duplicate native reveal icons in Edge/IE. */
body.ywl-auth input[type="password"]::-ms-reveal,
body.ywl-auth input[type="password"]::-ms-clear {
    display: none;
}

body.ywl-auth a {
    color: var(--ywl-primary);
    text-decoration: none;
}

body.ywl-auth a:hover,
body.ywl-auth a:focus-visible {
    color: var(--ywl-secondary);
}

.ywl-auth-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ywl-orb {
    position: absolute;
    width: 42vw;
    height: 42vw;
    min-width: 420px;
    min-height: 420px;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.85;
}

.ywl-orb-one {
    top: -22vw;
    left: -15vw;
    background: radial-gradient(circle, rgba(var(--ywl-primary-rgb), 0.19) 0%, rgba(var(--ywl-primary-rgb), 0.05) 48%, rgba(var(--ywl-primary-rgb), 0) 72%);
}

.ywl-orb-two {
    right: -18vw;
    bottom: -25vw;
    background: radial-gradient(circle, rgba(var(--ywl-secondary-rgb), 0.18) 0%, rgba(var(--ywl-secondary-rgb), 0.05) 48%, rgba(var(--ywl-secondary-rgb), 0) 72%);
}

.ywl-grid-glow {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(23, 32, 51, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 32, 51, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
}

.ywl-auth-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 22px 32px;
}

.ywl-auth-card {
    width: min(100%, 470px);
    padding: 38px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(220, 226, 235, 0.92);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(23, 32, 51, 0.12), 0 8px 24px rgba(23, 32, 51, 0.05);
    backdrop-filter: blur(18px);
}

.ywl-client-brand {
    display: flex;
    width: fit-content;
    max-width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    text-align: center;
    color: #172033 !important;
}

.ywl-client-brand img {
    display: block;
    width: auto;
    max-width: min(100%, 230px);
    max-height: 74px;
    object-fit: contain;
    object-position: center center;
}

.ywl-client-brand > span {
    font-size: 23px;
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.ywl-auth-header {
    max-width: 390px;
    margin: 0 auto 28px;
    text-align: center;
}

.ywl-auth-header h1 {
    margin: 0;
    color: #121826;
    font-size: clamp(28px, 5vw, 34px);
    line-height: 1.12;
    font-weight: 760;
    letter-spacing: -0.04em;
}

.ywl-auth-header p {
    margin: 10px 0 0;
    color: #677287;
    font-size: 15px;
    line-height: 1.6;
}

.ywl-alert {
    display: flex;
    gap: 11px;
    align-items: center;
    justify-content: flex-start;
    margin: 0 0 22px;
    padding: 13px 14px;
    border-radius: 13px;
    font-size: 13.5px;
    line-height: 1.5;
}

.ywl-alert-error {
    color: #9f1d24;
    background: #fff3f3;
    border: 1px solid #ffd9dc;
}

.ywl-alert-success {
    color: #236640;
    background: #f1fbf5;
    border: 1px solid #d2f1de;
}

.ywl-alert-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    place-items: center;
    margin-top: 1px;
    border-radius: 50%;
    color: #fff;
    background: #c5363e;
    font-size: 12px;
    font-weight: 800;
}

.ywl-alert-check {
    background: #32925b;
}

.ywl-form {
    display: grid;
    gap: 19px;
}

.ywl-field {
    display: grid;
    gap: 8px;
}

.ywl-field label,
.ywl-label-row label {
    color: #2f394d;
    font-size: 13.5px;
    line-height: 1.3;
    font-weight: 650;
}

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

.ywl-label-row a {
    font-size: 13px;
    font-weight: 650;
}

.ywl-field input[type="text"],
.ywl-field input[type="email"],
.ywl-field input[type="password"] {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    color: #172033;
    background: #fff;
    border: 1px solid #d9dee8;
    border-radius: 14px;
    outline: none;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ywl-field input:hover {
    border-color: #c4cad6;
}

.ywl-field input:focus {
    border-color: var(--ywl-primary);
    box-shadow: 0 0 0 4px rgba(var(--ywl-primary-rgb), 0.11);
}

.ywl-password-wrap {
    position: relative;
}

.ywl-password-wrap input {
    padding-right: 48px !important;
}

.ywl-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: inline-grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    transform: translateY(-50%);
    color: #768196;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

.ywl-password-toggle:hover,
.ywl-password-toggle:focus-visible {
    color: var(--ywl-primary);
    background: rgba(var(--ywl-primary-rgb), 0.07);
    outline: none;
}

.ywl-password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ywl-checkbox {
    position: relative;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    color: #596579;
    font-size: 13.5px;
    cursor: pointer;
    user-select: none;
    margin-inline: 0;
    justify-self: start;
}

.ywl-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ywl-checkbox-box {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd1dc;
    border-radius: 5px;
    background: #fff;
    transition: 150ms ease;
}

.ywl-checkbox input:checked + .ywl-checkbox-box {
    border-color: var(--ywl-primary);
    background: var(--ywl-primary);
}

.ywl-checkbox input:checked + .ywl-checkbox-box::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ywl-checkbox input:focus-visible + .ywl-checkbox-box {
    box-shadow: 0 0 0 4px rgba(var(--ywl-primary-rgb), 0.11);
}

.ywl-primary-button,
a.ywl-primary-button {
    position: relative;
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    color: #fff !important;
    background: var(--ywl-primary);
    border: 1px solid var(--ywl-primary);
    border-radius: 14px;
    box-shadow: 0 9px 20px rgba(var(--ywl-primary-rgb), 0.18);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.ywl-primary-button:hover,
.ywl-primary-button:focus-visible,
a.ywl-primary-button:hover,
a.ywl-primary-button:focus-visible {
    color: #fff !important;
    background: var(--ywl-secondary);
    border-color: var(--ywl-secondary);
    box-shadow: 0 11px 24px rgba(var(--ywl-secondary-rgb), 0.18);
    transform: translateY(-1px);
    outline: none;
}

.ywl-button-icon,
.ywl-link-icon {
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ywl-button-icon {
    width: 18px;
    height: 18px;
}

.ywl-primary-button > .ywl-button-icon:not(.ywl-button-icon-leading),
a.ywl-primary-button > .ywl-button-icon:not(.ywl-button-icon-leading) {
    position: absolute;
    right: 17px;
}

.ywl-primary-button > .ywl-button-icon-leading,
a.ywl-primary-button > .ywl-button-icon-leading {
    position: absolute;
    left: 17px;
}

.ywl-button-icon-leading {
    order: -1;
}

.ywl-link-icon {
    width: 16px;
    height: 16px;
}

.ywl-button-link {
    margin-top: 20px;
}

.ywl-secondary-action {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #566176 !important;
    background: #f7f8fa;
    border: 1px solid #e2e6ed;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 650;
}

.ywl-secondary-action:hover,
.ywl-secondary-action:focus-visible {
    color: #172033 !important;
    background: #f0f2f6;
    border-color: #d4d9e2;
}

.ywl-back-link {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 7px;
    margin: 24px auto 0;
    color: #687388 !important;
    font-size: 13.5px;
    font-weight: 600;
}

.ywl-back-link:hover,
.ywl-back-link:focus-visible {
    color: var(--ywl-primary) !important;
}

.ywl-state-icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    margin: 2px auto 2px;
    border-radius: 20px;
    font-size: 24px;
    font-weight: 800;
}

.ywl-state-success {
    color: #24824c;
    background: #ebf9f0;
    border: 1px solid #d0efdb;
}

.ywl-state-error {
    color: #b4232c;
    background: #fff1f2;
    border: 1px solid #ffdadd;
}

.ywl-state-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ywl-strength {
    display: grid;
    gap: 8px;
    margin-top: -8px;
    text-align: left;
}

.ywl-strength-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.ywl-strength-bars span {
    height: 4px;
    border-radius: 999px;
    background: #e4e7ec;
    transition: background 160ms ease;
}

.ywl-strength[data-score="1"] .ywl-strength-bars span:nth-child(1) {
    background: #d92d20;
}

.ywl-strength[data-score="2"] .ywl-strength-bars span:nth-child(-n+2) {
    background: #dc6803;
}

.ywl-strength[data-score="3"] .ywl-strength-bars span:nth-child(-n+3) {
    background: #ca8a04;
}

.ywl-strength[data-score="4"] .ywl-strength-bars span:nth-child(-n+4) {
    background: #27834c;
}

.ywl-strength-label {
    color: #818a9b;
    font-size: 12px;
    line-height: 1.45;
}

.ywl-auth-footer {
    margin: 22px 0 0;
    color: #8a93a4;
    font-size: 12.5px;
    text-align: center;
}

/* Third-party fields inserted through standard login hooks. */
.ywl-form .g-recaptcha,
.ywl-form .cf-turnstile {
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 560px) {
    .ywl-auth-main {
        justify-content: flex-start;
        padding: 24px 14px;
    }

    .ywl-auth-card {
        padding: 28px 22px;
        border-radius: 23px;
    }

    .ywl-client-brand {
        margin-bottom: 24px;
    }

    .ywl-client-brand img {
        max-width: 200px;
        max-height: 66px;
    }

    .ywl-label-row {
        align-items: flex-start;
    }

    .ywl-orb {
        min-width: 330px;
        min-height: 330px;
    }
}

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

/* 1.0 polish: adaptive contrast, registration states and submit feedback. */
.ywl-primary-button,
a.ywl-primary-button {
    color: var(--ywl-primary-text) !important;
}

.ywl-primary-button:hover,
.ywl-primary-button:focus-visible,
a.ywl-primary-button:hover,
a.ywl-primary-button:focus-visible {
    color: var(--ywl-secondary-text) !important;
}

.ywl-checkbox input:checked + .ywl-checkbox-box::after {
    border-color: var(--ywl-primary-text);
}

.ywl-account-link {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 18px auto -4px;
    color: var(--ywl-primary) !important;
    font-size: 13.5px;
    font-weight: 650;
}

.ywl-account-link:hover,
.ywl-account-link:focus-visible {
    color: var(--ywl-secondary) !important;
}

.ywl-form-note {
    margin: -3px 0 0;
    color: #788397;
    font-size: 12.5px;
    line-height: 1.55;
    text-align: left;
}

.ywl-field-status {
    min-height: 17px;
    margin-top: 1px;
    color: #7a8496;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
}

.ywl-field-status.is-match {
    color: #27834c;
}

.ywl-field-status.is-mismatch {
    color: #b4232c;
}

.ywl-primary-button.is-loading {
    position: relative;
    cursor: wait;
    transform: none !important;
    opacity: 0.9;
}

.ywl-primary-button.is-loading .ywl-button-icon {
    display: none;
}

.ywl-primary-button.is-loading::after {
    content: "";
    position: absolute;
    right: 17px;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ywl-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .ywl-primary-button.is-loading::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Security-runtime fallback shown only if the public reCAPTCHA contract cannot bind. */
.ywl-client-security-error {
    margin: 0;
}
