/* Shared list-page styles (Orders, Products): summary cards, tabs, filters, table, pager */
/* Orders page styles (shared layout lives in layout.css) */
.pill-gray { background: #EDEFEE; color: #4A4A4A; }

/* ---------- Summary cards ---------- */
.ostats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.ostat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ostat-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #1F1F1F;
}
.ostat small { display: block; font-size: 12.5px; color: var(--muted); }
.ostat strong { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.25; }
.ostat em { display: block; margin-top: 2px; font-size: 12.5px; font-style: normal; font-weight: 500; color: var(--text); }
.ostat em.up { color: #219653; }
.ostat em.down { color: #E74C3C; }

/* ---------- Tabs ---------- */
.orders-card { padding: 20px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tab {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.tab:hover { background: #F4F6F5; }
.tab .count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #EDEFEE;
  color: #4A4A4A;
  font-size: 12px;
  font-weight: 600;
}
.tab.active { background: var(--dark); color: #fff; }
.tab.active .count { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ---------- Filters ---------- */
.filters { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.o-search {
  width: 254px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #8A8A8E;
}
.o-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--text);
}
.o-search input::placeholder { color: #8A8A8E; }

.select {
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2312141c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m7 15 5 5 5-5'/><path d='m7 9 5-5 5 5'/></svg>") no-repeat right 9px center;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; }
.p-cell .p-product-image { width: 44px; height: 44px; flex: 0 0 44px; display: block; border-radius: 10px; background: #F4F6F5; object-fit: cover; }
.p-cell .p-product-image-empty { border: 1px solid var(--border); }
.otable {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.otable th, .otable td { text-align: left; padding: 0 0 0 12px; }
.otable th:nth-child(1) { width: 47px; }

.otable thead th {
  height: 38px;
  background: #F4F6F5;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.otable thead th:first-child { border-radius: 8px 0 0 8px; }
.otable thead th:last-child { border-radius: 0 8px 8px 0; }

.otable tbody td { height: 69px; border-bottom: 1px solid #EAEAEA; vertical-align: middle; }
.otable tbody tr:hover td { background: #F4F6F5; }
.otable tbody tr.empty td { height: 120px; text-align: center; color: var(--muted); padding: 0; background: transparent; }

.chk {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  display: grid;
  place-content: center;
  background: #fff;
  border: 1.5px solid #8A8A8E;
  border-radius: 5px;
  cursor: pointer;
}
.chk:checked { background: var(--primary); border-color: var(--primary); }
.chk:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.o-id { display: block; font-size: 15px; font-weight: 500; color: var(--primary-dark); }
.o-sub { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; }




.row-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.otable td:last-child { text-align: right; padding-right: 12px; }
.otable td:last-child .row-btn { margin-left: auto; }

/* ---------- Footer / pager ---------- */
.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.pager { display: flex; align-items: center; gap: 8px; }
.pager-controls { display: flex; align-items: center; gap: 10px; }
.page-size-label { color: var(--muted); white-space: nowrap; }
.page-size { height: 34px; min-width: 68px; }
.page-label { min-width: 52px; text-align: center; color: var(--text); }
.pager button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pager button:disabled { opacity: 0.5; cursor: default; }
.pager .page { background: var(--dark); border-color: var(--dark); color: #fff; }

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