      scrollbar-width: thin;
    }

    .panel h2 {
      margin-top: 0;
      margin-bottom: 10px;
      font-size: 0.95rem;
      font-weight: 800;
      color: var(--navy);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    table,
    .tabela-lancamentos {
      width: 100%;
      min-width: 980px;
      border-collapse: separate !important;
      border-spacing: 0 !important;
      font-size: 0.9rem;
    }

    th,
    td {
      text-align: left;
      padding: 11px 10px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }

    th {
      color: var(--text-muted);
      font-weight: 700;
      font-size: 0.78rem;
      text-transform: none;
      letter-spacing: 0.01em;
      background: #fafbfc;
      border-top: none !important;
    }

    tr:hover td {
      background: var(--panel-alt);
    }

    .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 3px 10px;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 700;
      white-space: nowrap;
      text-align: center;
      line-height: 1.2;
    }

    .badge.receita {
      background: #dcfce7;
      color: var(--receita);
      border: 1px solid #86efac;
    }

    .badge.despesa {
      background: #fee2e2;
      color: var(--despesa);
      border: 1px solid #fca5a5;
    }

    .badge.transferencia,
    .badge.transferencia_saida {
      background: #ffedd5;
      color: #c2410c;
      border: 1px solid #fed7aa;
    }

    .badge.transferencia_entrada {
      background: #ecfdf5;
      color: #059669;
      border: 1px solid #a7f3d0;
    }

    .badge.pro_labore {
      background: #ede9fe;
      color: var(--prolabore);
      border: 1px solid #ddd6fe;
    }

    /* Badges de status e modalidade */
    .badge-status-pago {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 700;
      background: #dcfce7;
      color: #15803d;
      border: 1px solid #86efac;
    }

    .badge-status-pendente {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 700;
      background: #fef3c7;
      color: #92400e;
      border: 1px solid #fde68a;
      animation: pulse-yellow 2s infinite;
    }

    .badge-modalidade {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 2px 7px;
      border-radius: 5px;
      font-size: 0.7rem;
      font-weight: 700;
      background: #e0e7ff;
      color: #3730a3;
    }

    .badge-modalidade.parcelado {
      background: #fef3c7;
      color: #92400e;
    }

    .badge-modalidade.fixo {
      background: #e0f2fe;
      color: #075985;
    }

    .badge-modalidade.avulso {
      background: #f1f5f9;
      color: #475569;
    }

    @keyframes pulseBadge {
      0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
      }

      70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
      }

      100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
      }
    }

    @keyframes fadeInDown {
      from {
        opacity: 0;
        transform: translateY(-8px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes pulse-yellow {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.7;
      }
    }

    /* Painel de alerta de vencimentos no Dashboard */
    .pending-alert {
      display: flex;
      align-items: center;
      gap: 14px;
      background: #fffbeb;
      border: 1px solid #fde68a;
      border-left: 4px solid #f59e0b;
      border-radius: 10px;
      padding: 14px 18px;
      margin-bottom: 18px;
    }

    .pending-alert .pa-icon {
      font-size: 1.5rem;
      flex-shrink: 0;
    }

    .pending-alert .pa-text {
      flex: 1;
    }

    .pending-alert .pa-text strong {
      display: block;
      font-size: 0.97rem;
      color: #92400e;
      font-weight: 800;
      margin-bottom: 2px;
    }

    .pending-alert .pa-text small {
      font-size: 0.83rem;
      color: #b45309;
    }

    /* Grid de Gráficos e Cards Executivos */
    .charts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
      gap: 16px;
      margin-bottom: 20px;
    }

    .chart-card {
      background: var(--panel);
      border-radius: var(--radius);
      border: 1px solid var(--border);
      padding: 16px;
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
    }

    .chart-card h3 {
      font-size: 0.95rem;
      margin: 0 0 12px 0;
      color: var(--navy);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .chart-container {
      position: relative;
      flex: 1;
      min-height: 230px;
      max-height: 270px;
    }

    /* DRE Tabela Estruturada */
    .tabela-dre {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.82rem;
    }

    .tabela-dre th,
    .tabela-dre td {
      padding: 6px 8px;
      border: 1px solid var(--border);
      text-align: right;
      white-space: nowrap;
    }

    .tabela-dre th:first-child,
    .tabela-dre td:first-child {
      text-align: left;
      font-weight: 600;
      white-space: normal;
      min-width: 220px;
    }

    .tabela-dre tr.dre-header-row th {
      background: #061329;
      color: #fff;
    }

    .tabela-dre tr.dre-section td {
      background: #f1f5f9;
      font-weight: 800;
      font-size: 0.85rem;
    }

    .tabela-dre tr.dre-subtotal td {
      background: #f8fafc;
      font-weight: 700;
      border-top: 3px solid #cbd5e1;
    }

    .tabela-dre tr.dre-total td {
      background: #e2e8f0;
      font-weight: 800;
      font-size: 0.88rem;
      border-top: 3px solid #94a3b8;
    }

    /* Estilos de Impressão A4 / PDF Padronizados com Identidade Visual Rede Price */
    @page {
      size: A4 landscape;
      margin: 8mm 8mm 8mm 8mm;
    }

    @media print {

      *,
      *::before,
      *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box !important;
      }

      html,
      body,
      #app,
      .app-container,
      main,
      .main-content,
      .main-wrapper {
        background: #fff !important;
        color: #0f172a !important;
        font-size: 8pt !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        display: block !important;
        position: static !important;
      }

      nav.sidebar,
      .topbar,
      .nav-btns,
      .filters,
      .filters-actions,
      .actions,
      button,
      .btn,
      #btnSininhoAlertas,
      #btnSininhoVencimentos,
      #containerAlertaVencimentos,
      .modal-overlay,
      .hint-banner,
      .pending-alert,
      .toolbar button,
      .panel-header button,
      .relatorios-nav,
      .panel[style*="background:#061329"],
      .panel[style*="background: #061329"],
      .no-print {
        display: none !important;
      }

      .print-header-corporate {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 2.5px solid #ff5500 !important;
        padding-bottom: 8px !important;
        margin-bottom: 12px !important;
      }

      .panel {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
        border-top: 3px solid #061329 !important;
        padding: 6px 8px !important;
        margin: 0 0 10px 0 !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
      }

      .panel.dre-panel {
        border: 1px solid #e2e8f0 !important;
        border-top: 3px solid #ff5500 !important;
        padding: 0 !important;
        margin-top: 6px !important;
        overflow: visible !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
      }

      .cards-row {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
        margin-bottom: 8px !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
      }

      .card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        padding: 6px 8px !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
      }

      .card .value {
        font-size: 1rem !important;
      }

      table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
      }

      thead {
        display: table-header-group !important;
      }

      th {
        background: #061329 !important;
        color: #ffffff !important;
        font-size: 7.5pt !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        padding: 5px 6px !important;
        border-bottom: 2px solid #ff5500 !important;
      }

      tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
      }

      td {
        padding: 4px 6px !important;
        font-size: 7.8pt !important;
        border-bottom: 1px solid #e2e8f0 !important;
      }

      tr:nth-child(even) td {
        background: #f8fafc !important;
      }
    }

    /* Vencimentos: estilos da tela */
    .nav-vencimentos {
      background: linear-gradient(90deg, #061329 0%, #112a55 100%);
      border-radius: 8px;
      padding: 8px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 14px;
      flex-wrap: wrap;
      max-width: 100%;
      box-sizing: border-box;
    }

    .nav-vencimentos .mes-label {
      color: #fff;
      font-weight: 800;
      font-size: 0.95rem;
      letter-spacing: -0.01em;
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .nav-vencimentos .nav-btns {
      display: flex;
      gap: 6px;
      align-items: center;
      flex-wrap: wrap;
    }

    .nav-vencimentos button {
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 6px;
      padding: 4px 10px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      font-size: 0.78rem;
      transition: background 0.12s;
    }

    .nav-vencimentos button:hover {
      background: rgba(255, 255, 255, 0.22);
    }

    .nav-vencimentos .btn-mes-atual {
      background: var(--primary);
      border-color: var(--primary-dark);
    }

    /* Linha de vencimento pendente destacada */
    tr.venc-pendente td {
      background: #fffbeb !important;
    }

    tr.venc-pendente:hover td {
      background: #fef3c7 !important;
    }

    /* Modal de escopo */
    .escopo-options {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 14px 0;
    }

    .escopo-opt {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 14px;
      border-radius: 8px;
      border: 2px solid var(--border);
      cursor: pointer;
      transition: all 0.12s;
    }

    .escopo-opt:hover {
      border-color: var(--primary);
      background: var(--primary-light);
    }

    .escopo-opt.selected {
      border-color: var(--primary);
      background: var(--primary-light);
    }

    .escopo-opt input[type=radio] {
      margin-top: 3px;
      accent-color: var(--primary);
      flex-shrink: 0;
    }

    .escopo-opt .opt-text strong {
      display: block;
      font-size: 0.93rem;
      font-weight: 800;
      color: var(--navy);
    }

    .escopo-opt .opt-text small {
      font-size: 0.8rem;
      color: var(--text-muted);
    }



    button.btn {
      background: linear-gradient(180deg, #ff5500 0%, #ea580c 100%);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.15);
      padding: 7px 14px;
      border-radius: 7px;
      cursor: pointer;
      font-size: 0.85rem;
      font-weight: 700;
      font-family: inherit;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      gap: 6px;
      box-shadow: 0 2px 4px rgba(234, 88, 12, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
      transition: all 0.15s ease;
    }

    button.btn:hover {
      background: linear-gradient(180deg, #ff6b1a 0%, #f97316 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35);
    }

    button.btn:active {
      transform: translateY(0);
      box-shadow: 0 1px 2px rgba(234, 88, 12, 0.2);
    }

    button.btn.secondary {
      background: #f1f5f9;
      color: #334155;
      border: 1px solid #cbd5e1;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    button.btn.secondary:hover {
      background: #e2e8f0;
      color: #0f172a;
      border-color: #94a3b8;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    }

    button.btn.danger {
      background: #fef2f2;
      color: #b91c1c;
      border: 1px solid #fecaca;
      box-shadow: 0 1px 2px rgba(185, 28, 28, 0.06);
    }

    button.btn.danger:hover {
      background: #fee2e2;
      border-color: #fca5a5;
      color: #991b1b;
      box-shadow: 0 2px 5px rgba(185, 28, 28, 0.12);
    }

    button.btn.success,
    button.btn.btn-pagar {
      background: #f0fdf4;
      color: #15803d;
      border: 1px solid #bbf7d0;
      box-shadow: 0 1px 2px rgba(21, 128, 61, 0.08);
    }

    button.btn.success:hover,
    button.btn.btn-pagar:hover {
      background: #dcfce7;
      border-color: #86efac;
      color: #14532d;
      box-shadow: 0 2px 5px rgba(21, 128, 61, 0.15);
    }

    button.btn.pdf {
      background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.15);
      box-shadow: 0 2px 5px rgba(220, 38, 38, 0.28);
    }

    button.btn.pdf:hover {
      background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
      box-shadow: 0 4px 8px rgba(220, 38, 38, 0.38);
    }

    button.btn.btn-sm {
      padding: 4px 9px;
      font-size: 0.76rem;
      height: 28px;
      border-radius: 6px;
      gap: 4px;
    }

    /* Tabela de Auditoria com linhas menores e mais compactas */
    .tabela-auditoria th,
    .tabela-auditoria td {
      padding: 5px 8px !important;
      font-size: 0.80rem !important;
      line-height: 1.25 !important;
    }

    .tabela-auditoria tr {
      height: 32px !important;
    }

    .tabela-auditoria .badge-acao {
      padding: 2px 6px;
      font-size: 0.70rem;
      border-radius: 4px;
      font-weight: 700;
    }

    /* Padrão Global de Tabelas (Idêntico ao Extrato & Conciliações / Lançamentos) */
    table th,
    table td,
    .tabela-lancamentos th,
    .tabela-lancamentos td,
    .panel table th,
    .panel table td,
    .table-container table th,
    .table-container table td {
      padding: 6px 8px !important;
      font-size: 0.81rem !important;
      line-height: 1.2 !important;
      vertical-align: middle !important;
    }

    table tr,
    .tabela-lancamentos tr,
    .panel table tr,
    .table-container table tr {
      height: 35px !important;
    }

    table th,
    .tabela-lancamentos th,
    .panel table th,
    .table-container table th {
      font-size: 0.76rem !important;
      font-weight: 700 !important;
      color: var(--text-muted) !important;
      background: #fafbfc !important;
      text-transform: none !important;
      letter-spacing: 0.01em !important;
      white-space: nowrap !important;
    }

    /* Estilos do Módulo de Reuniões */
    .badge-tipo-contato {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 7px;
      border-radius: 4px;
      font-size: 0.73rem;
      font-weight: 700;
    }

    .badge-tipo-contato.cliente {
      background: #e0f2fe;
      color: #0369a1;
      border: 1px solid #bae6fd;
    }

    .badge-tipo-contato.fornecedor {
      background: #f3e8ff;
      color: #7e22ce;
      border: 1px solid #e9d5ff;
    }

    .badge-tipo-contato.outro {
      background: #f1f5f9;
      color: #475569;
      border: 1px solid #cbd5e1;
    }
    button.btn.pdf:hover {
      background: #b91c1c;
    }

    button.btn.btn-pagar {
      background: #16a34a;
      color: #fff;
      border: none;
      box-shadow: 0 2px 5px rgba(22, 163, 74, 0.28);
    }

    button.btn.btn-pagar:hover {
      background: #15803d;
      box-shadow: 0 4px 8px rgba(22, 163, 74, 0.38);
    }

    button.btn-sm {
      padding: 5px 10px;
      font-size: 0.8rem;
      border-radius: 6px;
    }

    .toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
      flex-wrap: wrap;
      gap: 10px;
      min-height: 34px;
      position: sticky;
      top: 0;
      z-index: 35;
      background: #f1f5f9;
      padding: 12px 0 8px 0;
      margin-top: -16px;
      border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    }

    .toolbar p {
      font-size: 0.78rem !important;
      color: var(--text-muted);
      margin: 2px 0 0 !important;
    }

    .filters {
      display: flex;
      flex-wrap: wrap !important;
      gap: 10px 8px;
      align-items: flex-end;
      margin-bottom: 16px;
      padding: 10px 14px;
      background: #f8fafc;
      border-radius: 8px;
      border: 1px solid var(--border);
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }

    .filters .field {
      flex: 1 1 125px;
      min-width: 115px;
      box-sizing: border-box;
    }

    .filters .field label {
      font-size: 0.70rem;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: 3px;
      white-space: nowrap;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .filters .field input,
    .filters .field select {
      padding: 5px 8px;
      font-size: 0.82rem;
      border-radius: 6px;
      height: 34px;
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
    }

    .filters .field.search-field {
      flex: 2 1 180px;
      min-width: 160px;
    }

    .filters-actions {
      display: flex;
      gap: 6px;
      align-items: center;
      flex-shrink: 0;
      margin-bottom: 1px;
    }

    .filters-actions .btn {
      height: 34px;
      padding: 0 12px;
      font-size: 0.78rem;
      white-space: nowrap;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      width: 100%;
      box-sizing: border-box;
      align-items: flex-start;
    }

    .form-row .field {
      width: 100%;
      min-width: 0;
    }

    @media (max-width: 600px) {
      .form-row {
        grid-template-columns: 1fr;
      }
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 5px;
      width: 100%;
      box-sizing: border-box;
    }

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

    .field input,
    .field select,
    .field textarea {
      padding: 8px 11px;
      border: 1px solid var(--border);
      border-radius: 7px;
      font-size: 0.9rem;
      font-family: inherit;
      color: var(--text);
      background: #fff;
      transition: border-color 0.15s ease, box-shadow 0.15s ease;
      box-sizing: border-box;
      width: 100%;
    }

    .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .field select {
      height: 38px;
    }

    .input-with-action {
      display: flex;
      gap: 6px;
      align-items: center;
      width: 100%;
      box-sizing: border-box;
    }

    .input-with-action select,
    .input-with-action input {
      flex: 1 1 auto;
      min-width: 0;
      width: 100%;
      height: 38px !important;
      box-sizing: border-box;
    }

    .input-with-action .btn-plus-action {
      width: 38px !important;
      height: 38px !important;
      min-width: 38px !important;
      max-width: 38px !important;
      padding: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      border-radius: 7px !important;
      font-size: 1.25rem !important;
      font-weight: 800 !important;
      line-height: 1 !important;
      flex-shrink: 0 !important;
      cursor: pointer;
      box-sizing: border-box;
      background: var(--navy);
      color: #ffffff;
      border: 1px solid var(--navy);
      transition: all 0.15s ease;
    }

    .input-with-action .btn-plus-action:hover {
      background: var(--primary);
      border-color: var(--primary);
      color: #ffffff;
      transform: scale(1.04);
    }

    .field input:focus,
    .field select:focus,
    .field textarea:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.15);
    }

    .field textarea {
      resize: vertical;
      min-height: 60px;
    }

    /* Modal - Padrão Balão Rede Price */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(6, 19, 41, 0.72);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 50;
      padding: 16px;
      animation: fadeIn 0.15s ease-out;
    }

    .modal {
      background: #fff;
      border-radius: 14px;
      padding: 0;
      width: 100%;
      max-width: 560px;
      max-height: 94vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 35px -5px rgba(6, 19, 41, 0.4), 0 10px 15px -5px rgba(6, 19, 41, 0.2);
      border: 1px solid #cbd5e1;
      animation: fadeInDown 0.18s ease-out;
    }

    .modal-header {
      background: #061329;
      color: #fff;
      padding: 12px 18px;
      border-bottom: 2px solid var(--primary);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-shrink: 0;
    }

    .modal-header .modal-title,
    .modal-header h3 {
      color: #fff !important;
      margin: 0;
      font-size: 1rem;
      font-weight: 800;
      letter-spacing: -0.01em;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .modal-close-btn {
      background: rgba(255, 255, 255, 0.12);
      border: none;
      color: #fff;
      width: 26px;
      height: 26px;
      border-radius: 6px;
      font-size: 0.9rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s ease;
      flex-shrink: 0;
      line-height: 1;
    }

    .modal-close-btn:hover {
      background: var(--primary);
      color: #fff;
    }

    .modal form,
    .modal>div:not(.modal-header):not(.modal-footer) {
      padding: 14px 18px;
      overflow-y: auto;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 9px;
    }

    .modal .actions,
    .modal-footer {
      background: var(--primary);
      border-top: 3px solid rgba(0, 0, 0, 0.08);
      padding: 12px 18px;
      margin: 6px -18px -14px -18px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .modal .actions .btn,
    .modal-footer .btn {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      text-align: center !important;
      background: #061329 !important;
      color: #ffffff !important;
      border: 1px solid rgba(255, 255, 255, 0.2) !important;
      min-width: 100px;
      padding: 8px 16px;
      font-weight: 700;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
      transition: all 0.15s ease;
    }

    .modal .actions .btn:hover,
    .modal-footer .btn:hover {
      background: #0d2856 !important;
      color: #ffffff !important;
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
    }

    .modal .actions .btn.secondary,
    .modal-footer .btn.secondary {
      background: #0a1c38 !important;
      color: #ffffff !important;
      border: 1px solid rgba(255, 255, 255, 0.25) !important;
    }

    .modal .actions .btn.secondary:hover,
    .modal-footer .btn.secondary:hover {
      background: #142f5c !important;
      color: #ffffff !important;
    }

    .modal .actions .btn.danger,
    .modal-footer .btn.danger {
      background: #991b1b !important;
      color: #ffffff !important;
      border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }

    .modal .actions .btn.danger:hover,
    .modal-footer .btn.danger:hover {
      background: #b91c1c !important;
      color: #ffffff !important;
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    @media (max-width: 480px) {
      .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
      }
    }

    .hidden {
      display: none !important;
    }

    /* Ordenação de Tabelas */
    th.sortable {
      cursor: pointer !important;
      user-select: none;
      transition: background 0.15s ease, color 0.15s ease;
      position: relative;
    }

    th.sortable:hover {
      background: #f1f5f9 !important;
      color: var(--primary) !important;
    }

    .sort-icon {
      display: inline-block;
      font-size: 0.75rem;
      margin-left: 5px;
      opacity: 0.45;
      transition: opacity 0.15s ease, transform 0.15s ease;
      vertical-align: middle;
    }

    th.sortable:hover .sort-icon {
      opacity: 0.9;
    }

    th.sort-asc .sort-icon,
    th.sort-desc .sort-icon {
      opacity: 1;
      color: var(--primary);
      font-weight: 800;
    }

    /* Estilos do Extrato de Caixa */
    .caixa-row-clickable {
      cursor: pointer;
      transition: background 0.15s ease;
    }

    .caixa-row-clickable:hover {
      background: #fff5f0 !important;
    }

    .caixa-row-selected {
      background: #fff0e6 !important;
      box-shadow: inset 4px 0 0 var(--primary);
    }

    .extrato-panel {
      margin-top: 22px;
      border-top: 3px solid var(--primary);
      animation: fadeIn 0.2s ease-out;
    }

    .extrato-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }

    .extrato-title-box {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .extrato-title {
      margin: 0;
      font-size: 1.18rem;
      font-weight: 800;
      color: var(--navy);
    }

    .saldo-apos-pill {
      display: inline-block;
      padding: 3px 8px;
      border-radius: 6px;
      font-weight: 800;
      font-size: 0.88rem;
    }

    .saldo-apos-pill.pos {
      background: #dcfce7;
      color: #15803d;
    }

    .saldo-apos-pill.neg {
      background: #fee2e2;
      color: #b91c1c;
    }

    .hint-banner {
      background: #f8fafc;
      color: #475569;
      font-size: 0.83rem;
      padding: 8px 12px;
      border-radius: 6px;
      margin-bottom: 14px;
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* Estilos para Trilha de Auditoria */
    .badge-acao {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      border-radius: 6px;
      font-weight: 800;
      font-size: 0.75rem;
      letter-spacing: 0.02em;
      text-transform: none;
    }

    .badge-acao.inclusao {
      background: #dcfce7;
      color: #15803d;
      border: 1px solid #86efac;
    }

    .badge-acao.alteracao {
      background: #fef3c7;
      color: #b45309;
      border: 1px solid #fde68a;
    }

    .badge-acao.exclusao {
      background: #fee2e2;
      color: #b91c1c;
      border: 1px solid #fca5a5;
    }

    .diff-container {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .diff-item {
      font-size: 0.82rem;
      background: #f8fafc;
      padding: 4px 8px;
      border-radius: 5px;
      border-left: 3px solid var(--primary);
      display: inline-block;
      border-top: 3px solid #e2e8f0;
      border-right: 1px solid #e2e8f0;
      border-bottom: 1px solid #e2e8f0;
    }

    .diff-key {
      font-weight: 700;
      color: #475569;
      text-transform: uppercase;
      font-size: 0.72rem;
      margin-right: 5px;
    }

    .diff-old {
      color: #dc2626;
      text-decoration: line-through;
      margin-right: 4px;
      font-weight: 600;
    }

    .diff-arrow {
      color: #ff5500;
      font-weight: 800;
      margin-right: 4px;
    }

    .diff-new {
      color: #16a34a;
      font-weight: 800;
    }

    .json-box {
      background: #061329;
      color: #38bdf8;
      padding: 12px;
      border-radius: 6px;
      font-family: monospace;
      font-size: 0.8rem;
      max-height: 260px;
      overflow-y: auto;
      white-space: pre-wrap;
      word-break: break-all;
      border: 1px solid #1e293b;
    }

    /* Thumbs de Comprovantes na Tabela */
    .thumbs {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
    }

    .thumb-btn {
      position: relative;
      width: 44px;
      height: 44px;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid var(--border);
      background: #f8fafc;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .thumb-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
      border-color: var(--primary);
    }

    .thumb-btn img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .thumb-pdf {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      background: #fef2f2;
      color: #dc2626;
      font-size: 0.65rem;
      font-weight: 700;
    }

    .thumb-pdf svg {
      width: 18px;
      height: 18px;
      margin-bottom: 1px;
    }

    /* Upload & Preview nos Formulários */
    .attachment-upload-zone {
      border: 2px dashed #cbd5e1;
      border-radius: 8px;
      padding: 14px;
      background: #f8fafc;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .attachment-upload-zone:hover,
    .attachment-upload-zone.dragover {
      border-color: var(--primary);
      background: #fff5f0;
    }

    .attachment-upload-zone .upload-icon {
      font-size: 1.5rem;
      margin-bottom: 4px;
    }

    .attachment-upload-zone .upload-text {
      font-size: 0.85rem;
      color: var(--text);
      font-weight: 600;
    }

    .attachment-upload-zone .upload-hint {
      font-size: 0.75rem;
      color: var(--text-muted);
      margin-top: 2px;
    }

    .attachment-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-top: 8px;
    }

    .attachment-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 6px 10px;
      gap: 8px;
      font-size: 0.83rem;
      transition: background 0.15s;
    }

    .attachment-item.to-delete {
      background: #fee2e2;
      border-color: #fca5a5;
      opacity: 0.8;
      text-decoration: line-through;
    }

    .attachment-item-preview {
      width: 34px;
      height: 34px;
      border-radius: 4px;
      overflow: hidden;
      background: #f1f5f9;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border);
      flex-shrink: 0;
    }

    .attachment-item-preview img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .attachment-item-name {
      flex: 1;
      font-weight: 600;
      color: var(--navy);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 250px;
    }

    .attachment-item-size {
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-left: 6px;
    }

    .attachment-btn-del {
      background: none;
      border: none;
      color: #dc2626;
      cursor: pointer;
      font-size: 1.1rem;
      padding: 2px 6px;
      border-radius: 4px;
      transition: background 0.15s;
    }

    .attachment-btn-del:hover {
      background: #fee2e2;
    }

    /* Lightbox Modal */
    .lightbox-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(6, 19, 41, 0.92);
      backdrop-filter: blur(6px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      animation: fadeIn 0.15s ease-out;
    }

    .lightbox-content {
      position: relative;
      max-width: 92vw;
      max-height: 90vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .lightbox-img {
      max-width: 90vw;
      max-height: 82vh;
      object-fit: contain;
      border-radius: 8px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .lightbox-pdf {
      width: 90vw;
      max-width: 1000px;
      height: 82vh;
      border: none;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .lightbox-nav-btn.prev {
      left: 4px;
    }

    .lightbox-nav-btn.next {
      right: 4px;
    }

    .alert {
      padding: 10px 14px;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      text-align: left;
    }

    .alert.error {
      background: #fee2e2 !important;
      color: #991b1b !important;
      border: 1px solid #f87171 !important;
    }

    .alert.success {
      background: #dcfce7 !important;
      color: #166534 !important;
      border: 1px solid #4ade80 !important;
    }

    .alert.warning {
      background: #fef3c7 !important;
      color: #92400e !important;
      border: 1px solid #fcd34d !important;
    }

    /* =========================================================================
       SISTEMA RESPONSIVO: COMPONENTES MOBILE & GAVETA (DRAWER)
       ========================================================================= */
    .mobile-header {
      display: none;
      align-items: center;
      justify-content: space-between;
      height: 56px;
      background: var(--navy);
      padding: 0 14px;
      color: #fff;
      position: sticky;
      top: 0;
      z-index: 90;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .btn-mobile-menu {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #fff;
      border-radius: 8px;
      width: 38px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.2s;
    }

    .btn-mobile-menu:active {
      background: rgba(255, 255, 255, 0.2);
    }

    .mobile-header-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      overflow: hidden;
      margin: 0 8px;
    }

    .mobile-logo {
      height: 28px;
      width: auto;
      object-fit: contain;
    }

    .mobile-header-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #fff;
      letter-spacing: -0.3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .btn-mobile-logout {
      background: rgba(239, 68, 68, 0.15);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: #fca5a5;
      border-radius: 8px;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.9rem;
    }

    .sidebar-backdrop {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(6, 19, 41, 0.65);
      backdrop-filter: blur(3px);
      -webkit-backdrop-filter: blur(3px);
      z-index: 998;
      opacity: 0;
      transition: opacity 0.25s ease;
    }

    .sidebar-backdrop.active {
      display: block;
      opacity: 1;
    }

    /* ==========================================================================
       TIMELINE DE AUDITORIA (#7)
       ========================================================================== */
    .audit-date-group {
      margin-bottom: 24px;
    }

    .audit-date-header {
      font-size: 0.85rem;
      font-weight: 800;
      color: var(--navy);
      background: #f1f5f9;
      border: 1px solid #e2e8f0;
      display: inline-block;
      padding: 4px 14px;
      border-radius: 20px;
      margin-bottom: 14px;
      letter-spacing: -0.01em;
      text-transform: capitalize;
    }

    .audit-timeline {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding-left: 6px;
    }

    .audit-card {
      display: flex;
      gap: 14px;
      position: relative;
    }

    .audit-connector {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 32px;
      flex-shrink: 0;
    }

    .audit-icon {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.82rem;
      background: #fff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
      border: 2px solid #e2e8f0;
      z-index: 2;
    }

    .audit-icon.inclusao {
      border-color: #16a34a;
      background: #f0fdf4;
    }

    .audit-icon.alteracao {
      border-color: #f59e0b;
      background: #fffbeb;
    }

    .audit-icon.exclusao {
      border-color: #ef4444;
      background: #fef2f2;
    }

    .audit-line {
      flex: 1;
      width: 2px;
      background: #e2e8f0;
      margin-top: 4px;
      margin-bottom: -12px;
    }

    .audit-card:last-child .audit-line {
      display: none;
    }

    .audit-content {
      flex: 1;
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      padding: 12px 16px;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
      transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .audit-content:hover {
      border-color: #cbd5e1;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .audit-card.inclusao .audit-content {
      border-left: 3px solid #16a34a;
    }

    .audit-card.alteracao .audit-content {
      border-left: 3px solid #f59e0b;
    }

    .audit-card.exclusao .audit-content {
      border-left: 3px solid #ef4444;
    }

    .audit-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 8px;
      padding-bottom: 6px;
      border-bottom: 1px solid #f1f5f9;
    }

    .audit-card-left {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .audit-entity {
      font-size: 0.88rem;
      color: #0f172a;
    }

    .audit-card-right {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .audit-user {
      font-size: 0.76rem;
      font-weight: 600;
      background: #f1f5f9;
      color: #334155;
      padding: 2px 8px;
      border-radius: 10px;
    }

    .audit-time {
      font-size: 0.78rem;
      color: var(--text-muted);
      font-weight: 600;
    }

    .audit-card-body {
      font-size: 0.85rem;
      color: #334155;
      margin-bottom: 8px;
    }

    .audit-desc {
      font-weight: 600;
      color: #1e293b;
      margin-bottom: 6px;
    }

    .audit-changes {
      background: #f8fafc;
      border-radius: 6px;
      padding: 8px 10px;
      border: 1px solid #edf2f7;
    }

    .audit-card-footer {
      display: flex;
      justify-content: flex-end;
    }
