:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222a35;
  background: #f3f5f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }

.shell { width: min(1440px, calc(100% - 36px)); margin: 0 auto; padding: 32px 0 56px; }
.topbar, .section-heading, .pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topbar { margin-bottom: 26px; }
.eyebrow { margin: 0 0 6px; color: #657286; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.03em; }
h2 { margin-bottom: 6px; font-size: 20px; }
.panel { border: 1px solid #e0e5ec; border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgb(26 39 57 / 5%); }
.login-panel { width: min(440px, 100%); margin: 8vh auto 0; padding: 28px; }
.login-panel > p { color: #647084; line-height: 1.6; }
.login-panel form { display: grid; gap: 10px; }
.login-panel label, .filters label { color: #4d596a; font-size: 13px; font-weight: 650; }
input, select { min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid #cfd6e0; border-radius: 8px; background: white; color: inherit; }
input:focus, select:focus, button:focus-visible { outline: 3px solid rgb(53 111 219 / 25%); outline-offset: 1px; border-color: #5a8dea; }
.button { min-height: 38px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-weight: 650; }
.button--primary { color: white; background: #275fc7; }
.button--primary:hover { background: #1f50ab; }
.button--quiet { border-color: #d9e0e9; color: #354154; background: #fff; }
.button--quiet:hover { background: #f5f7fa; }
.message { min-height: 1.25em; margin: 12px 0 0; color: #a13b36; font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: grid; gap: 8px; padding: 18px; border: 1px solid #e0e5ec; border-radius: 12px; background: #fff; }
.stat span { color: #677386; font-size: 13px; }
.stat strong { font-size: 25px; letter-spacing: -.03em; }
.orders-panel { padding: 22px; }
.section-heading { align-items: flex-start; margin-bottom: 20px; }
.section-heading p { margin-bottom: 0; color: #697588; font-size: 13px; line-height: 1.6; }
.filters { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto minmax(140px, 180px) auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.search-label, .status-label { white-space: nowrap; }
.table-wrap { overflow: auto; border: 1px solid #e2e7ee; border-radius: 9px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th, td { padding: 13px 12px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
th { color: #576477; background: #f8f9fb; font-size: 12px; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
td.order-no { min-width: 230px; color: #263c5b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
td.email { min-width: 220px; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge--paid { color: #176647; background: #e4f5ec; }
.badge--pending { color: #875d0a; background: #fff2ce; }
.pagination { margin-top: 16px; color: #647084; font-size: 13px; }
.pagination > div { display: flex; gap: 8px; }
.footnote { margin: 18px 0 0; color: #748094; font-size: 12px; line-height: 1.6; }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters label { align-self: end; }
  .filters input { grid-column: 1 / -1; grid-row: 2; }
  .filters select { grid-column: 1; }
  .filters .button { grid-column: 2; }
}
@media (max-width: 520px) {
  .shell { width: min(100% - 22px, 1440px); padding-top: 22px; }
  .stats { gap: 9px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 22px; }
  .orders-panel, .login-panel { padding: 17px; }
  .section-heading { align-items: flex-start; }
  table { min-width: 900px; }
  .pagination { align-items: flex-start; flex-direction: column; }
}
