/* ── 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: 2.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 #3b82f6;
    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(59, 130, 246, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #60a5fa;
}

.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: #0a2b44;
    margin-bottom: 0.5rem;
}

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

.access-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 20px;
    border: 1px solid #e2edf7;
}

.access-card {
    flex: 1;
    padding: 0.9rem 0.5rem;
    text-align: center;
    background: transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c4c6e;
    border: none;
}

.access-card i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.access-card.active {
    background: #ffffff;
    color: #0a4b7a;
    box-shadow: 0 6px 14px rgba(0, 51, 102, 0.12);
    border: 1px solid #cddfef;
}

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

.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-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: #1e6faf;
    box-shadow: 0 0 0 3px rgba(30, 111, 175, 0.15);
}

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

.btn-login:hover {
    background: #063a5e;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(10, 75, 122, 0.2);
}

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

.btn-register {
    width: 100%;
    padding: 0.9rem;
    background: transparent;
    border: 1.5px solid #cbdde9;
    border-radius: 14px;
    font-weight: 600;
    color: #1e5a7d;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-register:hover {
    background: #f0f6fe;
    border-color: #0a4b7a;
}

.btn-register-link {
    text-decoration: none;
    display: block;
    margin-top: 0.8rem;
}

.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;
    cursor: pointer;
}

.forgot-link a:hover {
    text-decoration: underline;
    color: #0a2b4e;
}

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

.tech-badge i {
    color: #0a4b7a;
    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;
}

.global-footer a {
    color: #5f7d9c;
    text-decoration: none;
}

.global-footer a:hover {
    text-decoration: underline;
}

/* Modal de recuperação de senha */
.modal-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-custom.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-custom {
    background: white;
    border-radius: 28px;
    max-width: 450px;
    width: 90%;
    padding: 2rem;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-custom.active .modal-content-custom {
    transform: scale(1);
}

.modal-content-custom h3 {
    color: #083f65;
    margin-bottom: 1rem;
}

.modal-content-custom p {
    color: #5f7d9c;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.modal-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}

.modal-btn-primary {
    background: #083f65;
    color: white;
}

.modal-btn-primary:hover {
    background: #26b2fd;
    color: #083f65;
}

.modal-btn-secondary {
    background: #eef2f6;
    color: #2c4c6e;
}

.modal-btn-secondary:hover {
    background: #e2e8f0;
}

.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    max-width: 380px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@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;
    }
    .access-card {
        font-size: 0.8rem;
    }
    .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);
    }
}

.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);
}

.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;
}

.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;
    }
}

.password-toggle-btn {
    position: absolute;
    right: 15px;
    bottom: 12px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

.password-toggle-btn:hover {
    color: #0a4b7a;
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle-btn:focus {
    outline: none;
    color: #0a4b7a;
}

/* Modal de confirmação */
.confirmation-modal-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.confirmation-modal-content-custom {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.confirmation-icon-custom {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #083f65 0%, #0d639e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.confirmation-icon-custom i {
    font-size: 2rem;
    color: white;
}

.confirmation-modal-content-custom h4 {
    color: #083f65;
    margin-bottom: 1rem;
    font-weight: 700;
}

.confirmation-modal-content-custom p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirmation-btn-custom {
    background: linear-gradient(135deg, #083f65 0%, #0d639e 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.confirmation-btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(8, 63, 101, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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