/*
 * IT Equipment Management - Login Page CSS
 * Modern glassmorphism design with animated background
 */

/* ============================================
   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: linear-gradient(135deg, #1a1c2e 0%, #2d3561 50%, #1a1c2e 100%);
    position: relative;
    overflow: hidden;
}

/* ============================================
   Animated Background Elements
   ============================================ */
.bg-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    animation: float 20s infinite ease-in-out;
}

.bg-shapes .shape:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.bg-shapes .shape:nth-child(2) {
    width: 300px;
    height: 300px;
    top: 50%;
    right: -50px;
    animation-delay: -5s;
}

.bg-shapes .shape:nth-child(3) {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

/* ============================================
   Login Container & Card
   ============================================ */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ============================================
   Login Header
   ============================================ */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
    padding: 12px;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
    }
}

.login-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-header h1 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    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;
}

/* ============================================
   Form Elements
   ============================================ */
.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.login-card .input-group {
    position: relative;
}

.login-card .input-group>i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.login-card .form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.login-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-card .form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.login-card .form-control:focus+i,
.login-card .input-group:focus-within>i {
    color: #8b5cf6;
}

/* ============================================
   Login Button
   ============================================ */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 1rem;
}

/* Loading state */
.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: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Login Footer
   ============================================ */
.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #a78bfa;
}

.login-footer a i {
    margin-right: 6px;
}

/* ============================================
   Brand Footer
   ============================================ */
.brand-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    text-align: center;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 24px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}