/* Orders Index Modern Styling - harmonized with order details print layout */

:root {
  --surface: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #292be9;
  --border: #e5e7eb;
  --surface-alt: #f9fafb;
}

.orders-index {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  overflow: hidden;
}

.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.orders-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.orders-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.orders-toolbar .btn {
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
}

.orders-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px 0;
}

@media (max-width: 992px) { .orders-filters { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .orders-filters { grid-template-columns: 1fr; } }

.orders-table-wrap {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.orders-table thead th {
  background: var(--surface-alt);
  position: sticky;
  top: 0;
  z-index: 1;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.orders-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

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

.orders-table .img-cell img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}

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

.badge-pending { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.badge-approved { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-completed { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-rejected { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.orders-actions .dropdown button {
  border: none; background: transparent; padding: 4px 8px; border-radius: 6px;
}
.orders-actions .dropdown button:hover { background: var(--surface-alt); }

/* Mobile card layout */
@media (max-width: 640px) {
  .orders-table thead { display: none; }
  .orders-table tr { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 12px; }
  .orders-table td { border: none; padding: 4px 0; }
  .orders-table td.img-cell { grid-row: span 3; }
  .orders-table td.actions-cell { grid-column: 1 / -1; justify-content: flex-end; display: flex; }
}

