/* Reset e Configurações Globais */
*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    height: 100%;
	width: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    background: linear-gradient(135deg, #00843D, #00A857, #FF6F20, #ffffff);
    background-size: 400% 400%;
    animation: bgShift 20s ease infinite;
}

@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Container Principal */
.page {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

.container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Card de Login */
.card-container.card {
    width: 90%;
    max-width: 440px;
    padding: 48px 40px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 132, 61, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-container.card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 80px rgba(0, 132, 61, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

/* Logo */
.profile-img-card {
    width: 120px;
    height: auto;
    margin: 0 auto 32px;
    display: block;
    transition: transform 0.3s ease;
}

.profile-img-card:hover {
    transform: scale(1.05);
}

/* Formulário */
.form-signin {
    width: 100%;
}

.profile-name-card {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 24px;
    color: #2d3748;
}

.reauth-email {
    display: block;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Inputs */
.form-signin select,
.form-signin #inputEmail,
.form-signin #inputPassword,
.form-signin .scFormObjectOdd,
.form-signin input[type=email],
.form-signin input[type=password],
.form-signin input[type=text] {
    width: 100%;
    height: 50px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 15px;
    color: #2d3748;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-signin input[type=email]:focus,
.form-signin input[type=password]:focus,
.form-signin input[type=text]:focus,
.form-signin select:focus,
.form-control:focus {
    border-color: #00843D;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 132, 61, 0.1);
    transform: translateY(-2px);
}

.form-signin input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.form-signin select {
    appearance: none;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='#718096' viewBox='0 0 16 16'><path d='M8 11L3 6h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Botão */
.btn {
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

/* Botão Login com gradiente animado */
.btn.btn-signin,
input.btn.btn-lg.btn-primary.btn-block.btn-signin {
    width: 100%;
    height: 50px;
    margin-top: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(270deg, #00843D, #FF6F20, #00A857);
    background-size: 600% 600%;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    animation: gradientMove 6s ease infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 111, 32, 0.4);
}

/* Labels */
label {
    color: #00843D;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    display: block;
}

/* Links */
a {
    color: #00843D;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

a:hover,
a:focus {
    color: #FF6F20;
    text-decoration: none;
}

.forgot-password {
    color: #00843D;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password:hover,
.forgot-password:active,
.forgot-password:focus {
    color: #FF6F20;
}

/* Menu Links */
button {
    margin-bottom: 20px;
}

.class-links a {
    text-decoration: none;
    color: #00843D;
    font-family: inherit;
    display: block;
    margin-bottom: 8px;
    padding: 8px 0;
    font-size: 14px;
    transition: all 0.2s ease;
}

.class-links a:hover,
.class-links a:active,
.class-links a:focus {
    color: #FF6F20;
    font-weight: 600;
    padding-left: 8px;
}

/* Checkbox Lembrar-me */
#txtremember {
    font-size: 14px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

#txtremember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00843D;
}

/* Mensagens de Erro */
#id_error_display_fixed {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

table.scFormErrorTable {
    padding: 24px;
    background-color: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    width: 320px;
    min-height: 120px;
}

td.scFormErrorMessage {
    padding: 20px 0 10px;
    color: #2d3748;
    font-size: 15px;
    text-align: center;
}

td.scFormErrorTitleFont {
    color: rgba(0, 0, 0, 0);
    position: relative;
    text-align: center;
}

td.scFormErrorTitleFont img {
    position: relative;
    margin: 0 auto;
    display: block;
}

a.scButton_default {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 11px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    text-decoration: none;
    color: #718096;
    font-weight: 600;
    transition: all 0.2s ease;
}

a.scButton_default:hover {
    background: #00843D;
    color: #ffffff;
    border-color: #00843D;
}

/* Alert Message - CORRIGIDO */
.alert-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #2d3748;
    padding: 16px 50px 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10000;
    max-width: 500px;
    width: 90%;
    animation: slideInDown 0.3s ease;
}

.alert-message.active {
    display: block !important;
}

.alert-message.negative {
    border-left: 4px solid #e53e3e;
    background: #fff5f5;
}

.alert-message .message {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: #fff;
    white-space: pre-line;
}

.alert-message .close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    transition: color 0.2s ease;
    line-height: 1;
}

.alert-message .close:hover {
    color: #e53e3e;
}

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Toggle de Senha */
span.sc-ui-pwd-toggle-icon {
    position: absolute;
    display: inline-block;
    cursor: pointer;
    right: 16px;
    margin-top: -42px;
    z-index: 2;
    color: #a0aec0;
    transition: color 0.2s ease;
}

span.sc-ui-pwd-toggle-icon:hover {
    color: #00843D;
}

/* Responsividade */
@media (max-width: 768px) {
    .card-container.card {
        max-width: 420px;
        width: 92%;
        padding: 36px 28px;
    }
    
    .alert-message {
        max-width: 90%;
        padding: 14px 45px 14px 16px;
    }
    
    .alert-message .message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .card-container.card {
        padding: 32px 24px;
        border-radius: 20px;
        width: 100%;
        max-width: 380px;
    }
    
    .profile-img-card {
        width: 100px;
        margin-bottom: 24px;
    }
    
    .form-signin input,
    .btn.btn-signin {
        height: 48px;
        font-size: 14px;
    }
    
    .alert-message {
        top: 10px;
        padding: 12px 40px 12px 14px;
    }
    
    .alert-message .message {
        font-size: 12px;
    }
}