:root {
  --cream: #fff;
  --paper: #fff;
  --line: #e2e6ec;
  --ncc-surface: #f5f7fa;
  --ncc-neutral: #566277;
}
body, body.admin-only, body .store, body.admin-only .adminmain, body .sidebar, body .modal,
body .campaign.shell, body .featureband, body .ncc-store-location {
  background: #fff;
}
body .adminhead, body .sidebar, body .box, body .stat,
body .featureband, body .campaign.shell, body .ncc-store-location {
  border-color: var(--line);
}
body .featureband, body .campaign.shell { border: 1px solid var(--line); }
body .campaign.shell .campaign-photo { background-color: #fff; }
body .ncc-help, body .ncc-cake-intro, body .ops-customer-contact,
body .ncc-ordered-items, body .ncc-ordered-line, body .ncc-items-heading,
body .ncc-customer-order, body .ncc-orders-view-tabs,
body .ncc-delivery-panel, body .ncc-checkout-summary,
body .ncc-cake-admin-card { background: #fff; border-color: var(--line); }
body .staff-shell, body .live-trolley-band, body .trust-strip,
body .step, body .basket-total, body .checkout-summary,
body .ncc-assigned-rider, body .basket-stage {
  background: #fff;
  border-color: var(--line);
}
body .live-trolley-band { border: 1px solid var(--line); }
body .chip, body .step-num, body .ncc-ordered-quantity,
body .ncc-settings-avatar, body .live-stage-note {
  background: var(--ncc-surface);
  border-color: var(--line);
}

body #panel-orders .ncc-orders-box { padding: 0; border: 0; box-shadow: none; }
.ncc-order-toolbar {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(132px, 1fr) minmax(170px, 2fr) auto auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ncc-surface);
}
.ncc-order-toolbar label {
  display: grid;
  gap: 7px;
  color: #405067;
  font-weight: 700;
  font-size: 12px;
}
.ncc-order-toolbar input, .ncc-order-toolbar select, .ncc-order-pagination select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #d8dfe8;
  border-radius: 8px;
  background: #fff;
  color: #243247;
  font-size: 13px;
}
.ncc-order-toolbar button { min-height: 42px; white-space: nowrap; }
.ncc-order-table-frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ncc-orders-table { width: 100%; border-collapse: collapse; color: #202b3b; font-size: 13px; }
.ncc-orders-table th {
  padding: 13px 12px;
  background: var(--ncc-surface);
  color: #516178;
  font-size: 11px;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}
.ncc-orders-table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; white-space: normal; }
.ncc-orders-table tr:hover td { background: #fafbfd; }
.ncc-orders-table small { display: block; margin-top: 4px; color: var(--ncc-neutral); font-size: 11px; line-height: 1.35; }
.ncc-orders-table a { color: #405777; white-space: nowrap; }
.ncc-table-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.ncc-orders-table .ncc-table-total { white-space: nowrap; }
.ncc-table-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #dce5f1; border-radius: 30px; background: #eef4fb; color: #315681; font-weight: 700; font-size: 11px; }
.ncc-table-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.ncc-table-status[data-tone="success"] { background: #eaf7ef; border-color: #c5e8d1; color: #23704a; }
.ncc-table-status[data-tone="pending"] { background: #fff7e6; border-color: #f3dfaf; color: #875909; }
.ncc-table-status[data-tone="cancelled"] { background: #fcf0f1; border-color: #f2d4d8; color: #963345; }
.ncc-order-row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.ncc-order-row-actions .softbtn { margin: 0; white-space: nowrap; }
.ncc-order-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); color: #516178; font-size: 12px; }
.ncc-order-pagination label { display: flex; align-items: center; gap: 6px; }
.ncc-order-pagination select { width: auto; height: 32px; }
.ncc-order-pagination button { width: 33px; height: 33px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #243247; font-size: 19px; }
.ncc-order-pagination button:disabled { color: #687487; opacity: .48; cursor: default; }
.ncc-orders-table .ncc-orders-empty-row { padding: 24px; color: var(--ncc-neutral); }
body .modal:has(#opsOrderDetails) { width: min(720px,100%); }
#opsOrderDetails .ops-order-card { margin-bottom: 0; }
#panel-dashboard .box:has(#recentOrders) { min-width: 0; }
#panel-dashboard .box:has(#recentOrders) > .boxtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#recentOrders .ncc-orders-table td { overflow-wrap: anywhere; }
@media(max-width: 1120px) {
  #panel-dashboard .adminrow { grid-template-columns: minmax(0, 1fr); }
}
@media(max-width: 1080px) {
  .ncc-order-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ncc-order-search { grid-column: 1/-1; }
  .ncc-orders-table td, .ncc-orders-table th { padding-inline: 8px; }
}
@media(max-width: 820px) {
  body.admin-only .admin { flex-direction: column; }
  body.admin-only .sidebar { width: 100%; display: flex; align-items: center; overflow-x: auto; gap: 6px; padding: 10px; }
  body.admin-only .sidebar > * { flex: none; }
  body.admin-only .adminmain { width: 100%; padding: 14px; }
  body.admin-only .adminhead { flex-wrap: wrap; padding: 14px; }
  .ncc-orders-table, .ncc-orders-table tbody { display: block; }
  .ncc-orders-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ncc-orders-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 13px; border-bottom: 1px solid var(--line); }
  .ncc-orders-table tr:last-child { border-bottom: 0; }
  .ncc-orders-table td { border: 0; padding: 0; overflow-wrap: anywhere; }
  .ncc-orders-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: 10px; font-weight: 700; color: var(--ncc-neutral); text-transform: uppercase; }
  .ncc-orders-table td[data-label="Actions"], .ncc-orders-table .ncc-orders-empty-row { grid-column: 1/-1; }
}
