@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root{
  --header-h: 70px;
  --sidebar-w: 260px;
  --blue: #003366;
}

/* ================= BASE ================= */
body{
  font-family:'Inter', system-ui, -apple-system, BlinkMacSystemFont,'Segoe UI', sans-serif;
  background:#f2f4f8;
  color:#111827;
}

a{ color:inherit; text-decoration:none; }
.center{ text-align:center !important; }
.right{ text-align:right !important; }

/* ================= HEADER ================= */
.header{
  height: var(--header-h);
  background: var(--blue);
  color: #fff;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
}

/* Lado esquerdo - RELÓGIO */
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.clock-display { 
  font-size: 18px; 
  font-weight: 900; 
}

/* ?CONES SOCIAIS - Centro */
.social-icons {
  justify-self: center;
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-icons a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.social-icons a::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icons i { 
  font-size: 20px; 
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-icons img {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  object-fit: contain;
}

.social-icons a:hover {
  transform: translateY(-5px) scale(1.15) rotate(5deg);
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:hover::before {
  opacity: 1;
}

.social-icons a:hover i {
  transform: scale(1.2);
}

.social-icons a:active {
  transform: translateY(-2px) scale(1.08) rotate(0deg);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.25);
}

/* Cores específicas por rede social */
.social-icons a:has(i.fa-envelope) {
  background: linear-gradient(135deg, #ea4c89 0%, #d63657 100%);
  box-shadow: 0 4px 12px rgba(234, 76, 137, 0.3);
}

.social-icons a:has(i.fa-envelope):hover {
  box-shadow: 0 12px 24px rgba(234, 76, 137, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-whatsapp) {
  background: linear-gradient(135deg, #25d366 0%, #20ba58 100%);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.social-icons a:has(i.fa-whatsapp):hover {
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-youtube) {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.social-icons a:has(i.fa-youtube):hover {
  box-shadow: 0 12px 24px rgba(255, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-instagram) {
  background: linear-gradient(135deg, #fd1d1d 0%, #833ab4 50%, #fd1d1d 100%);
  box-shadow: 0 4px 12px rgba(253, 29, 29, 0.3);
}

.social-icons a:has(i.fa-instagram):hover {
  box-shadow: 0 12px 24px rgba(253, 29, 29, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-facebook) {
  background: linear-gradient(135deg, #1877f2 0%, #0a66c2 100%);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.social-icons a:has(i.fa-facebook):hover {
  box-shadow: 0 12px 24px rgba(24, 119, 242, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-pinterest) {
  background: linear-gradient(135deg, #e60023 0%, #ad081b 100%);
  box-shadow: 0 4px 12px rgba(230, 0, 35, 0.3);
}

.social-icons a:has(i.fa-pinterest):hover {
  box-shadow: 0 12px 24px rgba(230, 0, 35, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-store) {
  background: linear-gradient(135deg, #ff6b35 0%, #ff4500 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.social-icons a:has(i.fa-store):hover {
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-bag-shopping) {
  background: linear-gradient(135deg, #ffe900 0%, #ffcc00 100%);
  box-shadow: 0 4px 12px rgba(255, 233, 0, 0.3);
  color: #333;
}

.social-icons a:has(i.fa-bag-shopping) i {
  color: #333;
}

.social-icons a:has(i.fa-bag-shopping):hover {
  box-shadow: 0 12px 24px rgba(255, 233, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.social-icons a:has(i.fa-credit-card) {
  background: linear-gradient(135deg, #35c7f5 0%, #00a8e8 100%);
  box-shadow: 0 4px 12px rgba(53, 199, 245, 0.3);
}

.social-icons a:has(i.fa-credit-card):hover {
  box-shadow: 0 12px 24px rgba(53, 199, 245, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.social-icons a:has(i.fa-square-a) {
  background: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.15) 2px,
      rgba(255, 255, 255, 0.15) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.1) 2px,
      rgba(255, 255, 255, 0.1) 4px
    ),
    linear-gradient(135deg, #ff5722 0%, #ff1744 100%);
  box-shadow: 0 4px 12px rgba(255, 23, 68, 0.4), inset 0 -1px 3px rgba(0,0,0,0.2);
}

.social-icons a:has(i.fa-square-a):hover {
  background: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.25) 2px,
      rgba(255, 255, 255, 0.25) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.2) 2px,
      rgba(255, 255, 255, 0.2) 4px
    ),
    linear-gradient(135deg, #ff5722 0%, #ff1744 100%);
  box-shadow: 0 12px 24px rgba(255, 23, 68, 0.5), inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 3px rgba(0,0,0,0.3);
}

/* Marketplace - Fundo branco */
.social-icons a:has(img[src*="marketplace-icon"]) {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
}

.social-icons a:has(img[src*="marketplace-icon"]) img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-icons a:has(img[src*="marketplace-icon"]):hover {
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px) scale(1.15) rotate(5deg);
}

/* Lado direito - Logo + Seletor + Logout (da esquerda para direita) */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

/* LOGO */
.logo-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* LOGO */
.logo-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.logo-area img {
  display: block;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .10);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
  height: 42px;
  max-height: 42px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
}

#logo-ferratec,
#logo-lcabalo {
  display: none;
}

#logo-ferratec {
  max-width: 160px;
}

#logo-lcabalo {
  height: 38px;
  max-height: 38px;
  max-width: 140px;
}


/* SELETOR DE CONTA */
.seller-select {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: #fff;
  outline: none;
  font-weight: 900;
  cursor: pointer;
}

.seller-select option { 
  color: #111827; 
}

/* botão LOGOUT */
.btn-logout {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

/* ================= SIDEBAR ================= */
.sidebar{
  position:fixed;
  top:var(--header-h);
  bottom:0;
  left:0;
  width:var(--sidebar-w);
  background:#fff;
  border-right:1px solid #e5e7eb;
  overflow-y:auto;
  transition: width .3s ease;
  z-index:900;
}

.sidebar.closed{ width:0; overflow:hidden; }

.sidebar-menu{ list-style:none; padding:18px 10px; }
.menu-item{ margin-bottom:6px; }

.menu-link{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:10px;
  color:#111827;
  font-size:14px;
  width:100%;
}

.menu-link i{ width:18px; text-align:center; }

.menu-link:hover{ color:var(--blue); font-weight:800; }

.menu-link.active{
  background:#e8f0fe;
  color:var(--blue);
  font-weight:900;
}

/* ================= conteúdo ================= */
.dashboard{
  margin-top:var(--header-h);
  margin-left:var(--sidebar-w);
  width:calc(100% - var(--sidebar-w));
  padding:22px 34px;
  transition: margin-left .3s ease, width .3s ease;
}

.dashboard.sidebar-closed{ margin-left:0; width:100%; }

.dashboard-top{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.menu-toggle{
  font-size:26px;
  background:none;
  border:none;
  cursor:pointer;
  color:var(--blue);
}

.dashboard-top h1{ font-size:22px; font-weight:900; }

/* ================= TOOLBAR ================= */
.toolbar{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

/* no topo: empurra a barra pra direita */
.dashboard-top .toolbar{ margin-left:auto; }

.search{
  height:38px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid #e5e7eb;
  outline:none;
  min-width:220px;
  background:#fff;
  font-size:13px;
}

.search:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(59,130,246,.12);
}

/* filtros pill do dashboard */
.dash-filters{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

.pill-select{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;

  height:36px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;

  font-family:'Inter', system-ui, sans-serif;
  font-weight:900;
  font-size:13px;
  color:#111827;

  outline:none;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
}

.pill-select:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(59,130,246,.16);
}

/* ================= KPIs (Dashboard) ================= */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap:14px;
  margin: 14px 0 16px;
}

.kpi-box{
  background:#fff;
  padding:16px;
  border-radius:16px;
  box-shadow:0 4px 10px rgba(0,0,0,.06);
  border:1px solid rgba(0,0,0,.05);
  min-height: 88px;
  position: relative;
}

.kpi-box::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background: var(--card-accent, #3b82f6);
  border-radius:16px 0 0 16px;
}

.kpi-title{ font-size:13px; color:#6b7280; font-weight:800; }
.kpi-value{ margin-top:6px; font-size:22px; font-weight:900; }

/* GRÁFICO canvas */
.chart-wrap{ height:260px; width:100%; }
.chart-wrap canvas{ width:100% !important; height:100% !important; display:block; }

/* ================= Botões ================= */
.btn{
  padding:10px 16px;
  border-radius:12px;
  border:none;
  cursor:pointer;
  font-size:14px;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition: all 0.2s ease;
}

.btn-primary{
  background:#16a34a;
  color:#fff;
  box-shadow:0 6px 14px rgba(22,163,74,.20);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22,163,74,.30);
}

.btn-secondary{ background:#e5e7eb; color:#111827; }

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-icon{
  border:none;
  background:transparent;
  cursor:pointer;
  width:34px;
  height:34px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#374151;
  transition: all 0.2s ease;
}

.btn-icon:hover{ background:#f3f4f6; }
.btn-icon.delete{ color:#dc2626; }
.btn-icon.delete:hover { background: #fee2e2; }

/* botão Outline */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 2px solid #003366;
  border-radius: 8px;
  background: #fff;
  color: #003366;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: #003366;
  background: #003366;
  color: #ffffff;
}

.btn-outline i {
  font-size: 13px;
}

/* Tamanhos de botão */
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* ================= CARDS / TABELAS ================= */
.card{
  margin-top:14px;
  background:#fff;
  padding:18px;
  border-radius:16px;
  box-shadow:0 4px 10px rgba(0,0,0,.06);
  position: relative;
}

.card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background: var(--card-accent, #3b82f6);
  border-radius:16px 0 0 16px;
}

.forn-section{
  margin-top:12px;
  width:100%;
  overflow-x:auto;
  padding-bottom:6px;
}

.forn-table{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
}

.forn-table th,
.forn-table td{
  padding:8px 10px;
  font-size:12.5px;
  border-bottom:1px solid #eef2f7;
  text-align:left;
  white-space:nowrap;
  vertical-align:middle;
}

.forn-table th{
  background:#f3f6ff;
  font-weight:900;
  color:#111827;
}

.forn-table tr:hover{ background:#f9fafb; }

/* ================= STATUS (Produtos) ================= */
.status-pill{
  appearance:none;
  -webkit-appearance:none;

  border:none !important;
  outline:none !important;

  padding:6px 28px 6px 12px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  line-height:1;
  cursor:pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,.45) 50%),
    linear-gradient(135deg, rgba(0,0,0,.45) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat:no-repeat;

  box-shadow:0 1px 2px rgba(0,0,0,.08);
}

.status-ATIVO{ background:#d1fae5; color:#065f46; }
.status-INATIVO{ background:#fee2e2; color:#991b1b; }

/* ================= MODAL ================= */
.modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.38);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:2000;
  padding:18px;
}
.modal-overlay.open{ display:flex; }

.modal{
  width:min(820px, 96vw);
  background:#fff;
  border-radius:16px;
  box-shadow:0 18px 40px rgba(0,0,0,.25);
  overflow:hidden;
}

.modal-header{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid #eef2f7;
}

.modal-header h2{ font-size:16px; font-weight:900; color:#111827; }

.modal-close{
  position:absolute;
  right:12px;
  top:10px;
  width:36px;
  height:36px;
  border:none;
  background:#f3f4f6;
  border-radius:10px;
  cursor:pointer;
  font-size:22px;
  line-height:0;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.modal-body{ padding:14px 16px; }

.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }

.form-group label{
  display:block;
  font-size:12px;
  font-weight:900;
  margin-bottom:6px;
  color:#374151;
}

.form-group input,
.form-group select,
.form-group textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  outline:none;
  background:#fff;
  font-size:13px;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 3px rgba(59,130,246,.12);
}

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

/* ================= RESPONSIVO ================= */
@media (max-width: 1100px){
  .kpi-grid{ grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}

@media (max-width: 980px){
  .header{ padding:0 12px; }
  .dashboard{ padding:18px 16px; }

  .logo-area img{ height:44px; max-height:44px; max-width:180px; }
  #logo-lcabalo{ height:42px; max-height:42px; max-width:150px; }
}

@media (max-width: 720px){
  .grid-2{ grid-template-columns: 1fr; }
  .kpi-grid{ grid-template-columns: 1fr; }
  
  .social-icons { display: none; }
  
  .header {
    grid-template-columns: auto 1fr;
  }
  
  .logo-area img {
    height: 40px;
    max-height: 40px;
    max-width: 140px;
  }
}

@media (max-width: 480px) {
  .seller-select {
    font-size: 12px;
    padding: 0 6px;
  }
  
  .btn-logout {
    padding: 6px 10px;
  }
  
  .logo-area img {
    height: 36px;
    max-height: 36px;
    max-width: 120px;
  }
}

/* ================= TOOLBAR PRODUTOS (Estilo Gestor Seller) ================= */
.toolbar-produtos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 16px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Search Box estilo Seller */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  font-size: 14px;
  pointer-events: none;
}

.search-box input {
  padding: 10px 12px 10px 38px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  min-width: 260px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box input::placeholder {
  color: #9ca3af;
}

/* Filter Select estilo Seller */
.filter-group {
  position: relative;
}

.filter-select {
  appearance: none;
  padding: 10px 36px 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 12px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:hover {
  border-color: #d1d5db;
}

/* botão Primary ajustado */
.btn-primary i {
  font-size: 12px;
}

/* ================= RESPONSIVO TOOLBAR ================= */
@media (max-width: 900px) {
  .toolbar-produtos {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    justify-content: flex-start;
  }

  .search-box input {
    min-width: 100%;
    width: 100%;
  }

  .filter-select {
    min-width: 140px;
  }
}

@media (max-width: 600px) {
  .toolbar-left,
  .toolbar-right {
    flex-direction: column;
    width: 100%;
  }

  .toolbar-left > *,
  .toolbar-right > * {
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }

  .filter-select {
    width: 100%;
  }
}

/* ================= PILLS EDITÁVEIS - COMPRAS ================= */

/* Pill de Data */
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #f9fafb;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
  justify-content: center;
}

.date-pill:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.date-pill i {
  font-size: 12px;
  color: #6b7280;
}

.date-pill.has-date {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.date-pill.has-date i {
  color: #3b82f6;
}

.date-pill.empty {
  color: #9ca3af;
  font-style: italic;
}

/* Input de data escondido */
.date-pill-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Container do date pill */
.date-pill-container {
  position: relative;
  display: inline-block;
}

/* Pill de Status */
.status-pill-select {
  appearance: none;
  padding: 6px 28px 6px 12px;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Cores por status */
.status-pill-select.status-AGUARD {
  background-color: #fef3c7;
  color: #92400e;
}

.status-pill-select.status-TRANSP {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-pill-select.status-CONCL {
  background-color: #d1fae5;
  color: #065f46;
}

.status-pill-select.status-CANCEL {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Hover nos status */
.status-pill-select.status-AGUARD:hover { background-color: #fde68a; }
.status-pill-select.status-TRANSP:hover { background-color: #bfdbfe; }
.status-pill-select.status-CONCL:hover { background-color: #a7f3d0; }
.status-pill-select.status-CANCEL:hover { background-color: #fecaca; }

/* ================= SIMULação ================= */
.toolbar-simulacao {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.toolbar-simulacao .toolbar-left,
.toolbar-simulacao .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-simulacao .toolbar-right {
  margin-left: auto;
}

/* Config Tarifas ML */
.config-tarifas-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 16px;
}

.config-label {
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.config-item label {
  font-size: 12px;
  color: #64748b;
}

.config-item input {
  width: 55px;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

.simulacao-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.simulacao-insights .insight-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.simulacao-insights .insight-label {
  font-size: 12px;
  color: #64748b;
}

.simulacao-insights .insight-value {
  margin-top: 4px;
  font-weight: 700;
  font-size: 18px;
  color: #0f172a;
}

.config-item input:focus {
  outline: none;
  border-color: #3b82f6;
}

.config-item span {
  font-size: 12px;
  color: #64748b;
}

/* Tabela Simulação */
.simulacao-table .cell-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  background: transparent;
}

.simulacao-table .cell-input:hover {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.simulacao-table .cell-input:focus {
  border-color: #3b82f6;
  background: #fff;
  outline: none;
}

.simulacao-table .cell-number {
  text-align: right;
  width: 70px;
}

.simulacao-table .cell-readonly {
  color: #374151;
  font-size: 13px;
}

.simulacao-table .cell-select {
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 900px) {
  .simulacao-insights {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

.simulacao-table .comissao-display {
  font-size: 13px;
  color: #475569;
}

/* Margem Pills */
.margem-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.margem-alta {
  background: #dcfce7;
  color: #166534;
}

.margem-media {
  background: #fef9c3;
  color: #854d0e;
}

.margem-baixa {
  background: #fed7aa;
  color: #c2410c;
}

.margem-negativa {
  background: #fecaca;
  color: #dc2626;
}

.text-danger {
  color: #dc2626 !important;
}

.text-success {
  color: #22c55e !important;
}

/* ================= MODAL MELHORADO ================= */

/* Modal maior */
.modal-lg {
  width: min(900px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
}

/* Seções do formulário */
.form-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fafbfc;
}

.form-section legend {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-section legend i {
  color: #3b82f6;
}

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

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

/* Input readonly */
.input-readonly {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  cursor: not-allowed;
}

/* Input highlight (valores calculados) */
.input-highlight {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  font-weight: 700 !important;
  border-color: #a7f3d0 !important;
}

/* Modal header com ?cone */
.modal-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header h2 i {
  color: #3b82f6;
}

/* Chips de status */
.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.chip-green {
  background: #d1fae5;
  color: #065f46;
}

.chip-gray {
  background: #e5e7eb;
  color: #6b7280;
}

/* Contador de resultados */
.contador-resultados {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Checkbox label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Row arquivado */
.row-arquivado {
  background: #f9fafb;
  opacity: 0.7;
}

/* ================= RESPONSIVO MODAL ================= */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .modal-lg {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* ================= ROW CANCELADO ================= */
.row-cancelado {
  background: #fef2f2 !important;
  opacity: 0.7;
}

.row-cancelado td {
  text-decoration: line-through;
  color: #991b1b;
}

.row-cancelado .status-pill-select,
.row-cancelado .date-pill,
.row-cancelado .btn-icon {
  text-decoration: none;
}

/* ================= VENDAS - RESUMO E TOTAIS ================= */
.vendas-resumo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.vendas-totais {
  display: flex;
  gap: 20px;
}

.total-item {
  font-size: 14px;
  color: #374151;
}

.total-item strong {
  font-size: 16px;
}

.lucro-positivo {
  color: #059669 !important;
}

.lucro-negativo {
  color: #dc2626 !important;
}

/* ================= CANAL BADGE ================= */
.canal-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.canal-ml {
  background: #fff3cd;
  color: #856404;
}

.canal-shopee {
  background: #ffe4e1;
  color: #d63031;
}

.canal-facebook {
  background: #e7f3ff;
  color: #1877f2;
}

.canal-whatsapp {
  background: #d4edda;
  color: #128c7e;
}

.canal-lojaintegrada {
  background: #e2e3f3;
  color: #5a5a89;
}

.canal-outros {
  background: #e5e7eb;
  color: #6b7280;
}

/* ================= DATA EDITÁVEL NA TABELA ================= */
.date-edit-input {
  width: 100px;
  padding: 5px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  background: #fff;
  transition: all 0.2s ease;
  cursor: text;
}

.date-edit-input:hover {
  border-color: #3b82f6;
  background: #f0f9ff;
}

.date-edit-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #fff;
}

.row-cancelado .date-edit-input {
  text-decoration: none;
  opacity: 0.7;
}

/* ================= INPUT HINT ================= */
.input-hint {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* ================= VALOR FLEX (NEGATIVO = VERDE) ================= */
.valor-flex {
  color: #059669 !important;
  font-weight: 600;
}

/* ================= STATUS PILL SELECT ================= */
.status-AGUARD {
  background: #fef3c7;
  color: #92400e;
}

.status-TRANSP {
  background: #dbeafe;
  color: #1e40af;
}

.status-CONCL {
  background: #d1fae5;
  color: #065f46;
}

.status-CANCEL {
  background: #fee2e2;
  color: #991b1b;
}

/* ================= CONFIGURA? - LAYOUT APRIMORADO ================= */

/* Container Principal */
.config-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

/* Seções / Cards de Configuração */
.config-section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  padding: 0;
  margin-top: 0;
}

.config-section:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Header da Seção - clicável */
.config-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e5e7eb;
  border-radius: 16px 16px 0 0;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background 0.2s ease;
}

.config-header:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e8ecf1 100%);
}

/* Seta indicadora de collapse */
.config-header::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.config-section.collapsed .config-header::after {
  transform: translateY(-50%) rotate(-90deg);
}

.config-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ?cone no header */
.config-header h2 i {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue, #003366);
  color: white;
  border-radius: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.config-header small {
  color: #64748b;
  font-size: 12px;
  margin-left: 50px;
  display: block;
}

/* Body da Seção */
.config-body {
  padding: 24px;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
  overflow: hidden;
}

.config-section.collapsed .config-body {
  max-height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* Formulários na Config */
.config-body .form-group {
  margin-bottom: 0;
}

.config-body .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-body .form-group label i {
  color: var(--blue, #003366);
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.config-body .form-group input[type="text"],
.config-body .form-group input[type="number"],
.config-body .form-group input[type="email"],
.config-body .form-group input[type="url"] {
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  background: #fafafa;
  transition: all 0.2s ease;
}

.config-body .form-group input:hover {
  border-color: #d1d5db;
}

.config-body .form-group input:focus {
  outline: none;
  border-color: var(--blue, #003366);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.08);
}

/* Logo Upload Melhorado */
.logo-upload-area {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.logo-upload-area:hover {
  border-color: var(--blue, #003366);
  background: #f1f5f9;
}

.logo-preview {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: white;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.logo-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo-upload-area-sm {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-preview-sm {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #f8fafc;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  padding: 6px;
}

.logo-mini {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  padding: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Color Picker Melhorado */
.color-picker-area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
}
.color-picker-area input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0;
}


.color-picker-area input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-area input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

#cfg-cor-hex {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 15px;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Input com Prefixo/Sufixo */
.input-icon {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s;
}

.input-icon:focus-within {
  border-color: var(--blue, #003366);
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.08);
}

.input-icon input {
  border: none !important;
  box-shadow: none !important;
  flex: 1;
  padding: 12px 14px;
  background: transparent;
}

.input-icon input:focus {
  outline: none;
}

.input-prefix,
.input-suffix {
  padding: 12px 14px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Atalhos Grid Melhorado */
.atalhos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.atalho-item {
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.atalho-item:hover {
  background: #f1f5f9;
  border-color: var(--blue, #003366);
  transform: translateY(-1px);
}

.atalho-item label {
  color: #475569 !important;
  margin-bottom: 10px !important;
  font-weight: 600 !important;
}

.atalho-item label i {
  font-size: 16px !important;
  width: 22px !important;
}

.atalho-item input {
  background: white !important;
}

/* Config Table Melhorada */
.config-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.config-table thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.config-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e5e7eb;
  background: transparent;
}

.config-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #374151;
  font-size: 14px;
}

.config-table tbody tr {
  transition: background 0.15s ease;
}

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

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

.config-table input[type="text"],
.config-table input[type="number"] {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s;
}

.config-table input:focus {
  border-color: var(--blue, #003366);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
  outline: none;
}

.config-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: inline-block;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--blue, #003366);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.ativo {
  background: #dcfce7;
  color: #166534;
}

.status-badge.inativo {
  background: #fef2f2;
  color: #991b1b;
}

.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Badge genérico */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

/* Botões de ação na tabela */
.config-table .action-btns {
  display: flex;
  gap: 6px;
}

.config-table .btn-icon.edit {
  background: #dbeafe;
  color: #2563eb;
}

.config-table .btn-icon.edit:hover {
  background: #2563eb;
  color: white;
}

/* Backup Actions Melhorado */
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.backup-actions .btn {
  flex: 1;
  min-width: 180px;
  justify-content: center;
}

/* Footer ConfigurAções */
.config-footer {
  display: flex;
  justify-content: center;
  padding: 32px 0 16px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, 
    rgba(242, 244, 248, 1) 0%, 
    rgba(242, 244, 248, 0.95) 70%, 
    transparent 100%
  );
  z-index: 10;
}

.config-footer .btn-primary {
  min-width: 280px;
  padding: 16px 32px;
  font-size: 15px;
  background: var(--blue, #003366);
  box-shadow: 0 6px 20px rgba(0, 51, 102, 0.3);
}

.config-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 51, 102, 0.4);
  background: var(--blue, #003366);
}

/* AnimAções Config */
@keyframes configFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.config-section {
  animation: configFadeIn 0.4s ease forwards;
}

.config-section:nth-child(1) { animation-delay: 0.05s; }
.config-section:nth-child(2) { animation-delay: 0.1s; }
.config-section:nth-child(3) { animation-delay: 0.15s; }
.config-section:nth-child(4) { animation-delay: 0.2s; }
.config-section:nth-child(5) { animation-delay: 0.25s; }
.config-section:nth-child(6) { animation-delay: 0.3s; }
.config-section:nth-child(7) { animation-delay: 0.35s; }

/* Responsivo ConfigurAções */
@media (max-width: 768px) {
  .config-container {
    gap: 20px;
  }
  
  .config-header {
    padding: 16px 18px;
  }
  
  .config-header h2 {
    font-size: 14px;
  }
  
  .config-header h2 i {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
  
  .config-header small {
    margin-left: 46px;
    font-size: 11px;
  }
  
  .config-body {
    padding: 18px;
  }
  
  .atalhos-grid {
    grid-template-columns: 1fr;
  }
  
  .logo-upload-area {
    flex-direction: column;
    text-align: center;
  }
  
  .backup-actions {
    flex-direction: column;
  }
  
  .backup-actions .btn {
    width: 100%;
  }
  
  .config-footer .btn-primary {
    min-width: auto;
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .config-header::after {
    right: 16px;
  }
  
  .config-table {
    font-size: 12px;
  }
  
  .config-table th,
  .config-table td {
    padding: 10px 12px;
  }
}

/* =========================================================
   DASHBOARD - ESTILOS MODERNOS
========================================================= */

/* Barra de Período */
.dash-period-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.period-selects {
  display: flex;
  gap: 0.5rem;
}

.period-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-period {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted, #6b7280);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-period:hover {
  border-color: var(--primary, #3b82f6);
  color: var(--primary, #3b82f6);
}

.btn-period.active {
  background: var(--primary, #3b82f6);
  border-color: var(--primary, #3b82f6);
  color: #fff;
}

/* Seção KPI */
.kpi-section {
  margin-bottom: 1.5rem;
}

.kpi-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.kpi-section-title i {
  font-size: 0.9rem;
}

/* Grid KPIs */
.kpi-grid.kpi-5 {
  grid-template-columns: repeat(5, 1fr);
}

.kpi-grid.kpi-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
  .kpi-grid.kpi-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .kpi-grid.kpi-5,
  .kpi-grid.kpi-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .kpi-grid.kpi-5,
  .kpi-grid.kpi-3 {
    grid-template-columns: 1fr;
  }
}

/* Card KPI Moderno */
.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--card-accent, #3b82f6);
  border-radius: 12px 0 0 12px;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kpi-icon.vendas { background: #dbeafe; color: #2563eb; }
.kpi-icon.despesas { background: #fee2e2; color: #dc2626; }
.kpi-icon.lucro { background: #d1fae5; color: #059669; }
.kpi-icon.margem { background: #fef3c7; color: #d97706; }
.kpi-icon.roi { background: #ede9fe; color: #7c3aed; }
.kpi-icon.meta { background: #fce7f3; color: #db2777; }
.kpi-icon.inventario { background: #e0e7ff; color: #4f46e5; }
.kpi-icon.compras-mes { background: #ccfbf1; color: #0d9488; }
.kpi-icon.compras-ano { background: #fee2e2; color: #dc2626; }

.card-accent-green { --card-accent: #22c55e; }
.card-accent-red { --card-accent: #ef4444; }
.card-accent-blue { --card-accent: #3b82f6; }
.card-accent-purple { --card-accent: #8b5cf6; }
.card-accent-orange { --card-accent: #f59e0b; }
.card-accent-teal { --card-accent: #14b8a6; }
.card-accent-pink { --card-accent: #ec4899; }
.card-no-accent::before { display: none; }

.kpi-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  font-weight: 500;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-color, #111827);
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
}

.var-positiva {
  color: #059669;
  font-weight: 600;
}

.var-negativa {
  color: #dc2626;
  font-weight: 600;
}

/* Meta Progress */
.meta-card .kpi-content {
  width: 100%;
}

.meta-card .kpi-value {
  font-size: 1rem;
}

.meta-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.35rem 0;
}

.meta-bar {
  height: 100%;
  background: linear-gradient(90deg, #db2777, #f472b6);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Grid 2 Colunas */
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

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

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.card-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.card-header h3 i {
  color: var(--primary, #3b82f6);
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
}

/* Chart Card */
.dash-chart-card {
  min-height: 350px;
}

.dash-chart-card .chart-wrap {
  height: 280px;
}

/* Demonstrativo */
.dash-demo-card {
  padding: 1.25rem;
}

.demo-table {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.demo-row {
  display: grid;
  grid-template-columns: 1fr auto auto 100px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.demo-row.destaque {
  background: #f8fafc;
  margin: 0.25rem -0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border-bottom: none;
}

.demo-row.total {
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  color: #fff;
  margin: 0.5rem -0.75rem -0.5rem;
  padding: 0.85rem 0.75rem;
  border-radius: 0 0 8px 8px;
  border-bottom: none;
}

.demo-row.total .demo-label,
.demo-row.total .demo-value,
.demo-row.total .demo-pct {
  color: #fff;
  font-weight: 700;
}

.demo-label {
  font-size: 0.85rem;
  color: var(--text-color, #374151);
}

.demo-value {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  color: var(--text-color, #111827);
}

.demo-value.neg {
  color: #dc2626;
}

.demo-pct {
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
  text-align: right;
  min-width: 50px;
}

.demo-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.demo-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.demo-bar-fill.receita { background: #3b82f6; }
.demo-bar-fill.custo { background: #f87171; }
.demo-bar-fill.lucro { background: #34d399; }
.demo-bar-fill.lucro-final { background: #10b981; }

.demo-row.total .demo-bar {
  background: rgba(255,255,255,0.3);
}

.demo-row.total .demo-bar-fill {
  background: #fff;
}

/* ================= RESUMO LINHA (Compras/Vendas) ================= */
.resumo-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.resumo-totais {
  display: flex;
  align-items: center;
  gap: 16px;
}

.resumo-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #64748b;
}

.resumo-item i {
  color: #94a3b8;
}

.resumo-item strong {
  color: #1e293b;
  font-weight: 600;
}

.resumo-separador {
  color: #cbd5e1;
  font-weight: 300;
}

.valor-destaque {
  color: #059669 !important;
  font-size: 15px;
}

/* Responsivo Resumo */
@media (max-width: 768px) {
  .resumo-linha {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .resumo-totais {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* botão Excluir - Lixeira Vermelha */
.btn-icon.btn-delete,
.btn-icon.delete {
  color: #dc2626;
}

.btn-icon.btn-delete:hover,
.btn-icon.delete:hover {
  color: #fff;
  background: #dc2626;
}

/* ================= CURVA ABC ================= */
.abc-resumo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.abc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 5px solid;
}

.abc-card.abc-a { border-left-color: #22c55e; }
.abc-card.abc-b { border-left-color: #eab308; }
.abc-card.abc-c { border-left-color: #ef4444; }
.abc-card.abc-total { border-left-color: #3b82f6; }

.abc-letra {
  font-size: 32px;
  font-weight: 900;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.abc-a .abc-letra { background: #dcfce7; color: #16a34a; }
.abc-b .abc-letra { background: #fef9c3; color: #ca8a04; }
.abc-c .abc-letra { background: #fee2e2; color: #dc2626; }
.abc-total .abc-letra { background: #dbeafe; color: #2563eb; font-size: 20px; }

.abc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.abc-titulo {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.abc-qtd {
  font-size: 12px;
  color: #6b7280;
}

.abc-valor {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.abc-pct {
  font-size: 12px;
  color: #9ca3af;
}

/* GRÁFICO ABC */
.abc-grafico-container {
  margin-bottom: 20px;
}

.abc-chart-wrap {
  height: 300px;
  width: 100%;
}

.abc-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Badge ABC */
.abc-badge {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
}

.abc-badge-a { background: #dcfce7; color: #16a34a; }
.abc-badge-b { background: #fef9c3; color: #ca8a04; }
.abc-badge-c { background: #fee2e2; color: #dc2626; }

/* Filtro com label */
.filter-group label {
  font-size: 12px;
  color: #6b7280;
  margin-right: 6px;
}

/* Responsivo ABC */
@media (max-width: 1024px) {
  .abc-resumo {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .abc-resumo {
    grid-template-columns: 1fr;
  }
  
  .atalhos-grid {
    grid-template-columns: 1fr;
  }
}
/* ================= FIX HEADER LOGO ================= */
.header .logo-area img {
  height: 42px !important;
  max-height: 42px !important;
  max-width: 160px !important;
  padding: 4px 8px !important;
}

/* Garantir que logo na config NÃO afete header */
.config-card-body .logo-preview,
.logo-upload-area .logo-preview,
.logo-upload-area img,
#cfg-logo-preview {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
}
/* ================= ESTOQUE - STATUS BADGES ================= */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.disponivel {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.baixo {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.esgotado {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.arquivado {
  background: #e5e7eb;
  color: #6b7280;
}

.status-badge i {
  font-size: 10px;
}

/* ================= ESTOQUE - BARRA DE PROGRESSO MINI ================= */
.progress-bar-mini {
  width: 60px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-mini .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ================= ROW ARQUIVADO ================= */
.row-arquivado {
  background: #f9fafb !important;
  opacity: 0.6;
}

.row-arquivado td {
  color: #9ca3af;
}

/* ================= TEXT COLORS ================= */
.text-danger {
  color: #dc2626 !important;
}

.text-warning {
  color: #d97706 !important;
}
/* ================= CURVA ABC ================= */

/* Cards Container */
.abc-cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .abc-cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .abc-cards-container {
    grid-template-columns: 1fr;
  }
}

/* ABC Card */
.abc-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}

.abc-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.abc-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.abc-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.abc-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.abc-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.abc-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.abc-card-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.abc-card-footer small {
  font-size: 11px;
  color: var(--text-muted);
}

/* Card Colors */
.classe-a-card {
  border-left: 4px solid #22c55e;
}

.classe-b-card {
  border-left: 4px solid #eab308;
}

.classe-c-card {
  border-left: 4px solid #ef4444;
}

.total-card {
  border-left: 4px solid #3b82f6;
}

/* ABC Badge */
.abc-badge,
.badge-classe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.badge-A { background: #22c55e; }
.badge-B { background: #eab308; }
.badge-C { background: #ef4444; }

/* Charts Container */
.abc-charts-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1000px) {
  .abc-charts-container {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}

.chart-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 15px 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Tabela ABC - Linhas coloridas */
.forn-table tr.classe-a td {
  background: rgba(34, 197, 94, 0.08);
}

.forn-table tr.classe-b td {
  background: rgba(234, 179, 8, 0.08);
}

.forn-table tr.classe-c td {
  background: rgba(239, 68, 68, 0.08);
}

/* Filter group com label */
.filter-group label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 6px;
}
/* ================= CURVA ABC - CARDS ================= */

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

@media (max-width: 1200px) {
  .abc-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.abc-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.abc-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

.abc-card-a .abc-card-icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.abc-card-b .abc-card-icon { background: linear-gradient(135deg, #eab308, #ca8a04); }
.abc-card-c .abc-card-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.abc-card-total .abc-card-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }

.abc-letra {
  font-size: 22px;
  font-weight: 700;
}

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

.abc-card-content h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.abc-desc {
  margin: 0 0 10px 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.abc-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.abc-stat-item {
  display: flex;
  flex-direction: column;
}

.abc-stat-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.abc-stat-item .abc-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* ================= CURVA ABC - CHARTS ================= */

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 1200px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 1000px) {
  .abc-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}

.chart-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 15px 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ================= CURVA ABC - TABELA ================= */

.badge-classe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.badge-A { background: #22c55e; }
.badge-B { background: #eab308; }
.badge-C { background: #ef4444; }

.forn-table tr.classe-a td { background: rgba(34, 197, 94, 0.08); }
.forn-table tr.classe-b td { background: rgba(234, 179, 8, 0.08); }
.forn-table tr.classe-c td { background: rgba(239, 68, 68, 0.08); }

/* Filter group com label */
.filter-group label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 6px;
}
/* ================= CONFIGURAções ================= */

.config-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}

@media (max-width: 1100px) {
  .config-container {
    grid-template-columns: 1fr;
  }
}

.config-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.config-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Section */
.config-section {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.config-section-header {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.config-section-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-section-header h2 i {
  color: var(--primary);
  font-size: 14px;
}

.config-section-body {
  padding: 20px;
}

/* Grid */
.config-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

/* Form Group */
.config-section .form-group {
  margin-bottom: 0;
}

.config-section .form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.config-section .form-group label i {
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

.config-section .form-group input[type="text"],
.config-section .form-group input[type="email"],
.config-section .form-group input[type="url"],
.config-section .form-group input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s;
}

.config-section .form-group input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.config-section .form-group small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Checkbox */
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Actions */
.config-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.config-timestamp {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  text-align: center;
}

.stat-item i {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 6px;
}

.stat-item span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.stat-item small {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-size {
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.stat-size i {
  color: var(--primary);
}

/* Backup Section */
.config-info {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}

.config-warning {
  font-size: 13px;
  color: #ef4444;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.btn-block {
  width: 100%;
  margin-bottom: 10px;
}

.btn-success {
  background: #22c55e;
  color: #fff;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

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

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Message */
.config-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.config-message-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  color: #22c55e;
}

.config-message-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.config-message-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.config-message button {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
/* ================= SALDO INICIAL ================= */
.config-section-highlight {
  border: 2px solid #6366f1;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.config-section-highlight .config-section-header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.config-section-highlight .config-section-header h2 {
  color: white;
}

.saldo-inicial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.saldo-inicial-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.saldo-inicial-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: #1e293b;
}

.saldo-inicial-header img {
  height: 24px;
  width: auto;
}

.saldo-inicial-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.saldo-inicial-total span {
  font-size: 14px;
  color: #64748b;
}

.saldo-inicial-total strong {
  font-size: 20px;
  color: #16a34a;
}

.input-money {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  text-align: right;
}
/* ========================================
   CONFIGURAções - LAYOUT COMPACTO
   ======================================== */

/* Container principal */
.config-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 100px;
}

/* Row lado a lado */
.config-row {
  display: flex;
  gap: 20px;
}

/* Cards */
.config-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  flex: 1;
  position: relative;
}

.config-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--card-accent, #3b82f6);
  border-radius: 12px 0 0 12px;
}

.config-card.config-1 { flex: 1; }
.config-card.config-2 { flex: 2; }

/* Header do card */
.config-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.config-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue, #003366);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  flex-shrink: 0;
}

.config-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.config-card-header small {
  font-size: 11px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

/* Body */
.config-card-body {
  padding: 16px 20px;
}

/* Grids */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.atalhos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Cores rápidas */
.cores-rapidas {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.cor-rapida {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.cor-rapida:hover {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Saldo total box */
.saldo-total-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
}

.saldo-total-box small {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.saldo-total-box strong {
  font-size: 18px;
  color: #16a34a;
}

/* Stats mini */
.stats-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-mini-item {
  text-align: center;
  padding: 8px;
  background: #f8fafc;
  border-radius: 8px;
}

.stat-mini-item i {
  display: block;
  font-size: 14px;
  color: var(--blue);
  margin-bottom: 4px;
}

.stat-mini-item span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.stat-mini-item small {
  font-size: 10px;
  color: #64748b;
}

/* Mini table */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mini-table th,
.mini-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.mini-table th {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  background: #f8fafc;
}

.logo-mini {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
}

/* Status badges */
.status-ativo {
  display: inline-block;
  padding: 3px 8px;
  background: #dcfce7;
  color: #166534;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

.status-inativo {
  display: inline-block;
  padding: 3px 8px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

/* Logo upload */
.logo-upload-area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8fafc;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
}

.logo-upload-area img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}

.logo-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Color picker */
.color-picker-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.color-picker-box input[type="color"] {
  appearance: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.color-picker-box input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-box input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-picker-box span {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 13px;
  color: #374151;
  text-transform: uppercase;
}

/* Input com prefixo/sufixo */
.input-with-prefix,
.input-with-suffix {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: all 0.2s;
}

.input-with-prefix:focus-within,
.input-with-suffix:focus-within {
  border-color: var(--blue, #003366);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.input-with-prefix span,
.input-with-suffix span {
  padding: 8px 10px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.input-with-prefix span { border-right: 1px solid #d1d5db; }
.input-with-suffix span { border-left: 1px solid #d1d5db; }

.input-with-prefix input,
.input-with-suffix input {
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  padding: 8px 12px;
  font-size: 13px;
}

/* Backup buttons */
.backup-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-danger-light {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-light:hover {
  background: #fee2e2;
}

/* botão salvar sticky */
.config-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, rgba(242, 244, 248, 1) 0%, rgba(242, 244, 248, 0.95) 80%, transparent 100%);
}

.config-save .btn-primary {
  min-width: 300px;
  padding: 14px 28px;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(0, 51, 102, 0.3);
}

.config-timestamp {
  font-size: 11px;
  color: #64748b;
}

/* Mensagem */
.config-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.config-message-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.config-message-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.config-message button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
}

/* Responsivo */
@media (max-width: 1024px) {
  .config-row { flex-direction: column; }
  .atalhos-grid { grid-template-columns: repeat(2, 1fr); }
  .config-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .atalhos-grid { grid-template-columns: 1fr; }
  .stats-mini { grid-template-columns: repeat(2, 1fr); }
  .config-save .btn-primary { min-width: auto; width: 100%; }
}
/* ================= TABELA COM SCROLL HORIZONTAL SEMPRE VISÍVEL ================= */
.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  margin-bottom: 1rem;
}

/* força a barra de rolagem aparecer sempre */
.table-wrapper::-webkit-scrollbar {
  height: 12px;
  display: block;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Para Firefox */
.table-wrapper {
  scrollbar-width: auto;
  scrollbar-color: #94a3b8 #f1f5f9;
}

/* Garante scroll sempre VISÍVEL (cross-browser) */
.table-scroll-always {
  overflow-x: scroll !important;
}
/* =========================================================
   TABELA COM SCROLL HORIZONTAL SEMPRE VISÍVEL
   ========================================================= */

.table-scroll-container {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 320px);
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.table-scroll-container .table-wrapper {
  flex: 1;
  overflow-x: scroll !important; /* SEMPRE mostra scroll horizontal */
  overflow-y: auto;
  min-height: 200px;
}

/* Barra de rolagem horizontal SEMPRE VISÍVEL e estilizada */
.table-scroll-container .table-wrapper::-webkit-scrollbar {
  height: 16px;
  display: block !important;
}

.table-scroll-container .table-wrapper::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 8px;
  margin: 0 4px;
}

.table-scroll-container .table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 8px;
  border: 3px solid #e2e8f0;
  min-width: 60px;
}

.table-scroll-container .table-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.table-scroll-container .table-wrapper::-webkit-scrollbar-thumb:active {
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

/* Barra vertical */
.table-scroll-container .table-wrapper::-webkit-scrollbar:vertical {
  width: 12px;
}

.table-scroll-container .table-wrapper::-webkit-scrollbar-thumb:vertical {
  background: linear-gradient(180deg, #94a3b8, #64748b);
  border: 3px solid #e2e8f0;
}

/* Firefox */
.table-scroll-container .table-wrapper {
  scrollbar-width: auto;
  scrollbar-color: #3b82f6 #e2e8f0;
}

/* Cabeçalho fixo (sticky) ao rolar verticalmente */
.table-scroll-container .forn-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-scroll-container .forn-table thead th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-bottom: 2px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Card sem padding extra */
.forn-section {
  padding: 0 !important;
  overflow: hidden;
}

.forn-section .table-scroll-container {
  padding: 0;
}

/* Garante que a tabela ocupe toda largura necessária */
.table-scroll-container .forn-table {
  border-collapse: collapse;
  width: 100%;
}

/* =========================================================
   INDICADOR VISUAL DE QUE H? MAIS conteúdo
   ========================================================= */

.table-scroll-container::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 16px; /* NÃO cobre o scrollbar */
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-scroll-container:hover::after {
  opacity: 1;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 768px) {
  .table-scroll-container {
    max-height: calc(100vh - 280px);
    min-height: 250px;
  }

  .table-scroll-container .table-wrapper::-webkit-scrollbar {
    height: 12px;
  }
}
/* ================= SUBSCRIPTION / PLANOS ================= */

/* Trial Banner */
.trial-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  z-index: 9999;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.trial-banner button {
  background: white;
  color: #d97706;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.trial-banner button:hover {
  transform: scale(1.05);
}

body:has(.trial-banner) .header {
  top: 44px;
}

body:has(.trial-banner) .sidebar {
  top: calc(var(--header-h) + 44px);
}

body:has(.trial-banner) .dashboard {
  margin-top: calc(var(--header-h) + 44px);
}

/* Limit Warning */
.limit-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.limit-warning i {
  color: #f59e0b;
  font-size: 18px;
}

.limit-warning .upgrade-link {
  margin-left: auto;
  color: #d97706;
  font-weight: 600;
  cursor: pointer;
}

.limit-warning .upgrade-link:hover {
  text-decoration: underline;
}

/* Feature Lock */
.feature-locked {
  position: relative;
  pointer-events: none;
  opacity: 0.5;
}

.feature-locked::after {
  content: "?? Pro";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #003366;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  pointer-events: auto;
  cursor: pointer;
}

/* Pricing Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.pricing-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.pricing-card.popular {
  border-color: #003366;
  transform: scale(1.02);
}

.pricing-card.popular::before {
  content: "MAIS POPULAR";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #003366;
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.pricing-header {
  text-align: center;
  margin-bottom: 25px;
}

.pricing-header h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.pricing-price {
  font-size: 48px;
  font-weight: 800;
  color: #003366;
}

.pricing-price span {
  font-size: 16px;
  font-weight: 400;
  color: #6b7280;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li i {
  color: #22c55e;
}

.pricing-features li.disabled {
  color: #9ca3af;
}

.pricing-features li.disabled i {
  color: #d1d5db;
}

.pricing-cta {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.pricing-cta.primary {
  background: #003366;
  color: white;
  border: none;
}

.pricing-cta.primary:hover {
  background: #002244;
  transform: translateY(-2px);
}

.pricing-cta.secondary {
  background: white;
  color: #003366;
  border: 2px solid #003366;
}

/* Badge Pro */
.badge-pro {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Usage Meter */
.usage-meter {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.usage-meter-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.usage-meter-label {
  font-size: 13px;
  color: #374151;
}

.usage-meter-value {
  font-size: 13px;
  font-weight: 600;
  color: #003366;
}

.usage-meter-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.usage-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.usage-meter-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.usage-meter-fill.danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* ================= CURVA ABC ================= */
.curva-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.classe-card {
  padding: 20px;
  border-radius: 8px;
  color: white;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.classe-a {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.classe-b {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.classe-c {
  background: linear-gradient(135deg, #ea580c, #f97316);
}

.classe-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.classe-card .numero {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 5px;
}

.classe-card .valor {
  font-size: 16px;
  margin-bottom: 5px;
}

.classe-card .pct {
  font-size: 14px;
  opacity: 0.9;
}

.curva-tabela {
  overflow-x: auto;
}

.curva-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.curva-table thead {
  background: #f3f4f6;
  font-weight: 600;
}

.curva-table th, .curva-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.curva-table th {
  color: #374151;
  font-weight: 600;
}

.curva-table tr:hover {
  background: #f9fafb;
}

.curva-table tr.classe-a {
  border-left: 4px solid #16a34a;
}

.curva-table tr.classe-b {
  border-left: 4px solid #2563eb;
}

.curva-table tr.classe-c {
  border-left: 4px solid #ea580c;
}

.classe-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
}

.classe-badge.classe-a {
  background: #dcfce7;
  color: #15803d;
}

.classe-badge.classe-b {
  background: #dbeafe;
  color: #1e40af;
}

.classe-badge.classe-c {
  background: #fed7aa;
  color: #92400e;
}

.classe-a .classe-badge {
  background: #dcfce7;
  color: #15803d;
}

.classe-b .classe-badge {
  background: #dbeafe;
  color: #1e40af;
}

.classe-c .classe-badge {
  background: #fed7aa;
  color: #92400e;
}
/* =========================
   VENDAS - forçaR SCROLL HORIZONTAL VISÍVEL
   ========================= */
.vendas-table-card {
  overflow: visible !important;   /* NÃO deixa o card cortar a barra */
}

.vendas-table-card .table-scroll-container {
  width: 100%;
  max-width: 100%;
}

.vendas-table-card .table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: scroll !important;  /* sempre VISÍVEL */
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

/* garante que a tabela NÃO "encolha" e gere overflow */
.vendas-table-card .forn-table {
  width: max-content;
  min-width: 1600px; /* reforço (mesmo que você j? tenha inline) */
}
/* =========================
   VENDAS - forçaR SCROLL HORIZONTAL SEMPRE VISÍVEL
   (NÃO afeta Compras/Estoque)
   ========================= */

.vendas-table-card{
  overflow: visible !important;   /* impede cortar a barra */
}

.vendas-scroll{
  width: 100%;
  max-width: 100%;
}

.vendas-wrapper{
  width: 100%;
  max-width: 100%;
  overflow-x: scroll !important;  /* SEMPRE VISÍVEL */
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  padding-bottom: 12px;           /* Espaço pra barra aparecer */
}

/* garante que a tabela crie overflow horizontal */
.vendas-table{
  width: max-content;
  min-width: 1600px;
}
/* =========================
   VENDAS - BARRA HORIZONTAL FIXA (SEMPRE VISÍVEL)
   ========================= */

.vendas-table-card { overflow: visible !important; }

.vendas-wrapper{
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}

/* barra fixa embaixo */
.vendas-xbar{
  width: 100%;
  height: 16px;
  overflow-x: scroll;
  overflow-y: hidden;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* "conteúdo" interno s? para gerar largura da barra */
.vendas-xbar-inner{
  height: 1px;
  width: 0px; /* JS ajusta */
}
/* Simulação: header da tabela grudado e linha mais limpa */
body[data-page="simulacao"] .forn-section { overflow-x: auto; }
body[data-page="simulacao"] .simulacao-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
}
body[data-page="simulacao"] .simulacao-table tbody tr:nth-child(even){
  background: #fcfcfd;
}
body[data-page="simulacao"] .simulacao-table th:nth-child(1),
body[data-page="simulacao"] .simulacao-table td:nth-child(1){
  min-width: 180px;
}
body[data-page="simulacao"] .simulacao-table th:nth-child(2),
body[data-page="simulacao"] .simulacao-table td:nth-child(2){
  min-width: 420px;
}
body[data-page="simulacao"] .simulacao-table .sim-sku,
body[data-page="simulacao"] .simulacao-table .sim-produto{
  min-width: 100%;
}
/* =============================
   COMPRAS - STATUS PILLS + ACTIONS (padrão do print)
============================= */

.compras-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 86px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease;
  user-select: none;
}

.icon-btn:hover {
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.08);
}

.icon-btn:active { transform: scale(0.98); }

.icon-btn i { font-size: 14px; opacity: 0.9; }

.icon-btn.icon-edit i { color: #0f172a; }
.icon-btn.icon-del  i { color: #ef4444; }

/* ===== PILL (status) ===== */
.pill-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .6px;
  font-size: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform .06s ease, filter .15s ease;
}

.pill-status:hover { filter: brightness(0.98); }
.pill-status:active { transform: scale(0.99); }

/* Paleta suave igual seu print */
.pill-concl  { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.pill-transp { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.pill-aguard { background: #fef9c3; color: #a16207; border-color: #fde68a; }
.pill-cancel { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* Opcional: alinhar a coluna do status bonitinho */
.td-status {
  width: 120px;
}
.cell-edit{
  cursor:pointer;
  text-decoration: underline dotted;
}
.cell-edit:hover{
  opacity:.8;
}
