/* ── RunBhumi Auth — login & register ── */
/* Colors match the home carousel hero scrim */

:root {
    --rb-navy:        #0a3d48;
    --rb-navy-mid:    #0d5563;
    --rb-navy-light:  #148a9c;
    --rb-coral:       #ff5c3a;
    --rb-coral-deep:  #e84728;
    --rb-gold:        #ffb703;
    --rb-mint:        #e8f5f3;
    --rb-surface:     #eef6f5;
    --rb-text:        #123038;
    --rb-muted:       #5a747c;
    --rb-grad:        linear-gradient(135deg, #0a3d48 0%, #0d5563 45%, #148a9c 100%);
    --rb-grad-coral:  linear-gradient(135deg, #ff5c3a 0%, #e84728 100%);
    --rb-shadow:      0 20px 50px rgba(10, 61, 72, 0.14);
    --rb-radius:      18px;
}

/* ── Page wrapper ── */
.auth-page {
    font-family: "DM Sans", "Plus Jakarta Sans", system-ui, sans-serif;
    color: var(--rb-text);
    background: var(--rb-surface);
    min-height: calc(100vh - 140px);
    position: relative;
    overflow: hidden;
}
.auth-page h1, .auth-page h2, .auth-page h3, .auth-brand-name {
    font-family: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ambient blobs */
.auth-bg {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.auth-bg::before, .auth-bg::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(70px);
}
.auth-bg::before {
    width: 380px; height: 380px;
    background: rgba(10, 61, 72, 0.14);
    top: -100px; left: -80px;
    animation: authFloat 12s ease-in-out infinite;
}
.auth-bg::after {
    width: 320px; height: 320px;
    background: rgba(255, 92, 58, 0.10);
    bottom: -80px; right: -60px;
    animation: authFloat 14s ease-in-out infinite reverse;
}

/* ── Two-column shell ── */
.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: calc(100vh - 160px);
    max-width: 1140px;
    margin: 1.25rem auto 2.5rem;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--rb-shadow);
    background: #fff;
    position: relative; z-index: 1;
}

/* ── Visual panel ── */
.auth-visual {
    position: relative;
    min-height: 100%;
    background: var(--rb-grad);
    color: #fff;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 2.75rem; overflow: hidden;
}
.auth-visual-media {
    position: absolute; inset: 0; z-index: 0;
}
.auth-visual-media img {
    width: 100%; height: 100%;
    object-fit: cover; opacity: 0.38;
    transform: scale(1.06);
    animation: authKenBurns 18s ease-in-out infinite alternate;
}
/* Scrim — same tones as hero */
.auth-visual-scrim {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(105deg,
            rgba(10, 61, 72, 0.92) 0%,
            rgba(10, 61, 72, 0.72) 42%,
            rgba(10, 61, 72, 0.38) 70%,
            rgba(20, 138, 156, 0.28) 100%),
        linear-gradient(to top, rgba(10, 61, 72, 0.85) 0%, transparent 45%);
}

/* Floating orbs */
.auth-orb {
    position: absolute; border-radius: 50%;
    filter: blur(3px); z-index: 1; pointer-events: none;
    animation: authFloat 9s ease-in-out infinite;
}
.auth-orb--1 {
    width: 160px; height: 160px;
    background: rgba(255, 92, 58, 0.30);
    top: 10%; right: -35px;
}
.auth-orb--2 {
    width: 110px; height: 110px;
    background: rgba(255, 183, 3, 0.25);
    bottom: 26%; left: -28px;
    animation-delay: -3s;
}
.auth-orb--3 {
    width: 65px; height: 65px;
    background: rgba(20, 138, 156, 0.40);
    top: 44%; right: 20%;
    animation-delay: -5s;
}

.auth-visual-content { position: relative; z-index: 2; max-width: 420px; }

.auth-brand {
    display: inline-flex; align-items: center; gap: 0.65rem;
    margin-bottom: 1.25rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em;
}
.auth-brand i {
    width: 40px; height: 40px; border-radius: 11px;
    display: grid; place-items: center;
    background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.25);
}

.auth-visual-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 700;
    line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 0.75rem; color: #fff !important;
}
.auth-visual-text {
    font-size: 1rem; line-height: 1.55;
    color: rgba(255,255,255,.88); margin-bottom: 1.6rem;
}

.auth-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.auth-pill {
    display: inline-flex; align-items: center; gap: 0.38rem;
    padding: 0.42rem 0.8rem; border-radius: 999px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
    font-size: 0.8rem; font-weight: 600; backdrop-filter: blur(6px);
}
.auth-pill i { color: var(--rb-gold); font-size: 0.72rem; }

/* ── Form panel ── */
.auth-form-panel {
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(1.75rem, 4vw, 3rem);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(232, 245, 243, 0.85), transparent 55%),
        #fff;
    animation: authFadeUp 0.65s ease both;
}
.auth-form-header { margin-bottom: 1.65rem; }

.auth-kicker {
    display: inline-flex; align-items: center; gap: 0.38rem;
    color: var(--rb-navy-light); font-size: 0.78rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.6rem;
}
.auth-form-title {
    font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 700;
    color: var(--rb-navy); letter-spacing: -0.03em; margin-bottom: 0.35rem;
}
.auth-form-sub { color: var(--rb-muted); font-size: 0.96rem; margin: 0; }

/* Error */
.auth-alert {
    border: none; border-radius: 12px;
    background: rgba(255, 92, 58, 0.08); color: var(--rb-coral-deep);
    padding: 0.85rem 1rem; margin-bottom: 1.2rem; font-size: 0.9rem;
}
.auth-alert ul { padding-left: 1.1rem; margin: 0; }

/* Labels */
.auth-label { display: block; font-weight: 600; font-size: 0.86rem; color: var(--rb-navy); margin-bottom: 0.4rem; }
.auth-label .req { color: var(--rb-coral); }
.auth-field { margin-bottom: 1.1rem; }

/* Input wrap */
.auth-input-wrap {
    position: relative; display: flex; align-items: stretch;
    border-radius: 13px; background: #e8f5f3;
    border: 1.5px solid transparent;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-input-wrap:focus-within {
    background: #fff; border-color: var(--rb-navy-light);
    box-shadow: 0 0 0 4px rgba(10, 61, 72, 0.10);
}
.auth-input-wrap.is-invalid-wrap {
    border-color: var(--rb-coral);
    background: rgba(255, 92, 58, 0.04);
}
.auth-input-icon {
    display: grid; place-items: center; width: 46px;
    flex-shrink: 0; color: var(--rb-navy-mid); font-size: 0.9rem;
}
.auth-input, .auth-textarea, .auth-file {
    flex: 1; border: none !important; background: transparent !important;
    box-shadow: none !important; padding: 0.88rem 1rem 0.88rem 0;
    font-size: 0.97rem; color: var(--rb-text); outline: none; width: 100%;
}
.auth-input::placeholder, .auth-textarea::placeholder { color: #7a9aa0; }
.auth-textarea { resize: vertical; min-height: 92px; padding-top: 0.82rem; }
.auth-input-wrap--textarea { align-items: flex-start; }
.auth-input-wrap--textarea .auth-input-icon { padding-top: 0.92rem; }

/* Password toggle */
.auth-toggle-pass {
    background: none; border: none; color: var(--rb-muted);
    padding: 0 0.9rem; cursor: pointer; transition: color .2s;
}
.auth-toggle-pass:hover { color: var(--rb-navy); }

/* File */
.auth-file-box { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; padding: 0.6rem 0.8rem 0.6rem 0; }
.auth-file { font-size: 0.88rem; padding: 0; }
.auth-hint { font-size: 0.76rem; color: var(--rb-muted); margin: 0.3rem 0 0; }

/* Checkbox */
.auth-check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.2rem 0 1.3rem; }
.auth-check input { width: 1.05rem; height: 1.05rem; margin-top: 0.14rem; accent-color: var(--rb-navy-mid); flex-shrink: 0; }
.auth-check label { font-size: 0.9rem; color: var(--rb-muted); font-weight: 500; cursor: pointer; }
.auth-check a { color: var(--rb-navy-light); font-weight: 600; text-decoration: none; }
.auth-check a:hover { color: var(--rb-coral); }

/* Buttons */
.auth-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; border: none; border-radius: 999px; font-weight: 700;
    font-size: 1rem; padding: 0.92rem 1.5rem; cursor: pointer;
    transition: transform .2s, box-shadow .2s, filter .2s; text-decoration: none;
}
/* Primary — coral (same as hero "Get Started") */
.auth-btn-primary {
    background: var(--rb-grad-coral);
    color: #fff;
    box-shadow: 0 10px 26px rgba(255, 92, 58, 0.35);
}
.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(255, 92, 58, 0.45);
    color: #fff; filter: brightness(1.05);
}
.auth-btn-primary:active { transform: translateY(0); }

/* Ghost — teal outline */
.auth-btn-ghost {
    background: transparent; color: var(--rb-navy);
    border: 1.5px solid rgba(10, 61, 72, 0.20); box-shadow: none;
}
.auth-btn-ghost:hover {
    background: var(--rb-mint); border-color: var(--rb-navy-light);
    color: var(--rb-navy); transform: translateY(-2px); text-decoration: none;
}

/* Section heading */
.auth-section-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.92rem; font-weight: 700; color: var(--rb-navy);
    margin: 0.2rem 0 1.1rem; padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(10, 61, 72, 0.1);
}
.auth-section-title i { color: var(--rb-coral); }

/* Divider */
.auth-divider {
    display: flex; align-items: center; gap: 0.8rem;
    margin: 1.4rem 0 1.1rem; color: var(--rb-muted); font-size: 0.83rem;
}
.auth-divider::before, .auth-divider::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(10,61,72,.18), transparent);
}

/* Switch */
.auth-switch { text-align: center; }
.auth-switch p { color: var(--rb-muted); margin-bottom: 0.7rem; font-size: 0.94rem; }

/* 2-col grid */
.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

/* Validation */
.invalid-feedback { font-size: 0.8rem; margin-top: 0.32rem; }
.is-invalid { color: var(--rb-coral-deep); }

/* ── Animations ── */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes authFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    50%       { transform: translateY(-16px) translateX(9px); }
}
@keyframes authKenBurns {
    from { transform: scale(1.06) translate(0, 0); }
    to   { transform: scale(1.13) translate(-2%, 1%); }
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        margin: 0.75rem 0.85rem 2rem;
        border-radius: 20px; min-height: auto;
    }
    .auth-visual { min-height: 200px; padding: 1.65rem 1.5rem; justify-content: flex-end; }
    .auth-visual-title { font-size: 1.5rem; margin-bottom: 0.35rem; }
    .auth-visual-text {
        font-size: 0.9rem; margin-bottom: 0.75rem;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .auth-pills { display: none; }
    .auth-orb--1, .auth-orb--3 { display: none; }
    .auth-form-panel { padding: 1.5rem 1.35rem 1.85rem; }
    .auth-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .auth-shell { margin: 0.4rem 0.4rem 1.25rem; border-radius: 16px; box-shadow: 0 10px 28px rgba(10,61,72,.1); }
    .auth-visual { min-height: 165px; padding: 1.25rem 1.1rem; }
    .auth-brand { font-size: 0.96rem; margin-bottom: 0.65rem; }
    .auth-brand i { width: 34px; height: 34px; border-radius: 9px; }
    .auth-visual-title { font-size: 1.28rem; }
    .auth-visual-text { display: none; }
    .auth-form-panel { padding: 1.2rem 1rem 1.6rem; }
    .auth-form-header { margin-bottom: 1.1rem; }
    .auth-form-title { font-size: 1.35rem; }
    .auth-btn { font-size: 0.95rem; padding: 0.84rem 1.2rem; }
    .auth-input { font-size: 0.93rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-form-panel, .auth-orb,
    .auth-visual-media img,
    .auth-bg::before, .auth-bg::after { animation: none !important; }
}
