/* ==========================================================================
   DARKBETS - CADASTRO
   Estilos específicos para a tela de registro
   ========================================================================== */

/* -----------------------------------------------------------------------
   SCROLL — sobrescreve os overflow:hidden do login.css para a página
   de cadastro, que tem mais conteúdo e precisa de scroll vertical
   ----------------------------------------------------------------------- */
html.login-page,
body.login-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
}

.main-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    align-items: flex-start !important;
    padding: 24px 16px !important;
}

.login-container.register-container {
    overflow: visible !important;
    max-height: none !important;
    align-items: flex-start !important;
    padding: 0 !important;
}

.login-card.register-card {
    overflow: visible !important;
    max-height: none !important;
}

/* Container maior para o formulário de cadastro */
.register-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
}

.register-card {
    padding: 28px 24px 24px;
}

/* --------------------------------------------------------------------------
   Stepper
   -------------------------------------------------------------------------- */
.reg-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0 28px;
    gap: 0;
}

.reg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.reg-step.active,
.reg-step.done {
    opacity: 1;
}

.reg-step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}

.reg-step.active .reg-step-dot {
    background: rgba(118, 248, 2, 0.15);
    border-color: #76F802;
    color: #76F802;
    box-shadow: 0 0 14px rgba(118, 248, 2, 0.3);
}

.reg-step.done .reg-step-dot {
    background: rgba(118, 248, 2, 0.2);
    border-color: #76F802;
    color: #76F802;
}

.reg-step.done .reg-step-dot::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 12px;
}

.reg-step.done .reg-step-dot i {
    display: none;
}

.reg-step span {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reg-step.active span,
.reg-step.done span {
    color: rgba(255, 255, 255, 0.85);
}

.reg-step-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 8px;
    margin-bottom: 22px;
    max-width: 60px;
    transition: background 0.3s;
}

/* --------------------------------------------------------------------------
   Conteúdo dos passos
   -------------------------------------------------------------------------- */
.reg-step-content {
    display: none;
    animation: fadeStepIn 0.35s ease;
}

.reg-step-content.active {
    display: block;
}

@keyframes fadeStepIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   Status do campo (ícone de loading/ok/error)
   -------------------------------------------------------------------------- */
.field-status {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

.field-status.loading { color: rgba(255, 255, 255, 0.5); }
.field-status.ok      { color: #76F802; }
.field-status.error   { color: #e74c3c; }

/* Reserva espaço para o ícone de status dentro do input-wrapper */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 72px !important; /* espaço para ícone status + botão toggle */
}

/* Quando não há toggle de senha, menos padding */
.input-wrapper:not(:has(.toggle-password)) input {
    padding-right: 44px !important;
}

.field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.field-error {
    min-height: 18px;
    margin-top: 4px;
    font-size: 12px;
    color: #e74c3c;
    font-weight: 500;
}

/* Input com erro */
.form-input.input-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

/* --------------------------------------------------------------------------
   Barra de força da senha
   -------------------------------------------------------------------------- */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.4s ease;
    width: 0%;
}

.strength-fill.very-weak  { background: #e74c3c; }
.strength-fill.weak       { background: #e67e22; }
.strength-fill.fair       { background: #f1c40f; }
.strength-fill.strong     { background: #2ecc71; }
.strength-fill.very-strong{ background: #76F802; }

.strength-label {
    font-size: 11px;
    font-weight: 600;
    min-width: 72px;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.strength-label.very-weak  { color: #e74c3c; }
.strength-label.weak       { color: #e67e22; }
.strength-label.fair       { color: #f1c40f; }
.strength-label.strong     { color: #2ecc71; }
.strength-label.very-strong{ color: #76F802; }

/* --------------------------------------------------------------------------
   Termos
   -------------------------------------------------------------------------- */
.reg-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0 4px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.reg-terms-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #76F802;
    cursor: pointer;
}

.reg-terms-label a {
    color: #76F802;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Navegação entre passos
   -------------------------------------------------------------------------- */
.reg-step-nav {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.reg-step-nav .btn-secondary {
    flex: 0 0 auto;
    padding: 12px 18px;
    font-size: 14px;
}

.reg-step-nav .btn-primary {
    flex: 1;
}

/* --------------------------------------------------------------------------
   Alerta de erro geral
   -------------------------------------------------------------------------- */
.alert-register {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.35);
    border-left: 3px solid #e74c3c;
    border-radius: 8px;
    color: #e74c3c;
    font-size: 13px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Modal de sucesso
   -------------------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.success-modal-content {
    background: rgba(10, 20, 10, 0.95);
    border: 1px solid rgba(118, 248, 2, 0.25);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.success-icon {
    font-size: 56px;
    color: #76F802;
    margin-bottom: 18px;
    filter: drop-shadow(0 0 18px rgba(118, 248, 2, 0.5));
}

.success-modal-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.success-modal-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .register-card {
        padding: 24px 18px 20px;
    }

    .reg-stepper {
        gap: 0;
    }

    .reg-step-line {
        max-width: 30px;
    }
}
