/* ============================================================
   VARIÁVEIS E RESET
============================================================ */
:root {
    --primary: #0B4F8A;
    --primary-dark: #1E3E66;
    --primary-light: #EAF2FB;
    --success: #0D6E4B;
    --bg: #F4F6FA;
    --card: #FFFFFF;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --text: #1E293B;
    --text-light: #64748B;
    --radius: 10px;
    --danger: #DC2626;
    --warning: #F59E0B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #E8EEF6 100%);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   HEADER GOVERNAMENTAL
============================================================ */
.gov-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.gov-main-h {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

.gov-logo-box {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.gov-title-h {
    font-size: 16px;
    font-weight: 600;
}

.gov-sub-h {
    font-size: 12px;
    opacity: 0.8;
}

/* ============================================================
   CONTAINER PRINCIPAL
============================================================ */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* ============================================================
   CARD DE LOGIN - DUAS COLUNAS
============================================================ */
.login-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-card:hover {
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   COLUNA ESQUERDA
============================================================ */
.login-left {
    background: linear-gradient(135deg, var(--primary) 0%, #0a3d6b 100%);
    padding: 40px 30px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.brand-section {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* LOGO LADO A LADO */
.logo-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.logo-batalha {
    background: #ffffff;
    border-radius: 8px;
    padding: 8px 14px;
    max-height: 70px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Logo Alagoas — fundo escuro pois a imagem é branca/transparente */
.logo-alagoas {
    background: transparent;
    border-radius: 8px;
    padding: 8px 14px;
    max-height: 100px;
    max-width: 130px;
    mix-blend-mode: screen; /* Remove o fundo preto, deixa só o branco */
    box-shadow: none;
}

.logo-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.program-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 auto 30px auto;
    text-align: center;
    width: fit-content;
}

.welcome-title {
    text-align: center;
}

.welcome-title h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.welcome-title p {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
    text-align: center;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3));
    margin: 25px 0 20px 0;
}

.info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.info-icon {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
}

.info-content h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.info-content p {
    font-size: 11px;
    opacity: 0.75;
    line-height: 1.4;
    margin: 0;
}

/* ============================================================
   COLUNA DIREITA
============================================================ */
.login-right {
    background: var(--card);
    display: flex;
    flex-direction: column;
}

.login-header {
    padding: 32px 32px 0 32px;
    border-bottom: 1px solid var(--border);
}

.login-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.login-body {
    padding: 32px;
    flex: 1;
}

/* ============================================================
   CAMPOS DO FORMULÁRIO
============================================================ */
.field {
    margin-bottom: 24px;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    display: block;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    border-radius: 8px;
    border: 2px solid var(--border);
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.1);
}

.input-group input.input-error {
    border-color: var(--danger);
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 18px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

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

/* ============================================================
   OPÇÕES DE LOGIN
============================================================ */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-light);
}

.checkbox-label input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================================
   BOTÃO DE LOGIN
============================================================ */
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 79, 138, 0.3);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================================
   LINK DE REGISTRO
============================================================ */
.register-link {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ============================================================
   ALERTAS
============================================================ */
.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.3s ease;
}

.alert-danger {
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: var(--danger);
}

.alert-warning {
    background: #FFFBEB;
    border: 1px solid #FEF3C7;
    color: var(--warning);
}

.alert-success {
    background: #F0FDF4;
    border: 1px solid #DCFCE7;
    color: var(--success);
}

/* ============================================================
   LOADING SPINNER
============================================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

/* ============================================================
   FOOTER
============================================================ */
.gov-footer {
    background: var(--primary);
    color: #fff;
    padding: 14px;
    text-align: center;
    font-size: 11px;
    opacity: 0.9;
}

/* ============================================================
   ANIMAÇÕES
============================================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ============================================================
   MEDIA QUERIES - RESPONSIVIDADE
============================================================ */
@media (max-width: 768px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .login-left {
        padding: 30px 25px;
    }

    .logo-batalha {
        max-height: 60px;
    }

    .welcome-title h2 {
        font-size: 20px;
    }

    .login-header {
        padding: 24px 24px 0 24px;
    }

    .login-header h2 {
        font-size: 22px;
    }

    .login-body {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px 12px;
    }

    .login-left {
        padding: 20px;
    }

    .logo-batalha {
        max-height: 50px;
    }

    .program-badge {
        font-size: 10px;
        padding: 4px 10px;
        margin-bottom: 20px;
    }

    .welcome-title h2 {
        font-size: 18px;
    }

    .welcome-title p {
        font-size: 12px;
    }

    .info-card {
        padding: 10px;
    }

    .info-icon {
        font-size: 20px;
        min-width: 35px;
    }

    .info-content h4 {
        font-size: 12px;
    }

    .info-content p {
        font-size: 10px;
    }

    .login-header {
        padding: 20px 20px 0 20px;
    }

    .login-header h2 {
        font-size: 20px;
    }

    .login-body {
        padding: 20px;
    }

    .login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .btn-login {
        padding: 12px;
    }
}