  /* ── FILAS INTELIGENTES ── */
  .fila-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }
  .fila-tab {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-align: left;
  }
  .fila-tab:hover { border-color: var(--border-glow); }
  .fila-tab.active {
    background: linear-gradient(135deg, rgba(245,200,66,0.08), rgba(212,160,23,0.03));
    border-color: var(--border-glow);
    color: var(--c6yellow);
  }

  .fila-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
  }

  .fila-export-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .btn-export {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
  }
  .btn-export:hover { border-color: var(--c6yellow); color: var(--c6yellow); }
  .btn-export-sm { font-size: 11px; padding: 5px 10px; }

  .subfila-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 14px;
    overflow: hidden;
  }

  .subfila-header {
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all .2s;
    color: var(--text-muted);
  }
  .subfila-header:hover { border-color: var(--border-glow); }
  .subfila-header.active { border-color: var(--border-glow); }
  .subfila-header.red.active    { background: rgba(239,68,68,0.1);    border-color: rgba(239,68,68,0.15);    color: var(--red); }
  .subfila-header.orange.active { background: rgba(249,115,22,0.08);  border-color: rgba(249,115,22,0.1);    color: var(--orange); }
  .subfila-header.green.active  { background: rgba(34,197,94,0.08);   border-color: rgba(34,197,94,0.1);     color: var(--green); }
  .subfila-header.blue.active   { background: rgba(59,130,246,0.08);  border-color: rgba(59,130,246,0.1);    color: var(--blue); }
  .subfila-header.yellow.active { background: rgba(245,200,66,0.08);  border-color: rgba(245,200,66,0.15);   color: var(--c6yellow); }
  .subfila-header.purple.active { background: rgba(168,85,247,0.08);  border-color: rgba(168,85,247,0.15);   color: var(--purple); }
  .subfila-header.gray.active   { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1);   color: var(--text-muted); }

  .fila-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 780px;
  }

  .fila-progress {
    height: 3px;
    background: var(--surface2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
  }
  .fila-progress-fill { height: 100%; border-radius: 2px; }

  /* ── V2: FILAS SUPERVISOR ── */
  .filas-subtabs { display:flex;gap:4px;margin-bottom:20px;border-bottom:1px solid var(--border); }
  .filas-subtab {
    background:none;border:none;color:var(--text-muted);cursor:pointer;
    font-size:13px;font-weight:600;padding:10px 18px;border-bottom:2px solid transparent;
    transition:color .2s,border-color .2s;
  }
  .filas-subtab:hover { color:var(--text); }
  .filas-subtab.active { color:var(--c6yellow);border-bottom-color:var(--c6yellow); }

  .estrategia-bar {
    display:flex;flex-wrap:wrap;align-items:center;gap:8px;
    background:var(--surface2);border:1px solid var(--border);border-radius:10px;
    padding:12px 16px;margin-bottom:16px;
  }
  .segmented {
    display:inline-flex;gap:2px;background:var(--surface2);
    border:1px solid var(--border);border-radius:10px;padding:3px;
  }
  .segmented-btn {
    background:none;border:none;border-radius:7px;padding:6px 16px;
    font-size:13px;cursor:pointer;color:var(--text-muted);
    display:inline-flex;align-items:center;gap:6px;
    transition:background .15s,color .15s;
  }
  .segmented-btn.active { background:var(--c6yellow);color:#000;font-weight:600; }
  .estrategia-bar label { font-size:12px;color:var(--text-muted);margin-right:4px; }
  .btn-estrategia {
    background:var(--surface);border:1px solid var(--border);color:var(--text);
    border-radius:8px;padding:6px 14px;font-size:12px;font-weight:600;cursor:pointer;
    transition:border-color .2s,background .2s;white-space:nowrap;
  }
  .btn-estrategia:hover { border-color:var(--c6yellow);background:rgba(245,200,66,.07); }
  .btn-estrategia.active { border-color:var(--c6yellow);background:rgba(245,200,66,.12);color:var(--c6yellow); }

  .dinamica-toolbar {
    display:flex;align-items:center;gap:10px;flex-wrap:wrap;
    margin-bottom:12px;
  }
  .dinamica-toolbar input[type=text] {
    background:var(--surface2);border:1px solid var(--border);color:var(--text);
    border-radius:8px;padding:7px 12px;font-size:13px;min-width:220px;
  }
  .dinamica-toolbar input[type=text]:focus { outline:none;border-color:var(--c6yellow); }
  .dinamica-count { font-size:12px;color:var(--text-muted);margin-left:auto; }
  .dinamica-count strong { color:var(--c6yellow); }

  .dinamica-wrap { overflow-x:auto;border:1px solid var(--border);border-radius:10px; }
  .dinamica-table {
    width:100%;border-collapse:collapse;font-size:12px;
  }
  .dinamica-table thead th {
    background:var(--surface2);color:var(--text-muted);font-weight:600;
    padding:8px 10px;white-space:nowrap;border-bottom:1px solid var(--border);
    user-select:none;position:sticky;top:0;z-index:2;
  }
  .dinamica-table thead th.sortable { cursor:pointer; }
  .dinamica-table thead th.sortable:hover { color:var(--text); }
  .dinamica-table thead th.sort-asc::after { content:' ↑'; color:var(--c6yellow); }
  .dinamica-table thead th.sort-desc::after { content:' ↓'; color:var(--c6yellow); }
  /* — Seta/funil de filtro no header — */
  .col-filter-btn {
    display:inline-flex;align-items:center;justify-content:center;
    width:18px;height:18px;margin-left:4px;cursor:pointer;
    border-radius:4px;vertical-align:middle;opacity:.45;transition:all .15s;
    font-size:10px;color:var(--text-muted);
  }
  .col-filter-btn:hover { opacity:.8;background:rgba(255,255,255,.08); }
  .col-filter-btn.active { opacity:1;color:var(--c6yellow); }
  .excel-filter-overlay {
    position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;
  }
  .excel-filter-dd {
    position:absolute;width:270px;background:var(--surface);
    border:1px solid var(--border);border-radius:10px;
    box-shadow:0 10px 32px rgba(0,0,0,.55);z-index:1000;
    overflow:hidden;font-size:12px;
  }
  .excel-filter-dd .ef-title {
    padding:10px 12px 6px;font-size:11px;color:var(--text-muted);
  }
  .excel-filter-dd .ef-title strong { color:var(--c6yellow); }
  .excel-filter-dd .ef-search { padding:0 12px 8px; }
  .excel-filter-dd .ef-search input {
    width:100%;background:var(--surface2);border:1px solid var(--border);
    color:var(--text);border-radius:6px;padding:7px 10px;font-size:12px;box-sizing:border-box;
  }
  .excel-filter-dd .ef-search input::placeholder { color:var(--text-muted);opacity:.5; }
  .excel-filter-dd .ef-search input:focus { outline:none;border-color:var(--c6yellow); }
  .excel-filter-dd .ef-mode { padding:4px 12px 6px;display:flex;gap:6px; }
  .excel-filter-dd .ef-mode-btn {
    padding:3px 10px;border-radius:5px;font-size:10px;cursor:pointer;
    border:1px solid var(--border);background:transparent;color:var(--text-muted);transition:all .15s;
  }
  .excel-filter-dd .ef-mode-btn.active {
    background:var(--c6yellow);color:var(--bg);border-color:var(--c6yellow);font-weight:600;
  }
  .excel-filter-dd .ef-condition {
    padding:6px 12px 8px;border-bottom:1px solid var(--border);display:none;
  }
  .excel-filter-dd .ef-condition.visible { display:block; }
  .excel-filter-dd .ef-condition select,
  .excel-filter-dd .ef-condition input {
    width:100%;background:var(--surface2);border:1px solid var(--border);
    color:var(--text);border-radius:5px;padding:5px 8px;font-size:11px;
    margin-top:4px;box-sizing:border-box;
  }
  .excel-filter-dd .ef-condition select:focus,
  .excel-filter-dd .ef-condition input:focus { outline:none;border-color:var(--c6yellow); }
  .excel-filter-dd .ef-selall {
    padding:7px 12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);
    display:flex;gap:8px;align-items:center;cursor:pointer;
  }
  .excel-filter-dd .ef-selall:hover { background:rgba(255,255,255,.03); }
  .excel-filter-dd .ef-selall span { font-size:12px;color:var(--text-muted);font-style:italic; }
  .excel-filter-dd .ef-list { max-height:220px;overflow-y:auto;padding:2px 0; }
  .excel-filter-dd .ef-list::-webkit-scrollbar { width:6px; }
  .excel-filter-dd .ef-list::-webkit-scrollbar-thumb { background:var(--border);border-radius:3px; }
  .excel-filter-dd .ef-item {
    padding:4px 12px;display:flex;gap:8px;align-items:center;cursor:pointer;transition:background .1s;
  }
  .excel-filter-dd .ef-item:hover { background:rgba(245,200,66,.06); }
  .excel-filter-dd .ef-item.unchecked .ef-val { color:var(--text-muted);text-decoration:line-through; }
  .excel-filter-dd .ef-val { font-size:12px;color:var(--text);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .excel-filter-dd .ef-cnt { font-size:10px;color:var(--text-muted);opacity:.6; }
  .excel-filter-dd .ef-blank { border-top:1px solid var(--border);margin-top:2px;padding-top:6px; }
  .excel-filter-dd .ef-blank .ef-val { color:var(--text-muted);font-style:italic; }
  .excel-filter-dd .ef-footer {
    padding:8px 12px;border-top:1px solid var(--border);display:flex;gap:8px;justify-content:flex-end;
  }
  .excel-filter-dd .ef-footer button {
    border-radius:6px;padding:6px 16px;font-size:11px;cursor:pointer;transition:all .15s;
  }
  .excel-filter-dd .ef-btn-cancel { background:transparent;border:1px solid var(--border);color:var(--text-muted); }
  .excel-filter-dd .ef-btn-cancel:hover { border-color:var(--text-muted); }
  .excel-filter-dd .ef-btn-ok { background:var(--c6yellow);border:none;color:var(--bg);font-weight:700; }
  .excel-filter-dd .ef-btn-ok:hover { filter:brightness(1.1); }
  .dinamica-table tbody tr { border-bottom:1px solid var(--border);transition:background .15s; }
  .dinamica-table tbody tr:hover { background:rgba(255,255,255,.04); }
  .dinamica-table tbody tr.selected { background:rgba(245,200,66,.07); }
  .dinamica-table tbody td { padding:7px 10px;white-space:nowrap; }

  /* ── LISTAS SEMANAIS DO BANCO ── */
  .lb-importer {
    border:1px solid rgba(245,200,66,.28);
    background:linear-gradient(135deg,rgba(245,200,66,.06),transparent);
  }
  .lb-importer-header { align-items:flex-start; }
  .lb-importer-header p {
    margin:4px 0 0;color:var(--text-muted);font-size:12px;
  }
  .lb-import-main-fields {
    display:grid;grid-template-columns:minmax(180px,280px);
    gap:12px;margin-bottom:14px;
  }
  .lb-import-main-fields label {
    display:flex;flex-direction:column;gap:6px;color:var(--text-muted);font-size:12px;
  }
  .lb-import-main-fields input {
    width:100%;box-sizing:border-box;background:var(--surface2);
    border:1px solid var(--border);border-radius:8px;color:var(--text);
    padding:8px 10px;font-size:13px;
  }
  .lb-upload-zone {
    border:2px dashed var(--border);border-radius:12px;padding:30px 24px;
    text-align:center;cursor:pointer;transition:all .2s;background:var(--surface);
    position:relative;
  }
  .lb-upload-zone:hover,.lb-upload-zone.drag {
    border-color:var(--c6yellow);background:rgba(245,200,66,.04);
  }
  .lb-upload-zone.drag { border-style:solid; }
  .lb-upload-zone.has-files {
    border-color:rgba(34,197,94,.48);background:rgba(34,197,94,.04);
  }
  .lb-upload-zone input[type=file] {
    position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;
  }
  .lb-upload-zone .upload-icon { margin-bottom:8px; }
  .lb-upload-zone .upload-icon .ic {
    width:34px;height:34px;color:var(--c6yellow);
  }
  .lb-upload-zone .upload-title { font-size:16px;margin-bottom:5px; }
  .lb-import-checklist {
    display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));
    gap:8px;margin-top:12px;
  }
  .lb-import-file {
    display:flex;align-items:center;gap:9px;min-width:0;padding:10px;
    border:1px solid var(--border);border-radius:9px;background:var(--surface2);
  }
  .lb-import-file.ready { border-color:rgba(34,197,94,.38); }
  .lb-import-file-marker {
    display:grid;place-items:center;flex:0 0 22px;width:22px;height:22px;
    border-radius:50%;background:rgba(148,163,184,.12);color:var(--text-muted);
    font-size:11px;font-weight:800;
  }
  .lb-import-file.ready .lb-import-file-marker {
    background:rgba(34,197,94,.13);color:var(--green);
  }
  .lb-import-file div { min-width:0; }
  .lb-import-file strong {
    display:block;color:var(--text);font-size:11px;line-height:1.3;
  }
  .lb-import-file span:not(.lb-import-file-marker) {
    display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    color:var(--text-muted);font-size:10px;margin-top:2px;
  }
  .lb-import-options {
    margin-top:12px;border-top:1px solid var(--border);padding-top:10px;
  }
  .lb-import-options summary {
    color:var(--text-muted);font-size:12px;cursor:pointer;user-select:none;
  }
  .lb-import-options .lb-form-grid { margin-top:12px;grid-template-columns:1fr 1fr 1fr; }
  .lb-import-progress { margin-top:14px; }
  .lb-import-progress-copy {
    display:flex;justify-content:space-between;gap:12px;margin-bottom:7px;
    color:var(--text-muted);font-size:11px;
  }
  .lb-import-progress-copy strong { color:var(--text); }
  .lb-import-progress .progress-bar-wrap { display:block;margin-top:0; }
  .lb-form-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(160px,1fr));
    gap:12px;
  }
  .lb-form-grid label,.lb-observacao {
    display:flex;flex-direction:column;gap:6px;
    color:var(--text-muted);font-size:12px;
  }
  .lb-form-grid input[type=date],.lb-form-grid input[type=text],.lb-observacao input {
    width:100%;box-sizing:border-box;background:var(--surface2);
    border:1px solid var(--border);border-radius:8px;color:var(--text);
    padding:8px 10px;font-size:13px;
  }
  .lb-checkbox { justify-content:flex-end;flex-direction:row!important;align-items:center; }
  .lb-observacao { margin-top:12px; }
  .lb-actions { display:flex;justify-content:flex-end;gap:8px;margin-top:14px;flex-wrap:wrap; }
  .lb-current-header { align-items:flex-start; }
  .lb-lote-title { color:var(--text);font-size:14px;font-weight:600;margin-top:4px; }
  .lb-status {
    display:inline-flex;border:1px solid var(--border);border-radius:999px;
    padding:4px 10px;font-size:11px;font-weight:700;text-transform:uppercase;
    letter-spacing:.4px;color:var(--text-muted);
  }
  .lb-status.ready { color:var(--green);border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.08); }
  .lb-status.warn { color:var(--orange);border-color:rgba(249,115,22,.35);background:rgba(249,115,22,.08); }
  .lb-status.sent { color:var(--purple);border-color:rgba(168,85,247,.35);background:rgba(168,85,247,.08); }
  .lb-empty { padding:34px;text-align:center;color:var(--text-muted);font-size:13px; }
  .lb-kpis {
    display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));
    gap:10px;margin-bottom:16px;
  }
  .lb-kpi {
    background:var(--surface2);border:1px solid var(--border);
    border-radius:10px;padding:11px 13px;
  }
  .lb-kpi strong { display:block;color:var(--text);font-size:20px;line-height:1.1; }
  .lb-kpi span { color:var(--text-muted);font-size:11px; }
  .lb-received-files {
    display:flex;align-items:center;justify-content:space-between;gap:14px;
    margin-bottom:14px;padding:11px 13px;border:1px solid var(--border);
    border-radius:10px;background:var(--surface2);
  }
  .lb-received-files div { min-width:0; }
  .lb-received-files strong { display:block;color:var(--text);font-size:12px; }
  .lb-received-files span {
    display:block;color:var(--text-muted);font-size:10px;line-height:1.45;margin-top:3px;
  }
  .lb-queue-handoff {
    display:flex;align-items:center;justify-content:space-between;gap:16px;
    padding:14px;border:1px solid rgba(34,197,94,.32);border-radius:10px;
    background:rgba(34,197,94,.06);
  }
  .lb-queue-handoff div { min-width:0; }
  .lb-queue-handoff strong { display:block;color:var(--text);font-size:13px; }
  .lb-queue-handoff span {
    display:block;color:var(--text-muted);font-size:11px;line-height:1.45;margin-top:3px;
  }
  .lb-alerts { display:flex;flex-direction:column;gap:7px;margin:12px 0; }
  .lb-alert {
    border-left:3px solid var(--orange);background:rgba(249,115,22,.07);
    color:var(--text-muted);padding:8px 10px;border-radius:0 7px 7px 0;font-size:12px;
  }
  .lb-preview-grid {
    display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px;
  }
  .lb-preview-grid .table-card,.lb-table-wrap { overflow-x:auto; }
  .lb-preview-grid h3,.lb-table-wrap h3,#lb-preview>.table-card h3 {
    margin:0;padding:12px 14px 6px;color:var(--text);font-size:13px;
  }
  .lb-table-wrap { width:100%; }
  .lb-opportunity-header { align-items:flex-start; }
  .lb-opportunity-header p,.lb-modal-header p {
    margin:4px 0 0;color:var(--text-muted);font-size:12px;
  }
  .lb-safe-mode {
    display:inline-flex;align-items:center;border-radius:999px;
    border:1px solid rgba(249,115,22,.35);background:rgba(249,115,22,.08);
    color:var(--orange);font-size:11px;font-weight:700;padding:5px 10px;
  }
  .lb-safe-mode.live {
    border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.08);
    color:var(--green);
  }
  .lb-opportunity-toolbar {
    display:grid;grid-template-columns:150px minmax(190px,1fr) minmax(180px,1fr) minmax(220px,1.2fr);
    gap:10px;padding:14px;border-bottom:1px solid var(--border);
  }
  .lb-opportunity-toolbar label,.lb-modal-field {
    display:flex;flex-direction:column;gap:6px;color:var(--text-muted);font-size:11px;
  }
  .lb-opportunity-toolbar select,.lb-opportunity-toolbar input,
  .lb-modal-field input,.lb-modal-field textarea {
    width:100%;box-sizing:border-box;background:var(--surface2);
    border:1px solid var(--border);border-radius:8px;color:var(--text);
    padding:8px 10px;font-size:12px;
  }
  .lb-modal-field textarea { resize:vertical;min-height:74px; }
  .lb-selection-bar {
    display:flex;align-items:center;gap:14px;padding:10px 14px;
    background:rgba(245,200,66,.04);border-bottom:1px solid var(--border);
  }
  .lb-selection-toggle {
    display:flex;align-items:center;gap:7px;color:var(--text);font-size:12px;
  }
  #lb-selection-count { color:var(--text-muted);font-size:12px;margin-left:auto; }
  .lb-opportunities-table th:first-child,
  .lb-opportunities-table td:first-child { width:38px;text-align:center; }
  .lb-opportunities-table tr.lb-row-disabled { opacity:.55; }
  .lb-modal {
    position:fixed;inset:0;z-index:100020;align-items:center;justify-content:center;
    padding:18px;background:rgba(0,0,0,.68);backdrop-filter:blur(8px);
  }
  .lb-modal-card {
    width:min(680px,96vw);max-height:90vh;overflow-y:auto;
    background:var(--surface);border:1px solid var(--border);border-radius:14px;
    box-shadow:0 24px 70px rgba(0,0,0,.45);padding:20px;
  }
  .lb-modal-header {
    display:flex;justify-content:space-between;align-items:flex-start;gap:16px;
    margin-bottom:18px;
  }
  .lb-modal-close {
    width:32px;height:32px;border-radius:8px;border:1px solid var(--border);
    background:var(--surface2);color:var(--text);font-size:20px;cursor:pointer;
  }
  .lb-modal-grid { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0; }
  .lb-send-preview {
    margin-top:16px;padding-top:16px;border-top:1px solid var(--border);
  }
  #lb-send-operators {
    color:var(--text-muted);font-size:12px;line-height:1.6;
    background:var(--surface2);border-radius:9px;padding:10px 12px;
  }

  @media (max-width:1100px) {
    .lb-form-grid { grid-template-columns:repeat(2,minmax(160px,1fr)); }
    .lb-import-checklist { grid-template-columns:repeat(3,minmax(140px,1fr)); }
    .lb-opportunity-toolbar { grid-template-columns:1fr 1fr; }
  }
  @media (max-width:700px) {
    .lb-form-grid,.lb-import-main-fields,.lb-import-options .lb-form-grid,
    .lb-import-checklist,.lb-preview-grid,
    .lb-opportunity-toolbar,.lb-modal-grid { grid-template-columns:1fr; }
    .lb-selection-bar { align-items:flex-start;flex-direction:column; }
    .lb-received-files { align-items:flex-start;flex-direction:column; }
    .lb-queue-handoff { align-items:flex-start;flex-direction:column; }
    #lb-selection-count { margin-left:0; }
  }
  .dinamica-table tbody td.td-nome { max-width:180px;overflow:hidden;text-overflow:ellipsis; }
  .dinamica-table tbody td.td-bank-actions {
    min-width:220px;max-width:320px;white-space:normal;line-height:1.35;
  }
  .dinamica-bank-actions {
    color:var(--text);font-size:11px;font-weight:600;
  }
  .col-accent-potential { --col-accent-rgb:168,85,247; --col-accent-color:var(--purple); }
  .col-accent-limit { --col-accent-rgb:245,200,66; --col-accent-color:var(--c6yellow); }
  .col-accent-debit { --col-accent-rgb:59,130,246; --col-accent-color:var(--blue); }
  .col-accent-credit { --col-accent-rgb:34,197,94; --col-accent-color:var(--green); }
  .col-accent-wallet { --col-accent-rgb:20,184,166; --col-accent-color:#2dd4bf; }
  .col-accent-used-limit { --col-accent-rgb:249,115,22; --col-accent-color:var(--orange); }
  .dinamica-table thead th.col-accent {
    color:var(--col-accent-color);
    background:linear-gradient(
      180deg,
      rgba(var(--col-accent-rgb),.18),
      rgba(var(--col-accent-rgb),.07)
    );
    box-shadow:inset 0 -2px 0 rgba(var(--col-accent-rgb),.62);
  }
  .dinamica-table thead th.col-accent.sortable:hover {
    color:var(--col-accent-color);filter:brightness(1.16);
  }
  .dinamica-table tbody td.col-accent {
    color:var(--col-accent-color);font-weight:600;
    font-variant-numeric:tabular-nums;
    background:rgba(var(--col-accent-rgb),.055);
    border-left:1px solid rgba(var(--col-accent-rgb),.12);
    border-right:1px solid rgba(var(--col-accent-rgb),.12);
  }
  .dinamica-table tbody tr:hover td.col-accent {
    background:rgba(var(--col-accent-rgb),.105);
  }
  .dinamica-table tbody tr.selected td.col-accent {
    background:rgba(var(--col-accent-rgb),.14);
  }
  .dinamica-table tbody td.col-accent-wallet .tag-sim {
    color:var(--col-accent-color);
  }
  html.light .col-accent-wallet { --col-accent-color:#0f766e; }
  html.light .dinamica-table thead th.col-accent {
    background:linear-gradient(
      180deg,
      rgba(var(--col-accent-rgb),.14),
      rgba(var(--col-accent-rgb),.055)
    );
  }
  html.light .dinamica-table tbody td.col-accent {
    background:rgba(var(--col-accent-rgb),.045);
  }
  html.light .dinamica-table tbody tr:hover td.col-accent {
    background:rgba(var(--col-accent-rgb),.09);
  }

  /* — Colunas fixas: sel / CNPJ / Nome —
     Larguras casadas com ESSA ordem de colunas, entao valem so na tabela das
     filas dinamicas (.sticky-cols). O consolidado reusa .dinamica-table mas tem
     o nome do operador na coluna 1 — sem o escopo, o nome era espremido em 40px. */
  .dinamica-table.sticky-cols th:nth-child(-n+3),
  .dinamica-table.sticky-cols td:nth-child(-n+3) {
    position:sticky;
    z-index:1;
    background:var(--bg);
  }
  .dinamica-table.sticky-cols th:nth-child(1), .dinamica-table.sticky-cols td:nth-child(1) { left:0;    width:40px;  min-width:40px;  max-width:40px;  overflow:hidden; }
  .dinamica-table.sticky-cols th:nth-child(2), .dinamica-table.sticky-cols td:nth-child(2) { left:40px; width:130px; min-width:130px; max-width:130px; overflow:hidden;text-overflow:ellipsis; }
  .dinamica-table.sticky-cols th:nth-child(3), .dinamica-table.sticky-cols td:nth-child(3) { left:170px;width:190px; min-width:190px; max-width:190px; overflow:hidden;text-overflow:ellipsis; }
  .dinamica-table.sticky-cols th:nth-child(-n+3) { z-index:3;background:var(--surface2); }
  .dinamica-table.sticky-cols tbody tr:hover td:nth-child(-n+3) { background:color-mix(in srgb, var(--bg) 100%, white 4%); }
  .dinamica-table.sticky-cols tbody tr.selected td:nth-child(-n+3) { background:color-mix(in srgb, var(--bg) 100%, #f5c842 7%); }

  /* — Balde: colunas fixas seta/CNPJ/M/Nome — */
  .balde-table > thead > tr > th:nth-child(-n+4),
  .balde-table > tbody > tr > td:nth-child(-n+4) { position:sticky;z-index:1;background:var(--bg); }
  .balde-table > thead > tr > th:nth-child(1), .balde-table > tbody > tr > td:nth-child(1) { left:0;    width:34px;  min-width:34px;  max-width:34px; }
  .balde-table > thead > tr > th:nth-child(2), .balde-table > tbody > tr > td:nth-child(2) { left:34px; width:130px; min-width:130px; }
  .balde-table > thead > tr > th:nth-child(3), .balde-table > tbody > tr > td:nth-child(3) { left:164px;width:56px;  min-width:56px; }
  .balde-table > thead > tr > th:nth-child(4), .balde-table > tbody > tr > td:nth-child(4) { left:220px;width:200px; min-width:200px; max-width:200px; }
  .balde-table > thead > tr > th { position:sticky;top:0;z-index:2; }
  .balde-table > thead > tr > th:nth-child(-n+4) { z-index:4;background:var(--surface2); }
  .balde-table > tbody > tr:hover > td:nth-child(-n+4) { background:color-mix(in srgb, var(--bg) 100%, white 4%); }
  .balde-table > tbody > tr:hover { background:rgba(255,255,255,.03); }
  .tag-sim { color:var(--green);font-weight:700; }
  .tag-nao { color:var(--text-muted); }
  .tag-pct { font-weight:700; }
  .tag-pct.alta { color:var(--green); }
  .tag-pct.media { color:var(--c6yellow); }
  .tag-pct.baixa { color:var(--text-muted); }

  .envio-actions {
    display:flex;align-items:center;gap:10px;flex-wrap:wrap;
    background:rgba(245,200,66,.07);border:1px solid rgba(245,200,66,.2);
    border-radius:10px;padding:12px 16px;margin-bottom:14px;
  }
  .envio-actions .sel-count { font-size:13px;color:var(--c6yellow);font-weight:700; }
  .envio-actions input[type=text] {
    background:var(--surface2);border:1px solid var(--border);color:var(--text);
    border-radius:8px;padding:7px 14px;font-size:13px;flex:1;min-width:200px;
  }
  .envio-actions input[type=text]:focus { outline:none;border-color:var(--c6yellow); }
  .btn-enviar {
    background:var(--c6yellow);color:#000;font-weight:700;border:none;
    border-radius:8px;padding:8px 20px;font-size:13px;cursor:pointer;white-space:nowrap;
  }
  .btn-enviar:hover { opacity:.9; }
  .btn-enviar:disabled { opacity:.4;cursor:default; }

  /* Tabela de histórico de envios */
  .envios-table { width:100%;border-collapse:collapse;font-size:13px; }
  .envios-table th { background:var(--surface2);color:var(--text-muted);padding:10px 14px;text-align:left;font-weight:600; }
  .envios-table td { padding:10px 14px;border-bottom:1px solid var(--border); }
  .envios-table tr:hover td { background:rgba(255,255,255,.03); }
  .tag-tipo {
    font-size:11px;font-weight:700;border-radius:20px;padding:2px 10px;
    background:var(--surface2);color:var(--text-muted);
  }
  .tag-tipo.predefinida { background:rgba(59,130,246,.15);color:var(--blue); }
  .tag-tipo.personalizada { background:rgba(168,85,247,.15);color:var(--purple); }

  /* ── V2: OPERADOR VIEW ── */
  #operador-view {
    max-width:960px;margin:0 auto;padding:24px 16px;
  }
  #operador-view.balde-wide {
    max-width: min(1240px, 100%);
  }
  #operador-tab-balde {
    min-width: 0;
  }
  #operador-tab-balde #balde-lista:not(:empty) {
    max-width: 100%;
    max-height: calc(100vh - 250px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  #operador-tab-balde #balde-lista > table {
    width: max-content !important;
    min-width: 100% !important;
  }
  #operador-tab-balde #balde-lista thead th {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .operador-header {
    margin-bottom: 24px;
  }
  .operador-header h2 {
    font-size: 22px; font-weight: 800; margin-bottom: 4px; color: var(--text);
  }
  .operador-header p { color: var(--text-muted); font-size: 12px; }
  .op-summary-chip {
    background: var(--surface2); border: 1px solid var(--border); border-radius: 20px;
    padding: 4px 12px; font-size: 12px; color: var(--text-muted);
  }
  .op-summary-chip strong { color: var(--text); font-weight: 700; margin-right: 3px; }
  .op-summary-chip.ok { border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.08); }
  .op-summary-chip.ok strong { color: var(--green); }
  .op-summary-chip.warn { border-color: rgba(245,200,66,.3); background: rgba(245,200,66,.08); }
  .op-summary-chip.warn strong { color: var(--c6yellow); }

  .bloco-estrategia {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
  }
  .bloco-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .bloco-header:hover { background: rgba(255,255,255,0.04); }
  .bloco-nome { font-weight:700;font-size:14px;flex:1; }
  .bloco-badge {
    font-size: 11px; font-weight: 700;
    border-radius: var(--radius-xs);
    padding: 3px 10px; white-space: nowrap;
  }
  .bloco-badge.pendente { background:rgba(245,200,66,.15);color:var(--c6yellow); }
  .bloco-badge.completo { background:rgba(34,197,94,.15);color:var(--green); }
  .bloco-toggle { font-size:18px;color:var(--text-muted);transition:transform .2s; }
  .bloco-toggle.open { transform:rotate(180deg); }

  .bloco-body { padding:0; }
  .bloco-conta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; row-gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
  }
  .bloco-conta:last-child { border-bottom: none; }
  .bloco-conta:hover { background: rgba(255,255,255,0.03); }
  .bloco-conta.tratado { opacity:.5; }
  .bloco-conta.tratado .conta-nome { text-decoration:line-through; }
  .conta-info { flex:1;min-width:0; }
  .conta-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;margin-left:auto; }
  .conta-nome { font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .conta-sub { font-size:11px;color:var(--text-muted);margin-top:2px; }
  .conta-tags { display:flex;gap:6px;flex-wrap:wrap;margin-top:4px; }
  .conta-tag {
    font-size:10px;font-weight:700;border-radius:20px;padding:2px 8px;
    background:var(--surface2);color:var(--text-muted);
  }
  .btn-flag {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer;
  }
  .btn-flag:disabled { opacity: .35; cursor: not-allowed; }
  .btn-flag.on     { background: rgba(249,115,22,.15); border-color: var(--orange); color: var(--orange); }
  .btn-flag.on-red { background: rgba(239,68,68,.15);  border-color: var(--red);    color: var(--red); }

  .btn-tratar {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-xs);
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
  }
  .btn-tratar:hover { border-color: var(--green); color: var(--green); }
  .btn-tratar.tratado {
    border-color: var(--green); color: var(--green);
    background: rgba(34,197,94,0.1);
  }
  .btn-tratar.tipo-efetivo {
    border-color: var(--green); color: var(--green);
    background: rgba(34,197,94,0.1);
  }
  .btn-tratar.tipo-whatsapp {
    border-color: var(--blue); color: var(--blue);
    background: rgba(59,130,246,0.1);
  }
  .btn-tratar.tipo-sem-contato {
    border-color: var(--orange); color: var(--orange);
    background: rgba(249,115,22,0.1);
  }

  .operador-tabs {
    display: flex; gap: 6px; margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .operador-tab {
    padding: 7px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px; font-weight: 600;
    transition: all .2s;
  }
  .operador-tab:hover { border-color: var(--border-glow); color: var(--text); }
  .operador-tab.active {
    background: rgba(245,200,66,0.08);
    border-color: var(--border-glow);
    color: var(--c6yellow);
  }

  .historico-item {
    display:flex;align-items:center;gap:14px;padding:10px 0;
    border-bottom:1px solid var(--border);
  }
  .historico-data-header {
    display:flex;align-items:center;gap:10px;margin-bottom:8px;
  }
  .historico-data-header > span:first-child {
    font-size:13px;font-weight:700;color:var(--text);
  }
  .historico-data-count {
    font-size:11px;color:var(--text-muted);
    background:var(--surface2);border:1px solid var(--border);
    border-radius:20px;padding:2px 10px;
  }
  .historico-data { font-size:11px;color:var(--text-muted);min-width:80px; }
  .historico-estrategia { font-size:11px;color:var(--blue);font-weight:600; }
  .historico-estrategia-pill {
    display:inline-block;font-size:11px;font-weight:600;
    background:rgba(59,130,246,.15);color:var(--blue);
    border-radius:20px;padding:2px 10px;
  }
  .historico-nome { font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .historico-obs {
    font-size:11px;color:var(--text-muted);font-style:italic;
    border-left:2px solid var(--border);padding-left:8px;margin-top:4px;
  }

  /* Detalhe do envio (expansível) */
  .envio-detalhe-row td { padding:0 !important; }
  .envio-detalhe-panel {
    padding:16px 20px;background:var(--surface2);border-top:1px solid var(--border);
  }
  .envio-detalhe-header {
    display:flex;align-items:center;gap:24px;flex-wrap:wrap;
    margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid var(--border);
  }
  .envio-kpi { text-align:center; }
  .envio-kpi-val { font-size:22px;font-weight:800;color:var(--c6yellow); }
  .envio-kpi-lbl { font-size:11px;color:var(--text-muted);margin-top:2px; }
  .envio-pct-circle {
    width:64px;height:64px;border-radius:50%;display:flex;align-items:center;
    justify-content:center;font-size:15px;font-weight:800;
    background:conic-gradient(var(--green) var(--pct,0%), var(--surface) 0%);
    position:relative;
  }
  .envio-pct-circle::before {
    content:'';position:absolute;inset:6px;border-radius:50%;background:var(--surface2);
  }
  .envio-pct-circle span { position:relative;z-index:1; }

  .op-progress-row {
    display:flex;align-items:center;gap:12px;padding:8px 0;
    border-bottom:1px solid rgba(255,255,255,.04);
  }
  .op-progress-row:last-child { border-bottom:none; }
  .op-nome { min-width:140px;font-size:13px;font-weight:600; }
  .op-counts { font-size:12px;color:var(--text-muted);min-width:90px;text-align:right; }
  .op-bar-wrap { flex:1;height:8px;background:var(--surface);border-radius:4px;overflow:hidden; }
  .op-bar-fill { height:100%;border-radius:4px;background:var(--green);transition:width .4s ease; }
  .op-pct { font-size:13px;font-weight:700;min-width:44px;text-align:right; }
  .op-pct.alta  { color:var(--green); }
  .op-pct.media { color:var(--c6yellow); }
  .op-pct.baixa { color:var(--text-muted); }

  /* Tratativas supervisor */
  .tratativas-table { width:100%;border-collapse:collapse;font-size:13px; }
  .tratativas-table th { background:var(--surface2);color:var(--text-muted);padding:10px 14px;text-align:left;font-weight:600; }
  .tratativas-table td { padding:10px 14px;border-bottom:1px solid var(--border); }
  .tratativas-table tr:hover td { background:rgba(128,128,128,.06); }

  /* ── Modal glassmorphism — light mode override ── */
  html.light #modal-envio,
  html.light #modal-faixa,
  html.light #modal-colunas,
  html.light #modal-obs,
  html.light #modal-ficha,
  html.light #modal-meus-agendamentos,
  html.light #modal-agenda,
  html.light #modal-bulk-tel,
  html.light #modal-calendario,
  html.light .dialog-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(0,0,0,0.4) !important;
  }

  /* ── Modal inputs rounded ── */
  [id^="modal-"] input[type="text"],
  [id^="modal-"] input[type="date"],
  [id^="modal-"] input[type="time"],
  [id^="modal-"] input[type="password"],
  [id^="modal-"] textarea,
  [id^="modal-"] select {
    border-radius: var(--radius-xs) !important;
  }

  /* === Acompanhamento Consolidado === */
  .ac-linha-dia {
    cursor: pointer;
    background: var(--surface2);
    font-weight: 600;
    border-top: 1px solid var(--border);
  }
  .ac-linha-dia:hover { background: rgba(245,200,66,0.05); }
  .ac-linha-dia td { padding: 10px 10px !important; }

  .ac-linha-operador { cursor: pointer; }
  .ac-linha-operador:hover { background: rgba(245,200,66,0.04); }
  .ac-linha-operador td.ac-indent {
    padding-left: 28px !important;
    color: var(--text);
  }

  .ac-chevron {
    display: inline-block;
    width: 14px;
    font-size: 10px;
    color: var(--text-muted);
    margin-right: 6px;
  }

  .ac-pct-bar {
    position: relative;
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    height: 18px;
    min-width: 70px;
    overflow: hidden;
  }
  .ac-pct-fill {
    background: var(--c6yellow);
    height: 100%;
    opacity: 0.85;
  }
  .ac-pct-seg {
    height: 100%;
    flex: 0 0 auto;
    min-width: 0;
  }
  .ac-pct-seg.efetivo { background: var(--green); }
  .ac-pct-seg.whatsapp { background: var(--blue); }
  .ac-pct-seg.sem-contato { background: var(--orange); }
  .ac-pct-seg.pendente { background: rgba(136,136,136,.28); }
  .ac-pct-bar span {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    color: var(--text);
    font-weight: 600;
    text-shadow: 0 0 2px var(--surface);
  }
