:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --panel-soft: #f9faf7;
  --ink: #151515;
  --muted: #666b70;
  --line: #d9d9d2;
  --brand: #1f6f78;
  --brand-dark: #164e55;
  --accent: #b40818;
  --good: #147a3d;
  --warn: #a46100;
  --bad: #b40818;
  --shadow: 0 14px 35px rgba(20, 24, 28, 0.11);
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

body.theme-red {
  --bg: #f8f3f2;
  --panel: #ffffff;
  --panel-soft: #fff5f3;
  --ink: #191111;
  --muted: #6f5b58;
  --line: #ead2ce;
  --brand: #c8102e;
  --brand-dark: #8f071d;
  --accent: #d71920;
  --shadow: 0 14px 35px rgba(120, 10, 24, 0.13);
}

body.theme-dark-red {
  --bg: #211013;
  --panel: #2a1418;
  --panel-soft: #37191f;
  --ink: #fff6f4;
  --muted: #e4b8b1;
  --line: #573039;
  --brand: #b40818;
  --brand-dark: #ffb4aa;
  --accent: #ff3b3b;
  --good: #69d18e;
  --warn: #ffc86b;
  --bad: #ff8178;
  --shadow: 0 14px 35px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button-link {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.button-link.ghost {
  background: var(--panel);
  color: var(--brand-dark);
  border-color: var(--line);
}

button.secondary {
  background: #e9ece7;
  color: var(--ink);
}

body.theme-red button.secondary {
  background: #ffe4df;
  color: #8f071d;
}

body.theme-dark-red button.secondary {
  background: #492028;
  color: #fff6f4;
}

button.danger {
  background: var(--bad);
}

button.ghost {
  background: transparent;
  color: var(--brand-dark);
  border: 1px solid var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

body.theme-dark-red input,
body.theme-dark-red select,
body.theme-dark-red textarea,
body.theme-dark-red .topbar,
body.theme-dark-red .admin-compact-header,
body.theme-dark-red .admin-batch-line,
body.theme-dark-red .compact-topline,
body.theme-dark-red .sticky-save {
  background: var(--panel);
}

textarea {
  min-height: 78px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.loading {
  padding: 32px;
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 244, 239, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: grid;
  gap: 7px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 10px;
}

.admin-compact-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-template-areas:
    "menu title total"
    "actions actions actions";
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.admin-menu-button {
  grid-area: menu;
  width: 38px;
  min-height: 38px;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  background: var(--brand);
  border-color: var(--brand);
}

.admin-menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.admin-compact-header strong,
.admin-compact-header span {
  display: block;
  overflow-wrap: anywhere;
}

.admin-title-block {
  grid-area: title;
  min-width: 0;
}

.admin-title-block > strong {
  font-size: 16px;
  line-height: 1.1;
}

.admin-title-block > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-compact-header .auto-check-line {
  font-size: 11px;
  font-weight: 700;
}

.admin-compact-total {
  grid-area: total;
  display: grid;
  gap: 1px;
  justify-items: end;
}

.admin-compact-total > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-compact-total > strong {
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
}

.admin-header-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  gap: 5px;
  justify-content: flex-end;
}

.admin-header-actions .mini-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.admin-update-button {
  border-color: rgba(190, 0, 30, 0.22);
  background: #fff0f2;
  color: var(--brand-dark);
}

.admin-hidden-detail-hint {
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(200, 16, 46, 0.22);
  border-radius: 8px;
  background: #fff7f8;
  color: var(--brand-dark);
  text-align: left;
}

.admin-hidden-detail-hint strong,
.admin-hidden-detail-hint span {
  display: block;
  min-width: 0;
}

.admin-hidden-detail-hint strong {
  font-size: 12px;
  white-space: nowrap;
}

.admin-hidden-detail-hint span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

body.theme-dark-red .admin-hidden-detail-hint {
  background: var(--panel-soft);
  border-color: var(--line);
}

.admin-rollover-strip {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(20, 122, 61, 0.22);
  border-radius: 8px;
  background: rgba(20, 122, 61, 0.08);
}

.admin-rollover-strip strong {
  color: var(--good);
  font-size: 12px;
}

.admin-rollover-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.admin-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 61;
  width: min(86vw, 330px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  padding: 12px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 38px rgba(0, 0, 0, 0.18);
  transform: translateX(-104%);
  transition: transform 0.18s ease;
}

.drawer-open .admin-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.drawer-open .admin-drawer {
  transform: translateX(0);
}

.admin-drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-drawer-head strong,
.admin-drawer-head span {
  display: block;
}

.admin-drawer-head strong {
  font-size: 18px;
}

.admin-drawer-head span,
.admin-drawer-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-drawer-total {
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.admin-drawer-total span {
  color: rgba(255, 255, 255, 0.78);
}

.admin-drawer-total strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  line-height: 1;
}

.admin-drawer-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
}

.admin-drawer-link {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
}

.admin-drawer-link.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.admin-drawer-link strong,
.admin-drawer-link small {
  display: block;
}

.admin-drawer-link small {
  margin-top: 2px;
  color: inherit;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.72;
}

.admin-drawer-link em {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.admin-batch-line {
  display: block;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.admin-option-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.admin-option-quick-actions .mini-button {
  min-height: 36px;
  padding: 6px 8px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.active-batch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

body.theme-red .active-batch {
  background: linear-gradient(135deg, #8f071d, #d71920);
}

.active-batch strong {
  display: block;
  font-size: 15px;
}

.active-batch span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.active-batch .batch-total {
  text-align: right;
  font-size: 20px;
  font-weight: 800;
}

.admin-staff-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(20, 122, 61, 0.3);
  border-radius: 8px;
  background: rgba(20, 122, 61, 0.08);
}

.admin-staff-notice strong,
.admin-staff-notice span {
  display: block;
}

.admin-staff-notice strong {
  color: var(--good);
}

.admin-staff-notice span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.admin-staff-notice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, auto));
  gap: 6px;
}

.admin-alert-pill {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(190, 0, 30, 0.28);
  border-radius: 8px;
  background: #ffe0e4;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.admin-staff-message-pill {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(20, 122, 61, 0.32);
  border-radius: 8px;
  background: rgba(20, 122, 61, 0.14);
  color: var(--good);
  font-size: 11px;
  font-weight: 900;
}

.admin-message-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(20, 122, 61, 0.28);
  border-radius: 8px;
  background: rgba(20, 122, 61, 0.09);
}

.admin-message-preview strong,
.admin-message-preview span {
  display: block;
}

.admin-message-preview strong {
  color: var(--good);
  font-size: 12px;
}

.admin-message-preview span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.admin-home {
  display: grid;
  gap: 12px;
}

.admin-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #c70025, #8f001c);
  color: #fff;
  box-shadow: var(--shadow);
}

.admin-home-hero span,
.admin-home-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.admin-home-hero h1 {
  margin: 4px 0;
  font-size: 22px;
  line-height: 1.1;
}

.admin-home-hero p {
  margin: 0;
  font-size: 13px;
}

.admin-home-hero > strong {
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1;
  white-space: nowrap;
}

.admin-home-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-home-actions button {
  min-height: 48px;
}

.admin-home-actions .alert-action {
  border-color: rgba(164, 93, 0, 0.24);
  background: #fff0d8;
  color: #6b3d00;
}

.admin-locked-batches {
  border-color: rgba(180, 83, 9, 0.3);
  background: #fff9ed;
}

.admin-locked-batch-list,
.admin-batch-activity-list {
  display: grid;
  gap: 7px;
}

.admin-locked-batch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 8px;
  background: var(--panel);
}

.admin-locked-batch-row > div:first-child,
.admin-batch-activity-row > span,
.admin-batch-activity-detail > div {
  min-width: 0;
}

.admin-locked-batch-row strong,
.admin-locked-batch-row span,
.admin-locked-batch-row small,
.admin-batch-activity-row strong,
.admin-batch-activity-row small,
.admin-batch-activity-detail strong,
.admin-batch-activity-detail span,
.admin-batch-activity-detail small {
  display: block;
  overflow-wrap: anywhere;
}

.admin-locked-batch-row span,
.admin-locked-batch-row small,
.admin-batch-activity-row small,
.admin-batch-activity-detail span,
.admin-batch-activity-detail small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.admin-batch-activity-panel {
  margin-top: 12px;
}

.admin-batch-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.admin-batch-activity-row > span:last-child {
  text-align: right;
}

.admin-batch-activity-detail {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.admin-batch-activity-detail:last-child {
  border-bottom: 0;
}

.modal-activity-list {
  max-height: min(55vh, 480px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-action-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.admin-action-result h1 {
  margin: 0;
  font-size: 20px;
}

.admin-action-result p {
  margin: 5px 0 0;
}

.admin-action-result-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.admin-action-result.warn .admin-action-result-mark {
  background: #a45d00;
}

.admin-action-result.error .admin-action-result-mark {
  background: var(--bad);
}

.admin-action-result-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.admin-action-result-details div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-action-result-details span,
.admin-action-result-details strong {
  display: block;
  overflow-wrap: anywhere;
}

.admin-action-result-details span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-action-result-details strong {
  margin-top: 2px;
  font-size: 13px;
}

.admin-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
}

.admin-home-side-stack,
.admin-finance-presence-list {
  display: grid;
  gap: 8px;
}

.admin-finance-presence-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.admin-finance-presence-row strong,
.admin-finance-presence-row small {
  display: block;
  overflow-wrap: anywhere;
}

.admin-finance-presence-row small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.admin-finance-presence-row em {
  max-width: 180px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
  line-height: 1.2;
}

.admin-finance-presence-row em.online {
  color: var(--good);
}

.admin-finance-presence-row em.recent {
  color: var(--warn);
}

.admin-presence-more {
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-size: 11px;
  text-align: left;
}

.admin-presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8a8a8a;
}

.admin-presence-dot.online {
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(20, 122, 61, 0.12);
}

.admin-presence-dot.recent {
  background: #d17a00;
}

.admin-home-message {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(20, 122, 61, 0.24);
  border-radius: 8px;
  background: rgba(20, 122, 61, 0.08);
}

.admin-home-message.empty {
  border-color: var(--line);
  background: var(--panel-soft);
}

.admin-home-message strong {
  color: var(--good);
}

.admin-home-message.empty strong {
  color: var(--ink);
}

.admin-home-message span,
.admin-home-message small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-pending-riders-panel {
  border-color: rgba(164, 97, 0, 0.26);
  background: #fff8eb;
}

.admin-pending-rider-list {
  display: grid;
  gap: 8px;
}

.admin-pending-rider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(164, 97, 0, 0.22);
  border-radius: 8px;
  background: #fff;
}

.admin-pending-rider-row strong,
.admin-pending-rider-row span {
  display: block;
  overflow-wrap: anywhere;
}

.admin-pending-rider-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-rider-activity {
  display: grid;
  gap: 8px;
}

.admin-rider-activity-details {
  display: grid;
  gap: 8px;
}

.admin-rider-activity-details > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.admin-rider-activity-details > summary::-webkit-details-marker {
  display: none;
}

.admin-rider-activity-details > summary::after {
  content: "+";
  grid-column: 2;
  grid-row: 1;
  margin-left: 26px;
}

.admin-rider-activity-details[open] > summary::after {
  content: "-";
}

.admin-rider-activity-details > summary strong {
  grid-column: 2;
  grid-row: 1;
  margin-right: 16px;
}

.admin-rider-activity-details > .rider-activity-filters {
  margin-top: 8px;
}

.rider-activity-filters {
  margin-top: 0;
}

.rider-activity-list {
  display: grid;
  gap: 7px;
}

.rider-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rider-activity-row strong,
.rider-activity-row span {
  display: block;
}

.rider-activity-row strong {
  font-size: 14px;
}

.rider-activity-row div > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.rider-activity-pill {
  max-width: 148px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  line-height: 1.2;
}

.rider-activity-pill.good {
  background: rgba(20, 122, 61, 0.11);
  color: var(--good);
}

.rider-activity-pill.warn {
  background: #fff0d8;
  color: var(--warn);
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-status-card {
  min-height: 76px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.admin-status-card span,
.admin-status-card strong {
  display: block;
}

.admin-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-status-card strong {
  font-size: 20px;
  line-height: 1.05;
}

.admin-status-card.good strong {
  color: var(--good);
}

.admin-status-card.warn {
  background: #fff0d8;
  border-color: rgba(164, 93, 0, 0.24);
}

.admin-status-card.warn strong {
  color: var(--warn);
}

.admin-finance-checklist {
  display: grid;
  gap: 10px;
}

.admin-finance-checklist-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admin-finance-checklist-head label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-finance-checklist-head select {
  min-height: 34px;
  padding: 5px 28px 5px 10px;
  font-size: 12px;
}

.admin-finance-checklist-list {
  display: grid;
  gap: 6px;
}

.admin-finance-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 9px;
  border: 1px solid rgba(190, 0, 30, 0.15);
  border-radius: 8px;
  background: #fff8f8;
}

.admin-finance-check-row.is-exact {
  border-color: rgba(20, 122, 61, 0.18);
  background: rgba(20, 122, 61, 0.06);
}

.admin-finance-check-row strong,
.admin-finance-check-row span,
.admin-finance-check-row em {
  display: block;
}

.admin-finance-check-row strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.admin-finance-check-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-finance-check-row.is-exact span {
  color: var(--good);
}

.admin-finance-check-row em {
  color: var(--brand-dark);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.admin-finance-check-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
}

.admin-finance-check-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--good);
}

.admin-finance-check-row .admin-finance-remove {
  width: max-content;
  min-height: 28px;
  margin-top: 5px;
  padding: 3px 7px;
  color: var(--brand-dark);
  font-size: 10px;
}

.admin-finance-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-finance-empty span {
  color: var(--muted);
  font-size: 12px;
}

.admin-alert-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(164, 93, 0, 0.24);
  border-radius: 8px;
  background: #fff0d8;
  color: #6b3d00;
}

.admin-alert-strip strong,
.admin-alert-strip span {
  font-size: 12px;
  font-weight: 900;
}

.admin-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.fee-profile-hint {
  align-self: center;
  color: var(--good);
  font-size: 12px;
  font-weight: 900;
}

.discount-rider-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.discount-rider-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.discount-rider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.discount-rider-row strong,
.discount-rider-row span {
  overflow-wrap: anywhere;
}

.discount-rider-row span {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.discount-rider-row button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.admin-riders-panel {
  display: grid;
  gap: 9px;
}

.admin-rider-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-rider-tool {
  margin-top: 0;
}

.admin-rider-tool .customer-admin-fields,
.admin-rider-tool .discount-rider-add,
.admin-rider-tool .discount-rider-list,
.admin-rider-tool .section-help {
  margin: 0;
  padding: 0 8px 8px;
}

.admin-rider-tool .customer-admin-fields {
  padding-top: 0;
}

.admin-rider-tool-actions {
  margin: 0;
  padding: 0 8px 8px;
}

.admin-riders-list {
  overflow: visible;
}

.admin-rider-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 10px;
}

.admin-rider-main {
  min-width: 0;
  gap: 5px;
}

.admin-rider-main > span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-rider-main .badge {
  min-height: 22px;
  padding: 3px 7px;
  font-size: 11px;
}

.admin-rider-info {
  margin-top: 2px;
  max-width: 100%;
}

.admin-rider-info summary {
  min-height: 28px;
  padding: 5px 7px;
}

.admin-rider-info summary::after {
  content: "Open";
}

.admin-rider-info[open] summary::after {
  content: "Close";
}

.admin-rider-detail-fields {
  margin: 0;
  padding: 0 7px 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-rider-detail-fields div {
  padding: 7px;
}

.admin-rider-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(56px, 72px));
  gap: 6px;
  margin: 0;
  align-self: start;
}

.admin-rider-actions button {
  flex: none;
  min-height: 34px;
  padding: 7px 8px;
}

.admin-rider-more {
  grid-column: 1 / -1;
  margin-top: 0;
}

.admin-rider-more summary {
  justify-content: center;
  min-height: 32px;
  padding: 6px 8px;
}

.admin-rider-more summary::after,
.admin-rider-more[open] summary::after {
  content: "";
}

.admin-rider-more button {
  width: calc(100% - 12px);
  margin: 0 6px 6px;
}

.alert-history-list {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 620px);
  overflow: auto;
  padding-right: 2px;
}

.alert-history-filters {
  margin: 0 0 10px;
}

.alert-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.alert-history-row.is-unread {
  border-color: rgba(190, 0, 30, 0.28);
  background: #fff4f5;
}

.alert-history-row strong,
.alert-history-row span,
.alert-history-row small {
  display: block;
  overflow-wrap: anywhere;
}

.alert-type-badge {
  display: inline-block !important;
  width: fit-content;
  margin: 0 0 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.alert-history-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.alert-history-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.alert-history-actions {
  display: grid;
  gap: 6px;
  justify-items: stretch;
}

.alert-no-action {
  margin-top: 0 !important;
  color: var(--muted);
  font-size: 11px !important;
  font-weight: 900;
  text-align: right;
}

.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab {
  min-height: 40px;
  white-space: nowrap;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
}

.tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.tab.active .tab-badge {
  background: #fff;
  color: var(--brand);
}

.submission-row-card {
  align-items: stretch;
}

.submission-actions {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 8px;
}

.submission-actions .badge {
  grid-column: 1 / -1;
  justify-self: start;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 12px 36px;
}

main.staff-shell {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  max-width: 560px;
  min-height: 100vh;
  padding: 10px;
}

body.staff-page .modal {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.staff-desktop-layout {
  display: grid;
  gap: 10px;
  align-items: start;
}

.staff-main-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.staff-inline-chat-panel {
  display: none;
}

.staff-inline-chat-panel #staffChatHistoryBox {
  position: sticky;
  top: 8px;
}

.staff-inline-chat-panel {
  gap: 10px;
  align-content: start;
}

.staff-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: calc(100vh - 20px);
  padding: 12px;
}

.staff-panel.is-loading {
  opacity: 0.72;
}

.staff-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.staff-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
  white-space: nowrap;
}

.staff-title h1 span {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
}

.staff-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.staff-title .staff-login-line {
  margin-top: 4px;
  color: var(--accent);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.staff-title-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.staff-more-fold {
  position: relative;
  min-width: 0;
  justify-self: stretch;
}

.staff-more-fold summary {
  display: grid;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.staff-more-fold button {
  width: 100%;
  margin-top: 6px;
}

.staff-title-actions.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-title-actions.one {
  grid-template-columns: 1fr;
}

.staff-title button,
.staff-title-actions button {
  min-height: 32px;
  padding: 0 7px;
  font-size: 11px;
}

.staff-top-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px;
  align-items: start;
}

@media (max-width: 430px) {
  .staff-title-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.staff-logout-button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.staff-update-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.staff-login-form {
  gap: 10px;
  margin-top: 8px;
}

.staff-login-form .auth-message {
  padding: 10px;
}

.staff-login-form button {
  min-height: 48px;
}

.staff-active {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.staff-active-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.staff-active-head span {
  font-size: 15px;
  font-weight: 800;
}

.staff-active-head span:last-child {
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.staff-active strong {
  font-size: 30px;
  line-height: 1;
}

.staff-active small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.staff-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.staff-tools-fold {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-tools-fold summary {
  min-height: 36px;
  display: grid;
  align-items: center;
  padding: 0 10px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.staff-tool-help {
  margin: 0;
  padding: 0 10px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.staff-tools-fold .staff-tools {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: transparent;
}

.staff-attachment-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-attachment-panel strong,
.staff-attachment-panel span {
  display: block;
  overflow-wrap: anywhere;
}

.staff-attachment-panel span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.staff-list {
  display: grid;
  gap: 7px;
}

.staff-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.staff-list-toolbar strong {
  color: var(--text);
  font-size: 14px;
}

.staff-list-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.staff-list-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.staff-list-toolbar select {
  min-height: 34px;
  padding: 5px 28px 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.staff-add-rider-menu {
  position: relative;
}

.staff-add-rider-menu summary {
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(190, 0, 30, 0.24);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  list-style: none;
}

.staff-add-rider-menu summary::-webkit-details-marker {
  display: none;
}

.staff-add-rider-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: min(82vw, 320px);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.staff-add-rider-popover .staff-tool-help {
  padding: 0 2px 7px;
}

.staff-add-rider-popover .staff-tools {
  padding: 0;
  border: 0;
  background: transparent;
}

.staff-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-row span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.staff-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.staff-row em {
  color: var(--brand-dark);
  font-style: normal;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.staff-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-empty strong {
  font-size: 16px;
}

.staff-empty span {
  color: var(--muted);
  font-size: 13px;
}

.staff-ready-banner,
.staff-tools,
.staff-ready-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-ready-banner strong {
  color: var(--good);
}

.staff-ready-banner span {
  color: var(--muted);
  font-size: 13px;
}

.staff-jannapee-receipt {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 10px;
  border-color: #86cfa4;
  background: #f0faf4;
}

.staff-jannapee-receipt span {
  color: #23653d;
  text-align: right;
}

.staff-ready-banner small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.staff-ready-actions {
  display: flex;
  justify-content: flex-end;
}

.staff-ready-actions .mini-button {
  min-width: 104px;
}

.staff-ready-panel button.is-waiting {
  background: var(--panel-soft);
  color: var(--muted);
  border-color: var(--line);
}

.compact-ready-panel {
  gap: 6px;
  padding: 8px;
}

.staff-ready-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
  gap: 8px;
  align-items: center;
}

.staff-ready-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.staff-ready-message-fold {
  display: grid;
  gap: 7px;
}

.staff-ready-message-fold summary {
  width: fit-content;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.staff-ready-message-fold textarea {
  margin-top: 7px;
}

.legend-panel {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.legend-caption {
  position: absolute;
  top: -9px;
  left: 10px;
  padding: 0 6px;
  background: var(--panel-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.staff-reply-panel {
  margin-top: 2px;
}

.staff-reply-attention {
  border-color: rgba(164, 93, 0, 0.32);
  background: #fff2d6;
}

.staff-reply-attention .legend-caption {
  background: #fff2d6;
  color: #8a5200;
}

.staff-reply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.staff-reply-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px;
}

.staff-reply-row strong,
.staff-reply-row span {
  display: block;
  overflow-wrap: anywhere;
}

.staff-reply-row strong {
  font-size: 13px;
}

.staff-reply-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.staff-activity-panel {
  margin-top: 0;
  background: #fff;
}

.staff-activity-panel.has-unread {
  border-color: rgba(190, 0, 30, 0.22);
  background: #fff7f7;
}

.staff-activity-panel.has-unread .legend-caption {
  background: #fff7f7;
}

.staff-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-activity-row.is-unread {
  border-color: rgba(190, 0, 30, 0.25);
  background: #fff0f2;
}

.staff-activity-row strong,
.staff-activity-row span,
.staff-activity-row small {
  display: block;
  overflow-wrap: anywhere;
}

.staff-activity-row strong {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.staff-activity-row span {
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.staff-activity-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.staff-activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.staff-activity-read-all {
  justify-self: end;
}

.staff-activity-more {
  display: grid;
  gap: 6px;
}

.staff-activity-more summary {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.staff-activity-more[open] summary {
  margin-bottom: 6px;
  background: rgba(190, 0, 30, 0.08);
}

.staff-activity-more[open] {
  max-height: 190px;
  overflow: auto;
}

.staff-activity-side {
  display: none;
}

.staff-activity-compact {
  padding: 5px;
}

.staff-activity-compact-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.staff-activity-compact-button strong,
.staff-activity-compact-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-activity-compact-button strong {
  color: var(--brand-dark);
  font-size: 11px;
}

.staff-activity-compact-button small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.staff-activity-compact-button em {
  color: var(--brand-dark);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.staff-updates-list {
  display: grid;
  gap: 6px;
  max-height: min(62vh, 520px);
  overflow: auto;
  padding: 1px;
}

.staff-updates-modal .row-actions {
  margin-bottom: 0;
}

.staff-updates-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.staff-updates-history-list {
  max-height: min(58vh, 500px);
}

.staff-activity-read-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.staff-critical-modal {
  width: min(440px, calc(100vw - 24px));
}

.staff-critical-message {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--warning-line, #e8c875);
  border-radius: 8px;
  background: var(--warning-soft, #fff8dc);
}

.staff-critical-message strong {
  color: var(--brand-dark);
}

.staff-critical-message span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.staff-tools {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.staff-inline-status {
  color: var(--good);
  font-size: 11px;
  font-weight: 900;
}

.staff-check-row {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-check-row.is-exact {
  border-color: rgba(20, 122, 61, 0.35);
  background: rgba(20, 122, 61, 0.06);
}

.staff-check-row.is-saving {
  opacity: 0.65;
}

.staff-check-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
}

.staff-check-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.staff-check-name-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.staff-check-name-line strong {
  flex: 1;
  min-width: 0;
}

.staff-check-main > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.staff-check-main strong,
.staff-check-main small {
  display: block;
}

.staff-check-main strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.1;
}

.staff-check-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.staff-check-main small.good {
  color: var(--good);
}

.staff-check-main small.warn {
  color: var(--warn);
}

.staff-check-main small.staff-attribution {
  color: var(--muted);
  font-size: 10px;
}

.staff-check-main em {
  color: var(--brand-dark);
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.staff-check-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.staff-check-toggle input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  accent-color: var(--brand);
}

.staff-check-toggle.compact {
  min-width: 28px;
  justify-content: center;
}

.staff-remove-rider {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 24px;
  padding: 0 6px;
  border-color: rgba(190, 0, 30, 0.25);
  color: var(--brand-dark);
  font-size: 10px;
  white-space: nowrap;
}

.staff-history-link {
  justify-self: start;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.quick-reply-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.quick-reply-grid button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
  white-space: normal;
}

.staff-chat-history-select {
  margin-bottom: 8px;
}

.staff-chat-controls {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.staff-chat-controls .staff-chat-history-select {
  margin-bottom: 0;
}

.staff-check-row textarea,
.staff-ready-panel textarea {
  min-height: 54px;
  padding: 8px 10px;
  font-size: 13px;
}

.staff-ready-label {
  display: grid;
  gap: 2px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.staff-ready-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.staff-rider-modal {
  max-width: 520px;
}

.staff-rider-list,
.staff-rider-form {
  display: grid;
  gap: 8px;
}

.staff-account-create {
  margin-bottom: 10px;
}

.compact-account-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 10px 10px;
}

.compact-account-form .span {
  grid-column: 1 / -1;
}

.staff-history-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.staff-history-tab {
  min-height: 40px;
  background: var(--panel-soft);
  color: var(--brand-dark);
}

.staff-history-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.staff-history-list {
  display: grid;
  gap: 10px;
}

.staff-ready-invalidated {
  padding: 7px 8px;
  border: 1px solid #e8c875;
  border-radius: 6px;
  background: #fff8dc;
  color: #6e4b00 !important;
  line-height: 1.35;
}

.staff-ready-invalidated strong {
  color: #8b1e2d;
}

.staff-history-card {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-history-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.staff-history-card-head strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.staff-history-card-head span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.staff-history-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.staff-history-riders {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.staff-history-rider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  padding: 7px 8px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.staff-history-rider-row:first-child {
  border-top: 0;
}

.staff-history-rider-row strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.staff-history-rider-row span {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.staff-history-rider-row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.staff-png-save-help {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
}

.staff-png-save-help strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.staff-png-save-help span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.staff-png-preview-wrap {
  max-height: min(58dvh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.staff-png-preview {
  display: block;
  width: 100%;
  height: auto;
}

.staff-rider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.staff-rider-row-actions {
  display: grid;
  gap: 6px;
}

.staff-rider-row .list-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.staff-rider-row strong {
  overflow-wrap: anywhere;
}

.staff-rider-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-auth-panel {
  display: grid;
  gap: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-tab {
  min-height: 40px;
}

.auth-tab.active {
  background: var(--brand);
  color: #fff;
}

.auth-message {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.auth-message.good {
  color: var(--good);
}

.auth-message.bad {
  color: var(--bad);
}

.auth-message.warn {
  color: var(--warn);
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.pin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-list {
  display: grid;
  gap: 8px;
}

.account-row {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.account-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 7px;
  align-items: center;
}

.account-actions select {
  min-height: 38px;
  padding: 6px 8px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel.pad {
  padding: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: 20px;
}

.section-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .span {
  grid-column: 1 / -1;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.metric {
  min-height: 74px;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
}

.metric.good strong {
  color: var(--good);
}

.metric.bad strong {
  color: var(--bad);
}

.metric.warn strong {
  color: var(--warn);
}

.money-table {
  width: 100%;
  border-collapse: collapse;
}

.money-table th,
.money-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.money-table th {
  background: #eeeeeb;
  color: var(--ink);
  font-size: 13px;
}

.money-table td:last-child,
.money-table th:last-child {
  text-align: right;
}

.money-table input {
  min-height: 38px;
  padding: 8px;
  text-align: right;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.row-actions button {
  flex: 1 1 155px;
}

.report-workspace {
  display: grid;
  gap: 10px;
}

.batch-attachment-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.attachment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.attachment-head strong,
.attachment-head span {
  display: block;
  overflow-wrap: anywhere;
}

.attachment-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.attachment-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(74px, auto));
  gap: 6px;
  align-items: stretch;
}

.attachment-actions .button-link,
.attachment-actions button {
  min-height: 38px;
}

.attachment-status {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.attachment-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.attachment-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.good-text {
  color: var(--good) !important;
  font-weight: 900;
}

.warn-text {
  color: var(--warn) !important;
  font-weight: 900;
}

.submission-proof-box {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.submission-proof-box.no-proof {
  color: var(--muted);
}

.submission-proof-box.no-proof strong,
.submission-proof-box.no-proof span {
  display: block;
}

.submission-proof-list {
  display: grid;
  gap: 8px;
}

.submission-proof-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.submission-proof-item img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.submission-proof-item strong,
.submission-proof-item span {
  display: block;
  overflow-wrap: anywhere;
}

.submission-proof-item span {
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-view-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.report-view-tab {
  min-height: 40px;
  background: var(--panel);
  color: var(--brand-dark);
  border: 1px solid var(--line);
}

.report-view-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.backup-history-panel {
  display: grid;
  gap: 12px;
}

.backup-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.telegram-backup-setup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  background: var(--panel-soft);
}

.telegram-backup-setup.telegram-ready { border-left-color: var(--good); }
.telegram-backup-setup.telegram-needs-chat,
.telegram-backup-setup.telegram-needs-token { border-left-color: var(--warn); }

.telegram-backup-setup strong,
.telegram-backup-setup span,
.telegram-backup-setup small {
  display: block;
}

.telegram-backup-setup span {
  margin-top: 2px;
  font-weight: 800;
}

.telegram-backup-setup small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.backup-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.backup-create-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.backup-list {
  display: grid;
  gap: 8px;
}

.backup-row {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.backup-row.backup-saved { border-left-color: var(--good); }
.backup-row.backup-failed { border-left-color: var(--bad); }

.backup-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.backup-row-head strong,
.backup-row-head span {
  display: block;
}

.backup-row-head div > span,
.backup-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.backup-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 11px;
  font-weight: 900;
}

.backup-status.saved { color: var(--good); background: var(--panel-soft); }
.backup-status.failed { color: var(--bad); background: var(--panel-soft); }

.backup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.backup-error {
  padding: 8px;
  border-radius: 6px;
  background: var(--panel-soft);
  border: 1px solid var(--bad);
  color: var(--bad);
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.telegram-delivery.telegram-sent { color: var(--good); }
.telegram-delivery.telegram-failed,
.telegram-error { color: var(--bad); }
.telegram-delivery.telegram-pending { color: var(--warn); }

@media (max-width: 600px) {
  .report-view-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backup-create-row {
    grid-template-columns: 1fr;
  }

  .telegram-backup-setup {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-summary .metric {
    min-height: 64px;
    padding: 9px;
  }

  .backup-summary .metric strong {
    font-size: 18px;
  }
}

.report-tools {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.report-tools label {
  max-width: 560px;
}

.report-sort-select {
  max-width: 220px;
}

.png-preview-box {
  max-height: min(62vh, 640px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.png-preview-box img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #fff;
}

.png-preview-actions {
  margin-top: 10px;
}

.muted-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-batch-select {
  gap: 5px;
}

.report-batch-select select {
  min-height: 42px;
  background: var(--panel);
  font-weight: 700;
}

.snapshot-status {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.snapshot-status strong {
  color: var(--text);
}

.snapshot-status.locked {
  border-color: rgba(14, 116, 144, 0.32);
}

.snapshot-status.live {
  border-color: rgba(180, 83, 9, 0.32);
}

.snapshot-warning {
  color: var(--danger);
  font-weight: 700;
}

.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.filter-pills {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-pill {
  min-height: 40px;
  background: var(--panel-soft);
  color: var(--brand-dark);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.filter-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.filter-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.digital-row,
.settings-row,
.customer-row,
.batch-row,
.transaction-row {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.transaction-row.voided-row {
  background: rgba(180, 0, 30, 0.06);
}

.transaction-row.voided-row .list-title strong {
  color: var(--bad);
}

.submission-row-card.archived-submission-row {
  background: rgba(0, 0, 0, 0.025);
}

.old-record-note {
  color: var(--warn) !important;
  font-weight: 800;
}

.section-help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.digital-row {
  grid-template-columns: 1fr 120px 44px;
}

.settings-row {
  grid-template-columns: 1fr 1fr 1fr 72px;
}

.settings-home-panel {
  margin-bottom: 12px;
}

.settings-section-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-section-button {
  min-height: 56px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--brand-dark);
  text-align: left;
}

.settings-section-button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(196, 0, 34, 0.18);
}

.settings-section-button strong,
.settings-section-button span {
  display: block;
}

.settings-section-button strong {
  font-size: 13px;
  line-height: 1.15;
}

.settings-section-button span {
  margin-top: 3px;
  color: inherit;
  font-size: 10px;
  line-height: 1.15;
  opacity: 0.76;
}

.admin-settings-grid {
  align-items: start;
}

.note-template-list {
  display: grid;
  gap: 8px;
}

.note-template-section {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.mini-section-title {
  display: grid;
  gap: 2px;
}

.mini-section-title strong {
  color: var(--ink);
}

.mini-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.note-template-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.4fr) auto 74px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.note-template-new {
  margin-top: 10px;
}

.checkline {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.checkline input {
  width: auto;
  min-height: auto;
}

.deploy-checklist {
  display: grid;
  gap: 7px;
}

.deploy-checklist .checkline {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  white-space: normal;
}

.safety-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.safety-steps li {
  line-height: 1.35;
}

.customer-row {
  grid-template-columns: 1fr auto;
}

.batch-row,
.transaction-row {
  grid-template-columns: 1fr auto;
}

.list-title {
  display: grid;
  gap: 4px;
}

.list-title strong {
  font-size: 15px;
}

.list-title span {
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eceff0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.badge.good {
  background: #e1f4e8;
  color: var(--good);
}

.badge.bad {
  background: #ffe4e7;
  color: var(--bad);
}

.badge.warn {
  background: #fff0d8;
  color: var(--warn);
}

.report-wrap {
  display: grid;
  gap: 12px;
}

.report-card {
  width: min(100%, 860px);
  margin: 0 auto;
  background: #fff;
  color: #0d0d0d;
  border: 2px solid #777;
  padding: 46px 52px 34px;
  box-shadow: var(--shadow);
}

.report-date {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid #777;
  font-size: 24px;
}

.report-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  margin-top: 48px;
  border: 2px solid #777;
}

.report-group {
  display: grid;
  place-items: center;
  min-height: 118px;
  background: #6d6d6a;
  color: #fff;
  text-align: center;
  font-size: 60px;
  font-weight: 900;
}

.report-group span {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.report-total {
  display: grid;
  align-content: center;
  padding: 10px 18px;
}

.report-total span {
  font-size: 26px;
  font-weight: 900;
}

.report-total strong {
  margin-top: 18px;
  color: #a80008;
  text-align: center;
  font-size: 48px;
}

.report-table {
  width: 100%;
  margin-top: 52px;
  border-collapse: collapse;
  font-size: 25px;
}

.report-table th {
  background: #d9d9d9;
  padding: 14px 10px;
  text-align: left;
}

.report-table th:last-child,
.report-table td:last-child {
  text-align: right;
}

.report-table td {
  border-bottom: 2px solid #e0e0e0;
  padding: 9px 10px;
}

.report-row-note {
  display: block;
  margin-top: 2px;
  color: #666;
  font-size: 10px;
  font-weight: 800;
}

.report-foot {
  margin-top: 34px;
  color: #555;
  font-size: 16px;
}

.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.42);
}

.modal {
  width: min(100%, 560px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

#staffModalRoot .modal-backdrop {
  place-items: start center;
  padding-top: max(24px, calc(env(safe-area-inset-top) + 56px));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

#staffModalRoot .modal {
  max-height: calc(100dvh - 96px);
}

#staffModalRoot .staff-chat-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(520px, 100%);
  height: min(760px, calc(100dvh - 96px));
  overflow: hidden;
}

.staff-chat-modal #staffChatHistoryBox,
.staff-chat-modal .staff-message-panel,
.staff-chat-modal .staff-chat-primary,
.staff-chat-modal .staff-rider-updates-tab {
  min-height: 0;
}

.staff-chat-modal #staffChatHistoryBox {
  display: grid;
  overflow: hidden;
}

.staff-chat-modal .staff-message-panel {
  height: 100%;
  overflow: hidden;
}

.staff-chat-modal .staff-chat-primary,
.staff-chat-modal .staff-rider-updates-tab {
  overflow: hidden;
}

.staff-chat-modal .chat-thread {
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.staff-chat-modal .staff-chat-composer {
  max-height: none;
  overflow: visible;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}

.staff-chat-modal .staff-chat-composer textarea {
  max-height: 110px;
  overflow: auto;
}

body.theme-dark-red .modal {
  background: var(--panel);
  color: var(--ink);
}

.modal h3 {
  margin: 0 0 8px;
}

.modal p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.4;
}

.modal-message-preview {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-thread {
  display: grid;
  gap: 8px;
  max-height: min(34vh, 320px);
  overflow: auto;
  padding: 2px;
}

.admin-message-history-filter {
  margin-bottom: 10px;
}

.admin-message-history-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 1px;
}

.admin-message-history-batch .chat-thread {
  max-height: none;
  overflow: visible;
}

.admin-ready-snapshot-list {
  display: grid;
  gap: 7px;
  max-height: min(48vh, 460px);
  overflow: auto;
}

.admin-ready-snapshot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-ready-snapshot-row strong,
.admin-ready-snapshot-row span,
.admin-ready-snapshot-row small {
  display: block;
}

.admin-ready-snapshot-row span,
.admin-ready-snapshot-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.admin-ready-snapshot-row em {
  color: var(--brand-dark);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.admin-ready-snapshot-row small {
  grid-column: 1 / -1;
}

.staff-message-panel {
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.staff-message-toolbar {
  display: grid;
  gap: 5px;
}

.staff-message-meta-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.staff-message-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.staff-message-badges small {
  padding: 4px 6px;
  border: 1px solid rgba(190, 0, 30, 0.12);
  border-radius: 999px;
  background: #fff7f7;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.staff-message-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.staff-message-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.staff-message-tabs button small {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.055);
  color: currentColor;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.staff-message-tabs button.is-active {
  border-color: rgba(190, 0, 30, 0.24);
  background: #fff0f2;
  color: var(--brand-dark);
}

.staff-chat-primary .chat-thread {
  max-height: none;
}

.staff-chat-primary,
.staff-rider-updates-tab {
  grid-row: 2;
}

.staff-chat-composer {
  grid-row: 3;
}

.staff-message-panel .chat-thread {
  max-height: none;
  min-height: 130px;
}

.staff-chat-filter-summary {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.staff-rider-updates-tab {
  min-height: 0;
}

.staff-rider-updates-tab .chat-thread {
  height: 100%;
}

.staff-rider-updates-tab .chat-thread {
  gap: 5px;
}

.staff-rider-updates-tab .chat-bubble {
  width: 100%;
  padding: 6px 8px;
  gap: 2px;
}

.staff-rider-updates-tab .chat-bubble strong {
  font-size: 11px;
}

.staff-rider-updates-tab .chat-bubble p,
.staff-rider-updates-tab .chat-bubble span {
  font-size: 11px;
  line-height: 1.25;
}

.staff-rider-updates-tab .chat-bubble .chat-amount-line {
  font-size: 12px;
}

.staff-rider-updates-tab .chat-bubble .chat-meta {
  font-size: 10px;
  font-weight: 500;
}

.staff-chat-composer {
  display: grid;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.staff-chat-composer-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.staff-chat-composer-quick {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 1px;
}

.staff-chat-composer-quick .mini-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 7px;
  font-size: 10px;
}

.staff-chat-more-replies {
  position: relative;
}

.staff-chat-more-replies summary {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

.staff-chat-more-replies[open] summary {
  margin-bottom: 0;
  background: rgba(190, 0, 30, 0.08);
}

.staff-chat-more-replies .float-field {
  position: absolute;
  right: 0;
  bottom: calc(100% + 5px);
  z-index: 4;
  width: min(260px, calc(100vw - 72px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.staff-chat-composer .float-field textarea {
  min-height: 54px;
  max-height: 110px;
  padding-top: 16px;
  font-size: 13px;
  overflow: auto;
}

.staff-chat-composer .auth-message {
  padding: 7px 8px;
  font-size: 11px;
}

.staff-chat-send-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.staff-chat-send-row button {
  min-height: 34px;
}

.staff-chat-send-row [data-open-staff-chat-history] {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}

.staff-chat-split {
  display: grid;
  gap: 10px;
}

.staff-chat-section {
  display: grid;
  gap: 6px;
}

.chat-section-title {
  display: grid;
  gap: 2px;
  padding: 2px 2px 0;
}

.chat-section-title strong {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.chat-section-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.chat-bubble {
  display: grid;
  gap: 3px;
  width: min(96%, 460px);
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.chat-bubble.from-admin {
  justify-self: end;
  border-color: rgba(190, 0, 30, 0.24);
  background: #fff0f2;
}

.chat-bubble.from-staff {
  justify-self: start;
  border-color: rgba(33, 126, 134, 0.26);
  background: rgba(33, 126, 134, 0.08);
}

.chat-bubble.from-rider {
  justify-self: start;
  border-color: rgba(164, 93, 0, 0.28);
  background: #fff2d6;
}

.chat-bubble.from-ready {
  justify-self: start;
  border-color: rgba(20, 122, 61, 0.28);
  background: rgba(20, 122, 61, 0.08);
}

.chat-bubble.from-screenshot {
  justify-self: end;
  border-color: rgba(176, 122, 0, 0.28);
  background: #fff7df;
}

.chat-bubble strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.chat-bubble p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-bubble .chat-main-line {
  color: var(--muted);
  font-size: 12px;
}

.chat-bubble .chat-amount-line {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 600;
}

.chat-bubble span,
.chat-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.chat-bubble .chat-meta {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
}

.chat-batch-divider {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 1px 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.chat-batch-divider::before,
.chat-batch-divider::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--line);
}

.chat-batch-divider span {
  flex: 0 0 auto;
}

.chat-action-button {
  justify-self: start;
  min-height: 30px;
  padding: 5px 9px;
}

.chat-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.hidden {
  display: none !important;
}

.move-grid,
.correction-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.move-grid .span,
.correction-fields .customer-field {
  grid-column: 1 / -1;
}

.compact-topline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compact-topline strong,
.compact-topline span {
  display: block;
  overflow-wrap: anywhere;
}

.compact-topline span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.compact-toggle,
.mini-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.theme-toggle {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--brand-dark);
  font-size: 12px;
}

.theme-picker {
  display: grid;
  grid-template-columns: auto minmax(92px, 118px);
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.theme-picker select {
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.option-theme-picker {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.option-theme-picker select {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
}

.customer-title-actions {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 5px;
  align-items: center;
}

.settings-button {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 12px;
}

.chat-soon-button span {
  display: block;
  margin-top: -2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.notes-button {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 12px;
}

.notes-button::before {
  content: "\1F4DD";
  margin-right: 4px;
}

.rider-home-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin: 10px 0;
}

.rider-action-card {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 2px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  text-align: left;
  box-shadow: 0 7px 16px rgba(35, 22, 25, 0.06);
}

.rider-action-card.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-color: var(--brand);
}

.rider-action-card.active[data-flow-mode="gcash"] {
  background: linear-gradient(135deg, #0b83ff, #0756bc);
  border-color: #0b83ff;
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 131, 255, 0.18);
}

.rider-action-card.active[data-flow-mode="cash"] {
  background: linear-gradient(135deg, #15803d, #0f5f2d);
  border-color: #15803d;
  color: #fff;
  box-shadow: 0 10px 20px rgba(21, 128, 61, 0.18);
}

.rider-action-card.active[data-flow-mode="mixed"] {
  background: linear-gradient(135deg, #15803d 0%, #12816f 48%, #0b83ff 100%);
  border-color: #12816f;
  color: #fff;
  box-shadow: 0 10px 20px rgba(18, 129, 111, 0.18);
}

.rider-action-copy,
.rider-action-copy strong,
.rider-action-copy > span {
  display: block;
}

.rider-action-card strong {
  font-size: 14px;
  line-height: 1.15;
}

.rider-action-copy > span {
  color: inherit;
  opacity: 0.82;
  font-size: 11px;
  font-weight: 800;
}

.rider-action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  opacity: 1;
}

.rider-action-card.active .rider-action-icon {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.rider-action-icon img {
  display: block;
  max-width: 30px;
  max-height: 30px;
}

.notebook-icon::before {
  content: "";
  width: 20px;
  height: 24px;
  display: block;
  border: 2px solid var(--brand-dark);
  border-left-width: 5px;
  border-radius: 3px;
  background: linear-gradient(#fff 0 0) 7px 7px / 9px 2px no-repeat,
    linear-gradient(#fff 0 0) 7px 13px / 9px 2px no-repeat,
    var(--brand);
}

.cash-home-icon::before {
  content: "P";
  width: 26px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid var(--brand-dark);
  border-radius: 4px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.combo-home-icon {
  width: 46px;
  grid-template-columns: auto auto;
  gap: 4px;
}

.combo-home-icon .cash-home-icon {
  width: auto;
  height: auto;
  display: grid;
  background: transparent;
  border: 0;
}

.combo-home-icon img {
  max-width: 22px;
  max-height: 22px;
}

.rider-action-card.slim {
  grid-template-columns: minmax(0, 1fr);
  min-height: 36px;
  padding: 7px 10px;
  text-align: center;
  box-shadow: none;
}

.rider-action-card.slim strong {
  font-size: 12px;
}

.rider-action-card.slim .rider-action-copy > span {
  display: none;
}

.rider-flow-hint,
.customer-recent-card {
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.rider-flow-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.rider-flow-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 5px;
}

.rider-flow-hint span {
  min-width: 0;
}

.customer-home[data-flow-mode="home"] .rider-flow-hint {
  display: none;
}

.customer-home[data-flow-mode="home"] .customer-primary-fields,
.customer-home[data-flow-mode="home"] .remit-fee-grid,
.customer-home[data-flow-mode="home"] .include-fee-row,
.customer-home[data-flow-mode="home"] .customer-fee-line,
.customer-home[data-flow-mode="home"] .main-wallet-section,
.customer-home[data-flow-mode="home"] .counter-head,
.customer-home[data-flow-mode="home"] .counter-sticky-status,
.customer-home[data-flow-mode="home"] > .money-table,
.customer-home[data-flow-mode="home"] #counterModeActions,
.customer-home[data-flow-mode="home"] #bottomSubmitSlot,
.customer-home[data-flow-mode="home"] #customerSubmitBlock {
  display: none !important;
}

.customer-home[data-flow-mode="counter"] .customer-primary-fields,
.customer-home[data-flow-mode="counter"] .remit-fee-grid,
.customer-home[data-flow-mode="counter"] .include-fee-row,
.customer-home[data-flow-mode="counter"] .customer-fee-line,
.customer-home[data-flow-mode="counter"] .main-wallet-section,
.customer-home[data-flow-mode="counter"] #bottomSubmitSlot,
.customer-home[data-flow-mode="counter"] #customerSubmitBlock {
  display: none !important;
}

.customer-home[data-flow-mode="gcash"] .counter-head,
.customer-home[data-flow-mode="gcash"] .counter-sticky-status,
.customer-home[data-flow-mode="gcash"] > .money-table,
.customer-home[data-flow-mode="gcash"] #counterModeActions,
.customer-home[data-flow-mode="gcash"] #bottomSubmitSlot {
  display: none !important;
}

.customer-home[data-flow-mode="gcash"] .customer-primary-fields,
.customer-home[data-flow-mode="cash"] .customer-primary-fields,
.customer-home[data-flow-mode="mixed"] .customer-primary-fields,
.customer-home[data-flow-mode="gcash"] .customer-fee-line,
.customer-home[data-flow-mode="cash"] .customer-fee-line,
.customer-home[data-flow-mode="mixed"] .customer-fee-line,
.customer-home[data-flow-mode="gcash"] .main-wallet-section .mini-section-title,
.customer-home[data-flow-mode="gcash"] .main-wallet-table {
  display: none !important;
}

.customer-home:not([data-flow-mode="gcash"]) #gcashRemitPanel {
  display: none !important;
}

.customer-home[data-flow-mode="cash"] .main-wallet-section {
  display: none !important;
}

.customer-home[data-flow-mode="mixed"] #gcashRemitPanel {
  display: none !important;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-section {
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(200, 16, 46, 0.16);
  border-radius: 8px;
  background: rgba(255, 247, 247, 0.64);
}

.customer-home[data-flow-mode="mixed"] .main-wallet-section .mini-section-title {
  grid-template-columns: 1fr;
  gap: 2px;
  align-items: start;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-section .mini-section-title span {
  text-align: left;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-table {
  display: block;
  border: 0;
  background: transparent;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-table thead,
.customer-home[data-flow-mode="mixed"] .main-wallet-table td:first-child,
.customer-home[data-flow-mode="mixed"] .main-wallet-table td:last-child,
.customer-home[data-flow-mode="mixed"] #customerExtraPaymentRows {
  display: none !important;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-table tbody,
.customer-home[data-flow-mode="mixed"] .main-wallet-table tr,
.customer-home[data-flow-mode="mixed"] .main-wallet-table td:nth-child(2) {
  display: block;
  width: 100%;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-table td:nth-child(2) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 142px);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-table td:nth-child(2)::before {
  content: "GCash amount";
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-table input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-left: 0;
  padding-left: 48px;
  font-size: 20px;
  font-weight: 900;
  text-align: right;
  background: #fff url("logos/gcash.svg") 12px 50% / 28px 28px no-repeat;
}

.customer-home[data-flow-mode="mixed"] .main-wallet-table td:nth-child(2)::after {
  display: none;
}

.customer-home[data-flow-mode="cash"] .remit-fee-grid,
.customer-home[data-flow-mode="mixed"] .remit-fee-grid {
  margin-top: 8px;
}

.customer-home:not([data-flow-mode="counter"]) #counterModeActions {
  display: none !important;
}

.customer-home[data-flow-mode="home"] .rider-home-actions {
  margin-top: 10px;
}

.customer-home:not([data-flow-mode="home"]) .rider-home-actions {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.customer-home:not([data-flow-mode="home"]) .rider-action-card {
  min-height: 42px;
  padding: 7px;
  text-align: center;
}

.customer-home:not([data-flow-mode="home"]) .rider-action-card .rider-action-copy > span,
.customer-home:not([data-flow-mode="home"]) .rider-action-icon {
  display: none;
}

.customer-home:not([data-flow-mode="home"]) .rider-action-card strong {
  font-size: 10px;
}

.customer-recent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  justify-items: center;
  background: #fff4bf;
  border-color: #f3d986;
  text-align: center;
}

.customer-home:not([data-flow-mode="home"]) .customer-recent-card {
  display: none !important;
}

.customer-recent-card span,
.customer-recent-card strong {
  display: block;
}

.customer-recent-card .status-badge,
.customer-recent-card .finance-status {
  display: inline-flex;
}

.customer-recent-card .recent-status-note,
.customer-recent-card .active-timeline {
  width: 100%;
  text-align: left;
}

.customer-recent-card strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.customer-home[data-flow-mode="counter"] .counter-sticky-status {
  grid-template-columns: 1fr;
}

.customer-home[data-flow-mode="counter"] .counter-sticky-status > div {
  border-right: 0;
}

.counter-only-total strong {
  font-size: 24px;
}

.counter-mode-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.icon-button {
  width: 36px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.app-version {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.settings-panel {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 35;
  width: min(360px, calc(100% - 24px));
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.settings-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
}

.settings-panel-head > div {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.settings-close-button {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}

.app-update-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #f0c36c;
  border-radius: 8px;
  background: #fff7e6;
  color: #6a4200;
}

.app-update-notice strong,
.app-update-notice span {
  display: block;
}

.app-update-notice span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.release-note-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.release-note-card {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.release-note-card strong {
  color: var(--ink);
  font-size: 14px;
}

.release-note-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.update-required-modal .duplicate-warning {
  margin-bottom: 12px;
}

.settings-panel-head strong {
  color: var(--ink);
  font-size: 14px;
}

.settings-theme {
  grid-template-columns: minmax(0, 1fr) minmax(112px, 150px);
}

.remember-setting {
  display: grid;
  gap: 4px;
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.remember-setting label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.remember-setting input {
  width: auto;
  min-height: auto;
}

.forget-device-button {
  width: fit-content;
  min-height: 28px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 10px;
}

.compact-row-actions {
  margin-top: 0;
}

.local-ref {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.local-status-sync {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.compact-form {
  padding: 12px;
}

.admin-new-form {
  padding: 10px;
}

.compact-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.compact-title h1 {
  margin: 0;
  font-size: 18px;
}

.compact-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-new-form .compact-title {
  margin-bottom: 7px;
}

.admin-new-form .compact-title h1 {
  font-size: 17px;
}

.admin-new-form .compact-title p {
  font-size: 11px;
  font-weight: 800;
}

.compact-title #loggedInSummary {
  color: var(--brand-dark);
  font-weight: 900;
}

.compact-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(110px, 0.8fr) minmax(90px, 0.7fr);
  gap: 8px;
}

.customer-primary-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.notebook-button {
  min-height: 46px;
  padding: 8px 10px;
  font-size: 12px;
}

.edit-info-button {
  min-height: 46px;
  padding: 8px 10px;
  font-size: 13px;
}

.remit-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.52fr);
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}

.remit-fee-grid {
  display: grid;
  grid-template-columns: minmax(118px, 142px) minmax(74px, 92px);
  gap: 8px;
  align-items: stretch;
  justify-content: start;
  margin-top: 8px;
}

#customerRemit,
#customerFeeDisplay {
  font-size: 22px;
  font-weight: 900;
}

.fee-toggle {
  min-height: 46px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.15;
}

.fee-toggle input {
  width: auto;
  min-height: auto;
}

.include-fee-row {
  min-height: 46px;
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.include-fee-row input {
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  accent-color: var(--brand);
}

.admin-include-fee-row {
  min-height: 46px;
  margin-top: 0;
  font-size: 13px;
  font-weight: 800;
}

.admin-new-form .admin-include-fee-row {
  min-height: 38px;
  padding: 6px 8px;
  font-size: 12px;
}

.admin-new-form .admin-include-fee-row input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
}

.compact-fields .span {
  grid-column: 1 / -1;
}

.compact-fields input,
.compact-fields select,
.compact-notes textarea {
  min-height: 38px;
  padding: 8px 10px;
}

.admin-new-form .compact-fields {
  grid-template-columns: minmax(160px, 1.35fr) minmax(92px, 0.62fr) minmax(76px, 0.5fr) minmax(118px, 0.78fr);
  gap: 6px;
}

.admin-new-form .compact-fields input,
.admin-new-form .compact-fields select {
  min-height: 36px;
  padding: 7px 9px;
}

.float-field {
  position: relative;
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.float-field input,
.float-field select,
.float-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 17px 10px 6px;
}

.float-field input[readonly] {
  color: var(--muted);
  background: rgba(0, 0, 0, 0.035);
}

.float-field span {
  position: absolute;
  left: 11px;
  top: 14px;
  pointer-events: none;
  color: var(--muted);
  font-size: 14px;
  transition: top 0.14s ease, font-size 0.14s ease, color 0.14s ease;
}

.float-field input:focus + span,
.float-field input:not(:placeholder-shown) + span,
.float-field input[data-format-money] + span,
.float-field select:focus + span,
.float-field select + span,
.float-field textarea:focus + span,
.float-field textarea:not(:placeholder-shown) + span {
  top: 5px;
  color: var(--brand-dark);
  font-size: 10px;
}

.duplicate-warning {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #f4c77a;
  border-radius: 8px;
  background: #fff7e6;
}

.duplicate-warning strong,
.duplicate-warning span {
  display: block;
}

.duplicate-warning span {
  color: var(--muted);
  font-size: 13px;
}

.duplicate-warning div {
  display: flex;
  gap: 8px;
}

.compact-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.compact-summary .metric {
  min-height: 58px;
  padding: 8px;
}

.compact-summary .metric strong {
  margin-top: 4px;
  font-size: 16px;
}

.compact-summary .metric.priority strong {
  font-size: 18px;
}

.customer-fee-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin: 6px 0 2px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.customer-fee-line strong {
  color: var(--brand-dark);
  text-align: right;
}

.main-wallet-section {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.gcash-remit-panel {
  display: grid;
  gap: 9px;
}

.gcash-remit-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gcash-remit-title strong,
.gcash-remit-title span {
  display: block;
}

.gcash-remit-title strong {
  color: var(--brand-dark);
  font-size: 15px;
}

.gcash-remit-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payment-logo.large {
  width: 38px;
  height: 38px;
}

.gcash-to-pay-card,
.confirm-pay-card {
  display: grid;
  gap: 3px;
  padding: 13px;
  border: 1px solid rgba(200, 16, 46, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.08), #fff);
}

.gcash-to-pay-card span,
.confirm-pay-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.gcash-to-pay-card strong,
.confirm-pay-card strong {
  color: var(--brand-dark);
  font-size: 28px;
  line-height: 1;
}

.gcash-to-pay-card small,
.confirm-pay-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.main-wallet-section .mini-section-title {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.main-wallet-section .mini-section-title strong {
  font-size: 13px;
}

.main-wallet-section .mini-section-title span {
  font-size: 11px;
  text-align: right;
}

.main-wallet-table {
  margin: 0;
}

.main-wallet-table th,
.main-wallet-table td {
  padding: 4px 6px;
}

.main-wallet-table td:first-child {
  width: 40%;
}

.main-wallet-table td:nth-child(2) {
  width: 38%;
}

.main-wallet-table td:last-child {
  width: 22%;
}

.main-wallet-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.gcash-proof-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.proof-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.proof-upload-row input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.proof-file-button {
  position: relative;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff0f2;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.proof-file-button span {
  pointer-events: none;
}

.proof-upload-status {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--brand-dark);
}

.proof-upload-status strong,
.proof-upload-status span,
.proof-upload-status small {
  display: block;
  overflow-wrap: anywhere;
}

.proof-upload-status strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.proof-upload-status span {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.proof-upload-status small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.gcash-proof-panel.has-proof .proof-upload-status {
  border-style: solid;
  background: rgba(22, 163, 74, 0.06);
  color: var(--good);
}

.gcash-proof-panel.has-proof .proof-upload-status span {
  color: var(--good);
}

.gcash-proof-panel.has-proof-error .proof-upload-status {
  border-style: solid;
  border-color: rgba(190, 0, 30, 0.36);
  background: #fff0f2;
  color: var(--bad);
}

.gcash-proof-panel.has-proof-error .proof-upload-status span,
.gcash-proof-panel.has-proof-error .proof-upload-status small {
  color: var(--bad);
}

.customer-home[data-flow-mode="gcash"] #fastSubmitSlot .compact-notes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.customer-home[data-flow-mode="gcash"] #fastSubmitSlot .compact-notes textarea {
  grid-column: 1 / -1;
  min-height: 42px;
}

.clear-counter-actions {
  grid-template-columns: 1fr;
}

.extra-wallet-row td {
  background: rgba(255, 255, 255, 0.58);
}

#customerSubmitBlock {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

#fastSubmitSlot .compact-notes {
  margin-top: 2px;
}

#fastSubmitSlot .compact-notes textarea {
  min-height: 48px;
}

#fastSubmitSlot .submit-panel {
  margin-top: 2px;
}

.admin-pay-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 6px;
}

.admin-pay-summary div {
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-pay-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-pay-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.admin-pay-summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.admin-pay-summary div:last-child {
  border-color: rgba(20, 122, 61, 0.28);
  background: rgba(20, 122, 61, 0.06);
}

.admin-pay-summary div:last-child strong {
  color: var(--brand-dark);
}

.admin-new-form .admin-pay-summary {
  margin: 6px 0 4px;
}

.admin-new-form .admin-pay-summary div {
  min-height: 42px;
  padding: 6px 8px;
}

.admin-new-form .admin-pay-summary strong {
  margin-top: 2px;
  font-size: 15px;
}

.admin-new-form .admin-pay-summary small {
  margin-top: 0;
}

.counter-sticky-status {
  position: sticky;
  top: 6px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(20, 24, 28, 0.08);
}

body.theme-dark-red .counter-sticky-status {
  background: rgba(42, 20, 24, 0.96);
}

.counter-sticky-status div {
  min-height: 62px;
  padding: 8px 7px;
  border-right: 1px solid var(--line);
}

.counter-sticky-status div:last-child {
  border-right: 0;
  background: var(--panel-soft);
}

.counter-sticky-status .counter-status-card.good {
  background: #e1f4e8;
}

.counter-sticky-status .counter-status-card.bad {
  background: #fff0f2;
}

.counter-sticky-status .counter-status-card.warn {
  background: #fff7e6;
}

.counter-sticky-status span,
.detail-fields span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.counter-sticky-status strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.08;
}

.counter-sticky-status small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.counter-sticky-status .good strong {
  color: var(--good);
}

.counter-sticky-status .bad strong {
  color: var(--bad);
}

.counter-sticky-status .warn strong {
  color: var(--warn);
}

.sticky-short-button {
  width: 100%;
  min-height: 30px;
  margin-top: 6px;
  padding: 5px 6px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
}

.exact-submit-button {
  margin-top: 8px;
  background: var(--good) !important;
  color: #fff !important;
}

.field-attention {
  animation: requiredFieldPulse 1.05s ease;
}

.proof-attention {
  animation: requiredProofPulse 1.05s ease;
}

.status-attention.good {
  animation: exactStatusPulse 1.05s ease;
}

.status-attention.bad {
  animation: shortStatusPulse 1.05s ease;
}

.status-attention.warn {
  animation: overStatusPulse 1.05s ease;
}

@keyframes requiredFieldPulse {
  0%, 100% {
    box-shadow: none;
  }
  18%, 72% {
    border-color: var(--bad);
    background: #fff0f2;
    box-shadow: 0 0 0 4px rgba(180, 8, 24, 0.14);
  }
}

@keyframes requiredProofPulse {
  0%, 100% {
    box-shadow: none;
  }
  18%, 72% {
    border-color: var(--warn);
    background: #fff7e6;
    box-shadow: 0 0 0 4px rgba(164, 97, 0, 0.14);
  }
}

@keyframes exactStatusPulse {
  0%, 100% {
    box-shadow: none;
  }
  18%, 72% {
    background: #d8f7e3;
    box-shadow: 0 0 0 4px rgba(20, 122, 61, 0.18);
  }
}

@keyframes shortStatusPulse {
  0%, 100% {
    box-shadow: none;
  }
  18%, 72% {
    background: #ffe5e8;
    box-shadow: 0 0 0 4px rgba(180, 8, 24, 0.18);
  }
}

@keyframes overStatusPulse {
  0%, 100% {
    box-shadow: none;
  }
  18%, 72% {
    background: #fff0d8;
    box-shadow: 0 0 0 4px rgba(164, 97, 0, 0.18);
  }
}

.counter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.counter-head h2 {
  margin: 0;
  font-size: 16px;
}

.admin-new-form .counter-head {
  margin-top: 5px;
}

.admin-new-form .counter-head h2 {
  font-size: 15px;
}

.counter-head div {
  display: grid;
  grid-template-columns: minmax(104px, 1fr) auto;
  gap: 6px;
  justify-content: flex-end;
}

.reset-counter-small {
  min-height: 30px;
  align-self: center;
  padding: 4px 8px;
  border-color: #f1b9be;
  color: var(--bad);
  font-size: 11px;
}

.admin-new-form .reset-counter-small {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 10px;
}

.wallet-add-button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 5px;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1;
  white-space: normal;
}

.compact-money th,
.compact-money td {
  padding: 5px 7px;
}

.compact-money tr.active-cash-row td {
  background: rgba(20, 122, 61, 0.075);
}

.compact-money tr.active-cash-row td:first-child {
  position: relative;
  color: var(--good);
  font-weight: 900;
}

.compact-money tr.active-cash-row td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: var(--good);
}

.compact-money tr.active-cash-row td[data-total] {
  color: var(--good);
  font-weight: 900;
}

.compact-money tr.active-cash-row input {
  border-color: rgba(20, 122, 61, 0.32);
  background-color: #f8fff9;
  font-weight: 900;
}

.compact-money input,
.compact-money select {
  min-height: 34px;
  padding: 6px 8px;
}

.compact-money td:first-child {
  width: 38%;
  font-weight: 700;
}

.compact-money td:nth-child(2) {
  width: 34%;
}

.compact-money td:last-child {
  width: 28%;
}

.compact-number {
  text-align: right;
}

tr.digital-row {
  display: table-row;
  padding: 0;
  border-bottom: 0;
}

.payment-method-control {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.payment-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-logo img {
  display: block;
  max-width: 30px;
  max-height: 24px;
}

.payment-logo-fallback {
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 900;
}

.detail-payment-method {
  display: inline-grid;
  grid-template-columns: 28px auto;
  justify-content: start;
}

.detail-payment-method .payment-logo {
  width: 28px;
  height: 28px;
}

.detail-payment-method .payment-logo img {
  max-width: 25px;
  max-height: 20px;
}

.danger-note {
  margin: 10px 0 0;
  color: var(--bad);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.mini-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
}

.mini-list-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.mini-list-row strong {
  font-size: 13px;
}

.mini-list-row span {
  color: var(--muted);
  font-size: 12px;
}

.add-payment-inline {
  width: 100%;
  margin-top: 8px;
}

.payment-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.42fr);
  gap: 8px;
}

.admin-compact-details {
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.admin-compact-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 9px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.admin-compact-details summary::-webkit-details-marker {
  display: none;
}

.admin-compact-details summary::after {
  content: "Show";
  color: var(--muted);
  font-size: 10px;
}

.admin-compact-details[open] summary::after {
  content: "Hide";
}

.admin-compact-details .payment-actions,
.admin-compact-details .compact-notes {
  margin: 0;
  padding: 0 8px 8px;
}

.admin-compact-details .add-payment-inline {
  margin-top: 0;
}

.admin-compact-details textarea {
  min-height: 46px;
}

.short-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.7fr);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.short-action span {
  color: var(--bad);
  font-size: 13px;
  font-weight: 800;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.remember-row label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.remember-row input {
  width: auto;
  min-height: auto;
}

.submit-panel {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(78px, 0.32fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.submit-panel > div {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#checkSubmissionStatus {
  grid-column: 1;
  min-width: 104px;
}

#openCustomerNote {
  grid-column: 2;
  min-width: 78px;
}

#submitForChecking {
  grid-column: 3;
  min-width: 0;
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

#checkSubmissionStatus.hidden + #openCustomerNote {
  grid-column: 1;
}

#checkSubmissionStatus.hidden + #openCustomerNote + #submitForChecking {
  grid-column: 2 / -1;
}

.recent-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.recent-status-block {
  display: grid;
  gap: 7px;
  width: 100%;
}

.recent-status-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
}

.recent-status-head > div {
  min-width: 0;
}

.recent-status-head-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
}

.recent-status-detail {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 10px;
}

.recent-status-head span,
.recent-status-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.recent-status-head strong {
  display: block;
  margin-top: 1px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.1;
}

.recent-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.recent-status-grid div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(190, 0, 30, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.recent-status-grid strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.recent-status-grid small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.recent-status-grid .recent-status-amount strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.recent-status-grid div:nth-child(3) {
  grid-column: 1 / -1;
}

.recent-status-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.recent-status-message {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.active-timeline {
  display: grid;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
}

.active-timeline span {
  display: block;
}

.active-timeline-item {
  padding: 6px 8px;
  border: 1px solid rgba(33, 126, 134, 0.16);
  border-radius: 8px;
  background: rgba(33, 126, 134, 0.06);
}

.active-timeline-item.additional-pending,
.active-timeline-item.additional-processing {
  border-color: rgba(176, 122, 0, 0.18);
  background: #fff7df;
}

.active-timeline-item.additional-received,
.active-timeline-item.remit-received,
.active-timeline-item.finance-checked {
  border-color: rgba(20, 122, 61, 0.16);
  background: rgba(20, 122, 61, 0.06);
}

.active-timeline strong,
.active-timeline-total {
  color: var(--text);
}

.active-timeline em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.active-timeline-total {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  font-weight: 900;
}

.finance-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.finance-status.finance-exact {
  background: rgba(20, 122, 61, 0.11);
  color: var(--good);
}

.finance-status.finance-waiting {
  background: #fff0d8;
  color: var(--warn);
}

.confirm-remit-main {
  margin: 8px 0 10px;
  padding: 12px;
  border: 1px solid rgba(190, 0, 30, 0.22);
  border-radius: 8px;
  background: var(--panel-soft);
}

.confirm-remit-main span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.confirm-remit-main strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 30px;
  line-height: 1;
}

.submit-confirm-message {
  margin: 10px 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.confirm-submit-wide {
  min-width: 190px;
}

.submit-panel .good {
  color: var(--good);
}

.submit-panel .bad {
  color: var(--bad);
}

.submit-panel .warn {
  color: var(--warn);
}

.local-record-list {
  display: grid;
  gap: 8px;
}

.local-delete-tools {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.local-delete-tools strong,
.local-delete-tools span {
  display: block;
}

.local-delete-tools span {
  color: var(--muted);
  font-size: 12px;
}

.history-delete-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.history-delete-grid input {
  min-height: 34px;
  padding: 6px 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef3f7;
  color: #3d6478;
  font-size: 11px;
  font-weight: 900;
}

.status-badge.submitted,
.status-badge.new-after-confirmed {
  background: #fff0d8;
  color: var(--warn);
}

.status-badge.confirmed {
  background: #e1f4e8;
  color: var(--good);
}

.status-badge.needs-correction {
  background: #fff0d8;
  color: #a45d00;
}

.status-badge.rejected {
  background: #ffe4e7;
  color: var(--bad);
}

.status-badge.offline-saved,
.status-badge.offline-queued {
  background: #e8f0ff;
  color: #345c9c;
}

.record-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.notebook-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.42fr);
  gap: 8px;
  margin-bottom: 10px;
}

.notebook-form textarea {
  min-height: 72px;
  resize: vertical;
}

.notebook-form textarea,
.notebook-form input {
  width: 100%;
}

.notebook-form button {
  grid-column: 1 / -1;
}

.notebook-list {
  display: grid;
  gap: 8px;
}

.notebook-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.notebook-item strong,
.notebook-item span {
  display: block;
}

.notebook-item span {
  color: var(--muted);
  font-size: 12px;
}

.notebook-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
  gap: 6px;
}

.guide-list {
  display: grid;
  gap: 8px;
}

.guide-list div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.guide-list strong {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}

.guide-list span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.guide-modal {
  width: min(100%, 620px);
}

.guide-choice-list {
  display: grid;
  gap: 8px;
}

.guide-choice-card {
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.guide-choice-card strong,
.guide-choice-card small {
  display: block;
}

.guide-choice-card strong {
  color: var(--brand-dark);
  font-size: 15px;
}

.guide-choice-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.guide-choice-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.guide-note {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(200, 16, 46, 0.16);
  border-radius: 8px;
  background: #fff0f2;
}

.guide-note strong {
  color: var(--brand-dark);
}

.guide-note span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.guide-image-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7f7;
}

.guide-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.autocomplete-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
}

.autocomplete-option {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.autocomplete-option span {
  color: var(--muted);
  font-size: 12px;
}

.search-input {
  margin-bottom: 10px;
}

.history-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.detail-modal h4 {
  margin: 12px 0 6px;
}

.detail-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rider-detail-summary:not(.has-difference) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.submission-view-title h1 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
}

.submission-view-title p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.submission-priority-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.submission-priority-summary .metric {
  min-height: 68px;
}

.submission-priority-summary .metric.priority {
  min-height: 86px;
  background: #fff;
  border-color: rgba(200, 16, 46, 0.22);
}

.submission-priority-summary .metric.priority span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.submission-priority-summary .metric.priority strong {
  color: var(--brand-dark);
  font-size: 28px;
  line-height: 1;
}

.submission-priority-summary .to-pay-priority {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.08), #fff);
}

.admin-wallet-warning {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid #f4c77a;
  border-radius: 8px;
  background: #fff7e6;
}

.admin-wallet-warning strong,
.admin-wallet-warning span {
  display: block;
}

.admin-wallet-warning strong {
  color: var(--warn);
  font-size: 14px;
}

.admin-wallet-warning span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.official-rider-panel {
  display: grid;
  gap: 8px;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.submission-info-toggle {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.submission-info-toggle summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.submission-info-toggle summary::-webkit-details-marker {
  display: none;
}

.submission-info-toggle summary::after {
  content: "Show";
  color: var(--muted);
  font-size: 11px;
}

.submission-info-toggle[open] summary::after {
  content: "Hide";
}

.submission-info-toggle .detail-fields {
  margin: 0;
  padding: 0 8px 8px;
}

.detail-table td:nth-child(2) {
  text-align: center;
}

.detail-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 8px 0;
}

.detail-fields div,
.detail-note {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.detail-fields strong {
  display: block;
  margin-top: 3px;
}

.detail-fields .confirm-detail-box {
  display: grid;
  gap: 5px;
  padding: 9px;
}

.detail-fields .confirm-detail-box div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.detail-fields .confirm-detail-box div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-fields .confirm-detail-box strong {
  margin-top: 0;
  text-align: right;
}

.detail-note {
  color: var(--muted);
  font-size: 13px;
}

.compact-notes {
  margin-top: 8px;
}

.note-modal-field {
  display: grid;
  gap: 7px;
  margin-top: 0;
}

.note-modal-field select,
.note-modal-field textarea {
  width: 100%;
}

.compact-notes textarea {
  min-height: 48px;
}

.sticky-save {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr minmax(108px, 0.38fr);
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.sticky-save div {
  min-height: 44px;
  display: grid;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--panel-soft);
  font-weight: 800;
}

.sticky-save .good {
  color: var(--good);
}

.sticky-save .bad {
  color: var(--bad);
}

.sticky-save .warn {
  color: var(--warn);
}

.customer-home {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.customer-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .grid.two,
  .form-grid,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .active-batch {
    grid-template-columns: 1fr;
  }

  .admin-staff-notice,
  .staff-tools,
  .staff-attachment-panel,
  .attachment-head,
  .attachment-upload-row {
    grid-template-columns: 1fr;
  }

  .staff-ready-row {
    grid-template-columns: 1fr;
  }

  .active-batch .batch-total {
    text-align: left;
  }

  .report-card {
    padding: 26px 18px 22px;
  }

  .report-date {
    font-size: 17px;
  }

  .report-hero {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .report-group {
    min-height: 88px;
    font-size: 44px;
  }

  .report-total strong {
    font-size: 38px;
  }

  .report-table {
    margin-top: 32px;
    font-size: 18px;
  }

  .digital-row,
  .settings-row,
  .note-template-row {
    grid-template-columns: 1fr;
  }

  .settings-section-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-section-button {
    min-height: 50px;
    padding: 8px;
  }

  .account-actions {
    grid-template-columns: 1fr 1fr;
  }

  .account-actions select {
    grid-column: 1 / -1;
  }

  tr.digital-row {
    display: table-row;
  }

  .compact-fields {
    grid-template-columns: 1fr 1fr;
  }

  .admin-new-form .compact-fields {
    grid-template-columns: minmax(0, 1fr) minmax(82px, 0.45fr);
    gap: 6px;
  }

  .customer-primary-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .notebook-button {
    grid-column: 1 / -1;
  }

  .remit-entry-row {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.52fr);
  }

  .compact-fields .customer-field {
    grid-column: 1 / -1;
  }

  .admin-new-form .admin-include-fee-row {
    min-height: 36px;
  }

  .customer-admin-fields {
    grid-template-columns: 1fr;
  }

  .compact-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-save {
    grid-template-columns: 1fr 112px;
  }

  .admin-pay-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .admin-pay-summary div {
    min-height: 46px;
    padding: 7px 8px;
  }

  .admin-pay-summary strong {
    font-size: 14px;
  }

  .admin-new-form .counter-sticky-status {
    margin: 5px 0;
  }

  .admin-new-form .counter-sticky-status div {
    min-height: 50px;
    padding: 6px 5px;
  }

  .admin-new-form .counter-sticky-status strong {
    font-size: 16px;
  }

  .admin-new-form .compact-money th,
  .admin-new-form .compact-money td {
    padding: 4px 5px;
  }

  .admin-new-form .compact-money input,
  .admin-new-form .compact-money select {
    min-height: 31px;
    padding: 4px 6px;
  }

  .topbar-inner {
    gap: 5px;
    padding: 6px 7px;
  }

  .admin-compact-header {
    gap: 5px 7px;
    padding: 6px 7px;
  }

  .admin-title-block > strong,
  .admin-compact-total > strong {
    font-size: 16px;
  }

  .admin-compact-header {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .admin-menu-button {
    width: 36px;
    min-height: 36px;
  }

  .admin-title-block > span {
    font-size: 10px;
  }

  .admin-header-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    gap: 4px;
  }

  .admin-header-actions .mini-button {
    min-height: 28px;
    padding: 4px 5px;
    font-size: 10px;
  }

  .admin-home-hero,
  .admin-home-grid {
    grid-template-columns: 1fr;
  }

  .admin-finance-presence-row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    min-height: 36px;
    padding: 5px 7px;
  }

  .admin-finance-presence-row em {
    grid-column: 3;
    max-width: 104px;
    text-align: right;
  }

  .admin-rider-activity .section-title p {
    display: none;
  }

  .admin-rider-activity .rider-activity-summary {
    gap: 4px;
  }

  .admin-rider-activity .rider-activity-summary .metric {
    min-height: 48px;
    padding: 6px;
  }

  .admin-rider-activity .rider-activity-summary .metric span {
    font-size: 9px;
  }

  .admin-rider-activity .rider-activity-summary .metric strong {
    font-size: 17px;
  }

  .admin-home-hero {
    align-items: start;
    padding: 14px;
  }

  .admin-home-hero > strong {
    font-size: 34px;
  }

  .admin-home-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-home-actions button {
    min-height: 42px;
    padding: 8px;
  }

  .admin-locked-batch-row,
  .admin-batch-activity-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .admin-locked-batch-row .row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .admin-batch-activity-row > span:last-child {
    text-align: left;
  }

  .admin-action-result-details {
    grid-template-columns: 1fr;
  }

  .admin-status-grid {
    gap: 6px;
  }

  .admin-status-card {
    min-height: 68px;
    padding: 8px;
  }

  .admin-batch-line {
    padding: 5px 7px;
    font-size: 10px;
  }

  .compact-form {
    padding: 10px;
  }

  .compact-title {
    margin-bottom: 8px;
  }

  .compact-topline {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .compact-actions {
    display: grid;
    grid-template-columns: minmax(74px, 112px);
    justify-content: end;
    width: 100%;
    align-items: stretch;
  }

  .option-theme-picker {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
  }

  .option-theme-picker select,
  .compact-toggle {
    width: 100%;
    min-width: 0;
  }

  .customer-title-actions {
    align-items: end;
    grid-template-columns: repeat(4, minmax(48px, auto));
    gap: 4px;
  }

  .customer-title-actions .settings-button {
    min-height: 34px;
    padding: 5px 5px;
    font-size: 10px;
  }

  .rider-home-actions {
    gap: 6px;
  }

  .rider-action-card {
    min-height: 58px;
    padding: 8px;
  }

  .customer-home[data-flow-mode="home"] .rider-home-actions {
    grid-template-columns: 1fr;
  }

  .customer-home:not([data-flow-mode="home"]) .rider-home-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .customer-recent-card {
    grid-template-columns: 1fr;
  }

  .active-batch {
    padding: 10px;
  }

  .tabs {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: initial;
    gap: 5px;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .tab {
    min-height: 34px;
    padding: 5px 6px;
    font-size: 12px;
    white-space: normal;
  }

  .submission-row-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .submission-row-card .list-title {
    min-width: 0;
  }

  .submission-row-card .list-title strong,
  .submission-row-card .list-title span {
    overflow-wrap: anywhere;
  }

  .submission-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .submission-actions .badge {
    grid-column: 1 / -1;
  }

  .submission-actions button {
    min-height: 38px;
    padding: 6px 7px;
  }

  main {
    padding: 10px 8px 28px;
  }

  .history-filters {
    grid-template-columns: 1fr 1fr;
  }

  .filter-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    gap: 6px;
  }

  .filter-pill {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .move-grid,
  .correction-fields {
    grid-template-columns: 1fr;
  }

  .history-filters input:last-of-type,
  .history-filters select:last-child {
    grid-column: span 1;
  }

  .counter-sticky-status strong {
    font-size: 20px;
  }

  .submit-panel {
    grid-template-columns: 1fr;
  }

  .counter-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .counter-head div {
    width: auto;
    max-width: none;
    grid-template-columns: auto;
  }

  .reset-counter-small {
    min-width: 0;
    padding-inline: 8px;
  }

  .short-action {
    grid-template-columns: 1fr;
  }

  .customer-home[data-flow-mode="mixed"] .main-wallet-table td:nth-child(2) {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .customer-home[data-flow-mode="mixed"] .main-wallet-table input {
    max-width: 168px;
    justify-self: end;
  }

  .detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rider-flow-hint {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .rider-flow-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-modal {
    padding: 12px;
  }

  .guide-image-wrap {
    max-height: 70vh;
  }

  .admin-alert-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-alert-actions button {
    flex: 1 1 118px;
  }

  .alert-history-row {
    grid-template-columns: 1fr;
  }

  .discount-rider-add {
    grid-template-columns: 1fr;
  }

  .admin-rider-tool-grid {
    grid-template-columns: 1fr;
  }

  .admin-rider-row {
    grid-template-columns: 1fr;
  }

  .admin-rider-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-rider-detail-fields {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 860px) {
  .staff-chat-controls {
    grid-template-columns: minmax(160px, 1fr) minmax(140px, 1fr);
  }

  .staff-message-meta-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .staff-inline-chat-panel .staff-message-toolbar {
    grid-template-columns: minmax(0, 1.15fr) minmax(126px, 0.85fr);
    align-items: stretch;
  }

  .staff-inline-chat-panel .staff-message-tabs button {
    min-height: 30px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .staff-inline-chat-panel .staff-message-meta-row select {
    min-height: 30px;
    padding: 4px 24px 4px 7px;
    font-size: 10px;
  }

  .staff-inline-chat-panel .staff-message-meta-row .float-field > span {
    display: none;
  }

  .staff-inline-chat-panel .staff-chat-filter-summary {
    font-size: 9px;
  }

  main.staff-shell {
    max-width: 1200px;
  }

  .staff-desktop-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
    align-items: start;
  }

  .staff-inline-chat-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    max-height: calc(100dvh - 108px);
    overflow: hidden;
  }

  .staff-inline-chat-panel #staffChatHistoryBox {
    min-height: 0;
    display: grid;
    overflow: hidden;
  }

  .staff-inline-chat-panel .staff-message-panel {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .staff-inline-chat-panel .staff-chat-primary .chat-thread,
  .staff-inline-chat-panel .staff-rider-updates-tab .chat-thread {
    height: 100%;
    min-height: 0;
  }

  .staff-activity-mobile {
    display: none;
  }

  .staff-activity-side {
    display: grid;
  }

  .staff-chat-split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .no-print,
  .toast {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .report-card {
    width: 100%;
    border: 0;
    box-shadow: none;
  }
}

/* v1.7.46 Rider home and GCash flow */
.customer-home[data-flow-mode="home"] .rider-compact-flow-header,
.customer-home[data-flow-mode="home"] .rider-flow-hint {
  display: none !important;
}

.customer-home:not([data-flow-mode="home"]) > .compact-title,
.customer-home:not([data-flow-mode="home"]) .rider-home-actions {
  display: none !important;
}

.rider-compact-flow-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.rider-current-flow {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.rider-current-flow strong,
.rider-current-flow span {
  display: block;
}

.rider-current-flow strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
}

.rider-current-flow span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.rider-current-flow-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.rider-current-flow-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.rider-current-flow-icon.cash::before,
.counter-home-icon::before {
  content: "P";
  width: 24px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid #147a3d;
  border-radius: 4px;
  background: #fff;
  color: #147a3d;
  font-size: 11px;
  font-weight: 900;
}

.counter-home-icon::before {
  content: "123";
  width: 25px;
  height: 23px;
  border-color: var(--brand-dark);
  color: var(--brand-dark);
  font-size: 9px;
}

.rider-current-flow-icon.mixed {
  grid-template-columns: auto auto;
  gap: 2px;
}

.rider-current-flow-icon.mixed .cash-home-icon::before {
  width: 17px;
  height: 13px;
  font-size: 8px;
}

.rider-current-flow-icon.mixed img {
  width: 19px;
  height: 19px;
}

.customer-home[data-flow-mode="gcash"] .rider-compact-flow-header {
  border-color: rgba(11, 131, 255, 0.28);
  box-shadow: inset 3px 0 #0b83ff;
}

.customer-home[data-flow-mode="cash"] .rider-compact-flow-header {
  border-color: rgba(20, 122, 61, 0.28);
  box-shadow: inset 3px 0 #147a3d;
}

.customer-home[data-flow-mode="mixed"] .rider-compact-flow-header {
  border-color: rgba(17, 129, 111, 0.28);
  box-shadow: inset 3px 0 #12816f;
}

.customer-home:not([data-flow-mode="home"]) .rider-flow-hint {
  display: block;
  margin: 0 0 7px;
  padding: 7px 9px;
  font-size: 11px;
}

.customer-title-actions {
  grid-template-columns: repeat(3, auto);
}

.customer-recent-card {
  position: relative;
  justify-items: stretch;
  gap: 5px;
  padding: 9px 10px;
  border-color: rgba(200, 16, 46, 0.16);
  border-left: 4px solid var(--brand);
  background: #fff;
  text-align: left;
}

.home-recent-head,
.home-recent-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.home-recent-head > strong {
  color: var(--ink);
  font-size: 13px;
}

.home-recent-main > strong {
  color: var(--brand-dark);
  font-size: 22px;
  line-height: 1;
}

.home-recent-main > span,
.home-recent-meta > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.home-recent-main > span {
  text-align: right;
}

.home-recent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
}

.home-recent-meta .good {
  color: var(--good);
}

.home-recent-meta .warn {
  color: var(--warn);
}

.home-recent-detail {
  justify-self: end;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 10px;
}

.rider-home-actions .rider-action-card {
  min-height: 58px;
}

.remit-fee-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(108px, 0.8fr);
}

.customer-home[data-flow-mode="gcash"] .main-wallet-section {
  gap: 7px;
  margin-top: 5px;
}

.gcash-to-pay-card {
  gap: 4px;
  padding: 11px 12px;
  border-color: rgba(11, 131, 255, 0.25);
  background: rgba(11, 131, 255, 0.05);
}

.gcash-to-pay-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.copy-gcash-amount {
  min-height: 28px;
  padding: 4px 9px;
  color: #0756bc;
  font-size: 10px;
}

.gcash-to-pay-card strong {
  color: #0756bc;
  font-size: 30px;
  user-select: all;
}

#gcashToPayInstruction {
  color: var(--ink);
}

.gcash-proof-panel {
  gap: 7px;
  padding: 9px;
}

.proof-panel-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.proof-panel-title strong,
.proof-panel-title span {
  display: block;
}

.proof-panel-title strong {
  color: var(--ink);
  font-size: 13px;
}

.proof-panel-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.proof-thumbnail {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: var(--panel-soft);
}

.proof-upload-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.proof-file-button {
  min-height: 40px;
  border-color: rgba(11, 131, 255, 0.24);
  background: rgba(11, 131, 255, 0.06);
  color: #0756bc;
}

.proof-upload-status {
  padding: 7px 9px;
}

.gcash-readiness {
  padding: 7px 9px;
  border: 1px solid rgba(176, 122, 0, 0.2);
  border-radius: 7px;
  background: #fff7e6;
  color: var(--warn);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.gcash-readiness.good {
  border-color: rgba(20, 122, 61, 0.2);
  background: rgba(20, 122, 61, 0.07);
  color: var(--good);
}

.customer-home[data-flow-mode="gcash"] #customerSubmitStatus:not(.bad):not(.warn) {
  display: none;
}

.confirm-rider-identity {
  margin-top: 6px;
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--panel-soft);
}

.confirm-rider-identity strong,
.confirm-rider-identity span {
  display: block;
}

.confirm-rider-identity strong {
  color: var(--ink);
  font-size: 13px;
}

.confirm-rider-identity span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.gcash-confirm-fields {
  display: block;
}

.gcash-confirm-details {
  display: grid;
  gap: 0;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  background: #fff !important;
}

.gcash-confirm-details > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.gcash-confirm-details > div:last-child {
  border-bottom: 0;
}

.gcash-confirm-details strong {
  max-width: 240px;
  text-align: right;
  overflow-wrap: anywhere;
}

.gcash-submit-confirm .row-actions {
  grid-template-columns: minmax(92px, 0.4fr) minmax(0, 1fr);
}

.gcash-submit-confirm .confirm-submit-wide {
  width: 100%;
  min-width: 0;
}

.submission-progress-modal {
  justify-items: center;
  gap: 8px;
  max-width: 330px;
  text-align: center;
}

.submission-progress-modal h1,
.submission-progress-modal p {
  margin: 0;
}

.submission-progress-modal p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.submission-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(200, 16, 46, 0.16);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: submissionSpin 0.8s linear infinite;
}

@keyframes submissionSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
  .customer-home > .compact-title {
    align-items: start;
  }

  .customer-home > .compact-title h1 {
    font-size: 17px;
    line-height: 1.1;
  }

  .customer-title-actions {
    grid-template-columns: repeat(3, minmax(48px, auto));
  }

  .customer-title-actions .settings-button {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .rider-home-actions {
    gap: 7px;
  }

  .rider-action-card {
    padding: 9px 11px;
  }

  .rider-compact-flow-header {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 5px;
  }

  .rider-compact-flow-header > button {
    min-width: 0;
    padding: 5px 6px;
    font-size: 10px;
  }

  .remit-fee-grid {
    gap: 6px;
  }

  .remit-fee-grid .float-field span {
    font-size: 9px;
  }

  .proof-upload-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .proof-upload-row .mini-button {
    min-width: 0;
    padding: 5px 7px;
    font-size: 10px;
  }

  .gcash-submit-confirm {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-attention,
  .proof-attention,
  .status-attention,
  .submission-spinner {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* v1.7.47 Rider pending-remit guard */
.rider-back-home {
  min-height: 40px;
  padding: 6px 10px;
  border: 2px solid var(--brand);
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
  white-space: nowrap;
}

.customer-home[data-pending-guard="true"] .rider-flow-hint,
.customer-home[data-pending-guard="true"] .customer-primary-fields,
.customer-home[data-pending-guard="true"] .remit-fee-grid,
.customer-home[data-pending-guard="true"] .include-fee-row,
.customer-home[data-pending-guard="true"] .customer-fee-line,
.customer-home[data-pending-guard="true"] .main-wallet-section,
.customer-home[data-pending-guard="true"] .counter-head,
.customer-home[data-pending-guard="true"] .counter-sticky-status,
.customer-home[data-pending-guard="true"] > .money-table,
.customer-home[data-pending-guard="true"] #counterModeActions,
.customer-home[data-pending-guard="true"] #fastSubmitSlot,
.customer-home[data-pending-guard="true"] #bottomSubmitSlot,
.customer-home[data-pending-guard="true"] #customerSubmitBlock,
.customer-home[data-pending-guard="true"] #openCurrentFlowGuide {
  display: none !important;
}

.customer-home[data-pending-guard="true"] .rider-compact-flow-header {
  grid-template-columns: auto minmax(0, 1fr);
  position: sticky;
  top: 4px;
  z-index: 12;
}

.pending-remit-guard {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(200, 16, 46, 0.22);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
}

.pending-guard-head,
.pending-guard-summary,
.pending-guard-actions {
  display: grid;
  gap: 9px;
  align-items: center;
}

.pending-guard-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pending-guard-head span,
.pending-guard-summary span,
.pending-guard-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.pending-guard-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
}

.pending-guard-message {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.pending-guard-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pending-guard-summary > div:last-child {
  min-width: 92px;
  text-align: right;
}

.pending-guard-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
}

.pending-guard-amount strong {
  color: var(--brand-dark);
  font-size: 29px;
}

.pending-guard-meta {
  display: grid;
  gap: 4px;
}

.pending-guard-meta .good { color: var(--good); }
.pending-guard-meta .warn { color: var(--warn); }
.pending-guard-meta .bad { color: var(--bad); }

.pending-guard-actions {
  grid-template-columns: minmax(108px, 0.55fr) minmax(0, 1fr);
}

.pending-guard-actions button {
  min-height: 44px;
}

.pending-guard-actions button:disabled {
  background: #ded8d8;
  color: #746d6d;
  cursor: not-allowed;
}

.active-edit-status {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border-left: 3px solid var(--warn);
  background: #fff7e6;
  text-align: left;
}

.active-edit-status strong,
.active-edit-status span {
  display: block;
}

.active-edit-status strong {
  color: var(--ink);
  font-size: 12px;
}

.active-edit-status span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 520px) {
  .rider-compact-flow-header {
    grid-template-columns: 104px minmax(0, 1fr) 48px;
  }

  .rider-back-home {
    min-height: 42px;
    padding: 6px 8px !important;
    font-size: 11px !important;
  }

  .pending-remit-guard {
    padding: 11px;
  }

  .pending-guard-amount strong {
    font-size: 26px;
  }
}
