* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Left Section - Background (approximately 75% of screen) */
.login-background {
    width: 75%;
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1604719312566-8912e9227c6a?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(75, 134, 229, 0.08);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1;
}

/* Right Section - Login Form (approximately 25% of screen) */
.login-form-container {
    width: 25%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    overflow-y: auto;
    box-sizing: border-box;
}

.login-form-wrapper {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    padding: 0;
}

/* Logo */
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    margin-bottom: 20px;
    margin-top: 1px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: #4b86e5;
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    font-family: 'Segoe UI', sans-serif;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 14px;
    color: #666666;
    line-height: 1.2;
    margin-top: 2px;
}

.company-logo-img {
    max-height: 180px;
    max-width: 400px;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* Form */
.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-heading {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.2s;
    outline: none;
    background: #ffffff;
    height: 48px;
}

.form-input:focus {
    border-color: #4b86e5;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.form-input.error {
    border-color: #d32f2f;
}

.error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.success-message {
    color: #2e7d32;
    font-size: 14px;
    padding: 12px;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 4px;
    margin-bottom: 20px;
    display: block;
}

/* Form Actions */
.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn-sign-in {
    background: #4b86e5;
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    height: 48px;
    min-width: 120px;
}

.btn-sign-in:hover {
    background: #006cbe;
}

.btn-sign-in:active {
    background: #005a9e;
}

.forgot-link {
    color: #4b86e5;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #006cbe;
    text-decoration: underline;
}

/* Footer */
.login-footer {
    margin-top: auto;
    padding-top: 30px;
    text-align: right;
    margin-bottom: 0;
}

.login-footer p {
    font-size: 11px;
    color: #666666;
    line-height: 1.5;
    margin: 0;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .login-background {
        width: 65%;
    }
    
    .login-form-container {
        width: 35%;
        padding: 50px 30px;
    }
}

@media (max-width: 992px) {
    .login-background {
        width: 50%;
    }
    
    .login-form-container {
        width: 50%;
        padding: 40px 25px;
    }
    
    .logo-title {
        font-size: 20px;
    }
    
    .form-heading {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-background {
        width: 100%;
        height: 40vh;
        min-height: 300px;
    }

    .login-form-container {
        width: 100%;
        height: 60vh;
        padding: 30px 24px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-sign-in {
        width: 100%;
    }

    .forgot-link {
        text-align: center;
    }

    .login-footer {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .login-background {
        height: 30vh;
        min-height: 200px;
    }

    .login-form-container {
        height: 70vh;
        padding: 25px 20px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .logo-title {
        font-size: 18px;
    }
    
    .logo-subtitle {
        font-size: 12px;
    }
    
    .form-heading {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-input {
        padding: 12px 14px;
        font-size: 14px;
        height: 44px;
    }
    
    .btn-sign-in {
        padding: 12px 24px;
        font-size: 14px;
        height: 44px;
    }
    
    .login-footer {
        padding-top: 20px;
    }
    
    .login-footer p {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .login-background {
        height: 25vh;
        min-height: 150px;
    }

    .login-form-container {
        height: 75vh;
        padding: 20px 15px;
        justify-content: flex-start;
        padding-top: 30px;
    }
    
    .login-logo {
        margin-bottom: 15px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .logo-title {
        font-size: 16px;
    }
    
    .form-heading {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-input {
        padding: 10px 12px;
        font-size: 13px;
        height: 40px;
    }
    
    .btn-sign-in {
        padding: 10px 20px;
        font-size: 13px;
        height: 40px;
    }
    
    .forgot-link {
        font-size: 12px;
    }
}

/* Landscape Mobile Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .login-background {
        height: 50vh;
        min-height: 200px;
    }

    .login-form-container {
        height: 50vh;
        padding: 20px;
        justify-content: center;
    }
    
    .login-logo {
        margin-bottom: 10px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .logo-title {
        font-size: 16px;
    }
    
    .form-heading {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-input {
        padding: 8px 12px;
        height: 36px;
    }
    
    .btn-sign-in {
        padding: 8px 16px;
        height: 36px;
        font-size: 12px;
    }
    
    .login-footer {
        padding-top: 15px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn-sign-in {
        min-height: 44px;
    }
    
    .form-input {
        min-height: 44px;
    }
    
    .forgot-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Focus styles for accessibility */
.form-input:focus-visible {
    outline: 2px solid #4b86e5;
    outline-offset: 2px;
}

.btn-sign-in:focus-visible {
    outline: 2px solid #4b86e5;
    outline-offset: 2px;
}

/* Modal Styles */
.modal {
    display: none !important;
    position: fixed !important;
    z-index: 1000 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: #ffffff;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid #e0e0e0;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.close {
    color: #666666;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close:hover {
    color: #333333;
    background: #f5f5f5;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
}

.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.modal .form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.2s;
    outline: none;
    background: #ffffff;
    height: 48px;
}

.modal .form-input:focus {
    border-color: #4b86e5;
    box-shadow: 0 0 0 3px rgba(75, 134, 229, 0.1);
}

.modal .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666666;
    border: 1px solid #e0e0e0;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    height: 48px;
    min-width: 100px;
    flex: 1;
}

.btn-cancel:hover {
    background: #e8e8e8;
    color: #333333;
}

.btn-reset {
    background: #4b86e5;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 48px;
    min-width: 140px;
    flex: 1;
}

.btn-reset:hover {
    background: #006cbe;
}

.btn-reset:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.modal .success-message,
.modal .error-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.modal .success-message {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.modal .error-message {
    background: #ffebee;
    color: #d32f2f;
    border: 1px solid #f44336;
}

/* Responsive Modal */
@media (max-width: 576px) {
    .modal-content {
        margin: 20px auto;
        width: 95%;
        max-width: none;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-cancel,
    .btn-reset {
        width: 100%;
        height: 44px;
    }
    
    .close {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

