/* ============================================
   AUTH PAGE — REDESIGNED (Phone-first flow)
   ============================================ */

/* Main layout */
.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 110px 1.5rem 3rem;
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

/* Decorative background blobs */
.auth-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.deco-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(45, 90, 61, 0.055) 0%, transparent 65%);
    top: -160px;
    right: -160px;
}
.deco-2 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(200, 164, 126, 0.07) 0%, transparent 65%);
    bottom: -100px;
    left: -120px;
}
.deco-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(45, 90, 61, 0.04) 0%, transparent 65%);
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
}

/* ─── Auth Card ─── */
.auth-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.07),
        0 24px 64px rgba(0, 0, 0, 0.06);
    padding: 2.75rem 3rem;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}

/* ─── Progress Indicator ─── */
.auth-progress {
    display: flex;
    align-items: center;
    margin-bottom: 2.25rem;
}
.auth-progress.hidden {
    display: none;
}
.progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.step-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-step.active .step-dot {
    background: var(--primary-green);
    transform: scale(1.4);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.15);
}
.progress-step.completed .step-dot {
    background: var(--primary-green);
}
.progress-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px;
    transition: background 0.35s ease;
    border-radius: 2px;
}
.progress-line.completed {
    background: var(--primary-green);
}

/* ─── Step transitions ─── */
.auth-step {
    animation: stepFadeIn 0.3s ease forwards;
}
.auth-step.hidden {
    display: none;
}
@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ─── Brand mark ─── */
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2rem;
    text-decoration: none;
}
.auth-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.auth-brand span {
    font-family: var(--heading-font);
    font-size: 1.35rem;
    color: var(--primary-green);
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ─── Headings ─── */
.auth-step h2 {
    font-family: var(--heading-font);
    font-size: 1.9rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    line-height: 1.2;
    font-weight: 700;
}
.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 1.75rem;
    line-height: 1.6;
    font-size: 0.975rem;
}
.auth-subtitle strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ─── Back button ─── */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.5rem;
    font-family: var(--body-font);
    transition: color 0.2s;
}
.back-btn:hover {
    color: var(--primary-green);
}
.back-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ─── Phone Input ─── */
.phone-input-group {
    display: flex;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
}
.phone-input-group:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}
.phone-input-group.error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}
.country-code {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: rgba(45, 90, 61, 0.04);
    border-right: 1.5px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    min-width: 58px;
    user-select: none;
    letter-spacing: 0.01em;
}
.phone-input-group input {
    flex: 1;
    padding: 15px 16px;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-family: var(--body-font);
    letter-spacing: 0.04em;
    color: var(--text-dark);
    background: transparent;
    min-height: 52px;
}
.phone-input-group input::placeholder {
    color: #c8c8c8;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ─── OTP Inputs ─── */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.75rem;
}
.otp-digit {
    width: 52px;
    height: 58px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.55rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    font-family: var(--body-font);
    background: white;
    outline: none;
    transition: all 0.2s ease;
    caret-color: var(--primary-green);
}
.otp-digit:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}
.otp-digit.filled {
    border-color: var(--primary-green);
    background: rgba(45, 90, 61, 0.03);
    color: var(--primary-green);
}
.otp-digit.shake {
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-4px); }
    60%       { transform: translateX(4px); }
}

/* ─── Submit Button ─── */
.auth-submit-btn {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--primary-green) 0%, #1a3622 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
    font-family: var(--body-font);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}
.auth-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}
.auth-submit-btn:hover::after {
    opacity: 1;
}
.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45, 90, 61, 0.32);
}
.auth-submit-btn:active {
    transform: translateY(0);
    box-shadow: none;
}
.auth-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-arrow {
    width: 17px;
    height: 17px;
    stroke: white;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ─── Alt action (email sign-in link) ─── */
.auth-divider-text {
    text-align: center;
    margin: 1.25rem 0 0.75rem;
    position: relative;
    color: var(--text-light);
    font-size: 0.875rem;
}
.auth-divider-text::before,
.auth-divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border-color);
}
.auth-divider-text::before { left: 0; }
.auth-divider-text::after  { right: 0; }

.alt-action-btn {
    width: 100%;
    padding: 13px 20px;
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--body-font);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.alt-action-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: rgba(45, 90, 61, 0.04);
}

/* ─── Form Groups ─── */
.form-group {
    margin-bottom: 1.15rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.975rem;
    font-family: var(--body-font);
    color: var(--text-dark);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}
.form-group small {
    display: block;
    margin-top: 0.4rem;
    color: var(--text-light);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Checkboxes */
.checkbox-group {
    margin-bottom: 0.85rem;
}
.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.55;
    margin-bottom: 0;
}
.checkbox-group input[type="checkbox"] {
    accent-color: var(--primary-green);
    width: 15px;
    height: 15px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.checkbox-group a {
    color: var(--primary-green);
    text-decoration: none;
}
.checkbox-group a:hover {
    text-decoration: underline;
}

/* Forgot password / inline link */
.forgot-link {
    display: inline-block;
    margin-top: 0.45rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.825rem;
    transition: color 0.2s;
}
.forgot-link:hover {
    color: var(--primary-green);
}

/* Verify / confirmed email steps */
.verify-email-icon {
    display: flex;
    justify-content: center;
    margin: 8px 0 20px;
}
.verify-email-icon svg {
    filter: drop-shadow(0 4px 12px rgba(45, 90, 61, 0.18));
}

/* Footer links / helper text */
.auth-note {
    text-align: center;
    margin-top: 0.85rem;
    color: var(--text-light);
    font-size: 0.825rem;
    line-height: 1.5;
}
.auth-signin-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}
.auth-signin-link a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}
.auth-signin-link a:hover {
    text-decoration: underline;
}
.resend-code {
    text-align: center;
    margin-top: 1.1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}
.resend-code a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}
.resend-code a:hover {
    text-decoration: underline;
}

/* ─── Member Benefits (Step 3) ─── */
.member-benefits {
    margin-top: 1.5rem;
    padding: 1.15rem 1.25rem;
    background: rgba(45, 90, 61, 0.04);
    border: 1px solid rgba(45, 90, 61, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.4;
}
.benefit-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.benefit-icon svg {
    width: 17px;
    height: 17px;
    fill: var(--primary-green);
}

/* ──────────────────────────────────────────
   STEP 0 — MEMBERSHIP BENEFITS PREVIEW
   ────────────────────────────────────────── */

/* Wider card for the benefits step */
.auth-card {
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-card.card-wide {
    max-width: 520px;
}

.benefits-hero {
    margin-bottom: 1.5rem;
}
.benefits-headline {
    font-family: var(--heading-font);
    font-size: 2.2rem;
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 0.45rem;
    font-weight: 700;
}
.benefits-tagline {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Welcome bonus badge */
.welcome-bonus {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, rgba(45,90,61,0.07) 0%, rgba(200,164,126,0.1) 100%);
    border: 1px solid rgba(45,90,61,0.14);
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
}
.welcome-bonus-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--primary-green);
    border-radius: 10px;
    flex-shrink: 0;
}
.welcome-bonus-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}
.welcome-bonus-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.welcome-bonus-text strong {
    font-size: 0.95rem;
    color: var(--primary-green);
    font-weight: 700;
}
.welcome-bonus-text span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Benefits list */
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.benefit-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.benefit-row:last-child {
    border-bottom: none;
}
.benefit-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(45,90,61,0.08);
    border-radius: 9px;
    flex-shrink: 0;
    margin-top: 1px;
}
.benefit-row-icon svg {
    width: 17px;
    height: 17px;
    fill: var(--primary-green);
}
.benefit-row-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.benefit-row-body strong {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
}
.benefit-row-body span {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.45;
}

/* Tier progression */
.tiers-section {
    margin-bottom: 1.75rem;
}
.tiers-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}
.tiers-track {
    display: flex;
    align-items: center;
    gap: 0;
}
.tier-connector {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, #cd7f32, #c0c0c0);
}
.tier-connector:last-of-type {
    background: linear-gradient(90deg, #c0c0c0, #c8a200);
}
.tier-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.tier-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.tier-badge svg {
    width: 18px;
    height: 18px;
}
.tier-bronze .tier-badge {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
}
.tier-bronze .tier-badge svg { fill: #fff3e0; }
.tier-silver .tier-badge {
    background: linear-gradient(135deg, #bdbdbd, #9e9e9e);
}
.tier-silver .tier-badge svg { fill: #f5f5f5; }
.tier-gold .tier-badge {
    background: linear-gradient(135deg, #f9c74f, #c8a200);
}
.tier-gold .tier-badge svg { fill: #fff8e1; }
.tier-platinum .tier-badge {
    background: linear-gradient(135deg, #e8e8f0, #a0a0c0, #7070a0);
}
.tier-platinum .tier-badge svg { fill: #f0f0ff; }
.tier-platinum .tier-name { color: #7070a0; }

.tier-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dark);
}
.tier-pts {
    font-size: 0.7rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* CTA spacing */
.benefits-cta {
    margin-bottom: 0;
}

/* ─── Toast Notifications ─── */
.auth-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 13px 18px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
    z-index: 9999;
    transform: translateX(440px);
    transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
    max-width: 340px;
    font-size: 0.9rem;
    line-height: 1.5;
    font-family: var(--body-font);
}
.auth-notification.show {
    transform: translateX(0);
}
.auth-notification.success {
    border-left: 4px solid #43a047;
    background: #f1f9f2;
    color: #1b5e20;
}
.auth-notification.error {
    border-left: 4px solid #e53935;
    background: #fff5f5;
    color: #b71c1c;
}
.auth-notification.info {
    border-left: 4px solid #1e88e5;
    background: #e8f4fd;
    color: #0d47a1;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .auth-main {
        padding: 95px 1rem 2rem;
        align-items: flex-start;
    }
    .auth-card {
        padding: 2rem 1.75rem;
        border-radius: 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
@media (max-width: 480px) {
    .auth-main {
        padding: 88px 0.75rem 1.5rem;
    }
    .auth-card {
        padding: 1.75rem 1.4rem;
        border-radius: 18px;
    }
    .auth-step h2 {
        font-size: 1.65rem;
    }
    .otp-digit {
        width: 44px;
        height: 50px;
        font-size: 1.3rem;
        border-radius: 10px;
    }
    .otp-inputs {
        gap: 7px;
    }
    .tiers-track {
        align-items: flex-start;
    }
    .tier-item {
        flex: 1;
        min-width: 0;
    }
    .tier-name,
    .tier-pts {
        text-align: center;
        white-space: normal;
    }
    .auth-notification {
        left: 12px;
        right: 12px;
        top: 84px;
        max-width: none;
        transform: translateY(-24px);
    }
    .auth-notification.show {
        transform: translateY(0);
    }
}
