        :root {
            --bg: #030712;
            --surface: #111827;
            --surface-alt: #1f2937;
            --border: #374151;
            --border-strong: #4b5563;
            --text: #f3f4f6;
            --muted: #9ca3af;
            --primary: #3b82f6;
            --primary-strong: #2563eb;
            --accent: #60a5fa;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --shadow: 0 16px 40px rgba(0, 0, 0, 0.30);
            --color-emprestimo: #3b82f6;
            --color-cartao: #10b981;
            --color-beneficio: #f59e0b;
            --radius: 18px;
            --radius-sm: 12px;
            --transition: 0.22s ease;
        }

        * {
            box-sizing: border-box;
        }

        html, body {
            margin: 0;
            padding: 0;
            font-family: Inter, "Segoe UI", Arial, sans-serif;
            background: var(--bg);
            color: var(--text);
        }

        body {
            min-height: 100vh;
        }

        .app-shell {
            width: min(1440px, calc(100% - 28px));
            margin: 24px auto 48px;
        }

        .hero {
            display: grid;
            gap: 18px;
            padding: 28px;
            border-radius: 24px;
            background: linear-gradient(135deg, rgba(30, 58, 95, 0.96), rgba(29, 78, 137, 0.92));
            color: #ffffff;
            box-shadow: var(--shadow);
            margin-bottom: 20px;
        }

        .hero h1 {
            margin: 0;
            font-size: clamp(1.75rem, 2.8vw, 2.7rem);
            line-height: 1.08;
        }

        .hero p {
            margin: 0;
            max-width: 960px;
            color: rgba(255,255,255,0.92);
            line-height: 1.6;
        }

        .hero-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            border-radius: 999px;
            background: rgba(255,255,255,0.16);
            color: #ffffff;
            font-size: 0.92rem;
            border: 1px solid rgba(255,255,255,0.18);
        }

        .panel {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 22px;
            box-shadow: var(--shadow);
            padding: 24px;
            margin-bottom: 20px;
        }

        .panel-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
            flex-wrap: wrap;
        }

        .panel-header h2,
        .panel-header h3,
        .subsection-title {
            margin: 0;
        }

        .subtitle {
            margin: 4px 0 0;
            color: var(--muted);
            line-height: 1.5;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.12);
            color: var(--primary);
            border: 1px solid rgba(59, 130, 246, 0.25);
            padding: 8px 14px;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .grid {
            display: grid;
            gap: 16px;
        }

        .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

        .field {
            display: grid;
            gap: 8px;
        }

        .field label {
            font-size: 0.93rem;
            font-weight: 700;
            color: var(--text);
        }

        .required {
            color: var(--danger);
        }

        .input,
        select,
        textarea {
            width: 100%;
            border: 1px solid var(--border);
            background: var(--surface-alt);
            color: var(--text);
            border-radius: 10px;
            padding: 14px 15px;
            min-height: 48px;
            font-size: 0.98rem;
            transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
            outline: none;
        }

        .input:focus,
        select:focus,
        textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
        }

        .input[readonly] {
            background: rgba(31, 41, 55, 0.6);
            color: var(--muted);
            cursor: not-allowed;
        }

        .helper {
            color: var(--muted);
            font-size: 0.86rem;
            line-height: 1.45;
        }
        .compact-top-grid .input,
        .compact-top-grid select {
            min-height: 44px;
            padding: 12px 14px;
        }

        .compact-top-grid {
            gap: 12px;
            align-items: start;
        }

        .compact-top-grid .field {
            align-content: start;
        }

        .compact-top-grid .field label {
            min-height: 28px;
            display: flex;
            align-items: center;
        }

        #base_valor {
            border-color: rgba(16, 185, 129, 0.4);
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--success);
        }
        #base_valor:focus {
            border-color: var(--success);
            box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
        }

        .orgao-field {
            gap: 10px;
        }

        .orgao-search-field {
            margin-top: 2px;
        }

        .compact-client-grid .field .input,
        .compact-client-grid .field select {
            min-height: 44px;
            padding: 12px 14px;
        }

        .compact-client-grid .helper {
            margin-top: -2px;
        }


        .form-error {
            color: var(--danger);
            font-size: 0.84rem;
            font-weight: 600;
            min-height: 18px;
        }

        .input-invalid {
            border-color: rgba(239, 68, 68, 0.72) !important;
            box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
            background: rgba(239, 68, 68, 0.08);
        }

        .product-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 18px;
            margin-top: 18px;
        }

        .product-card {
            background: var(--surface-alt);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 20px;
            display: grid;
            gap: 16px;
            overflow: hidden;
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
        }

        .product-card[data-product="emprestimo"] {
            border-left: 3px solid var(--color-emprestimo);
        }
        .product-card[data-product="cartao"] {
            border-left: 3px solid var(--color-cartao);
        }
        .product-card[data-product="beneficio"] {
            border-left: 3px solid var(--color-beneficio);
        }

        .product-card > div:first-child {
            color: #ffffff;
            margin: -20px -20px 6px -20px;
            padding: 16px 20px;
            border-radius: 18px 18px 12px 12px;
            box-shadow: inset 0 -1px 0 rgba(255,255,255,0.10);
            text-align: center;
        }

        .product-card[data-product="emprestimo"] > div:first-child {
            background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
        }
        .product-card[data-product="cartao"] > div:first-child {
            background: linear-gradient(135deg, #064e3b 0%, #10b981 100%);
        }
        .product-card[data-product="beneficio"] > div:first-child {
            background: linear-gradient(135deg, #78350f 0%, #f59e0b 100%);
        }

        .product-card h3 {
            margin: 0;
            font-size: 1.1rem;
            color: #ffffff;
            text-align: center;
        }

        .product-card p {
            margin: 6px 0 0;
            color: var(--muted);
            font-size: 0.92rem;
            line-height: 1.5;
        }

        .product-header-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 999px;
            background: rgba(255,255,255,0.22);
            color: #fff;
            font-size: 0.72rem;
            font-weight: 700;
            margin-left: 6px;
            vertical-align: middle;
        }

        .product-card[data-product="emprestimo"] .helper[id^="policy_"] {
            border-color: rgba(59, 130, 246, 0.3) !important;
        }
        .product-card[data-product="cartao"] .helper[id^="policy_"] {
            border-color: rgba(16, 185, 129, 0.3) !important;
        }
        .product-card[data-product="beneficio"] .helper[id^="policy_"] {
            border-color: rgba(245, 158, 11, 0.3) !important;
        }

        .section-divider {
            height: 1px;
            width: 100%;
            background: linear-gradient(90deg, rgba(55, 65, 81, 0.1), rgba(55, 65, 81, 0.95), rgba(55, 65, 81, 0.1));
            margin: 4px 0;
        }

        .action-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 20px;
        }

        .btn {
            appearance: none;
            border: none;
            border-radius: 14px;
            padding: 13px 18px;
            font-size: 0.96rem;
            font-weight: 700;
            cursor: pointer;
            transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition), background var(--transition);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 48px;
        }

        .btn:hover {
            transform: translateY(-1px);
        }

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

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--primary-strong));
            color: #ffffff;
            box-shadow: 0 14px 26px rgba(37, 99, 235, 0.20);
        }

        .btn-secondary {
            background: var(--surface-alt);
            color: var(--accent);
            border: 1px solid var(--border);
        }

        .btn-success {
            background: linear-gradient(135deg, var(--success), #059669);
            color: #ffffff;
            box-shadow: 0 14px 26px rgba(16, 185, 129, 0.20);
        }

        .btn-danger {
            background: rgba(239, 68, 68, 0.15);
            color: var(--danger);
            border: 1px solid rgba(194, 59, 59, 0.22);
        }

        .btn-ghost {
            background: transparent;
            color: var(--primary);
            border: 1px dashed #b8cbe0;
        }

        .results-wrap {
            display: grid;
            gap: 18px;
        }

        .summary-bar {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 14px;
        }

        .metric-card {
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 14px 16px;
            background: var(--surface-alt);
            color: #ffffff;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
        }

        .metric-label {
            display: block;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: rgba(255,255,255,0.86);
            margin-bottom: 6px;
        }

        .metric-value {
            font-size: 1.16rem;
            font-weight: 800;
            color: #ffffff;
        }

        .metric-value.green { color: var(--success); }

        .metric-card.metric-highlight {
            border-color: rgba(16, 185, 129, 0.5);
            background: rgba(16, 185, 129, 0.08);
        }
        .metric-card.metric-highlight .metric-value {
            color: var(--success);
            font-size: 1.2rem;
        }
        .metric-card.metric-highlight .metric-label {
            color: var(--success);
        }

        .summary-bar-row-label {
            grid-column: 1 / -1;
            font-size: 0.72rem;
            color: var(--muted);
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding-top: 4px;
        }

        .result-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 18px;
        }

        .result-actions-bottom {
            margin-top: 22px;
            justify-content: flex-end;
        }

        .result-card {
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 18px;
            background: var(--surface-alt);
            color: var(--text);
            display: grid;
            gap: 12px;
            box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15);
        }

        .result-card.result-emprestimo {
            background: var(--surface-alt);
            border-color: rgba(59, 130, 246, 0.4);
        }

        .result-card.result-cartao {
            background: var(--surface-alt);
            border-color: rgba(16, 185, 129, 0.4);
        }

        .result-card.result-beneficio {
            background: var(--surface-alt);
            border-color: rgba(245, 158, 11, 0.4);
        }

        .result-card header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .result-card h4 {
            display: none;
        }

        .tag {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 240px;
            padding: 10px 22px;
            border-radius: 999px;
            font-size: 0.98rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            text-align: center;
        }

        .tag-success {
            background: #d8f0e4;
            color: #0d8a57;
            border: 1px solid #b6e1ca;
        }

        .tag-info {
            background: #dbeeff;
            color: #0f4c81;
            border: 1px solid #bedcf6;
        }

        .tag-benefit {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fcd34d;
        }

        .result-item {
            border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
            padding-bottom: 8px;
            color: var(--text);
        }

        .result-item strong,
        .result-item span,
        .result-item div,
        .result-item small,
        .result-card .helper {
            color: var(--text) !important;
        }

        .result-item span,
        .result-item strong,
        .result-item small {
            color: var(--text) !important;
        }

        .result-card .helper {
            color: var(--muted) !important;
        }

        .result-list {
            display: grid;
            gap: 10px;
        }

        .result-item {
            padding: 8px 0;
            display: flex;
            justify-content: space-between;
            gap: 16px;
            align-items: baseline;
            padding-bottom: 10px;
            border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
        }

        .result-item:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .result-item-highlight {
            background: rgba(59, 130, 246, 0.08);
            border-radius: 10px;
            padding: 10px 12px !important;
            margin-top: 4px;
            border-bottom: none !important;
        }
        .result-item-highlight span {
            font-weight: 700 !important;
        }
        .result-item-highlight strong {
            font-size: 1.1rem !important;
            font-weight: 800 !important;
        }
        .result-emprestimo .result-item-highlight {
            background: rgba(59, 130, 246, 0.10);
        }
        .result-emprestimo .result-item-highlight span,
        .result-emprestimo .result-item-highlight strong { color: #93c5fd !important; }
        .result-cartao .result-item-highlight {
            background: rgba(16, 185, 129, 0.10);
        }
        .result-cartao .result-item-highlight span,
        .result-cartao .result-item-highlight strong { color: #6ee7b7 !important; }
        .result-beneficio .result-item-highlight {
            background: rgba(245, 158, 11, 0.10);
        }
        .result-beneficio .result-item-highlight span,
        .result-beneficio .result-item-highlight strong { color: #fcd34d !important; }

        .result-card {
            animation: fadeSlideIn 0.3s ease both;
        }

        .result-item span {
            color: var(--muted) !important;
            font-size: 0.92rem;
        }

        .result-item strong {
            color: #fff !important;
            font-size: 0.95rem;
            text-align: right;
        }

        .admin-auth {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: end;
        }

        .admin-grid {
            display: grid;
            grid-template-columns: 1.05fr 0.95fr;
            gap: 18px;
            margin-top: 20px;
        }

        .subpanel {
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 18px;
            background: var(--surface-alt);
        }

        .rate-row {
            display: grid;
            grid-template-columns: 1.1fr 1fr 1fr 1fr auto;
            gap: 10px;
            align-items: end;
            padding: 12px;
            border-radius: 16px;
            border: 1px solid var(--border);
            background: var(--surface);
        }

        .rate-row + .rate-row {
            margin-top: 10px;
        }

        .table-wrap {
            overflow-x: auto;
            border: 1px solid var(--border);
            border-radius: 16px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            min-width: 720px;
            background: var(--surface);
        }

        thead {
            background: var(--surface-alt);
        }

        th, td {
            padding: 14px 14px;
            border-bottom: 1px solid var(--border);
            text-align: left;
            font-size: 0.94rem;
            vertical-align: top;
        }

        th {
            color: var(--muted);
            font-size: 0.84rem;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .chip-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chip {
            padding: 7px 10px;
            background: rgba(59, 130, 246, 0.12);
            border: 1px solid rgba(59, 130, 246, 0.25);
            color: var(--primary);
            border-radius: 999px;
            font-size: 0.82rem;
            font-weight: 700;
        }

        .empty-state {
            padding: 18px;
            border: 1px dashed var(--border-strong);
            border-radius: 16px;
            color: var(--muted);
            background: var(--surface);
            text-align: center;
        }

        .status-line {
            min-height: 20px;
            font-size: 0.88rem;
            font-weight: 700;
            margin-top: 10px;
        }

        .status-success { color: var(--success); }
        .status-warning { color: var(--warning); }
        .status-danger { color: var(--danger); }

        .toast-container {
            position: fixed;
            top: 18px;
            right: 18px;
            z-index: 2500;
            display: grid;
            gap: 10px;
            max-width: min(420px, calc(100vw - 28px));
        }

        .toast {
            border-radius: 16px;
            padding: 14px 16px;
            background: var(--surface);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            display: grid;
            gap: 4px;
            animation: slideIn 0.22s ease;
        }

        .toast strong { font-size: 0.95rem; }
        .toast p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
        .toast-success { border-left: 6px solid var(--success); }
        .toast-warning { border-left: 6px solid var(--warning); }
        .toast-error { border-left: 6px solid var(--danger); }
        .toast-info { border-left: 6px solid var(--accent); }

        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.65);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 18px;
            z-index: 2600;
        }

        .modal {
            width: min(460px, 100%);
            background: var(--surface);
            border-radius: 20px;
            box-shadow: 0 30px 50px rgba(0, 0, 0, 0.35);
            padding: 24px;
            border: 1px solid var(--border);
        }

        .modal h3 {
            margin-top: 0;
            margin-bottom: 10px;
        }

        .modal p {
            color: var(--muted);
            line-height: 1.55;
            margin: 0 0 18px;
        }

        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
        }

        .export-modal {
            width: min(760px, 100%);
        }

        .export-modal p.export-lead {
            margin-bottom: 16px;
        }

        .export-option-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            margin-bottom: 18px;
        }

        .export-option-card {
            text-align: left;
            border: 1px solid var(--border);
            border-radius: 18px;
            padding: 16px 18px;
            background: var(--surface-alt);
            color: var(--accent);
            cursor: pointer;
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
        }

        .export-option-card:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.20);
            border-color: var(--border-strong);
        }

        .export-option-card strong {
            display: block;
            font-size: 1.02rem;
            margin-bottom: 6px;
        }

        .export-option-card span {
            display: block;
            color: var(--muted);
            line-height: 1.45;
            font-size: 0.93rem;
        }

        .export-whatsapp-box {
            border: 1px dashed var(--border);
            border-radius: 18px;
            padding: 16px;
            background: var(--surface-alt);
            display: grid;
            gap: 10px;
            margin-bottom: 18px;
        }

        .export-whatsapp-title {
            color: var(--accent);
            font-weight: 700;
            margin: 0;
        }

        .export-whatsapp-subtitle {
            color: var(--muted);
            margin: 0;
            line-height: 1.5;
            font-size: 0.92rem;
        }

        .export-whatsapp-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
        }

        .export-whatsapp-row input {
            margin: 0;
        }

        .hidden {
            display: none !important;
        }

        @media (max-width: 780px) {
            .export-option-grid {
                grid-template-columns: 1fr;
            }

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

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px) scale(0.98);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @media (max-width: 1180px) {
            .product-grid,
            .result-grid,
            .summary-bar,
            .admin-grid,
            .grid-4,
            .grid-3 {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 820px) {
            .app-shell {
                width: min(100%, calc(100% - 18px));
                margin: 14px auto 28px;
            }

            .panel,
            .hero {
                padding: 18px;
                border-radius: 18px;
            }

            .product-grid,
            .result-grid,
            .summary-bar,
            .admin-grid,
            .grid-4,
            .grid-3,
            .grid-2 {
                grid-template-columns: 1fr;
            }

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

            .result-item {
                flex-direction: column;
                align-items: flex-start;
            }

            .result-item strong {
                text-align: left;
            }
        }

        .session-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            margin-bottom: 16px;
            padding: 14px 18px;
            border-radius: 18px;
            background: var(--surface);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
        }

        .session-user {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .session-user strong {
            font-size: 0.98rem;
        }

        .session-meta {
            color: var(--muted);
            font-size: 0.92rem;
        }

        .auth-shell {
            width: min(520px, calc(100% - 28px));
            margin: 40px auto;
        }

        .auth-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 24px;
            box-shadow: var(--shadow);
            padding: 28px;
        }

        .auth-card h1 {
            margin-top: 0;
            margin-bottom: 10px;
            font-size: clamp(1.5rem, 2.5vw, 2.2rem);
        }

        .auth-card p {
            color: var(--muted);
            line-height: 1.6;
        }

        .auth-brand {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 14px;
            flex-wrap: wrap;
        }

        .auth-brand img,
        .hero-brand img {
            width: 96px;
            height: 96px;
            object-fit: contain;
            border-radius: 20px;
            background: rgba(255,255,255,0.16);
            padding: 8px;
            box-shadow: 0 10px 24px rgba(17, 63, 100, 0.10);
            flex: 0 0 auto;
        }

        .auth-brand-copy {
            display: grid;
            gap: 4px;
        }

        .brand-eyebrow {
            font-size: 0.82rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--primary);
            opacity: 0.84;
        }

        .hero-brand {
            display: flex;
            align-items: center;
            gap: 18px;
            flex-wrap: wrap;
        }

        .hero-brand-copy {
            display: grid;
            gap: 6px;
        }

        .hero-brand-copy h1 {
            margin: 0;
        }

        .flash {
            padding: 12px 14px;
            border-radius: 14px;
            margin: 14px 0 6px;
            border: 1px solid transparent;
            font-size: 0.95rem;
            font-weight: 600;
        }

        .flash-error {
            color: #8c1d1d;
            background: #fff0f0;
            border-color: #f1c8c8;
        }

        .flash-success {
            color: #0d6a43;
            background: #effcf6;
            border-color: #cbeedb;
        }

        .admin-remote-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 18px;
            margin-top: 18px;
        }

        .session-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .small-helper {
            color: var(--muted);
            font-size: 0.84rem;
            line-height: 1.5;
        }

        .layout-gate-grid {
            display: grid;
            grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.6fr);
            gap: 16px;
            align-items: start;
            margin-bottom: 18px;
        }

        .product-selector {
            width: 100%;
            border: 1px solid var(--border);
            background: var(--surface-alt);
            border-radius: 16px;
            padding: 14px;
            transition: border-color var(--transition), box-shadow var(--transition), opacity var(--transition), background var(--transition);
        }

        .product-selector.disabled {
            opacity: 0.72;
            background: var(--surface);
        }

        .product-selector-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }

        .product-option {
            position: relative;
        }

        .product-option input {
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
            z-index: 2;
        }

        .product-option {
            cursor: pointer;
        }

        .product-option label {
            min-height: 64px;
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 4px;
            cursor: pointer;
            background: var(--surface);
            transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
        }

        .product-option label:hover {
            transform: translateY(-1px);
            border-color: var(--border-strong);
        }

        .product-option input:checked + label {
            border-color: var(--accent);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
            background: rgba(59, 130, 246, 0.08);
        }

        .product-option[data-line="emprestimo"] input:checked + label {
            border-color: var(--color-emprestimo);
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
            background: rgba(59, 130, 246, 0.08);
        }
        .product-option[data-line="cartao"] input:checked + label {
            border-color: var(--color-cartao);
            box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
            background: rgba(16, 185, 129, 0.08);
        }
        .product-option[data-line="beneficio"] input:checked + label {
            border-color: var(--color-beneficio);
            box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
            background: rgba(245, 158, 11, 0.08);
        }
        .product-option.future-product label {
            opacity: 0.45;
        }

        .product-option strong {
            font-size: 0.95rem;
            color: var(--text);
        }

        .product-option small {
            color: var(--muted);
            line-height: 1.35;
        }

        .layout-placeholder {
            border: 1px dashed var(--border-strong);
            border-radius: 18px;
            background: var(--surface-alt);
            padding: 16px 18px;
            color: var(--muted);
            line-height: 1.55;
            margin-bottom: 16px;
        }

        .layout-placeholder strong {
            color: var(--primary);
        }

        .inline-note {
            border-radius: 14px;
            padding: 12px 14px;
            border: 1px solid rgba(59, 130, 246, 0.25);
            background: rgba(59, 130, 246, 0.06);
            color: var(--primary);
            line-height: 1.5;
            margin-bottom: 14px;
        }

        .layout-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.12);
            color: var(--primary);
            border: 1px solid rgba(59, 130, 246, 0.25);
            padding: 8px 14px;
            font-size: 0.88rem;
            font-weight: 700;
            margin-bottom: 14px;
        }

        @media (max-width: 1180px) {
            .layout-gate-grid {
                grid-template-columns: 1fr;
            }

            .product-selector-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 720px) {
            .product-selector-grid {
                grid-template-columns: 1fr;
            }
        }
