/* === FALUB — tabelas.css === */

/* ── STAT CARDS ─────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px 2px 0 0;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.stat-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.stat-sub {
  font-size: 12px;
  color: var(--green);
  margin-top: 7px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── TABELAS ─────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 600px;
}

thead { background: var(--surface2); }

th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
  border-bottom: 1px solid var(--border2);
}

td {
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

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

/* ── PRODUTO CÉLULA ──────────────────────────────────────────────────── */
.prod-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prod-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.prod-cell-name {
  font-weight: 600;
  color: var(--text);
  font-size: 13.5px;
}

.prod-cell-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* ── BADGES ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.badge-green  { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(22,128,60,0.18); }
.badge-red    { background: var(--red-bg);    color: var(--red);    border: 1px solid rgba(192,25,43,0.18); }
.badge-amber  { background: var(--amber-bg);  color: var(--amber);  border: 1px solid rgba(180,83,9,0.18); }
.badge-blue   { background: var(--blue-bg);   color: var(--blue);   border: 1px solid rgba(29,78,216,0.18); }
.badge-oil    { background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(200,0,31,0.18); }

/* ── BOTÕES DE AÇÃO ──────────────────────────────────────────────────── */
.action-btns { display: flex; gap: 5px; }

.icon-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.15s;
}

.icon-btn:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.icon-btn.del:hover {
  border-color: var(--red);
  background: var(--red-bg);
}

/* ── SELECT DE STATUS ─────────────────────────────────────────────────── */
.status-select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 5px 8px;
  font-size: 12px;
  font-family: 'Barlow', sans-serif;
  transition: border-color 0.15s;
}

.status-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── EMPTY STATE ─────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text3);
  text-align: center;
}

.big-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}
