.auth-page {
    --auth-primary: #137eeb;
    --auth-primary-dark: #0f67c0;
    --auth-text: #18324b;
    --auth-muted: #66809b;
    min-height: 100vh;
    padding: 32px 20px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(19, 126, 235, .14), transparent 34%),
        radial-gradient(circle at 90% 90%, rgba(76, 201, 240, .13), transparent 34%),
        linear-gradient(180deg, #f8fbff 0%, #edf5fd 100%);
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(19, 126, 235, .1);
    pointer-events: none;
}

.auth-page::before { width: 360px; height: 360px; top: -210px; right: -100px; }
.auth-page::after { width: 260px; height: 260px; bottom: -150px; left: -90px; }

.auth-container { width: min(100%, 480px); position: relative; z-index: 1; }
.auth-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }

.auth-language {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--auth-muted);
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(19, 126, 235, .14);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(28, 72, 112, .07);
}

.auth-language select {
    max-width: 160px;
    color: var(--auth-text);
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    cursor: pointer;
}

.auth-card {
    padding: clamp(28px, 6vw, 44px);
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 24px;
    box-shadow: 0 22px 56px rgba(28, 72, 112, .14);
    backdrop-filter: blur(12px);
}

.clerk-auth-page {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
    background: #f7f8fa;
}

.clerk-auth-content { width: min(100%, 400px); }
.clerk-component-host { width: 100%; }

.clerk-component-host {
    min-height: 420px;
    display: grid;
    place-items: center;
}

.clerk-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #66809b;
    padding: 42px 12px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-primary);
    font-size: 1.05rem;
    font-weight: 700;
}

.auth-brand:hover { color: var(--auth-primary-dark); }
.auth-brand img { width: 38px; height: 38px; object-fit: contain; }
.auth-heading { margin: 24px 0 26px; }
.auth-heading h1 { color: var(--auth-text); font-size: clamp(1.7rem, 5vw, 2rem); margin-bottom: 7px; }
.auth-heading p { color: var(--auth-muted); margin: 0; }

.auth-card .form-control {
    min-height: 56px;
    color: var(--auth-text);
    border-color: #d7e4f1;
    border-radius: 12px;
    background-color: #fbfdff;
}

.auth-card .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 .2rem rgba(19, 126, 235, .12);
    background-color: #fff;
}

.auth-captcha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 7px 10px 7px 14px;
    border: 1px solid #d7e4f1;
    border-radius: 12px;
    background: #f7fbff;
}

.auth-captcha img { height: 48px; max-width: calc(100% - 92px); object-fit: contain; }
.auth-card .btn { border-radius: 12px; font-weight: 600; }
.auth-card .btn-primary { background: linear-gradient(135deg, var(--auth-primary), #3294f5); border: 0; box-shadow: 0 10px 24px rgba(19, 126, 235, .22); }
.auth-card .btn-primary:hover { background: linear-gradient(135deg, var(--auth-primary-dark), var(--auth-primary)); transform: translateY(-1px); }
.auth-card .btn-outline-primary { color: var(--auth-primary); border-color: rgba(19, 126, 235, .45); }
.auth-card .btn-outline-primary:hover { color: #fff; background: var(--auth-primary); }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--auth-muted); font-size: .82rem; font-weight: 600; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #dce7f2; }
.auth-footer { color: var(--auth-muted); text-align: center; margin: 24px 0 0; }
.auth-footer a { font-weight: 600; margin-left: 5px; }
.auth-back { display: block; margin-top: 24px; text-align: center; font-weight: 600; }
.auth-link-panel { border-color: #d7e4f1 !important; border-radius: 14px !important; background: #f7fbff; }
.auth-card .google-btn { min-height: 54px; border-radius: 12px; border-color: #d7e4f1; background: #fff; }

@media (max-width: 575.98px) {
    .auth-page { padding: 20px 14px; align-items: start; }
    .auth-card { padding: 26px 20px; border-radius: 20px; }
    .auth-heading { margin: 20px 0 22px; }
    .clerk-auth-page { padding: 20px 14px; place-items: start center; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card .btn { transition: none; }
}
