/* Modern Login Page Styles - Similar to Google/GitHub */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #031c88 0%, #221fca 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 48px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
}

.company-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    display: block;
    object-fit: contain;
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
    text-align: left;
}

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

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-input:focus {
    outline: none;
    border-color: #4285f4;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-input.error {
    border-color: #ea4335;
    box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.1);
}

.error-message {
    color: #ea4335;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

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

.password-toggle:hover {
    color: #4285f4;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -8px 0 8px 0;
}

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

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

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

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #4285f4;
    border-color: #4285f4;
}

.checkbox-container 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: #4285f4;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

.login-button {
    background: #4285f4;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    position: relative;
    min-height: 48px;
}

.login-button:hover:not(:disabled) {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
}

.login-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    display: inline-block;
}

.spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner.show {
    display: block;
}

.divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: #666;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e1e5e9;
}

.divider::before {
    margin-right: 16px;
}

.divider::after {
    margin-left: 16px;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-button:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-button img {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.google-button {
    border-color: #ea4335;
    color: #ea4335;
}

.google-button:hover {
    background: #fef7f7;
    border-color: #ea4335;
}

.apple-button {
    border-color: #000;
    color: #000;
}

.apple-button:hover {
    background: #f9f9f9;
    border-color: #000;
}

.facebook-button {
    border-color: #1877f2;
    color: #1877f2;
}

.facebook-button:hover {
    background: #f0f8ff;
    border-color: #1877f2;
}

/* Register Section */
.register-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e1e5e9;
}

.register-section p {
    color: #666;
    font-size: 14px;
}

.register-section a {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-section a:hover {
    color: #3367d6;
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #f0f8ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #4285f4;
}

.modal-icon.error {
    background: #fef7f7;
    color: #ea4335;
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.modal-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.modal-text {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-button {
    background: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button:hover {
    background: #3367d6;
}

/* Register Form */
.register-form {
    text-align: left;
    margin-top: 24px;
}

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

.register-button {
    background: #4285f4;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 16px;
    position: relative;
    min-height: 48px;
}

.register-button:hover:not(:disabled) {
    background: #3367d6;
}

.register-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.modal-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e1e5e9;
}

.modal-footer p {
    color: #666;
    font-size: 14px;
}

.modal-footer a {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Loading Animation for Gear */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-gear {
    animation: spin 2s linear infinite;
    color: #4285f4;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
        margin: 20px;
    }
    
    .company-logo {
        width: 100px;
        height: 100px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .social-buttons {
        gap: 10px;
    }
    
    .modal-content {
        padding: 24px;
        margin: 10% auto;
    }
}


/* Back to Home Button */
.back-home-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(66, 133, 244, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-home-btn:hover {
    background: rgba(66, 133, 244, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.4);
}
