:root {
  color-scheme: light;
  --background: #edf1ee;
  --surface: #ffffff;
  --surface-alt: #e4ebe6;
  --text: #182e26;
  --muted: #40584d;
  --border: #718578;
  --accent: #176b52;
  --on-accent: #ffffff;
  --accent-soft: #d7eee2;
  --focus: #714f00;
  --disabled: #e2e7e4;
  --on-disabled: #59685f;
  --error: #a43428;
}
.member-row-actions {
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  min-width: 0;
}
.member-row-actions button {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
}
.payment-shortcut {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.groups-workspace > *,
.group-list {
  min-width: 0;
  max-width: 100%;
}
.group-row-actions button {
  position: relative;
}
.payment-shortcut-dialog .payment-account-panel {
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}
.payment-shortcut-dialog .payment-account-panel > h2 {
  display: none;
}
.payment-shortcut-dialog .payment-account-totals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.member-booking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block: 1rem;
}
.member-booking-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.member-booking-header h2 {
  margin-top: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.member-booking-header button {
  flex-shrink: 0;
}
.member-booking-dialog input,
.member-booking-dialog select {
  min-width: 0;
  max-width: 100%;
}
.member-booking-tabs [aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.member-booking-history {
  max-height: 55dvh;
  overflow: auto;
  padding: 0.25rem;
}
.member-booking-entry,
.member-booking-preview:not(:empty),
.member-booking-pending:not(:empty) {
  padding: 1rem;
  margin-block: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-alt);
  color: var(--text);
  overflow-wrap: anywhere;
}
.member-booking-dialog [hidden] {
  display: none;
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --background: #111a17;
  --surface: #1b2923;
  --surface-alt: #263b31;
  --text: #edf6f0;
  --muted: #baccc1;
  --border: #789487;
  --accent: #86d7b6;
  --on-accent: #10271e;
  --accent-soft: #294a3b;
  --focus: #ffd57a;
  --disabled: #28332d;
  --on-disabled: #a4b1a8;
  --error: #ffb4a9;
}
body[data-theme="ocean"] {
  --accent: #245c7b;
  --accent-soft: #deedf5;
  --on-accent: #ffffff;
}
body[data-theme="clay"] {
  --accent: #8e432b;
  --accent-soft: #f8e6dc;
  --on-accent: #ffffff;
}
:root[data-mode="dark"] body[data-theme="ocean"] {
  --accent: #91ccef;
  --accent-soft: #223e50;
  --on-accent: #102433;
}
:root[data-mode="dark"] body[data-theme="clay"] {
  --accent: #f0b69f;
  --accent-soft: #513329;
  --on-accent: #361c12;
}
@font-face {
  font-family: system-ui;
  src: local("Segoe UI");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font:
    15px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  transition:
    background 0.15s,
    color 0.15s;
}
button:hover {
  filter: none;
}
.shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: var(--space-8) var(--space-5);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-sm);
  font-weight: 750;
  letter-spacing: -0.6px;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 43px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--font-title);
  letter-spacing: -3px;
  padding-right: var(--space-1);
}
.brand small {
  display: block;
  font-size: var(--font-xs);
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-top: 1px;
}
.club {
  margin: var(--space-10) 0 var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.club-avatar {
  background: var(--surface-alt);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: var(--font-xs);
  font-weight: 750;
  color: var(--muted);
}
.club strong {
  font-size: var(--font-xs);
}
.club small {
  display: block;
  font-size: var(--font-xs);
  color: var(--muted);
}
nav {
  display: grid;
  gap: var(--space-2);
}
nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  color: var(--muted);
  font-size: var(--font-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
nav a > span:first-child {
  font-size: var(--font-heading);
  width: 21px;
  text-align: center;
  font-weight: 400;
}
nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}
nav a:hover {
  background: var(--surface-alt);
}
.nav-count {
  margin-left: auto;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1px var(--space-1);
  font-size: var(--font-xs);
}
.sidebar-bottom {
  margin-top: auto;
  padding: var(--space-5) var(--space-2) 0;
  font-size: var(--font-xs);
  color: var(--muted);
}
.sidebar-bottom small {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-xs);
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: var(--space-1);
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-10);
  font-size: var(--font-xs);
  color: var(--muted);
}
.topbar strong {
  color: var(--text);
  font-weight: 600;
}
.separator {
  margin: 0 var(--space-3);
  color: var(--muted);
}
.demo-pill {
  border: 1px solid var(--focus);
  background: var(--surface-alt);
  color: var(--focus);
  font-size: var(--font-xs);
  letter-spacing: 1px;
  font-weight: 700;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}
.demo-notice {
  padding: var(--space-3) var(--space-10);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: var(--font-xs);
  color: var(--muted);
}
.demo-notice strong {
  color: var(--text);
}
.page-content {
  padding: var(--space-10) var(--space-10) 70px;
  max-width: 1550px;
  margin: auto;
}
.page-heading {
  display: flex;
  gap: var(--space-5);
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}
.eyebrow {
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}
h1 {
  font-size: var(--font-title);
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 0 0 var(--space-2);
}
h2 {
  font-size: var(--font-heading);
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin: 0 0 var(--space-3);
}
.description {
  color: var(--muted);
  margin: 0;
  font-size: var(--font-xs);
}
.button {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-xs);
  font-weight: 650;
  min-height: 42px;
  white-space: nowrap;
}
.button.primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-card);
}
.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.dashboard-action {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 5rem;
  padding: 1rem;
  text-align: left;
  font: inherit;
  font-weight: 650;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.dashboard-action:hover {
  background: var(--surface-alt);
}
.dashboard-action svg {
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 auto;
  color: var(--accent);
}
.dashboard-action:disabled {
  opacity: 0.6;
  cursor: wait;
}
.dashboard-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.dashboard-count {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.8rem 0;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.dashboard-count strong {
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
}
.dashboard-count:hover,
.dashboard-task:hover {
  color: var(--accent);
  text-decoration: underline;
}
.dashboard-amount {
  grid-column: 1 / -1;
  margin: 0;
  overflow-wrap: anywhere;
}
.dashboard-tasks {
  margin-top: 1.5rem;
}
.dashboard-task {
  display: block;
  min-height: 2.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.dashboard-actions + [role="status"]:empty {
  display: none;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  position: relative;
}
.stat-label {
  font-size: var(--font-xs);
  color: var(--muted);
}
.stat strong {
  display: block;
  font-weight: 600;
  font-size: var(--font-title);
  margin: var(--space-1) 0 3px;
  letter-spacing: -1px;
}
.stat small {
  font-size: var(--font-xs);
  color: var(--muted);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.toolbar {
  min-height: 79px;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 310px;
  max-width: 100%;
  height: 39px;
  background: var(--surface);
}
.search-icon {
  font-size: var(--font-heading);
  color: var(--muted);
  padding: 0 var(--space-2);
}
.search input {
  width: 100%;
  border: none;
  background: transparent;
  padding: var(--space-2) var(--space-2) var(--space-2) 0;
  font-size: var(--font-xs);
  color: var(--text);
  min-width: 0;
}
.search input::placeholder {
  color: var(--muted);
}
.search:focus-within {
  border-color: var(--focus);
}
.search:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.search input:focus {
  outline: none;
}
.toolbar-hint {
  font-size: var(--font-xs);
  color: var(--muted);
}
.filter select {
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  font-size: var(--font-xs);
  background: var(--surface);
  color: var(--text);
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: var(--font-xs);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--border);
}
td {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-xs);
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--surface-alt);
}
td strong {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text);
}
.person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: var(--font-xs);
  font-weight: 650;
}
.person small {
  display: block;
  font-size: var(--font-xs);
  color: var(--muted);
  margin-top: 2px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  font-weight: 600;
  line-height: 1.4;
}
.badge.green {
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.neutral {
  background: var(--surface-alt);
  color: var(--muted);
}
.badge.amber {
  background: var(--surface-alt);
  color: var(--focus);
}
.text-button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: var(--font-xs);
  font-weight: 600;
  min-height: 34px;
  padding: var(--space-1) var(--space-2);
}
.info-note {
  font-size: var(--font-xs);
  color: var(--muted);
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-6);
}
.info-note strong {
  color: var(--text);
}
.fine-print {
  font-size: var(--font-xs);
  color: var(--muted);
  margin: var(--space-3) 2px;
}
.empty-state {
  text-align: center;
  white-space: normal;
  padding: var(--space-12) var(--space-5);
  color: var(--muted);
}
.price {
  font-variant-numeric: tabular-nums;
}
.settings-panel {
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
.theme-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}
.theme-choice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 160px;
  font-size: var(--font-xs);
  color: var(--text);
}
.theme-choice[aria-pressed="true"] {
  border: 2px solid var(--accent);
  padding: var(--space-3);
}
.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #276247;
}
.ocean .swatch {
  background: #245c7b;
}
.clay .swatch {
  background: #965036;
}
footer {
  font-size: var(--font-xs);
  color: var(--muted);
  padding: 0 var(--space-10) var(--space-6);
  display: flex;
  justify-content: space-between;
}
dialog {
  width: 510px;
  max-width: calc(100% - 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}
dialog::backdrop {
  background: var(--backdrop);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-5);
}
.icon-button {
  background: var(--surface-alt);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: var(--font-heading);
  color: var(--text);
}
.field {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  font-size: var(--font-xs);
  color: var(--text);
}
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  background: var(--surface);
  color: var(--text);
  min-height: 43px;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-xs);
  color: var(--text);
  margin: var(--space-5) 0;
}
.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.field-help {
  font-size: var(--font-xs);
  color: var(--muted);
}
.form-error {
  color: var(--error);
  font-size: var(--font-xs);
}
.form-error:empty {
  display: none;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
  margin-top: var(--space-6);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-xs);
  box-shadow: var(--shadow-dialog);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 5;
}
#toast.visible {
  opacity: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1600px) {
  .page-content {
    padding-top: var(--space-12);
  }
  td {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar {
    padding: var(--space-6) var(--space-4);
  }
  .brand {
    font-size: var(--font-sm);
  }
  .page-content {
    padding: var(--space-8) var(--space-6) var(--space-12);
  }
  .topbar,
  .demo-notice {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading .button {
    margin-top: var(--space-5);
  }
  .stat {
    padding: var(--space-4);
  }
  .stat small {
    font-size: var(--font-xs);
  }
  .toolbar-hint {
    display: none;
  }
  td,
  th {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: var(--space-4) var(--space-5);
    display: block;
    border-bottom: 1px solid var(--border);
  }
  .brand {
    font-size: var(--font-sm);
  }
  .club,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: var(--space-1);
    overflow: auto;
    margin-top: var(--space-4);
  }
  nav a {
    padding: var(--space-2);
    font-size: var(--font-xs);
    white-space: nowrap;
  }
  nav a > span:first-child {
    display: none;
  }
  .nav-count {
    display: none;
  }
  .topbar {
    height: 58px;
    padding: 0 var(--space-5);
    font-size: var(--font-xs);
  }
  .demo-pill {
    font-size: var(--font-xs);
  }
  .demo-notice {
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-xs);
  }
  .page-content {
    padding: var(--space-6) var(--space-5) var(--space-10);
  }
  .page-heading {
    display: block;
  }
  .page-heading .button {
    margin-top: var(--space-5);
  }
  h1 {
    font-size: var(--font-title);
  }
  .stats {
    gap: var(--space-2);
  }
  .stat {
    padding: var(--space-3);
  }
  .stat-label {
    font-size: var(--font-xs);
  }
  .stat strong {
    font-size: var(--font-heading);
  }
  .stat small {
    display: none;
  }
  .toolbar {
    padding: var(--space-4);
    flex-wrap: wrap;
  }
  .search {
    width: 100%;
  }
  .filter {
    width: 100%;
  }
  .filter select {
    width: 100%;
    max-width: none;
  }
  footer {
    padding: 0 var(--space-5) var(--space-5);
    display: block;
  }
  footer span {
    display: block;
    margin-top: var(--space-1);
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  dialog {
    padding: var(--space-5);
  }
  #toast {
    width: calc(100% - 30px);
    text-align: center;
  }
  .theme-choices {
    display: grid;
  }
  .settings-panel {
    padding: var(--space-5);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* State cues use outlines, labels and thickness as well as colour. */
.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.appearance-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.appearance-toggle[aria-pressed="true"] {
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  padding: var(--space-2) var(--space-4);
}
.button.secondary:hover,
.text-button:hover,
.icon-button:hover,
.theme-choice:hover {
  background: var(--surface-alt);
}
.button.primary:hover {
  box-shadow: inset 0 0 0 2px var(--on-accent);
}
nav a[aria-current="page"] {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-2);
  font-weight: 750;
}
.theme-choice[aria-pressed="true"] {
  background: var(--accent-soft);
  font-weight: 750;
}
button:disabled {
  background: var(--disabled);
  color: var(--on-disabled);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 1;
}
.stat,
.panel {
  box-shadow: var(--shadow-card);
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 76px;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }
  .topbar-actions {
    gap: var(--space-2);
  }
}

button:disabled:hover {
  background: var(--disabled);
  color: var(--on-disabled);
  box-shadow: none;
}
input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.account-bar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-10);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.account-bar:empty {
  display: none;
}
.account-bar .field {
  margin: 0;
  min-width: 180px;
  max-width: 340px;
  flex: 1;
}
.connection-notice {
  color: var(--muted);
  line-height: 1.6;
}
.login-panel {
  max-width: 580px;
  margin: 0 auto;
}
.login-panel .field {
  margin: var(--space-4) 0;
}
.billing-controls,
.invoice-actions {
  display: flex;
  align-items: end;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.billing-controls .field {
  min-width: 180px;
  margin: 0;
}
.invoice-actions {
  margin: var(--space-4) 0;
}
.invoice-payment-history .table-scroll {
  max-height: 360px;
}
.payment-entry-actions {
  display: flex;
  gap: 0.5rem;
}
.payment-history-links {
  display: grid;
  gap: 0.4rem;
  max-width: 340px;
  white-space: normal;
}
.payment-history-links .text-button {
  text-align: left;
}
.payment-history-amount:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.warning-notice {
  padding: var(--space-4);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--text);
}
.field textarea {
  width: 100%;
  min-height: 110px;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
textarea:disabled,
input:disabled,
select:disabled {
  color: var(--on-disabled);
  background: var(--disabled);
  opacity: 1;
}
@media (max-width: 760px) {
  .account-bar {
    padding: var(--space-4) var(--space-5);
  }
  .invoice-actions .button,
  .billing-controls .button {
    width: 100%;
  }
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-8) var(--space-5);
}
.login-wrap {
  width: min(100%, 500px);
}
.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.login-brand-row .brand {
  padding: 0;
  gap: var(--space-3);
}
.login-brand-row .brand-icon {
  width: 42px;
  height: 42px;
}
.login-brand-row .button {
  font-size: var(--font-sm);
  padding: var(--space-2) var(--space-3);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
}
.login-card h1 {
  margin: var(--space-2) 0 var(--space-3);
  font-size: clamp(26px, 6vw, 32px);
  line-height: 1.2;
}
.login-card .login-panel {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.login-card .login-panel > .button {
  width: 100%;
  justify-content: center;
}
.login-card .field-help {
  margin: var(--space-6) 0 0;
}
.login-footer {
  color: var(--muted);
  text-align: center;
  font-size: var(--font-xs);
  margin-top: var(--space-6);
}
.account-panel {
  margin-top: var(--space-6);
  padding: var(--space-6);
}
.account-panel .account-panel {
  padding: 0;
  border: 0;
  box-shadow: none;
}
.account-form {
  display: grid;
  gap: var(--space-4);
  max-width: 560px;
}
.account-form > .button {
  justify-self: start;
}
.account-form .check-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0;
}
.account-form .check-field input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  accent-color: var(--accent);
}
.form-error.success-message {
  color: var(--accent);
}
.account-email {
  overflow-wrap: anywhere;
  font-weight: 600;
}
.auth-qr {
  width: min(100%, 260px);
  height: auto;
  margin: var(--space-5) 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  shape-rendering: crispEdges;
}
.manual-key {
  margin: var(--space-4) 0;
}
.manual-key summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}
.manual-key summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.setup-key {
  display: block;
  margin-top: var(--space-3);
  padding: var(--space-4);
  overflow-wrap: anywhere;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.recovery-codes {
  list-style: none;
  padding: var(--space-4);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: ui-monospace, monospace;
  line-height: 2;
  overflow-wrap: anywhere;
}
.section-six-form,
.section-six-device {
  display: grid;
  gap: var(--space-4);
  max-width: 760px;
}
.section-six-form {
  margin: var(--space-5) 0;
}
.section-six-form .field,
.section-six-device .field,
#registration-form .field {
  margin: 0;
}
.section-six-form .check-field,
.section-six-device .check-field,
#registration-form .check-field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.section-six-form .check-field input,
.section-six-device .check-field input,
#registration-form .check-field input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  accent-color: var(--accent);
}
.run-lines {
  margin: var(--space-4) 0;
}
.run-lines summary {
  cursor: pointer;
  color: var(--accent);
  padding: var(--space-2) 0;
}
.run-lines summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.section-six-device {
  min-width: 220px;
}
.pairing-display:empty {
  display: none;
}
.pairing-display {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
}
.login-card > .text-button {
  display: inline-block;
  margin: var(--space-4) var(--space-4) 0 0;
}
@media (max-width: 480px) {
  .login-screen {
    padding: var(--space-6) var(--space-3);
  }
  .login-card {
    padding: var(--space-6);
  }
  .login-brand-row {
    gap: var(--space-2);
  }
  .login-brand-row strong {
    font-size: var(--font-sm);
  }
}

.receipt-preview {
  width: 100%;
  height: 70vh;
  border: 0;
}
/* Shared layout scale for all administration and public account views. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --font-xs: 12px;
  --font-sm: 14px;
  --font-md: 15px;
  --font-heading: 22px;
  --font-title: 30px;
  --control-height: 44px;
  --icon-size: 20px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --page-gutter: clamp(16px, 3vw, 40px);
}
[hidden] {
  display: none !important;
}
.shell > main {
  min-width: 0;
}
.page-content {
  padding: var(--space-8) var(--page-gutter) var(--space-12);
}
.page-content > .button {
  margin-bottom: var(--space-6);
}
.page-heading {
  flex-wrap: wrap;
  gap: var(--space-4);
}
.page-heading > div:first-child {
  flex: 1 1 280px;
}
.settings-panel,
.account-panel {
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}
.settings-panel > p,
.account-panel > p {
  margin: var(--space-3) 0 var(--space-5);
}
.settings-panel > .button + .button,
.account-panel > .button + .button {
  margin-left: var(--space-3);
}
.panel > .section-six-form,
.panel > .section-six-device {
  max-width: 100%;
}
.account-form,
.section-six-form,
.section-six-device {
  gap: var(--space-4);
}
.account-form .field,
.toolbar .field {
  margin: 0;
}
.account-form {
  margin-top: var(--space-5);
}
.field {
  gap: var(--space-2);
  font-size: var(--font-sm);
}
.field input,
.field select,
.field textarea,
.button,
.text-button {
  min-height: var(--control-height);
  font-size: var(--font-sm);
  border-radius: var(--radius-sm);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  white-space: normal;
  text-align: center;
}
.icon-button {
  min-width: var(--control-height);
  min-height: var(--control-height);
}
.description,
.connection-notice,
.field-help {
  font-size: var(--font-sm);
  line-height: 1.6;
}
th {
  font-size: var(--font-xs);
  letter-spacing: 0.04em;
}
td,
td strong {
  font-size: var(--font-sm);
}
th,
td {
  padding: var(--space-4) var(--space-5);
  vertical-align: middle;
}
.badge {
  font-size: var(--font-xs);
}
.toolbar {
  gap: var(--space-4);
  flex-wrap: wrap;
}
.row-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.row-actions .text-button {
  display: inline-grid;
  place-items: center;
  min-width: var(--control-height);
  padding: var(--space-2);
}
.row-actions svg {
  width: var(--icon-size);
  height: var(--icon-size);
}
.otp-digits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  max-width: 360px;
}
.otp-digits input {
  text-align: center;
  padding: var(--space-2);
  min-width: 0;
  font-size: var(--font-heading);
  font-variant-numeric: tabular-nums;
}
.otp-alternative {
  justify-self: start;
}
.login-card .login-panel {
  gap: var(--space-5);
}
.login-panel .field {
  margin: 0;
}
.login-card {
  padding: var(--space-8);
}
dialog {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.dialog-actions {
  gap: var(--space-3);
  padding-top: var(--space-5);
  margin-top: var(--space-6);
}
@media (max-width: 760px) {
  .page-content {
    padding: var(--space-6) var(--page-gutter) var(--space-10);
  }
  .settings-panel,
  .account-panel,
  .login-card {
    padding: var(--space-5);
  }
  .page-heading .button {
    margin-top: 0;
  }
  .topbar,
  .account-bar {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
  .stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-3);
  }
  .login-brand-row {
    flex-wrap: wrap;
  }
  .dialog-actions > .button {
    flex: 1 1 120px;
  }
  .settings-panel > .button + .button,
  .account-panel > .button + .button {
    margin-left: 0;
    margin-top: var(--space-3);
  }
}

/* Complete semantic palettes; every component consumes these tokens. */
body[data-theme="ocean"] {
  --background: hsl(211 18% 95%);
  --surface: hsl(211 15% 99%);
  --surface-alt: hsl(211 22% 90%);
  --text: hsl(211 30% 14%);
  --muted: hsl(211 18% 31%);
  --border: hsl(211 15% 48%);
  --accent: hsl(211 52% 29%);
  --on-accent: #ffffff;
  --accent-soft: hsl(211 32% 89%);
  --focus: hsl(211 58% 29%);
  --disabled: hsl(211 12% 89%);
  --on-disabled: hsl(211 12% 37%);
  --error: #a43428;
}
:root[data-mode="dark"] body[data-theme="ocean"] {
  --background: hsl(211 18% 9%);
  --surface: hsl(211 18% 14%);
  --surface-alt: hsl(211 18% 21%);
  --text: hsl(211 20% 95%);
  --muted: hsl(211 18% 77%);
  --border: hsl(211 17% 59%);
  --accent: hsl(211 50% 78%);
  --on-accent: hsl(211 35% 14%);
  --accent-soft: hsl(211 25% 25%);
  --focus: hsl(211 65% 80%);
  --disabled: hsl(211 12% 20%);
  --on-disabled: hsl(211 12% 70%);
  --error: #ffb4a9;
}
.ocean .swatch {
  background: hsl(211 52% 29%);
}
body[data-theme="clay"] {
  --background: hsl(15 18% 95%);
  --surface: hsl(15 15% 99%);
  --surface-alt: hsl(15 22% 90%);
  --text: hsl(15 30% 14%);
  --muted: hsl(15 18% 31%);
  --border: hsl(15 15% 48%);
  --accent: hsl(15 52% 29%);
  --on-accent: #ffffff;
  --accent-soft: hsl(15 32% 89%);
  --focus: hsl(15 58% 29%);
  --disabled: hsl(15 12% 89%);
  --on-disabled: hsl(15 12% 37%);
  --error: #a43428;
}
:root[data-mode="dark"] body[data-theme="clay"] {
  --background: hsl(15 18% 9%);
  --surface: hsl(15 18% 14%);
  --surface-alt: hsl(15 18% 21%);
  --text: hsl(15 20% 95%);
  --muted: hsl(15 18% 77%);
  --border: hsl(15 17% 59%);
  --accent: hsl(15 50% 78%);
  --on-accent: hsl(15 35% 14%);
  --accent-soft: hsl(15 25% 25%);
  --focus: hsl(15 65% 80%);
  --disabled: hsl(15 12% 20%);
  --on-disabled: hsl(15 12% 70%);
  --error: #ffb4a9;
}
.clay .swatch {
  background: hsl(15 52% 29%);
}
body[data-theme="slate"] {
  --background: hsl(225 18% 95%);
  --surface: hsl(225 15% 99%);
  --surface-alt: hsl(225 22% 90%);
  --text: hsl(225 30% 14%);
  --muted: hsl(225 18% 31%);
  --border: hsl(225 15% 48%);
  --accent: hsl(225 52% 29%);
  --on-accent: #ffffff;
  --accent-soft: hsl(225 32% 89%);
  --focus: hsl(225 58% 29%);
  --disabled: hsl(225 12% 89%);
  --on-disabled: hsl(225 12% 37%);
  --error: #a43428;
}
:root[data-mode="dark"] body[data-theme="slate"] {
  --background: hsl(225 18% 9%);
  --surface: hsl(225 18% 14%);
  --surface-alt: hsl(225 18% 21%);
  --text: hsl(225 20% 95%);
  --muted: hsl(225 18% 77%);
  --border: hsl(225 17% 59%);
  --accent: hsl(225 50% 78%);
  --on-accent: hsl(225 35% 14%);
  --accent-soft: hsl(225 25% 25%);
  --focus: hsl(225 65% 80%);
  --disabled: hsl(225 12% 20%);
  --on-disabled: hsl(225 12% 70%);
  --error: #ffb4a9;
}
.slate .swatch {
  background: hsl(225 52% 29%);
}
body[data-theme="plum"] {
  --background: hsl(285 18% 95%);
  --surface: hsl(285 15% 99%);
  --surface-alt: hsl(285 22% 90%);
  --text: hsl(285 30% 14%);
  --muted: hsl(285 18% 31%);
  --border: hsl(285 15% 48%);
  --accent: hsl(285 52% 29%);
  --on-accent: #ffffff;
  --accent-soft: hsl(285 32% 89%);
  --focus: hsl(285 58% 29%);
  --disabled: hsl(285 12% 89%);
  --on-disabled: hsl(285 12% 37%);
  --error: #a43428;
}
:root[data-mode="dark"] body[data-theme="plum"] {
  --background: hsl(285 18% 9%);
  --surface: hsl(285 18% 14%);
  --surface-alt: hsl(285 18% 21%);
  --text: hsl(285 20% 95%);
  --muted: hsl(285 18% 77%);
  --border: hsl(285 17% 59%);
  --accent: hsl(285 50% 78%);
  --on-accent: hsl(285 35% 14%);
  --accent-soft: hsl(285 25% 25%);
  --focus: hsl(285 65% 80%);
  --disabled: hsl(285 12% 20%);
  --on-disabled: hsl(285 12% 70%);
  --error: #ffb4a9;
}
.plum .swatch {
  background: hsl(285 52% 29%);
}
body[data-theme="copper"] {
  --background: hsl(35 18% 95%);
  --surface: hsl(35 15% 99%);
  --surface-alt: hsl(35 22% 90%);
  --text: hsl(35 30% 14%);
  --muted: hsl(35 18% 31%);
  --border: hsl(35 15% 48%);
  --accent: hsl(35 52% 29%);
  --on-accent: #ffffff;
  --accent-soft: hsl(35 32% 89%);
  --focus: hsl(35 58% 29%);
  --disabled: hsl(35 12% 89%);
  --on-disabled: hsl(35 12% 37%);
  --error: #a43428;
}
:root[data-mode="dark"] body[data-theme="copper"] {
  --background: hsl(35 18% 9%);
  --surface: hsl(35 18% 14%);
  --surface-alt: hsl(35 18% 21%);
  --text: hsl(35 20% 95%);
  --muted: hsl(35 18% 77%);
  --border: hsl(35 17% 59%);
  --accent: hsl(35 50% 78%);
  --on-accent: hsl(35 35% 14%);
  --accent-soft: hsl(35 25% 25%);
  --focus: hsl(35 65% 80%);
  --disabled: hsl(35 12% 20%);
  --on-disabled: hsl(35 12% 70%);
  --error: #ffb4a9;
}
.copper .swatch {
  background: hsl(35 52% 29%);
}
.page-content > .description {
  margin-bottom: var(--space-6);
}
:root {
  --shadow-card: 0 2px 0 #0000000a;
  --shadow-dialog: 0 24px 80px #00000030;
  --backdrop: #00000066;
}
@media (max-width: 760px) {
  .sidebar {
    padding: var(--space-3) var(--page-gutter);
  }
  nav {
    margin-top: var(--space-3);
  }
  .account-bar {
    gap: var(--space-2);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }
  .account-bar .field {
    min-width: 140px;
  }
  .account-bar .badge {
    align-self: center;
  }
  .topbar {
    min-height: var(--control-height);
    gap: var(--space-2);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }
  .demo-notice {
    padding: var(--space-3) var(--page-gutter);
  }
}
/* Checkbox geometry is separate from text-entry controls. */
.field.check-field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--control-height);
}
.field.check-field input[type="checkbox"] {
  order: -1;
  flex: 0 0 var(--icon-size);
  width: var(--icon-size);
  height: var(--icon-size);
  min-height: var(--icon-size);
  padding: 0;
  accent-color: var(--accent);
}
.groups-workspace {
  display: grid;
  gap: var(--space-4);
}
.group-actions,
.group-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.group-card-title {
  justify-content: space-between;
}
.group-card-list,
.group-assignment-pickers,
.group-editor-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-4);
}
.group-card,
.group-editor,
.group-history,
.group-round,
.group-picker {
  padding: var(--space-4);
  min-width: 0;
  overflow-wrap: anywhere;
}
.group-picker,
.group-round {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.group-contact-email[hidden] {
  display: none;
}
.group-choice-list {
  max-height: 24rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: var(--space-3) 0;
}
.group-check {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  min-height: var(--control-height);
  padding: var(--space-2);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.group-check input[type="checkbox"] {
  width: 1.3rem;
  height: 1.3rem;
  min-height: 1.3rem;
  flex: 0 0 1.3rem;
  accent-color: var(--accent);
}
.group-balance {
  font-weight: 700;
}
.group-sync-status,
.group-status:not(:empty) {
  padding: var(--space-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
@media (max-width: 760px) {
  .page-heading {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  .page-heading > div:first-child {
    flex-basis: 100%;
  }
}
/* Administration design system: shared surfaces, navigation and controls. */
:root {
  --font-xs: 0.78rem;
  --font-sm: 0.9rem;
  --font-md: 1rem;
  --font-heading: 1.3rem;
  --font-title: clamp(1.8rem, 2.7vw, 2.3rem);
  --control-height: 46px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-card: 0 2px 8px #152c2510, 0 0 1px #152c251a;
  --shadow-dialog: 0 24px 90px #091b2840;
  --page-gutter: clamp(20px, 3.5vw, 56px);
  --theme-hue: 158;
  --divider: #e1e8e5;
}
body[data-theme="forest"] {
  --theme-hue: 158;
}
body[data-theme="ocean"] {
  --theme-hue: 207;
}
body[data-theme="clay"] {
  --theme-hue: 17;
}
body[data-theme="slate"] {
  --theme-hue: 224;
}
body[data-theme="plum"] {
  --theme-hue: 285;
}
body[data-theme="copper"] {
  --theme-hue: 34;
}
body,
body[data-theme] {
  --background: hsl(var(--theme-hue) 15% 97%);
  --surface: hsl(var(--theme-hue) 15% 100%);
  --surface-alt: hsl(var(--theme-hue) 17% 94%);
  --text: hsl(var(--theme-hue) 21% 15%);
  --muted: hsl(var(--theme-hue) 10% 36%);
  --border: hsl(var(--theme-hue) 9% 51%);
  --divider: hsl(var(--theme-hue) 13% 88%);
  --accent: hsl(var(--theme-hue) 49% 28%);
  --accent-soft: hsl(var(--theme-hue) 29% 92%);
  --on-accent: #fff;
  --focus: hsl(var(--theme-hue) 60% 30%);
  --error: #ad302c;
  font-size: var(--font-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
:root[data-mode="dark"] body,
:root[data-mode="dark"] body[data-theme] {
  --background: hsl(var(--theme-hue) 15% 9%);
  --surface: hsl(var(--theme-hue) 13% 13%);
  --surface-alt: hsl(var(--theme-hue) 12% 18%);
  --text: hsl(var(--theme-hue) 12% 95%);
  --muted: hsl(var(--theme-hue) 9% 73%);
  --border: hsl(var(--theme-hue) 8% 51%);
  --divider: hsl(var(--theme-hue) 10% 25%);
  --accent: hsl(var(--theme-hue) 46% 76%);
  --accent-soft: hsl(var(--theme-hue) 22% 21%);
  --on-accent: hsl(var(--theme-hue) 28% 12%);
  --focus: hsl(var(--theme-hue) 60% 79%);
  --error: #ffb7b1;
  --shadow-card: 0 2px 10px #00000018, 0 0 1px #ffffff30;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h1 {
  font-weight: 720;
  letter-spacing: -0.04em;
}
h2 {
  font-weight: 680;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.03rem;
  letter-spacing: -0.015em;
}
.eyebrow {
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  font-weight: 750;
}
.description {
  max-width: 66ch;
}
.shell {
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  position: sticky;
  inset-block-start: 0;
  height: 100dvh;
  min-height: 0;
  padding: 28px 16px 16px;
  overflow: hidden;
  border-right: 1px solid var(--divider);
}
.sidebar .brand {
  padding: 0 10px;
  gap: 10px;
  font-size: 1.08rem;
  letter-spacing: -0.045em;
}
.sidebar .brand-icon {
  width: 38px;
  height: 42px;
  border-radius: 13px;
  font-size: 1.6rem;
}
.brand small {
  font-size: 0.59rem;
  letter-spacing: 0.16em;
  margin-top: 3px;
}
.sidebar .club {
  margin: 28px 8px 20px;
  padding: 0;
  border: 0;
  gap: 10px;
  min-width: 0;
}
.club-avatar {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  height: 40px;
  width: 40px;
  flex: 0 0 auto;
}
.club > div {
  min-width: 0;
}
.club strong {
  font-size: 0.85rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.club small {
  font-size: 0.69rem;
}
.sidebar nav {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  margin: 0;
  padding: 3px 6px 12px;
  scroll-padding-block: 10px;
}
.sidebar nav a {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 12px;
  gap: 12px;
  font-size: 0.83rem;
  font-weight: 560;
  white-space: normal;
  border-radius: 10px;
}
.sidebar nav a svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.sidebar nav a > .nav-label {
  display: block;
  flex: 1 1 auto;
  width: auto;
  font-size: inherit;
  text-align: start;
  font-weight: inherit;
}
.sidebar nav a[aria-current="page"] {
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}
.sidebar .nav-count {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0 6px;
  width: auto;
}
.sidebar nav a[data-page="account"] {
  padding-inline-start: 44px;
}
.sidebar-bottom {
  margin: 0;
  padding: 12px 10px 0;
  border-top: 1px solid var(--divider);
  min-height: 0;
}
.sidebar-bottom > .status-dot {
  display: none;
}
.sidebar-bottom > small {
  font-size: 0.62rem;
  padding-top: 10px;
  line-height: 1.4;
}
.sidebar .account-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  align-items: center;
}
.sidebar-logo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 128px;
  aspect-ratio: 1;
  min-height: 0;
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
  cursor: pointer;
}
.sidebar-logo-upload:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.sidebar-logo-icon {
  color: var(--accent);
  font-size: 2rem;
  line-height: 1;
}
.sidebar-club-logo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}
button.sidebar-logo-upload:has(.sidebar-club-logo) {
  /* The previous 128px tile displayed 102px of image; 153px is 50% larger. */
  width: 153px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sidebar-logo-upload:disabled {
  cursor: default;
  opacity: 1;
}
.sidebar-logo-dialog-host {
  max-width: min(480px, calc(100vw - 32px));
}
.sidebar-logo-dialog-host > .button {
  margin: 8px 8px 0 0;
}
.sidebar .account-bar .field {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: none;
  font-size: 0.69rem;
}
.sidebar .account-bar .field select {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 0.76rem;
}
.sidebar .account-bar .badge {
  display: none;
}
.sidebar .account-bar .button {
  min-height: 38px;
  font-size: 0.73rem;
  padding: 7px 8px;
  border-color: var(--divider);
}
.topbar {
  min-height: 76px;
  height: auto;
  padding: 18px var(--page-gutter);
  gap: 12px;
  background: transparent;
  border-bottom: 1px solid var(--divider);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .appearance-toggle {
  background: transparent;
  border-color: var(--divider);
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.76rem;
}
.demo-notice {
  padding: 12px var(--page-gutter) 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
}
.page-content {
  max-width: 1440px;
  padding: 36px var(--page-gutter) 64px;
}
.page-heading {
  align-items: center;
  margin-bottom: 30px;
  gap: 16px;
}
.page-heading .button {
  margin-top: 0;
}
.panel,
.stat,
.login-card,
.group-card,
.section-six-device {
  border-color: transparent;
  box-shadow: var(--shadow-card);
}
.panel {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 22px;
}
.stat strong {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.stat small {
  line-height: 1.5;
}
.stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.toolbar {
  background: var(--surface);
  border-color: var(--divider);
  padding: 20px 24px;
  gap: 16px;
}
th {
  background: var(--surface-alt);
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.75rem;
}
th,
td {
  padding: 16px 22px;
  border-color: var(--divider);
}
td {
  font-size: 0.86rem;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}
.table-scroll {
  scrollbar-width: thin;
}
.button {
  padding: 11px 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.button.primary {
  box-shadow: 0 3px 7px #00000010;
}
.button.secondary {
  border-color: var(--divider);
  background: var(--surface);
}
.button.secondary:hover,
.text-button:hover {
  background: var(--surface-alt);
  border-color: var(--border);
}
.text-button {
  padding: 9px 12px;
  font-weight: 650;
}
button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  vertical-align: middle;
}
.button,
.text-button {
  gap: 8px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  padding: 10px;
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 12px;
}
.field {
  gap: 8px;
  font-size: 0.83rem;
  font-weight: 580;
}
.field input,
.field select,
.field textarea {
  min-height: var(--control-height);
  padding: 11px 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 2px #00000004;
  font-weight: 400;
  line-height: 1.4;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--accent);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}
.field input[type="checkbox"],
.field.check-field input[type="checkbox"] {
  min-height: 0;
  width: 20px;
  height: 20px;
  box-shadow: none;
}
.field-help {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}
.form-error:not(:empty) {
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--error);
  background: color-mix(in srgb, var(--error) 8%, var(--surface));
}
.badge {
  border: 0;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.69rem;
}
.connection-notice {
  padding: 14px 16px;
  background: var(--surface-alt);
  border-radius: 12px;
}
.dashboard-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}
.dashboard-action {
  min-height: 100px;
  border-color: transparent;
  padding: 20px;
  gap: 16px;
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
}
.dashboard-action svg {
  padding: 9px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
}
.dashboard-action:hover {
  background: var(--surface);
  border-color: var(--accent);
}
.dashboard-overview {
  margin: 28px 0;
  gap: 20px;
}
.dashboard-count {
  padding: 8px 0 18px;
  border-color: var(--divider);
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}
.dashboard-count strong {
  color: var(--text);
  font-size: 2rem;
  letter-spacing: -0.045em;
}
.dashboard-task {
  padding: 16px 0;
  border-color: var(--divider);
  font-size: 0.88rem;
}
.dashboard-tasks h2 {
  margin-bottom: 8px;
}
.dashboard-amount {
  font-size: 0.86rem;
  color: var(--muted);
}
.settings-panel,
.account-panel {
  padding: 28px;
}
.account-panel .account-panel {
  padding: 0;
  box-shadow: none;
}
.account-form,
.section-six-form,
.section-six-device {
  gap: 18px;
}
.group-picker {
  border-color: var(--divider);
  background: var(--surface);
}
.group-check {
  padding: 12px;
  border-radius: 8px;
}
.group-check:has(input:checked) {
  background: var(--accent-soft);
}
.group-choice-list {
  scrollbar-width: thin;
}
.login-screen {
  min-height: 100dvh;
  padding: 48px 24px;
  background: var(--background);
}
.login-wrap {
  width: min(100%, 500px);
}
.login-brand-row {
  margin-bottom: 30px;
}
.login-card {
  padding: 38px;
  border: 0;
  box-shadow: var(--shadow-dialog);
  border-radius: 24px;
}
.login-card h1 {
  font-size: 1.9rem;
  margin-bottom: 12px;
}
.login-card .login-panel {
  margin-top: 28px;
}
.login-card .field-help {
  margin-top: 22px;
}
.login-footer {
  font-size: 0.73rem;
}
.login-card--signin .login-content,
.login-card--recovery .login-content {
  width: min(100%, 400px);
  margin-inline: auto;
  text-align: left;
}
.login-card--signin .login-panel {
  width: 100%;
}
.login-card--signin .field {
  min-width: 0;
}
.login-card--signin .login-panel > .button {
  justify-content: flex-start;
  text-align: left;
}
.login-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.login-links > * {
  min-width: 0;
  width: 100%;
  margin: 0;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}
.login-legal-links {
  margin-top: 8px;
  font-size: 0.875rem;
}
.login-legal-links a,
.legal-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-inline-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-card--legal {
  width: 100%;
}
.login-wrap:has(.login-card--legal) {
  width: min(100%, 800px);
}
.legal-document {
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.legal-document h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.legal-document address {
  font-style: normal;
}
.legal-document a,
.legal-navigation a {
  color: var(--text);
}
.legal-document a {
  text-decoration: underline;
}
.legal-version {
  font-size: 0.875rem;
  color: var(--muted);
}
.legal-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 12px 0 20px;
  font-size: 0.875rem;
}
.legal-navigation [aria-current="page"] {
  font-weight: 700;
}
.billing-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.billing-document-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
}
.billing-history-status {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 140px;
}
.billing-history-status .field-help {
  max-width: 180px;
  white-space: normal;
}
#billing-history th,
#billing-history td {
  padding: 14px 10px;
}
.billing-period-select {
  min-height: 44px;
  text-align: left;
  white-space: nowrap;
}
.billing-period-select[aria-current="true"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.billing-print-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.login-credentials .field input[data-pointer-focus]:focus {
  border-color: var(--border);
  outline: none;
  box-shadow: none;
}
.login-submit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.login-submit-actions > .button,
.login-links > .button {
  min-width: 0;
  min-height: 64px;
  width: 100%;
  height: max(64px, 5.5em);
  justify-content: center;
  text-align: center;
  white-space: normal;
}
.tablet-layout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 420px;
}
.tablet-layout-fields:empty {
  display: none;
}
.tablet-layout-fields .field {
  min-width: 0;
}
.tablet-layout-fields select {
  height: var(--control-height);
  min-height: var(--control-height);
  padding-block: 0;
}
.support-form {
  max-width: 680px;
}
.support-form fieldset {
  display: grid;
  gap: 18px;
  border: 0;
  padding: 0;
  margin: 24px 0 0;
  min-width: 0;
}
.support-form textarea {
  resize: vertical;
  min-height: 160px;
}
.support-form .button {
  justify-self: start;
}
.password-recovery-body {
  display: grid;
  gap: 16px;
}
.password-recovery-body .login-panel {
  width: 100%;
}
.password-recovery-body .field,
.password-recovery-body input {
  min-width: 0;
}
.password-recovery-body .button,
.password-recovery-body .text-button {
  min-height: 44px;
  white-space: normal;
  text-align: left;
}
.password-reset-field {
  display: grid;
  gap: 8px;
}
.password-reset-field > .button {
  justify-self: start;
}
dialog {
  width: 620px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 40px);
  padding: 28px;
  border: 0;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow-dialog);
  overflow-y: auto;
}
dialog::backdrop {
  background: #0919218c;
  backdrop-filter: blur(4px);
}
.dialog-head {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--divider);
}
.dialog-actions {
  position: sticky;
  bottom: -28px;
  margin: 24px -28px -28px;
  padding: 18px 28px;
  border-top: 1px solid var(--divider);
  background: var(--surface);
  z-index: 1;
}
.payment-start-dialog {
  width: 600px;
  padding: 20px;
}
.payment-start-header,
.payment-start-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.payment-start-header h2 {
  margin: 0;
}
.payment-start-close {
  border-radius: 50%;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  font-size: 1.5rem;
}
.payment-start-actions {
  justify-content: flex-end;
  margin-top: 16px;
}
.payment-start-dialog .account-closure-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.payment-start-dialog .account-closure-form > :not(.field),
.payment-start-dialog .account-closure-form > .field:nth-of-type(3) {
  grid-column: 1 / -1;
}
.payment-start-dialog .account-closure-form > .field {
  margin: 0;
  min-width: 0;
}
.payment-start-dialog .account-closure-form > h3,
.payment-start-dialog .account-closure-form > p {
  margin: 0;
}
.payment-start-dialog .account-closure-form > h3 {
  margin-top: 12px;
}
.payment-start-dialog .account-closure-form > button {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}
.payment-start-positions .table-wrap {
  max-height: 180px;
  overflow: auto;
}
@media (max-width: 480px) {
  .payment-start-dialog .account-closure-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
footer {
  border-color: var(--divider);
  color: var(--muted);
  font-size: 0.7rem;
  padding: 18px var(--page-gutter);
}
.navigation-toggle,
.navigation-close,
.navigation-backdrop {
  display: none;
}
@media (max-width: 1200px) and (min-width: 961px) {
  .shell {
    grid-template-columns: 252px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 10px;
  }
  .dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: grid;
    position: fixed;
    inset: 0 auto 0 0;
    height: 100dvh;
    width: min(330px, calc(100vw - 32px));
    z-index: 110;
    padding: 24px 14px 14px;
    transform: translateX(-105%);
    visibility: hidden;
    transition:
      transform 160ms ease,
      visibility 160ms;
    box-shadow: 16px 0 60px #00000020;
  }
  .sidebar.is-open {
    transform: none;
    visibility: visible;
  }
  .sidebar .brand {
    padding-right: 30px;
  }
  .sidebar .club,
  .sidebar .sidebar-bottom {
    display: flex;
  }
  .sidebar .sidebar-bottom {
    display: block;
  }
  .navigation-toggle {
    display: inline-grid;
    flex: 0 0 auto;
  }
  .navigation-close {
    display: inline-grid;
    position: absolute;
    top: 18px;
    right: 10px;
    min-width: 36px;
    min-height: 36px;
    width: 36px;
    height: 36px;
    padding: 8px;
  }
  .navigation-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    border: 0;
    border-radius: 0;
    background: #09192180;
  }
  body.navigation-open {
    overflow: hidden;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface);
    min-height: 68px;
    flex-wrap: nowrap;
    padding: 12px var(--page-gutter);
  }
  .topbar > span {
    margin-right: auto;
    font-size: 0.75rem;
  }
  .topbar-actions {
    flex: 0 0 auto;
  }
  .demo-notice {
    padding-top: 16px;
  }
  .page-content {
    padding-top: 24px;
  }
  .dashboard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  :root {
    --page-gutter: 18px;
  }
  .topbar {
    gap: 9px;
  }
  .topbar > span {
    font-size: 0;
  }
  .topbar > span > strong {
    font-size: 0.8rem;
  }
  .topbar .separator {
    display: none;
  }
  .topbar .appearance-toggle {
    font-size: 0.7rem;
    padding-inline: 10px;
  }
  .page-heading {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 12px;
  }
  .page-heading > div:first-child {
    flex-basis: 100%;
  }
  .page-heading .button {
    margin-top: 0;
  }
  .dashboard-actions {
    gap: 10px;
  }
  .dashboard-action {
    flex-direction: column;
    align-items: flex-start;
    min-height: 130px;
    padding: 16px;
    gap: 10px;
    font-size: 0.82rem;
  }
  .dashboard-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .settings-panel,
  .account-panel {
    padding: 20px;
  }
  .toolbar {
    padding: 16px;
  }
  th,
  td {
    padding: 14px 16px;
  }
  .login-screen {
    padding: 28px 18px;
  }
  .login-card {
    padding: 26px 22px;
  }
  .login-brand-row .brand {
    font-size: 0.95rem;
  }
  dialog {
    padding: 22px;
    max-height: calc(100dvh - 24px);
  }
  .dialog-actions {
    bottom: -22px;
    margin-inline: -22px;
    margin-bottom: -22px;
    padding: 16px 22px;
  }
  footer {
    display: block;
  }
  footer span {
    display: block;
    margin-top: 6px;
  }
}
@media (max-height: 600px) {
  .sidebar {
    padding-top: 14px;
  }
  .sidebar .club {
    margin-block: 14px 12px;
  }
  .sidebar-bottom > small {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}
@media (prefers-contrast: more) {
  body,
  body[data-theme] {
    --border: var(--text);
    --divider: var(--muted);
  }
  .button.secondary,
  .dashboard-action {
    border: 1px solid var(--text);
  }
  .sidebar nav a[aria-current="page"] {
    outline: 1px solid var(--accent);
    outline-offset: -1px;
  }
}
@media (forced-colors: active) {
  .panel,
  .stat,
  .login-card,
  dialog {
    border: 1px solid CanvasText;
    box-shadow: none;
  }
  .button,
  .dashboard-action,
  .icon-button {
    border: 1px solid ButtonText;
  }
  .sidebar nav a[aria-current="page"] {
    outline: 2px solid Highlight;
  }
  .sidebar,
  .topbar,
  .sidebar-bottom,
  th,
  td {
    border-color: CanvasText;
  }
  .navigation-backdrop:not([hidden]) {
    background: Canvas;
    opacity: 0.75;
  }
  svg {
    forced-color-adjust: auto;
  }
}
.dissolution-panel {
  margin-top: 32px;
}
.connection-notice:empty {
  display: none;
}
.dissolution-panel h2 {
  color: var(--error);
}
.dissolution-blockers {
  margin-block: 16px 24px;
  padding-inline-start: 22px;
  color: var(--muted);
  font-size: 0.86rem;
}
.dissolution-blockers li {
  padding-block: 4px;
}
body {
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
/* Form and secondary-action boundaries remain perceptible in every palette. */
.button.secondary,
.topbar .appearance-toggle,
.sidebar .account-bar .button {
  border-color: var(--border);
}
input[type="search"] {
  min-height: var(--control-height);
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  box-shadow: 0 1px 2px #00000004;
}
.search input[type="search"] {
  border: 0;
  background: transparent;
  box-shadow: none;
}
input[type="search"]:hover,
input[type="search"]:focus {
  border-color: var(--accent);
}

/* One quiet focus cue per input; no filled focus surface or stacked shadows. */
.field input:focus,
.field select:focus,
.field textarea:focus,
input[type="search"]:focus {
  box-shadow: none;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
input[type="search"]:focus-visible {
  border-color: var(--border);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.search:has(input:focus-visible) {
  border-color: var(--border);
}
.search input[type="search"]:focus-visible {
  border: 0;
  outline: none;
}
@media (forced-colors: active) {
  :focus-visible,
  .search:has(input:focus-visible) {
    outline-color: Highlight;
  }
}

/* Build25: compact tablet tools and one bounded booking workspace. */
.topbar-account-link {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.76rem;
  white-space: nowrap;
}
.tablet-toolbar,
.tablet-detail-actions,
.booking-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-block: 12px 18px;
}
.tablet-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-block: 16px 24px;
}
.tablet-action-tile {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.tablet-action-tile > .field-help {
  margin: 12px 0 0;
}
.tablet-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 52px;
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  text-align: left;
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}
.tablet-action:hover {
  border-color: var(--accent);
}
.tablet-action strong {
  font-size: 1rem;
}
.tablet-action small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}
.tablet-device-picker {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
  margin-block: 20px;
}
.tablet-device-picker .field {
  flex: 1 1 240px;
  max-width: 440px;
  margin: 0;
}
.tablet-detail {
  min-width: 0;
  max-width: 760px;
}
.tablet-detail .section-six-device {
  padding: 20px;
}
.tablet-detail .section-six-form,
.tablet-dialog .section-six-form {
  max-width: 38rem;
}
.tablet-detail .field {
  max-width: 380px;
}
.tablet-dialog {
  width: min(42rem, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}
.tablet-dialog.tablet-assignment-dialog {
  width: min(72rem, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}
.tablet-assignment-dialog .assignment-close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--control-height);
  height: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
  margin-inline-start: auto;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}
.group-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.group-picker-heading h3 {
  margin: 0;
}
.group-bulk-toggle {
  font-size: 1.6rem;
  padding: 0;
  width: var(--control-height);
  min-width: var(--control-height);
}
.assignment-actions {
  position: sticky;
  bottom: -1px;
  padding-block: var(--space-3);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 1;
}
.tablet-dialog .field {
  min-width: 0;
}
.tablet-dialog input[type="file"] {
  width: 100%;
}
.booking-tabs {
  gap: 8px;
}
.booking-tabs [role="tab"] {
  min-height: 44px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.booking-tabs [aria-selected="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 650;
}
.booking-tab-panel {
  min-width: 0;
}
.receipt-older {
  margin-top: 16px;
}
.receipt-older > summary {
  padding: 12px 0;
  color: var(--accent);
  cursor: pointer;
}
.receipt-scroll {
  max-height: 22rem;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 4px;
}
.receipt-scroll:focus-visible,
.receipt-older > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
@media (max-width: 1100px) {
  .tablet-actions {
    gap: 12px;
  }
  .tablet-action-tile {
    padding: 16px;
  }
}
@media (max-width: 700px) {
  .tablet-actions {
    grid-template-columns: 1fr;
  }
  .tablet-action {
    min-height: 48px;
    gap: 6px;
  }
}
@media (max-width: 600px) {
  .topbar {
    flex-wrap: wrap;
  }
  .topbar > span {
    flex: 1 1 50px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .topbar-actions {
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    margin-left: auto;
  }
  .topbar-account-link {
    padding-inline: 8px;
    font-size: 0.7rem;
  }
  .tablet-dialog {
    padding: 20px;
  }
  .tablet-detail .section-six-device {
    padding: 16px;
  }
  .booking-tabs {
    align-items: stretch;
  }
  .booking-tabs [role="tab"] {
    flex: 1 1 130px;
  }
}

.tablet-dialog input[name="tabletPin"] {
  width: min(100%, 15rem);
}

.tablet-selected-details {
  min-width: 0;
  margin-top: 18px;
}
.tablet-device-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 8px 18px;
  max-width: 620px;
  margin: 12px 0 22px;
  font-size: 0.85rem;
}
.tablet-device-info dt {
  color: var(--muted);
}
.tablet-device-info dd {
  margin: 0;
  overflow-wrap: anywhere;
}
label.tablet-device-picker {
  display: grid;
  gap: 8px;
  max-width: 440px;
}
label.tablet-device-picker select {
  width: 100%;
  min-width: 0;
}
.tablet-dialog .panel,
.tablet-dialog .account-panel {
  padding: 0;
  margin-block: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
@media (max-width: 420px) {
  .tablet-device-info {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .tablet-device-info dd {
    margin-bottom: 8px;
  }
}

.tablet-detail .button,
.tablet-dialog .section-six-form > button {
  justify-self: start;
  max-width: 100%;
}

.tablet-detail select[aria-label="Tablet-Theme"] {
  width: min(100%, 380px);
  min-height: var(--control-height);
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  box-shadow: none;
}
.tablet-device-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Device selection and settings share a compact desktop workspace. */
.nav-settings-children {
  display: grid;
  gap: 4px;
  margin-inline-start: 18px;
  padding-inline-start: 10px;
  border-inline-start: 1px solid var(--border);
}
.sidebar nav .nav-settings-children a {
  font-size: 0.78rem;
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  gap: 12px;
}
.toolbar.admin-toolbar {
  justify-content: flex-start;
}
.admin-search-field,
.toolbar .search-field,
.admin-search-input {
  width: min(100%, 320px);
  max-width: 320px;
  min-width: 0;
  flex: 0 1 320px;
}
.admin-toolbar .field {
  margin: 0;
}
.user-management-toolbar {
  margin-block: 18px 28px;
}
.booking-navigation {
  margin-block: 12px 18px;
}
.booking-navigation .booking-tabs {
  margin: 0;
}
.invitation-panel {
  width: 50%;
  min-width: min(100%, 360px);
}
@media (max-width: 760px) {
  .invitation-panel {
    width: 100%;
  }
}
.tablet-settings-layout {
  --tablet-column-gap: 32px;
  --tablet-editor-width: max(
    280px,
    calc((100% - var(--tablet-column-gap)) / 2.6)
  );
  display: grid;
  /* The action row defines the left edge-to-edge width. Keep the existing
     right track size so the name field only moves left, without resizing. */
  grid-template-columns:
    fit-content(
      calc(100% - var(--tablet-column-gap) - var(--tablet-editor-width))
    )
    var(--tablet-editor-width);
  gap: 18px var(--tablet-column-gap);
  align-items: start;
}
.tablet-settings-layout.tablet-detail {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.tablet-settings-sidebar,
.tablet-settings-editor {
  min-width: 0;
}
.tablet-settings-sidebar {
  grid-column: 1;
  grid-row: 1;
}
.tablet-settings-editor {
  grid-column: 2;
  grid-row: 1 / span 4;
}
.tablet-settings-layout > .tablet-detail-actions,
.tablet-settings-layout > .tablet-appearance-actions,
.tablet-settings-layout > .tablet-layout-fields,
.tablet-settings-layout > .tablet-device-management-actions {
  grid-column: 1;
}
.tablet-settings-sidebar .tablet-device-picker {
  margin: 0;
  max-width: none;
}
.tablet-selection-summary .tablet-device-info {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-block: 18px 0;
}
.tablet-settings-editor .tablet-selected-details {
  margin-top: 0;
}
.tablet-settings-editor .tablet-selected-details {
  display: grid;
  gap: 18px;
}
.tablet-detail-heading {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(100px, 1fr);
  gap: 24px;
  align-items: end;
}
.tablet-detail-heading .field {
  margin: 0;
}
.tablet-status-field {
  align-content: center;
  justify-items: start;
  min-height: var(--control-height);
}
.tablet-settings-layout > .tablet-detail-actions {
  margin-block: 2px;
}
.tablet-appearance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.tablet-appearance-actions .tablet-theme-field {
  margin: 0;
  width: min(100%, 230px);
}
.tablet-settings-layout > .tablet-device-management-actions {
  margin-top: 14px;
}
@media (max-width: 1100px) {
  .tablet-settings-layout {
    --tablet-column-gap: 24px;
    --tablet-editor-width: max(
      270px,
      calc((100% - var(--tablet-column-gap)) / 2.2)
    );
  }
  .tablet-detail-heading {
    grid-template-columns: minmax(160px, 1fr) minmax(90px, 0.6fr);
    gap: 16px;
  }
}
@media (max-width: 760px) {
  .tablet-settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .tablet-settings-sidebar .tablet-device-picker {
    max-width: 440px;
  }
  .tablet-settings-editor {
    grid-column: 1;
    grid-row: 2;
  }
}
@media (max-width: 420px) {
  .tablet-detail-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .tablet-status-field {
    min-height: 0;
  }
}
.payment-run-preview:empty {
  display: none;
}
.payment-member-preview {
  margin-top: 1.25rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.payment-preview-label {
  display: inline-block;
  margin-block: 0.5rem 1rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid currentColor;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.payment-preview-total {
  font-size: 1.15rem;
  font-weight: 750;
}
.payment-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.payment-preview-actions .button {
  min-height: 44px;
}
.payment-preview-actions svg {
  flex-shrink: 0;
  margin-right: 0.5rem;
}
.payment-mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}
.payment-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.25rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
}
.payment-mode-card strong {
  font-size: 1.1rem;
}
.payment-mode-card .field-help {
  margin: 0;
}
.payment-mode-card[aria-pressed="true"] {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}
.payment-account-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-block: 0.5rem 1rem;
}
.payment-account-picker > summary,
.payment-run-controls > summary,
.payment-history > summary {
  min-height: 48px;
  padding: 0.85rem 1rem;
  font-weight: 700;
  cursor: pointer;
}
.payment-account-dropdown {
  padding: 0 1rem 1rem;
}
.payment-account-options {
  margin: 0.75rem 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.payment-account-option {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem;
  min-height: 56px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.payment-account-option:hover,
.payment-account-option.keyboard-active {
  background: var(--accent-soft);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.payment-account-totals,
.payment-schedule-summary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.5rem 1rem;
  margin-block: 1rem;
}
.payment-account-totals dd,
.payment-schedule-summary dd {
  margin: 0;
  font-weight: 700;
}
.payment-account-round {
  margin-block: 0.75rem;
}
.payment-account-detail:empty,
.payment-selected-invoice:empty,
.payment-account-cash:empty {
  display: none;
}
.payment-run-controls {
  margin-block: 1rem;
}
.payment-cash-form {
  padding: 1rem;
  margin-block: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.payment-cash-form .field {
  max-width: 360px;
}
.payment-cash-form > button {
  margin: 0.4rem 0.5rem 0.4rem 0;
}
.payment-history-older {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 600px) {
  .payment-mode-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .payment-account-totals,
  .payment-schedule-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
  .payment-account-totals dd,
  .payment-schedule-summary dd {
    margin-bottom: 0.5rem;
  }
}

/* Compact consumption dialog; full available width on small screens. */
.tablet-dialog.member-booking-dialog {
  width: min(36rem, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}
.member-booking-dialog > .section-six-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem 1.25rem;
  max-width: none;
}
.member-booking-dialog > .section-six-form > .field {
  max-width: none;
  margin: 0;
}
.member-booking-dialog > .section-six-form > button,
.member-booking-dialog > .section-six-form > .field-help,
.member-booking-dialog > .section-six-form > .member-booking-preview {
  grid-column: 1 / -1;
}
.member-booking-dialog > .section-six-form > button {
  justify-self: start;
}
.money-input {
  display: block;
  position: relative;
  min-width: 0;
  width: 100%;
}
.money-input > input {
  width: 100%;
  padding-inline-end: 2.5rem;
  font-variant-numeric: tabular-nums;
}
.money-input-currency {
  position: absolute;
  inset-inline-end: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}
.product-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.product-tax-rule,
.product-tax-evidence {
  min-width: 0;
}
.product-name-status {
  display: grid;
  gap: var(--space-1);
}
.product-name-status .field-help {
  margin: 0;
  white-space: normal;
}
.product-tax-guest {
  margin-block: var(--space-4);
}
@media (max-width: 560px) {
  .product-price-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
@media (max-width: 680px) {
  .member-booking-dialog > .section-six-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
