:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-input: rgba(255, 255, 255, 0.05);
    --glass-input-focus: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', "Segoe UI", sans-serif;
}


body {
    min-height: 100vh;
    /* Prevent unwanted scrollbars from floating blur circles */
    overflow-x: hidden;
    overflow-y: hidden;
    background-color: #0b0f19;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.5) 0px, transparent 100%);
    position: relative;
}

/* Allow scrolling on small screens/laptops with low vertical height */
@media (max-height: 700px) {
    body {
        overflow-y: auto;
    }
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 2;
    /* Optional: reduce padding slightly on tight displays */
    box-sizing: border-box;
}



/* Floating animated mesh circles */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    pointer-events: none;
    animation: float 20s infinite alternate ease-in-out;
}

.circle1 {
    width: 380px;
    height: 380px;
    background: #6366f1;
    top: -100px;
    left: -100px;
}

.circle2 {
    width: 420px;
    height: 420px;
    background: #06b6d4;
    bottom: -150px;
    right: -120px;
    animation-delay: -5s;
}

.circle3 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 40px) scale(1.08);
    }

    100% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}


.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.56);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.logo {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 12px 24px -6px rgba(99, 102, 241, 0.5);
    transition: transform 0.3s ease;
}

.login-card:hover .logo {
    transform: rotate(-3deg) scale(1.03);
}

h2 {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.65rem;
    letter-spacing: -0.02em;
}

.text-muted-light {
    color: var(--text-muted);
    font-size: 0.925rem;
}

/* Form Controls */
.form-floating>.form-control {
    background: var(--glass-input);
    border: 1px solid var(--glass-border);
    color: #fff;
    height: 58px;
    border-radius: 14px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-floating>.form-control:focus {
    background: var(--glass-input-focus);
    color: #fff;
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.form-floating>label {
    color: #94a3b8;
    padding-left: 16px;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: #c084fc;
}

/* Integrated Password Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 5;
}

.toggle-password-btn:hover {
    color: #f8fafc;
}

/* Button & Controls */
.btn-login {
    height: 52px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(99, 102, 241, 0.55);
    background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
}

.btn-login:active {
    transform: translateY(0);
}

.custom-checkbox .form-check-input {
    background-color: var(--glass-input);
    border-color: var(--glass-border);
    cursor: pointer;
    border-radius: 6px;
}

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

.form-check-label {
    color: #cbd5e1;
    font-size: 0.875rem;
    cursor: pointer;
}

.forgot-link {
    color: #a78bfa;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Glass Alert */
.alert-glass {
    background: rgba(239, 68, 68, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-glass .btn-close {
    filter: invert(1);
    opacity: 0.7;
    padding: 0;
    width: 0.75em;
    height: 0.75em;
}

/* Footer Description */
.app-description {
    color: #94a3b8;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.dealer-tagline {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 6px;
}

.dealer-tagline i {
    color: #a78bfa;
    margin-right: 4px;
}

.badge-erad {
    display: inline-block;
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    margin: 0 2px;
}

.divider {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

.text-sub {
    font-size: 0.825rem;
    color: #cbd5e1;
}

.text-muted-sub {
    font-size: 0.775rem;
    color: #64748b;
}

.app-description a {
    color: #a78bfa;
    text-decoration: none;
}

.app-description a:hover {
    text-decoration: underline;
}

.copyright {
    color: #64748b;
    font-size: 0.8rem;
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
}