* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    background: #050d09;
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

/* ── Animated gradient orbs ── */
body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18), transparent 70%);
    top: -200px;
    left: -100px;
    animation: orbFloat1 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 184, 148, 0.12), transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: orbFloat2 10s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -30px) scale(1.15); }
}

/* ── Dot grid pattern ── */
.register-bg-pattern {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: drift 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.container {
    background: rgba(255, 255, 255, 0.04);
    -webkit-

    padding: 70px 45px 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: white;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 120px rgba(16, 185, 129, 0.04);
    width: 500px;
    position: relative;
    z-index: 1;
    animation: cardFloat 0.8s ease-out;
}

@keyframes cardFloat {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalAnim {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Header do formulário ── */
.form-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo-icon {
    width: 110px;
    height: 110px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -50px auto 16px;
    color: white;
    filter: drop-shadow(0 0 24px rgba(16, 185, 129, 0.25));
    position: relative;
    z-index: 2;
}

.container h1 {
    font-size: 28px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff 30%, #6ee7b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* ── Indicador de etapas ── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 8px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.step-dot.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.step-dot.done {
    background: #007349;
    border-color: transparent;
    color: white;
    font-size: 16px;
}

.step-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.step-line.active {
    background: linear-gradient(90deg, #10b981, #059669);
}

.step-title {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Etapas ── */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* ── Inputs ── */
.input-box {
    position: relative;
    height: 52px;
    margin: 14px 0;
    width: 100%;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    outline: none;
    color: white;
    padding: 0 44px 0 18px;
    font-size: 14px;
    font-family: inherit;
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.input-box input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.12),
                0 0 0 3px rgba(16, 185, 129, 0.06);
}

.input-box i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
    transition: color 0.3s;
    pointer-events: none;
}

.input-box input:focus + i {
    color: #10b981;
}

/* ── Toggle senha (olho) ── */
.input-box i.toggle-senha {
    pointer-events: auto;
    cursor: pointer;
}

.input-box i.toggle-senha:hover {
    color: rgba(255, 255, 255, 0.8);
}

.input-box input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
}

/* ── Linha de inputs lado a lado ── */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-row .input-box {
    margin: 14px 0;
}

/* ── CNPJ Info/Loading/Erro ── */
.cnpj-info {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 4px;
    margin: -6px 0 14px;
    animation: fadeIn 0.3s ease;
}

.cnpj-info-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cnpj-info i {
    color: #10b981;
    font-size: 18px;
    flex-shrink: 0;
}

.cnpj-info span {
    font-size: 13px;
    color: #6ee7b7;
    font-weight: 500;
    line-height: 1.3;
}

.cnpj-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: -6px 0 14px;
    animation: fadeIn 0.3s ease;
}

.cnpj-loading span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.cnpj-aviso {
    display: flex;
    padding: 12px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 4px;
    margin: -6px 0 14px;
    animation: fadeIn 0.3s ease;
}

.cnpj-aviso-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cnpj-aviso-inner > i {
    color: #f59e0b;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.cnpj-aviso-titulo {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 2px;
}

.cnpj-aviso-desc {
    display: block;
    font-size: 12px;
    color: rgba(245, 158, 11, 0.7);
    line-height: 1.4;
}

/* ── Spinner ── */
.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Força da senha ── */
.senha-forca {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -6px 0 10px;
    padding: 0 4px;
}

.forca-barra {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.forca-progresso {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.forca-texto {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

/* ── Terms ── */
.terms {
    display: flex;
    font-size: 13px;
    margin: 16px 0;
}

.terms label {
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.terms label:hover {
    color: white;
}

.terms label input {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #10b981;
    border-radius: 4px;
}

/* ── Botões ── */
.btn-register {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    outline: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    font-size: 15px;
    font-family: inherit;
    margin-top: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.45),
                0 0 60px rgba(16, 185, 129, 0.15);
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:active {
    transform: translateY(0);
}

.btn-register:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-voltar {
    width: 100%;
    height: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-family: inherit;
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.btn-voltar:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

/* ── Link de login ── */
.register-link {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.register-link p {
    color: rgba(255, 255, 255, 0.5);
}

.register-link a {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.register-link a:hover {
    color: #34d399;
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* ── Mensagem de sucesso ── */
.success-message {
    text-align: center;
    color: white;
    padding: 40px 20px;
    animation: fadeIn 0.6s ease-out;
}

.success-message i {
    font-size: 70px;
    color: #10b981;
    margin-bottom: 25px;
    display: block;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-message h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #6ee7b7;
    font-weight: 600;
}

.success-message p {
    font-size: 14px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.success-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto 0;
}

/* ── Responsividade ── */
@media (max-width: 540px) {
    .container {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        border-radius: 0;
        padding: 0 28px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border: none;
        background: rgba(255, 255, 255, 0.02);
        box-shadow: none;
    }

    .container h1 {
        font-size: 24px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .btn-row {
        grid-template-columns: 1fr;
    }

    .btn-voltar {
        order: 2;
        height: 44px;
    }

    .logo-icon {
        width: 56px;
        height: 56px;
        border-radius: 4px;
    }
}
