/* =========================================================
   SmileAge — Login page styles
   -----------------------------------------------------------
   Every selector is namespaced "sa-login-" so nothing collides
   with style.css (untouched) or any other page's CSS file.
   This is the one page on the site with no shared header/
   footer — it's a standalone destination, not part of the
   marketing-site navigation shell, so it gets its own fully
   self-contained visual treatment: an animated gradient-mesh
   backdrop behind a frosted glass card.
   ========================================================= */

html, body.sa-login-body {
    height: auto;
}

body.sa-login-body {
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0f2a4a 0%, #0f4f5a 35%, #146a5c 65%, #1c7a5e 100%);
    font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
}

/* ---------- Animated gradient-mesh background ---------- */
.sa-login-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(5rem);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.sa-login-blob-a {
    width: 34rem;
    height: 34rem;
    top: -10rem;
    left: -8rem;
    background: radial-gradient(circle, #ffffff, transparent 70%);
    animation: saLoginDriftA 22s ease-in-out infinite;
}

.sa-login-blob-b {
    width: 30rem;
    height: 30rem;
    bottom: -8rem;
    right: -6rem;
    background: radial-gradient(circle, var(--green-soft, #7fd6ae), transparent 70%);
    animation: saLoginDriftB 26s ease-in-out infinite;
}

.sa-login-blob-c {
    width: 28rem;
    height: 28rem;
    top: 35%;
    left: 45%;
    background: radial-gradient(circle, #9fd6ff, transparent 70%);
    animation: saLoginDriftC 30s ease-in-out infinite;
}

@keyframes saLoginDriftA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4rem, 3rem) scale(1.1); }
}

@keyframes saLoginDriftB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-3rem, -4rem) scale(1.08); }
}

@keyframes saLoginDriftC {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) translate(-3rem, 2.5rem) scale(1.12); }
}

.sa-login-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .sa-login-blob { animation: none; }
}

/* ---------- Escape hatch back to the marketing site ---------- */
.sa-login-back {
    position: fixed;
    top: 1.75rem;
    left: 1.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    gap: 5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s ease;
}

.sa-login-back:hover { color: #fff; }

/* ---------- Split stage: brand story left, glass card right ---------- */
.sa-login-split {
    position: relative;
    z-index: 1;
    /* min-height: 100vh; */
    max-width: 84rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 6rem 3rem 3rem;
}

.sa-login-brand-panel { color: #fff; }

.sa-login-brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.sa-login-brand-tag i { color: var(--green-soft, #7fd6ae); }

.sa-login-brand-panel h1 {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: clamp(2.25rem, 3.4vw, 3.1rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.sa-login-accent { color: var(--green-soft, #7fd6ae); }

.sa-login-brand-panel > p {
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
    max-width: 30rem;
    margin-bottom: 2rem;
}

.sa-login-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sa-login-feature-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
}

.sa-login-feature-row i { color: var(--green-soft, #7fd6ae); }

.sa-login-card-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* A brighter backdrop is what makes backdrop-filter read as genuine
   frosted glass instead of a murky dark box — the higher fill opacity
   and stronger border/highlight only look right against the vivid
   gradient above, not the previous near-black background. */
.sa-login-card {
    position: relative;
    width: 100%;
    max-width: 31rem;
    min-width: 0;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 1.75rem;
    box-shadow: 0 2rem 5rem rgba(8, 20, 35, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    padding: 3rem 2.75rem;
}

.sa-login-brand { text-align: center; margin-bottom: 1.5rem; }

.sa-login-brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.sa-login-brand-badge img {
    width: 3.1rem;
    height: 3.1rem;
    object-fit: contain;
}

.sa-login-card h2 {
    font-family: var(--font-serif, "Playfair Display", serif);
    font-size: 1.85rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 0.4rem;
}

.sa-login-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    margin-bottom: 2.25rem;
}

.sa-login-field-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin: 1.1rem 0 0.5rem;
}

form#saLoginForm > .sa-login-field-label:first-child { margin-top: 0; }

.sa-login-field-label i { color: var(--green-soft, #7fd6ae); width: 1rem; text-align: center; }

.sa-login-input-wrap { position: relative; }

.sa-login-input {
    width: 100%;
    font-size: 0.95rem;
    font-family: var(--font-sans, "Plus Jakarta Sans", sans-serif);
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 0.7rem;
    padding: 0.8rem 1rem;
    box-shadow: 0 0.3rem 0.75rem rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.sa-login-input::placeholder { color: rgba(255, 255, 255, 0.55); }

.sa-login-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.24);
    border-color: var(--green-soft, #7fd6ae);
    box-shadow: 0 0.3rem 0.75rem rgba(0, 0, 0, 0.18), 0 0 0 3px rgba(127, 214, 174, 0.18);
}

.sa-login-toggle-pass {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.sa-login-toggle-pass:hover { color: #fff; }

.sa-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.25rem 0 1.5rem;
}

.sa-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.sa-login-remember input { accent-color: var(--green, #2fa878); }

.sa-login-forgot {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-soft, #7fd6ae);
    transition: color 0.2s ease;
}

.sa-login-forgot:hover { color: #fff; }

.sa-login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(135deg, var(--green, #2fa878), #1f5fae);
    color: #fff;
    font-weight: 700;
    font-size: 0.98rem;
    border: none;
    border-radius: 0.75rem;
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.sa-login-submit:hover {
    box-shadow: 0 1rem 2rem rgba(47, 168, 120, 0.3);
    transform: translateY(-2px);
}

.sa-login-submit:disabled {
    opacity: 0.75;
    cursor: default;
    transform: none;
}

.sa-login-notice {
    display: none;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 1rem 0 0;
}

.sa-login-notice.sa-login-notice-visible { display: block; }

.sa-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.75rem 0 1.25rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
}

.sa-login-divider::before,
.sa-login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
}

.sa-login-divider span { padding: 0 0.85rem; }

.sa-login-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    box-shadow: 0 0.3rem 0.75rem rgba(0, 0, 0, 0.18);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sa-login-social-btn:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 0.5rem 1.1rem rgba(0, 0, 0, 0.25);
}

.sa-login-social-btn i { color: #ea4335; }

.sa-login-footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 1.75rem 0 0;
}

.sa-login-footer-text a {
    color: var(--green-soft, #7fd6ae);
    font-weight: 700;
}

.sa-login-footer-text a:hover { color: #fff; }

.sa-login-copyright {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}
