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

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Login Container */
.login-container {
    display: flex;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
}

/* Left Panel - Branding */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

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

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 1;
}

.brand-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.brand-icon svg {
    width: 100%;
    height: 100%;
    color: currentColor;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.brand-subtitle {
    font-size: 14px;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* Features */
.features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

.feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
}

.feature-text h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 12px;
    opacity: 0.8;
}

/* Version Info */
.version-info {
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
    z-index: 1;
}

.version-info small {
    display: block;
    margin-top: 4px;
}

/* Right Panel - Login Form */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: #718096;
}

/* Alert Messages */
#alertContainer {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: #cbd5e0;
    pointer-events: none;
    z-index: 1;
}

.form-group input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-group input::placeholder {
    color: #a0aec0;
}

.form-group input:disabled {
    background: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}

/* Password Wrapper */
.password-wrapper {
    gap: 0;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #cbd5e0;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #667eea;
}

/* Error Messages */
.error-message {
    font-size: 12px;
    color: #e53e3e;
    margin-top: -4px;
    display: none;
}

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

.form-group input.error {
    border-color: #fc8181;
    background: #fff5f5;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #4a5568;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-social {
    background: white;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    width: 100%;
    margin: 8px 0;
}

.btn-social:hover:not(:disabled) {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-text {
    display: inline-flex;
}

.btn-loader {
    display: inline-flex;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e0;
    font-size: 13px;
    margin: 20px 0;
}

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

/* Sign Up Link */
.signup-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #718096;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #cbd5e0;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #4a5568;
}

.modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a202c;
}

.modal-content p {
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-left {
        display: none;
    }

    .login-container {
        justify-content: center;
    }

    .login-right {
        flex: none;
        width: 100%;
    }

    .login-form-wrapper {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .login-right {
        padding: 30px 20px;
    }

    .login-form-wrapper {
        max-width: 100%;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .modal-content {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 20px;
    }

    .login-header h2 {
        font-size: 20px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .form-group input {
        padding: 10px 12px 10px 36px;
    }

    .input-icon {
        width: 16px;
        height: 16px;
    }
}