* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    body::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff0a" points="0,1000 1000,0 1000,1000"/></svg>');
        animation: float 20s ease-in-out infinite;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(44, 62, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(44, 62, 80, 0);
    }
}

.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    margin: 20px;
}

.login-card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(44, 62, 80, 0.1);
    box-shadow: 0 20px 40px rgba(44, 62, 80, 0.2);
    padding: 40px;
    animation: slideUp 0.8s ease-out;
    transition: transform 0.3s ease;
}

    .login-card:hover {
        transform: translateY(-5px);
    }

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

    .login-icon i {
        font-size: 30px;
        color: white;
    }

.login-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    text-shadow: none;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 300;
}

.form-floating {
    margin-bottom: 20px;
    position: relative;
}

    .form-floating .form-control {
        background: rgba(44, 62, 80, 0.05);
        border: 2px solid rgba(44, 62, 80, 0.2);
        border-radius: 15px;
        color: #2c3e50;
        font-size: 16px;
        padding: 20px 50px 20px 20px;
        transition: all 0.3s ease;
        font-weight: 400;
    }

        .form-floating .form-control:focus {
            background: white;
            border-color: #2c3e50;
            box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
            outline: none;
        }

        .form-floating .form-control::placeholder {
            color: rgba(44, 62, 80, 0.6);
        }

    .form-floating label {
        color: #2c3e50;
        padding-left: 20px;
        font-weight: 400;
    }

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #2c3e50;
    z-index: 5;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    padding: 15px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

    .login-btn:hover {
        background: linear-gradient(135deg, #34495e, #2c3e50);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(44, 62, 80, 0.3);
    }

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

    .login-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .login-btn:hover::before {
        left: 100%;
    }

.alert {
    background: rgba(248, 215, 218, 0.9);
    border: 1px solid rgba(245, 198, 203, 0.9);
    border-radius: 15px;
    color: #721c24;
    margin-bottom: 20px;
    animation: slideUp 0.5s ease-out;
}

.forgot-password {
    text-align: center;
    margin-top: 20px;
}

    .forgot-password a {
        color: #7f8c8d;
        text-decoration: none;
        font-size: 14px;
        transition: color 0.3s ease;
        font-weight: 400;
    }

        .forgot-password a:hover {
            color: #2c3e50;
        }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Custom SweetAlert2 styling */
.swal2-popup {
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    font-family: 'Kanit', sans-serif !important;
}

.swal2-title {
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.swal2-content {
    color: #2c3e50 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #2c3e50, #34495e) !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
}

.swal2-cancel {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
}
