/* ==================== DESIGN SYSTEM 2026 — SaaS Premium ==================== */
:root {
  /* Palette: Slate 900 text, Indigo/Violet accent, light grays */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-50: #eef2ff;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --dark-bg: var(--slate-800);
  --darker-bg: var(--slate-900);
  --light-bg: var(--slate-50);
  --border-color: var(--slate-200);
  --text-primary: var(--slate-900);
  --text-secondary: var(--slate-600);
  --text-light: var(--slate-500);
  --white: #ffffff;
  /* Soft shadows — no heavy borders */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--slate-100);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==================== SIDEBAR — Clean, minimal, active bar ==================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.sidebar-header .sidebar-logo {
  width: 140px;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.sidebar-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--slate-100);
  border: none;
  color: var(--slate-600);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.sidebar-nav {
  padding: 1rem 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  margin: 0 0.5rem;
  color: var(--slate-600);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  border-radius: var(--radius-md);
  font-weight: 500;
}

/* Active: vertical bar + subtle background */
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 3px;
  background: var(--primary-color);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-item:hover {
  background: var(--slate-50);
  color: var(--slate-900);
}

.nav-item.active {
  background: var(--primary-50);
  color: var(--primary-dark);
}

.nav-item.active::before {
  opacity: 1;
}

.nav-icon {
  width: 22px;
  height: 22px;
  margin-right: 0.875rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.75;
}

.nav-text {
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-divider {
  height: 1px;
  background: var(--slate-100);
  margin: 0.75rem 1rem;
}

.nav-action {
  color: var(--primary-color);
}

.nav-action:hover {
  background: var(--primary-50);
  color: var(--primary-dark);
}

.nav-logout {
  color: var(--slate-500);
}

.nav-logout:hover {
  background: #fef2f2;
  color: var(--danger-color);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--slate-100);
  color: var(--slate-500);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ==================== MAIN WRAPPER ==================== */
.main-wrapper {
  margin-left: 240px;
  min-height: 100vh;
  background: var(--slate-100);
  padding: 2rem 2.5rem;
  transition: margin-left 0.25s ease;
}

.pagina {
  display: none;
  animation: fadeIn 0.4s ease;
}

.pagina.ativa {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== DASHBOARD ==================== */
.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.dashboard-header p {
  color: var(--slate-500);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* ==================== DASHBOARD REFATORADO ==================== */
.dashboard-page {
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dashboard-page .dashboard-header h1 {
  color: #1e3a5f;
  font-weight: 700;
}

/* Smart KPI Cards — soft shadows, 16px radius, no heavy borders */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.smart-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.smart-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.smart-card-vendas .smart-card-icon { background: #eef2ff; color: #4338ca; }
.smart-card-pendentes .smart-card-icon { background: #e0e7ff; color: #4f46e5; }
.smart-card-trocas .smart-card-icon { background: #fef3c7; color: #b45309; }
.smart-card-faturamento .smart-card-icon { background: #d1fae5; color: #047857; }

.smart-card-content {
  flex: 1;
  min-width: 0;
}

.smart-card-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.smart-card-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate-500);
  margin-top: 0.25rem;
}

.smart-card-trend {
  display: inline-block;
  font-size: 0.75rem;
  margin-top: 0.35rem;
  color: #059669;
  font-weight: 500;
}

.smart-card-trend.negative { color: #dc2626; }
.smart-card-trend.neutral { color: var(--slate-500); }

/* Grid assimétrico: 2/3 gráficos + 1/3 lista */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.dashboard-charts-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-chart.chart-full-width {
  grid-column: 1 / -1;
}

.dashboard-chart .chart-wrapper-tall {
  height: 280px;
}

.dashboard-sidebar {
  position: sticky;
  top: 1rem;
}

.dashboard-widget {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.dashboard-widget .widget-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.dashboard-widget .widget-header h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e3a5f;
}

.pedidos-feed {
  max-height: 340px;
  overflow-y: auto;
  padding: 0;
}

.pedidos-feed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.pedidos-feed-table th {
  text-align: left;
  padding: 0.5rem 1rem;
  color: #64748b;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.pedidos-feed-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.pedidos-feed-table tr:last-child td { border-bottom: none; }
.pedidos-feed-table tbody tr { cursor: pointer; transition: background 0.15s; }
.pedidos-feed-table tbody tr:hover { background: #f8fafc; }

.pedidos-feed-table .feed-numero { font-weight: 600; color: #1e3a5f; }
.pedidos-feed-table .feed-cliente { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pedidos-feed-table .feed-valor { font-weight: 600; color: #1e3a5f; font-variant-numeric: tabular-nums; }
.pedidos-feed-table .feed-status { font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 500; }

.dashboard-widget .widget-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: center;
}

.btn-ver-todos {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
  transition: color 0.2s;
}

.btn-ver-todos:hover {
  color: #1e3a5f;
  text-decoration: underline;
}

/* Segunda linha do dashboard: rankings */
.dashboard-second-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.dashboard-second-row .dashboard-widget {
  min-height: 0;
}

.ranking-feed {
  max-height: 280px;
  overflow-y: auto;
  padding: 0;
}

.ranking-feed-header {
  padding: 0.75rem 1.25rem 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
}

.contas-kpi-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.contas-kpi-item {
  background: #f8fafc;
  border-radius: 6px;
  padding: 0.75rem;
  text-align: center;
}

.contas-kpi-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.contas-kpi-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a5f;
  font-variant-numeric: tabular-nums;
}

.contas-kpi-vencidos .contas-kpi-value {
  color: #b45309;
}

.ranking-feed .pedidos-feed-table,
.ranking-feed table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.ranking-feed table th {
  text-align: left;
  padding: 0.5rem 1rem;
  color: #64748b;
  font-weight: 600;
}

.ranking-feed table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.ranking-feed table .feed-cliente {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-feed table .feed-valor {
  font-weight: 600;
  color: #1e3a5f;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1200px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .dashboard-sidebar { position: static; }
  .dashboard-second-row { grid-template-columns: 1fr; }
  .contas-kpi-mini { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dashboard-kpi-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .smart-card { padding: 1rem; }
  .smart-card-value { font-size: 1.25rem; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ==================== FILTROS DE CONTAGEM ==================== */
.count-filters-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: none;
}

.count-filter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--slate-50);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 120px;
  box-shadow: none;
}

.count-filter-item:hover {
  background: var(--primary-50);
  color: var(--primary-dark);
  box-shadow: var(--shadow-xs);
}

.count-filter-item.active {
  background: var(--primary-50);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

.count-number {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.count-value {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: inherit;
  opacity: 0.95;
}

.count-label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  color: inherit;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .count-filters-container {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .count-filter-item {
    min-width: 100px;
    padding: 0.75rem 1rem;
  }
  
  .count-number {
    font-size: 1.5rem;
  }
  
  .count-value {
    font-size: 0.75rem;
  }
  
  .count-label {
    font-size: 0.75rem;
  }
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border: none;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  opacity: 0.9;
}

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

.stat-card.stat-primary::before {
  background: linear-gradient(90deg, #6366f1, #818cf8);
}

.stat-card.stat-success::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.stat-card.stat-warning::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stat-card.stat-info::before {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-icon {
  font-size: 3rem;
  opacity: 0.2;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.stat-details {
  position: relative;
  z-index: 1;
}

.stat-details h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-details p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.dashboard-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.dashboard-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.dashboard-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.pedidos-andamento-lista {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pedido-andamento-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--light-bg);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.pedido-andamento-item:hover {
  background: #e0e7ff;
  transform: translateX(5px);
}

.pedido-andamento-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.pedido-andamento-numero {
  font-weight: 600;
  color: var(--primary-color);
}

.pedido-andamento-valor {
  font-weight: 700;
  color: var(--text-primary);
}

.pedido-andamento-cliente {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.pedido-andamento-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-light);
}

.status-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--light-bg);
  transition: all 0.3s ease;
}

.status-item:hover {
  background: #e0e7ff;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-badge {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-name {
  font-weight: 500;
  color: var(--text-primary);
}

.status-count {
  font-weight: 600;
  color: var(--primary-color);
}

/* Checkbox de pedidos: desabilitado para atendido/cancelado */
#lista-pedidos input.checkbox-pedido:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ==================== TABLE ==================== */
.table-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--slate-800);
  color: var(--white);
}

.data-table th {
  padding: 0.4rem 0.3rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

/* Larguras específicas para cada coluna */
.data-table th:nth-child(1) { width: 40px; }   /* # */
.data-table th:nth-child(2) { width: 65px; }  /* DATA */
.data-table th:nth-child(3) { width: 80px; }  /* CLIENTE */
.data-table th:nth-child(4) { width: 180px; }  /* PRODUTOS */
.data-table th:nth-child(5) { width: 65px; }  /* STATUS */
.data-table th:nth-child(6) { width: 65px; }  /* VALOR */
.data-table th:nth-child(7) { width: 80px; }  /* TIPO */
.data-table th:nth-child(8) { width: 80px; }  /* AÇÕES */

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.data-table tbody tr:hover {
  background: var(--light-bg);
}

.data-table td {
  padding: 0.6rem 0.4rem;
  color: var(--text-primary);
  font-size: 0.7rem;
}

/* Ajustar coluna de produtos para permitir quebra de linha */
.data-table td:nth-child(4) {
  white-space: normal;
  word-wrap: break-word;
  max-width: 180px;
}

/* Outras colunas mantêm texto em linha única */
.data-table td:nth-child(1),
.data-table td:nth-child(2),
.data-table td:nth-child(3),
.data-table td:nth-child(5),
.data-table td:nth-child(6) {
  white-space: nowrap;
}

.data-table td.loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}

/* ==================== BADGES & STATUS ==================== */
.status {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cores semânticas universais */
.status-success, .status-atendido {
  background: #d1fae5;
  color: #065f46;
}

.status-warning, .status-pendente, .status-aberto {
  background: #fef3c7;
  color: #92400e;
}

.status-danger, .status-cancelado {
  background: #fee2e2;
  color: #991b1b;
}

.status-info, .status-andamento {
  background: #dbeafe;
  color: #1e40af;
}

.status-primary {
  background: #e0e7ff;
  color: #4338ca;
}

.status-secondary {
  background: #f3f4f6;
  color: #6b7280;
}

.status-admin {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

/* ==================== ÁREA DE FILTROS MELHORADA ==================== */
.filters-card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filters-card .filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.filters-card .filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.filters-card .filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filters-card .filter-group input,
.filters-card .filter-group select {
  height: 42px;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  transition: all 0.2s ease;
  min-width: 140px;
}

.filters-card .filter-group input:focus,
.filters-card .filter-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filters-card .filter-group .search-input {
  min-width: 260px;
}

/* ==================== DROPDOWN DE AÇÕES ==================== */
.actions-dropdown {
  position: relative;
  display: inline-block;
}

.actions-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.actions-dropdown-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.actions-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  display: none;
  min-width: 160px;
  padding: 0.5rem 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.actions-dropdown.open .actions-dropdown-menu {
  display: block;
}

.actions-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.actions-dropdown-item:hover {
  background: #f3f4f6;
}

.actions-dropdown-item.danger {
  color: #dc2626;
}

.actions-dropdown-item.danger:hover {
  background: #fef2f2;
}

.actions-dropdown-divider {
  height: 1px;
  margin: 0.375rem 0;
  background: #e5e7eb;
}

/* ==================== COLUNA LOGÍSTICA CONDENSADA ==================== */
.logistica-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

.logistica-motoboy {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.85rem;
}

.logistica-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
}

.logistica-status {
  font-size: 0.7rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.logistica-data {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* ==================== AÇÕES INLINE COMPACTAS ==================== */
.actions-inline {
  display: flex;
  align-items: center;
  gap: 4px;
}

.actions-inline .btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.actions-inline .btn-action-primary {
  background: #4f46e5;
  color: white;
}

.actions-inline .btn-action-primary:hover {
  background: #4338ca;
}

.actions-inline .btn-action-success {
  background: #10b981;
  color: white;
}

.actions-inline .btn-action-success:hover {
  background: #059669;
}

.actions-inline .btn-action-secondary {
  background: #f3f4f6;
  color: #6b7280;
}

.actions-inline .btn-action-secondary:hover {
  background: #e5e7eb;
  color: #374151;
}

.actions-inline .btn-action-danger {
  background: #ef4444;
  color: white;
}

.actions-inline .btn-action-danger:hover {
  background: #dc2626;
}

/* Badges de indicadores */
.indicator-badges {
  display: flex;
  gap: 2px;
  margin-left: 4px;
}

.indicator-badge {
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 4px;
}

.indicator-badge-estoque {
  background: #d1fae5;
}

.indicator-badge-contas {
  background: #dbeafe;
}

/* ==================== TABELA DE PEDIDOS OTIMIZADA ==================== */
.data-table.pedidos-table th,
.data-table.pedidos-table td {
  padding: 0.625rem 0.5rem;
  vertical-align: middle;
}

.data-table.pedidos-table .col-numero {
  width: 70px;
  text-align: center;
}

.data-table.pedidos-table .col-data {
  width: 90px;
}

.data-table.pedidos-table .col-cliente {
  min-width: 150px;
  max-width: 200px;
}

.data-table.pedidos-table .col-produtos {
  min-width: 200px;
  max-width: 350px;
}

.data-table.pedidos-table .col-produtos span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table.pedidos-table .col-status {
  width: 110px;
  text-align: center;
}

.data-table.pedidos-table .col-valor {
  width: 90px;
  text-align: right;
  font-weight: 600;
}

.data-table.pedidos-table .col-logistica {
  width: 140px;
}

.data-table.pedidos-table .col-pagamento {
  width: 130px;
}

.data-table.pedidos-table .col-acoes {
  width: 120px;
  text-align: center;
}

/* Status de recebimento */
.status-recebido {
  background-color: #d4edda !important;
  border-left: 4px solid #28a745 !important;
}

.status-nao-recebido {
  background-color: #f8d7da !important;
  border-left: 4px solid #dc3545 !important;
}

.recebimento-select.status-recebido {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.recebimento-select.status-nao-recebido {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

/* Modal de confirmação de recebimento */
.confirmacao-info {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.confirmacao-info p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.confirmacao-info strong {
  color: #495057;
  font-weight: 600;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

/* Cores das situações das contas a receber */
.situacao-aberto {
  background-color: #e8f5e8; /* Verde claro */
}

.situacao-atrasado {
  background-color: #fff3cd; /* Amarelo claro */
}

.situacao-pago {
  background-color: #f8f9fa; /* Cinza claro */
}

.situacao-liquidado {
  background-color: #f8f9fa; /* Cinza claro - mantido para compatibilidade */
}

.situacao-criada {
  background-color: #e3f2fd; /* Azul claro - mantido para compatibilidade */
}

.situacao {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.situacao.situacao-aberto {
  background-color: #28a745;
  color: white;
}

.situacao.situacao-atrasado {
  background-color: #ffc107;
  color: #212529;
}

.situacao.situacao-pago {
  background-color: #6c757d;
  color: white;
}

.situacao.situacao-liquidado {
  background-color: #6c757d;
  color: white;
}

.situacao.situacao-criada {
  background-color: #2196f3;
  color: white;
}

/* ==================== STATUS DOS PEDIDOS ==================== */
.status-pedido {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  min-width: 80px;
  text-align: center;
}

/* Status específicos dos pedidos */
.status-pedido.status-em-aberto {
  background-color: #28a745;
  color: white;
}

.status-pedido.status-em-andamento {
  background-color: #17a2b8;
  color: white;
}

.status-pedido.status-atendido {
  background-color: #6c757d;
  color: white;
}

.status-pedido.status-cancelado {
  background-color: #dc3545;
  color: white;
}

.status-pedido.status-pendente {
  background-color: #ffc107;
  color: #212529;
}

.status-pedido.status-nao-encontrado {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.status-pedido.status-sem-pedido {
  background-color: #f8f9fa;
  color: #6c757d;
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--light-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Botão grande "Sincronizar pedidos" (últimos 5 min) */
.btn-sync-pedidos {
  padding: 0.75rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
/* Versão ainda maior, destaque na tela Pedidos */
.btn-sync-pedidos-grande {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  min-height: 52px;
  min-width: 280px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
.btn-sync-pedidos:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.45);
}
.btn-sync-pedidos:active {
  transform: translateY(0);
}
.btn-sync-pedidos:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ==================== PAGINATION ==================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pagination button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.pagination button:hover:not(:disabled) {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal.ativo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slideUp 0.3s ease;
}

.modal-content table {
  min-width: 100%;
  table-layout: auto;
}

.modal-content th,
.modal-content td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-content th:first-child,
.modal-content td:first-child {
  white-space: normal;
  min-width: 200px;
}

/* Evitar quebra de linha em nomes de clientes */
.cliente-nome {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Melhorar exibição de informações do pedido */
.pedido-detalhes strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--danger-color);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: block;
  }

  .main-wrapper {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
  }

  .data-table {
    font-size: 0.75rem;
    min-width: 650px;
  }

  .data-table th,
  .data-table td {
    padding: 0.4rem 0.3rem;
  }

  /* Ajustar larguras para mobile */
  .data-table th:nth-child(1) { width: 35px; }   /* # */
  .data-table th:nth-child(2) { width: 60px; }  /* DATA */
  .data-table th:nth-child(3) { width: 70px; }  /* CLIENTE */
  .data-table th:nth-child(4) { width: 150px; }  /* PRODUTOS */
  .data-table th:nth-child(5) { width: 60px; }  /* STATUS */
  .data-table th:nth-child(6) { width: 60px; }  /* VALOR */
  .data-table th:nth-child(7) { width: 60px; }  /* TIPO */
  .data-table th:nth-child(8) { width: 70px; }  /* AÇÕES */
}

/* Para telas grandes */
@media (min-width: 1200px) {
  .data-table {
    min-width: 800px;
  }

  /* Aumentar larguras para telas grandes */
  .data-table th:nth-child(1) { width: 50px; }   /* # */
  .data-table th:nth-child(2) { width: 80px; }  /* DATA */
  .data-table th:nth-child(3) { width: 100px; }  /* CLIENTE */
  .data-table th:nth-child(4) { width: 200px; }  /* PRODUTOS */
  .data-table th:nth-child(5) { width: 80px; }  /* STATUS */
  .data-table th:nth-child(6) { width: 80px; }  /* VALOR */
  .data-table th:nth-child(7) { width: 90px; }  /* TIPO */
  .data-table th:nth-child(8) { width: 90px; }  /* AÇÕES */
}

/* ==================== UTILITIES ==================== */
.loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
  font-style: italic;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--secondary-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ==================== LOGIN PROFESSIONAL ==================== */
.login-body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
  overflow: hidden;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.login-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
}

.login-container {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.company-logo {
  margin-bottom: 1.5rem;
}

.logo-icon {
  font-size: 3rem;
  margin: 0 auto;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
  margin: 0 auto 1.5rem auto;
}

.company-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.025em;
}

.company-name {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.system-subtitle {
  color: #64748b;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-form {
  margin-top: 2rem;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form .form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

.login-form .form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.login-form .form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.login-form .btn-primary {
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.login-form .btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Filtros */
.filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input[type="date"] {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.search-input {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  background: white;
  transition: border-color 0.2s ease;
  min-width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Paginação */
.pagination-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.btn-pagination {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
  color: var(--text-color);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pagination:hover {
  background: var(--bg-light);
  border-color: var(--primary-color);
}

.btn-pagination.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-info {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Responsivo para filtros */
@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .search-input {
    min-width: auto;
  }
  
  .pagination-controls {
    flex-wrap: wrap;
  }
}

/* Botão secundário */
.btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.4);
}

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

/* ===== ESTILOS PARA GRÁFICOS DO DASHBOARD ===== */

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.chart-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: none;
  transition: all 0.2s ease;
}

.dashboard-page .chart-container {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.dashboard-page .chart-header {
  border-bottom-color: var(--slate-100);
}

.dashboard-page .chart-header h3 {
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 600;
}

.dashboard-page .btn-chart.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

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

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--slate-100);
}

.chart-header h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 600;
}

.chart-controls {
  display: flex;
  gap: 0.375rem;
}

.btn-chart {
  padding: 0.5rem 1rem;
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-600);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-chart:hover {
  background: var(--slate-50);
  color: var(--slate-900);
  border-color: var(--slate-300);
}

.btn-chart.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.chart-wrapper {
  position: relative;
  height: 300px;
  width: 100%;
}

.chart-wrapper canvas {
  max-height: 100%;
  max-width: 100%;
}

/* Responsividade para gráficos */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .chart-wrapper {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .chart-container {
    padding: 1rem;
  }
  
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .chart-wrapper {
    height: 200px;
  }
}

/* Animações para gráficos */
@keyframes chartFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-container {
  animation: chartFadeIn 0.6s ease-out;
}

/* Estilos para pedidos em andamento no dashboard */
.pedidos-andamento-lista {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.pedidos-andamento-lista::-webkit-scrollbar {
  width: 6px;
}

.pedidos-andamento-lista::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 3px;
}

.pedidos-andamento-lista::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.pedidos-andamento-lista::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ==================== PÁGINA DE COMPARAÇÃO VHSYS ==================== */
#pagina-comparacao-vhsys .data-table th {
  text-align: center;
  background: var(--light-bg) !important;
  font-weight: 600;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

#pagina-comparacao-vhsys .data-table th[rowspan="2"] {
  vertical-align: middle;
}

#pagina-comparacao-vhsys .data-table td {
  text-align: center;
  font-weight: 600;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border-color);
}

#pagina-comparacao-vhsys .data-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

/* Estilos para valores VHSys e Controle */
.valor-vhsys {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info-color);
  font-weight: 700;
}

.valor-controle {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
  font-weight: 700;
}

/* Estilos para diferenças */
.diferenca-zero {
  color: var(--secondary-color);
  font-weight: 700;
}

.diferenca-positiva {
  color: var(--info-color);
  font-weight: 700;
}

.diferenca-negativa {
  color: var(--danger-color);
  font-weight: 700;
}

/* Status badges */
.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.sem-diferenca {
  background: var(--secondary-color);
  color: white;
}

.status-badge.vhsys-maior {
  background: var(--info-color);
  color: white;
}

.status-badge.controle-maior {
  background: var(--warning-color);
  color: white;
}

.status-badge.apenas-vhsys {
  background: var(--primary-color);
  color: white;
}

.status-badge.apenas-controle {
  background: var(--danger-color);
  color: white;
}

/* Badges de indicadores de estoque e contas lançados */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #3b82f6;
}

/* Comparação de valores */
.valor-comparacao {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.valor-vhsys {
  font-size: 0.875rem;
  color: var(--info-color);
  font-weight: 600;
}

.valor-controle {
  font-size: 0.875rem;
  color: var(--warning-color);
  font-weight: 600;
}

.valor-diferenca {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

.valor-diferenca.positiva {
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary-color);
}

.valor-diferenca.negativa {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.valor-diferenca.zero {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-secondary);
}

/* Botões de ação específicos */
.btn-detalhes-cliente {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-detalhes-cliente:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Estatísticas específicas da comparação */
#stats-comparacao .stat-card {
  border-left: 4px solid var(--primary-color);
}

#stats-comparacao .stat-card:nth-child(2) {
  border-left-color: var(--info-color);
}

#stats-comparacao .stat-card:nth-child(3) {
  border-left-color: var(--warning-color);
}

#stats-comparacao .stat-card:nth-child(4) {
  border-left-color: var(--secondary-color);
}

/* Responsividade específica para comparação */
@media (max-width: 768px) {
  #pagina-comparacao-vhsys .data-table {
    font-size: 0.75rem;
  }
  
  #pagina-comparacao-vhsys .valor-comparacao {
    font-size: 0.75rem;
  }
  
  .status-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.25rem;
  }
}
: 0.625rem;
    padding: 0.125rem 0.25rem;
  }
}
 }
}
