/*
 * IT Equipment Management - Login Page CSS
 * Dark bokeh background with centered glassmorphism card
 */

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0e1a;
    position: relative;
    overflow: hidden;
}

/* ============================================
   Canvas Bokeh Background
   ============================================ */
#bokeh-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ============================================
   Login Container & Card
   ============================================ */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 24px;
    padding: 44px 40px 36px;
    box-shadow:
        0 32px 64px -12px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ============================================
   Login Header
   ============================================ */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 12px;
    animation: logoPulse 3s ease-in-out infinite;
    box-shadow:
        0 0 0 0 rgba(99, 102, 241, 0.4),
        0 12px 32px rgba(0, 0, 0, 0.4);
}

@keyframes logoPulse {

    0%,
    100% {
        box-shadow:
            0 0 0 0 rgba(99, 102, 241, 0.4),
            0 12px 32px rgba(0, 0, 0, 0.4);
    }

    50% {
        box-shadow:
            0 0 0 10px rgba(99, 102, 241, 0),
            0 12px 40px rgba(99, 102, 241, 0.35);
    }
}

.login-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-header h1 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.login-header p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.875rem;
    margin: 0;
}

/* ============================================
   Alert Message
   ============================================ */
.login-card .alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shakeX 0.5s ease;
}

@keyframes shakeX {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* ============================================
   Form elements
   ============================================ */
.login-card .form-group {
    margin-bottom: 18px;
}

.login-card .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.login-card .input-group {
    position: relative;
}

.login-card .input-group>i.fa-user,
.login-card .input-group>i.fa-lock {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    transition: color 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.login-card .form-control {
    width: 100%;
    padding: 14px 48px 14px 46px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.login-card .form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow:
        0 0 0 4px rgba(139, 92, 246, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-card .input-group:focus-within>i.fa-user,
.login-card .input-group:focus-within>i.fa-lock {
    color: #a78bfa;
}

/* ============================================
   Login Button
   ============================================ */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 32px rgba(124, 58, 237, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login .spinner {
    display: none;
}

.btn-login.loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Password Toggle
   ============================================ */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 3;
    line-height: 1;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* ============================================
   Login Footer
   ============================================ */
.login-footer {
    text-align: center;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-footer a:hover {
    color: #a78bfa;
}

/* ============================================
   Brand Footer
   ============================================ */
.brand-footer {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
    text-align: center;
    z-index: 10;
    white-space: nowrap;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px 28px;
    }

    .login-header h1 {
        font-size: 1.4rem;
    }
}