/* PHASE 51.1D UNITED WORLD AI SECURE LOGIN */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f4f7fc;
}

body.uw-auth-page {
    min-height: 100vh;
    margin: 0;
    color: #10182d;
    background:
        radial-gradient(
            circle at 12% 12%,
            rgba(113, 71, 231, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 86%,
            rgba(48, 132, 255, 0.12),
            transparent 32%
        ),
        linear-gradient(
            145deg,
            #f9faff 0%,
            #f3f6fc 52%,
            #eef4fd 100%
        );
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

.auth-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    place-items: center;
}

.auth-frame {
    width: 100%;
    min-height: 680px;
    display: grid;
    grid-template-columns:
        minmax(0, 1.08fr)
        minmax(390px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(204, 214, 232, 0.95);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 32px 80px rgba(26, 39, 75, 0.13),
        0 8px 24px rgba(26, 39, 75, 0.07);
}

.auth-brand-panel {
    position: relative;
    min-width: 0;
    padding: 54px 56px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 86% 10%,
            rgba(118, 167, 255, 0.42),
            transparent 31%
        ),
        radial-gradient(
            circle at 16% 84%,
            rgba(122, 64, 229, 0.48),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #121c39 0%,
            #172a5a 48%,
            #4e2eb7 100%
        );
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
}

.auth-brand-panel::before {
    width: 410px;
    height: 410px;
    top: -210px;
    right: -175px;
}

.auth-brand-panel::after {
    width: 260px;
    height: 260px;
    right: -110px;
    bottom: -120px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.auth-brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    color: #ffffff;
    background:
        linear-gradient(
            145deg,
            #7e3fe1,
            #477cf3 65%,
            #2cc4de
        );
    box-shadow:
        0 16px 28px rgba(44, 25, 112, 0.34);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-brand-copy {
    display: grid;
    gap: 3px;
}

.auth-brand-copy strong {
    font-size: 18px;
    line-height: 1.1;
}

.auth-brand-copy span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
}

.auth-brand-message {
    max-width: 580px;
    margin: auto 0;
    padding: 56px 0;
}

.auth-eyebrow {
    margin: 0 0 16px;
    color: #cbbcff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-brand-message h1 {
    max-width: 570px;
    margin: 0;
    font-size: clamp(38px, 4.2vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.auth-brand-message > p:last-of-type {
    max-width: 560px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 17px;
    line-height: 1.7;
}

.auth-trust-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-trust-item {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
}

.auth-trust-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    margin-bottom: 11px;
    border-radius: 10px;
    color: #d9d1ff;
    background: rgba(255, 255, 255, 0.10);
    font-weight: 800;
}

.auth-trust-item strong,
.auth-trust-item span {
    display: block;
}

.auth-trust-item strong {
    margin-bottom: 4px;
    font-size: 13px;
}

.auth-trust-item span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    line-height: 1.45;
}

.auth-form-panel {
    position: relative;
    min-width: 0;
    display: grid;
    place-items: center;
    padding: 56px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.98),
            rgba(250, 252, 255, 0.98)
        );
}

.auth-card {
    width: min(100%, 430px);
}

.auth-card-heading {
    margin-bottom: 34px;
}

.auth-security-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 11px;
    border: 1px solid #dbe6fb;
    border-radius: 999px;
    color: #325fb4;
    background: #f1f6ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-security-label::before {
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: #20b486;
    box-shadow: 0 0 0 4px rgba(32, 180, 134, 0.12);
}

.auth-card h2 {
    margin: 0;
    color: #10182d;
    font-size: 34px;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.auth-card-heading p {
    margin: 12px 0 0;
    color: #67738b;
    font-size: 15px;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 20px;
}

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

.auth-field label {
    color: #2f3a51;
    font-size: 13px;
    font-weight: 700;
}

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

.auth-input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid #d7deeb;
    border-radius: 14px;
    outline: none;
    color: #121a2f;
    background: #ffffff;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.auth-input::placeholder {
    color: #9aa5b8;
}

.auth-input:hover {
    border-color: #bfc9da;
}

.auth-input:focus {
    border-color: #6d55dc;
    box-shadow:
        0 0 0 4px rgba(109, 85, 220, 0.12);
}

.auth-input-password {
    padding-right: 82px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 62px;
    height: 38px;
    padding: 0 10px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    color: #58657d;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: #5336c8;
    background: #f0edff;
    outline: none;
}

.auth-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
    padding: 13px 20px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background:
        linear-gradient(
            115deg,
            #6e3fd6,
            #3f7bf2
        );
    box-shadow:
        0 14px 28px rgba(74, 76, 213, 0.24);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        opacity 150ms ease;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 18px 34px rgba(74, 76, 213, 0.30);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(80, 99, 230, 0.24);
    outline-offset: 3px;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.68;
}

.auth-status {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-status[hidden] {
    display: none;
}

.auth-status.error {
    border-color: #f3c5c9;
    color: #a62835;
    background: #fff4f5;
}

.auth-status.success {
    border-color: #bce8d8;
    color: #117455;
    background: #effbf6;
}

.auth-session-check {
    min-height: 280px;
    display: grid;
    place-items: center;
    color: #6d7890;
    text-align: center;
}

.auth-session-check[hidden] {
    display: none;
}

.auth-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 15px;
    border: 3px solid #e5e9f3;
    border-top-color: #6847db;
    border-radius: 50%;
    animation: auth-spin 750ms linear infinite;
}

.auth-help {
    margin: 24px 0 0;
    padding-top: 22px;
    border-top: 1px solid #e8ecf3;
    color: #7a8498;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.auth-help strong {
    color: #4a566d;
}

.auth-footer {
    position: absolute;
    right: 30px;
    bottom: 24px;
    left: 30px;
    color: #98a1b2;
    font-size: 10px;
    text-align: center;
}

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

@media (max-width: 920px) {
    .auth-shell {
        width: min(100% - 28px, 680px);
        padding: 24px 0;
    }

    .auth-frame {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        padding: 34px;
    }

    .auth-brand-message {
        padding: 54px 0 34px;
    }

    .auth-brand-message h1 {
        font-size: clamp(36px, 9vw, 54px);
    }

    .auth-trust-list {
        display: none;
    }

    .auth-form-panel {
        padding: 44px 34px 70px;
    }
}

@media (max-width: 520px) {
    .auth-shell {
        width: 100%;
        padding: 0;
    }

    .auth-frame {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-brand-panel {
        padding: 25px 22px;
    }

    .auth-brand-message {
        padding: 38px 0 15px;
    }

    .auth-brand-message h1 {
        font-size: 36px;
    }

    .auth-brand-message > p:last-of-type {
        margin-top: 17px;
        font-size: 14px;
    }

    .auth-form-panel {
        padding: 38px 22px 68px;
    }

    .auth-card h2 {
        font-size: 30px;
    }
}

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

.signup-login-link {
    margin: 22px 0 0;
    color: #717c91;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.signup-login-link a {
    color: #5336c8;
    font-weight: 800;
    text-decoration: none;
}

.signup-login-link a:hover,
.signup-login-link a:focus-visible {
    text-decoration: underline;
}
