:root {
  color-scheme: light;
  --ink: #1c232b;
  --muted: #66717d;
  --line: #d5dce3;
  --line-strong: #b9c3cc;
  --canvas: #edf1f4;
  --surface: #ffffff;
  --header: #10141b;
  --header-soft: #242a33;
  --epos: #e66f76;
  --blue: #1769aa;
  --blue-dark: #104f82;
  --green: #21754a;
  --green-soft: #e8f5ed;
  --amber: #8b5c00;
  --amber-soft: #fff5da;
  --red: #a8323b;
  --red-soft: #fff0f1;
  --shadow: 0 9px 24px rgba(25, 35, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
p,
ul {
  margin: 0;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 800;
  white-space: nowrap;
}

.wordmark strong {
  color: var(--epos);
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button.primary {
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  border-color: var(--line-strong);
  background: #ffffff;
}

.button.secondary:hover {
  background: #f4f6f8;
}

.button.full {
  width: 100%;
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(23, 105, 170, 0.28);
  outline-offset: 2px;
}

.eyebrow {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid;
  border-left-width: 5px;
  border-radius: 4px;
  font-weight: 700;
}

.alert.success {
  border-color: #8fc4a4;
  background: var(--green-soft);
  color: #185d38;
}

.alert.error {
  border-color: #e0a3a8;
  background: var(--red-soft);
  color: #81272e;
}

/* Authentication */
.auth-page {
  display: grid;
  grid-template-rows: 70px 1fr;
  background: var(--canvas);
}

.auth-header {
  display: flex;
  align-items: center;
  padding: 0 32px;
  border-bottom: 3px solid var(--epos);
  background: var(--header);
}

.auth-help-link {
  margin-left: auto;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.auth-help-link:hover {
  color: var(--epos);
}

.auth-main {
  display: grid;
  place-items: start center;
  padding: 72px 18px 48px;
}

.auth-panel {
  width: min(100%, 460px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-heading {
  margin-bottom: 24px;
}

.auth-heading h1 {
  margin: 5px 0 7px;
  font-size: 30px;
  line-height: 1.15;
}

.auth-heading > p:last-child {
  color: var(--muted);
  line-height: 1.45;
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.auth-form label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.auth-form input {
  width: 100%;
  min-height: 45px;
  padding: 9px 11px;
  border: 1px solid #aab5bf;
  border-radius: 4px;
  background: #ffffff;
}

.auth-link {
  display: block;
  margin-top: 20px;
  color: var(--blue-dark);
  font-weight: 700;
  text-align: center;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Application shell */
.app-header {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 32px;
  padding: 12px 30px 0;
  border-bottom: 3px solid var(--epos);
  background: var(--header);
}

.app-header .wordmark {
  align-self: center;
  padding-bottom: 9px;
}

.main-nav {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.main-nav a {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  padding: 9px 16px 8px;
  border-bottom: 4px solid transparent;
  color: #c9d0d7;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav a:hover {
  color: #ffffff;
}

.main-nav a[aria-current="page"] {
  border-bottom-color: #ffffff;
  color: #ffffff;
}

.account-actions {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 9px;
}

.account-email {
  max-width: 260px;
  overflow: hidden;
  color: #d6dbe0;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions form {
  margin: 0;
}

.admin-account-badge {
  padding: 4px 7px;
  border: 1px solid #64717d;
  border-radius: 3px;
  color: var(--epos);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.header-button {
  min-height: 36px;
  border-color: #555f69;
  background: var(--header-soft);
  color: #ffffff;
}

.admin-context-bar {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(220px, 320px) minmax(340px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 10px 30px 12px;
  border-bottom: 1px solid #b7c5d0;
  background: #dfe8ef;
}

.admin-context-heading {
  align-self: center;
  display: grid;
  gap: 3px;
}

.admin-context-heading strong {
  color: var(--blue-dark);
  font-size: 13px;
}

.admin-context-heading span {
  max-width: 280px;
  overflow: hidden;
  color: #4f5f6c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-customer-search,
.admin-context-bar form label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-customer-search > span,
.admin-context-bar form label > span {
  color: #50616e;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-customer-search input,
.admin-context-bar select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid #9dacb8;
  border-radius: 3px;
  background: #ffffff;
}

.admin-context-bar form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 9px;
  margin: 0;
}

.admin-open-customer {
  min-height: 38px;
  background: var(--blue);
  color: #ffffff;
  white-space: nowrap;
}

.admin-open-customer:hover {
  background: var(--blue-dark);
}

.admin-customer-result {
  align-self: center;
  color: #5e6d78;
  font-size: 11px;
  white-space: nowrap;
}

.site-context-bar {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 30px;
  border-bottom: 1px solid #c8d3dc;
  background: #eef3f6;
}

.site-context-heading {
  min-width: 190px;
  display: grid;
  gap: 2px;
}

.site-context-heading strong {
  color: var(--blue-dark);
  font-size: 13px;
}

.site-context-heading span {
  color: #5d6b76;
  font-size: 12px;
}

.site-context-bar form {
  min-width: min(520px, 100%);
  display: flex;
  align-items: end;
  gap: 9px;
  margin: 0;
}

.site-context-bar label {
  min-width: 240px;
  display: grid;
  gap: 4px;
}

.site-context-bar label > span {
  color: #50616e;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.site-context-bar select {
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid #9dacb8;
  border-radius: 3px;
  background: #ffffff;
}

.site-context-all {
  margin-left: auto;
  white-space: nowrap;
}

.site-context-access {
  color: #5d6b76;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}

.business-users-intro,
.business-sites-intro,
.business-user-create,
.business-site-create,
.business-device-assignment {
  margin-bottom: 18px;
}

.business-user-list,
.business-site-list {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.business-user-card.is-owner {
  border-color: #91b7cf;
  background: #f5faff;
}

.business-user-form,
.business-site-form,
.business-device-form {
  display: grid;
  gap: 16px;
}

.business-user-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.business-user-form legend {
  padding: 0 6px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.business-user-email,
.business-site-fields label,
.business-site-create form > label {
  display: grid;
  gap: 5px;
}

.business-user-email > span,
.business-site-fields label > span,
.business-site-create form > label > span {
  color: #4e5d68;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.business-user-email input,
.business-user-site-grid select,
.business-site-fields input,
.business-site-fields select,
.business-site-create input,
.business-site-create select,
.business-device-list select {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #aeb9c2;
  border-radius: 3px;
  background: #ffffff;
}

.business-user-email small {
  color: #687680;
}

.business-user-site-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

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

.business-user-site-grid label {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 180px);
  align-items: center;
  gap: 10px;
}

.business-user-permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.business-user-actions,
.business-user-reset-form,
.business-user-remove-form {
  display: flex;
  justify-content: flex-end;
}

.business-user-reset-form,
.business-user-remove-form {
  margin-top: 10px;
}

.business-user-remove-form {
  align-items: center;
  gap: 10px;
}

.business-user-remove-form small {
  max-width: 360px;
  color: var(--muted);
}

.business-site-card.is-inactive {
  border-style: dashed;
  background: #f7f8f9;
}

.business-site-status,
.business-site-state-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.business-site-state-form {
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.business-site-state-form > div {
  display: grid;
  gap: 3px;
}

.business-site-state-form small {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.4;
}

.restricted-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

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

.business-device-list > label {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 280px);
  align-items: center;
  gap: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f8fafb;
}

.business-device-list > label > span {
  display: grid;
  gap: 2px;
}

.business-device-list small {
  color: #697681;
}

.site-scope-notice {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  border-color: #9ebdce;
  background: #f3f9fc;
}

.site-scope-notice strong {
  color: var(--blue-dark);
}

.site-scope-notice span,
.page-site-caption {
  color: #62717c;
  font-size: 12px;
}

.header-button:hover {
  background: #303844;
}

.app-main {
  width: min(100%, 1660px);
  min-height: calc(100vh - 118px);
  margin: 0 auto;
  padding: 27px 30px 44px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 21px;
}

.page-heading h1 {
  margin-top: 3px;
  font-size: 30px;
  line-height: 1.15;
}

.refresh-status {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.refresh-status.refresh-error {
  color: var(--amber);
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.filter-bar label {
  display: grid;
  gap: 5px;
  color: #48545f;
  font-size: 12px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  min-width: 150px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
}

.filter-bar .till-filter {
  min-width: 220px;
}

.filter-bar .till-filter select {
  width: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stats article {
  min-width: 0;
  min-height: 106px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 5px 15px rgba(25, 35, 45, 0.05);
}

.stats article:nth-child(2) {
  border-top-color: var(--green);
}

.stats article:nth-child(3) {
  border-top-color: #6c5d9c;
}

.stats article:nth-child(4) {
  border-top-color: var(--epos);
}

.stats span {
  color: #52606c;
  font-size: 13px;
  font-weight: 700;
}

.stats strong {
  max-width: 100%;
  overflow: hidden;
  color: #1f2b35;
  font-size: 29px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.negative-balance {
  color: var(--red) !important;
}

.hourly-chart .hour-bar.is-negative {
  background: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 16px;
}

.dashboard-card {
  min-width: 0;
  grid-column: span 12;
}

.dashboard-card.sales-chart-panel {
  grid-column: span 8;
}

.dashboard-card.till-summary {
  grid-column: span 4;
}

.dashboard-card.dragging {
  border-color: var(--blue);
  opacity: 0.55;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 5px 15px rgba(25, 35, 45, 0.05);
}

.panel-heading {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  font-size: 17px;
  line-height: 1.2;
}

.panel-heading > span,
.panel-heading > a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-actions > span,
.panel-actions > a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel-actions > a {
  color: var(--blue-dark);
}

.drag-handle {
  min-width: 48px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #f5f7f8;
  color: #56616b;
  cursor: grab;
  font-size: 11px;
  font-weight: 800;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px 0;
}

.summary-stats article {
  min-width: 0;
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-right: 1px solid var(--line);
}

.summary-stats article:last-child {
  border-right: 0;
}

.summary-stats span {
  color: #52606c;
  font-size: 13px;
  font-weight: 700;
}

.summary-stats strong {
  max-width: 100%;
  overflow: hidden;
  color: #1f2b35;
  font-size: 27px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-heading > a {
  color: var(--blue-dark);
}

.hourly-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(24, minmax(6px, 1fr));
  align-items: end;
  gap: 5px;
  padding: 22px 18px 13px;
}

.hour-column {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr 17px;
  align-items: end;
  gap: 5px;
}

.hour-column > span {
  color: #7b8791;
  font-size: 10px;
  text-align: center;
}

.hour-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--blue);
}

.hour-bar.level-0 { height: 2px; background: #dce3e8; }
.hour-bar.level-1 { height: 5%; }
.hour-bar.level-2 { height: 10%; }
.hour-bar.level-3 { height: 15%; }
.hour-bar.level-4 { height: 20%; }
.hour-bar.level-5 { height: 25%; }
.hour-bar.level-6 { height: 30%; }
.hour-bar.level-7 { height: 35%; }
.hour-bar.level-8 { height: 40%; }
.hour-bar.level-9 { height: 45%; }
.hour-bar.level-10 { height: 50%; }
.hour-bar.level-11 { height: 55%; }
.hour-bar.level-12 { height: 60%; }
.hour-bar.level-13 { height: 65%; }
.hour-bar.level-14 { height: 70%; }
.hour-bar.level-15 { height: 75%; }
.hour-bar.level-16 { height: 80%; }
.hour-bar.level-17 { height: 85%; }
.hour-bar.level-18 { height: 90%; }
.hour-bar.level-19 { height: 95%; }
.hour-bar.level-20 { height: 100%; }

.till-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 18px 17px 12px;
}

.till-count strong {
  color: var(--green);
  font-size: 32px;
}

.till-count span {
  color: var(--muted);
  font-weight: 700;
}

.latest-client-versions {
  min-height: 36px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 14px;
  padding: 8px 17px;
  border-bottom: 1px solid #e5e9ed;
  background: #f5f8fa;
  font-size: 11px;
}

.latest-client-versions > span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.latest-client-versions > strong {
  color: var(--blue-dark);
  white-space: nowrap;
}

.latest-client-versions-wide {
  justify-content: flex-end;
}

.compact-till-list {
  list-style: none;
  padding: 0 17px 15px;
}

.compact-till-list li {
  min-height: 52px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #e5e9ed;
  font-size: 13px;
}

.compact-till-name {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.compact-till-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.compact-till-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-till-title > .compact-client-version {
  flex: 0 0 auto;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-till-name > span,
.compact-till-name > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-till-name > small {
  color: var(--muted);
  font-size: 10px;
}

.compact-till-name > .compact-printer-state {
  font-weight: 800;
}

.compact-printer-state.positive {
  color: #175c37;
}

.compact-printer-state.attention {
  color: #755000;
}

.compact-printer-state.negative {
  color: #84272f;
}

.compact-till-list li strong {
  color: var(--muted);
  font-size: 11px;
}

.state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8a949d;
}

.state-dot.online {
  background: var(--green);
}

.table-panel {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line-strong);
  background: #f1f4f6;
  color: #4d5964;
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #e4e8eb;
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #f8fafb;
}

.data-table td > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.printer-health-cell {
  min-width: 190px;
  max-width: 330px;
}

.printer-health-cell > small {
  overflow-wrap: anywhere;
}

.money-cell {
  text-align: right !important;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #cbd2d8;
  border-radius: 4px;
  background: #f1f3f5;
  color: #4f5a63;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.positive {
  border-color: #95c7a8;
  background: var(--green-soft);
  color: #175c37;
}

.status-badge.attention {
  border-color: #dec88b;
  background: var(--amber-soft);
  color: #755000;
}

.status-badge.negative {
  border-color: #e2a4a9;
  background: var(--red-soft);
  color: #84272f;
}

.data-table td > .refund-reason {
  max-width: 220px;
  color: #84272f;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.data-table td > .refund-link {
  max-width: 260px;
  color: #344957;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}

.sale-details {
  min-width: 110px;
}

.sale-details summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.sale-details ul {
  min-width: 280px;
  list-style: none;
  padding: 8px 0 0;
}

.sale-details li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 0;
  border-top: 1px solid #e7eaed;
}

.sale-details li span {
  overflow-wrap: anywhere;
}

.sale-details li strong {
  white-space: nowrap;
}

.empty-row {
  padding: 28px 16px !important;
  color: var(--muted);
  text-align: center !important;
}

/* Settings */
.daily-report-email-panel {
  margin-bottom: 16px;
}

.daily-report-email-panel .panel-heading > div {
  display: grid;
  gap: 3px;
}

.daily-report-email-panel .panel-heading > div > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.daily-report-email-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.3fr) minmax(210px, 0.7fr);
  align-items: center;
  gap: 20px;
  padding: 16px 17px;
}

.daily-report-email-toggle {
  min-height: 72px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.daily-report-email-detail,
.daily-report-email-status {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.daily-report-email-detail > span,
.daily-report-email-status > span:first-child {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-report-email-detail > strong {
  overflow-wrap: anywhere;
}

.daily-report-email-detail p,
.daily-report-email-status small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.daily-report-email-status {
  justify-items: start;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.admin-replica-panel {
  margin-bottom: 16px;
  border-color: #9fb8ca;
}

.admin-replica-panel .panel-heading > div {
  display: grid;
  gap: 3px;
}

.admin-replica-panel .panel-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.admin-replica-content {
  display: grid;
  gap: 14px;
  padding: 16px 17px;
}

.admin-replica-intro,
.admin-replica-safety,
.admin-replica-empty {
  margin: 0;
  line-height: 1.5;
}

.admin-replica-intro {
  color: #364c5b;
}

.admin-replica-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.admin-replica-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.admin-replica-form label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-replica-form select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
}

.admin-replica-form .button {
  min-height: 40px;
  white-space: nowrap;
}

.admin-replica-safety {
  padding: 11px 12px;
  border-left: 3px solid #6f9bb8;
  background: #f1f6f9;
  color: var(--muted);
  font-size: 12px;
}

.admin-replica-empty {
  color: var(--negative);
  font-size: 12px;
  font-weight: 700;
}

.admin-workspace-panel {
  margin-bottom: 16px;
  border-color: #86a8c0;
}

.admin-workspace-panel .panel-heading > div,
.admin-workspace-content,
.admin-workspace-create label,
.admin-workspace-editor-picker label,
.admin-workspace-promote label {
  display: grid;
  gap: 6px;
}

.admin-workspace-panel .panel-heading span,
.admin-workspace-create label > span,
.admin-workspace-editor-picker label > span,
.admin-workspace-promote label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-workspace-content {
  gap: 14px;
  padding: 16px 17px;
}

.admin-workspace-intro,
.admin-workspace-safety,
.admin-workspace-empty {
  margin: 0;
  line-height: 1.5;
}

.admin-workspace-create,
.admin-workspace-editor-picker,
.admin-workspace-promote {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.admin-workspace-promote {
  grid-template-columns: repeat(2, minmax(190px, 1fr));
}

.admin-workspace-promote .button {
  justify-self: start;
}

.admin-workspace-create input,
.admin-workspace-editor-picker select,
.admin-workspace-promote input,
.admin-workspace-promote select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
}

.admin-workspace-promote select[multiple] {
  min-height: 94px;
}

.admin-workspace-safety {
  padding: 11px 12px;
  border-left: 3px solid #557f9d;
  background: #f1f6f9;
  color: var(--muted);
  font-size: 12px;
}

.admin-workspace-empty {
  color: var(--muted);
  font-weight: 700;
}

.configuration-workspace.is-staged-workspace [data-config-targets][hidden] {
  display: none !important;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.settings-fields {
  padding: 0 17px;
}

.number-setting,
.toggle-setting {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #e3e7ea;
}

.settings-fields > label:last-child {
  border-bottom: 0;
}

.number-setting > span:first-child,
.toggle-setting strong {
  font-weight: 800;
}

.toggle-setting > span:first-child {
  display: grid;
  gap: 4px;
}

.toggle-setting small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.number-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.number-control input {
  width: 100px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  text-align: right;
}

.toggle-setting input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.select-all input,
.target-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.target-panel {
  align-self: start;
  padding-bottom: 15px;
}

.target-list {
  max-height: 330px;
  overflow-y: auto;
  padding: 0 15px;
}

.target-list > label {
  min-height: 61px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e4e8eb;
  cursor: pointer;
}

.target-list > label > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.target-list > label strong,
.target-list > label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-list > label small {
  color: var(--muted);
  font-size: 11px;
}

.target-panel > .button {
  width: calc(100% - 30px);
  margin: 15px 15px 0;
}

.deployment-panel {
  margin-top: 0;
}

.retention-panel {
  margin-top: 16px;
  border-color: #d7aeb2;
}

.retention-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px;
}

.retention-content > div {
  max-width: 780px;
}

.retention-content p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.5;
}

.retention-content a {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.purge-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #b6bec5;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 60px rgb(18 27 34 / 28%);
}

.purge-dialog::backdrop {
  background: rgb(16 24 31 / 68%);
}

.purge-dialog form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.purge-dialog h2 {
  font-size: 21px;
}

.purge-dialog p {
  color: var(--muted);
  line-height: 1.5;
}

.purge-dialog .purge-warning {
  padding: 12px;
  border-left: 4px solid var(--red);
  background: var(--red-soft);
  color: #6f2028;
  font-weight: 800;
}

.purge-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.4;
}

.purge-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--red);
}

.purge-phrase {
  display: grid;
  gap: 7px;
  font-size: 12px;
}

.purge-phrase input {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
}

.purge-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.button.danger:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.configuration-workspace {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.configuration-source-bar {
  min-height: 76px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.configuration-source-bar label,
.record-toolbar label,
.layout-editor-toolbar label,
.configuration-field-grid label,
.layout-properties label {
  display: grid;
  gap: 6px;
}

.configuration-source-bar label > span,
.record-toolbar label > span,
.layout-editor-toolbar label > span,
.configuration-field-grid label > span:first-child,
.layout-properties label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.configuration-source-bar select,
.record-toolbar select,
.layout-editor-toolbar select,
.configuration-field-grid input,
.layout-properties input,
.layout-properties select {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff;
}

.configuration-source-bar select {
  min-width: 260px;
}

.configuration-message {
  min-width: 0;
  flex: 1;
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.configuration-message.positive {
  color: var(--green);
}

.configuration-message.attention {
  color: var(--amber);
}

.configuration-message.negative {
  color: var(--red);
}

.configuration-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #f4f6f8;
}

.configuration-tabs button {
  min-width: 125px;
  min-height: 46px;
  padding: 9px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.configuration-tabs button[aria-selected="true"] {
  border-bottom-color: var(--epos);
  background: #ffffff;
  color: var(--blue-dark);
}

.configuration-editor-body {
  min-height: 370px;
}

.configuration-pane {
  min-width: 0;
  padding: 18px;
}

.configuration-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.configuration-field-grid .number-control input {
  width: 100%;
}

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

.record-toolbar,
.layout-editor-toolbar,
.advanced-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.record-toolbar [data-config-record-count] {
  align-self: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.layout-selection-count {
  align-self: center;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.configuration-table-scroll {
  max-height: 580px;
  overflow: auto;
  border: 1px solid var(--line);
}

.configuration-data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.configuration-data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line-strong);
  background: #e8edf1;
  color: #46515b;
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.configuration-data-table td {
  padding: 5px;
  border-right: 1px solid #e4e8eb;
  border-bottom: 1px solid #e4e8eb;
  background: #ffffff;
}

.configuration-data-table tr:nth-child(even) td {
  background: #f8fafb;
}

.configuration-data-table input:not([type="checkbox"]):not([type="color"]) {
  width: 135px;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
}

.configuration-data-table select {
  width: 190px;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.configuration-data-table input[type="number"] {
  width: 92px;
}

.configuration-data-table input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--blue);
}

.configuration-data-table input[type="color"] {
  width: 43px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.configuration-data-table .modifier-picker-trigger {
  width: 170px;
  min-height: 34px;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid var(--blue);
  border-radius: 3px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.configuration-data-table .modifier-picker-trigger:hover,
.configuration-data-table .modifier-picker-trigger:focus-visible {
  background: #dcecf8;
  outline: 2px solid transparent;
}

.modifier-picker-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #b6bec5;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 18px 60px rgb(18 27 34 / 28%);
}

.modifier-picker-dialog::backdrop {
  background: rgb(16 24 31 / 68%);
}

.modifier-picker-shell {
  max-height: calc(100vh - 34px);
  display: grid;
  grid-template-rows: auto auto minmax(120px, 1fr) auto;
}

.modifier-picker-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modifier-picker-header h2 {
  font-size: 21px;
}

.modifier-picker-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.dialog-close-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modifier-picker-toolbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: #f4f6f8;
  font-size: 12px;
}

.modifier-picker-toolbar button {
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.modifier-picker-list {
  max-height: 480px;
  overflow-y: auto;
}

.modifier-picker-option {
  min-height: 58px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  border-bottom: 1px solid #e4e8eb;
  cursor: pointer;
}

.modifier-picker-option:hover {
  background: #f5f9fc;
}

.modifier-picker-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.modifier-picker-detail,
.modifier-picker-state {
  display: grid;
  gap: 3px;
}

.modifier-picker-detail small,
.modifier-picker-state small {
  color: var(--muted);
  font-size: 11px;
}

.modifier-picker-state {
  justify-items: end;
  text-align: right;
}

.modifier-picker-option.missing {
  background: var(--red-soft);
}

.modifier-picker-option.missing .modifier-picker-state {
  color: var(--red);
  font-weight: 800;
}

.modifier-picker-empty {
  padding: 30px 20px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.modifier-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #f8fafb;
}

.row-delete-button {
  width: 32px;
  height: 32px;
  border: 1px solid #d7aeb2;
  border-radius: 3px;
  background: var(--red-soft);
  color: var(--red);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.web-layout-editor {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) 250px;
  align-items: start;
  gap: 16px;
}

.web-layout-grid {
  --layout-columns: 16;
  --layout-rows: 10;
  width: 100%;
  aspect-ratio: 16 / 10;
  display: grid;
  grid-template-columns: repeat(var(--layout-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--layout-rows), minmax(0, 1fr));
  gap: 2px;
  padding: 4px;
  border: 1px solid #0b0e13;
  background: #12171f;
  overflow: hidden;
}

.layout-cell {
  min-width: 0;
  min-height: 0;
  border: 1px solid #3d4653;
  background: #1d2330;
}

.layout-cell.blocked {
  border-color: #050608;
  background: #050608;
}

.layout-button {
  z-index: 3;
  min-width: 0;
  min-height: 0;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  cursor: grab;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.layout-button.selected {
  outline: 3px solid #ffffff;
  outline-offset: -4px;
}

.layout-button.selection-anchor {
  box-shadow: inset 0 0 0 2px var(--epos);
}

.layout-button.dragging {
  opacity: 0.45 !important;
}

.layout-register-guide {
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid #353c46;
  background: #080a0e;
  color: #747c86;
  font-size: 12px;
  font-weight: 900;
  writing-mode: vertical-rl;
}

.layout-properties {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.layout-properties h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.layout-properties > p {
  color: var(--muted);
  font-size: 13px;
}

.layout-properties [data-layout-fields] {
  display: grid;
  gap: 11px;
}

.layout-properties [data-layout-fields][hidden] {
  display: none;
}

.compact-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.layout-properties input[type="color"] {
  width: 100%;
  padding: 3px;
}

.inline-check,
.identity-option {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.inline-check input,
.identity-option input {
  width: 19px;
  height: 19px;
  accent-color: var(--blue);
}

.button.danger {
  border-color: #d7aeb2;
  background: var(--red-soft);
  color: var(--red);
}

.advanced-toolbar {
  align-items: center;
  justify-content: space-between;
}

.advanced-toolbar p {
  color: var(--muted);
  font-size: 12px;
}

.configuration-json {
  width: 100%;
  min-height: 520px;
  resize: vertical;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #151a22;
  color: #f1f4f7;
  font: 12px/1.5 Consolas, "Courier New", monospace;
  tab-size: 2;
}

.configuration-targets {
  padding-bottom: 16px;
  border-top: 1px solid var(--line);
  background: #f8fafb;
}

.configuration-targets .target-list {
  max-height: 245px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.configuration-targets .identity-option {
  margin: 14px 17px;
}

.configuration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 17px;
}

/* Reports */
.report-filter {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.report-filter label:first-of-type select {
  min-width: 235px;
}

.report-filter [hidden] {
  display: none;
}

.report-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--epos);
  background: var(--surface);
}

.report-heading h2 {
  margin-top: 3px;
  font-size: 23px;
}

.report-heading > div:last-child {
  display: grid;
  gap: 3px;
  text-align: right;
}

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

.attendance-stats {
  grid-template-columns: repeat(2, minmax(0, 260px));
}

.report-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-stats article {
  min-height: 94px;
}

.report-stats article:nth-child(5) {
  border-top-color: #267c89;
}

.report-stats article:nth-child(6) {
  border-top-color: #d08a2e;
}

.report-stats article:nth-child(7) {
  border-top-color: #9b5d4d;
}

.report-stats article:nth-child(8) {
  border-top-color: #687480;
}

.report-note {
  margin-bottom: 16px;
  padding: 12px 15px;
  border-left: 4px solid var(--blue);
  background: #eaf2f8;
  color: #344957;
  font-size: 13px;
  line-height: 1.5;
}

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

.pie-layout {
  min-height: 235px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 20px;
}

.pie-figure {
  width: 180px;
  display: grid;
  justify-self: center;
  justify-items: center;
  gap: 10px;
}

.pie-chart {
  display: block;
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #dfe5e9;
  box-shadow: inset 0 0 0 1px rgba(16, 30, 41, 0.08);
}

.pie-slice {
  stroke: #ffffff;
  stroke-width: 0.45;
  stroke-linejoin: round;
}

.pie-empty {
  fill: #dfe5e9;
}

.pie-colour-1 { fill: #2f6f9f; background: #2f6f9f; }
.pie-colour-2 { fill: #d46f7d; background: #d46f7d; }
.pie-colour-3 { fill: #2f8a68; background: #2f8a68; }
.pie-colour-4 { fill: #d08a2e; background: #d08a2e; }
.pie-colour-5 { fill: #6c5d9c; background: #6c5d9c; }
.pie-colour-6 { fill: #267c89; background: #267c89; }
.pie-colour-7 { fill: #9b5d4d; background: #9b5d4d; }
.pie-colour-8 { fill: #687480; background: #687480; }

.pie-summary {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.pie-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.pie-legend {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 0;
  list-style: none;
}

.pie-legend li {
  min-width: 0;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #48545f;
  font-size: 12px;
}

.pie-legend i {
  width: 12px;
  height: 12px;
  display: block;
}

.pie-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pie-legend strong {
  color: var(--ink);
}

.wide-pie-panel .pie-layout {
  grid-template-columns: 210px minmax(0, 520px);
  justify-content: center;
}

.provider-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border-bottom: 1px solid var(--line);
}

.provider-check-grid > div {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px 17px;
  border-right: 1px solid var(--line);
}

.provider-check-grid > div:last-child {
  border-right: 0;
}

.provider-check-grid span,
.provider-check-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.provider-check-grid strong {
  color: var(--ink);
  font-size: 21px;
}

.provider-check-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 17px;
}

.provider-check-result p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.daily-chart,
.report-hourly-chart {
  min-width: 0;
  height: 270px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  align-items: end;
  gap: 7px;
  overflow-x: auto;
  padding: 22px 18px 14px;
}

.daily-column,
.report-hour-column {
  height: 100%;
  display: grid;
  grid-template-rows: 24px 1fr 18px 20px;
  align-items: end;
  gap: 5px;
}

.daily-column > strong,
.report-hour-column > strong {
  overflow: hidden;
  color: #5b6670;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-value-top {
  grid-row: 1;
}

.trend-value-negative {
  grid-row: 3;
  color: var(--red) !important;
}

.daily-column > span,
.report-hour-column > span {
  grid-row: 4;
  color: #65717c;
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
}

.daily-bar {
  grid-row: 2;
  width: 100%;
  min-height: 2px;
  background: var(--blue);
}

.daily-bar.level-0 { height: 2px; background: #dce3e8; }
.daily-bar.level-1 { height: 5%; }
.daily-bar.level-2 { height: 10%; }
.daily-bar.level-3 { height: 15%; }
.daily-bar.level-4 { height: 20%; }
.daily-bar.level-5 { height: 25%; }
.daily-bar.level-6 { height: 30%; }
.daily-bar.level-7 { height: 35%; }
.daily-bar.level-8 { height: 40%; }
.daily-bar.level-9 { height: 45%; }
.daily-bar.level-10 { height: 50%; }
.daily-bar.level-11 { height: 55%; }
.daily-bar.level-12 { height: 60%; }
.daily-bar.level-13 { height: 65%; }
.daily-bar.level-14 { height: 70%; }
.daily-bar.level-15 { height: 75%; }
.daily-bar.level-16 { height: 80%; }
.daily-bar.level-17 { height: 85%; }
.daily-bar.level-18 { height: 90%; }
.daily-bar.level-19 { height: 95%; }
.daily-bar.level-20 { height: 100%; }

.report-hourly-chart {
  grid-auto-columns: minmax(54px, 1fr);
}

.report-hourly-chart.compact-hourly-chart {
  grid-auto-columns: minmax(40px, 1fr);
  gap: 5px;
}

.report-hour-column .hour-bar {
  grid-row: 2;
  justify-self: stretch;
}

.daily-bar.is-negative,
.report-hour-column .hour-bar.is-negative {
  background: var(--epos);
}

.report-data-table {
  min-width: 850px;
}

.report-notes-cell {
  min-width: 210px;
  white-space: normal;
}

.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.report-panel {
  margin-bottom: 16px;
}

.data-table tfoot th {
  padding: 12px 13px;
  border-top: 2px solid var(--line-strong);
  background: #eef2f5;
  text-align: left;
}

.app-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 30px;
  border-top: 1px solid #cbd2d8;
  background: #dfe5e9;
  color: #5a6670;
  font-size: 12px;
}

@media (max-width: 1080px) {
  .app-header {
    grid-template-columns: auto 1fr;
    gap: 12px 24px;
    padding-top: 10px;
  }

  .app-header .wordmark {
    grid-column: 1;
  }

  .account-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-context-bar {
    grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
  }

  .admin-context-bar form {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-customer-result {
    grid-column: 3;
    grid-row: 1;
  }

  .site-context-bar {
    flex-wrap: wrap;
  }

  .site-context-all {
    margin-left: 0;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-card.sales-chart-panel,
  .dashboard-card.till-summary {
    grid-column: span 12;
  }

  .target-panel {
    align-self: stretch;
  }

  .configuration-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .web-layout-editor {
    grid-template-columns: 1fr;
  }

  .layout-properties {
    padding-top: 15px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .auth-header {
    padding: 0 20px;
  }

  .auth-main {
    padding-top: 42px;
  }

  .auth-panel {
    padding: 24px 20px;
  }

  .app-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .account-email {
    display: none;
  }

  .main-nav a {
    padding-right: 13px;
    padding-left: 13px;
  }

  .admin-context-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding-right: 14px;
    padding-left: 14px;
  }

  .admin-context-heading,
  .admin-customer-search,
  .admin-context-bar form,
  .admin-customer-result {
    grid-column: 1;
    grid-row: auto;
  }

  .admin-context-bar form {
    grid-template-columns: 1fr;
  }

  .admin-customer-result {
    justify-self: start;
  }

  .site-context-bar {
    align-items: stretch;
    padding-right: 14px;
    padding-left: 14px;
  }

  .site-context-heading,
  .site-context-bar form,
  .site-context-bar label,
  .site-context-all {
    width: 100%;
    min-width: 0;
  }

  .site-context-bar form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .business-user-site-grid,
  .business-user-permission-grid,
  .business-site-fields {
    grid-template-columns: 1fr;
  }

  .business-user-site-grid label,
  .business-device-list > label {
    grid-template-columns: 1fr;
  }

  .business-site-state-form,
  .business-user-remove-form {
    align-items: stretch;
    flex-direction: column;
  }

  .business-site-state-form .button,
  .business-user-remove-form .button {
    width: 100%;
  }

  .site-scope-notice {
    grid-template-columns: 1fr;
  }

  .app-main {
    padding: 21px 14px 34px;
  }

  .page-heading {
    align-items: start;
  }

  .page-heading h1 {
    font-size: 26px;
  }

  .refresh-status {
    max-width: 150px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar label,
  .filter-bar input,
  .filter-bar .till-filter {
    width: 100%;
    min-width: 0;
  }

  .filter-bar .till-filter {
    grid-column: 1 / -1;
  }

  .filter-bar .button {
    grid-column: 1 / -1;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .report-chart-grid {
    grid-template-columns: 1fr;
  }

  .summary-stats {
    grid-template-columns: 1fr 1fr;
  }

  .summary-stats article:nth-child(2) {
    border-right: 0;
  }

  .summary-stats article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .stats article {
    min-height: 94px;
    padding: 14px;
  }

  .stats strong {
    font-size: 24px;
  }

  .hourly-chart {
    gap: 2px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .settings-layout {
    min-width: 0;
  }

  .number-setting,
  .toggle-setting {
    min-height: 78px;
  }

  .configuration-source-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .configuration-source-bar label {
    flex: 1 1 100%;
  }

  .configuration-source-bar select {
    width: 100%;
    min-width: 0;
  }

  .configuration-source-bar .configuration-message {
    flex-basis: 100%;
  }

  .configuration-toggle-grid,
  .configuration-targets .target-list {
    grid-template-columns: 1fr;
  }

  .web-layout-editor {
    display: block;
  }

  .web-layout-grid {
    min-width: 540px;
  }

  .configuration-pane[data-config-pane="layout"] {
    overflow-x: auto;
  }

  .modifier-picker-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .modifier-picker-shell {
    max-height: calc(100vh - 22px);
  }

  .modifier-picker-header,
  .modifier-picker-option {
    padding-left: 14px;
    padding-right: 14px;
  }

  .retention-content {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-report-email-content {
    grid-template-columns: 1fr;
  }

  .daily-report-email-toggle {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .daily-report-email-status {
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .admin-replica-form {
    grid-template-columns: 1fr;
  }

  .admin-workspace-create,
  .admin-workspace-editor-picker,
  .admin-workspace-promote {
    grid-template-columns: 1fr;
  }

  .admin-replica-form .button {
    width: 100%;
  }

  .admin-workspace-create .button,
  .admin-workspace-editor-picker .button,
  .admin-workspace-promote .button {
    width: 100%;
  }

  .retention-content .button {
    width: 100%;
  }

  .purge-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .app-footer {
    display: grid;
    gap: 4px;
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 430px) {
  .wordmark {
    font-size: 21px;
  }

  .header-button {
    padding-right: 10px;
    padding-left: 10px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .summary-stats {
    grid-template-columns: 1fr;
  }

  .summary-stats article,
  .summary-stats article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-stats article:last-child {
    border-bottom: 0;
  }

  .stats article {
    min-height: 82px;
  }

  .panel-heading {
    align-items: start;
  }

  .pie-layout,
  .wide-pie-panel .pie-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .pie-figure,
  .pie-chart {
    width: 150px;
  }

  .toggle-setting {
    gap: 12px;
  }

  .configuration-field-grid {
    grid-template-columns: 1fr;
  }

  .record-toolbar,
  .layout-editor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .record-toolbar [data-config-record-count] {
    align-self: start;
    margin-left: 0;
  }

  .layout-selection-count {
    align-self: start;
    margin-left: 0;
  }

  .target-list > label {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .target-list .status-badge {
    display: none;
  }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.online-ordering-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.online-status-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border-left: 4px solid var(--line-strong);
}

.online-status-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.online-status-card > strong {
  font-size: 20px;
}

.online-status-card > small,
.panel-intro,
.online-channel-panel > p,
.online-token-panel > p,
.online-secret-panel > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.online-status-card.is-open {
  border-left-color: var(--green);
  background: linear-gradient(135deg, #fff 0%, var(--green-soft) 150%);
}

.online-status-card.is-closed {
  border-left-color: var(--amber);
}

.online-secret-panel,
.online-token-panel,
.hosted-payment-panel,
.hosted-payment-review-panel,
.online-orders-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.online-secret-panel,
.online-token-panel,
.hosted-payment-panel {
  padding: 17px;
}

.online-secret-panel {
  border-color: #e0b74f;
  background: var(--amber-soft);
}

.online-secret-panel .panel-heading,
.online-token-panel .panel-heading,
.hosted-payment-panel .panel-heading {
  margin: -17px -17px 15px;
}

.online-secret-panel > p,
.online-token-panel > p {
  margin: 12px 0;
}

.online-ordering-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.online-ordering-layout > .panel {
  min-width: 0;
  overflow: hidden;
}

.online-settings-panel,
.online-hours-panel {
  grid-column: 1 / -1;
}

.online-toggle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 0 18px;
}

.online-pause-toggle strong {
  color: var(--red);
}

.online-basic-fields {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin: 4px 18px 18px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.online-basic-fields select {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

.online-basic-fields small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.online-basic-fields .number-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

.online-basic-fields .number-control strong {
  padding-left: 10px;
}

.online-basic-fields .number-control input {
  border: 0;
}

.online-hours-panel .panel-intro,
.online-tills-panel .panel-intro {
  padding: 15px 18px 0;
}

.online-hours-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  padding: 14px 18px 20px;
}

.online-hours-day {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.online-hours-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 7px;
}

.online-hours-day-heading button,
.online-hours-remove {
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.online-hours-row {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) auto minmax(105px, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.online-hours-row input {
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

.online-till-list {
  padding: 12px 18px 18px;
}

.online-till-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.online-till-option:last-child {
  border-bottom: 0;
}

.online-till-option > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.online-till-option small,
.online-orders-panel td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.online-channel-panel > p,
.online-token-panel > p {
  padding: 0 18px 16px;
}

.online-credential-list {
  display: grid;
  gap: 13px;
  padding: 17px 18px;
}

.online-credential-list > label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.online-copy-row {
  display: flex;
  gap: 8px;
}

.online-copy-row input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

.online-danger-check {
  display: flex;
  gap: 9px;
  align-items: start;
  margin: 0 18px 18px;
  padding: 11px;
  border: 1px solid #e7c6c9;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.online-token-panel form {
  padding: 0 18px 18px;
}

.hosted-payment-panel > .panel-intro,
.hosted-payment-panel > .alert,
.hosted-payment-panel > .empty-state {
  margin: 0;
  padding: 15px 18px;
}

.hosted-payment-worker {
  display: grid;
  gap: 3px;
  margin: 0 18px 16px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: #f8fafb;
  font-size: 12px;
}

.hosted-payment-worker span {
  color: var(--muted);
  line-height: 1.45;
}

.hosted-payment-worker.is-ready {
  border-color: #aed9c5;
  background: var(--green-soft);
}

.hosted-payment-worker.is-blocked {
  border-color: #e0b74f;
  background: var(--amber-soft);
}

.hosted-payment-review-panel {
  border-color: #d59641;
  background: #fffdf8;
}

.hosted-payment-review-panel .panel-heading {
  background: var(--amber-soft);
}

.hosted-payment-review-warning {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid #e7c27a;
  color: #704306;
  font-size: 12px;
  line-height: 1.5;
}

.hosted-payment-review-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.hosted-payment-review-panel th,
.hosted-payment-review-panel td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.hosted-payment-review-panel th {
  background: #f8f1e3;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.hosted-payment-review-panel td small {
  display: block;
  max-width: 340px;
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.hosted-payment-review-panel tr.is-critical td:first-child {
  border-left: 4px solid var(--red);
}

.online-customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.online-customer-summary-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-left: 4px solid var(--blue-dark);
}

.online-customer-summary-card > span,
.online-customer-summary-card > small {
  color: var(--muted);
  font-size: 11px;
}

.online-customer-summary-card > span {
  font-weight: 800;
  text-transform: uppercase;
}

.online-customer-summary-card > strong {
  font-size: 20px;
}

.online-customer-empty-panel {
  padding: 18px;
}

.online-customer-empty-panel .empty-state {
  margin: 0 0 14px;
}

.online-customer-layout {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.7fr);
  align-items: start;
  gap: 16px;
}

.online-customer-list-panel,
.online-customer-detail-panel {
  overflow: hidden;
}

.online-customer-list {
  display: grid;
  max-height: 720px;
  overflow: auto;
}

.online-customer-list > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.online-customer-list > a:hover,
.online-customer-list > a[aria-current="true"] {
  background: var(--blue-soft);
}

.online-customer-list > a[aria-current="true"] {
  box-shadow: inset 4px 0 0 var(--blue-dark);
}

.online-customer-list > a > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.online-customer-list > a > span:last-child {
  text-align: right;
}

.online-customer-list small,
.online-customer-remove-form small,
.online-customer-order-heading span,
.online-customer-detail-panel td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.online-customer-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 8px 18px 16px;
}

.online-customer-profile > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.online-customer-profile > div:nth-child(odd) {
  padding-right: 18px;
}

.online-customer-profile dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.online-customer-profile dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.online-customer-remove-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 18px 18px;
  padding: 12px;
  border: 1px solid #e7c6c9;
  background: var(--red-soft);
}

.online-customer-remove-form > div {
  display: grid;
  gap: 3px;
}

.online-customer-order-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-top: 1px solid var(--line);
}

.online-customer-order-heading h3 {
  margin: 0;
  font-size: 15px;
}

.online-customer-detail-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.online-customer-detail-panel th,
.online-customer-detail-panel td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.online-customer-detail-panel th {
  background: #f1f4f6;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.hosted-payment-accounts {
  display: grid;
  gap: 10px;
  padding: 0 18px 16px;
}

.hosted-payment-account {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(210px, 1fr) minmax(210px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafb;
}

.hosted-payment-account > div,
.hosted-payment-form-heading {
  display: grid;
  gap: 4px;
}

.hosted-payment-account small,
.hosted-payment-form-heading small,
.hosted-payment-fields small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.hosted-payment-account .toggle-setting {
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.hosted-payment-credentials {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.hosted-payment-fields {
  grid-template-columns: minmax(170px, .7fr) minmax(220px, 1.3fr) minmax(220px, 1fr);
  padding: 16px 0;
  border-bottom: 0;
}

.hosted-payment-fields select {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
}

.hosted-payment-enable-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.online-orders-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.online-orders-panel th,
.online-orders-panel td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.online-orders-panel th {
  background: #f1f4f6;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.online-orders-panel td:first-child {
  max-width: 210px;
  white-space: normal;
}

.online-orders-panel .empty-state,
.online-channel-panel .empty-state,
.online-till-list .empty-state {
  padding: 18px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .online-ordering-status-grid,
  .online-ordering-layout {
    grid-template-columns: 1fr;
  }

  .online-ordering-layout > .panel,
  .online-settings-panel,
  .online-hours-panel {
    grid-column: 1;
  }

  .online-basic-fields {
    grid-template-columns: 1fr;
  }

  .hosted-payment-account,
  .hosted-payment-fields,
  .hosted-payment-enable-row {
    grid-template-columns: 1fr;
  }

  .online-customer-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .online-toggle-list,
  .online-hours-list {
    grid-template-columns: 1fr;
  }

  .online-hours-row {
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  }

  .online-customer-summary-grid,
  .online-customer-profile,
  .online-customer-remove-form {
    grid-template-columns: 1fr;
  }

  .online-customer-profile > div:nth-child(odd) {
    padding-right: 0;
  }

  .online-hours-remove {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .online-copy-row {
    align-items: stretch;
    flex-direction: column;
  }

  .online-till-option {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .online-till-option .status-badge {
    grid-column: 2;
    justify-self: start;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 14mm;
  }

  html,
  body {
    min-width: 0;
    background: #ffffff;
    color: #000000;
  }

  .app-header,
  .page-heading,
  .no-print,
  .app-footer,
  .refresh-status {
    display: none !important;
  }

  .app-main {
    width: 100%;
    min-height: 0;
    padding: 0;
  }

  .report-heading,
  .panel,
  .stats article {
    border-color: #555555;
    box-shadow: none;
  }

  .attendance-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .report-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pie-chart,
  .pie-legend i,
  .daily-bar,
  .hour-bar {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .daily-chart,
  .report-hourly-chart {
    height: 210px;
    overflow: visible;
  }

  .report-hourly-chart {
    grid-auto-columns: minmax(25px, 1fr);
    gap: 3px;
  }

  .report-hour-column > strong {
    display: none;
  }

  .pie-layout,
  .wide-pie-panel .pie-layout {
    grid-template-columns: 135px minmax(0, 1fr);
    min-height: 185px;
    gap: 15px;
    padding: 12px;
  }

  .pie-chart {
    width: 135px;
  }

  .pie-figure {
    width: 135px;
  }

  .table-scroll {
    overflow: visible;
  }

  .data-table {
    font-size: 10pt;
  }

  .data-table th,
  .data-table td {
    padding: 6px 7px;
    border-color: #777777;
  }

  .attendance-detail-panel {
    break-before: page;
  }
}

/* Optional booking pages inherit the existing Back Office controls. */
.booking-settings-layout { display:block; }
.booking-fieldset { min-width:0; border:0; margin:0; padding:0; display:grid; gap:16px; }
.booking-fieldset:disabled { opacity:.75; }
.booking-fieldset .configuration-field-grid { padding:18px; }
.booking-fieldset .configuration-field-grid label > span:first-child { font-size:14px; text-transform:none; }
.booking-fieldset .configuration-field-grid select { min-height:44px; border:1px solid var(--line-strong); background:white; padding:8px; font:inherit; }
.booking-fieldset .toggle-setting { padding:18px; }
.booking-link-panel { padding:18px; display:grid; gap:12px; margin-bottom:16px; }
.booking-link-panel input { width:100%; min-width:0; padding:10px; border:1px solid var(--line-strong); }
.booking-link-panel .button { justify-self:start; }
.table-wrap { overflow-x:auto; }
.table-wrap table { width:100%; border-collapse:collapse; }
.table-wrap th, .table-wrap td { padding:12px; text-align:left; vertical-align:top; border-bottom:1px solid var(--line); }
.table-wrap td form { display:grid; gap:8px; min-width:150px; }
