/* ── Base cromatica dos controles de formulario ───────────────────────
   color-scheme: light impede o modo escuro automatico do navegador de
   pintar inputs/selects de cinza-escuro. Seletores de elemento tem a
   menor especificidade, entao qualquer regra de classe existente vence. */
:root { color-scheme: light; }

input, select, textarea {
    background-color: #ffffff;
    color: #083f65;
}

input::placeholder,
textarea::placeholder { color: #8fa6b3; }

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

body {
    font-family: 'Inter', sans-serif;
    background: #0a1a2f;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(8, 28, 51, 0.88) 0%, rgba(2, 18, 35, 0.92) 100%);
    z-index: 1;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7) contrast(1.1);
}

.main-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1600px;
    margin: 2rem;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.split-layout {
    display: flex;
    flex-wrap: wrap;
    min-height: 85vh;
}

.brand-side {
    flex: 1.2;
    background: linear-gradient(145deg, #0a2b44 0%, #021c2f 100%);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
    overflow: hidden;
}

.brand-side::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -20%;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.brand-side::after {
    content: "";
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 320px;
    height: 320px;
    background: rgba(30, 100, 150, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.logo-section {
    position: relative;
    z-index: 2;
}

.logo-brasao {
    margin-bottom: 2rem;
}

.logo-brasao img {
    max-height: 140px;
    width: auto;
    background: #ffffff;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}

.brand-subtitle {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 400;
    max-width: 90%;
    border-left: 3px solid #26b2fd;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.features-list {
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(38, 178, 253, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #26b2fd;
}

.feature-text {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

.institutional-footer-left {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1.2rem;
}

.form-side {
    flex: 1;
    background: white;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #083f65;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #5f7d9c;
    font-size: 0.9rem;
}

.hall-badge {
    display: inline-block;
    background: #26b2fd20;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #083f65;
    margin-bottom: 1rem;
}

.input-group-custom {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group-custom label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2c3e66;
    margin-bottom: 0.5rem;
    display: block;
}

.input-group-custom label i {
    margin-right: 6px;
    color: #26b2fd;
}

.input-field {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #ffffff;
    font-weight: 500;
}

.input-field:focus {
    outline: none;
    border-color: #083f65;
    box-shadow: 0 0 0 3px rgba(8, 63, 101, 0.15);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: #083f65;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: #26b2fd;
    color: #083f65;
    transform: translateY(-2px);
}

.forgot-link {
    text-align: right;
    margin: -0.8rem 0 1.2rem 0;
}

.forgot-link a {
    font-size: 0.8rem;
    color: #3c6e9e;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link a:hover {
    text-decoration: underline;
    color: #083f65;
}

.tech-badge {
    background: #f0f5fa;
    padding: 1rem 1.2rem;
    border-radius: 16px;
    margin-top: 2rem;
    text-align: center;
    border-left: 4px solid #26b2fd;
}

.tech-badge i {
    color: #26b2fd;
    margin-right: 8px;
}

.tech-badge span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e4668;
}

.global-footer {
    background: #f9fbfd;
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid #e9edf2;
    font-size: 0.7rem;
    color: #5f7d9c;
}

.dynamic-message-alert {
    animation: fadeIn 0.3s ease;
}

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

@media (max-width: 992px) {
    .split-layout {
        flex-direction: column;
    }
    .brand-side {
        padding: 2rem;
        text-align: center;
    }
    .brand-subtitle {
        max-width: 100%;
        text-align: center;
        border-left: none;
        padding-left: 0;
    }
    .features-list {
        display: none;
    }
    .form-side {
        padding: 2rem;
    }
    .main-container {
        margin: 1rem;
    }
}

@media (max-width: 576px) {
    .form-side {
        padding: 1.5rem;
    }
    .brand-title {
        font-size: 1.6rem;
    }
}

.main-container {
    animation: fadeInUp 0.5s ease-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.btn-logout {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-logout:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 1.5s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #1f2d3d;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1f2d3d;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 30px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-tooltip {
        display: none;
    }
}

/* Botão toggle de senha - CORRIGIDO */
.input-group-custom {
    position: relative !important;
}

.password-toggle-btn {
    position: absolute !important;
    right: 12px !important;
    bottom: 12px !important;
    top: auto !important;
    transform: none !important;
    background: none !important;
    border: none !important;
    color: #9aaebf !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 5 !important;
}

.password-toggle-btn:hover {
    color: #083f65 !important;
}

.input-field {
    padding: 0.9rem 1rem !important;
}

.input-field[type="password"] {
    padding-right: 45px !important;
}