:root {
    color-scheme: light;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--tps-auth-panel-bg, #f5f6f8);
}

body.tps-auth-page {
    min-height: 100vh;
    color: var(--tps-auth-text, #313b4d);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.tps-auth-page *,
.tps-auth-page *::before,
.tps-auth-page *::after {
    box-sizing: border-box;
}

.tps-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    min-height: 100vh;
    width: 100%;
}

.tps-auth-brand {
    position: relative;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 16%, rgba(77, 202, 255, 0.52), transparent 34%),
        radial-gradient(circle at 78% 22%, rgba(191, 84, 255, 0.48), transparent 38%),
        linear-gradient(145deg, var(--tps-auth-brand-1, #1f69cf) 0%, var(--tps-auth-brand-2, #4934bb) 58%, var(--tps-auth-brand-3, #7612d0) 100%);
    color: #fff;
}

.tps-auth-brand-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: var(--tps-auth-bg-opacity, 0.2);
}

.tps-auth-brand::before,
.tps-auth-brand::after {
    content: "";
    position: absolute;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

.tps-auth-brand::before {
    width: 520px;
    height: 520px;
    left: -180px;
    bottom: -210px;
}

.tps-auth-brand::after {
    width: 700px;
    height: 700px;
    right: -390px;
    top: -300px;
}

.tps-auth-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: min(700px, 100%);
    min-height: 100vh;
    padding: clamp(42px, 6vw, 86px);
}

.tps-auth-brand-mark {
    display: block;
    width: clamp(88px, 8vw, 122px);
    height: clamp(88px, 8vw, 122px);
    object-fit: cover;
    border-radius: var(--tps-auth-logo-radius, 26px);
    box-shadow: 0 20px 60px rgba(13, 18, 56, 0.28);
}

.tps-auth-brand-copy {
    max-width: 580px;
    padding-bottom: clamp(18px, 4vw, 44px);
}

.tps-auth-eyebrow {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.tps-auth-brand h1 {
    margin: 0 0 22px;
    color: #fff;
    font-family: inherit;
    font-size: clamp(46px, 5vw, 78px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.tps-auth-brand-copy > p:last-child {
    margin: 0;
    max-width: 520px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 1.45vw, 21px);
}

.tps-auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(34px, 6vw, 88px);
    background: var(--tps-auth-panel-bg, #f5f6f8);
}

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

.tps-auth-mobile-brand {
    display: none;
}

.tps-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0 0 34px;
    padding: 5px;
    border: 1px solid var(--tps-auth-input-border, #cbd2dd);
    border-radius: calc(var(--tps-auth-radius, 10px) + 3px);
    background: rgba(255, 255, 255, 0.58);
}

.tps-auth-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--tps-auth-radius, 10px);
    color: var(--tps-auth-muted, #697386);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.tps-auth-tab.is-active {
    background: #fff;
    color: var(--tps-auth-link, #0874ba);
    box-shadow: 0 4px 14px rgba(24, 38, 70, 0.09);
}

.tps-auth-panel[hidden] {
    display: none !important;
}

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

.tps-auth-card h2 {
    margin: 0 0 8px;
    color: var(--tps-auth-heading, #172033);
    font-family: inherit;
    font-size: clamp(34px, 3vw, 46px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.tps-auth-card-heading p {
    margin: 0;
    color: var(--tps-auth-muted, #697386);
    font-size: 17px;
}

.tps-auth-alert {
    margin: 0 0 22px;
    padding: 13px 15px;
    border: 1px solid #e7b8bd;
    border-radius: var(--tps-auth-radius, 10px);
    background: #fff4f5;
    color: #8c2730;
    font-size: 14px;
}

.tps-auth-alert--success {
    border-color: #b9dec9;
    background: #f1fbf5;
    color: #25633d;
}

.tps-auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tps-auth-form label,
.tps-auth-password-heading label {
    margin: 0;
    color: var(--tps-auth-text, #313b4d);
    font-size: 14px;
    font-weight: 700;
}

.tps-auth-form input[type="text"],
.tps-auth-form input[type="email"],
.tps-auth-form input[type="password"] {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0 0 12px;
    padding: 0 15px;
    border: 1px solid var(--tps-auth-input-border, #cbd2dd);
    border-radius: var(--tps-auth-radius, 10px);
    outline: none;
    background: var(--tps-auth-input-bg, #fff);
    color: var(--tps-auth-heading, #172033);
    font: inherit;
    font-size: 16px;
    box-shadow: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
    -webkit-appearance: none;
    appearance: none;
}

.tps-auth-form input[type="text"]:focus,
.tps-auth-form input[type="email"]:focus,
.tps-auth-form input[type="password"]:focus {
    border-color: var(--tps-auth-link, #2679dc);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tps-auth-link, #2679dc) 13%, transparent);
}

.tps-auth-password-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tps-auth-password-heading a {
    color: var(--tps-auth-link, #0874ba);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.tps-auth-password-heading a:hover {
    text-decoration: underline;
}

.tps-auth-password-wrap {
    position: relative;
}

.tps-auth-password-wrap input {
    padding-right: 78px !important;
}

.tps-auth-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 52px;
    padding: 0 15px;
    border: 0;
    background: transparent;
    color: var(--tps-auth-muted, #566175);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.tps-auth-password-toggle .tps-auth-hide,
.tps-auth-password-toggle[aria-pressed="true"] .tps-auth-show {
    display: none;
}

.tps-auth-password-toggle[aria-pressed="true"] .tps-auth-hide {
    display: inline;
}

.tps-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    margin: 2px 0 13px !important;
    cursor: pointer;
}

.tps-auth-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--tps-auth-link, #1477bd);
}

.tps-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 0 22px;
    border: 0;
    border-radius: var(--tps-auth-radius, 10px);
    background: linear-gradient(100deg, var(--tps-auth-button-1, #087eba) 0%, var(--tps-auth-button-2, #4b3bc5) 54%, var(--tps-auth-button-3, #7a00df) 100%);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(58, 57, 174, 0.2);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.tps-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 17px 35px rgba(58, 57, 174, 0.26);
}

.tps-auth-submit:focus-visible,
.tps-auth-tab:focus-visible,
.tps-auth-password-toggle:focus-visible,
.tps-auth-password-heading a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--tps-auth-link, #2679dc) 32%, transparent);
    outline-offset: 3px;
}

.tps-auth-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 900px) {
    html,
    body,
    body.tps-auth-page {
        min-height: 100%;
        background: var(--tps-auth-brand-2, #4934bb);
    }

    body.tps-auth-page {
        min-height: 100dvh;
        -webkit-tap-highlight-color: transparent;
    }

    .tps-auth-shell {
        display: block;
        min-height: 100dvh;
    }

    .tps-auth-brand {
        display: none;
    }

    .tps-auth-form-panel {
        position: relative;
        isolation: isolate;
        align-items: center;
        justify-content: center;
        min-height: 100dvh;
        overflow: hidden;
        padding: max(30px, env(safe-area-inset-top)) 22px max(34px, env(safe-area-inset-bottom));
        background:
            radial-gradient(circle at 10% 4%, rgba(93, 215, 255, 0.44), transparent 31%),
            radial-gradient(circle at 93% 8%, rgba(220, 100, 255, 0.38), transparent 34%),
            radial-gradient(circle at 52% 108%, rgba(255, 196, 75, 0.28), transparent 38%),
            linear-gradient(145deg, var(--tps-auth-brand-1, #1f69cf) 0%, var(--tps-auth-brand-2, #4934bb) 56%, var(--tps-auth-brand-3, #7612d0) 100%);
    }

    .tps-auth-form-panel::before,
    .tps-auth-form-panel::after {
        content: "";
        position: absolute;
        z-index: -1;
        pointer-events: none;
        border: 1px solid rgba(255, 255, 255, 0.13);
        border-radius: 999px;
    }

    .tps-auth-form-panel::before {
        width: 340px;
        height: 340px;
        top: -205px;
        right: -155px;
    }

    .tps-auth-form-panel::after {
        width: 430px;
        height: 430px;
        bottom: -295px;
        left: -235px;
    }

    .tps-auth-card {
        position: relative;
        z-index: 1;
        width: min(440px, 100%);
        padding: 32px 28px 28px;
        border: 1px solid rgba(255, 255, 255, 0.74);
        border-radius: 28px;
        background: rgba(255, 255, 255, 0.965);
        box-shadow: 0 28px 80px rgba(16, 20, 58, 0.28), 0 4px 16px rgba(16, 20, 58, 0.12);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .tps-auth-mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 108px;
        margin: 0 0 20px;
    }

    .tps-auth-mobile-brand img {
        display: block;
        width: min(360px, 100%);
        max-width: 100%;
        height: auto;
        max-height: 132px;
        object-fit: contain;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .tps-auth-tabs {
        gap: 4px;
        margin-bottom: 26px;
        padding: 4px;
        border: 0;
        border-radius: 14px;
        background: #eef0f4;
    }

    .tps-auth-tab {
        min-height: 42px;
        border-radius: 11px;
        font-size: 13px;
    }

    .tps-auth-tab.is-active {
        box-shadow: 0 2px 9px rgba(24, 38, 70, 0.1);
    }

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

    .tps-auth-card h2 {
        font-size: 32px;
        line-height: 1.08;
        letter-spacing: -0.03em;
    }

    .tps-auth-card-heading p {
        margin-top: 7px;
        font-size: 15px;
        line-height: 1.45;
    }

    .tps-auth-form {
        gap: 9px;
    }

    .tps-auth-panel[data-tps-panel="register"] .tps-auth-form {
        gap: 6px;
    }

    .tps-auth-panel[data-tps-panel="register"] .tps-auth-form input[type="text"],
    .tps-auth-panel[data-tps-panel="register"] .tps-auth-form input[type="email"],
    .tps-auth-panel[data-tps-panel="register"] .tps-auth-form input[type="password"] {
        margin-bottom: 6px;
    }

    .tps-auth-form label,
    .tps-auth-password-heading label {
        font-size: 13px;
    }

    .tps-auth-form input[type="text"],
    .tps-auth-form input[type="email"],
    .tps-auth-form input[type="password"] {
        height: 54px;
        margin-bottom: 11px;
        padding-left: 16px;
        padding-right: 16px;
        border-radius: 14px;
        border-color: #d8dde7;
        background: #fff;
        box-shadow: 0 1px 2px rgba(17, 24, 39, 0.025);
    }

    .tps-auth-password-wrap input {
        padding-right: 76px !important;
    }

    .tps-auth-password-toggle {
        height: 54px;
        padding: 0 16px;
    }

    .tps-auth-password-heading a {
        font-size: 13px;
    }

    .tps-auth-remember {
        margin: 2px 0 14px !important;
        font-size: 13px !important;
    }

    .tps-auth-submit {
        min-height: 54px;
        border-radius: 14px;
        font-size: 15px;
        box-shadow: 0 12px 26px rgba(62, 48, 175, 0.24);
    }

    .tps-auth-alert {
        border-radius: 14px;
        font-size: 13px;
    }
}

@media (max-width: 520px) {
    .tps-auth-form-panel {
        padding: max(18px, env(safe-area-inset-top)) 14px max(22px, env(safe-area-inset-bottom));
    }

    .tps-auth-card {
        padding: 26px 20px 22px;
        border-radius: 24px;
    }

    .tps-auth-mobile-brand {
        min-height: 104px;
        margin-bottom: 18px;
    }

    .tps-auth-mobile-brand img {
        width: min(340px, 100%);
        max-height: 124px;
    }

    .tps-auth-tabs {
        margin-bottom: 23px;
    }

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

@media (max-width: 380px) {
    .tps-auth-form-panel {
        padding-left: 10px;
        padding-right: 10px;
    }

    .tps-auth-card {
        padding-left: 16px;
        padding-right: 16px;
        border-radius: 21px;
    }

    .tps-auth-mobile-brand img {
        width: min(320px, 100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tps-auth-submit,
    .tps-auth-tab,
    .tps-auth-form input {
        transition: none !important;
    }
}
