/* ─── Auth pages: Login, Register, Vendor Login/Register ───────────────── */

/* Lock viewport so only .auth-form-section scrolls */
html.auth-body,
body.auth-body {
    height: 100%;
    overflow: hidden;
}

:root {
    --auth-banner-bg: linear-gradient(165deg, #061008 0%, #0c1910 25%, #0f2216 50%, #14381e 85%, #1a4728 100%);
    --auth-banner-overlay: linear-gradient(180deg, rgba(6, 16, 8, 0.3) 0%, transparent 40%, rgba(10, 28, 16, 0.5) 100%);
    --auth-banner-accent: rgba(134, 239, 172, 0.12);
    --auth-form-bg: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #eef2f7 100%);
    --auth-card-bg: #ffffff;
    --auth-card-radius: 1.5rem;
    --auth-card-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --auth-card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
    --auth-input-radius: 1rem;
    --auth-input-border: 1.5px solid #e2e8f0;
    --auth-input-focus-border: 2px solid var(--primary-color);
    --auth-input-focus-shadow: 0 0 0 4px rgba(91, 179, 24, 0.15);
    --auth-btn-radius: 1rem;
    --auth-divider: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.auth-page {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ─── Banner / Left panel (desktop) ─────────────────────────────────────── */
.auth-banner {
    background: var(--auth-banner-bg);
    position: relative;
    overflow: hidden;
    padding: 2.5rem 3rem;
    width: 50%;
    min-height: 100vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Photo layer */
.auth-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=30') center/cover no-repeat;
    opacity: 0.08;
}

/* Gradient overlay for depth */
.auth-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--auth-banner-overlay);
    pointer-events: none;
}

/* Soft glow orbs with subtle animation */
.auth-banner-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    animation: auth-orb-float 12s ease-in-out infinite;
}

.auth-banner-orb-1 {
    width: 380px;
    height: 380px;
    background: rgba(91, 179, 24, 0.28);
    top: -120px;
    right: -100px;
    opacity: 0.5;
    animation-delay: 0s;
}

.auth-banner-orb-2 {
    width: 280px;
    height: 280px;
    background: rgba(134, 239, 172, 0.22);
    bottom: 20%;
    left: -80px;
    opacity: 0.45;
    animation-delay: -4s;
}

.auth-banner-orb-3 {
    width: 180px;
    height: 180px;
    background: rgba(187, 247, 208, 0.2);
    top: 45%;
    right: 10%;
    opacity: 0.4;
    animation-delay: -8s;
}

@keyframes auth-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 15px) scale(0.98); }
}

/* Dot pattern overlay */
.auth-banner-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 1;
}

/* Grid overlay */
.auth-banner-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    z-index: 1;
}

/* Inner content: fixed (no scroll – only right side scrolls) */
.auth-banner-inner {
    position: relative;
    z-index: 2;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    max-width: 420px;
    padding: 1.5rem 0;
    animation: auth-inner-fade 0.6s ease-out;
}

@keyframes auth-inner-fade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-banner-inner::-webkit-scrollbar {
    width: 4px;
}

.auth-banner-inner::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.auth-banner-logo {
    display: inline-block;
    margin-bottom: 1.75rem;
}

.auth-banner .auth-banner-logo img,
.auth-banner-inner > img.brightness-0.invert {
    opacity: 0.96;
    display: block;
}

.auth-banner-eyebrow {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(134, 239, 172, 0.95);
    margin-bottom: 0.5rem;
}

.auth-banner-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.auth-banner-title-accent {
    background: linear-gradient(135deg, #a8e063 0%, #86efac 50%, #5bb318 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-banner h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.04em;
    line-height: 1.2;
}

.auth-banner-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Stats strip */
.auth-banner-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(8px);
}

.auth-banner-stat {
    flex: 1;
    text-align: center;
}

.auth-banner-stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #86efac;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-banner-stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
}

.auth-banner-stat-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.auth-banner-features {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.auth-banner-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.875rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.auth-banner-feature:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(134, 239, 172, 0.25);
    transform: translateX(4px);
}

.auth-banner-feature-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(134, 239, 172, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-banner-feature-icon iconify-icon {
    font-size: 1.25rem;
    color: #86efac;
}

/* Testimonial quote card */
.auth-banner-quote {
    margin-top: 1.5rem;
    padding: 1.25rem 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    border-left: 3px solid rgba(134, 239, 172, 0.6);
    position: relative;
}

.auth-banner-quote-icon {
    position: absolute;
    top: 0.75rem;
    left: 1rem;
    font-size: 1.5rem;
    color: rgba(134, 239, 172, 0.35);
}

.auth-banner-quote-text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    font-style: italic;
    margin: 0 0 0.5rem 0;
    padding-left: 1.75rem;
}

.auth-banner-quote-name {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    padding-left: 1.75rem;
}

/* Legacy: keep .d-flex feature rows styled if blades not updated yet */
.auth-banner-features .d-flex {
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
    font-weight: 500;
}

.auth-banner-features .d-flex:last-child {
    margin-bottom: 0;
}

.auth-banner-features .d-flex iconify-icon {
    font-size: 1.35rem;
    color: #86efac;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(134, 239, 172, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ─── Form section (only scrollable column) ────────────────────────────── */
.auth-form-section {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 2rem;
    background: var(--auth-form-bg);
    position: relative;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}

.auth-back-link {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    transition: color 0.2s, background 0.2s;
}

.auth-back-link:hover {
    color: var(--primary-color);
    background: rgba(91, 179, 24, 0.08);
}

.auth-form-section-inner {
    width: 100%;
    max-width: 440px;
    margin: 2rem auto;
    padding: 2rem 0;
}

/* Wide form (e.g. vendor registration) – 2 columns, centered */
.auth-form-section--vendor-register .auth-form-section-inner {
    max-width: 100%;
    width: 100%;
}

.auth-form-section-inner--wide {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.auth-form-card--wide {
    max-width: 100%;
    padding: 2rem 2.5rem;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 575px) {
    .auth-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Form card ────────────────────────────────────────────────────────── */
.auth-form-card {
    width: 100%;
    min-width: 300px;
    max-width: 440px;
    padding: 2.25rem;
    background: var(--auth-card-bg);
    border-radius: var(--auth-card-radius);
    box-shadow: var(--auth-card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

/* Wide form card (vendor register): override max-width so it’s not narrow */
.auth-form-card.auth-form-card--wide {
    max-width: 720px;
}

.auth-form-card:hover {
    box-shadow: var(--auth-card-shadow-hover);
}

.auth-form-card h1 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.auth-form-card .subtitle {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* ─── Inputs ──────────────────────────────────────────────────────────── */
.auth-input-group {
    margin-bottom: 1rem;
}

.auth-input-group .form-label {
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 0.35rem;
    color: #334155;
}

.auth-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.auth-input-wrap iconify-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.15rem;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.auth-input-wrap:focus-within iconify-icon {
    color: var(--primary-color);
}

.auth-input-group .form-control {
    border-radius: var(--auth-input-radius);
    padding: 0.75rem 1rem 0.75rem 2.65rem;
    border: var(--auth-input-border);
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.auth-input-group .form-control:hover {
    border-color: #cbd5e1;
}

.auth-input-group .form-control:focus {
    outline: none;
    border: var(--auth-input-focus-border);
    box-shadow: var(--auth-input-focus-shadow);
}

/* ─── Checkbox ─────────────────────────────────────────────────────────── */
.auth-form-card .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.35rem;
    border: 1.5px solid #cbd5e1;
}

.auth-form-card .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-form-card .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(91, 179, 24, 0.2);
}

.auth-form-card .form-check-label {
    font-size: 0.875rem;
}

/* ─── Primary submit button ────────────────────────────────────────────── */
.auth-form-card .btn-primary-custom {
    border-radius: var(--auth-btn-radius);
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(91, 179, 24, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-form-card .btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(91, 179, 24, 0.35);
}

/* ─── Alerts ───────────────────────────────────────────────────────────── */
.auth-form-card .alert {
    border-radius: 1rem;
    border: 1px solid transparent;
    font-size: 0.875rem;
}

.auth-form-card .alert-danger {
    background: #fef2f2;
    border-color: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.auth-form-card .alert-success {
    background: #f0fdf4;
    border-color: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

/* ─── Divider "Or continue with" ───────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--auth-divider);
}

.auth-divider-text {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Social buttons ───────────────────────────────────────────────────── */
.auth-social-btn {
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.auth-social-btn:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ─── CTA link (Want to sell / Want to buy) ───────────────────────────── */
.auth-cta-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(91, 179, 24, 0.08) 0%, rgba(91, 179, 24, 0.04) 100%);
    border: 1.5px dashed rgba(91, 179, 24, 0.35);
    border-radius: 1rem;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.auth-cta-card:hover {
    border-color: rgba(91, 179, 24, 0.5);
    background: linear-gradient(135deg, rgba(91, 179, 24, 0.12) 0%, rgba(91, 179, 24, 0.06) 100%);
    color: #0f172a;
}

.auth-cta-card iconify-icon:first-of-type {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.auth-cta-card .auth-cta-title {
    font-weight: 700;
    font-size: 0.875rem;
}

.auth-cta-card .auth-cta-desc {
    font-size: 0.8125rem;
    color: #64748b;
}

.auth-cta-card iconify-icon:last-of-type {
    flex-shrink: 0;
    color: #94a3b8;
    transition: transform 0.2s;
}

.auth-cta-card:hover iconify-icon:last-of-type {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* ─── Footer link (Already have account? Sign in) ──────────────────────── */
.auth-form-card .text-center.small a {
    font-weight: 700;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .auth-banner {
        display: none;
    }

    .auth-form-section {
        padding: 2rem 1.25rem;
        padding-top: 3.5rem;
    }

    .auth-form-card {
        padding: 1.75rem 1.25rem;
        min-width: 280px;
    }

    .auth-form-card--wide {
        padding: 1.75rem 1.25rem;
    }

    .auth-form-card h1 {
        font-size: 1.5rem;
    }
}
