/* =========================================
   MARPEH HOMES — AUTHENTICATION
   Glassmorphism / Teal Edition
   ========================================= */

:root {
    --navy: #0b2d52;
    --navy-light: #173e63;

    /* Marpeh Homes logo teal */
    --teal: #2ab5b2;
    --teal-dark: #159694;
    --teal-light: #7adbd7;
    --teal-pale: #e9fbfa;

    --text: #17324d;
    --muted: #68798b;

    --white: #ffffff;
    --border: rgba(255, 255, 255, 0.65);

    --error: #c0392b;

    --glass: rgba(255, 255, 255, 0.72);
    --glass-strong: rgba(255, 255, 255, 0.86);

    --shadow:
        0 25px 70px rgba(11, 45, 82, 0.12);
}


/* =========================================
   RESET
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 10% 15%,
            rgba(42, 181, 178, 0.17),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(42, 181, 178, 0.13),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #f7fcfc 0%,
            #eef8f8 45%,
            #f8fbfc 100%
        );

    overflow-x: hidden;
}


/* =========================================
   BACKGROUND EFFECTS
   ========================================= */

body::before {
    content: "";
    position: fixed;

    width: 380px;
    height: 380px;

    top: -180px;
    right: -120px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(42, 181, 178, 0.16),
            transparent 70%
        );

    filter: blur(20px);

    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;

    width: 320px;
    height: 320px;

    bottom: -150px;
    left: -100px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(42, 181, 178, 0.12),
            transparent 70%
        );

    filter: blur(20px);

    pointer-events: none;
}


/* =========================================
   AUTH PAGE
   ========================================= */

.auth-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 55px 20px;

    position: relative;
}


/* =========================================
   CONTAINER
   ========================================= */

.auth-container {
    width: 100%;
    max-width: 540px;

    position: relative;
    z-index: 2;
}


/* =========================================
   LOGO
   ========================================= */

.auth-logo {
    display: block;

    width: 190px;
    height: auto;

    margin: 0 auto 30px;

    object-fit: contain;

    /* Soft logo glow */
    filter:
        drop-shadow(
            0 8px 18px rgba(42, 181, 178, 0.14)
        );

    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}

.auth-logo:hover {
    transform: translateY(-2px);

    filter:
        drop-shadow(
            0 12px 24px rgba(42, 181, 178, 0.22)
        );
}


/* =========================================
   GLASS CARD
   ========================================= */

.auth-card {

    position: relative;

    background: var(--glass);

    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    border: 1px solid rgba(255, 255, 255, 0.85);

    border-radius: 26px;

    padding: 42px;

    box-shadow:
        0 25px 70px rgba(11, 45, 82, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);

    overflow: hidden;

    animation:
        cardAppear 0.65s ease both;
}


/* Glass highlight */

.auth-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(42, 181, 178, 0.6),
            transparent
        );
}


/* =========================================
   HEADER
   ========================================= */

.auth-header {
    text-align: center;

    margin-bottom: 32px;
}

.auth-header h1 {

    margin: 0 0 10px;

    color: var(--navy);

    font-size: 31px;

    font-weight: 750;

    letter-spacing: -0.7px;

    line-height: 1.2;
}

.auth-header p {

    max-width: 420px;

    margin: 0 auto;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.7;
}


/* =========================================
   ACCOUNT TYPE
   ========================================= */

.account-type {
    margin-bottom: 27px;
}

.account-type-label {

    display: block;

    margin-bottom: 12px;

    color: var(--navy);

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 0.2px;
}


/* =========================================
   ROLE OPTIONS
   ========================================= */

.role-options {
    display: grid;

    gap: 10px;
}

.role-option {
    position: relative;
}


/* Hide radio */

.role-option input {

    position: absolute;

    opacity: 0;

    pointer-events: none;
}


/* Tile */

.role-option label {

    display: block;

    position: relative;

    padding: 16px 17px;

    border-radius: 15px;

    cursor: pointer;

    background:
        rgba(255, 255, 255, 0.48);

    border:
        1px solid rgba(11, 45, 82, 0.08);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


/* Hover */

.role-option label:hover {

    transform: translateY(-2px);

    border-color:
        rgba(42, 181, 178, 0.45);

    background:
        rgba(255, 255, 255, 0.75);

    box-shadow:
        0 8px 25px rgba(11, 45, 82, 0.07);
}


/* Selected */

.role-option input:checked + label {

    border-color: var(--teal);

    background:
        linear-gradient(
            135deg,
            rgba(42, 181, 178, 0.14),
            rgba(255, 255, 255, 0.72)
        );

    box-shadow:
        0 8px 25px rgba(42, 181, 178, 0.13),
        inset 0 0 0 1px rgba(42, 181, 178, 0.10);
}


/* Selected indicator */

.role-option input:checked + label::after {

    content: "✓";

    position: absolute;

    top: 14px;
    right: 15px;

    width: 23px;
    height: 23px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--teal);

    color: white;

    font-size: 12px;
    font-weight: 800;

    box-shadow:
        0 4px 12px rgba(42, 181, 178, 0.28);
}


.role-option label strong {

    display: block;

    margin-bottom: 4px;

    color: var(--navy);

    font-size: 15px;

    font-weight: 700;
}

.role-option label span {

    display: block;

    max-width: 400px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}


/* Hint shown when a role is selected */

.role-option .role-hint {

    display: none;

    margin-top: 10px;

    padding-top: 10px;

    max-width: 400px;

    border-top: 1px solid rgba(11, 45, 82, 0.10);

    color: var(--teal-dark);

    font-size: 12.5px;

    font-weight: 600;

    line-height: 1.5;
}

.role-option input:checked + label .role-hint {
    display: block;
}


/* =========================================
   FORM
   ========================================= */

.form-row {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;
}

.form-group {

    margin-bottom: 18px;
}

.form-group label {

    display: block;

    margin-bottom: 7px;

    color: var(--navy);

    font-size: 13px;

    font-weight: 650;
}


/* =========================================
   INPUTS
   ========================================= */

.form-group input {

    width: 100%;

    height: 49px;

    padding: 0 14px;

    border:
        1px solid rgba(11, 45, 82, 0.12);

    border-radius: 11px;

    outline: none;

    color: var(--text);

    background:
        rgba(255, 255, 255, 0.62);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    font-family: inherit;

    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.form-group input::placeholder {
    color: #9aa7b3;
}


.form-group input:hover {

    background:
        rgba(255, 255, 255, 0.82);
}


.form-group input:focus {

    background: rgba(255, 255, 255, 0.92);

    border-color: var(--teal);

    box-shadow:
        0 0 0 3px rgba(42, 181, 178, 0.11),
        0 6px 20px rgba(42, 181, 178, 0.06);
}


/* =========================================
   PASSWORD VISIBILITY TOGGLE
   ========================================= */

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 49px;
    width: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    cursor: pointer;

    color: #6b7c8c;
    font-size: 17px;

    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--teal);
}


/* =========================================
   CONSENT
   ========================================= */

.consent {

    display: flex;

    gap: 10px;

    align-items: flex-start;

    margin: 14px 0;
}


.consent input {

    width: 16px;
    height: 16px;

    margin-top: 3px;

    accent-color: var(--teal);

    cursor: pointer;

    flex-shrink: 0;
}


.consent label {

    color: var(--muted);

    font-size: 12.5px;

    line-height: 1.55;
}


.consent a {

    color: var(--teal-dark);

    text-decoration: none;

    font-weight: 700;
}


.consent a:hover {
    text-decoration: underline;
}


/* Share info checkbox uses the same layout as other consents */

.consent.share-info {
    margin-top: 20px;
}


/* =========================================
   PRIMARY BUTTON
   ========================================= */

.primary-button {

    width: 100%;

    height: 52px;

    margin-top: 8px;

    border: none;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--teal),
            var(--teal-dark)
        );

    color: white;

    font-family: inherit;

    font-size: 14px;

    font-weight: 750;

    letter-spacing: 0.1px;

    cursor: pointer;

    box-shadow:
        0 10px 25px rgba(42, 181, 178, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}


.primary-button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 14px 30px rgba(42, 181, 178, 0.28);

    filter: brightness(1.03);
}


.primary-button:active {

    transform: translateY(0);

    box-shadow:
        0 7px 15px rgba(42, 181, 178, 0.20);
}


/* =========================================
   DIVIDER
   ========================================= */

.divider {

    display: flex;

    align-items: center;

    gap: 12px;

    margin: 25px 0;

    color: #8b98a5;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: 1px;
}


.divider::before,
.divider::after {

    content: "";

    flex: 1;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(11, 45, 82, 0.12)
        );
}


.divider::after {

    background:
        linear-gradient(
            90deg,
            rgba(11, 45, 82, 0.12),
            transparent
        );
}


/* =========================================
   GOOGLE BUTTON
   ========================================= */

.google-button {

    width: 100%;

    height: 50px;

    border:
        1px solid rgba(11, 45, 82, 0.12);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.65);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    color: var(--navy);

    font-family: inherit;

    font-size: 14px;

    font-weight: 650;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.google-button:hover {

    transform: translateY(-2px);

    background:
        rgba(255, 255, 255, 0.92);

    border-color:
        rgba(42, 181, 178, 0.30);

    box-shadow:
        0 8px 22px rgba(11, 45, 82, 0.07);
}


/* =========================================
   FOOTER
   ========================================= */

.auth-footer {

    margin-top: 25px;

    text-align: center;

    color: var(--muted);

    font-size: 13px;
}


.auth-footer a {

    color: var(--teal-dark);

    font-weight: 750;

    text-decoration: none;
}


.auth-footer a:hover {
    text-decoration: underline;
}


/* =========================================
   ANIMATION
   ========================================= */

@keyframes cardAppear {

    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 600px) {

    .auth-page {
        padding: 30px 15px;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-logo {
        width: 165px;
        margin-bottom: 23px;
    }

    .auth-card {
        padding: 28px 20px;

        border-radius: 20px;
    }

    .auth-header {
        margin-bottom: 25px;
    }

    .auth-header h1 {
        font-size: 27px;
    }

    .auth-header p {
        font-size: 13px;
    }

    .form-row {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .role-option label {
        padding: 15px;
    }
}


/* =========================================
   REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }
}