/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Filtros de Transação
   ========================================================================== */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px 14px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.filter-actions-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* ==========================================================================
   INPUTS & SELECTS DROPDOWNS (PADRÃO FINTECH PREMIUM)
   ========================================================================== */
.input-wrapper {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all var(--transition-fast);
  cursor: pointer;
  box-sizing: border-box;
}

.input-wrapper:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.input-wrapper:focus-within,
.input-wrapper.is-dropdown-open {
  background-color: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3.5px rgba(29, 104, 216, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.input-icon-left {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b;
  margin-right: 10px;
  flex-shrink: 0 !important;
  transition: color var(--transition-fast);
}

.input-wrapper:focus-within .input-icon-left,
.input-wrapper.is-dropdown-open .input-icon-left {
  color: var(--primary-blue);
}

.input-icon-left svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.input-icon-right {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b;
  margin-left: auto;
  pointer-events: none;
  flex-shrink: 0 !important;
  width: 18px;
  height: 18px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-icon-right svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.input-wrapper:hover .input-icon-right {
  color: #334155;
}

.input-wrapper:focus-within .input-icon-right,
.input-wrapper.is-dropdown-open .input-icon-right {
  color: var(--primary-blue);
  transform: rotate(180deg);
}

/* Custom Dropdown Trigger Display Text */
.custom-select-trigger-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  cursor: pointer;
  padding-right: 10px;
  line-height: normal;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.custom-select-trigger-text .custom-select-trigger-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.custom-select-trigger-text.is-placeholder {
  color: #64748b;
  font-weight: 500;
}

/* Floating Custom Dropdown Menu */
.custom-select-floating-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14), 0 4px 10px rgba(15, 23, 42, 0.05);
  padding: 6px;
  z-index: 1100;
  animation: dropdownPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@keyframes dropdownPopIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Search Box inside Custom Dropdown */
.custom-select-search-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 6px 4px 10px;
  height: 36px;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.search-input-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.search-input-inner svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

.custom-select-search-input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
  outline: none;
  font-family: inherit;
}

.custom-select-search-input::placeholder {
  color: #94a3b8;
}

.custom-select-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.custom-select-view-toggle:hover {
  background: #eff6ff;
  color: #1d68d8;
  border-color: #bfdbfe;
}

.custom-select-view-toggle svg {
  width: 12px;
  height: 12px;
}

/* Options List Container */
.custom-select-options-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}

.custom-select-options-list::-webkit-scrollbar {
  width: 5px;
}
.custom-select-options-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.custom-select-options-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.custom-select-options-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Section Headers for Categorized Levels */
.custom-select-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 5px;
  margin-top: 5px;
  margin-bottom: 2px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 6px;
  user-select: none;
}

.custom-select-section-header .section-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.custom-select-section-header .section-header-title {
  font-size: 11.5px;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #0f172a !important;
}

.custom-select-section-header .section-header-count {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Level Pills / Badges */
.level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 2px 7px;
  border-radius: 5px;
  line-height: 1.2;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Nível 0: PRETO (Conforme solicitado) */
.level-pill-0 {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Nível 1: AMARELO (Conforme solicitado) */
.level-pill-1 {
  background-color: #fef08a !important;
  color: #713f12 !important;
  border: 1px solid #facc15 !important;
  box-shadow: 0 1px 2px rgba(234, 179, 8, 0.12);
}

/* Nível 2: AZUL FINTECH */
.level-pill-2 {
  background-color: #eff6ff !important;
  color: #1d68d8 !important;
  border: 1px solid #bfdbfe !important;
}

/* Nível 3: VERDE ESMERALDA */
.level-pill-3 {
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

/* Nível 4: ROXO LILÁS */
.level-pill-4 {
  background-color: #f5f3ff !important;
  color: #6d28d9 !important;
  border: 1px solid #ddd6fe !important;
}

/* Nível 5: LARANJA PÊSSEGO */
.level-pill-5 {
  background-color: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #fed7aa !important;
}

/* Níveis 6+: ARDÓSIA (Rede Profunda) */
.level-pill-6, .level-pill-7, .level-pill-8, .level-pill-9 {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}

/* Custom Option Item */
.custom-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

/* Hover em itens NÃO selecionados: fundo amarelo fraco/suave */
.custom-select-item:hover:not(.is-selected) {
  background-color: #fffbeb;
  color: #0f172a;
}

/* Item SELECIONADO / MARCADO: fundo preto suave, letra em destaque branca, check amarelo */
.custom-select-item.is-selected {
  background-color: #1e293b;
  color: #ffffff;
  font-weight: 700;
}

.custom-select-item.is-selected:hover {
  background-color: #0f172a;
  color: #ffffff;
}

.custom-select-item .custom-item-check {
  display: none;
  width: 15px;
  height: 15px;
  color: #fbbf24;
  stroke-width: 2.8;
}

.custom-select-item.is-selected .custom-item-check {
  display: inline-flex;
}

/* Item Content & Hierarchy Indentation */
.select-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.select-item-name {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}

/* Mini Info Button on hover */
.select-item-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: #94a3b8;
  background: transparent;
  transition: all 0.15s ease;
  position: relative;
  cursor: help;
  flex-shrink: 0;
}

.custom-select-item:hover .select-item-info-btn {
  color: #64748b;
}

.custom-select-item.is-selected .select-item-info-btn {
  color: #cbd5e1;
}

.select-item-info-btn:hover {
  color: #1d68d8 !important;
  background: #eff6ff !important;
}

.select-item-info-btn svg {
  width: 13px;
  height: 13px;
}

/* Tooltip flutuante suave */
.custom-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 6px);
  right: -6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
  pointer-events: none;
  z-index: 1200;
  transition: opacity 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(4px);
}

.custom-tooltip strong {
  color: #60a5fa;
  font-weight: 700;
}

.custom-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 11px;
  border-width: 4px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.select-item-info-btn:hover .custom-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.tree-branch-symbol {
  font-family: monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 4px;
  user-select: none;
}

.custom-select-empty-msg {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.custom-select {
  display: none !important;
}

.custom-select option {
  background-color: #ffffff;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 14px;
}

.custom-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  cursor: text;
}

.custom-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

/* Date input styling */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Card Frame & Dropdown for Network Position (Indicado por) */
#groupUserParentId {
  grid-column: span 2;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  transition: all 0.2s ease;
}

#groupUserParentId:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

#uplineAdminSelectWrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#uplineAdminSelectWrapper:hover {
  border-color: #94a3b8 !important;
  background-color: #f8fafc !important;
}

#uplineAdminSelectWrapper:focus-within,
#uplineAdminSelectWrapper.is-dropdown-open {
  border-color: var(--primary-blue, #1d68d8) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3.5px rgba(29, 104, 216, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

#uplineAdminSelectWrapper .input-icon-left {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--primary-blue, #1d68d8) !important;
  margin-right: 10px !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
}

#uplineAdminSelectWrapper .custom-select-trigger-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  padding-right: 10px !important;
  line-height: normal !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#uplineAdminSelectWrapper .input-icon-right {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
}

#uplineAdminSelectWrapper.is-dropdown-open .input-icon-right {
  transform: rotate(180deg) !important;
  color: var(--primary-blue, #1d68d8) !important;
}

/* Row 3 - Spread and Valor */
.filters-row-3 {
  grid-column: span 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 6px;
}

.filters-row-3-left {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: calc(40% - 6px);
}

.filters-row-3-left .filter-group {
  width: 100%;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  user-select: none;
}

.btn-ghost {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: #475569;
}

.btn-ghost:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-primary-green {
  background-color: #0f172a;
  color: #facc15;
  padding: 0 22px;
  font-weight: 700;
  border: 1px solid #1e293b;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.btn-primary-green:hover {
  background-color: #1e293b;
  color: #fde047;
  border-color: #facc15;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.btn-primary-green:active {
  transform: translateY(0);
}

.btn-primary-green svg {
  width: 16px;
  height: 16px;
  color: #facc15;
  stroke: #facc15;
  stroke-width: 2.2;
}

.btn-primary-green:hover svg {
  color: #fde047;
  stroke: #fde047;
}

.btn-primary-blue {
  background-color: #facc15;
  color: #0f172a;
  padding: 0 18px;
  height: 38px;
  font-weight: 700;
  border: 1px solid #eab308;
  box-shadow: 0 2px 5px rgba(234, 179, 8, 0.25);
}

.btn-primary-blue:hover {
  background-color: #eab308;
  color: #000000;
  border-color: #ca8a04;
  box-shadow: 0 4px 10px rgba(234, 179, 8, 0.35);
  transform: translateY(-1px);
}

.btn-primary-blue svg {
  width: 16px;
  height: 16px;
  color: #0f172a;
  stroke: #0f172a;
  stroke-width: 2.2;
}

.btn-primary-blue:hover svg {
  color: #000000;
  stroke: #000000;
}

/* ==========================================================================
   Card de Totais (KPIs Fintech Modern Grid)
   ========================================================================== */
.kpi-card {
  padding: 16px 20px !important;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.kpi-fintech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.kpi-fintech-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
  position: relative;
}

.kpi-fintech-tile:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.kpi-tile-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-tile-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-tile-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.kpi-tile-icon.icon-slate {
  background: #e2e8f0;
  color: #334155;
}

.kpi-tile-icon.icon-blue {
  background: #dbeafe;
  color: #1d68d8;
}

.kpi-tile-icon.icon-emerald {
  background: #dcfce7;
  color: #059669;
}

.kpi-tile-icon.icon-amber {
  background: #fef3c7;
  color: #d97706;
}

.kpi-tile-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-tile-value {
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-tile-value.val-slate {
  color: #0f172a;
}

.kpi-tile-value.val-blue {
  color: #1d68d8;
}

.kpi-tile-value.val-emerald {
  color: #059669;
}

.kpi-tile-value.val-amber {
  color: #d97706;
}

/* Subtle Highlights */
.kpi-fintech-tile.highlight-blue {
  background: #f8faff;
  border-color: #dbeafe;
}
.kpi-fintech-tile.highlight-blue:hover {
  border-color: #bfdbfe;
}

.kpi-fintech-tile.highlight-emerald {
  background: #f6fdf9;
  border-color: #dcfce7;
}
.kpi-fintech-tile.highlight-emerald:hover {
  border-color: #bbf7d0;
}

.kpi-fintech-tile.highlight-amber {
  background: #fffdf5;
  border-color: #fef3c7;
}
.kpi-fintech-tile.highlight-amber:hover {
  border-color: #fde68a;
}

/* Responsiveness */
@media (max-width: 640px) {
  .kpi-fintech-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Transações Detalhadas
   ========================================================================== */
.transactions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.table-search {
  max-width: 320px;
  width: 100%;
}

.table-meta-count {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #edf2f7;
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background-color: #ffffff;
  color: #64748b;
  font-weight: 600;
  padding: 16px 16px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
  font-size: 13px;
  vertical-align: middle;
}

.data-table th.sortable {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.data-table th.sortable:hover {
  color: var(--primary-blue);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  white-space: nowrap;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color var(--transition-fast);
  height: 64px;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

.data-table tbody tr:hover td {
  background-color: #f8fafc;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Custom Table Components - Perfect Vertical Alignment */
.cell-terminal {
  font-weight: 700;
  color: #0f172a;
  font-size: 13.5px;
  vertical-align: middle;
}

.cell-company {
  font-weight: 700;
  color: #1e293b;
  font-size: 13px;
  max-width: 220px;
  min-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.cell-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  line-height: 1.2;
  vertical-align: middle;
}

.date-day {
  font-weight: 600;
  color: #0f172a;
  font-size: 13px;
}

.date-time {
  font-size: 12px;
  color: #64748b;
}

.cell-payment {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 215px;
  min-width: 215px;
  vertical-align: middle;
}

.payment-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  line-height: 1.2;
  width: 140px;
  min-width: 140px;
  flex-shrink: 0;
  position: relative;
}

.payment-method-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  position: relative;
  display: inline-block;
}

/* Tooltip flutuante refinado ao passar o mouse */
.payment-info:hover .payment-method-name[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.35), 0 4px 6px -2px rgba(15, 23, 42, 0.15);
  pointer-events: none;
  z-index: 1200;
  animation: tooltipFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
}

.payment-info:hover .payment-method-name[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 14px;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
  pointer-events: none;
  z-index: 1200;
  animation: tooltipFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.payment-installments {
  font-size: 11.5px;
  color: #64748b;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 28px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  padding: 2px 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.brand-badge svg,
.brand-badge img {
  width: 100%;
  height: 100%;
  max-width: 36px;
  max-height: 20px;
  object-fit: contain;
  display: block;
}

/* Solid Status Pills matching screenshot */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.01em;
  line-height: 1;
}

.status-pill.status-approved {
  background-color: #00ba50;
}

.status-pill.status-rejected {
  background-color: #ef4444;
}

.status-pill.status-pending {
  background-color: #f59e0b;
}

.status-pill.status-refunded {
  background-color: #64748b;
}

/* Color Coded Amounts */
.cell-tax {
  font-weight: 500;
  color: #334155;
  font-size: 13px;
  vertical-align: middle;
}

.cell-gross {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
  vertical-align: middle;
}

.cell-net {
  font-weight: 700;
  color: #1d68d8;
  font-size: 14px;
  vertical-align: middle;
}

.cell-spread {
  font-weight: 700;
  color: #00ba50;
  font-size: 14px;
  vertical-align: middle;
}

.cell-client-paid {
  color: #94a3b8;
  font-weight: 500;
  font-size: 14px;
  vertical-align: middle;
}
.badge-refunded .badge-dot {
  background-color: #64748b;
}

/* Table Actions */
.table-action-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: #64748b;
  transition: all var(--transition-fast);
}

.table-action-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.table-action-btn svg {
  width: 16px;
  height: 16px;
}

/* Pagination */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 4px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: #64748b;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.page-btn.active {
  background-color: #facc15;
  color: #0f172a;
  border-color: #eab308;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(234, 179, 8, 0.25);
}

.page-btn.active:hover {
  background-color: #eab308;
  color: #000000;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   Seção de Empresas
   ========================================================================== */
.companies-search-card {
  display: flex;
  flex-direction: column;
}

.search-top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.search-main-input {
  flex: 1;
}

.search-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-bottom-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.companies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cell-company-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13px;
}

.cell-owner {
  color: #334155;
  font-weight: 600;
  font-size: 13px;
}

.cell-email {
  color: #475569;
  font-size: 13px;
}

.cell-contact {
  color: #475569;
  font-size: 13px;
}

.cell-created-at {
  color: #334155;
  font-weight: 500;
  font-size: 13px;
}

.badge-company-active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  background-color: #ecfdf5;
  color: #059669;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.badge-company-inactive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  background-color: #f1f5f9;
  color: #64748b;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.btn-delete-company {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #ef4444;
  transition: all var(--transition-fast);
}

.btn-delete-company:hover {
  background-color: #fef2f2;
  color: #dc2626;
}

.btn-delete-company svg {
  width: 16px;
  height: 16px;
}

.btn-edit-company,
.btn-edit-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #0f172a; /* Ícone de Lápis Preto padronizado */
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-edit-company:hover,
.btn-edit-user:hover {
  background-color: #f1f5f9;
  color: #000000;
  border-color: #e2e8f0;
}

.btn-edit-company svg,
.btn-edit-user svg {
  width: 16px;
  height: 16px;
  stroke: #0f172a;
}

.btn-edit-company:hover svg,
.btn-edit-user:hover svg {
  stroke: #000000;
}

/* Linhas Clicáveis nas Tabelas (Clientes e Vendedores) */
.data-table tbody tr.clickable-row {
  cursor: pointer;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.data-table tbody tr.clickable-row:hover {
  background-color: #f8fafc !important;
}

.data-table tbody tr.clickable-row:active {
  background-color: #f1f5f9 !important;
}

/* Botão de Dossiê do Cliente (Tabela de Empresas) */
.btn-view-dossier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #0284c7;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  transition: all var(--transition-fast);
  cursor: pointer;
  margin-right: 4px;
}

.btn-view-dossier:hover {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-view-dossier svg {
  width: 16px;
  height: 16px;
}

/* Cards do Dossiê */
.dossier-doc-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.dossier-doc-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.dossier-doc-preview-area {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.dossier-doc-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.dossier-doc-thumb:hover {
  transform: scale(1.03);
}

/* ==========================================================================
   Seção de Dashboard
   ========================================================================== */
.dashboard-top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-refresh:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-refresh svg {
  width: 16px;
  height: 16px;
  transition: transform 0.5s ease;
}

.btn-refresh.spinning svg {
  transform: rotate(360deg);
}

.dashboard-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.dash-stat-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 145px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-label {
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
}

.dash-card-icon {
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-card-icon svg {
  width: 18px;
  height: 18px;
}

.dash-card-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 10px 0;
  line-height: 1.1;
}

.dash-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #d97706;
  text-decoration: none;
  cursor: pointer;
  transition: gap 0.2s ease, color var(--transition-fast);
  padding: 0;
  background: none;
  border: none;
}

.dash-card-link:hover {
  color: #b45309;
  gap: 9px;
}

.dash-card-link svg {
  width: 14px;
  height: 14px;
  color: #d97706;
  stroke: #d97706;
}

.dash-card-link:hover svg {
  color: #b45309;
  stroke: #b45309;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
}

.modal-close {
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: #0f172a;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  color: #1e293b;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success {
  border-left: 4px solid var(--primary-green);
}

.toast-success svg {
  color: var(--primary-green);
}

.toast-danger,
.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-danger svg,
.toast-error svg {
  color: #ef4444;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning svg {
  color: #f59e0b;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info svg {
  color: #3b82f6;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 1280px) {
  .filters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .kpi-row-top {
    grid-template-columns: repeat(2, 1fr);
  }
  .kpi-row-bottom {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
  .filter-actions {
    justify-content: flex-end;
  }
  .kpi-row-top {
    grid-template-columns: 1fr;
  }
  .kpi-row-bottom {
    flex-direction: column;
    gap: 20px;
  }
}

/* ==========================================================================
   SEÇÃO DE COMISSÕES (EXTRATO & GESTÃO DE REPASSES)
   ========================================================================== */
.commissions-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.com-metric-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.com-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.com-metric-icon.icon-emerald {
  background: #ecfdf5;
  color: #059669;
}

.com-metric-icon.icon-blue {
  background: #eff6ff;
  color: #1d68d8;
}

.com-metric-icon.icon-purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.com-metric-icon.icon-amber {
  background: #fefce8;
  color: #d97706;
}

.com-metric-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.com-metric-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.com-metric-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
}

.badge-com-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.badge-com-type.direct {
  background: #eff6ff;
  color: #1d68d8;
  border: 1px solid #bfdbfe;
}

.badge-com-type.network {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.badge-com-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
}

.badge-com-status.paga {
  background: #ecfdf5;
  color: #059669;
}

.badge-com-status.pendente {
  background: #fffbeb;
  color: #d97706;
}

.badge-com-status.processando {
  background: #eff6ff;
  color: #2563eb;
}

@media (max-width: 1024px) {
  .commissions-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .commissions-metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CONTROLE DE ALÍQUOTA DE COMISSÃO (DESIGN PREMIUM & FINTECH LUXURY)
   ========================================================================== */

.premium-rate-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rate-badge-capsule {
  display: inline-flex;
  align-items: center;
  position: relative;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px 8px 3px 10px;
  height: 36px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.02);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.rate-badge-capsule:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 0 0 1px #cbd5e1;
  transform: translateY(-1px);
}

.rate-badge-capsule:focus-within {
  border-color: #059669;
  background-color: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(5, 150, 105, 0.15), 0 3px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.rate-prefix-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  margin-right: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.rate-badge-capsule:hover .rate-prefix-dot,
.rate-badge-capsule:focus-within .rate-prefix-dot {
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.9);
  transform: scale(1.15);
}

.rate-core-input {
  width: 56px;
  height: 28px;
  padding: 0 2px;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  outline: none;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color 0.15s ease;
}

.rate-badge-capsule:focus-within .rate-core-input {
  cursor: text;
  color: #047857;
}

/* Chrome, Safari, Edge, Opera: remover spinners */
.rate-core-input::-webkit-outer-spin-button,
.rate-core-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Firefox */
.rate-core-input[type=number] {
  -moz-appearance: textfield;
}

.rate-suffix-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
  background-color: #f1f5f9;
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 5px;
  user-select: none;
  transition: all 0.15s ease;
}

.rate-badge-capsule:hover .rate-suffix-badge,
.rate-badge-capsule:focus-within .rate-suffix-badge {
  background-color: #dcfce7;
  color: #059669;
}

/* Botão Salvar Dinâmico com Visual Premium */
.btn-rate-save-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  background: #0f172a;
  color: #facc15;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  animation: popInSpring 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-rate-save-pulse:hover {
  background: #1e293b;
  color: #fde047;
  border-color: #facc15;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.btn-rate-save-pulse:active {
  transform: translateY(0);
}

.btn-rate-save-pulse svg {
  width: 14px;
  height: 14px;
  color: #facc15;
  stroke: #facc15;
  stroke-width: 2.5;
}

.btn-rate-save-pulse:hover svg {
  color: #fde047;
  stroke: #fde047;
}

@keyframes popInSpring {
  0% {
    opacity: 0;
    transform: scale(0.9) translateX(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

/* ==========================================================================
   Document Upload Boxes (Fotos e Comprovantes de Cadastro)
   ========================================================================== */
.doc-upload-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.doc-upload-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-upload-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d68d8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-upload-icon svg {
  width: 16px;
  height: 16px;
}

.doc-upload-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.doc-upload-sub {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.doc-upload-zone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-upload-zone:hover {
  border-color: #1d68d8;
  background: #eff6ff;
}

.doc-upload-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.doc-upload-prompt svg {
  width: 15px;
  height: 15px;
  color: #1d68d8;
}

.doc-preview-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 4px;
}

.doc-thumb-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
}

.doc-generic-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  overflow: hidden;
}

.doc-file-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  text-align: left;
}

.btn-remove-doc {
  background: #fee2e2;
  border: none;
  color: #ef4444;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.btn-remove-doc:hover {
  background: #fecaca;
}

.doc-upload-box.has-error {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.doc-upload-box.has-error .doc-upload-zone {
  border-color: #ef4444 !important;
  background: #ffffff;
}

.doc-upload-box.has-error .doc-upload-title {
  color: #b91c1c;
}

/* ==========================================================================
   QUADRO DE VENDEDORES: CORES SUAVES E SUTIS POR NÍVEL (LINHAS DA TABELA)
   ========================================================================== */
.seller-row-level {
  transition: background-color 0.15s ease, border-left-color 0.15s ease;
}

/* Nível 0: Preto Suave & Sutil */
.seller-row-level.seller-level-0 {
  background-color: rgba(15, 23, 42, 0.035) !important;
  border-left: 3.5px solid #0f172a !important;
}
.seller-row-level.seller-level-0:hover {
  background-color: rgba(15, 23, 42, 0.07) !important;
}

/* Nível 1: Amarelo Suave & Sutil */
.seller-row-level.seller-level-1 {
  background-color: rgba(254, 240, 138, 0.22) !important;
  border-left: 3.5px solid #eab308 !important;
}
.seller-row-level.seller-level-1:hover {
  background-color: rgba(254, 240, 138, 0.38) !important;
}

/* Nível 2: Azul Suave & Sutil */
.seller-row-level.seller-level-2 {
  background-color: rgba(239, 246, 255, 0.65) !important;
  border-left: 3.5px solid #3b82f6 !important;
}
.seller-row-level.seller-level-2:hover {
  background-color: rgba(219, 234, 254, 0.75) !important;
}

/* Nível 3: Verde Esmeralda Suave & Sutil */
.seller-row-level.seller-level-3 {
  background-color: rgba(236, 253, 245, 0.65) !important;
  border-left: 3.5px solid #10b981 !important;
}
.seller-row-level.seller-level-3:hover {
  background-color: rgba(209, 250, 229, 0.75) !important;
}

/* Nível 4: Roxo Lilás Suave & Sutil */
.seller-row-level.seller-level-4 {
  background-color: rgba(245, 243, 255, 0.65) !important;
  border-left: 3.5px solid #8b5cf6 !important;
}
.seller-row-level.seller-level-4:hover {
  background-color: rgba(237, 233, 254, 0.75) !important;
}

/* Nível 5: Laranja Pêssego Suave & Sutil */
.seller-row-level.seller-level-5 {
  background-color: rgba(255, 247, 237, 0.65) !important;
  border-left: 3.5px solid #f97316 !important;
}
.seller-row-level.seller-level-5:hover {
  background-color: rgba(254, 237, 213, 0.75) !important;
}

/* Níveis 6+: Ardósia Suave & Sutil (Rede Estendida) */
.seller-row-level.seller-level-6,
.seller-row-level.seller-level-7,
.seller-row-level.seller-level-8,
.seller-row-level.seller-level-9 {
  background-color: rgba(241, 245, 249, 0.5) !important;
  border-left: 3.5px solid #64748b !important;
}
.seller-row-level.seller-level-6:hover,
.seller-row-level.seller-level-7:hover,
.seller-row-level.seller-level-8:hover,
.seller-row-level.seller-level-9:hover {
  background-color: rgba(226, 232, 240, 0.65) !important;
}

/* Dropdown de Configurações de Vendedores */
.seller-settings-dropdown-wrapper {
  position: relative;
}

.seller-settings-dropdown-menu.show {
  display: block !important;
}

.seller-settings-dropdown-item {
  transition: background-color 0.15s ease;
}

.seller-settings-dropdown-item:hover {
  background-color: #f8fafc !important;
}

/* ==========================================================================
   TABELA DE CLIENTES (#companiesTable) - AJUSTE RESPONSIVO E VISIBILIDADE TOTAL
   ========================================================================== */
#companiesTable {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

#companiesTable th {
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  vertical-align: middle;
}

#companiesTable th.sortable:hover {
  color: #1d68d8;
  background-color: #f1f5f9;
}

#companiesTable td {
  padding: 7px 8px;
  font-size: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  height: 48px;
}

#companiesTable tbody tr {
  height: 48px;
  transition: background-color 0.15s ease;
}

#companiesTable tbody tr:hover {
  background-color: #f8fafc;
}

/* Coluna Checkbox */
#companiesTable th:first-child,
#companiesTable td:first-child {
  padding-left: 8px;
  padding-right: 4px;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
}

/* Coluna Nome do Cliente */
#companiesTable .cell-company-name {
  max-width: 190px;
  min-width: 130px;
}

#companiesTable .company-name-wrapper {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

#companiesTable .company-type-icon {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}

#companiesTable .company-info-text {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

#companiesTable .company-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

#companiesTable .company-badge-type {
  display: block;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  margin-top: 1px;
}

#companiesTable .company-badge-type.type-pf {
  color: #16a34a;
}

#companiesTable .company-badge-type.type-pj {
  color: #2563eb;
}

/* Coluna Documento (CPF / CNPJ) */
#companiesTable .cell-doc {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11.5px;
  color: #334155;
  white-space: nowrap;
  letter-spacing: -0.2px;
  width: 125px;
}

/* Coluna Vendedor */
#companiesTable .cell-partner {
  max-width: 125px;
  min-width: 85px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#companiesTable .partner-name-text {
  display: block;
  font-weight: 600;
  color: #0f172a;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#companiesTable .partner-pending-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.15;
}

#companiesTable .partner-pending-tag {
  color: #d97706;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

#companiesTable .partner-sub-text {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Coluna Comissão */
#companiesTable .badge-commission {
  padding: 2px 7px !important;
  font-size: 11px !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Coluna Email */
#companiesTable .cell-email {
  max-width: 140px;
  min-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
  color: #64748b;
}

/* Coluna Telefone */
#companiesTable .cell-contact {
  white-space: nowrap;
  font-size: 11.5px;
  color: #475569;
  letter-spacing: -0.2px;
}

/* Coluna Cadastro */
#companiesTable .cell-created-at {
  white-space: nowrap;
  font-size: 11.5px;
  color: #64748b;
  text-align: center;
}

/* Badges de Status do Cliente */
#companiesTable .badge-company-active {
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

#companiesTable .badge-company-inactive {
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

#companiesTable .badge-company-pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* Coluna Ações e Botões Compactos */
#companiesTable .cell-actions {
  text-align: center;
  white-space: nowrap;
  padding: 6px 6px;
  width: 80px;
}

#companiesTable .btn-edit-company,
#companiesTable .btn-delete-company {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  vertical-align: middle;
}

#companiesTable .btn-edit-company svg,
#companiesTable .btn-delete-company svg {
  width: 13px;
  height: 13px;
}

#companiesTable .approve-comp-btn {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 5px;
  height: 28px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 3px;
  vertical-align: middle;
  transition: all 0.15s ease;
}

#companiesTable .approve-comp-btn:hover {
  background: #bbf7d0;
  color: #14532d;
}

#companiesTable .approve-comp-btn svg {
  width: 12px;
  height: 12px;
}

/* Ajuste sutil de padding do card em telas com menor resolução */
@media (max-width: 1366px) {
  .companies-list-card {
    padding: 20px 16px;
  }
}
