/* Reutiliza todas as variáveis e estilos base do cadastro */
:root {
    --md-primary-color: #3f51b5;
    --md-secondary-color: #fff;
    --md-background-color: #f0f4f9;
    --md-text-color: #333;
    --md-hint-color: #666;
    --md-border-color: #ccc;
    --md-error-color: #d32f2f;
    --md-success-color: #388e3c;
}

.md-cadastro-container {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    min-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.md-box {
    display: grid;
    width: 1250px;
    height: 800px;
    gap: 100px;
    grid-template-columns: 2fr 2fr;
    align-items: stretch;
}

/* Logo Mobile */
.md-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.md-mobile-logo img {
    max-width: 200px;
    height: auto;
}

/* Painel Visual */
.md-visual-panel {
    flex: 1;
    padding: 30px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border-radius: 20px;
}

.md-visual-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.md-visual-panel.has-image::before {
    opacity: 0;
}

.md-visual-panel > * {
    position: relative;
    z-index: 2;
}

/* Painel do Formulário */
.md-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 20px;
    justify-content: space-between;
}

#md-form-title {
    font-size: 36px;
    margin-bottom: 40px;
    color: #27364A;
}

/* Grupos de Formulário */
.md-form-group {
    margin-bottom: 25px;
}

.md-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--md-text-color);
    font-size: 16px;
}

.md-form-group input[type="text"],
.md-form-group input[type="password"],
.md-form-group input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--md-border-color);
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    height: 50px !important;
}

.md-form-group input:focus {
    outline: none;
    border-color: var(--md-primary-color);
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.2);
}

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

/* Links de Senha */
.md-password-links {
    margin-top: 8px;
}

.md-forgot-password {
    color: #0000FF;
    /* text-decoration: none; */
    font-size: 16px;
    text-decoration: underline !important;
}

.md-forgot-password:hover {
    color: #0000FF;
    /* text-decoration: none; */
    font-size: 16px;
    text-decoration: underline !important;
}


/* Checkbox Lembrar de Mim */
.md-remember-group {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 38px;
}

.md-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.md-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 20px !important;
    height: 20px !important;
}

/* Botões */
.md-btn {
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex    ;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#md-form-sub-title {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 80px;
    color: #27364a;
}

.md-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.md-btn-primary {
    background: #27364A;
    color: #fff;
    float: inline-end;
}

.md-btn-primary:hover:not(:disabled) {
    background: #1e2a3a;
}

/* Botão secundário */
.md-btn-secondary {
    background: #fff;
    border: 1px solid var(--md-primary-color);
    color: var(--md-primary-color);
}
.md-btn-secondary:hover {
    background: #fff;
    border: 1px solid var(--md-primary-color);
    color: var(--md-primary-color);
}

/* Grupo de botões lado a lado */
.md-buttons-group {
    /* display: flex; */
    justify-content: space-between;
    margin-top: 33px;
    gap: 12px;
}

.md-buttons-group .md-btn {
    flex: 1;
}

/* Mensagens */
#md-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
    text-align: center;
    font-size: 14px;
}

#md-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#md-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Erros de campo */
.md-field-error {
    color: var(--md-error-color);
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* Loading */
#md-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-loading-content {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.md-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 15px;
}

.md-loading-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.md-login-footer {
    margin-top: 30px;
    padding: 20px 0;
    font-size: 16px;
    color: #666;
    border-top: 1px solid #eee;
}

.md-login-footer a {
    color: var(--md-primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Usuário já logado */
.md-already-logged {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 40px auto;
}

/* Ícones */
.md-btn-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.md-btn-icon-right {
    width: 16px;
    height: 16px;
}

.md-btn-icon-left {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* ===== ESTILOS PARA RECUPERAÇÃO DE SENHA ===== */

/* Steps */
.md-step {
    transition: all 0.3s ease;
}

/* Conteúdo de confirmação */
.md-confirmation-content {
    /* text-align: center; */
    padding: 20px 0;
}

.md-confirmation-icon {
    margin: 30px 0;
}

.md-confirmation-icon svg {
    color: var(--md-primary-color);
}

.md-email-highlight {
    /* color: var(--md-primary-color);
    font-weight: 600;
    background: #f0f4ff;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 10px;
    word-break: break-all; */
}

/* ===== VERSÃO MOBILE ===== */
@media (max-width: 1024px) {
    .md-box {
        max-width: 90%;
        gap: 50px;
    }
}

@media (max-width: 800px) {
    .md-cadastro-container {
        flex-direction: column;
        min-height: 50vh;
        padding: 10px;
    }
    
    .md-mobile-logo {
        display: block;
        margin-bottom: 20px;
        padding-top: 20px;
    }
    
    .md-box {
        flex-direction: column;
        max-width: 100%;
        height: auto;
        gap: 0;
        grid-template-columns: 1fr;
    }
    
    .md-visual-panel {
        display: none !important;
    }
    
    .md-form-panel {
        width: 100%;
        max-width: 100%;
    }
    
    #md-form-title {
        font-size: 28px;
        /* text-align: center; */
        margin-bottom: 30px;
    }
    
    .md-form-group input[type="text"],
    .md-form-group input[type="password"],
    .md-form-group input[type="email"] {
        font-size: 16px;
    }
    
    .md-btn {
        padding: 18px;
        font-size: 16px;
    }
    
    .md-buttons-group {
        display: flex;
        justify-content: space-between;
        margin-top: 33px;
        gap: 12px;
        flex-direction: column-reverse !important;
    }
    
    .md-buttons-group .md-btn {
        width: 100%;
    }
    
    .md-remember-group {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .md-remember-group .md-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .md-cadastro-container {
        padding: 5px;
    }
    
    #md-form-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .md-mobile-logo img {
        max-width: 150px;
    }
    
    .md-login-footer {
        font-size: 14px;
        padding: 15px 0;
    }
    
    .md-email-highlight {
        /* font-size: 14px;
        padding: 6px 10px; */
    }
}

/* ... mantém todo o CSS original anterior ... */

/* Painel do Formulário - COM FLEXBOX PARA RODAPÉ FIXO */
.md-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 20px;
    justify-content: space-between;
}

/* Conteúdo principal que vai crescer */
.md-form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* RODAPÉ FIXO - NOVO ESTILO */
.md-login-footer {
    margin-top: auto;
    padding: 25px 0 0;
    font-size: 16px;
    color: #666;
    border-top: 1px solid #eee;
}

.md-footer-step {
    /* text-align: center; */
}

.md-login-footer p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.md-login-footer a {
    color: var(--md-primary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Ajuste para o conteúdo de confirmação */
.md-confirmation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 0;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 800px) {
    .md-login-footer {
        font-size: 14px;
        padding: 20px 0 0;
    }
    
    .md-login-footer p {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .md-login-footer {
        font-size: 13px;
        padding: 15px 0 0;
    }
}

/* ... mantém todo o resto do CSS original ... */