/* Login Layout Fixes - Ensure Stable Layout - Compact Design */

/* Container fixes */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.login-card .card-body {
    padding: 0;
    flex: 1;
    display: flex;
}

.login-row {
    display: flex;
    min-height: 500px;
    width: 100%;
    flex: 1;
}

/* Section fixes */
.login-image-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.login-form-section {
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    background: white;
    min-width: 0;
}

/* Form fixes */
.form-group {
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    height: auto;
    line-height: 1.5;
}

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

/* Remove all error styling - No red borders or error messages */
.form-control.is-invalid {
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
}

/* Hide all error messages completely */
.invalid-feedback {
    display: none !important;
}

/* Input group fixes - Clean styling without icons */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: #718096;
    text-align: center;
    white-space: nowrap;
    background-color: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    border-right: none;
    border-radius: 10px 0 0 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 45px;
}

/* Remove any pseudo-elements that might create unwanted icons */
.input-group-text::before,
.input-group-text::after {
    display: none !important;
}

.input-group-text i {
    color: #718096 !important;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-left: none;
    border-radius: 0 10px 10px 0;
    margin-left: -2px;
    z-index: 1;
    box-sizing: border-box;
}

.input-group > .form-control:focus {
    border-left: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    z-index: 3;
    outline: none;
}

.input-group > .form-control:focus + .input-group-text,
.input-group > .form-control:focus ~ .input-group-text {
    border-color: #667eea;
    z-index: 3;
}

.input-group > .btn {
    border-left: none;
    border-radius: 0 10px 10px 0;
    margin-left: -2px;
    z-index: 2;
    flex-shrink: 0;
    min-width: 45px;
    box-sizing: border-box;
}

.input-group > .btn:focus {
    z-index: 3;
    outline: none;
}

/* Button fixes */
.btn-outline-secondary {
    border: 2px solid #e2e8f0;
    border-left: none;
    background-color: #f8fafc;
    color: #718096;
    border-radius: 0 10px 10px 0;
    padding: 12px 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
    z-index: 2;
    min-width: 45px;
    box-sizing: border-box;
}

.btn-outline-secondary:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e0;
    color: #4a5568;
}

.btn-outline-secondary:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
    z-index: 3;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    position: relative;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Custom checkbox fixes */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1rem;
    height: 1.25rem;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    cursor: pointer;
    color: #4a5568;
    font-size: 0.875rem;
    line-height: 1.5;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
    transition: all 0.3s ease;
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: #667eea;
    background-color: #667eea;
}

.custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Company logos styling - Compact */
.company-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.company-logo {
    height: 45px;
    width: auto;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: grayscale(20%);
}

.company-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Responsive fixes */
@media (max-width: 768px) {
    .login-row {
        flex-direction: column;
        min-height: auto;
    }
    
    .login-image-section {
        min-height: 150px;
        padding: 20px;
        flex: none;
    }
    
    .login-form-section {
        padding: 25px;
        flex: none;
    }
    
    .login-container {
        padding: 10px;
    }
    
    /* Improved logo sizing for mobile */
    .company-logos {
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .company-logo {
        height: 50px; /* Larger on mobile */
    }
    
    /* Hide all error messages on mobile too */
    .invalid-feedback {
        display: none !important;
    }
    
    /* Better form spacing on mobile */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    /* Improved input sizing for mobile */
    .form-control {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    /* Better button sizing for mobile */
    .btn-primary {
        padding: 14px 25px;
        font-size: 1rem;
    }
    
    /* Clean input styling for mobile - No red borders */
    .form-control.is-invalid {
        border-color: #e2e8f0 !important;
        background: #f8fafc !important;
    }
}

@media (max-width: 576px) {
    .login-card {
        margin: 0;
        border-radius: 12px;
    }
    
    .login-form-section {
        padding: 20px;
    }
    
    .login-image-section {
        min-height: 120px;
        padding: 15px;
    }
    
    /* Even larger logos for small mobile */
    .company-logos {
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .company-logo {
        height: 55px; /* Even larger on small mobile */
    }
    
    /* Hide all error messages on small mobile too */
    .invalid-feedback {
        display: none !important;
    }
    
    /* Improved form controls for small mobile */
    .form-control,
    .input-group-text,
    .btn-outline-secondary {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    /* Better button for small mobile */
    .btn-primary {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    .login-form-section {
        padding: 15px;
    }
    
    /* Largest logos for very small mobile */
    .company-logo {
        height: 60px; /* Largest on very small mobile */
    }
    
    /* Hide all error messages on very small mobile too */
    .invalid-feedback {
        display: none !important;
    }
    
    /* Compact form controls */
    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* Ensure stable layout */
* {
    box-sizing: border-box;
}

.login-container *,
.login-card *,
.form-group *,
.input-group * {
    box-sizing: border-box;
}

/* Prevent layout shifts */
.form-control,
.input-group-text,
.btn-outline-secondary,
.btn-primary {
    height: auto;
    min-height: 45px;
    line-height: 1.5;
}

/* Focus states without layout shifts */
.form-control:focus,
.input-group-text:focus,
.btn-outline-secondary:focus,
.btn-primary:focus {
    transform: none;
    outline: none;
}

/* Ensure consistent spacing */
.form-group + .form-group {
    margin-top: 1rem;
}

/* Prevent text wrapping in input groups */
.input-group-text,
.btn-outline-secondary {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} 