:root {
    --jci-primary-blue: #152ea9;
    --jci-dark-blue: #000070;
    --jci-btn-blue: #00adff;
    --jci-btn-hover: #152ea9;
    --jci-text-dark: #333740;
    --jci-text-gray: #f2f2f2;
    --jci-border: #cccccc;
    --jci-success: #32c858;
    --jci-error: #c62828;
}

/* Ocultar botão nativo de revelar senha em todos os navegadores */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

body {
    margin: 0;
    font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
    background-color: #ffffff;
}

.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1 1 50%;
    max-width: 50%;
    background: linear-gradient(to bottom right, var(--jci-dark-blue) 0%, var(--jci-primary-blue) 100%);
    color: #ffffff;
    padding: 60px 10%;
    display: flex;
    box-sizing: border-box;
}

.left-content {
    width: 100%;
    max-width: 550px;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.brand-header {
    margin-top: 0;
}

.logo-white {
    max-width: 200px;
    margin-bottom: 55px;
}

.brand-header h1 {
    font-size: 42px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.subtitle {
    font-size: 20px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.brand-features {
    margin-top: auto;
    margin-bottom: 4vh;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
}

.feature-icon {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.feature-text h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.feature-text p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.login-right {
    flex: 1 1 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px;
    box-sizing: border-box;
}

.form-container {
    width: 100%;
    max-width: 420px;
}

.form-container h2 {
    color: var(--jci-text-dark);
    font-size: 36px;
    margin: 0 0 10px 0;
}

.form-subtitle {
    color: var(--jci-text-dark);
    font-size: 18px;
    margin-bottom: 50px;
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

.input-group input {
    width: 100%;
    padding: 16px 16px;
    border: 1px solid var(--jci-border);
    border-radius: 4px;
    font-size: 16px;
    color: var(--jci-text-dark);
    box-sizing: border-box;
    background-color: transparent;
}

.input-group input:focus {
    border-color: var(--jci-btn-blue);
    outline: none;
}

/* Garantir não sobreposição do texto com o nosso ícone customizado */
.input-group input[type="password"],
.input-group input[type="text"]#senhaInput {
    padding-right: 45px;
}

.input-group label {
    position: absolute;
    top: -9px;
    left: 12px;
    background-color: #ffffff;
    padding: 0 5px;
    font-size: 12px;
    color: var(--jci-text-dark);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: flex;
}

.forgot-password-container {
    text-align: right;
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;
}

.forgot-link {
    color: var(--jci-primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background-color: var(--jci-primary-blue);
    color: #ffffff;
    border: none;
    padding: 0 14px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--jci-dark-blue);
}

.btn-primary:disabled,
.btn-primary:disabled:hover {
    background-color: var(--jci-primary-blue) !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

.toast-notification {
    position: absolute;
    top: 30px;
    right: 30px;
    padding: 12px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-toast {
    background-color: var(--jci-error);
}

.success-toast {
    background-color: var(--jci-success);
}

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.footer-legal {
    margin-top: 50px;
    text-align: center;
}

.copyright {
    color: #999999;
    font-size: 13px;
    margin: 0;
}

@media (max-width: 900px) {
    .split-layout {
        flex-direction: column;
    }

    .login-left,
    .login-right {
        max-width: 100%;
        width: 100%;
        flex: none;
    }

    .login-left {
        padding: 50px 30px;
    }

    .brand-features {
        margin-top: 40px;
    }
}

/* ============================
   Legal Notice Modal
   ============================ */

.legal-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-modal-box {
    background: #ffffff;
    border-radius: 4px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    margin: 20px;
}

.legal-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid #f0f0f0;
}

.legal-modal-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1;
}

.legal-modal-body p {
    font-size: 13px;
    color: #444;
    line-height: 1.65;
    margin: 0 0 16px 0;
}

.legal-modal-body p:last-child {
    margin-bottom: 0;
}

.legal-modal-footer {
    padding: 16px 28px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.legal-modal-btn {
    background: none;
    border: none;
    color: var(--jci-primary-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 8px 0;
    transition: opacity 0.2s;
}

.legal-modal-btn:hover {
    opacity: 0.75;
}

/* Pure CSS Loading Spinner */
.btn-loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}