/* ========================================
   TELA DE LOGIN - DESIGN MODERNO E PROFISSIONAL
   ======================================== */

/* Cores principais baseadas na logo */
:root {
    --primary-blue: #3B769A;
    --primary-blue-light: #5A92B8;
    --primary-blue-dark: #2A5A7A;
    --accent-green: #28A745;
    --accent-green-light: #48C765;
    --bg-light: #FCFCFC;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-muted: #6C757D;
    --border-light: #E8ECEF;
    --shadow-sm: 0 2px 8px rgba(59, 118, 154, 0.08);
    --shadow-md: 0 4px 16px rgba(59, 118, 154, 0.12);
    --shadow-lg: 0 8px 24px rgba(59, 118, 154, 0.16);
}

/* Body e Container Principal */
body {
    background: linear-gradient(135deg, #FCFCFC 0%, #F5F8FA 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.login-section {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    padding: 0;
}

.login-section .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Container do Formulário */
.login-container {
    background: var(--bg-white);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    margin: 0;
    min-height: 100vh;
    height: 100vh;
}

/* Row com altura total */
.login-container .row {
    height: 100%;
    min-height: 100vh;
}

/* Lado Esquerdo - Formulário */
.login-form-side {
    padding: 60px 40px;
    background: var(--bg-white);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 991px) {
    .login-form-side {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .login-form-side {
        padding: 30px 20px;
    }
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.login-logo img:hover {
    transform: scale(1.05);
}

/* Título */
.login-title {
    color: var(--primary-blue);
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 40px;
}

/* Formulário */
.login-form {
    max-width: 420px;
    margin: 0 auto;
}

/* Grupos de Formulário */
.form-group-modern {
    position: relative;
    margin-bottom: 28px;
}

.form-group-modern input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-light);
    color: var(--text-dark);
}

.form-group-modern input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(59, 118, 154, 0.1);
}

.form-group-modern input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Ícones nos Inputs */
.form-group-modern .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-blue);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-group-modern input:focus + .input-icon {
    color: var(--primary-blue-dark);
}

/* Label Flutuante */
.form-group-modern label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 4px;
}

.form-group-modern input:focus + .input-icon + label,
.form-group-modern input:not(:placeholder-shown) + .input-icon + label {
    top: -10px;
    left: 12px;
    font-size: 0.75rem;
    color: var(--primary-blue);
    background: var(--bg-white);
    padding: 0 8px;
}

/* Botões */
.btn-login-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.btn-login-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.btn-login-secondary {
    width: 100%;
    padding: 14px;
    background: var(--bg-white);
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    color: var(--primary-blue);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-login-secondary:hover {
    background: var(--primary-blue);
    color: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* Links */
.login-links {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
}

.login-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-links a:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

.login-links .text-muted {
    color: var(--text-muted);
}

/* Divisor */
.login-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.login-divider span {
    padding: 0 15px;
}

/* Mensagens de Erro */
.alert-modern {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

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

.alert-modern.alert-danger {
    background: linear-gradient(135deg, #FFE5E5 0%, #FFD5D5 100%);
    color: #C62828;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.1);
}

.alert-modern.alert-success {
    background: linear-gradient(135deg, #E8F5E9 0%, #D4EDD6 100%);
    color: #2E7D32;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.1);
}

.alert-modern i {
    font-size: 1.2rem;
}

/* Lado Direito - Imagem */
.login-image-side {
    position: relative;
    min-height: 100vh;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-image-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/img4.jpg') center/cover;
    opacity: 0.3;
    background-size: cover;
    background-position: center center;
}

.login-image-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding: 40px;
}

.login-image-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-image-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Responsividade */
@media (max-width: 991px) {
    .login-image-side {
        min-height: 300px;
    }
    
    .login-image-content h2 {
        font-size: 1.5rem;
    }
    
    .login-image-content p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .login-container {
        border-radius: 12px;
        margin: 10px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-image-side {
        min-height: 200px;
    }
}

/* Animações de Entrada */
.fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Toggle de Senha */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-blue);
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

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

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