    :root {
      --bg-dark: #111318;
      --bg-panel: #171a21;
      --bg-card: #1e222b;
      --border: #2c3240;
      --green: #22c55e;
      --green-hover: #4ade80;
      --green-soft: #f0fdf4;
      --navy-doc: #0a111f;
      --text: #e8eaed;
      --muted: #9aa0a6;
      --amber: #f59e0b;
      --blue: #8ab4f8;
      --purple: #c58af9;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Inter', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
      background: var(--bg-dark);
      color: var(--text);
      display: flex;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
    }

    h1, h2, h3, .kpi-card .val, .mod-header h2 {
      font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
      letter-spacing: -0.015em;
    }

    /* ================= BARRA DE NAVEGAÇÃO PRINCIPAL (APP SHELL) ================= */
    .app-nav {
      width: 260px;
      background: var(--bg-panel);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 20px 14px;
      height: 100vh;
      position: sticky;
      top: 0;
      flex-shrink: 0;
      transition: width 0.2s ease, padding 0.2s ease, opacity 0.15s ease;
      overflow: hidden;
    }

    body.sidebar-collapsed .app-nav {
      width: 0;
      padding: 0;
      border-right: none;
      opacity: 0;
      pointer-events: none;
    }

    .sidebar-open-fab {
      display: none;
      position: fixed;
      top: 16px;
      left: 16px;
      z-index: 100;
      background: var(--bg-card);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 12px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
      align-items: center;
      gap: 6px;
    }

    .sidebar-open-fab:hover {
      border-color: var(--green);
      color: var(--green-hover);
    }

    body.sidebar-collapsed .sidebar-open-fab {
      display: inline-flex;
    }

    body.sidebar-collapsed .module-view {
      padding-left: 56px;
    }

    .brand-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 16px;
    }

    .app-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 4px 6px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.15s;
      flex: 1;
      min-width: 0;
    }

    .app-brand:hover {
      background: rgba(255, 255, 255, 0.05);
    }

    .sidebar-close-btn {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--muted);
      border-radius: 6px;
      width: 28px;
      height: 28px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      flex-shrink: 0;
    }

    .sidebar-close-btn:hover {
      color: #fff;
      border-color: #64748b;
    }

    .app-brand img {
      width: 40px;
      height: 40px;
      object-fit: contain;
    }

    .app-brand h1 {
      font-size: 17px;
      font-weight: 800;
      letter-spacing: 0.02em;
    }

    .app-brand span {
      display: block;
      font-size: 11px;
      color: var(--green);
      font-weight: 600;
    }

    .nav-menu {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .nav-btn {
      width: 100%;
      background: transparent;
      color: var(--muted);
      border: 1px solid transparent;
      padding: 10px 12px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: all 0.15s;
    }

    .nav-ico {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      flex-shrink: 0;
      font-size: 15px;
    }

    .nav-btn:hover {
      background: rgba(255, 255, 255, 0.04);
      color: #fff;
    }

    .nav-btn.active {
      background: rgba(34, 197, 94, 0.14);
      color: var(--green-hover);
      border-color: rgba(34, 197, 94, 0.35);
      font-weight: 700;
    }

    .nav-section-lbl {
      font-size: 10.5px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #64748b;
      padding: 14px 10px 6px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .nav-section-lbl.app-lbl {
      color: var(--green-hover);
      padding-top: 2px;
    }

    .notion-tag {
      font-size: 9px;
      background: rgba(255, 255, 255, 0.08);
      color: #cbd5e1;
      padding: 2px 6px;
      border-radius: 4px;
      letter-spacing: 0.04em;
    }

    .notion-nav-box {
      background: rgba(15, 23, 42, 0.55);
      border: 1px solid rgba(51, 65, 85, 0.8);
      border-radius: 10px;
      padding: 6px;
      margin-top: 4px;
    }

    .ext-link {
      color: var(--muted);
      text-decoration: none;
      font-size: 12.5px;
      padding: 7px 10px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all 0.15s;
    }

    .ext-link:hover {
      background: rgba(255, 255, 255, 0.07);
      color: #fff;
    }

    .sync-footer {
      border-top: 1px solid var(--border);
      padding-top: 12px;
      font-size: 11px;
      color: #64748b;
      line-height: 1.45;
    }

    .sync-footer strong {
      color: var(--muted);
      display: block;
    }

    /* ================= CONTEÚDO PRINCIPAL DOS MÓDULOS ================= */
    .app-main {
      flex: 1;
      min-width: 0;
      overflow-y: auto;
    }

    .module-view {
      display: none;
      padding: 24px 28px;
      max-width: 1560px;
      margin: 0 auto;
    }

    #view-kanban {
      max-width: none;
      padding: 20px 22px;
    }

    .module-view.active {
      display: block;
    }

    .mod-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 14px;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .mod-header h2 {
      font-size: 22px;
      font-weight: 800;
    }

    .mod-header p {
      font-size: 13px;
      color: var(--muted);
      margin-top: 2px;
    }

    /* ================= MÓDULO 1: DASHBOARD GERAL ================= */
    .top-launchers {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
      margin-bottom: 22px;
    }

    .launcher-panel {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
    }

    .launcher-panel.app-highlight {
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.95));
      border-color: rgba(34, 197, 94, 0.4);
    }

    .launcher-title {
      font-size: 11.5px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 800;
      color: var(--muted);
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .launcher-panel.app-highlight .launcher-title {
      color: var(--green-hover);
    }

    .app-mod-cards {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 10px;
    }

    @media (max-width: 1200px) {
      .app-mod-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (max-width: 720px) {
      .app-mod-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .app-mod-btn {
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid rgba(34, 197, 94, 0.3);
      border-radius: 10px;
      padding: 14px;
      text-align: left;
      color: #fff;
      cursor: pointer;
      transition: all 0.15s;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .app-mod-btn:hover {
      background: rgba(34, 197, 94, 0.18);
      border-color: var(--green);
      transform: translateY(-2px);
    }

    .app-mod-btn .m-title {
      font-size: 14px;
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .app-mod-btn .m-desc {
      font-size: 11.5px;
      color: var(--muted);
      line-height: 1.35;
    }

    .notion-top-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
      gap: 8px;
    }

    .notion-top-btn {
      background: #0f172a;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
      color: #e2e8f0;
      text-decoration: none;
      font-size: 12.5px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all 0.15s;
    }

    .notion-top-btn:hover {
      background: #1e293b;
      border-color: #64748b;
      color: #fff;
      transform: translateY(-1px);
    }

    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
      gap: 14px;
      margin-bottom: 24px;
    }

    .kpi-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
      cursor: pointer;
      transition: all 0.15s ease;
      position: relative;
    }

    .kpi-card:hover {
      border-color: #64748b;
      transform: translateY(-2px);
    }

    .kpi-card.kpi-active {
      border-color: var(--green);
      background: rgba(34, 197, 94, 0.1);
      box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
    }

    .kpi-card .lbl {
      font-size: 11.5px;
      color: var(--muted);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .kpi-card .val {
      font-size: 28px;
      font-weight: 800;
      margin-top: 6px;
      color: #fff;
    }

    .kpi-card .sub {
      font-size: 11.5px;
      color: var(--green-hover);
      margin-top: 4px;
    }

    .filter-clear-btn {
      background: rgba(34, 197, 94, 0.16);
      color: var(--green-hover);
      border: 1px solid rgba(34, 197, 94, 0.35);
      padding: 5px 12px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
    }

    .filter-clear-btn:hover {
      background: var(--green);
      color: #052e16;
    }

    th.sortable-th {
      cursor: pointer;
      user-select: none;
      transition: color 0.15s;
    }

    th.sortable-th:hover {
      color: #fff;
    }

    th.sortable-th.sort-active {
      color: var(--green-hover);
    }

    @media (max-width: 980px) {
      .top-launchers {
        grid-template-columns: 1fr;
      }
    }

    .dash-section-title {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .os-table-wrap {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      margin-bottom: 26px;
    }

    table.dash-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    table.dash-table th {
      background: #0f172a;
      color: var(--muted);
      text-align: left;
      padding: 11px 14px;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border-bottom: 1px solid var(--border);
    }

    table.dash-table td {
      padding: 11px 14px;
      border-bottom: 1px solid rgba(51, 65, 85, 0.6);
      vertical-align: middle;
    }

    table.dash-table tr:hover td {
      background: rgba(255, 255, 255, 0.02);
    }

    .status-pill {
      display: inline-block;
      padding: 3px 9px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
    }

    .st-bancada { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
    .st-fila { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
    .st-retirada { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
    .st-aguardando { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
    .st-posvenda { background: rgba(34, 197, 94, 0.16); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35); }

    .action-btns {
      display: flex;
      gap: 6px;
      justify-content: flex-end;
    }

    .btn-sm {
      padding: 6px 10px;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 700;
      border: 1px solid transparent;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      transition: all 0.15s;
      white-space: nowrap;
    }

    .btn-sm-pdf {
      background: #334155;
      color: #f8fafc;
    }
    .btn-sm-pdf:hover { background: #475569; }

    .btn-sm-wa {
      background: rgba(34, 197, 94, 0.18);
      color: #4ade80;
      border-color: rgba(34, 197, 94, 0.35);
    }
    .btn-sm-wa:hover {
      background: var(--green);
      color: #052e16;
    }

    .btn-sm-done {
      background: rgba(59, 130, 246, 0.18);
      color: #60a5fa;
      border-color: rgba(59, 130, 246, 0.35);
    }
    .btn-sm-done:hover {
      background: #3b82f6;
      color: #fff;
    }

    .inline-status-select {
      background: #0f172a;
      color: #f8fafc;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 5px 8px;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
    }

    .inline-price-wrap {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: #0f172a;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 3px 8px;
      font-size: 12px;
      color: var(--muted);
    }

    .inline-price-input {
      width: 66px;
      background: transparent;
      border: none;
      color: #fff;
      font-weight: 700;
      font-size: 12.5px;
      outline: none;
    }

    /* ================= MÓDULO 2: GERADOR DE DOCUMENTOS PDF ================= */
    .doc-workspace {
      display: flex;
      gap: 24px;
      align-items: flex-start;
    }

    .doc-controls {
      width: 340px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 18px;
      flex-shrink: 0;
    }

    .control-group {
      margin-bottom: 14px;
    }

    .control-group label {
      display: block;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--muted);
      margin-bottom: 5px;
      font-weight: 700;
    }

    .control-group select,
    .control-group input {
      width: 100%;
      padding: 8px 10px;
      border-radius: 6px;
      border: 1px solid #475569;
      background: #0f172a;
      color: #f8fafc;
      font-size: 12.5px;
      font-family: inherit;
    }

    .row-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .btn {
      width: 100%;
      padding: 10px 14px;
      border: none;
      border-radius: 8px;
      font-weight: 700;
      font-size: 13px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.15s;
    }

    .btn-primary {
      background: var(--green);
      color: #052e16;
      margin-bottom: 12px;
      padding: 12px;
      font-size: 14px;
    }
    .btn-primary:hover { background: var(--green-hover); }

    .btn-secondary {
      background: #334155;
      color: #f8fafc;
    }
    .btn-secondary:hover { background: #475569; }

    .checkbox-row {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12.5px;
      color: #cbd5e1;
      margin-bottom: 6px;
      cursor: pointer;
    }

    .checkbox-row input { width: auto; }

    /* Folha A4 */
    .a4-container {
      flex: 1;
      display: flex;
      justify-content: center;
      overflow-x: auto;
    }

    .a4-sheet {
      width: 210mm;
      min-height: 297mm;
      background: #fff;
      color: #1e293b;
      padding: 14mm 16mm;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
      border-radius: 4px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .doc-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 14px;
      border-bottom: 3px solid var(--navy-doc);
      margin-bottom: 14px;
    }

    .brand-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .brand-left img {
      height: 56px;
      width: auto;
      object-fit: contain;
    }

    .brand-info h2 {
      font-size: 17.5px;
      font-weight: 800;
      color: var(--navy-doc);
    }

    .brand-info p {
      font-size: 11px;
      color: #64748b;
      line-height: 1.45;
    }

    .doc-badge-box { text-align: right; }

    .doc-type-badge {
      display: inline-block;
      background: var(--navy-doc);
      color: #fff;
      font-size: 11.5px;
      font-weight: 800;
      padding: 5px 12px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }

    .doc-meta {
      font-size: 12px;
      color: #1e293b;
      font-weight: 600;
    }

    .doc-meta span {
      color: #16a34a;
      font-weight: 800;
    }

    .section-box {
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      margin-bottom: 11px;
      overflow: hidden;
    }

    .section-title {
      background: #f8fafc;
      border-bottom: 1px solid #e2e8f0;
      padding: 6px 12px;
      font-size: 10.5px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--navy-doc);
      display: flex;
      justify-content: space-between;
    }

    .section-title span.accent { color: #16a34a; }

    .section-body {
      padding: 9px 12px;
      font-size: 12px;
      line-height: 1.5;
    }

    .info-grid {
      display: grid;
      grid-template-columns: 2fr 1.2fr 1.2fr;
      gap: 8px 14px;
    }

    .info-item { display: flex; flex-direction: column; }

    .info-label {
      font-size: 9.5px;
      text-transform: uppercase;
      color: #64748b;
      font-weight: 700;
    }

    .info-val {
      font-size: 12px;
      font-weight: 600;
      color: #1e293b;
      min-height: 17px;
    }

    .info-val[contenteditable="true"]:hover,
    .editable-block[contenteditable="true"]:hover {
      background: #f8fafc;
      outline: 1px dashed #cbd5e1;
    }

    .editable-block {
      min-height: 32px;
      white-space: pre-wrap;
    }

    .checklist-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 5px 12px;
      font-size: 11px;
    }

    .check-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    table.items-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 11.5px;
    }

    table.items-table th {
      background: var(--navy-doc);
      color: #fff;
      text-align: left;
      padding: 6px 10px;
      font-size: 10.5px;
      text-transform: uppercase;
    }

    table.items-table td {
      padding: 6px 10px;
      border-bottom: 1px solid #e2e8f0;
    }

    table.items-table tr:nth-child(even) td { background: #f8fafc; }

    .col-center { text-align: center !important; }
    .col-right { text-align: right !important; }

    .totals-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--green-soft);
      border: 1px solid #bbf7d0;
      border-radius: 6px;
      padding: 9px 14px;
      margin-bottom: 10px;
    }

    .payment-info { font-size: 11px; color: #1e293b; line-height: 1.4; }
    .total-highlight { text-align: right; }
    .total-highlight .lbl { font-size: 9.5px; text-transform: uppercase; font-weight: 700; color: #16a34a; }
    .total-highlight .val { font-size: 19px; font-weight: 800; color: var(--navy-doc); }

    .terms-box {
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      border-radius: 6px;
      padding: 8px 12px;
      font-size: 9.8px;
      color: #64748b;
      line-height: 1.42;
      margin-bottom: 12px;
    }

    .terms-box strong { color: var(--navy-doc); display: block; margin-bottom: 2px; }
    .terms-box ol { padding-left: 15px; }

    .signatures {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 32px;
      margin-top: 16px;
      padding-top: 6px;
    }

    .sig-block { text-align: center; font-size: 11px; }
    .sig-line { border-top: 1px solid var(--navy-doc); padding-top: 5px; font-weight: 700; color: var(--navy-doc); }
    .sig-sub { color: #64748b; font-size: 9.5px; }

    .doc-footer-bar {
      margin-top: 10px;
      padding-top: 7px;
      border-top: 1px solid #e2e8f0;
      display: flex;
      justify-content: space-between;
      font-size: 9.5px;
      color: #64748b;
    }

    .remove-row-btn {
      background: #fee2e2;
      color: #b91c1c;
      border: none;
      border-radius: 4px;
      padding: 2px 6px;
      cursor: pointer;
      font-size: 10px;
      margin-left: 5px;
    }

    /* ================= MÓDULO 3: CENTRAL WHATSAPP ================= */
    .wa-tabs {
      display: flex;
      gap: 10px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }

    .wa-tab-btn {
      background: var(--bg-card);
      color: var(--muted);
      border: 1px solid var(--border);
      padding: 9px 16px;
      border-radius: 8px;
      font-weight: 700;
      font-size: 13px;
      cursor: pointer;
    }

    .wa-tab-btn.active {
      background: var(--green);
      color: #052e16;
      border-color: var(--green);
    }

    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 16px;
    }

    .client-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 12px;
    }

    .client-card.sent {
      border-color: rgba(34, 197, 94, 0.5);
      opacity: 0.82;
    }

    .card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
    }

    .client-name { font-size: 15.5px; font-weight: 700; color: #fff; }
    .client-os { font-size: 12px; color: var(--muted); margin-top: 2px; }

    .msg-box {
      width: 100%;
      background: #0f172a;
      border: 1px solid #334155;
      border-radius: 6px;
      padding: 10px;
      color: #e2e8f0;
      font-size: 12.5px;
      font-family: inherit;
      line-height: 1.45;
      min-height: 92px;
      resize: vertical;
      margin-top: 10px;
    }

    .card-actions { display: flex; gap: 8px; }

    .btn-wa {
      flex: 1;
      background: var(--green);
      color: #052e16;
      font-weight: 700;
      font-size: 13px;
      padding: 10px 12px;
      border-radius: 7px;
      border: none;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .btn-wa:hover { background: var(--green-hover); }

    .btn-copy {
      background: #334155;
      color: #f8fafc;
      border: none;
      padding: 10px 12px;
      border-radius: 7px;
      font-size: 12.5px;
      font-weight: 600;
      cursor: pointer;
    }

    /* ================= MODAIS DE BALCÃO (NOVA OS & VENDA RÁPIDA) ================= */
    .modal-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(2, 6, 23, 0.78);
      backdrop-filter: blur(4px);
      z-index: 200;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-backdrop.open {
      display: flex;
    }

    .modal-box {
      background: var(--bg-panel);
      border: 1px solid var(--border);
      border-radius: 12px;
      width: 100%;
      max-width: 580px;
      max-height: 92vh;
      overflow-y: auto;
      padding: 22px;
      box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 12px;
      margin-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .modal-header h3 {
      font-size: 17px;
      font-weight: 800;
      color: #fff;
    }

    .modal-close {
      background: transparent;
      border: none;
      color: var(--muted);
      font-size: 18px;
      cursor: pointer;
    }

    .modal-close:hover {
      color: #fff;
    }

    .modal-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .modal-full {
      grid-column: span 2;
    }

    .acc-checks {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 14px;
      margin-top: 4px;
    }

    .modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 18px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
    }

    .os-link-btn {
      background: transparent;
      border: none;
      color: var(--green-hover);
      font-weight: 800;
      font-size: 13px;
      cursor: pointer;
      text-align: left;
      padding: 0;
    }

    .os-link-btn:hover {
      text-decoration: underline;
    }

    .detail-box {
      background: #0f172a;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 12px;
      margin-bottom: 12px;
      font-size: 12.5px;
      line-height: 1.5;
    }

    .detail-meta-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 14px;
    }

    .detail-list {
      max-height: 170px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 8px;
    }

    .detail-item {
      background: #1e293b;
      border: 1px solid #334155;
      border-radius: 6px;
      padding: 7px 10px;
      font-size: 12px;
      color: #e2e8f0;
    }

    .detail-item small {
      color: var(--muted);
      display: block;
      font-size: 10.5px;
      margin-bottom: 2px;
    }

    /* ================= KANBAN DE OS & CLIENTES COM FOTO ================= */
    .kanban-board {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      padding-bottom: 14px;
      align-items: stretch;
    }

    .kanban-col {
      background: var(--bg-panel);
      border: 1px solid var(--border);
      border-top: 4px solid var(--col-accent, #475569);
      border-radius: 10px;
      display: flex;
      flex-direction: column;
      min-height: 460px;
      flex: 1 1 0;
      min-width: 0;
      transition: border-color 0.15s, background 0.15s, flex 0.2s, min-width 0.2s;
    }

    @media (max-width: 1100px) {
      .kanban-col {
        flex: 1 1 220px;
        min-width: 220px;
      }
    }

    .kanban-col.col-minimized {
      flex: 0 0 52px;
      min-width: 52px;
      max-width: 52px;
      align-items: center;
      overflow: hidden;
    }

    .kanban-col.col-minimized .kanban-col-head {
      flex-direction: column;
      gap: 10px;
      padding: 12px 6px;
      border-bottom: none;
      height: 100%;
    }

    .kanban-col.col-minimized .kc-col-title {
      writing-mode: vertical-rl;
      transform: rotate(180deg);
      white-space: nowrap;
      font-size: 12.5px;
    }

    .kanban-col.col-minimized .kanban-col-body,
    .kanban-col.col-minimized .col-color-btn {
      display: none;
    }

    .kanban-col.drag-over {
      border-color: var(--green);
      background: rgba(34, 197, 94, 0.06);
    }

    .kanban-col-head {
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      font-size: 12.5px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      cursor: grab;
      background: var(--col-head-bg, transparent);
    }

    .kanban-col-head:active {
      cursor: grabbing;
    }

    .col-tools {
      display: flex;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }

    .col-tool-btn {
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #cbd5e1;
      border-radius: 5px;
      width: 22px;
      height: 22px;
      font-size: 11px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .col-tool-btn:hover {
      background: rgba(255, 255, 255, 0.15);
      color: #fff;
    }

    .cli-avatar-upload-row {
      display: flex;
      align-items: center;
      gap: 14px;
      background: #0f172a;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
    }

    .cli-profile-hero {
      display: flex;
      align-items: center;
      gap: 16px;
      background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
    }

    .cli-profile-avatar-wrap {
      position: relative;
      width: 68px;
      height: 68px;
      flex-shrink: 0;
      cursor: pointer;
      border-radius: 50%;
    }

    .cli-profile-hero.has-photo .cli-profile-avatar-wrap {
      width: 88px;
      height: 88px;
    }

    .cli-profile-avatar-img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid rgba(34, 197, 94, 0.55);
      display: block;
    }

    .cli-profile-avatar-fallback {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background: rgba(34, 197, 94, 0.14);
      color: #4ade80;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 24px;
      border: 2px dashed rgba(34, 197, 94, 0.4);
    }

    .cli-profile-avatar-hover {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      background: rgba(2, 6, 23, 0.68);
      color: #fff;
      font-size: 11.5px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity 0.15s;
    }

    .cli-profile-avatar-wrap:hover .cli-profile-avatar-hover {
      opacity: 1;
    }

    .cli-profile-cam-badge {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: #1e293b;
      border: 1px solid #475569;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    }

    .cli-profile-summary {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }

    .cli-profile-name {
      font-size: 17px;
      font-weight: 800;
      color: #fff;
      line-height: 1.25;
    }

    .cli-profile-meta {
      font-size: 12.5px;
      color: #cbd5e1;
      line-height: 1.35;
    }

    /* ================= PRODUTOS & ESTOQUE ================= */
    .prod-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
      gap: 16px;
    }

    .prod-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      transition: border-color 0.15s, transform 0.15s;
    }

    .prod-card:hover {
      border-color: #64748b;
      transform: translateY(-2px);
    }

    .prod-card-img {
      width: 100%;
      height: 165px;
      object-fit: cover;
      background: #0b1120;
      display: block;
    }

    .prod-card-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      color: #64748b;
      font-size: 28px;
    }

    .prod-card-placeholder span {
      font-size: 11.5px;
    }

    .prod-card-body {
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
    }

    .prod-card-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .prod-cat-tag {
      font-size: 11px;
      color: #cbd5e1;
      background: rgba(255, 255, 255, 0.06);
      padding: 3px 8px;
      border-radius: 99px;
    }

    .prod-card-title {
      font-size: 14px;
      font-weight: 700;
      color: #fff;
      line-height: 1.3;
    }

    .prod-card-prices {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 8px 10px;
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 10px;
      font-size: 12px;
    }

    .prod-card-prices .lbl {
      display: block;
      font-size: 10px;
      color: #94a3b8;
      text-transform: uppercase;
    }

    .prod-card-meta {
      display: flex;
      justify-content: space-between;
      font-size: 11.5px;
      color: #94a3b8;
      flex-wrap: wrap;
      gap: 4px;
    }

    .prod-card-actions {
      padding: 10px 14px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 8px;
    }

    .prod-card-actions .btn-sm {
      flex: 1;
      justify-content: center;
    }

    .prod-photos-gallery {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      background: #0f172a;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px;
      min-height: 64px;
    }

    .prod-photo-thumb {
      position: relative;
      width: 86px;
      height: 86px;
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid var(--border);
    }

    .prod-photo-thumb.is-new {
      border-color: var(--green);
    }

    .prod-photo-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .prod-photo-badge {
      position: absolute;
      bottom: 3px;
      left: 3px;
      background: rgba(34, 197, 94, 0.9);
      color: #052e16;
      font-size: 9.5px;
      font-weight: 800;
      padding: 1px 5px;
      border-radius: 4px;
    }

    .prod-photo-badge.sec {
      background: rgba(15, 23, 42, 0.85);
      color: #cbd5e1;
    }

    .prod-photo-badge.new {
      background: rgba(59, 130, 246, 0.9);
      color: #fff;
    }

    .prod-photo-del {
      position: absolute;
      top: 3px;
      right: 3px;
      background: rgba(239, 68, 68, 0.9);
      color: #fff;
      border: none;
      border-radius: 50%;
      width: 20px;
      height: 20px;
      font-size: 11px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* ================= COBRANÇA PIX & SIMULADOR CARTÃO ================= */
    .cob-grid {
      display: grid;
      grid-template-columns: 280px 1fr;
      gap: 16px;
      align-items: start;
    }

    @media (max-width: 820px) {
      .cob-grid {
        grid-template-columns: 1fr;
      }
    }

    .sim-card-table {
      width: 100%;
      font-size: 12px;
    }

    .sim-card-table th,
    .sim-card-table td {
      padding: 7px 6px !important;
      white-space: nowrap;
    }

    .cob-panel {
      background: #0f172a;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px;
    }

    .pix-qr-box {
      background: #fff;
      padding: 10px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 196px;
      height: 196px;
      margin: 0 auto;
    }

    .sim-rate-wrap {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      white-space: nowrap;
    }

    .sim-rate-input {
      width: 56px !important;
      display: inline-block !important;
      background: #0b1120;
      border: 1px solid var(--border);
      color: #fbbf24;
      border-radius: 5px;
      padding: 3px 5px !important;
      font-size: 11.5px;
      text-align: right;
    }

    #pixCopiaCola {
      width: 100%;
      box-sizing: border-box;
      display: block;
    }

    .estrategia-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-bottom: 10px;
    }

    @media (max-width: 640px) {
      .estrategia-grid {
        grid-template-columns: 1fr;
      }
    }

    .est-card {
      background: #0b1120;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 10px;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .est-card.est-anuncio {
      border-color: rgba(59, 130, 246, 0.45);
    }

    .est-card.est-pix {
      border-color: rgba(34, 197, 94, 0.45);
      cursor: pointer;
    }

    .est-card.est-pix:hover {
      background: rgba(34, 197, 94, 0.08);
    }

    .est-card.est-piso {
      border-color: rgba(251, 191, 36, 0.35);
    }

    .est-lbl {
      font-size: 10px;
      color: #94a3b8;
      font-weight: 700;
      text-transform: uppercase;
    }

    .est-card strong {
      font-size: 14px;
      color: #fff;
    }

    .est-card.est-pix strong {
      color: #4ade80;
    }

    .est-card.est-piso strong {
      color: #fbbf24;
    }

    .est-card small {
      font-size: 11px;
      color: #cbd5e1;
    }

    /* ================= CHECKLIST POP BANCADA ================= */
    .pop-checks-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      background: #0b1120;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
    }

    .pop-check-row {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12.5px;
      color: #e2e8f0;
      cursor: pointer;
    }

    .pop-check-row input[type="checkbox"] {
      width: 15px;
      height: 15px;
      accent-color: var(--green);
      cursor: pointer;
      flex-shrink: 0;
    }

    .pop-accordion {
      margin-bottom: 12px;
    }

    .pop-accordion-summary {
      cursor: pointer;
      font-size: 12.5px;
      font-weight: 700;
      color: #4ade80;
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      user-select: none;
    }

    .pop-accordion-summary::-webkit-details-marker {
      display: none;
    }

    .pop-accordion-summary::after {
      content: '▾ Abrir';
      font-size: 11px;
      color: #94a3b8;
      font-weight: 600;
    }

    .pop-accordion[open] .pop-accordion-summary::after {
      content: '▴ Recolher';
    }

    #popLaudoPreview {
      width: 100%;
      box-sizing: border-box;
      display: block;
    }

    /* ================= PACOTE VISUAL: GRÁFICOS, ANIMAÇÕES & BADGES ================= */
    @keyframes fadeSlideIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes modalPop {
      from { opacity: 0; transform: scale(0.97) translateY(6px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    @keyframes syncShimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(300%); }
    }

    .module-view.active {
      animation: fadeSlideIn 0.22s ease-out;
    }

    .modal-backdrop.open .modal-box {
      animation: modalPop 0.18s ease-out;
    }

    .top-sync-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      z-index: 9999;
      pointer-events: none;
      overflow: hidden;
      opacity: 0;
      transition: opacity 0.2s;
    }

    .top-sync-bar.loading {
      opacity: 1;
      background: rgba(34, 197, 94, 0.18);
    }

    .top-sync-bar.loading::after {
      content: '';
      display: block;
      width: 35%;
      height: 100%;
      background: linear-gradient(90deg, transparent, #22c55e, #4ade80, transparent);
      animation: syncShimmer 1.1s infinite ease-in-out;
    }

    .nav-badge {
      margin-left: auto;
      background: rgba(34, 197, 94, 0.16);
      color: #4ade80;
      border: 1px solid rgba(34, 197, 94, 0.3);
      font-size: 10px;
      font-weight: 800;
      padding: 1px 6px;
      border-radius: 99px;
      display: none;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .nav-badge.warn {
      background: rgba(245, 158, 11, 0.18);
      color: #fbbf24;
      border-color: rgba(245, 158, 11, 0.4);
    }

    body.sidebar-collapsed .nav-badge {
      display: none !important;
    }

    .charts-row {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 16px;
      margin-bottom: 22px;
    }

    .charts-row.fin-charts-row {
      grid-template-columns: 1.65fr 1fr;
    }

    @media (max-width: 960px) {
      .charts-row,
      .charts-row.fin-charts-row {
        grid-template-columns: 1fr;
      }
    }

    .chart-card {
      background: linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.92));
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px 16px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
      transition: border-color 0.2s, transform 0.2s;
    }

    .chart-card:hover {
      border-color: rgba(34, 197, 94, 0.35);
    }

    .chart-card-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      font-size: 13px;
      font-weight: 700;
      color: #fff;
    }

    .chart-card-head small {
      font-size: 11px;
      color: #94a3b8;
      font-weight: 500;
    }

    .chart-canvas-wrap {
      position: relative;
      width: 100%;
    }

    .kpi-card {
      background: linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.95));
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    }

    .kpi-card:hover {
      box-shadow: 0 10px 24px rgba(34, 197, 94, 0.12);
    }

    .iati-toast {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 9999;
      background: linear-gradient(135deg, #064e3b, #0f172a);
      border: 1px solid rgba(34, 197, 94, 0.55);
      color: #ecfdf5;
      padding: 11px 16px;
      border-radius: 10px;
      font-size: 13px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
      opacity: 0;
      transform: translateY(14px);
      pointer-events: none;
      transition: opacity 0.22s, transform 0.22s;
    }

    .iati-toast.show {
      opacity: 1;
      transform: translateY(0);
    }

    /* ================= LUCIDE VECTOR ICONS ================= */
    svg.lucide {
      width: 15px;
      height: 15px;
      stroke-width: 2;
      flex-shrink: 0;
      vertical-align: middle;
    }

    .nav-ico svg.lucide {
      width: 17px;
      height: 17px;
    }

    .btn-sm svg.lucide,
    .btn svg.lucide,
    .wa-tab-btn svg.lucide {
      width: 14px;
      height: 14px;
    }

    .mod-header h2 svg.lucide,
    .dash-section-title svg.lucide,
    .chart-card-head svg.lucide {
      width: 18px;
      height: 18px;
      color: var(--green-hover);
      margin-right: 4px;
    }

    .kpi-card .lbl svg.lucide {
      width: 13px;
      height: 13px;
      margin-right: 4px;
      color: #94a3b8;
    }

    /* ================= PRIORIDADE NA TABELA & DROP NO KANBAN ================= */
    .dash-table tr.prio-alta td:first-child {
      border-left: 4px solid #ef4444;
    }
    .dash-table tr.prio-media td:first-child {
      border-left: 4px solid #f59e0b;
    }
    .dash-table tr.prio-baixa td:first-child {
      border-left: 4px solid #3b82f6;
    }

    .kanban-card.card-drop-before {
      border-top: 3px solid var(--green) !important;
    }
    .kanban-card.card-drop-after {
      border-bottom: 3px solid var(--green) !important;
    }

    #btnSaveOsDetail:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      filter: grayscale(0.45);
      box-shadow: none;
    }

    /* ================= PRECIFICADOR VISUAL DE SERVIÇOS (TELA PRÓPRIA) ================= */
    .sp-context-banner {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      background: rgba(34, 197, 94, 0.12);
      border: 1px solid rgba(34, 197, 94, 0.4);
      border-radius: 14px;
      padding: 12px 16px;
      margin-bottom: 18px;
      font-size: 13px;
      color: #ecfdf5;
    }

    .sp-step-title {
      font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
      font-size: 13.5px;
      font-weight: 700;
      color: #cbd5e1;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 10px;
    }

    .sp-equip-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }

    @media (max-width: 1100px) {
      .sp-equip-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (max-width: 640px) {
      .sp-equip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .sp-equip-card {
      background: linear-gradient(145deg, #1f242e, #171a21);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px 12px;
      text-align: left;
      color: var(--text);
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 10px;
      transition: all 0.16s ease;
    }

    .sp-equip-card:hover {
      border-color: #64748b;
      transform: translateY(-1px);
    }

    .sp-equip-card.active {
      background: linear-gradient(145deg, rgba(34, 197, 94, 0.16), #18221e);
      border-color: var(--green);
      box-shadow: 0 6px 18px rgba(34, 197, 94, 0.14);
    }

    .sp-equip-ico {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.05);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #9aa0a6;
      flex-shrink: 0;
    }

    .sp-equip-ico svg.lucide {
      width: 18px;
      height: 18px;
    }

    .sp-equip-card.active .sp-equip-ico {
      background: rgba(34, 197, 94, 0.2);
      color: var(--green-hover);
    }

    .sp-equip-info {
      min-width: 0;
    }

    .sp-equip-lbl {
      font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 700;
      color: #fff;
      line-height: 1.2;
    }

    .sp-equip-sub {
      font-size: 11px;
      color: var(--muted);
      margin-top: 2px;
    }

    /* Cards Primários de Categoria */
    .sp-primary-cats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }

    .sp-cat-primary-card {
      background: #171a22;
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 14px;
      text-align: left;
      color: var(--text);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 4px;
      transition: all 0.15s ease;
    }

    .sp-cat-primary-card:hover {
      border-color: #64748b;
    }

    .sp-cat-primary-card.active {
      background: linear-gradient(145deg, rgba(59, 130, 246, 0.16), #18202c);
      border-color: var(--blue);
      box-shadow: 0 6px 18px rgba(59, 130, 246, 0.14);
    }

    .sp-cat-primary-card.is-partner.active {
      background: linear-gradient(145deg, rgba(245, 158, 11, 0.16), #231e17);
      border-color: var(--amber);
    }

    .sp-cat-p-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 2px;
    }

    .sp-cat-p-ico {
      color: var(--blue);
      display: inline-flex;
    }

    .sp-cat-primary-card.is-partner .sp-cat-p-ico {
      color: var(--amber);
    }

    .sp-cat-p-cnt {
      font-size: 10.5px;
      color: #94a3b8;
      background: rgba(255, 255, 255, 0.05);
      padding: 2px 7px;
      border-radius: 99px;
    }

    .sp-cat-p-sel {
      font-size: 10.5px;
      font-weight: 700;
      color: #052e16;
      background: var(--green-hover);
      padding: 2px 8px;
      border-radius: 99px;
    }

    .sp-cat-p-title {
      font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
      font-size: 13.5px;
      font-weight: 700;
      color: #fff;
    }

    .sp-cat-p-ex {
      font-size: 11px;
      color: var(--muted);
      line-height: 1.3;
    }

    /* Calculadora Rápida Parceiro Garanhuns */
    .sp-partner-calc-box {
      background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), #181a22);
      border: 1px solid rgba(245, 158, 11, 0.4);
      border-radius: 14px;
      padding: 12px 14px;
      margin-bottom: 12px;
    }

    .sp-partner-calc-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      font-size: 12.5px;
      font-weight: 700;
      color: #fbbf24;
      margin-bottom: 10px;
    }

    .sp-partner-calc-head small {
      color: #fde68a;
      font-weight: 600;
    }

    .sp-partner-inputs {
      display: grid;
      grid-template-columns: 1.6fr 1fr 1fr 1fr auto;
      gap: 8px;
      align-items: end;
    }

    .sp-partner-inputs .control-group {
      margin-bottom: 0;
    }

    .sp-partner-inputs input,
    .sp-partner-inputs button {
      height: 36px;
      box-sizing: border-box;
      margin: 0;
    }

    @media (max-width: 960px) {
      .sp-partner-inputs {
        grid-template-columns: 1fr 1fr;
      }
    }

    .sp-parc-badge {
      font-size: 10px;
      font-weight: 700;
      color: #fbbf24;
      background: rgba(245, 158, 11, 0.16);
      border: 1px solid rgba(245, 158, 11, 0.35);
      padding: 2px 7px;
      border-radius: 99px;
    }

    .sp-page-layout {
      display: grid;
      grid-template-columns: 1fr 370px;
      gap: 20px;
      align-items: start;
    }

    @media (max-width: 1080px) {
      .sp-page-layout {
        grid-template-columns: 1fr;
      }
    }

    .sp-group-block {
      margin-bottom: 18px;
    }

    .sp-group-title {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 13px;
      font-weight: 700;
      color: #94a3b8;
      margin-bottom: 10px;
    }

    .sp-group-title svg.lucide {
      color: var(--green-hover);
    }

    .sp-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
      gap: 12px;
    }

    .sp-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 14px;
      text-align: left;
      color: var(--text);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 8px;
      transition: all 0.15s ease;
    }

    .sp-card:hover {
      border-color: #64748b;
      transform: translateY(-2px);
    }

    .sp-card.selected {
      background: linear-gradient(145deg, rgba(34, 197, 94, 0.15), #18231e);
      border-color: var(--green);
      box-shadow: 0 6px 18px rgba(34, 197, 94, 0.14);
    }

    .sp-card-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .sp-card-ico {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.05);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #94a3b8;
    }

    .sp-card.selected .sp-card-ico {
      background: rgba(34, 197, 94, 0.22);
      color: var(--green-hover);
    }

    .sp-card-check {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 1px solid var(--border);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #052e16;
    }

    .sp-card.selected .sp-card-check {
      background: var(--green);
      border-color: var(--green);
    }

    .sp-card-title {
      font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
      font-size: 14px;
      font-weight: 700;
      color: #fff;
      line-height: 1.25;
    }

    .sp-card-desc {
      font-size: 11.5px;
      color: var(--muted);
      line-height: 1.35;
      flex: 1;
    }

    .sp-card-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-top: 8px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .sp-card-foot strong {
      font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
      font-size: 16px;
      color: #fff;
    }

    .sp-card.selected .sp-card-foot strong {
      color: var(--green-hover);
    }

    .sp-card-foot span {
      font-size: 11px;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.05);
      padding: 2px 8px;
      border-radius: 99px;
    }

    .sp-section-panel {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 16px;
    }

    .sp-pills-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .sp-pill {
      background: #14171f;
      border: 1px solid var(--border);
      color: #cbd5e1;
      border-radius: 999px;
      padding: 7px 13px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.15s;
    }

    .sp-pill:hover {
      border-color: #64748b;
      color: #fff;
    }

    .sp-pill.active {
      background: rgba(34, 197, 94, 0.16);
      border-color: var(--green);
      color: #fff;
    }

    .sp-pill.active strong {
      color: var(--green-hover);
    }

    .sp-pill.sp-pill-b2b.active {
      background: rgba(138, 180, 248, 0.16);
      border-color: var(--blue);
    }

    .sp-pill small {
      color: #64748b;
      font-weight: 500;
    }

    /* Carrinho lateral sticky */
    .sp-cart-panel {
      position: sticky;
      top: 20px;
      background: linear-gradient(155deg, #1f242e, #161920);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px;
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .sp-cart-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
      color: #fff;
    }

    .sp-cart-items {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-height: 220px;
      overflow-y: auto;
    }

    .sp-cart-empty {
      font-size: 12px;
      color: var(--muted);
      text-align: center;
      padding: 16px 8px;
      background: rgba(255, 255, 255, 0.02);
      border: 1px dashed var(--border);
      border-radius: 12px;
    }

    .sp-cart-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      font-size: 12.5px;
      color: #e2e8f0;
      padding: 6px 8px;
      background: rgba(255, 255, 255, 0.03);
      border-radius: 10px;
    }

    .sp-cart-item.is-disc {
      color: var(--green-hover);
      background: rgba(34, 197, 94, 0.08);
    }

    .sp-cart-item-r {
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    .sp-cart-item-r button {
      background: none;
      border: none;
      color: #94a3b8;
      cursor: pointer;
      font-size: 12px;
      padding: 2px 4px;
      border-radius: 4px;
    }

    .sp-cart-item-r button:hover {
      color: #f87171;
      background: rgba(239, 68, 68, 0.14);
    }

    .sp-hourly-box {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      padding: 9px 12px;
      border-radius: 12px;
      background: #111318;
      border: 1px solid var(--border);
      color: #cbd5e1;
    }

    .sp-hourly-box.level-good {
      border-color: rgba(34, 197, 94, 0.45);
      background: rgba(34, 197, 94, 0.09);
      color: #bbf7d0;
    }

    .sp-hourly-box.level-warn {
      border-color: rgba(245, 158, 11, 0.45);
      background: rgba(245, 158, 11, 0.1);
      color: #fde68a;
    }

    .sp-hourly-box.level-bad {
      border-color: rgba(239, 68, 68, 0.5);
      background: rgba(239, 68, 68, 0.12);
      color: #fecaca;
    }

    .sp-prices-stack {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .sp-price-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 12px;
      border-radius: 12px;
      background: #12151c;
      border: 1px solid var(--border);
    }

    .sp-price-row.is-piso { border-color: rgba(251, 191, 36, 0.35); }
    .sp-price-row.is-pix { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.07); }
    .sp-price-row.is-card { border-color: rgba(138, 180, 248, 0.35); }

    .sp-pr-lbl {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      color: #94a3b8;
    }

    .sp-price-row small {
      display: block;
      font-size: 11px;
      color: #cbd5e1;
      margin-top: 1px;
    }

    .sp-price-row strong {
      font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
      font-size: 18px;
      color: #fff;
      white-space: nowrap;
    }

    .sp-price-row.is-piso strong { color: #fbbf24; }
    .sp-price-row.is-pix strong { color: var(--green-hover); }

    .sp-cart-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 2px;
    }

    .sp-cfg-two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    @media (max-width: 820px) {
      .sp-cfg-two-col {
        grid-template-columns: 1fr;
      }
    }

    .sp-dev-mini-row {
      display: flex;
      gap: 4px;
      flex-wrap: nowrap;
      align-items: center;
    }

    .sp-dev-chip {
      background: #14171f;
      border: 1px solid var(--border);
      color: #64748b;
      font-size: 11px;
      font-weight: 700;
      padding: 4px 7px;
      border-radius: 7px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.14s;
    }

    .sp-dev-chip:hover {
      border-color: #64748b;
      color: #cbd5e1;
    }

    .sp-dev-chip.on {
      background: rgba(34, 197, 94, 0.2);
      border-color: var(--green);
      color: var(--green-hover);
    }

    .sp-cfg-table {
      width: 100%;
      table-layout: fixed;
      border-collapse: collapse;
    }

    .sp-cfg-table th,
    .sp-cfg-table td {
      padding: 8px 6px !important;
      vertical-align: middle;
      overflow: hidden;
    }

    .sp-cfg-in {
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
      display: block !important;
      background: #111318;
      border: 1px solid var(--border);
      color: #fff;
      padding: 6px 8px !important;
      font-size: 12px;
      border-radius: 8px !important;
    }

    /* ================= GOOGLE MATERIAL 3 OVERRIDES ================= */
    .nav-btn {
      border-radius: 999px !important;
      padding: 10px 14px !important;
    }

    .nav-btn.active {
      background: rgba(34, 197, 94, 0.16) !important;
      border-color: transparent !important;
    }

    .btn, .btn-sm, .wa-tab-btn, .filter-clear-btn {
      border-radius: 999px !important;
      font-family: 'Inter', system-ui, sans-serif;
    }

    .kpi-card, .chart-card, .launcher-panel, .prod-card, .client-card, .kanban-col, .os-table-wrap, .detail-box {
      border-radius: 16px !important;
      background: var(--bg-card);
    }

    .modal-box {
      border-radius: 20px !important;
      background: #1a1e26 !important;
      border-color: #2e3442 !important;
    }

    input, select, textarea {
      border-radius: 12px !important;
    }

    .kpi-card {
      background: linear-gradient(145deg, #1f242e, #181c24) !important;
      border-color: #2c3240 !important;
    }

    .chart-card {
      background: linear-gradient(145deg, #1e232d, #171b22) !important;
      border-color: #2c3240 !important;
    }

    .kanban-col-body {
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      flex: 1;
    }

    .kanban-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 11px;
      cursor: pointer;
      transition: transform 0.12s, border-color 0.12s;
    }

    .kanban-card:hover {
      border-color: #64748b;
      transform: translateY(-2px);
    }

    .kc-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
      font-size: 12px;
    }

    .kc-top strong {
      color: var(--green-hover);
    }

    .kc-price {
      font-size: 11px;
      color: #cbd5e1;
      font-weight: 700;
    }

    .kc-title {
      font-size: 12.5px;
      font-weight: 700;
      color: #fff;
      line-height: 1.35;
      margin-bottom: 6px;
    }

    .kc-client {
      font-size: 11.5px;
      color: var(--muted);
      margin-bottom: 8px;
    }

    .kc-actions {
      display: flex;
      gap: 6px;
    }

    .cli-toolbar {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
      margin-bottom: 18px;
    }

    .cli-search {
      flex: 1;
      min-width: 240px;
      padding: 10px 14px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--bg-card);
      color: #fff;
      font-size: 13.5px;
    }

    .cli-card-head {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .cli-avatar-img,
    .cli-avatar-fallback {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      flex-shrink: 0;
      object-fit: cover;
      border: 2px solid var(--border);
    }

    .cli-avatar-fallback {
      background: linear-gradient(135deg, #16a34a, #0f172a);
      color: #fff;
      font-weight: 800;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* ================= REGRAS DE IMPRESSÃO A4 ISOLADA ================= */
    @media print {
      body {
        background: #fff !important;
        display: block !important;
      }
      .app-nav,
      .sidebar-open-fab,
      .mod-header,
      .doc-controls,
      .no-print,
      #view-dashboard,
      #view-kanban,
      #view-clientes,
      #view-whatsapp,
      #view-gestao {
        display: none !important;
      }
      #view-documentos {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
      }
      .doc-workspace,
      .a4-container {
        display: block !important;
      }
      .a4-sheet {
        box-shadow: none !important;
        width: 100% !important;
        min-height: auto !important;
        padding: 8mm 10mm !important;
      }
      @page {
        size: A4 portrait;
        margin: 6mm;
      }
    }
