/* ============================================
   LOGIN PAGE - MODERN & MINIMALIST DESIGN
   ============================================ */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
}

/* Animated Background Elements */
body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 20s infinite ease-in-out;
}

body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

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

/* Login Container */
.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

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

/* Login Header */
.login-header {
    text-align: center;
    padding: 48px 40px 32px;
    background-color: #667eea;
    color: white;
}

.login-logo {
    width: 200px;
    border-radius: 10px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    background: white;
    padding: 8px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 15px;
    opacity: 0.95;
    font-weight: 400;
}

/* Login Body */
.login-body {
    padding: 40px;
}

/* Form Group */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

/* Input Icon */
.input-icon {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-icon span {
    color: #9ca3af;
    font-size: 18px;
}

/* Input Fields */
.input-wrapper input[type="text"],
.input-wrapper input[type="password"] {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input[type="text"]:focus,
.input-wrapper input[type="password"]:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-wrapper input[type="text"]::placeholder,
.input-wrapper input[type="password"]::placeholder {
    color: #9ca3af;
}

/* Form Options (Remember Me & Forgot Password) */
.form-options {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #667eea;
}

.remember-me label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    margin: 0;
}

/* Forgot Password Link */
.forgot-password {
    font-size: 14px;
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #764ba2;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-submit::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 ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

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

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

/* Button Text */
.btn-text {
    display: inline-block;
}

/* Button Spinner (hidden by default) */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Login Footer */
.login-footer {
    padding: 24px 40px;
    background: #f9fafb;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.login-footer p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .login-header {
        padding: 32px 24px 24px;
    }

    .login-body {
        padding: 32px 24px;
    }

    .login-footer {
        padding: 20px 24px;
    }

    .login-title {
        font-size: 24px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Loading State */
#loginForm.loading .btn-submit {
    pointer-events: none;
    opacity: 0.7;
}

#loginForm.loading .btn-text {
    display: none;
}

#loginForm.loading .btn-spinner {
    display: inline-block;
}