/* ============================================
       CADASTRO PAGE - CSTechForge Design System
       ============================================ */

    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
        min-height: 100vh;
        font-family: var(--fg-font-primary, 'Inter', sans-serif);
    }

    [data-bs-theme="dark"] body {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    }

    .cadastro-container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .cadastro-card {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: var(--fg-radius-xl, 20px);
        box-shadow: var(--fg-shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25));
        border: 1px solid rgba(255, 255, 255, 0.18);
        overflow: hidden;
        width: 100%;
        max-width: 560px;
    }

    [data-bs-theme="dark"] .cadastro-card {
        background: rgba(31, 41, 55, 0.95);
        border: 1px solid rgba(55, 65, 81, 0.5);
    }

    .cadastro-header {
        background: #1A1A1A; /* Forge dark */
        border-bottom: 3px solid #4C7DFF; /* Forge accent */
        padding: 36px 30px 28px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    .cadastro-logo {
        margin: 0 auto 16px;
        display: block;
        height: 48px;
        width: auto;
    }

    .cadastro-header h2 {
        color: #FFFFFF;
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .cadastro-header p {
        color: #B3B3B3;
        font-size: 0.95rem;
        margin: 0;
    }

    .cadastro-body {
        padding: 32px 30px 24px;
    }

    [data-bs-theme="dark"] .cadastro-body {
        color: var(--fg-gray-100, #f3f4f6);
    }

    /* Toggle PF/PJ */
    .tipo-toggle {
        display: flex;
        background: var(--fg-gray-100, #f3f4f6);
        border-radius: 10px;
        padding: 4px;
        margin-bottom: 24px;
        gap: 4px;
    }

    [data-bs-theme="dark"] .tipo-toggle {
        background: var(--fg-gray-800, #1f2937);
    }

    .tipo-toggle button {
        flex: 1;
        border: none;
        border-radius: 8px;
        padding: 10px;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.25s ease;
        background: transparent;
        color: var(--fg-gray-600, #6c757d);
    }

    [data-bs-theme="dark"] .tipo-toggle button {
        color: var(--fg-gray-400, #9ca3af);
    }

    .tipo-toggle button.active {
        background: #3A6FF7; /* Forge — brand-blue */
        color: white;
        box-shadow: 0 2px 8px rgba(58, 111, 247, 0.30);
    }

    /* Floating inputs */
    .form-floating {
        position: relative;
        margin-bottom: 18px;
    }

    .form-floating.password-field {
        position: relative;
    }

    .form-floating input {
        border: 2px solid var(--fg-gray-300, #e1e5e9);
        border-radius: var(--fg-radius-lg, 12px);
        padding: 20px 16px 8px 16px;
        font-size: var(--fg-font-size-base, 1rem);
        transition: all 0.3s ease;
        background: var(--fg-gray-50, #f8f9fa);
        width: 100%;
        color: var(--fg-gray-900, #111827);
    }

    .form-floating.password-field input {
        padding-right: 48px;
    }

    [data-bs-theme="dark"] .form-floating input {
        background: var(--fg-gray-800, #1f2937);
        border-color: var(--fg-gray-700, #374151);
        color: var(--fg-gray-100, #f3f4f6);
    }

    .form-floating input:focus {
        border-color: #3A6FF7; /* Forge — Brand Blue */
        box-shadow: 0 0 0 0.2rem rgba(58, 111, 247, 0.20);
        background: white;
        outline: none;
    }

    [data-bs-theme="dark"] .form-floating input:focus {
        background: var(--fg-gray-700, #374151);
        border-color: #4C7DFF; /* Forge — Brand Blue dark */
    }

    .form-floating label {
        padding: 16px;
        color: var(--fg-gray-600, #6c757d);
        font-weight: 500;
        pointer-events: none;
    }

    .form-floating.password-field label {
        padding-right: 48px;
    }

    [data-bs-theme="dark"] .form-floating label {
        color: var(--fg-gray-400, #9ca3af);
    }

    .password-toggle {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: transparent;
        border: none;
        color: var(--fg-gray-600, #6c757d);
        cursor: pointer;
        z-index: 100;
        padding: 10px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .password-toggle:focus { outline: none; }

    /* Strength bar */
    .password-strength {
        margin-top: -10px;
        margin-bottom: 14px;
    }

    .strength-bar {
        height: 4px;
        border-radius: 2px;
        background: var(--fg-gray-200, #e9ecef);
        overflow: hidden;
        margin-bottom: 4px;
    }

    .strength-fill {
        height: 100%;
        border-radius: 2px;
        transition: width 0.3s ease, background-color 0.3s ease;
        width: 0%;
    }

    .strength-text {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--fg-gray-500, #6b7280);
    }

    /* CNPJ row */
    .cnpj-row {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }

    .cnpj-row .form-floating {
        flex: 1;
        margin-bottom: 0;
    }

    .btn-buscar-cnpj {
        background: #3A6FF7; /* Forge — brand-blue */
        border: none;
        border-radius: 12px;
        color: white;
        padding: 14px 16px;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        height: 58px;
        transition: opacity 0.2s;
    }

    .btn-buscar-cnpj:hover { opacity: 0.9; }

    /* WhatsApp verification row */
    .whatsapp-row {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .whatsapp-row .form-floating {
        flex: 1;
        margin-bottom: 0;
    }

    .btn-verificar-ws {
        background: #25D366;
        border: none;
        border-radius: 12px;
        color: white;
        padding: 14px 14px;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        height: 58px;
        transition: opacity 0.2s;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .btn-verificar-ws.verified {
        background: #16a34a;
        cursor: default;
    }

    .btn-verificar-ws:hover:not(.verified) { opacity: 0.9; }

    /* Cadastrar button */
    .btn-cadastrar {
        width: 100%;
        background: #3A6FF7; /* Forge — brand-blue */
        border: none;
        border-radius: var(--fg-radius-lg, 12px);
        padding: 16px;
        color: white;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 8px;
    }

    .btn-cadastrar:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(58, 111, 247, 0.30);
    }

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

    .btn-loading-spin {
        display: none;
        width: 20px;
        height: 20px;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-right: 8px;
    }

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

    .footer-text {
        text-align: center;
        margin-top: 24px;
        color: var(--fg-gray-600, #6c757d);
        font-size: 0.75rem;
        padding-top: 18px;
        border-top: 1px solid var(--fg-gray-200, #e9ecef);
    }

    [data-bs-theme="dark"] .footer-text {
        color: var(--fg-gray-400, #9ca3af);
        border-top-color: var(--fg-gray-700, #374151);
    }

    .footer-text a {
        color: #3A6FF7; /* Forge — Brand Blue */
        text-decoration: none;
        font-weight: 500;
    }

    .footer-text a:hover {
        color: #7B4DFF; /* Forge — Brand Purple */
        text-decoration: underline;
    }

    .error-message {
        background: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.3);
        color: var(--fg-error, #ef4444);
        padding: 12px 16px;
        border-radius: 8px;
        margin-bottom: 18px;
        font-size: 0.875rem;
    }

    [data-bs-theme="dark"] .error-message {
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.4);
    }

    .section-title {
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--fg-gray-500, #6b7280);
        margin-bottom: 12px;
        margin-top: 6px;
    }

    [data-bs-theme="dark"] .section-title {
        color: var(--fg-gray-400, #9ca3af);
    }
