body.login {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.22), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 46%, #f8fafc 100%);
}

body.login.spio-qr-open {
    overflow: hidden;
}

body.login::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 40%),
        linear-gradient(315deg, rgba(15, 23, 42, 0.06), transparent 42%);
}

.login #login {
    position: relative;
    width: min(430px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 28px;
}

.login h1 {
    margin: 0 0 18px;
}

.login h1 a {
    width: 92px;
    height: 92px;
    margin: 0 auto;
    border-radius: 50%;
    background-image: var(--spio-logo-url);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.spio-login-intro {
    margin-bottom: 14px;
    text-align: center;
}

.spio-login-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--spio-theme);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login form {
    margin-top: 0;
    padding: 24px;
    border: 0;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 56px rgba(15, 23, 42, 0.12);
}

.login label {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.login form .input,
.login input[type="text"],
.login input[type="password"] {
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    box-shadow: none;
    background: #f8fbff;
    font-size: 16px;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
    border-color: rgba(59, 130, 246, 0.75);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.login .button.wp-hide-pw {
    top: 8px;
    right: 8px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 12px;
}

.login .forgetmenot {
    margin-top: 8px;
    margin-bottom: 22px;
}

.login .submit .button-primary {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--spio-theme) 0%, #2563eb 100%);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.24);
    font-weight: 700;
}

.login p.submit {
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 0;
}

.spio-pwa-install-card {
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.spio-pwa-install-head {
    margin-bottom: 8px;
}

.spio-pwa-install-head strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: 16px;
}

.spio-pwa-install-copy,
.spio-pwa-install-hint {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.spio-pwa-install-copy {
    margin-bottom: 12px;
}

.spio-pwa-install-hint {
    margin-top: 10px;
    font-size: 13px;
}

.spio-pwa-install-card .button,
.spio-pwa-qr-launch .button {
    display: inline-flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
}

.spio-pwa-qr-launch {
    margin-top: 22px;
}

.spio-pwa-qr-launch .button {
    margin-top: 0;
}

.login #nav,
.login #backtoblog {
    text-align: center;
}

.login #nav a,
.login #backtoblog a {
    color: #334155;
}

.spio-pwa-qr-stage {
    position: fixed;
    inset: 0;
    z-index: 100000;
    overflow: hidden;
    background: #020617;
}

.spio-pwa-qr-stage video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spio-pwa-qr-stage[hidden] {
    display: none !important;
}

.spio-pwa-qr-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: #fff;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.3);
    cursor: pointer;
}

.spio-pwa-qr-guide {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    width: min(68vw, 280px);
    height: min(68vw, 280px);
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-radius: 28px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.28);
    pointer-events: none;
}

.spio-pwa-qr-status {
    position: absolute;
    right: 16px;
    bottom: 18px;
    left: 16px;
    z-index: 2;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    text-align: center;
}

#spio-pwa-qr-status.is-error {
    color: #b91c1c;
    background: rgba(255, 255, 255, 0.92);
}

.spio-pwa-login-feedback {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(6px);
}

.spio-pwa-login-feedback[hidden] {
    display: none !important;
}

.spio-pwa-login-feedback__card {
    display: flex;
    min-width: min(320px, 100%);
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    text-align: center;
}

.spio-pwa-login-feedback__card i {
    color: #16a34a;
    font-size: 34px;
}

.spio-pwa-login-feedback__card strong {
    color: #0f172a;
    font-size: 22px;
}

.spio-pwa-login-feedback__card span {
    color: #475569;
    font-size: 15px;
}

@media (max-width: 782px) {
    .login #login {
        padding-top: 18px;
    }

    .login h1 a {
        width: 84px;
        height: 84px;
    }

    .login form {
        padding: 20px;
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .login #login {
        width: calc(100% - 20px);
    }

    .spio-pwa-qr-close {
        top: 14px;
        right: 14px;
    }
}
