/* Reseta margens e paddings padrão para garantir que o body ocupe 100% */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* GRADIENTE DE FUNDO NO BODY */
body {
    background: linear-gradient(135deg, #d4e0ed 0%, #e8f0f7 50%, #f5f9fc 100%);
    /* Gradiente suave e clean - ajuste as cores conforme sua preferência */
    min-height: 100vh;
}

#auth {
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Remove o antigo auth-right */
#auth-right {
    display: none;
}

/* Container flex para card e logo ficarem lado a lado */
#auth .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-evenly; /* Distribui melhor o espaço */
    max-width: 1400px;
    width: 100%;
    gap: 4rem; /* Espaçamento entre card e logo */
}

#auth .row {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

/* ESTILO PARA O LOGO - LADO A LADO COM O CARD */
.main-logo-background {
    flex: 1; /* Ocupa o espaço restante */
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 400px;
    max-width: 700px;
    opacity: 0.85;
    pointer-events: none;
}

.main-logo-background img {
    width: 100%;
    height: auto;
    max-width: 650px;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

/* ESTILO DO CARD FLUTUANTE (auth-left / login-card) - MANTÉM APARÊNCIA */
#auth-left {
    padding: 3.5rem 4rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    min-width: 500px;
    max-width: 600px;
    width: 100%;
    /* Mantém toda aparência "flutuante" mas agora dentro de um flex container */
}

/* Remove logo pequeno (já está removido do HTML, mas garantia no CSS) */
#auth #auth-left .auth-logo {
    display: none !important;
}

#auth #auth-left .auth-logo img {
    display: none !important;
}

/* TIPOGRAFIA */
#auth #auth-left .auth-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2d499d;
}

#auth #auth-left .auth-subtitle {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5rem;
    margin-bottom: 2rem;
}

/* ESTILOS PARA INPUTS */
#auth #auth-left .form-control {
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#auth #auth-left .form-control:focus {
    border-color: #2d499d;
    box-shadow: 0 0 0 0.2rem rgba(45, 73, 157, 0.15);
    outline: none;
}

#auth #auth-left .form-group.has-icon-left .form-control {
    padding-left: 2.5rem;
}

#auth #auth-left .form-control-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
}

/* LINKS */
#auth #auth-left a {
    color: #2d499d;
    text-decoration: none;
    transition: all 0.3s ease;
}

#auth #auth-left a:hover {
    color: #1e3470;
    text-decoration: underline;
}

/* ESTILOS DOS BOTÕES DA MARCA */
.btn-brand-primary,
.btn-primary {
    background-color: #2d499d !important;
    border-color: #2d499d !important;
    color: #ffffff !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-brand-primary:hover,
.btn-primary:hover {
    background-color: #1e3470 !important;
    border-color: #1e3470 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 73, 157, 0.3);
}

.btn-brand-outline {
    color: #2d499d !important;
    border: 2px solid #2d499d !important;
    background-color: transparent !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-brand-outline:hover {
    color: #ffffff !important;
    background-color: #2d499d !important;
    border-color: #2d499d !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 73, 157, 0.3);
}

.btn-success {
    background-color: transparent !important;
    border: 2px solid #2d499d !important;
    color: #2d499d !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #2d499d !important;
    border-color: #2d499d !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 73, 157, 0.3);
}

.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.btn-info {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: #ffffff !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-info:hover {
    background-color: #138496 !important;
    border-color: #138496 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3);
}

/* ALERTAS */
#auth #auth-left .alert {
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* CHECKBOX PERSONALIZADO */
#auth #auth-left .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #2d499d;
    cursor: pointer;
}

#auth #auth-left .form-check-input:checked {
    background-color: #2d499d;
    border-color: #2d499d;
}

#auth #auth-left .form-check-label {
    cursor: pointer;
    user-select: none;
}

/* ESPAÇAMENTO DOS BOTÕES */
#auth #auth-left .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* CARD DE DEMONSTRAÇÃO */
#auth #auth-left .card {
    border-radius: 12px;
    border: 2px solid #e0e6ed;
    box-shadow: none;
}

#auth #auth-left .card .btn {
    margin: 0.25rem;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* NOTEBOOKS E TELAS MÉDIAS (992px - 1400px) */
@media screen and (min-width: 992px) and (max-width: 1400px) {
    #auth {
        padding: 1.5rem;
    }
    
    #auth .container-fluid {
        gap: 1rem; /* Gap mínimo entre card e logo */
        max-width: 100%;
        justify-content: space-evenly; /* Distribui melhor o espaço */
    }
    
    #auth-left {
        min-width: 450px;
        max-width: 500px;
        padding: 2.5rem 3rem;
        flex-shrink: 0; /* Impede que o card encolha */
    }
    
    #auth #auth-left .auth-title {
        font-size: 2rem;
    }
    
    .main-logo-background {
        min-width: 320px;
        max-width: 480px;
        flex-shrink: 1; /* Permite que a logo se ajuste */
    }
    
    .main-logo-background img {
        max-width: 100%;
    }
}

/* NOTEBOOKS MENORES (992px - 1200px) */
@media screen and (min-width: 992px) and (max-width: 1200px) {
    #auth .container-fluid {
        gap: 0.75rem;
        padding: 0 1.5rem;
    }
    
    #auth-left {
        min-width: 400px;
        max-width: 460px;
        padding: 2rem 2.5rem;
    }
    
    .main-logo-background {
        min-width: 280px;
        max-width: 400px;
    }
}

/* NOTEBOOKS COMUNS 1366px e 1440px */
@media screen and (min-width: 1200px) and (max-width: 1500px) {
    #auth .container-fluid {
        gap: 1.5rem;
        padding: 0 2rem;
        max-width: 95%;
    }
    
    #auth-left {
        min-width: 440px;
        max-width: 490px;
    }
    
    .main-logo-background {
        max-width: 500px;
    }
}

/* TABLETS E TELAS MÉDIAS (≤991px) */
@media screen and (max-width: 991px) {
    #auth {
        padding: 1rem;
    }
    
    #auth .container-fluid {
        flex-direction: column;
        gap: 2rem;
    }
    
    #auth-left {
        max-width: 90%;
        min-width: unset;
        padding: 3rem 2.5rem;
    }
    
    .main-logo-background {
        min-width: 300px;
        max-width: 450px;
        opacity: 0.6;
        order: -1; /* Logo aparece acima do card */
    }
}

/* MOBILE (≤767px) */
@media screen and (max-width: 767px) {
    #auth-left {
        padding: 2.5rem 2rem;
    }
    
    #auth #auth-left .auth-title {
        font-size: 2rem;
    }
    
    .main-logo-background {
        min-width: 250px;
        max-width: 350px;
        opacity: 0.4;
    }
}

/* MOBILE PEQUENO (≤576px) */
@media screen and (max-width: 576px) {
    #auth {
        padding: 0.5rem;
    }
    
    #auth .container-fluid {
        gap: 1rem;
    }
    
    #auth-left {
        padding: 2rem 1.5rem;
        border-radius: 12px;
        max-width: 95%;
        min-width: unset;
    }
    
    #auth #auth-left .auth-title {
        font-size: 1.75rem;
    }
    
    .main-logo-background {
        display: none; /* Oculta o logo em telas muito pequenas */
    }
}

/* ========================================
   TEMA ESCURO (DARK MODE)
   ======================================== */

body.theme-dark {
    background: linear-gradient(135deg, #1a2744 0%, #2d3e5f 50%, #1e2a40 100%);
}

body.theme-dark #auth #auth-left {
    background: rgba(30, 40, 60, 0.95);
    color: #ffffff;
}

body.theme-dark #auth #auth-left .auth-title {
    color: #5da9e9;
}

body.theme-dark #auth #auth-left .auth-subtitle {
    color: #b8c5d6;
}

body.theme-dark #auth #auth-left .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.theme-dark #auth #auth-left .form-control:focus {
    border-color: #5da9e9;
    background-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .main-logo-background {
    opacity: 0.6;
}
