/* ===== Login Page Styling ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2b7cff 0%, #1e5ed6 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background blur effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("./Pictures/Background/1.jpg");
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    opacity: 0.3;
    z-index: -1;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Header Section */
.login-header {
    background: linear-gradient(135deg, #2b7cff 0%, #1e5ed6 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    font-size: 14px;
    opacity: 0.95;
}

/* Alert Messages */
.alert {
    padding: 14px 20px;
    margin: 20px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background-color: #fee;
    border-left: 4px solid #f66;
    color: #c33;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Section */
.login-form {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #2b7cff;
    box-shadow: 0 0 0 3px rgba(43,124,255,0.08);
}

.form-group input::placeholder {
    color: #aaa;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2b7cff 0%, #1e5ed6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(43,124,255,0.25);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43,124,255,0.42);
}

.btn-login:active {
    transform: translateY(0);
}

/* Footer */
.login-footer {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    color: #999;
    font-size: 12px;
}

/* Background decoration */
.login-bg-decoration {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(43,124,255,0.12), transparent);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    z-index: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .login-box {
        border-radius: 12px;
    }

    .login-header {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 28px;
    }

    .login-form {
        padding: 30px 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input {
        padding: 11px 12px;
        font-size: 16px; /* ป้องกัน zoom บน iOS */
    }

    .btn-login {
        padding: 12px;
        font-size: 15px;
    }
}
