:root {
    --blue: #2E75B5;
    --blue-dark: #1E3A8A;
    --blue-electric: #5555FF;
    --teal: #68A5A0;
    --sand: #FAFAF9;
    --charcoal: #1E293B;
    --slate: #475569;
    --muted: #94A3B8;
    --border: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 20px 40px -10px rgba(46, 117, 181, 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--sand);
    color: var(--charcoal);
}

#app {
    min-height: 100vh;
}

.signup-enterprise {
    min-height: 100vh;
    background: #F8FAFC;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 32px 16px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    position: relative;
}

.signup-enterprise__grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(46, 117, 181, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.4;
    pointer-events: none;
}

.signup-enterprise__header {
    position: relative;
    text-align: center;
    z-index: 1;
    max-width: 640px;
}

.signup-enterprise__logo {
    height: 48px;
}

.signup-enterprise__header h1 {
    margin: 12px 0 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #1E293B;
    letter-spacing: -0.02em;
}

.signup-enterprise__header p {
    margin: 12px auto 0;
    color: #64748B;
    font-size: 0.95rem;
    max-width: 420px;
}

.signup-enterprise__header p span {
    color: var(--teal);
    font-weight: 700;
}

.signup-enterprise__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 20px 60px -15px rgba(46, 117, 181, 0.25);
    overflow: hidden;
}

.signup-card__body {
    padding: clamp(32px, 6vw, 48px);
}

.signup-enterprise__links {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
    color: #94A3B8;
}

.signup-enterprise__links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.signup-enterprise__links a:hover {
    color: var(--blue);
}

.support-link {
    text-align: center;
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: #94A3B8;
}

.support-link a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.support-link a:hover {
    color: var(--blue-electric);
}

.auth-page {
    position: relative;
    min-height: 100vh;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    overflow: hidden;
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.auth-card {
    width: 100%;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    padding: 40px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-toggle {
    position: relative;
    display: flex;
    align-items: center;
    background: #E2E8F0;
    border-radius: 999px;
    padding: 4px;
    gap: 0;
    --auth-active-index: 0;
}

.auth-toggle__pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: calc(4px + var(--auth-active-index) * 50%);
    width: calc(50% - 8px);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(46, 117, 181, 0.18);
    transition: left 0.25s ease;
}

.auth-toggle__btn {
    flex: 1;
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    color: #64748B;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 14px 0;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-toggle__btn.is-active {
    color: var(--blue);
    font-weight: 700;
}

.auth-alert {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #B91C1C;
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-alert--info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1D4ED8;
}

.auth-context {
    font-size: 0.95rem;
    color: #475569;
    background: #F8FAFC;
    border: 1px solid rgba(71, 85, 105, 0.1);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0;
}

.auth-panels {
    position: relative;
    min-height: 300px;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: auth-fade 0.25s ease;
}

.auth-form.is-active {
    display: flex;
}

.auth-title {
    font-size: 1.4rem;
    color: var(--charcoal);
    margin: 0;
}

.auth-form input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 14px 16px;
    background: #F8FAFC;
    font-family: inherit;
    font-size: 1rem;
    transition: background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    background: #fff;
    border-color: var(--blue-electric);
    box-shadow: 0 0 0 3px rgba(85, 85, 255, 0.15);
}

.input-field label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #64748B;
    margin-bottom: 6px;
}

.input-support {
    text-align: right;
    margin-top: 6px;
}

.auth-cta {
    width: 100%;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-cta--primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 20px 35px -12px rgba(46, 117, 181, 0.5);
}

.auth-cta--primary:hover {
    background: var(--blue-electric);
    transform: translateY(-1px);
}

.auth-cta--secondary {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 20px 35px -12px rgba(104, 165, 160, 0.45);
}

.auth-cta--secondary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.auth-hint {
    background: #EFF6FF;
    border: 1px solid rgba(46, 117, 181, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.88rem;
    color: #1E3A8A;
}

.auth-card__footer {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-footer-text {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
}

.link-inline {
    color: var(--blue-electric);
    font-weight: 600;
    text-decoration: none;
}

.link-inline:hover {
    text-decoration: underline;
}

.signup-card__header {
    text-align: center;
    margin-bottom: 32px;
}

.confirmation-header {
    margin-bottom: 32px;
}

.confirmation-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
}

.confirmation-title {
    font-size: 1.5rem;
    margin: 10px 0 24px;
    color: var(--charcoal);
}

.confirmation-lead {
    margin: 32px 0 0;
    color: #475569;
}

.text-lad-blue {
    color: #2E75B5;
}

.confirmation-steps-panel {
    background: #E9F2FB;
    border: 1px solid rgba(46, 117, 181, 0.2);
    border-radius: 16px;
    padding: 36px 28px;
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.confirmation-step {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
}

.confirmation-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(46, 117, 181, 0.3);
    background: #fff;
    color: var(--blue);
    font-weight: 600;
    font-size: 0.85rem;
}

.confirmation-step p {
    margin: 0;
    line-height: 1.6;
}

.confirmation-actions {
    margin-bottom: 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.cta-primary,
.cta-secondary {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cta-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 15px 35px -10px rgba(46, 117, 181, 0.5);
    width: 100%;
}

.cta-primary:hover {
    background: var(--blue-electric);
    transform: translateY(-1px);
}

.confirmation-resend-form {
    margin: 40px 0 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.cta-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    text-align: center;
    width: auto;
}

.cta-secondary:hover {
    color: var(--blue-electric);
}

.signup-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 42px;
}

.signup-card__header h2 {
    margin: 12px 0 0;
    font-size: 2rem;
    color: var(--charcoal);
}

.signup-card__header p {
    margin: 12px 0 0;
    color: var(--slate);
    font-size: 1rem;
}

.signup-card__header p span {
    color: var(--teal);
    font-weight: 600;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--charcoal);
}

.form-group input:not(.enterprise-input) {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--charcoal);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:not(.enterprise-input):focus {
    outline: none;
    border-color: var(--blue-electric);
    box-shadow: 0 0 0 3px rgba(85, 85, 255, 0.15);
}

.enterprise-input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 14px 16px;
    font-size: 0.95rem;
    background: #F1F5F9;
    color: var(--charcoal);
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.enterprise-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(46, 117, 181, 0.25);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn.primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 12px 24px rgba(46, 117, 181, 0.25);
}

.btn.primary:hover:not(:disabled) {
    background: var(--blue-electric);
    transform: translateY(-1px);
}

.btn.secondary {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: var(--blue-dark);
}

.btn.secondary.ghost {
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: var(--slate);
}

.field-hint {
    margin-top: -4px;
    color: var(--muted);
    font-size: 0.8rem;
}

.field-feedback {
    font-size: 0.82rem;
    color: #10B981;
    min-height: 1rem;
}

.field-feedback.error {
    color: #B91C1C;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.form-row .form-group {
    min-width: 0;
}

.logo-dropzone {
    position: relative;
    border: 1.5px dashed rgba(46, 117, 181, 0.4);
    border-radius: 14px;
    padding: 18px;
    background: rgba(46, 117, 181, 0.03);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.logo-dropzone.dragover {
    border-color: var(--blue-electric);
    background: rgba(85, 85, 255, 0.08);
}

.logo-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.logo-instruction {
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--slate);
    font-size: 0.85rem;
}

.logo-instruction strong {
    color: var(--charcoal);
    font-weight: 600;
}

.logo-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-preview img {
    max-height: 56px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    padding: 6px;
}

.logo-preview.active {
    display: flex;
}

.logo-remove {
    border: none;
    background: rgba(220, 53, 69, 0.1);
    color: #b91c1c;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.logo-remove:hover {
    background: rgba(220, 53, 69, 0.18);
}

.input-affix {
    position: relative;
}

.input-affix .input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1.2rem;
}

.input-affix .input-icon::before {
    content: '\1F441';
}

.input-affix .input-icon.is-active::before {
    content: '\1F441';
    color: var(--blue);
}

.input-affix--icon .input-icon {
    right: auto;
    left: 16px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.85rem;
    color: var(--muted);
}

.input-affix--icon input {
    padding-left: 56px;
}

.spinner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(85, 85, 255, 0.2);
    border-top-color: var(--blue-electric);
    animation: spin 0.8s linear infinite;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
}

.spinner.is-active {
    opacity: 1;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes auth-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-role="cnpj-status"]::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

[data-role="cnpj-status"].is-success::before {
    content: '?';
    color: #10B981;
}

[data-role="cnpj-status"].is-error::before {
    content: '!';
    color: #DC2626;
}

.partner-code {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.partner-toggle {
    border: none;
    background: none;
    color: var(--blue);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.partner-toggle:hover {
    color: var(--blue-electric);
}

.partner-field {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.partner-field.is-visible {
    display: flex;
}

.partner-field label {
    font-size: 0.85rem;
    color: var(--slate);
}

.legal-block {
    background: #F1F5F9;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--slate);
}

.legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.legal-checkbox input {
    margin-top: 4px;
}

.legal-checkbox a {
    color: var(--blue-electric);
}

.signup-submit {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 16px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(46, 117, 181, 0.25);
}

.signup-submit:hover:not(:disabled) {
    background: var(--blue-electric);
    transform: translateY(-1px);
}

.signup-submit:disabled {
    background: #CBD5F5;
    cursor: not-allowed;
    box-shadow: none;
}

.login-hint {
    text-align: center;
    font-size: 0.9rem;
    color: var(--slate);
    margin: 0;
}

.login-hint--primary {
    margin-top: 18px;
}

.login-hint--secondary {
    margin-top: 8px;
}

.login-hint a {
    color: var(--blue-electric);
    font-weight: 600;
}

.email-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--slate);
    margin: 12px 0 0;
}

.signup-trust-bar {
    background: #F1F5F9;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
    padding: 18px clamp(24px, 6vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #64748B;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.trust-item:hover {
    opacity: 1;
}

.trust-item svg {
    width: 16px;
    height: 16px;
    color: #2E75B5;
}

.trust-divider {
    width: 1px;
    height: 18px;
    background: rgba(148, 163, 184, 0.5);
}

.signup-alert {
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.signup-alert.success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.signup-alert.error {
    background: rgba(220, 38, 38, 0.12);
    color: #B91C1C;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.confirmation-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.confirmation-steps div {
    background: rgba(241, 245, 249, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
}

.confirmation-steps strong {
    display: block;
    color: var(--charcoal);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.confirmation-steps p {
    margin: 0;
    color: var(--slate);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .signup-card {
        padding: 32px 20px;
    }

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