/* TAD Auth pages — login / register
   Reconstructed from Figma nodes 547-9369 (login) + 547-9444 (register)
   Canvas reference: 1440 x 986. Card 968.614 x 703.849 at (236, 141).
   Google Fonts (League Spartan + Rethink Sans) are loaded via <link> in the
   template output — not @import here — so first paint is not delayed. */

.tad-auth-page * { box-sizing: border-box; }

.tad-auth-page,
.tad-auth-page main,
.tad-auth-page section,
.tad-auth-page aside,
.tad-auth-page form,
.tad-auth-page h1,
.tad-auth-page h2,
.tad-auth-page p {
    margin: 0;
    padding: 0;
}

.tad-auth-page {
    /* Figma gradient at 137.577deg, stops white 2.19% -> #daf1f3 42.04% -> #40e9ee 180.65%.
       Layer opacity is 0.5 in Figma over white base. */
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1440px;
    min-height: 986px;
    margin: 0 auto;
    padding: 141px 0 0 236px;
    font-family: 'Rethink Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #233454;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.tad-auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(137.577deg, #ffffff 2.19%, #daf1f3 42.04%, #40e9ee 180.65%);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.tad-auth-card {
    position: relative;
    display: grid;
    grid-template-columns: 484px 484.307px;
    width: 968.614px;
    height: 703.849px;
    border-radius: 25px 20px 20px 25px;
    box-shadow: 0 20px 40px rgba(35,52,84,0.08);
}

/* Left column — hero image */
.tad-auth-hero {
    position: relative;
    width: 484px;
    height: 703.849px;
    background-color: #08132a;
    background-size: cover;
    background-position: center;
    color: #fff;
    border: 5px solid #00abb3;
    border-right: 0;
    border-radius: 25px 0 0 25px;
    overflow: hidden;
}
.tad-auth-hero--login  {
    background-image: url('../images/hero-login-brain.webp');
    background-size: 100% 100%;
    background-position: 50% 50%;
    background-color: #6ea9b8;
}
.tad-auth-hero--login::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 247px;
    background: linear-gradient(to bottom, rgba(0,171,179,0) 4.032%, #00abb3 100%);
    pointer-events: none;
    z-index: 1;
}
.tad-auth-hero--login::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 140px;
    background: linear-gradient(to bottom, rgba(0,171,179,0.5) 0%, rgba(0,171,179,0) 100%);
    pointer-events: none;
    z-index: 1;
}
.tad-auth-hero--register {
    background-image: url('../images/hero-register-door.webp');
    background-size: cover;
    background-position: 50% 50%;
}

.tad-auth-hero__brand {
    position: absolute;
    left: 34px;
    bottom: 40px;
    z-index: 2;
    font-family: 'League Spartan', 'Rethink Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.tad-auth-hero__tagline { display: none; }
.tad-auth-hero--login .tad-auth-hero__tagline {
    display: block;
    position: absolute;
    left: 34px;
    bottom: 35px;
    z-index: 2;
    margin: 0;
    width: 245px;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.36px;
    color: #ffffff;
}
.tad-auth-hero--login .tad-auth-hero__brand {
    top: 33.55px;
    left: 34.19px;
    bottom: auto;
    font-family: 'League Spartan', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    color: #ffffff;
    z-index: 2;
}

/* Right column — form */
.tad-auth-form {
    position: relative;
    width: 484.307px;
    height: 703.849px;
    background: #ffffff;
    border: 5px solid #00abb3;
    border-left: 0;
    border-radius: 0 20px 20px 0;
    padding: 0;
}

.tad-auth-form__heading {
    position: absolute;
    top: 32px;
    left: 47px;
    width: 389px;
    margin: 0;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -1.2px;
    line-height: 1.25;
    color: #233454;
}
.tad-auth-form__heading .accent { color: #00abb3; }

.tad-auth-form__lead {
    position: absolute;
    top: 148px;
    left: 47px;
    width: 389.346px;
    margin: 0;
    font-family: 'League Spartan', 'Rethink Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.42;
    letter-spacing: -0.18px;
    color: rgba(35,52,84,0.75);
}

.tad-auth-form__fields {
    position: absolute;
    top: 217px;
    left: 46px;
    width: 390px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.tad-auth-field {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0,171,179,0.5);
    border-radius: 100px;
    height: 51px;
    padding: 0 16px;
    gap: 10px;
    transition: border-color 0.15s;
}
.tad-auth-field:focus-within { border-color: #00abb3; }
.tad-auth-field__icon {
    width: 24px;
    height: 24px;
    color: #00abb3;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tad-auth-field__icon svg { width: 24px; height: 24px; }
.tad-auth-field input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    color: #233454;
    letter-spacing: -0.14px;
    padding: 0;
    min-width: 0;
    box-shadow: none;
}
.tad-auth-field input::placeholder { color: rgba(35,52,84,0.75); opacity: 1; }
.tad-auth-field__toggle {
    background: transparent;
    border: 0;
    padding: 6px;
    cursor: pointer;
    color: rgba(35,52,84,0.6);
}
.tad-auth-field__toggle:hover { color: #00abb3; }

.tad-auth-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.tad-auth-row .tad-auth-field--sm {
    width: 119px;
    flex: 0 0 119px;
    padding: 0 16px;
}
.tad-auth-row .tad-auth-field--sm input {
    width: 100%;
    padding: 0;
}
.tad-auth-row .tad-auth-field--grow {
    flex: 1 1 auto;
    width: 261px;
}

.tad-auth-form__inline-links {
    position: absolute;
    top: 340px;
    left: 47px;
    width: 389.346px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 12px;
    letter-spacing: -0.12px;
    color: rgba(35,52,84,0.75);
    margin: 0;
}
.tad-auth-form__inline-links a {
    color: #233454;
    text-decoration: underline;
}

.tad-auth-form__terms {
    position: absolute;
    top: 525px;
    left: 46px;
    width: 391px;
    text-align: center;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: rgba(35,52,84,0.75);
    line-height: 1.42;
    letter-spacing: -0.12px;
    margin: 0;
}
.tad-auth-form__terms a {
    color: #233454;
    text-decoration: underline;
}

.tad-auth-form__actions {
    position: absolute;
    top: 572px;
    left: 47px;
    width: 389.346px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.tad-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 100px;
    font-family: 'League Spartan', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.32px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s;
    box-sizing: border-box;
}
.tad-auth-btn:hover { opacity: 0.9; }
.tad-auth-btn--primary {
    background: #00abb3;
    color: #ffffff;
    border-color: #00abb3;
}
.tad-auth-btn--secondary {
    background: #ffffff;
    color: rgba(35,52,84,0.75);
    border-color: rgba(35,52,84,0.3);
    font-weight: 400;
}
.tad-auth-btn--google { background: #fff; color: #233454; border-color: rgba(35,52,84,0.3); }
.tad-auth-btn--apple  { background: #202020; color: #f2f9fa; }
.tad-auth-btn--facebook { background: #0866ff; color: #f2f9fa; }

.tad-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px 0;
    color: rgba(35,52,84,0.75);
    font-family: 'Rethink Sans', sans-serif;
    font-size: 12px;
    letter-spacing: -0.12px;
}
.tad-auth-divider::before,
.tad-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(35,52,84,0.1);
    border-radius: 20px;
}

/* ============================================================
   LOGIN-SPECIFIC overrides.
   ============================================================ */
.tad-auth-form--login .tad-auth-form__fields {
    top: 256px;
    left: 47px;
    width: 389.346px;
    gap: 9px;
}
.tad-auth-form--login .tad-auth-form__inline-links {
    top: 383px;
    left: 47px;
    width: 390.291px;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 12px;
    letter-spacing: -0.12px;
    line-height: 1.2;
    color: rgba(35,52,84,0.75);
}
.tad-auth-form--login .tad-auth-form__inline-links a {
    color: #233454;
    text-decoration: underline;
}
.tad-auth-form--login .tad-auth-btn {
    position: absolute;
    left: 47px;
    width: 389.346px;
    height: 51px;
    padding: 16px 24px;
}
.tad-auth-form--login .tad-auth-btn--primary   { top: 419px; }
.tad-auth-form--login .tad-auth-btn--google    { top: 508px; }
.tad-auth-form--login .tad-auth-btn--apple     { top: 566px; }
.tad-auth-form--login .tad-auth-btn--facebook  { top: 624px; }
.tad-auth-form--login .tad-auth-btn--primary {
    font-size: 18px;
    letter-spacing: -0.36px;
}
.tad-auth-form--login .tad-auth-divider {
    position: absolute;
    top: 478px;
    left: 47px;
    width: 389px;
    margin: 0;
    height: 12px;
}

/* ============================================================
   Responsive — mobile-first fallback below 900px
   ============================================================ */
@media (max-width: 899px) {
    .tad-auth-page {
        padding: 24px;
        min-height: 100vh;
        max-width: 100%;
    }
    .tad-auth-card {
        display: block;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 460px;
        height: auto;
        margin: 0 auto;
        border-radius: 25px;
    }
    .tad-auth-hero {
        width: 100%;
        max-width: 100%;
        height: 180px;
        border: 5px solid #00abb3;
        border-bottom: 0;
        border-radius: 25px 25px 0 0;
    }
    .tad-auth-hero__brand {
        left: 24px;
        bottom: 24px;
    }
    .tad-auth-form {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 620px;
        padding: 28px 24px 32px 24px;
        border: 5px solid #00abb3;
        border-top: 0;
        border-radius: 0 0 25px 25px;
    }
    .tad-auth-form .tad-auth-form__heading,
    .tad-auth-form .tad-auth-form__lead,
    .tad-auth-form .tad-auth-form__fields,
    .tad-auth-form .tad-auth-form__terms,
    .tad-auth-form .tad-auth-form__actions,
    .tad-auth-form .tad-auth-form__inline-links {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
    }
    .tad-auth-form--login .tad-auth-form__fields,
    .tad-auth-form--login .tad-auth-form__inline-links {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
    }
    .tad-auth-form__heading {
        font-size: 28px;
        letter-spacing: -0.84px;
        margin-bottom: 10px;
    }
    .tad-auth-form__lead {
        font-size: 15px;
        margin-bottom: 16px;
    }
    .tad-auth-form__fields {
        margin-bottom: 14px;
    }
    .tad-auth-form__terms {
        margin: 12px 0 12px 0;
    }
    .tad-auth-form__actions {
        margin-top: 4px;
    }
    .tad-auth-row {
        width: 100%;
    }
    .tad-auth-row .tad-auth-field--sm {
        width: 95px;
        flex: 0 0 95px;
    }
    .tad-auth-row .tad-auth-field--grow {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
    }
    .tad-auth-form--login .tad-auth-btn,
    .tad-auth-form--login .tad-auth-divider {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        margin-top: 10px;
    }
    .tad-auth-form--login .tad-auth-divider {
        margin: 18px 0 4px 0;
        height: auto;
    }
    .tad-auth-form--login .tad-auth-form__inline-links {
        margin-bottom: 12px;
    }
    .tad-auth-hero--login {
        height: 220px;
    }
    .tad-auth-hero--login .tad-auth-hero__brand {
        top: 16px;
        left: 20px;
    }
    .tad-auth-hero--login .tad-auth-hero__tagline {
        left: 20px;
        bottom: 20px;
        width: auto;
        max-width: 70%;
        font-size: 24px;
        letter-spacing: -0.24px;
    }
    .tad-auth-hero--login::before {
        height: 60px;
    }
    .tad-auth-hero--login::after {
        height: 110px;
    }
}
