/* ==================== BACKGROUND ==================== */
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0a0a0a;
    overflow: hidden;
    position: relative;
}

/* Animated grid background */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 40px 40px;
    }
}

/* Radial glow */
.bg-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
}

/* Floating orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.07;
    z-index: 0;
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-1 {
    width: 420px;
    height: 420px;
    background: #fff;
    top: -120px;
    left: -120px;
    animation-duration: 14s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #fff;
    bottom: -80px;
    right: -80px;
    animation-duration: 10s;
    animation-delay: -5s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, 15px) scale(1.05);
    }
}

/* ==================== CARD ==================== */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 1rem;
    animation: cardEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

/* ==================== HEADER ==================== */
.login-header {
    background: #000;
    color: #fff;
    padding: 2rem 1.75rem 1.6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle header pattern */
.login-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
}

.logo-icon {
    width: auto;
    height: 90px;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
}

@keyframes logoPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.15);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.logo-icon i {
    font-size: 1.7rem;
    position: relative;
}

.login-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.2px;
    position: relative;
}

.login-header p {
    margin: 0.4rem 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    position: relative;
}

/* LIVE badge */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 0.18rem 0.65rem;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.6rem;
    position: relative;
}

.live-badge .dot {
    width: 5px;
    height: 5px;
    background: #4ade80;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ==================== BODY ==================== */
.login-body {
    padding: 1.75rem;
}

.form-label {
    font-weight: 600;
    color: #222;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
}

/* ==================== INPUT GROUP ==================== */
.input-wrap {
    position: relative;
}

.input-wrap .input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 5;
    transition: color 0.2s;
}

.input-wrap:focus-within .input-icon {
    color: #000;
}

.form-control {
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    padding: 0.65rem 0.9rem 0.65rem 2.5rem;
    font-size: 0.875rem;
    transition: all 0.25s;
    background: #fafafa;
    color: #111;
}

.form-control::placeholder {
    color: #c4c9d1;
}

.form-control:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
    background: #fff;
    outline: none;
}

.form-control.is-invalid {
    border-color: #dc2626;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.password-toggle {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.15rem;
    z-index: 5;
    border-radius: 4px;
    transition: color 0.2s;
    line-height: 1;
}

.password-toggle:hover {
    color: #000;
}

/* ==================== LOGIN BUTTON ==================== */
.btn-login {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 0.72rem 1.2rem;
    font-weight: 600;
    font-size: 0.875rem;
    width: 100%;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
}

.btn-login:hover:not(:disabled) {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-login .spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 0.4rem;
}

.btn-login.loading .spinner {
    display: inline-block;
}

.btn-login.loading .btn-text {
    opacity: 0.6;
}

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

/* ==================== CHECKBOXES / LINKS ==================== */
.form-check-input {
    border-color: #d1d5db;
    border-radius: 4px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #000;
    border-color: #000;
}

.form-check-label {
    font-size: 0.82rem;
    color: #6b7280;
    cursor: pointer;
}

.forgot-link {
    font-size: 0.82rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #000;
    text-decoration: underline;
}

/* ==================== ALERT ==================== */
.login-alert {
    border-radius: 9px;
    font-size: 0.82rem;
    padding: 0.7rem 0.9rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.login-alert.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.login-alert.alert-success {
    background: #f0fdf4;
    color: #166534;
}

/* Shake on error */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.shake {
    animation: shake 0.4s ease;
}

/* ==================== DIVIDER ==================== */
.divider {
    position: relative;
    text-align: center;
    margin: 1.4rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #f0f0f0;
}

.divider span {
    position: relative;
    background: #fff;
    padding: 0 0.9rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* ==================== SOCIAL BUTTONS ==================== */
.social-login {
    display: flex;
    gap: 0.6rem;
}

.btn-social {
    flex: 1;
    padding: 0.55rem 0.5rem;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    border-radius: 9px;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-social i {
    font-size: 1rem;
}

.btn-social:hover {
    border-color: #000;
    background: #fafafa;
    color: #000;
    transform: translateY(-1px);
}

/* ==================== FOOTER ==================== */
.login-footer {
    background: #f9fafb;
    padding: 1.1rem 1.75rem;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.login-footer p {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
}

.login-footer a {
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ==================== STATS STRIP ==================== */
.stats-strip {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.2rem;
}

.stat-item {
    text-align: center;
}

.stat-item .val {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
}

.stat-item .lbl {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.3);
}