/* ========================================
   LOGIN SYSTEM STYLES
   Professional & Responsive Design
   ======================================== */

/* Login Button Styles */
.login-container {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #fcaf17, #f37022);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
    min-height: 36px;
}

.login-btn:hover {
    background: linear-gradient(90deg, #fcaf17, #f37022);
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.2);
}

.login-btn i {
    font-size: 14px;
}

.login-text {
    font-family: 'Poppins', sans-serif;
}

/* Login Modal Overlay */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Login Modal */
.login-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.login-modal-overlay.active .login-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.login-modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

.login-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.login-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.login-modal-close:hover {
    background: #f5f5f5;
    color: #666;
}

/* Modal Body */
.login-modal-body {
    padding: 0 24px 24px;
}

/* Form Styles */
.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    color: #999;
    font-size: 14px;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #0066cc;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.input-wrapper input::placeholder {
    color: #aaa;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #666;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: #0066cc;
    border-color: #0066cc;
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* Submit Button */
.login-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.login-submit-btn:hover {
    background: linear-gradient(135deg, #ff6600, #e55a00);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

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

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.login-divider span {
    background: white;
    padding: 0 16px;
    color: #999;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Social Login */
.google-login-btn {
    width: 100%;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.google-login-btn:hover {
    border-color: #ddd;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.google-login-btn i {
    color: #4285f4;
    font-size: 16px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.login-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.signup-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-btn .login-text {
        display: none;
    }
    
    .login-btn {
        padding: 8px;
        min-width: 36px;
        justify-content: center;
    }
    
    .login-modal {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 12px;
    }
    
    .login-modal-header {
        padding: 20px 20px 0;
    }
    
    .login-modal-body {
        padding: 0 20px 20px;
    }
    
    .login-modal-title {
        font-size: 20px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .login-modal {
        max-width: 380px;
    }
}

@media (min-width: 992px) {
    .login-btn:hover .login-text {
        transform: translateX(2px);
    }
}

/* Animation for form validation */
.input-wrapper.error input {
    border-color: #dc3545;
    background: #fff5f5;
}

.input-wrapper.error i {
    color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.input-wrapper.error + .error-message {
    display: block;
}

/* Success state */
.input-wrapper.success input {
    border-color: #28a745;
    background: #f8fff9;
}

.input-wrapper.success i {
    color: #28a745;
}