:root {
  --ink: #17223c;
  --muted: #536078;
  --line: #d9dfec;
  --brand: #7333c8;
  --dark: #492185;
  --paper: #f2f5f9;
  --accent: #d3104a;
  --soft: #f7f3fb;
  --gradient: linear-gradient(105deg, #d3104a 0%, #a82799 52%, #8138e6 100%);
  font:
    16px/1.55 "Inter",
    "Microsoft YaHei",
    "PingFang SC",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.bar,
main {
  width: min(1080px, calc(100% - 56px));
  margin: auto;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}
.brand,
.bar nav a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}
.brand {
  gap: 11px;
  font-weight: 750;
  font-size: 1.22rem;
  letter-spacing: 0.06em;
}
.mark {
  width: 44px;
  height: 32px;
  display: inline-block;
  position: relative;
  overflow: hidden;
}
.mark i {
  position: absolute;
  border: 0 solid var(--brand);
  border-width: 3px 0 0 3px;
  width: 60px;
  height: 60px;
  border-radius: 100% 0 0 0;
  top: 2px;
  left: -8px;
}
.mark i:nth-child(2) {
  top: 9px;
  left: -5px;
  border-color: #a82799;
}
.mark i:nth-child(3) {
  top: 16px;
  left: -2px;
  border-color: #d3104a;
}
nav {
  display: flex;
  gap: 20px;
}
nav a {
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
nav a[aria-current] {
  color: var(--brand);
  border-color: var(--brand);
  font-weight: bold;
}
main {
  padding: clamp(25px, 5vw, 64px) 0 70px;
}
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}
.context {
  font-size: 0.87rem;
  font-weight: 650;
  color: var(--muted);
  margin: 0 0 4px;
}
.mast h1 {
  margin: 0;
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  letter-spacing: -0.045em;
  line-height: 1.2;
}
h2 {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
h3 {
  font-size: 1.02rem;
  margin: 12px 0;
}
.panel {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  min-width: 0;
}
.panel + .panel,
section + .panel {
  margin-top: 18px;
}
.panel.narrow {
  max-width: 600px;
}
.panel > p:first-child {
  margin-top: 0;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(270px, 0.82fr);
  gap: 20px;
  align-items: start;
}
.grid .panel {
  margin-top: 0;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.91rem;
  margin-bottom: 14px;
}
input,
select,
textarea,
button {
  font: inherit;
}
input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #aeb9cc;
  border-radius: 6px;
  background: white;
  min-width: 0;
  font-size: 1rem;
}
textarea {
  min-height: 98px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 0 16px;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 19px;
  border-radius: 6px;
  border: 1px solid var(--brand);
  background: var(--gradient);
  color: white;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover,
.button:hover {
  background: var(--dark);
}
button:active,
.button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.52;
  cursor: wait;
}
.secondary,
button.tab {
  background: white;
  color: var(--brand);
  border-color: var(--line);
}
.secondary:hover,
button.tab:hover {
  background: var(--soft);
}
.tabs,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tabs {
  margin: 0 0 18px;
}
button.tab[aria-pressed="true"] {
  color: #fff;
  background: var(--dark);
  border-color: var(--dark);
}
.tab {
  font-size: 0.9rem;
}
#notice,
.status {
  padding: 12px 16px;
  border-left: 3px solid var(--brand);
  background: var(--soft);
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
#notice.error {
  background: #fff1e8;
  border-color: #a64d27;
  color: #753212;
}
.muted {
  color: var(--muted);
}
.choice,
.entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  min-height: 54px;
}
.choice {
  cursor: pointer;
}
.choice input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--brand);
}
.choice span {
  flex: 1;
  color: var(--ink);
}
.amount {
  font-variant-numeric: tabular-nums;
  font-size: 1.18rem;
}
.order-deadline {
  display: grid;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.order-number {
  overflow-wrap: anywhere;
}
.entry span,
.entry strong {
  overflow-wrap: anywhere;
}
.entry small {
  color: var(--muted);
}
.scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.93rem;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  white-space: nowrap;
}
thead {
  background: var(--gradient);
}
th {
  color: #fff;
  background: transparent;
}
th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  background: #f7f8fc;
  z-index: 1;
}
.help {
  padding: 0;
  width: 28px;
  min-height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: white;
  color: var(--brand);
}
.skip {
  position: absolute;
  left: 0;
  top: -5em;
  padding: 10px;
  background: #fff;
  z-index: 5;
}
.skip:focus {
  top: 0;
}
:focus-visible {
  outline: 3px solid #753bc0;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
small {
  font-size: 0.87rem;
}
@media (max-width: 720px) {
  .bar,
  main {
    width: calc(100% - 32px);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
  }
  .bar nav {
    gap: 16px;
  }
  .mast {
    margin-bottom: 18px;
  }
  .panel {
    padding: 18px;
  }
  .choice,
  .entry {
    flex-wrap: wrap;
  }
  .grid {
    gap: 14px;
  }
  .entry strong {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.phone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 14px;
}
.phone-row label {
  margin: 0;
}
.phone-row button {
  padding-inline: 12px;
}
main:has(#workspace > .narrow:only-child) {
  max-width: 600px;
}
details > summary {
  cursor: pointer;
  color: var(--brand);
  min-height: 48px;
  padding-block: 12px;
}

th:first-child {
  background: #bf104d;
}
td:first-child {
  background: #fff;
}
tbody tr:nth-child(even),
tbody tr:nth-child(even) td:first-child {
  background: #fbfaff;
}
.scroll {
  border: 1px solid var(--line);
  border-radius: 10px;
}
.panel {
  box-shadow: 0 4px 20px #36426207;
}
.brand {
  color: #182341;
}
nav a[aria-current] {
  border-color: transparent;
  background: var(--gradient) bottom / 100% 3px no-repeat;
}
.tabs {
  border-bottom: 1px solid var(--line);
  margin: 12px 0 18px;
}
button.tab,
button.tab:hover {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 0;
}
button.tab[aria-pressed="true"] {
  color: var(--dark);
  background: var(--gradient) bottom / 100% 3px no-repeat;
}
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafbfe;
  gap: 2px;
}
.segmented button,
.segmented label span {
  color: var(--ink);
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 8px 16px;
  display: grid;
  place-items: center;
  min-height: 42px;
}
.segmented label {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}
.segmented label input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
}
.segmented label input:focus-visible + span {
  outline: 3px solid var(--brand);
}
.segmented button[aria-pressed="true"],
.segmented label input:checked + span {
  background: #eee8fa;
  color: var(--dark);
  font-weight: 700;
}
.verify-method {
  margin: 0 0 16px;
  padding: 0;
  border: none;
  min-width: 0;
}
.verify-method legend,
.captcha-field > label {
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.captcha-field {
  margin-bottom: 16px;
}
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.captcha-image {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  min-height: 48px;
  color: var(--brand);
  background: var(--soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.captcha-image:hover {
  background: #efe9f7;
}
.captcha-image img {
  display: block;
  width: 112px;
  height: 40px;
  object-fit: contain;
}
.captcha-image span {
  font-size: 20px;
}
.field-error {
  margin: 5px 0 0;
  font-size: 0.88rem;
  color: #a8203d;
}
.field-error:empty {
  display: none;
}
input[aria-invalid="true"] {
  border-color: #b82545;
}
.order-list {
  margin: 14px 0;
  display: grid;
  gap: 12px;
}
.order-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.order-head h3,
.order-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.08rem;
}
.badge {
  background: #eceff6;
  color: #44516a;
  white-space: nowrap;
  padding: 2px 8px;
  font-size: 0.82rem;
  border-radius: 6px;
}
.badge[data-state="PENDING"] {
  background: #fff1df;
  color: #924200;
}
.badge[data-state="PAID"] {
  background: #e2f3e8;
  color: #1a6141;
}
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  margin: 12px 0;
  font-size: 0.94rem;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
}
.price {
  color: #bc164e;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.order-card button {
  width: 100%;
}
.record-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin: 0 0 14px;
}
.record-filter label {
  flex: 1 1 155px;
  margin: 0;
}
@media (max-width: 390px) {
  .segmented button,
  .segmented label span {
    padding-inline: 10px;
  }
  .captcha-image img {
    width: 94px;
  }
}

.recent-exports {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 4px;
}
.badge[data-state="PAID"],
.badge[data-state="READY"] {
  background: #e3f4e9;
  color: #215b37;
}
.badge[data-state="REVIEW"] {
  background: #fff1de;
  color: #8a460e;
}

.query-form > button[type="submit"] { width: 100%; }
.athlete-total { display: flex; gap: 1rem; align-items: baseline; }
.athlete-total strong { font-size: 1.4rem; color: var(--dark); }
.athlete-project { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.athlete-project h3 { margin: 0; overflow-wrap: anywhere; }
.athlete-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem 1rem; margin: .6rem 0; }
.athlete-details dt { color: var(--muted); font-size: .85rem; }
.athlete-details dd { margin: 0; min-height: 1.5em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .athlete-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The staff workspace shares the public navigation but has its own desktop density. */
.staff-page .bar,
.staff-page main {
  width: min(1600px, calc(100% - 48px));
}
.staff-page .bar { min-height: 56px; }
.staff-page .bar nav { margin-inline-start: auto; }
.staff-page main { padding-block: 12px 40px; }
.staff-page .mast {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.staff-page main:has(#workspace > .narrow:only-child) {
  max-width: 480px;
  padding-top: 40px;
}
.staff-page .panel {
  padding: 14px 18px;
  border-radius: 8px;
  box-shadow: none;
}
.staff-page .scope-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  z-index: 3;
}
.scope-bar label,
.record-toolbar label,
.education-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 0;
  margin: 0;
}
.scope-bar select { width: clamp(160px, 17vw, 290px); }
.scope-bar .merchant-name { overflow-wrap: anywhere; }
.scope-bar .new-exam { margin-inline-start: auto; }
.exam-dialog {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  box-shadow: 0 16px 50px #20274133;
}
.exam-dialog::backdrop { background: #17223c55; }
.exam-dialog .exam-owner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
  font-size: .91rem;
  overflow-wrap: anywhere;
}
.exam-owner span { flex-shrink: 0; color: var(--muted); }
.exam-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
}
.exam-dialog-actions button:last-child { margin-inline-start: auto; }
.staff-page .tabs { margin: 4px 0 10px; gap: 2px; }
.staff-page .tab { padding: 8px 14px; }
.staff-page h2 { font-size: 1.18rem; margin-bottom: 12px; }
.staff-page :is(button, input, select):not(.captcha-image) {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 0.9rem;
}
.staff-page .staff-heading,
.record-toolbar,
.education-toolbar,
.enrol-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 10px;
}
.staff-heading h2 { margin: 0 auto 0 0; }
.staff-page .enrol-switches {
  gap: 2px;
  margin: 0;
}
.staff-page .enrol-switches button {
  display: inline-flex;
  gap: 7px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}
.enrol-switches button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8592a4;
}
.enrol-switches button[aria-pressed="true"]::before { background: #19714c; }
.staff-page .enrol-switches button:hover { background: var(--soft); }
.staff-page th, .staff-page td { padding: 4px 12px; }
.staff-page th { height: 36px; }
.staff-page td { height: 42px; }
.staff-page td .actions { margin: 0; }
.staff-page td button.secondary {
  min-height: 30px;
  padding: 2px 5px;
  background: transparent;
  border-color: transparent;
}
.staff-page td button.secondary:hover { background: var(--soft); }
.staff-page .project-list th:first-child { width: 4.5em; }
.staff-page .project-list th:nth-child(2) { width: 45%; }
.project-list :is(th, td):nth-child(3),
[data-records="payments"] > .scroll :is(th, td):nth-child(4),
[data-records="orders"] > .scroll :is(th, td):nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.record-toolbar .record-filter {
  margin: 0;
  align-items: center;
  max-width: 100%;
}
.record-toolbar label { flex: 0 1 auto; }
.record-toolbar input[type="search"] { width: min(240px, 100%); }
.education-toolbar label { margin-inline-end: auto; }
.staff-editor {
  padding: 12px;
  margin-bottom: 14px;
  background: #f7f8fc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* Merchant configuration is independent of the current exam. */
.staff-page main:has(.merchant-pane) {
  width: 100%;
  max-width: none;
  padding: 0;
}
main:has(.merchant-pane) .tabs {
  margin: 0;
  padding: 5px clamp(12px, 2vw, 36px) 0;
  background: #fff;
}
main:has(.merchant-pane) #notice { margin: 0; }
.staff-page .merchant-pane { padding: 0; border: 0; border-radius: 0; background: var(--paper); }
.merchant-layout {
  --rail: clamp(195px, 19vw, 305px);
  --drawer: clamp(330px, 32vw, 490px);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: calc(100dvh - 102px);
}
.merchant-layout:has(.merchant-drawer) { grid-template-columns: var(--rail) minmax(0, 1fr) var(--drawer); }
.merchant-directory, .merchant-drawer { padding: 22px clamp(14px, 1.6vw, 26px); background: white; min-width: 0; }
.merchant-directory { border-inline-end: 1px solid var(--line); }
.merchant-directory, .merchant-drawer { position: sticky; top: 0; align-self: start; height: calc(100dvh - 100px); overflow-y: auto; }
.merchant-directory > .merchant-add { width: 100%; }
.merchant-search { position: relative; margin: 16px 0; }
.merchant-search::before, .merchant-search::after {
  content: ""; position: absolute; pointer-events: none; color: var(--muted);
}
.merchant-search::before { width: 9px; height: 9px; border: 1.5px solid; border-radius: 50%; top: calc(50% - 7px); left: 11px; }
.merchant-search::after { width: 7px; border-top: 1.5px solid; transform: rotate(45deg); top: calc(50% + 4px); left: 20px; }
.staff-page .merchant-search input { padding-inline-start: 35px; }
.merchant-options { display: grid; gap: 3px; }
.staff-page button.merchant-option {
  width: 100%; min-height: 44px; justify-content: flex-start; gap: 12px; padding: 8px 12px;
  background: transparent; border-color: transparent; text-align: start; color: var(--ink); overflow-wrap: anywhere;
}
.staff-page .merchant-option:hover { background: #f6f4fb; }
.staff-page .merchant-option[aria-pressed="true"] {
  background: #f2ecfc; box-shadow: inset 3px 0 var(--brand); color: var(--dark);
}
.shop-icon {
  display: inline-block; width: 1em; height: .75em; font-size: 1.1em; flex: none;
  border: 1.5px solid currentColor; border-radius: 2px; position: relative; margin-top: .15em;
}
.shop-icon::before {
  box-sizing: border-box;
  content: ""; position: absolute; left: -12%; top: -.26em; width: 124%; height: .37em;
  border: 1.5px solid currentColor; border-radius: 2px 2px 4px 4px; transform: perspective(6px) rotateX(14deg);
  background: #fff;
}
.merchant-details { padding: clamp(16px, 1.8vw, 30px); min-width: 0; }
.staff-page .merchant-title { display: flex; align-items: center; gap: 14px; font-size: 1.45rem; margin: 0 0 20px; overflow-wrap: anywhere; }
.merchant-card { padding: 16px 18px; background: white; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.merchant-card + .merchant-card { margin-top: 18px; }
.merchant-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.staff-page .merchant-heading :is(h2,h3) { margin: 0; }
.merchant-heading h3 { font-size: 1.08rem; }
.merchant-add::before { content: "+"; margin-inline-end: 6px; font-weight: 400; }
.merchant-card .scroll { border-radius: 6px; }
.merchant-card table { min-width: 0; width: 100%; }
.merchant-card thead, .merchant-card th, .merchant-card th:first-child { background: #edf0f5; color: #455166; }
.staff-page .merchant-card :is(th,td) { padding: 8px 12px; position: static; white-space: normal; overflow-wrap: anywhere; }
.merchant-card tr:nth-child(even), .merchant-card tr:nth-child(even) td:first-child { background: white; }
.merchant-card td:last-child { white-space: nowrap; }
.merchant-empty { margin: 0; padding: 12px 0; color: var(--muted); }
.merchant-status { display: inline-flex; gap: 6px; align-items: center; }
.merchant-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #858d9e; flex: none; }
.merchant-status.active::before { background: #21834a; }
.account-state { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.merchant-drawer {
  min-height: 0; display: flex; flex-direction: column; border-inline-start: 1px solid var(--line);
  box-shadow: -4px 0 14px #16233909;
}
.staff-page button.merchant-close { color: var(--muted); background: transparent; border: 0; font-size: 1.6rem; }
.merchant-owner { display: flex; gap: 22px; margin: 0 0 18px; padding: 0 0 18px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.merchant-owner span { flex: none; color: var(--muted); }
.merchant-drawer form { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.merchant-drawer .merchant-fields { overflow-y: auto; padding: 4px; margin: -4px -4px 8px; }
.merchant-fields label { margin-bottom: 18px; }
.merchant-fields { position: relative; }
.merchant-ref { margin-bottom: 18px; }
.merchant-ref-caption { display: flex; gap: 9px; align-items: center; margin-bottom: 6px; }
.merchant-ref-caption label { margin: 0; }
.merchant-hint { position: relative; display: inline-flex; }
.staff-page .merchant-hint button.secondary { min-height: 22px; height: 22px; width: 22px; padding: 0; border-radius: 50%; font-size: 12px; }
.merchant-hint span { display: none; position: absolute; bottom: calc(100% + 5px); left: -6rem; width: min(16rem,75vw); padding: 8px 12px;
  background: var(--ink); border-radius: 5px; color: white; font-size: .85rem; z-index: 2; }
.merchant-hint:is(:hover,:focus-within) span { display: block; }
.merchant-footer { display: flex; justify-content: flex-end; gap: 12px; padding-top: 16px; margin-top: auto; border-top: 1px solid var(--line); }
.merchant-footer button { min-width: 80px; }
@media (max-width: 1050px) {
  .merchant-layout:has(.merchant-drawer) { grid-template-columns: var(--rail) minmax(0, 1fr); }
  .merchant-layout:has(.merchant-drawer) .merchant-details { display: none; }
}
@media (max-width: 650px) {
  .merchant-layout, .merchant-layout:has(.merchant-drawer) { grid-template-columns: minmax(0,1fr); align-content: start; }
  .merchant-directory, .merchant-drawer { position: static; height: auto; }
  .merchant-directory { border: 0; border-bottom: 1px solid var(--line); }
  .merchant-options { max-height: 160px; overflow: auto; }
  .merchant-layout:has(.merchant-drawer) .merchant-directory { display: none; }
  .merchant-drawer { min-height: 60dvh; }
  .merchant-details { padding: 14px 10px; }
  .merchant-card { padding: 12px; }
  .staff-page .merchant-card :is(td,th) { padding: 6px; }
}
@media (max-width: 759px) {
  .staff-page .bar, .staff-page main { width: calc(100% - 24px); }
  .staff-page .bar {
    flex-flow: row wrap;
    align-items: center;
    gap: 0 12px;
    padding-block: 4px;
  }
  .staff-page .bar nav { order: 1; width: 100%; margin: 0; }
  .staff-page #logout { margin-inline-start: auto; }
  .staff-page .scope-bar { position: static; }
  .scope-bar label { flex: 1 1 230px; }
  .scope-bar select { flex: 1; }
  .staff-page .panel { padding: 12px; }
  .staff-page :is(button, input, select):not(.captcha-image),
  .staff-page td button.secondary { min-height: 44px; }
  .staff-page .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .staff-page .tab { white-space: nowrap; }
  .staff-heading .enrol-switches { order: 1; flex-basis: 100%; }
  .record-toolbar .record-filter { width: 100%; }
}
