/* iChitty Auth Pages */
:root {
    --teal: #0D7377;
    --teal-light: #14A3A8;
    --teal-dark: #095456;
    --coral: #E85A4F;
    --navy: #1B2A4A;
    --mint: #A8E6CF;
    --mint-soft: #E8F8F0;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

body.auth-body {
    font-family: var(--font-body);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--navy);
}

.auth-bg-pattern {
    position: fixed;
    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: 48px 48px;
    pointer-events: none;
}

.auth-bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 85%, rgba(13, 115, 119, 0.35), transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(232, 90, 79, 0.15), transparent 40%),
        linear-gradient(145deg, var(--navy) 0%, #0F3443 50%, var(--teal-dark) 100%);
    pointer-events: none;
}

.auth-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
}

.auth-brand-panel {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

.auth-home-link {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.auth-home-link:hover { color: var(--mint); }

.auth-brand-content {
    max-width: 400px;
}

.auth-logo .brand-mark {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--coral);
}

.auth-logo .brand-name {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
}

.auth-tagline {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 1rem 0 2rem;
    line-height: 1.5;
}

.auth-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
}

.auth-features-list i {
    color: var(--mint);
    width: 20px;
}

.auth-company {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin: 0;
}

.auth-form-panel {
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
}

.auth-form-inner {
    width: 100%;
    max-width: 380px;
}

.auth-mobile-home {
    color: var(--teal);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.auth-mobile-logo {
    margin-bottom: 1.5rem;
}

.auth-mobile-logo .brand-mark {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--coral);
}

.auth-mobile-logo .brand-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
}

.auth-heading {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.35rem;
}

.auth-subheading {
    color: #5A6478;
    font-size: 0.925rem;
    margin-bottom: 1.75rem;
}

.auth-alert {
    font-size: 0.875rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--navy);
}

.auth-form .form-control {
    border: 1.5px solid #D8E0EC;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.925rem;
}

.auth-form .form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.15);
}

.auth-form .input-group-text {
    background: var(--mint-soft);
    border: 1.5px solid #D8E0EC;
    border-right: none;
    color: var(--teal);
}

.auth-form .input-group .form-control {
    border-left: none;
}

.btn-auth {
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 10px;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-auth:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 115, 119, 0.35);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #9CA3AF;
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.auth-switch-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #5A6478;
}

.auth-switch-link a {
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch-link a:hover {
    text-decoration: underline;
}

/* OTP tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    background: #EDF1F7;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #5A6478;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.auth-tab.active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 2px 8px rgba(27, 42, 74, 0.08);
}

.auth-pane { display: none; }
.auth-pane.active { display: block; }

.otp-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.otp-input-group input {
    width: 48px;
    height: 52px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: 1.5px solid #D8E0EC;
    border-radius: 10px;
}

.otp-input-group input:focus {
    border-color: var(--teal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.15);
}

.otp-resend {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #5A6478;
}

.otp-resend a {
    color: var(--teal);
    font-weight: 500;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .auth-form-panel {
        max-width: 100%;
        box-shadow: none;
    }
}

@media (min-width: 992px) {
    .auth-brand-panel {
        display: flex;
    }
}

/* ── Demo login buttons ── */
.demo-login-box {
    margin-top: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, #F0FAF8 0%, #FFF5F3 100%);
    border: 1px dashed rgba(13, 115, 119, 0.35);
    border-radius: 12px;
}
.demo-login-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--navy);
    margin-bottom: 0.15rem;
}
.demo-login-hint {
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.75rem;
}
.demo-login-hint code {
    background: #fff;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--teal);
}
.demo-login-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.demo-login-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.65rem 0.35rem;
    border: 1.5px solid #D8E0EC;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}
.demo-login-btn i {
    font-size: 1rem;
    color: var(--teal);
}
.demo-login-btn span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.2;
}
.demo-login-btn small {
    font-size: 0.65rem;
    color: #9CA3AF;
}
.demo-login-btn:hover,
.demo-login-btn.active {
    border-color: var(--teal);
    background: var(--mint-soft);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 115, 119, 0.15);
}
.demo-login-btn.demo-admin:hover,
.demo-login-btn.demo-admin.active {
    border-color: #C9A227;
    background: #FFF8E7;
}
.demo-login-btn.demo-admin i { color: #C9A227; }
.demo-login-btn.demo-collector:hover,
.demo-login-btn.demo-collector.active {
    border-color: var(--coral);
    background: #FFF0EE;
}
.demo-login-btn.demo-collector i { color: var(--coral); }
.demo-filled {
    animation: demoPulse 0.6s ease;
    border-color: var(--teal) !important;
}
@keyframes demoPulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 115, 119, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(13, 115, 119, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 115, 119, 0); }
}

/* ── Chit auction animation ── */
.chit-anim {
    margin: 0 0 1.75rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}
.chit-anim-ring {
    position: relative;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.chit-anim-gavel {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--coral), #F07A6E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 8px 24px rgba(232, 90, 79, 0.4);
    animation: gavelTap 2.4s ease-in-out infinite;
    z-index: 2;
}
.chit-anim-coin {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, #F5D76E, #C9A227);
    color: #5C4A12;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35);
}
.chit-coin-1 { animation: orbitCoin 4s linear infinite; }
.chit-coin-2 { animation: orbitCoin 4s linear infinite 1.33s; }
.chit-coin-3 { animation: orbitCoin 4s linear infinite 2.66s; }

@keyframes orbitCoin {
    0%   { transform: rotate(0deg) translateX(48px) rotate(0deg); opacity: 1; }
    50%  { opacity: 0.85; }
    100% { transform: rotate(360deg) translateX(48px) rotate(-360deg); opacity: 1; }
}
@keyframes gavelTap {
    0%, 70%, 100% { transform: rotate(-12deg) scale(1); }
    80% { transform: rotate(18deg) scale(1.08); }
    88% { transform: rotate(-8deg) scale(1); }
}

.chit-anim-ticker {
    display: flex;
    gap: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.ticker-item {
    font-size: 0.7rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    animation: tickerFade 3s ease-in-out infinite;
}
.ticker-item.live {
    background: rgba(232, 90, 79, 0.85);
    color: #fff;
    font-weight: 700;
    animation: livePulse 1.5s ease-in-out infinite;
}
.ticker-item:nth-child(2) { animation-delay: 0.4s; }
.ticker-item:nth-child(3) { animation-delay: 0.8s; }
.ticker-item:nth-child(4) { animation-delay: 1.2s; }

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 90, 79, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(232, 90, 79, 0); }
}
@keyframes tickerFade {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.chit-anim-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 40px;
}
.chit-anim-bars span {
    flex: 1;
    height: var(--h);
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--mint), var(--teal));
    animation: barBounce 1.8s ease-in-out infinite;
}
.chit-anim-bars span:nth-child(2) { animation-delay: 0.15s; }
.chit-anim-bars span:nth-child(3) { animation-delay: 0.3s; }
.chit-anim-bars span:nth-child(4) { animation-delay: 0.45s; }
.chit-anim-bars span:nth-child(5) { animation-delay: 0.6s; }
.chit-anim-bars span:nth-child(6) { animation-delay: 0.75s; }
.chit-anim-bars span:nth-child(7) { animation-delay: 0.9s; }

@keyframes barBounce {
    0%, 100% { transform: scaleY(0.7); opacity: 0.7; }
    50% { transform: scaleY(1); opacity: 1; }
}

.chit-anim-mobile {
    margin-bottom: 1rem;
}
.chit-anim-ticker.compact {
    justify-content: center;
}
