.wf-login-page {
    --wf-bg: #080d18;
    --wf-surface: rgba(15, 23, 42, 0.88);
    --wf-border: rgba(148, 163, 184, 0.16);
    --wf-text: #f8fafc;
    --wf-muted: #94a3b8;
    --wf-primary: #3b82f6;
    --wf-primary-strong: #2563eb;
    --wf-danger: #fb7185;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 24px;
    display: grid;
    place-items: center;
    color: var(--wf-text);
    background:
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.16), transparent 34%),
        radial-gradient(circle at 85% 85%, rgba(14, 165, 233, 0.10), transparent 30%),
        var(--wf-bg);
    box-sizing: border-box;
    overflow-x: hidden;
}

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

.wf-login-shell {
    width: 100%;
    max-width: 440px;
}

.wf-login-card {
    position: relative;
    width: 100%;
    padding: 38px;
    border: 1px solid var(--wf-border);
    border-radius: 24px;
    background: var(--wf-surface);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.wf-login-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.75), transparent);
}

.wf-login-brand {
    margin-bottom: 30px;
    text-align: center;
}

.wf-login-logo {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 18px;
    color: #dbeafe;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.26), rgba(37, 99, 235, 0.08));
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.18);
}

.wf-login-logo svg {
    width: 31px;
    height: 31px;
}

.wf-login-title {
    margin: 0;
    color: var(--wf-text);
    font-size: clamp(1.75rem, 5vw, 2.1rem);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.wf-login-subtitle {
    margin: 10px 0 0;
    color: var(--wf-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.wf-login-alert {
    margin: 0 0 22px;
    padding: 13px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid rgba(251, 113, 133, 0.26);
    border-radius: 12px;
    color: #fecdd3;
    background: rgba(190, 18, 60, 0.12);
    font-size: 0.9rem;
    line-height: 1.45;
}

.wf-login-alert svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

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

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

.wf-field-label {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 650;
}

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

.wf-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 19px;
    height: 19px;
    z-index: 2;
    color: #64748b;
    pointer-events: none;
    transform: translateY(-50%);
    transition: color 0.2s ease;
}

.wf-login-page .wf-input {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 0 16px 0 50px !important;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    outline: none;
    color: var(--wf-text);
    background: rgba(2, 6, 23, 0.48);
    font: inherit;
    font-size: 0.95rem;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wf-login-page .wf-input[type="password"],
.wf-login-page .wf-input.password-visible {
    padding-right: 54px !important;
}

.wf-input::placeholder {
    color: #64748b;
}

.wf-input:hover {
    border-color: rgba(148, 163, 184, 0.34);
}

.wf-input:focus {
    border-color: var(--wf-primary);
    background: rgba(2, 6, 23, 0.7);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.13);
}

.wf-input-wrap:focus-within .wf-input-icon {
    color: #60a5fa;
}

.wf-input.is-valid:not(:placeholder-shown) {
    border-color: rgba(52, 211, 153, 0.48);
}

.wf-input.is-invalid {
    border-color: var(--wf-danger);
    box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.10);
}

.wf-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #94a3b8;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s ease, background 0.2s ease;
}

.wf-password-toggle:hover,
.wf-password-toggle:focus-visible {
    color: #dbeafe;
    background: rgba(148, 163, 184, 0.1);
    outline: none;
}

.wf-password-toggle svg {
    width: 20px;
    height: 20px;
}

.wf-password-toggle svg[hidden] {
    display: none !important;
}

.wf-field-message {
    min-height: 18px;
    margin: -2px 0 0;
    color: var(--wf-danger);
    font-size: 0.78rem;
    line-height: 1.35;
}

.wf-caps-warning {
    margin: -2px 0 0;
    display: none;
    align-items: center;
    gap: 6px;
    color: #fbbf24;
    font-size: 0.78rem;
}

.wf-caps-warning.is-visible {
    display: flex;
}

.wf-caps-warning svg {
    width: 15px;
    height: 15px;
}

.wf-login-submit {
    width: 100%;
    min-height: 50px;
    margin-top: 2px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-strong));
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.wf-login-submit:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
}

.wf-login-submit:focus-visible {
    outline: 3px solid rgba(96, 165, 250, 0.3);
    outline-offset: 3px;
}

.wf-login-submit:disabled {
    opacity: 0.72;
    cursor: wait;
}

.wf-spinner {
    width: 18px;
    height: 18px;
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wf-spin 0.7s linear infinite;
}

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

.wf-login-security {
    margin: 22px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #64748b;
    font-size: 0.78rem;
    text-align: center;
}

.wf-login-security svg {
    width: 15px;
    height: 15px;
}

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

@media (max-width: 520px) {
    .wf-login-page {
        padding: 16px;
    }

    .wf-login-card {
        padding: 30px 22px;
        border-radius: 20px;
    }

    .wf-login-brand {
        margin-bottom: 26px;
    }
}

@media (max-height: 680px) and (min-width: 521px) {
    .wf-login-page {
        padding-block: 18px;
    }

    .wf-login-card {
        padding-block: 28px;
    }

    .wf-login-brand {
        margin-bottom: 22px;
    }
}

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

.wf-account-created {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #27564f;
    border-radius: 12px;
    background: #102b2c;
    color: #b6f1db;
}

.wf-invite-page [hidden] {
    display: none !important;
}

.wf-invite-page .wf-login-card {
    padding-block: 24px;
}

.wf-invite-page .wf-login-brand {
    margin-bottom: 20px;
}

.wf-invite-page .wf-login-logo {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
}

.wf-invite-page .wf-login-form {
    gap: 12px;
}

.wf-invite-page .wf-input,
.wf-invite-page .wf-input[type="password"] {
    padding-inline: 14px !important;
}

.wf-invite-page .wf-input[readonly] {
    color: #cbd5e1;
}

.wf-invite-password {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.wf-invite-password .btn {
    padding-inline: 10px;
}
