/* ═══════════════════════════════════════════════
   AUTH PAGE STYLES
   ═══════════════════════════════════════════════ */

.auth-page-body {
    background-color: var(--surface-low); /* Light gray for contrast */
    color: var(--deep-emerald);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation is now standard from binate.css, but we can add specific overrides if needed */
#mainNav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--outline-ghost) !important;
}

#mainNav .nav-logo {
    color: var(--deep-emerald) !important;
}

#mainNav .nav-logo-img {
    filter: none !important;
}

#mainNav .nav-links a {
    color: var(--deep-emerald) !important;
}

#mainNav .nav-links a:hover {
    color: var(--neon-lime) !important;
}

#mainNav .btn-ghost {
    color: var(--deep-emerald) !important;
    outline: 1px solid var(--outline-ghost) !important;
}

#mainNav .btn-ghost:hover {
    background: rgba(5, 26, 20, 0.05) !important;
}

#mainNav .nav-hamburger span {
    background: var(--deep-emerald) !important;
}

/* ─── Ambient Background ───────────────────── */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.auth-ambient-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
}

.glow-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(137, 235, 52, 0.1) 0%, transparent 70%);
    top: -10%;
    right: -10%;
    animation: pulseGlow 12s ease-in-out infinite alternate;
}

.glow-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(5, 26, 20, 0.03) 0%, transparent 70%);
    bottom: -5%;
    left: -10%;
    animation: pulseGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes pulseGlow {
    from { transform: scale(1) translate(0, 0); opacity: 0.1; }
    to { transform: scale(1.1) translate(5%, 5%); opacity: 0.2; }
}

/* ─── Auth Container ───────────────────── */
.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    animation: authFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Auth Card ───────────────────── */
.auth-card {
    background: rgba(255, 255, 255, 0.85); /* Slightly more opaque */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--outline-strong); /* Stronger border */
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--deep-emerald);
}

.auth-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(5, 26, 20, 0.6);
    line-height: 1.5;
}

/* ─── Toggle Switch ───────────────────── */
.auth-toggle {
    display: inline-flex;
    background: rgba(5, 26, 20, 0.05);
    padding: 0.35rem;
    border-radius: var(--radius-pill);
    position: relative;
    margin-bottom: 2rem;
    border: 1px solid rgba(5, 26, 20, 0.05);
}

.toggle-btn {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(5, 26, 20, 0.5);
    padding: 0.5rem 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.toggle-btn.active {
    color: var(--deep-emerald);
}

.toggle-slider {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    bottom: 0.4rem;
    width: calc(50% - 0.4rem);
    background: var(--neon-lime);
    border-radius: var(--radius-pill);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    box-shadow: 0 4px 15px rgba(137, 235, 52, 0.4);
}

.signup-active .toggle-slider {
    transform: translateX(100%);
}

/* ─── Form Elements ───────────────────── */
.auth-form-wrapper {
    position: relative;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: formFadeIn 0.5s ease both;
}

.auth-form.active {
    display: flex;
}

@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--deep-emerald);
}

.input-wrapper {
    position: relative;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid var(--outline-strong); /* Stronger border */
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    color: var(--deep-emerald);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

input:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--neon-lime);
    box-shadow: 0 0 0 4px rgba(137, 235, 52, 0.1);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(5, 26, 20, 0.3);
    cursor: pointer;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: var(--deep-emerald);
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--lime-dark);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.forgot-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ─── Custom Checkbox ───────────────────── */
.form-options {
    margin: -0.25rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(5, 26, 20, 0.6);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #FFFFFF;
    border: 1px solid var(--outline-ghost);
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(137, 235, 52, 0.05);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--neon-lime);
    border-color: var(--neon-lime);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6.5px;
    top: 2.5px;
    width: 5px;
    height: 10px;
    border: solid var(--deep-emerald);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* ─── Utilities ───────────────────── */
.w-full {
    width: 100%;
}

/* ─── Footer Consistency ───────────────────── */
.auth-page-body .footer {
    background: var(--surface);
    border-top: 1px solid var(--outline-ghost);
    color: rgba(5, 26, 20, 0.6);
}

.auth-page-body .footer-logo,
.auth-page-body .footer-col-label {
    color: var(--deep-emerald) !important;
}

.auth-page-body .footer-logo-img {
    filter: none;
}

.auth-page-body .footer-tagline,
.auth-page-body .footer-contact-info,
.auth-page-body .footer-links a,
.auth-page-body .footer-copyright,
.auth-page-body .footer-legal a {
    color: rgba(5, 26, 20, 0.5) !important;
}

.auth-page-body .footer-links a:hover,
.auth-page-body .footer-legal a:hover {
    color: var(--neon-lime-dark, #4a9a00) !important;
}

.auth-page-body .footer-contact-info p:first-child {
    color: var(--deep-emerald) !important;
}

.auth-page-body .social-btn {
    background: var(--surface);
    border-color: var(--outline-ghost);
    color: var(--deep-emerald);
}

.auth-page-body .social-btn:hover {
    background: var(--neon-lime);
    color: var(--deep-emerald);
}

.auth-page-body .footer-bottom {
    border-top-color: var(--outline-ghost);
}

/* ─── Divider ───────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--outline-ghost);
}

.auth-divider span {
    padding: 0 1.25rem;
    font-size: 0.8rem;
    color: rgba(5, 26, 20, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* ─── Social Buttons ───────────────────── */
.social-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-social {
    background: #FFFFFF;
    border: 1px solid var(--outline-ghost);
    border-radius: 12px;
    padding: 0.75rem;
    color: var(--deep-emerald);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    transition: all 0.2s;
}

.btn-social:hover {
    background: rgba(5, 26, 20, 0.03);
    border-color: rgba(5, 26, 20, 0.1);
}

/* ─── Sign Up Specifics ───────────────────── */
.account-type-tabs {
    display: flex;
    background: rgba(5, 26, 20, 0.05);
    border-radius: 12px;
    padding: 0.25rem;
    margin-bottom: 0.5rem;
}

.type-tab {
    flex: 1;
    position: relative;
    cursor: pointer;
    text-align: center;
    padding: 0.65rem;
    border-radius: 10px;
    transition: all 0.3s;
}

.type-tab input {
    position: absolute;
    opacity: 0;
}

.type-tab span {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(5, 26, 20, 0.4);
}

.type-tab:has(input:checked) {
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.type-tab:has(input:checked) span {
    color: var(--neon-lime-dark, #4a9a00);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.terms-text {
    font-size: 0.8rem;
    color: rgba(5, 26, 20, 0.5);
    line-height: 1.5;
    text-align: center;
    margin-top: 0.25rem;
}

.terms-text a {
    color: var(--deep-emerald);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.terms-text a:hover {
    color: var(--neon-lime);
}

/* ─── Loader ───────────────────── */
.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(5, 26, 20, 0.1);
    border-top-color: var(--deep-emerald);
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
}

.loading .btn-loader {
    display: block;
}

.loading {
    color: transparent !important;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* ─── Feedback ───────────────────── */
.auth-feedback {
    margin-top: 2rem;
    padding: 1.1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    text-align: center;
    display: none;
    animation: feedbackSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes feedbackSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-feedback.error {
    display: block;
    background: rgba(255, 71, 71, 0.1);
    border: 1px solid rgba(255, 71, 71, 0.2);
    color: #FF6B6B;
}

.auth-feedback.success {
    display: block;
    background: rgba(137, 235, 52, 0.1);
    border: 1px solid rgba(137, 235, 52, 0.2);
    color: var(--neon-lime);
}

/* ─── Responsive ───────────────────── */
@media (max-width: 600px) {
    .auth-main {
        padding: 6rem 1rem 3rem;
    }

    .auth-card {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }

    .toggle-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
}
