/* ==========================================
   CONFIGURAÇÕES GERAIS E VARIÁVEIS
   ========================================== */
:root {
    --primary-color: #415A77;
    --primary-hover: #32465F;
    --bg-light: #ffffff;
    --bg-popup: #F4F7FB;
    --border-light: #E8EEF5;
    --border-popup: #E0E6ED;
    --text-primary: #415A77;
    --text-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-light) !important;
    color: var(--text-primary) !important;
}

body {
    display: flex;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ==========================================
   LAYOUT SPLIT (TELA DIVIDIDA)
   ========================================== */
.split-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-light) !important;
}

/* Lado esquerdo (Brand Side) */
div.split-container div.brand-side,
.brand-side {
    flex: 1.2;
    background-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    color: var(--text-white) !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 80px;
    overflow: hidden;
}

/* Marca d'água */
.brand-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/fotos/Sazul.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.brand-side > * {
    position: relative;
    z-index: 1;
}

.brand-side h1,
.brand-side p,
.brand-side span,
.brand-side div,
.brand-title, 
.brand-subtitle,
.brand-footer {
    color: var(--text-white) !important;
}

.brand-logo-icon,
.brand-logo-icon i {
    color: var(--text-white) !important;
}

.brand-logo-icon {
    font-size: 48px;
    margin-bottom: 24px;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.brand-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 16px;
    font-weight: 400;
    max-width: 460px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.brand-footer {
    font-size: 13px;
    opacity: 0.85;
}

/* Lado direito (Form Side) */
.form-side {
    flex: 1;
    background-color: var(--bg-light) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
}

.login-box-wrapper {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-light) !important;
    color: var(--text-primary) !important;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2, 
.form-header p {
    color: var(--text-primary) !important;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================
   INPUTS E CAMPOS DE FORMULÁRIO
   ========================================== */
.input-group {
    display: flex;
    background-color: var(--bg-light) !important;
    margin-bottom: 20px;
    height: 52px;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(65, 90, 119, 0.15);
}

.icon-box {
    width: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
    border: none !important;
    font-size: 16px;
    flex-shrink: 0;
}

.input-group input, 
.input-group select {
    flex: 1;
    width: 100%;
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
}

.input-group input::placeholder {
    color: var(--text-primary) !important;
    opacity: 0.6;
}

.input-group select {
    cursor: pointer;
}

.input-group select option {
    background-color: var(--bg-light) !important;
    color: var(--text-primary) !important;
}

/* ==========================================
   BOTÕES E ANIMAÇÕES
   ========================================== */
.login-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
    border: none !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    background-color: var(--primary-hover) !important;
}

.shake { 
    animation: shake 0.4s both; 
}

@keyframes shake { 
    0%, 100% { transform: translateX(0); } 
    25% { transform: translateX(-6px); } 
    75% { transform: translateX(6px); } 
}

/* ==========================================
   SWEETALERT2 CUSTOMIZADO
   ========================================== */
.swal2-popup {
    background-color: var(--bg-popup) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-popup) !important;
    border-radius: 12px !important;
}

.swal2-title, 
.swal2-html-container {
    color: var(--text-primary) !important;
}

.swal2-confirm {
    background-color: var(--primary-color) !important;
    color: var(--text-white) !important;
    border: none !important;
    box-shadow: none !important;
}

.swal2-confirm:hover {
    background-color: var(--primary-hover) !important;
}

.swal2-icon.swal2-success,
.swal2-icon.swal2-error {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.swal2-success [class^="swal2-success-line"] {
    background-color: var(--primary-color) !important;
}

.swal2-success .swal2-success-ring {
    border-color: rgba(65, 90, 119, 0.3) !important;
}

.swal2-error [class^="swal2-x-mark-line"] {
    background-color: var(--primary-color) !important;
}

/* ==========================================
   RESPONSIVIDADE (DISPOSITIVOS MÓVEIS)
   ========================================== */
@media (max-width: 1024px) {
    div.split-container div.brand-side,
    .brand-side {
        padding: 40px;
    }
    
    .brand-title {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        min-height: 100vh;
    }

    div.split-container div.brand-side,
    .brand-side {
        flex: none;
        width: 100%;
        padding: 32px 24px;
        align-items: center;
        text-align: center;
    }

    .brand-logo-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .brand-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .brand-subtitle {
        font-size: 13px;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .brand-footer {
        font-size: 11px;
    }

    .form-side {
        flex: 1;
        width: 100%;
        padding: 32px 20px;
        align-items: flex-start;
    }

    .login-box-wrapper {
        max-width: 100%;
    }

    .form-header {
        text-align: center;
        margin-bottom: 24px;
    }

    .form-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .input-group {
        height: 48px;
    }

    .icon-box {
        width: 48px;
        font-size: 14px;
    }

    .input-group input, 
    .input-group select {
        font-size: 14px;
        padding: 0 12px;
    }

    .login-btn {
        padding: 14px;
        font-size: 14px;
    }
}