/* InfoCell OS - Login Page Styles */

.login-page {
    min-height: 100vh;
    height: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-x: hidden;
    overflow-y: auto;
}

.login-image-side {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-image-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.login-image-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.login-form-container {
    max-width: 500px;
    width: 100%;
    padding: 2rem 1rem;
}

.card {
    position: relative;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 100%;
}

.card-body {
    padding: 2.5rem !important;
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #fff;
    transform: translateY(-2px);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.form-label i {
    margin-right: 0.5rem;
    color: #007bff;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

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

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

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
}

.input-group .btn {
    border-left: none;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
}

.input-group .form-control {
    border-right: none;
    border-radius: 0.5rem 0 0 0.5rem;
}

.input-group .form-control:focus + .btn {
    border-color: #007bff;
    background: #fff;
}

/* Ajustes para input-group - garantir tamanho adequado do input da senha */
.input-group {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
}

.input-group .form-control {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.input-group .btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 50px;
}

/* Garantir que o input da senha tenha o mesmo tamanho do email */
.input-group .form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    height: auto;
}

/* Ajustes específicos para telas pequenas */
@media (max-width: 575.98px) {
    .input-group { 
        width: 100%; 
        flex-wrap: nowrap; 
    }
    .input-group .form-control { 
        flex: 1 1 auto; 
        min-width: 0;
    }
    .input-group .form-control-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    .input-group .btn {
        flex: 0 0 auto;
        width: 50px;
        padding: 0.75rem 0.5rem;
    }
}

/* Animações */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-image-side {
    animation: slideInFromLeft 0.8s ease-out;
}

.login-form-container {
    animation: slideInFromRight 0.8s ease-out;
}

.card {
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Responsive */
@media (max-width: 991.98px) {
    .login-page {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .login-form-container {
        animation: fadeInUp 0.8s ease-out;
    }
}

@media (max-width: 575.98px) {
    .login-form-container { padding: 1rem; }
    .card { border-radius: 0.75rem; }
    
    .card-body { padding: 1.25rem !important; }
    
    .form-control-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Efeitos visuais */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #6610f2, #6f42c1, #e83e8c);
    border-radius: 1rem 1rem 0 0;
}

/* Loading state */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Invalid feedback customizado */
.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.5rem;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Floating labels effect */
.form-floating {
    position: relative;
}

.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    padding: 1rem 0.75rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

/* Success states */
.form-control.is-valid {
    border-color: #28a745;
    background-color: #f8fff9;
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Accessibility improvements */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* GARANTIR TEXTO BRANCO EM FUNDOS AZUIS - LOGIN */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited {
    color: white !important;
}

.btn-primary *,
.btn-primary:hover *,
.btn-primary:focus *,
.btn-primary:active * {
    color: white !important;
}

/* Ícones dentro de botões azuis */
.btn-primary i,
.btn-primary:hover i,
.btn-primary:focus i,
.btn-primary:active i {
    color: white !important;
}

