/* Tela de registro — usa o layout do login (login.css: .lg-card, .lg-visual, .lg-panel, .lg-field,
   .lg-submit, .lg-divider, .lg-secondary) e acrescenta só o que é específico do cadastro.
   Carregada depois de auth.css e login.css; escopada em .page-login. */

.page-login .lg-panel__inner {
    max-width: 380px;
}

/* O auth.css desenha um "cartão" em volta de #registration-form; aqui o cartão já é o .lg-card. */
.page-login #registration-form,
.page-login #recovery-form {
    display: block;
    max-width: none;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    animation: none;
    text-align: left;
}

.page-login #registration-form::before,
.page-login #recovery-form::before {
    display: none;
}

.page-login .form-group {
    margin: 0 0 14px;
    text-align: left;
}

/* ===================== */
/* BOTÕES                */
/* ===================== */
.page-login #registration-form .lg-submit,
.page-login #recovery-form .lg-submit {
    margin-top: 10px;
}

.page-login .lg-ghost {
    width: 100%;
    height: 46px;
    margin: 10px 0 0;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--lg-soft);
    color: var(--lg-text) !important;
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
}

.page-login .lg-ghost::before {
    display: none;
}

.page-login .lg-ghost:hover {
    background: var(--lg-accent);
    color: #fff !important;
    transform: none;
}

.page-login #step1 .lg-secondary {
    margin-top: 0;
}

/* Botão de ver/ocultar senha (o auth.css força vários !important em .toggle-password) */
.page-login .lg-eye.toggle-password {
    right: 8px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    background: transparent !important;
    color: var(--lg-muted) !important;
    font-size: 1rem !important;
    margin: 0;
}

.page-login .lg-eye.toggle-password:hover {
    background: var(--lg-soft) !important;
    color: var(--lg-accent) !important;
    opacity: 1;
}

.page-login .lg-eye.toggle-password i {
    font-size: 1rem !important;
}

/* ===================== */
/* ESCOLHA DO MÉTODO     */
/* ===================== */
.page-login .registration-method-selector {
    margin-bottom: 16px;
}

.page-login .registration-method-selector__title {
    margin-bottom: 10px;
    color: var(--lg-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.page-login .registration-method-option {
    margin: 0;
    padding: 14px 16px;
    border: 1.5px solid var(--lg-line);
    border-radius: 10px;
    background: #fff;
    color: var(--lg-text);
    font-size: 0.92rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.page-login .registration-method-option:hover {
    border-color: #cfd3d9;
    background: #fff;
}

.page-login .registration-method-option:has(input:checked) {
    border-color: var(--lg-accent);
    background: #fdf5f8;
    box-shadow: 0 0 0 4px var(--lg-ring);
}

.page-login .registration-method-option input[type="radio"] {
    accent-color: var(--lg-accent);
}

.page-login .registration-method-hint {
    margin: 8px 2px 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--lg-muted);
}

.page-login .registration-method-panel {
    margin-bottom: 0;
}

.page-login .lg-lead {
    margin-bottom: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--lg-muted);
}

/* ===================== */
/* CAIXAS DE AVISO/ACEITE */
/* ===================== */
.page-login .lg-note {
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid #ecd3de;
    border-radius: 10px;
    background: #fdf5f8;
    color: #4a1530;
    font-size: 0.82rem;
    line-height: 1.6;
}

.page-login .lg-note ul {
    margin: 6px 0 0 18px;
}

.page-login .lg-note__lead {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.page-login .lg-note__small {
    margin: 12px 0 0;
    font-size: 0.75rem;
    color: var(--lg-muted);
}

.page-login .lg-check {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--lg-text);
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    cursor: pointer;
}

.page-login .lg-check input {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--lg-accent);
}

/* ===================== */
/* MENSAGENS             */
/* ===================== */
.page-login #user-message.alert,
.page-login #registration-form #error-message,
.page-login #recovery-form .alert,
.page-login #registration-form .alert {
    max-width: none;
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: left;
    box-shadow: none;
}

/* ===================== */
/* MODAL DE ALERTA       */
/* ===================== */
#custom-alert-overlay {
    background: rgba(30, 10, 20, 0.5);
}

#custom-alert-modal {
    width: 100%;
    max-width: 400px;
    min-width: 0;
    padding: 32px 26px 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 60px -20px rgba(60, 20, 40, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.12);
}

#custom-alert-message {
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.5;
}

#custom-alert-message label {
    margin: 0;
    color: #111827;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
}

#custom-alert-message input.form-control {
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
}

#custom-alert-message input.form-control:focus {
    border-color: #7a1642;
    box-shadow: 0 0 0 4px rgba(122, 22, 66, 0.16);
}

#custom-alert-actions button {
    flex: 1;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0.01em;
    box-shadow: none;
}

#custom-alert-actions button::before {
    display: none;
}

#custom-alert-actions .btn-create {
    background: #7a1642;
    color: #fff !important;
    box-shadow: 0 8px 18px -8px rgba(122, 22, 66, 0.55);
}

#custom-alert-actions .btn-create:hover {
    background: #5f1034;
    transform: translateY(-1px);
}

#custom-alert-actions .btn-secondary {
    background: #f4f5f7;
    color: #111827 !important;
}

#custom-alert-actions .btn-secondary:hover {
    background: #e5e7eb;
    transform: none;
}

.custom-alert-extra {
    color: #6b7280 !important;
    font-size: 0.8rem !important;
    line-height: 1.5;
}

/* ===================== */
/* MODAL TERMOS/PRIVACIDADE */
/* ===================== */
#legal-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(30, 10, 20, 0.5);
}

#legal-modal-overlay.open {
    display: flex;
}

#legal-modal-overlay,
#legal-modal-box,
#legal-modal-header,
#legal-modal-body,
#legal-modal-footer {
    color-scheme: light !important;
}

#legal-modal-box {
    width: 100%;
    max-width: 620px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #fff !important;
    color: #333 !important;
    box-shadow: 0 30px 60px -20px rgba(60, 20, 40, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.12);
}

#legal-modal-header,
#legal-modal-footer {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    background: #fdf5f8 !important;
}

#legal-modal-header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ecd3de;
}

#legal-modal-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #ecd3de;
}

#legal-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #7a1642 !important;
}

#legal-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    background: #fff !important;
    color: #444 !important;
    font-size: 0.93em;
    line-height: 1.7;
}

#legal-modal-body h3 {
    margin: 1.4rem 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827 !important;
}

#legal-modal-body h3:first-child {
    margin-top: 0;
}

#legal-modal-body p {
    margin-bottom: 0.6rem;
}

#legal-modal-body ul {
    margin: 0.3rem 0 0.8rem 1.4rem;
}

#legal-modal-body p,
#legal-modal-body li {
    color: #555 !important;
    -webkit-text-fill-color: #555 !important;
}

#legal-modal-footer button {
    display: inline-block;
    width: auto;
    height: 44px;
    margin: 0;
    padding: 0 2rem;
    border-radius: 999px;
    background: #7a1642;
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px -8px rgba(122, 22, 66, 0.55);
}

#legal-modal-footer button::before {
    display: none;
}

#legal-modal-footer button:hover {
    background: #5f1034;
    transform: translateY(-1px);
}

/* Override forte para vencer o "button { color:#fff !important ... }" global */
button.btn-legal-link,
button.btn-legal-link:hover,
button.btn-legal-link:focus,
button.btn-legal-link:active {
    display: inline !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #7a1642 !important;
    -webkit-text-fill-color: #7a1642 !important;
    font-weight: 600 !important;
    font-size: inherit !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    transform: none !important;
    overflow: visible !important;
    position: static !important;
    line-height: inherit !important;
    vertical-align: baseline !important;
}

button.btn-legal-link::before,
button.btn-legal-link::after {
    display: none !important;
}
