:root {
  --background: #f9fafb;
  --surface: #ffffff;
  --surface-muted: #f3f4f6;
  --surface-soft: #f8fafc;
  --text: #111827;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --neutral-soft: #f3f4f6;
  --skeleton-base: #e5e7eb;
  --skeleton-glow: #f8fafc;
  --radius: 8px;
  --shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.28);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--background);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 0;
}

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

button {
  cursor: pointer;
}

.app-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--text, #111827);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}

.app-modal-close:hover {
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
}

.custom-prompt,
.cookie-consent,
.modal[role="dialog"],
[role="dialog"][aria-modal="true"],
[role="alertdialog"][aria-modal="true"] {
  position: relative;
}

.cookie-consent {
  padding-right: 66px;
}

@media (max-width: 720px) {
  .app-modal-close {
    top: 10px;
    right: 10px;
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .cookie-consent {
    padding-top: 58px;
    padding-right: 16px;
  }
}

button:disabled,
input[type="submit"]:disabled,
.is-submitting .button {
  cursor: wait;
  opacity: 0.68;
}

.button--loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: button-spinner 0.7s linear infinite;
}

@keyframes button-spinner {
  to {
    transform: rotate(360deg);
  }
}

:where(a, button, input, select, textarea, [tabindex]:not([tabindex="-1"]), .select2-selection, .custom-filepicker, .custom-datepicker-toggle, .password-toggle):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

:where(.button, .icon-button, .nav-item, .profile-trigger, .search-pill--button, .table-sort, .custom-filepicker, .custom-datepicker-toggle, .password-toggle):focus-visible {
  border-color: var(--primary);
}

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

.auth-page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 36px);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #f6f9ff 0%, #eef4ff 44%, #ffffff 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

.auth-shell {
  width: min(1120px, 100%);
  min-height: min(760px, calc(100vh - 48px));
  min-height: min(760px, calc(100svh - 48px));
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.05fr);
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.16);
  animation: authShellIn 460ms ease-out both;
}

.auth-aside {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 34px;
  padding: clamp(30px, 4vw, 46px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(145deg, #0f172a 0%, #1d4ed8 50%, #111827 100%);
  background-size: 34px 34px, 34px 34px, auto;
}

.auth-aside::after {
  content: "";
  position: absolute;
  right: -14%;
  bottom: -18%;
  width: 86%;
  height: 42%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02));
  transform: rotate(-10deg);
}

.auth-aside__brand,
.auth-aside__copy,
.auth-proof-stack,
.auth-proof {
  position: relative;
  z-index: 1;
}

.auth-aside .brand-lockup__mark {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.auth-aside .eyebrow,
.auth-aside p,
.auth-aside small {
  color: rgba(255, 255, 255, 0.72);
}

.auth-aside strong,
.auth-aside h2 {
  color: #fff;
}

.auth-aside__copy {
  display: grid;
  gap: 16px;
  align-self: center;
}

.auth-aside__copy h2 {
  max-width: 12.5ch;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.65rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.auth-aside__copy p {
  max-width: 38ch;
  margin: 0;
}

.auth-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.auth-kicker--light {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-kicker--light .icon {
  color: #2563eb;
}

.auth-proof-stack {
  display: grid;
  gap: 12px;
}

.auth-proof {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 12px;
  max-width: 360px;
  padding: 16px 17px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.auth-proof span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  grid-row: span 2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
}

.auth-proof strong {
  align-self: end;
}

.auth-proof small {
  line-height: 1.45;
}

.auth-card {
  width: 100%;
  display: grid;
  align-content: center;
  gap: 24px;
  padding: clamp(28px, 5vw, 62px);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    var(--surface);
  box-shadow: none;
}

.auth-brand {
  display: none;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-card p {
  max-width: 48ch;
  margin: 0;
  color: var(--text-muted);
}

.auth-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  animation: authContentIn 520ms 80ms ease-out both;
}

.auth-login-form {
  gap: 18px;
  animation: authContentIn 520ms 140ms ease-out both;
}

.auth-login-form .field {
  gap: 8px;
}

.auth-login-form .field > span {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-login-form input {
  min-height: 54px;
  border-color: #d8e1e6;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-login-form input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
  outline: none;
}

.auth-login-form input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.auth-error {
  margin-bottom: 18px;
  border-color: rgba(220, 38, 38, 0.24);
  border-radius: 14px;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 700;
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-primary-action {
  min-height: 50px;
  padding-inline: 20px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
  font-weight: 800;
}

.auth-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.34);
}

.auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d8e1e6;
  border-radius: 14px;
  color: #2563eb;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.auth-link:hover {
  border-color: rgba(37, 99, 235, 0.32);
  color: #1d4ed8;
  background: #eff6ff;
  text-decoration: none;
}

.auth-helper-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.auth-inline-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.auth-inline-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.auth-security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
  animation: authContentIn 520ms 200ms ease-out both;
}

.auth-security-grid span {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 126px;
  padding: 14px;
  border: 1px solid #dbe7e4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.auth-security-grid .icon {
  color: #2563eb;
}

.auth-security-grid strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.auth-security-grid small {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.auth-footnote {
  margin-top: 18px;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.55;
}

@keyframes authShellIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes authContentIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell,
  .auth-heading,
  .auth-login-form,
  .auth-security-grid {
    animation: none;
  }

  .auth-primary-action:hover {
    transform: none;
  }
}

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

.pin-grid input {
  min-height: 52px;
  padding: 0;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
}

.pin-input {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
}

.form-alert {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
}

.form-notice {
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}

.app-shell {
  display: block;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar__left,
.topbar__right,
.brand-lockup,
.profile-trigger,
.page-header,
.page-header__actions,
.panel__head,
.stat-card__head,
.list-card,
.list-card__title,
.legend-row,
.legend-row__left,
.legend-row__right,
.activity-row,
.calendar-grid,
.table-actions,
.availability,
.modal__head,
.modal-actions,
.detail-header,
.audit-row,
.invoice-sheet__head,
.invoice-line,
.toggle-row,
.utilization-row__head,
.field-grid {
  display: flex;
  align-items: center;
}

.topbar__left {
  flex: 1;
  min-width: 0;
  gap: 16px;
}

.topbar__right,
.page-header__actions,
.table-actions,
.modal-actions,
.pill-row,
.tab-row {
  gap: 8px;
}

.topbar__right {
  justify-content: flex-end;
}

.brand-lockup {
  gap: 12px;
  min-width: 0;
}

.brand-lockup__mark,
.token-badge,
.avatar,
.legend-dot,
.status-dot {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-lockup__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.brand-lockup strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 3px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  margin-bottom: 0;
  letter-spacing: 0;
  color: var(--text);
}

h1 {
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
}

h2 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 600;
}

p {
  line-height: 1.55;
}

.sidebar__intro p:last-child,
.page-header p,
.panel p,
.report-card p,
.field span,
.detail-pair span,
.toggle-row small,
.invoice-sheet small,
.empty-state,
.list-card small,
.activity-row small,
.legend-row small,
.audit-row p,
.audit-row small,
.detail-header small,
.stat-card__label,
.stat-card__meta {
  color: var(--text-muted);
}

.sidebar {
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 256px;
  gap: 14px;
  padding: 16px;
  overflow: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: width 200ms ease, padding 200ms ease, opacity 160ms ease;
}

.sidebar--collapsed {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  overflow: hidden;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  display: none;
  border: 0;
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
}

.sidebar-backdrop[hidden] {
  display: none;
}

.sidebar__intro {
  padding: 8px 8px 12px;
}

.sidebar__mobile-brand,
.profile-trigger__mobile-label {
  display: none;
}

.sidebar__intro p:last-child {
  margin: 8px 0 0;
  font-size: 0.875rem;
}

.sidebar__nav,
.stack-list,
.legend-list,
.toast-stack,
.hero-grid,
.kanban-grid,
.stats-grid,
.report-grid,
.content-grid,
.form-grid,
.detail-grid,
.toggle-list {
  display: grid;
}

.sidebar__nav,
.stack-list,
.legend-list,
.form-grid,
.toggle-list {
  gap: 10px;
}

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

.nav-section > p {
  margin: 12px 10px 2px;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-section:first-child > p {
  margin-top: 0;
}

.form-grid--compact {
  gap: 8px;
}

.form-grid--compact input {
  min-width: 180px;
}

.toggle-row--inline {
  min-height: 38px;
}

.nav-item,
.button,
.icon-button,
.profile-trigger,
.tab,
.task-card,
.toggle-row {
  border: 1px solid transparent;
  background: transparent;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #374151;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--surface-muted);
}

.nav-item.is-active {
  border-color: rgba(37, 99, 235, 0.25);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--primary), 0 10px 20px rgba(37, 99, 235, 0.08);
}

.nav-item.is-active .token-badge {
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.sidebar__footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.sidebar__footer strong,
.sidebar__footer span {
  display: block;
  font-size: 0.875rem;
}

.sidebar__footer span {
  margin-top: 6px;
  color: var(--text-muted);
}

.workspace {
  min-height: 100vh;
  min-width: 0;
  margin-left: 256px;
  padding-top: 64px;
  transition: margin-left 200ms ease;
}

.workspace--wide {
  margin-left: 0;
}

.workspace__content {
  position: relative;
  min-width: 0;
  padding: 24px;
}

.workspace-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.workspace-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  text-decoration: none;
}

.workspace-breadcrumb a:hover {
  color: var(--primary-strong);
}

.workspace-breadcrumb strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  display: grid;
  min-width: 0;
  gap: 24px;
}

.dashboard-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
}

.dashboard-header p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.search-pill,
.profile-trigger {
  min-height: 40px;
  border-radius: var(--radius);
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(34vw, 320px);
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.875rem;
}

.search-pill--button {
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.search-pill--button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-pill--button kbd {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.search-pill--button:hover {
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.1);
}

.platform-oversight-pill {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 210px;
  white-space: nowrap;
}

.merchant-switcher {
  display: block;
  min-width: 220px;
}

.merchant-switcher .select2-container {
  width: 100% !important;
}

.merchant-switcher .select2-container--default .select2-selection--single {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.merchant-switcher .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 12px;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 38px;
}

.merchant-switcher .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
  right: 8px;
}

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

.account-menu {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.profile-trigger:hover,
.account-menu.is-open .profile-trigger,
.account-menu:focus-within .profile-trigger,
.icon-button:hover,
.button--ghost:hover,
.tab:hover {
  background: var(--surface-muted);
}

.account-menu.is-open .profile-trigger,
.account-menu:focus-within .profile-trigger {
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--primary-strong);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.account-menu.is-open .profile-trigger__mobile-icon,
.account-menu:focus-within .profile-trigger__mobile-icon {
  color: var(--primary-strong);
}

.profile-trigger strong,
.profile-trigger small {
  display: block;
  text-align: left;
}

.profile-trigger small {
  color: var(--text-muted);
}

.profile-trigger__chevron {
  color: var(--text-soft);
  font-size: 0.7rem;
}

.profile-trigger__mobile-icon {
  display: none;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  display: none;
  width: min(280px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-menu.is-open .account-dropdown,
.account-menu:focus-within .account-dropdown {
  display: block;
}

.account-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.account-dropdown__head,
.account-dropdown a,
.account-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-dropdown__head {
  padding: 8px 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.account-dropdown__head strong,
.account-dropdown__head small {
  display: block;
}

.account-dropdown__head small {
  max-width: 200px;
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
}

.account-dropdown a,
.account-dropdown button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: var(--surface-muted);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-color: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: #374151;
  font-size: 0.72rem;
  font-weight: 700;
}

.icon-button--danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.icon-button--danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 1rem;
  line-height: 1;
}

.notification-menu {
  position: relative;
}

.notification-button {
  position: relative;
}

.notification-button span {
  position: absolute;
  top: 3px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--surface);
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 55;
  display: none;
  width: min(380px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
}

.notification-menu.is-open .notification-dropdown {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.notification-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 16px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.notification-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.notification-dropdown__head strong,
.notification-empty strong,
.notification-item strong {
  display: block;
  color: var(--text);
}

.notification-dropdown__head small,
.notification-empty p,
.notification-item p,
.notification-item small {
  color: var(--text-muted);
}

.notification-dropdown__head small,
.notification-item small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
}

.notification-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.notification-summary__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.notification-summary__chip--danger {
  background: #fee2e2;
  color: #991b1b;
}

.notification-summary__chip--warning {
  background: #fef3c7;
  color: #92400e;
}

.notification-summary__chip--neutral {
  background: #e0f2fe;
  color: #0369a1;
}

.notification-summary__chip--success {
  background: #dcfce7;
  color: #166534;
}

.notification-dropdown__list {
  overflow: auto;
  padding: 8px;
}

.notification-empty,
.notification-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
}

.notification-item {
  color: inherit;
  text-decoration: none;
}

.notification-item:hover {
  background: var(--surface-muted);
}

.notification-empty p,
.notification-item p {
  margin: 4px 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
}

.notification-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.notification-item__icon--success {
  background: #dcfce7;
  color: #166534;
}

.notification-item__icon--warning {
  background: #fef3c7;
  color: #92400e;
}

.notification-item__icon--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.notification-item__icon--neutral {
  background: #e0f2fe;
  color: #0369a1;
}

.notification-dropdown__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.notification-dropdown__foot:hover {
  background: #e0f2fe;
}

.global-search {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: 9vh 18px 18px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
}

.global-search[hidden] {
  display: none;
}

.global-search__dialog {
  display: grid;
  width: min(720px, 100%);
  max-height: min(760px, 84vh);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
}

.global-search__input {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.global-search__input input {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.global-search__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.global-search__head .eyebrow {
  margin: 0;
}

.global-search__head span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.global-search__results {
  display: grid;
  gap: 6px;
  overflow: auto;
  padding: 10px;
}

.global-search__section {
  display: grid;
  gap: 6px;
}

.global-search__section + .global-search__section {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

.global-search__section-title {
  margin: 4px 6px 2px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.global-search__item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.global-search__item:hover,
.global-search__item:focus,
.global-search__item.is-active {
  background: var(--surface-muted);
}

.global-search__item.is-active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.global-search__item strong,
.global-search__item small {
  display: block;
}

.global-search__item small {
  margin-top: 3px;
  color: var(--text-muted);
}

.global-search__item em {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.global-search__item mark {
  border-radius: 4px;
  padding: 0 2px;
  background: #fef3c7;
  color: inherit;
}

.global-search__empty {
  min-height: 150px;
  padding: 28px 18px;
  color: var(--text-muted);
  text-align: center;
}

.global-search__empty strong {
  display: block;
  color: var(--text);
}

.global-search__empty p {
  margin: 6px auto 0;
  max-width: 42ch;
}

@media (max-width: 520px) {
  .notification-dropdown {
    position: fixed;
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 92px);
  }

  .notification-dropdown::before {
    display: none;
  }
}

.icon-button--small {
  width: 34px;
  height: 34px;
  font-size: 0.68rem;
}

.profile-menu-wrap {
  position: relative;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 180px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-menu button {
  padding: 11px 14px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: #374151;
  text-align: left;
}

.profile-menu button:first-child {
  border-top: 0;
}

.profile-menu button:hover {
  background: var(--surface-muted);
}

.page-header {
  justify-content: space-between;
  gap: 20px;
}

.page-header > div:first-child {
  min-width: 0;
}

.page-header p {
  max-width: 62ch;
  margin: 6px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-color: var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.button:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.button--ghost {
  border-color: var(--border);
  background: var(--surface);
  color: #374151;
  box-shadow: none;
}

.button--ghost:hover {
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.button--danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
}

.button--danger:hover {
  border-color: #b91c1c;
  background: #b91c1c;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
}

.button--small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.template-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.template-download-grid .button {
  justify-content: flex-start;
  width: 100%;
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.hero__copy h2 {
  max-width: 18ch;
}

.hero__copy p {
  max-width: 62ch;
  color: var(--text-muted);
}

.hero__panel {
  display: grid;
  gap: 16px;
}

.hero-signal,
.hero-grid article {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.hero-signal span,
.hero-grid span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hero-signal strong {
  display: block;
  margin: 10px 0;
  font-size: 2.25rem;
  line-height: 1;
}

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

.hero-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

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

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

.panel,
.stat-card,
.task-card,
.list-card,
.alert-row,
.calendar-chip,
.field input,
.field select,
.field textarea,
.search-pill,
.profile-menu,
.modal,
.toast,
.toggle-row,
.detail-pair,
.chip-fieldset,
.audit-row {
  border: 1px solid var(--border);
  background: var(--surface);
}

.panel,
.stat-card,
.task-card,
.list-card,
.alert-row,
.toggle-row {
  border-radius: var(--radius);
}

.panel {
  min-width: 0;
  padding: 24px;
}

.panel__head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  min-width: 0;
  padding: 20px;
}

.stat-card__head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.stat-card__label,
.stat-card__meta {
  display: block;
  font-size: 0.875rem;
}

.stat-card__value {
  display: block;
  margin: 8px 0 5px;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
}

.token-badge {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-item .token-badge {
  padding: 0;
}

.token-badge--teal,
.token-badge--slate,
.token-badge--stone {
  background: var(--primary-soft);
  color: var(--primary);
}

.token-badge--amber {
  background: var(--warning-soft);
  color: var(--warning);
}

.token-badge--green,
.token-badge--emerald {
  background: #ecfdf5;
  color: #059669;
}

.token-badge--purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.token-badge--rose {
  background: #fff1f2;
  color: #e11d48;
}

.content-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  gap: 24px;
}

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

.panel__head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.grouped-chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  align-items: end;
  gap: 16px;
  height: 300px;
  padding: 16px 8px 6px;
  border-bottom: 1px solid var(--border);
  background-image: linear-gradient(to top, var(--border) 1px, transparent 1px);
  background-size: 100% 25%;
}

.grouped-chart__month {
  display: grid;
  gap: 10px;
  align-items: end;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.grouped-chart__bars {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 8px;
  height: 100%;
}

.grouped-chart__bar {
  width: min(32px, 38%);
  min-height: 8px;
  border-radius: 6px 6px 0 0;
}

.grouped-chart__bar--revenue {
  background: #3b82f6;
}

.grouped-chart__bar--costs {
  background: #94a3b8;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot--revenue {
  background: #3b82f6;
}

.legend-dot--costs {
  background: #94a3b8;
}

.service-chart {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 300px;
}

.service-chart__donut {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 999px;
}

.service-chart__donut span {
  position: absolute;
  inset: 22%;
  border-radius: inherit;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.dashboard-wide-action {
  width: 100%;
  margin-top: 16px;
}

.dashboard-panel--shifts,
.dashboard-panel--focus {
  display: flex;
  flex-direction: column;
}

.shift-mini-list,
.focus-grid {
  display: grid;
  gap: 12px;
}

.shift-mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.shift-mini-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
}

.shift-mini-card--success::before {
  background: var(--success);
}

.shift-mini-card--warning::before {
  background: var(--warning);
}

.shift-mini-card--danger::before {
  background: var(--danger);
}

.shift-mini-card__date {
  display: grid;
  place-items: center;
  min-height: 56px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.shift-mini-card__date strong {
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1;
}

.shift-mini-card__date span {
  margin-top: 4px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
}

.shift-mini-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.shift-mini-card__body strong,
.focus-card__body strong {
  color: var(--text);
  line-height: 1.25;
}

.shift-mini-card__body span {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.shift-mini-card__body small,
.focus-card__body small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.shift-mini-card__meta {
  display: flex;
  justify-content: flex-end;
}

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

.focus-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.focus-card:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.36);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.focus-card__icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--primary);
  background: rgba(20, 184, 166, 0.1);
}

.focus-card__body {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.focus-card__value {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
}

.focus-card--success .focus-card__icon {
  color: var(--success);
  background: var(--success-soft);
}

.focus-card--warning .focus-card__icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.focus-card--danger .focus-card__icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.focus-card--neutral .focus-card__icon {
  color: #4b5563;
  background: var(--neutral-soft);
}

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

.quick-action-grid .button {
  justify-content: flex-start;
  min-height: 48px;
}

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

.legend-list {
  gap: 10px;
}

.legend-row {
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.legend-row__right {
  gap: 10px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge--success {
  background: var(--success-soft);
  color: var(--success);
}

.badge--warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--neutral {
  background: var(--neutral-soft);
  color: #4b5563;
}

.activity-feed {
  position: relative;
  display: grid;
  gap: 12px;
}

.activity-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  min-height: 64px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.activity-row::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 44px;
  bottom: -18px;
  width: 1px;
  background: var(--border);
}

.activity-row:last-child::before {
  display: none;
}

.activity-row::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
}

.activity-row--success::after {
  background: var(--success);
}

.activity-row--warning::after {
  background: var(--warning);
}

.activity-row--danger::after {
  background: var(--danger);
}

.activity-row__body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.activity-row__body strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.35;
}

.activity-row__body small {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 16px;
  height: 16px;
  margin: 3px auto 0;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--border);
}

.status-dot--success {
  background: var(--success);
}

.status-dot--warning {
  background: var(--warning);
}

.status-dot--neutral {
  background: var(--primary);
}

.status-dot--danger {
  background: var(--danger);
}

.list-card,
.alert-row,
.toggle-row {
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.list-card__meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.alert-row--danger {
  border-color: #fecaca;
  background: var(--danger-soft);
}

.alert-row--warning {
  border-color: #fde68a;
  background: var(--warning-soft);
}

.field-grid {
  gap: 16px;
}

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

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

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

.field {
  display: grid;
  gap: 7px;
}

.form-grid,
.admin-control-form,
.crud-form {
  position: relative;
  align-items: start;
}

.form-grid .field,
.admin-control-form .field,
.crud-form .field {
  position: relative;
}

.form-grid .field > span,
.admin-control-form .field > span,
.crud-form .field > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
}

.form-grid .field > span::after,
.admin-control-form .field > span::after,
.crud-form .field > span::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: transparent;
}

.form-grid .field:has(:required) > span::after,
.admin-control-form .field:has(:required) > span::after,
.crud-form .field:has(:required) > span::after {
  background: var(--primary);
}

.field--password {
  position: relative;
}

.field--password input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: auto;
  bottom: 8px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
}

.auth-login-form .password-toggle {
  top: auto;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.password-toggle:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.field--date {
  position: relative;
}

.field--date input {
  padding-right: 48px;
}

.custom-datepicker-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
}

.custom-datepicker-toggle:hover {
  background: var(--surface-muted);
  color: var(--primary);
}

.custom-datepicker-popover {
  position: absolute;
  z-index: 2600;
  width: min(306px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.custom-datepicker__head,
.custom-datepicker__week,
.custom-datepicker__grid,
.custom-datepicker__actions {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.custom-datepicker__head {
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  margin-bottom: 10px;
}

.custom-datepicker__period {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem;
  gap: 6px;
  min-width: 0;
}

.custom-datepicker__period select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border, #dbe4f0);
  border-radius: 9px;
  background: #fff;
  color: var(--text, #102033);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
}

.custom-datepicker__head strong {
  text-align: center;
  font-size: 0.95rem;
}

.custom-datepicker__head button,
.custom-datepicker__day,
.custom-datepicker__actions button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.custom-datepicker__head button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
}

.custom-datepicker__head button:hover,
.custom-datepicker__day:hover,
.custom-datepicker__actions button:hover {
  border-color: rgba(37, 99, 235, 0.24);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.custom-datepicker__week {
  margin-bottom: 6px;
}

.custom-datepicker__week span {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.custom-datepicker__day {
  min-height: 34px;
  padding: 0;
  font-size: 0.85rem;
}

.custom-datepicker__day.is-muted {
  color: var(--text-soft);
  background: #f8fafc;
}

.custom-datepicker__day.is-today {
  border-color: rgba(37, 99, 235, 0.35);
}

.custom-datepicker__day.is-selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.custom-datepicker__day:disabled {
  cursor: not-allowed;
  opacity: .38;
  color: var(--text-soft);
  background: #f8fafc;
}

.custom-datepicker__actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.custom-datepicker__actions button {
  min-height: 36px;
  background: var(--surface-soft);
  color: var(--primary);
}

.field--search {
  max-width: 320px;
}

.field--search-wide {
  max-width: 420px;
}

.field span,
.chip-fieldset legend {
  font-size: 0.875rem;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: var(--focus-ring);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #bfdbfe;
}

.field .select2-container {
  width: 100% !important;
}

.field .select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.select2-container--focus .select2-selection,
.select2-container--open .select2-selection {
  border-color: var(--primary) !important;
  box-shadow: var(--focus-ring);
}

.field .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 12px;
  color: var(--text);
  line-height: 42px;
}

.field .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px;
  right: 8px;
}

.rich-text-field {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body.rich-text-expanded-active {
  overflow: hidden;
}

.rich-text-field.is-expanded {
  position: fixed;
  inset: 24px;
  z-index: 2600;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.48), 0 28px 80px rgba(15, 23, 42, 0.32);
}

.rich-text-field.is-expanded .rich-text-toolbar {
  padding: 10px;
}

.rich-text-field.is-expanded .rich-text-surface {
  max-height: none;
  min-height: 0;
  padding: 22px;
  font-size: 1rem;
}

.rich-text-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.rich-text-field.is-expanded:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.48), 0 28px 80px rgba(15, 23, 42, 0.32), 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.field--error .rich-text-field {
  border-color: var(--danger);
  background: #fff7f7;
}

.rich-text-field.is-invalid {
  border-color: var(--danger);
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.rich-text-field.is-near-limit .rich-text-status {
  color: #b45309;
  font-weight: 700;
}

.rich-text-field.is-over-limit .rich-text-status {
  color: var(--danger);
  font-weight: 800;
}

.rich-text-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 42px;
  padding: 6px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.rich-text-toolbar button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.rich-text-toolbar button:hover,
.rich-text-toolbar button.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.rich-text-toolbar > span {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  background: var(--border);
}

.rich-text-link-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.rich-text-link-tools[hidden] {
  display: none;
}

.rich-text-link-tools input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.rich-text-link-tools .button {
  min-height: 38px;
  padding: 0 12px;
}

@media (max-width: 640px) {
  .rich-text-field.is-expanded {
    inset: 10px;
    border-radius: 14px;
  }

  .rich-text-link-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .rich-text-link-tools .button {
    width: 100%;
  }
}

/* HCI navigation pass: legibility, recognition, target size and clear system state. */
.sidebar {
    --nav-text: #f8fafc;
    --nav-muted: #cbd5e1;
    --nav-hover: rgba(255, 255, 255, .12);
    --nav-active: #ffffff;
    --nav-focus: #fbbf24;
}
.sidebar-menu-search input {
    min-height: 46px;
    border-width: 2px;
    font-size: .94rem;
}
.sidebar__nav--accordion {
    gap: .75rem;
}
.sidebar__nav--accordion .nav-section {
    border-color: rgba(255, 255, 255, .2);
    background: rgba(15, 23, 42, .18);
}
.sidebar__nav--accordion .nav-section__summary {
    min-height: 48px;
    padding: .78rem .9rem !important;
    color: var(--nav-text) !important;
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .01em;
}
.sidebar__nav--accordion .nav-section__summary:hover {
    background: var(--nav-hover);
}
.sidebar__nav--accordion .nav-section__summary:focus-visible {
    outline: 3px solid var(--nav-focus);
    outline-offset: -3px;
}
.sidebar__nav--accordion .nav-section__summary small {
    min-width: 1.9rem;
    color: var(--nav-text);
    background: rgba(255, 255, 255, .16);
}
.sidebar__nav--accordion .nav-section__items {
    gap: .32rem !important;
}
.sidebar__nav--accordion .nav-item {
    position: relative;
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--nav-text) !important;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.3;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.sidebar__nav--accordion .nav-item > span:last-child {
    color: inherit !important;
    font-size: inherit;
    font-weight: inherit;
}
.sidebar__nav--accordion .nav-item .token-badge {
    color: var(--nav-muted);
    background: rgba(255, 255, 255, .1);
}
.sidebar__nav--accordion .nav-item:hover {
    border-color: rgba(255, 255, 255, .22);
    background: var(--nav-hover) !important;
    color: #fff !important;
}
.sidebar__nav--accordion .nav-item:hover .token-badge {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}
.sidebar__nav--accordion .nav-item.is-active {
    border-color: rgba(255, 255, 255, .72);
    background: var(--nav-active) !important;
    color: #0f3f46 !important;
    box-shadow: inset 4px 0 0 #0f766e, 0 8px 18px rgba(2, 6, 23, .2);
}
.sidebar__nav--accordion .nav-item.is-active::after {
    content: "Current";
    justify-self: end;
    grid-column: 3;
    padding: .16rem .38rem;
    border-radius: 999px;
    background: #ccfbf1;
    color: #115e59;
    font-size: .62rem;
    font-weight: 850;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.sidebar__nav--accordion .nav-item.is-active {
    grid-template-columns: 2.55rem minmax(0, 1fr) auto !important;
}
.sidebar__nav--accordion .nav-item.is-active .token-badge {
    color: #0f766e;
    background: #ccfbf1;
}
.sidebar__nav--accordion .nav-item:focus-visible {
    outline: 3px solid var(--nav-focus);
    outline-offset: 2px;
}
.sidebar__nav--accordion .nav-item--standalone {
    color: #0f172a !important;
}
.sidebar__nav--accordion .nav-item--standalone:hover {
    background: #e0f2fe !important;
    border-color: #7dd3fc;
    color: #0f3f46 !important;
}
@media (max-width: 760px) {
    .sidebar {
        --nav-text: #0f172a;
        --nav-muted: #475569;
        --nav-hover: #e2e8f0;
        --nav-active: #ecfeff;
    }
    .sidebar__nav--accordion .nav-section {
        border-color: #cbd5e1;
        background: #f8fafc;
    }
    .sidebar__nav--accordion .nav-section__summary small {
        color: #334155;
        background: #e2e8f0;
    }
    .sidebar__nav--accordion .nav-item .token-badge {
        color: #334155;
        background: #e2e8f0;
    }
    .sidebar__nav--accordion .nav-item,
    .sidebar__nav--accordion .nav-section__summary {
        min-height: 52px;
    }
    .sidebar__nav--accordion .nav-item > span:last-child {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .sidebar__nav--accordion .nav-item { transition: none; }
}

/* Navigation visibility correction: platform shell is light, and labels must never truncate. */
.sidebar--platform {
    --nav-text: #172033;
    --nav-muted: #52647d;
    --nav-hover: #e8eef7;
    --nav-active: #ffffff;
}
.sidebar--platform .sidebar__nav--accordion .nav-section {
    border-color: #d7e0ec;
    background: #f8fafc;
}
.sidebar--platform .sidebar__nav--accordion .nav-section__summary {
    color: #172033 !important;
}
.sidebar--platform .sidebar__nav--accordion .nav-section__summary small {
    color: #1d4ed8;
    background: #dbeafe;
}
.sidebar--platform .sidebar__nav--accordion .nav-section__chevron {
    color: #52647d;
}
.sidebar--platform .sidebar__nav--accordion .nav-item {
    color: #26364d !important;
}
.sidebar--platform .sidebar__nav--accordion .nav-item .token-badge {
    color: #52647d;
    background: #f8fafc;
    border: 1px solid #dbe5f1;
}
.sidebar--platform .sidebar__nav--accordion .nav-item:hover {
    color: #0f3f46 !important;
    background: #e8eef7 !important;
    border-color: #b8c7da;
}
.sidebar__nav--accordion .nav-item > span:last-child,
.sidebar__nav--accordion .nav-item.is-active > span:last-child {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    line-height: 1.3;
}
.sidebar__nav--accordion .nav-item.is-active {
    padding-right: 5.4rem !important;
}
.sidebar__nav--accordion .nav-item.is-active::after {
    position: absolute;
    top: 50%;
    right: .7rem;
    transform: translateY(-50%);
}
.sidebar--collapsed .sidebar__nav--accordion .nav-item.is-active {
    padding-right: .75rem !important;
}
.sidebar--collapsed .sidebar__nav--accordion .nav-item.is-active::after {
    display: none;
}

/* Low-cognitive-load menu: one icon column, one unconstrained text column. */
.sidebar.sidebar--platform .sidebar__nav--accordion .nav-section__items {
    padding: .5rem !important;
    gap: .25rem !important;
}
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item,
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item.is-active {
    display: grid !important;
    grid-template-columns: 2.5rem minmax(0, 1fr) !important;
    column-gap: .75rem !important;
    align-items: center !important;
    min-height: 52px;
    height: auto !important;
    padding: .62rem .75rem !important;
    border-radius: 12px;
}
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item::after,
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item.is-active::after {
    content: none !important;
    display: none !important;
}
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item > .token-badge {
    grid-column: 1 !important;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 !important;
    justify-self: start !important;
}
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item > span:last-child,
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item.is-active > span:last-child {
    grid-column: 2 !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #26364d !important;
    font-size: .94rem !important;
    font-weight: 720 !important;
    line-height: 1.28 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-overflow: clip !important;
}
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item.is-active {
    background: #ecfeff !important;
    border-color: #99f6e4;
    box-shadow: inset 4px 0 0 #0f766e;
}
.sidebar.sidebar--platform .sidebar__nav--accordion a.nav-item.is-active > span:last-child {
    color: #134e4a !important;
    font-weight: 800 !important;
}
.sidebar.sidebar--platform .nav-section__summary {
    min-height: 52px;
    padding: .75rem 1rem !important;
}
.sidebar.sidebar--platform .nav-section__summary span:first-child {
    font-size: 1rem;
    line-height: 1.25;
}
@media (min-width: 761px) {
    .sidebar.sidebar--platform:not(.sidebar--collapsed) {
        width: var(--platform-sidebar-width);
    }
    .sidebar.sidebar--platform:not(.sidebar--collapsed) ~ .workspace {
        margin-left: var(--platform-sidebar-width);
    }
    .sidebar.sidebar--platform.sidebar--collapsed ~ .workspace {
        margin-left: 0;
    }
}
@media (min-width: 1101px) {
    .app-shell { --platform-sidebar-width: clamp(320px, 23vw, 360px); }
}
@media (min-width: 761px) and (max-width: 1100px) {
    .app-shell { --platform-sidebar-width: 280px; }
}

/* Universal role menu: extend the readable platform structure to merchant workspaces. */
.sidebar.sidebar--merchant .sidebar__nav--accordion .nav-section__items {
    padding: .5rem !important;
    gap: .25rem !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item,
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active {
    display: grid !important;
    grid-template-columns: 2.5rem minmax(0, 1fr) !important;
    column-gap: .75rem !important;
    align-items: center !important;
    min-height: 52px;
    height: auto !important;
    padding: .62rem .75rem !important;
    border-radius: 12px;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item::after,
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active::after {
    content: none !important;
    display: none !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item > .token-badge {
    grid-column: 1 !important;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 !important;
    justify-self: start !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item > span:last-child,
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active > span:last-child {
    grid-column: 2 !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: .94rem !important;
    font-weight: 720 !important;
    line-height: 1.28 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-overflow: clip !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active {
    box-shadow: inset 4px 0 0 currentColor, 0 8px 18px rgba(2, 6, 23, .14);
}
@media (min-width: 761px) {
    .app-shell { --workspace-sidebar-width: var(--platform-sidebar-width, 320px); }
    .sidebar.sidebar--merchant:not(.sidebar--collapsed),
    .sidebar.sidebar--platform:not(.sidebar--collapsed) {
        width: var(--workspace-sidebar-width);
    }
    .sidebar.sidebar--merchant:not(.sidebar--collapsed) ~ .workspace,
    .sidebar.sidebar--platform:not(.sidebar--collapsed) ~ .workspace {
        margin-left: var(--workspace-sidebar-width);
    }
    .sidebar.sidebar--merchant.sidebar--collapsed ~ .workspace,
    .sidebar.sidebar--platform.sidebar--collapsed ~ .workspace {
        margin-left: 0;
    }
}
@media (min-width: 1101px) {
    .app-shell { --workspace-sidebar-width: clamp(320px, 23vw, 360px); }
}
@media (min-width: 761px) and (max-width: 1100px) {
    .app-shell { --workspace-sidebar-width: 280px; }
}

/* All application sidebars use a light surface: enforce readable text for every role. */
.sidebar.sidebar--merchant {
    --nav-text: #26364d;
    --nav-muted: #52647d;
    --nav-hover: #e8eef7;
    --nav-active: #ecfeff;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion .nav-section {
    border-color: #d7e0ec;
    background: #f8fafc;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion .nav-section__summary,
.sidebar.sidebar--merchant .sidebar__nav--accordion .nav-section__summary span:first-child {
    color: #172033 !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion .nav-section__summary small {
    color: #1d4ed8 !important;
    background: #dbeafe !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion .nav-section__chevron {
    color: #52647d !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item,
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item > span:last-child {
    color: #26364d !important;
    opacity: 1 !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item .token-badge {
    color: #52647d !important;
    background: #f8fafc !important;
    border: 1px solid #dbe5f1 !important;
    opacity: 1 !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item:hover {
    color: #0f3f46 !important;
    background: #e8eef7 !important;
    border-color: #b8c7da !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active,
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active > span:last-child {
    color: #134e4a !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active {
    background: #ecfeff !important;
    border-color: #99f6e4 !important;
    box-shadow: inset 4px 0 0 #0f766e !important;
}
.sidebar.sidebar--merchant .sidebar__nav--accordion a.nav-item.is-active .token-badge {
    color: #0f766e !important;
    background: #ccfbf1 !important;
    border-color: #5eead4 !important;
}


.rich-text-surface {
  min-height: 132px;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  color: var(--text);
  line-height: 1.55;
  outline: 0;
}

.rich-text-surface:empty::before,
.rich-text-field.is-empty .rich-text-surface::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}

.rich-text-surface p {
  margin: 0 0 10px;
}

.rich-text-surface h3,
.rich-text-view h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.rich-text-surface blockquote,
.rich-text-view blockquote {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-soft);
  color: var(--text);
}

.rich-text-surface p:last-child,
.rich-text-surface ul:last-child,
.rich-text-surface ol:last-child,
.rich-text-surface h3:last-child,
.rich-text-surface blockquote:last-child {
  margin-bottom: 0;
}

.rich-text-surface ul,
.rich-text-surface ol {
  margin: 0 0 10px 20px;
  padding: 0;
}

.rich-text-surface a,
.rich-text-view a {
  color: var(--primary);
  font-weight: 700;
}

.rich-text-status {
  padding: 0 12px 10px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.rich-text-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.rich-text-view {
  display: block;
  width: 100%;
  color: var(--text);
  font-weight: 500;
  line-height: 1.55;
}

.rich-text-view p {
  margin: 0 0 8px;
}

.rich-text-view ul,
.rich-text-view ol {
  margin: 0 0 8px 18px;
  padding: 0;
}

.select2-dropdown {
  border-color: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--primary);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: var(--border);
  border-radius: var(--radius);
  outline: 0;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.table-shell {
  position: relative;
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
  overflow-block: auto;
  overflow-inline: auto;
  width: 100%;
  max-width: 100%;
  max-height: min(68vh, 720px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  scrollbar-gutter: stable;
  scrollbar-color: rgba(100, 116, 139, 0.5) rgba(226, 232, 240, 0.45);
  scrollbar-width: thin;
  box-shadow: inset -18px 0 24px -28px rgba(15, 23, 42, 0.42);
}

.server-table .table-shell,
.client-table .table-shell {
  max-height: clamp(340px, 54vh, 580px);
}

.table-shell::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-shell::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.45);
  border-radius: 999px;
}

.table-shell::-webkit-scrollbar-thumb {
  border: 2px solid rgba(226, 232, 240, 0.45);
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.58);
}

.table-shell::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.72);
}

.table-shell::before {
  content: "";
  position: sticky;
  left: 0;
  z-index: 2;
  display: none;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #f8fafc, rgba(248, 250, 252, 0.88));
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
}

.table-view-toggle {
  position: sticky;
  left: 0;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, #f8fafc, rgba(248, 250, 252, 0.96));
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.table-view-toggle span {
  margin-right: auto;
}

.table-view-toggle button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
}

.table-view-toggle button.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.server-table {
  display: grid;
  gap: 12px;
}

.client-table {
  display: grid;
  gap: 12px;
}

.client-table__toolbar {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.client-table__footer {
  padding: 0 2px;
}

.server-table__toolbar,
.server-table__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.server-table__search,
.server-table__filter,
.server-table__length {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.server-table__search input,
.server-table__filter select,
.server-table__length select {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
}

.server-table__search input {
  width: min(320px, 72vw);
}

.server-table__reset {
  min-height: 40px;
}

.server-table__criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.server-table__criteria[hidden] {
  display: none;
}

.server-table-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.server-table-chip:hover,
.server-table-chip:focus-visible {
  border-color: rgba(37, 99, 235, 0.46);
  background: #ffffff;
}

.server-table-chip .icon {
  font-size: 0.72rem;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
}

.table-sort__direction {
  display: inline-flex;
  justify-content: center;
  min-width: 0.9em;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.table-sort.is-active .table-sort__direction {
  color: var(--primary);
}

.server-table__pager {
  display: flex;
  gap: 8px;
}

.server-table.is-loading .table-shell {
  opacity: 1;
}

.server-table.is-loading .table-shell::after {
  content: "Loading records";
  position: sticky;
  left: 0;
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.96));
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.skeleton-row td {
  height: 54px;
  background: var(--surface);
}

.skeleton-line,
.skeleton-block {
  position: relative;
  display: block;
  overflow: hidden;
  max-width: 100%;
  min-height: 12px;
  border-radius: 999px;
  background: var(--skeleton-base);
}

.skeleton-line::after,
.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: skeleton-shimmer 1.15s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.server-table__empty td,
.server-table__error td {
  padding: 0;
  color: var(--text-muted);
  background: var(--surface-soft);
}

.server-table__error td {
  color: var(--danger);
  background: var(--danger-soft);
}

.server-table__error td .button {
  border-color: #fecaca;
  color: var(--danger);
}

.server-empty-state {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 118px;
  padding: 22px 18px;
}

.server-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e2e8f0;
  color: var(--text-muted);
}

.server-empty-state--error .server-empty-state__icon {
  color: var(--danger);
  background: #fee2e2;
}

.server-empty-state strong {
  display: block;
  color: var(--text);
  font-size: 0.98rem;
}

.server-empty-state p {
  max-width: 56ch;
  margin: 5px 0 0;
  line-height: 1.45;
}

.server-empty-state small {
  display: block;
  margin-top: 8px;
  color: var(--text-soft);
}

.server-empty-state .button {
  margin-top: 12px;
}

.table-empty-row td {
  padding: 0;
  background: #ffffff;
}

.table-empty-state {
  margin: 8px;
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table--controls {
  min-width: 1040px;
}

.data-table th,
.data-table td {
  min-width: 140px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.875rem;
}

.data-table th:first-child,
.data-table td:first-child {
  min-width: 180px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #4b5563;
  background: var(--surface-soft);
  font-weight: 600;
  box-shadow: 0 1px 0 var(--border);
}

.data-table--client tbody tr[hidden] {
  display: none;
}

.data-table--client tbody tr {
  transition: background-color 140ms ease;
}

.data-table--client tbody tr:hover td {
  background: #f8fafc;
}

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

.data-table td small,
.detail-pair small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
}

.data-table input,
.data-table select {
  width: 100%;
  min-width: min(180px, 100%);
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
}

.data-table .button,
.data-table .icon-button {
  white-space: nowrap;
}

.form-grid.is-submitting,
.admin-control-form.is-submitting,
.inline-actions.is-submitting,
form.is-submitting {
  position: relative;
  cursor: wait;
}

.form-grid.is-submitting::after,
.admin-control-form.is-submitting::after,
.inline-actions.is-submitting::after,
form.is-submitting::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-soft), var(--primary), var(--primary-soft));
  background-size: 200% 100%;
  animation: submit-loader 1s linear infinite;
}

.form-busy-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 8px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.83rem;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.form-busy-status__spinner {
  width: 0.95em;
  height: 0.95em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: button-spinner 0.7s linear infinite;
}

.inline-actions .form-busy-status,
.table-actions .form-busy-status {
  margin: 0;
  padding: 6px 9px;
  font-size: 0.76rem;
}

@keyframes submit-loader {
  100% {
    background-position: 200% 0;
  }
}

body.is-route-loading .workspace__content {
  min-height: 420px;
}

body.is-route-loading .workspace__content > * {
  opacity: 0.26;
  pointer-events: none;
}

.module-route-loader {
  display: none;
  position: fixed;
  z-index: 80;
  top: 88px;
  right: 24px;
  bottom: 24px;
  left: 280px;
  place-items: center;
  pointer-events: none;
}

body.is-route-loading .module-route-loader {
  display: grid;
}

.workspace--wide .module-route-loader {
  left: 24px;
}

.module-route-loader__panel {
  display: grid;
  grid-template-columns: auto minmax(240px, 360px);
  gap: 20px;
  align-items: center;
  width: min(560px, calc(100vw - 48px));
  padding: 24px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(255, 255, 255, 0.96)),
    var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  animation: module-loader-panel-in 180ms ease-out both;
}

.module-route-loader__ring {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background:
    conic-gradient(from 90deg, var(--primary), #2563eb, #14b8a6, var(--primary));
  animation: module-loader-spin 1s linear infinite;
}

.module-route-loader__ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: var(--surface);
}

.module-route-loader__ring span {
  position: absolute;
  inset: 22px;
  z-index: 1;
  border-radius: inherit;
  background: rgba(15, 118, 110, 0.14);
  animation: module-loader-pulse 1.15s ease-in-out infinite;
}

.module-route-loader__ring i {
  position: absolute;
  top: 5px;
  left: 50%;
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.module-route-loader__body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.module-route-loader__body strong {
  color: var(--text);
  font-size: 1.08rem;
}

.module-route-loader__bar {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
}

.module-route-loader__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #2563eb);
  animation: module-loader-progress 1.1s ease-in-out infinite;
}

.module-route-loader__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-route-loader__steps span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(240, 253, 250, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  animation: module-loader-step 1.4s ease-in-out infinite;
}

.module-route-loader__steps span:nth-child(2) {
  animation-delay: 140ms;
}

.module-route-loader__steps span:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes module-loader-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes module-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes module-loader-pulse {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.52;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes module-loader-progress {
  0% {
    transform: translateX(-110%);
  }

  55% {
    transform: translateX(95%);
  }

  100% {
    transform: translateX(260%);
  }
}

@keyframes module-loader-step {
  0%,
  100% {
    opacity: 0.58;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line::after,
  .skeleton-block::after {
    animation: none;
  }

  .form-grid.is-submitting::after,
  .admin-control-form.is-submitting::after,
  .inline-actions.is-submitting::after,
  form.is-submitting::after,
  .form-busy-status__spinner,
  .button[aria-busy="true"]::after,
  button[aria-busy="true"]::after {
    animation: none;
  }

  .module-route-loader__panel,
  .module-route-loader__ring,
  .module-route-loader__ring span,
  .module-route-loader__bar span,
  .module-route-loader__steps span {
    animation: none;
  }
}

.form-grid.was-validated :invalid,
.crud-form.was-validated :invalid {
  border-color: var(--danger);
  background: #fff7f7;
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: var(--danger);
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.field-error {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.form-error-summary {
  margin-bottom: 14px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff7f7;
  color: #991b1b;
  box-shadow: 0 10px 22px rgba(127, 29, 29, 0.08);
}

.form-error-summary strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-error-summary ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.form-error-summary button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.shift-rule-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.shift-rule-preview h4 {
  margin: 0;
  font-size: 1rem;
}

.shift-rule-preview p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.shift-rule-preview ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.86rem;
}

.shift-rule-preview--success {
  border-left-color: var(--success);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), #ffffff);
}

.shift-rule-preview--warning {
  border-left-color: var(--warning);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), #ffffff);
}

.shift-rule-preview--danger {
  border-left-color: var(--danger);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.09), #ffffff);
}

.button[aria-busy="true"],
button[aria-busy="true"] {
  position: relative;
  cursor: wait;
}

.button[aria-busy="true"]::after,
button[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  vertical-align: -0.12em;
  animation: button-spin 800ms linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.row-danger td {
  background: var(--danger-soft);
}

.availability {
  gap: 10px;
  min-width: 160px;
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.calendar-shell {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-grid {
  grid-template-columns: 88px repeat(7, minmax(150px, 1fr));
}

.calendar-grid--header {
  background: var(--surface-soft);
}

.calendar-grid--header > div,
.calendar-grid--body > div {
  min-height: 76px;
  padding: 12px;
  border-right: 1px solid var(--border);
}

.calendar-grid--body > div {
  min-height: 92px;
  border-top: 1px solid var(--border);
}

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

.calendar-body {
  max-height: 620px;
  overflow: auto;
}

.calendar-time {
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.calendar-cell {
  display: grid;
  gap: 8px;
}

.calendar-chip {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  text-align: left;
  font-size: 0.8rem;
}

.calendar-chip--confirmed {
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.calendar-chip--pending {
  border-color: #fde68a;
  background: var(--warning-soft);
}

.task-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 16px;
  text-align: left;
}

.task-card:hover,
.calendar-chip:hover,
.list-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.task-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.kanban-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.panel--kanban {
  align-content: start;
  padding: 16px;
}

.task-insight-panel {
  border-color: #e0e7ff;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.task-insight-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.task-insight-card strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.task-insight-card span {
  color: var(--text);
  font-weight: 900;
}

.task-insight-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.task-insight-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.task-insight-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.task-insight-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.scheduler-shell,
.task-board-shell {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.scheduler-toolbar,
.scheduler-actions,
.scheduler-period-control,
.task-board-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scheduler-toolbar,
.task-board-toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.scheduler-period-control h2 {
  min-width: 180px;
  margin: 0;
  text-align: center;
  font-size: 1.45rem;
}

.calendar-view-select {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 40px 0 14px;
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 800;
}

.schedule-capacity-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.schedule-capacity-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.schedule-capacity-card strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.schedule-capacity-card span {
  color: var(--text);
  font-weight: 900;
}

.schedule-capacity-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.schedule-capacity-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.schedule-capacity-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.scheduler-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.scheduler-grid {
  overflow: auto;
  max-height: 720px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: 112px repeat(7, minmax(136px, 1fr));
  min-width: 1064px;
}

.calendar-week-grid > div {
  min-height: 92px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.calendar-week-grid > div:nth-child(8n) {
  border-right: 0;
}

.calendar-head,
.calendar-time {
  padding: 16px;
  background: #f8fafc;
  color: #334155;
}

.calendar-head strong,
.calendar-time strong {
  display: block;
}

.calendar-head span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.calendar-head.is-today,
.calendar-month-day.is-today {
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.62)),
    #eff6ff;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.22);
}

.calendar-head.is-today strong,
.calendar-month-day.is-today > strong {
  color: #1d4ed8;
}

.calendar-slot {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.calendar-chip {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid #93c5fd;
  background: #dbeafe;
  color: #0f172a;
  text-align: left;
  font-size: 0.82rem;
}

.calendar-chip--pending {
  border-color: #fdba74;
  background: #ffedd5;
}

.calendar-chip--completed {
  border-color: #86efac;
  background: #dcfce7;
}

.calendar-chip--cancelled {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #64748b;
}

.calendar-chip--attention {
  border-color: #f59e0b;
  background: #fff7ed;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.calendar-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  min-width: 960px;
}

.calendar-month-day {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.calendar-month-day:nth-child(7n) {
  border-right: 0;
}

.calendar-month-day > strong {
  color: #334155;
}

.task-board-toolbar {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.task-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(560px, 100%);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.task-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  color: var(--text);
}

.task-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.task-column {
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.task-column[data-status="in-progress"] .task-column__head {
  background: #eff6ff;
}

.task-column[data-status="review"] .task-column__head {
  background: #fff7ed;
}

.task-column[data-status="completed"] .task-column__head {
  background: #ecfdf5;
}

.task-column__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.task-column__head h3 {
  margin: 0;
}

.task-column__head span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #eef2ff;
  font-weight: 800;
}

.task-dropzone {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 450px;
  padding: 16px;
}

.task-column.is-drag-over {
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 2px #dbeafe;
}

.task-drag-placeholder {
  border: 2px dashed rgba(37, 99, 235, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.82), rgba(224, 242, 254, 0.48)),
    #eff6ff;
}

.task-card--draggable {
  cursor: grab;
}

.task-card--draggable.is-dragging {
  opacity: 0.48;
  cursor: grabbing;
}

.task-card:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.task-card > button {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.task-move-controls {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.task-move-controls button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-muted);
  cursor: pointer;
}

.task-move-controls button:hover,
.task-move-controls button:focus-visible {
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--primary-soft);
  color: var(--primary);
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
}

.tab {
  min-height: 36px;
  padding: 0 12px;
  border-color: var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: #4b5563;
  font-size: 0.875rem;
}

.tab.is-active {
  border-color: #bfdbfe;
  background: var(--primary-soft);
  color: var(--primary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.5);
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: min(92vh, 920px);
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
}

.modal__head {
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  margin-bottom: 0;
  padding: 24px 28px 20px;
}

.modal__body {
  display: grid;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 22px 28px 24px;
  overscroll-behavior: contain;
}

.detail-header,
.invoice-sheet__head {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-header strong,
.invoice-sheet__head strong,
.invoice-line strong {
  display: block;
}

.detail-grid {
  gap: 16px;
}

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

.detail-pair {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-pair--wide {
  grid-column: 1 / -1;
}

.invoice-line {
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.chip-fieldset {
  margin: 0;
  padding: 14px;
  border-radius: var(--radius);
}

.chip-fieldset legend {
  padding: 0 6px;
  color: var(--text-muted);
}

.chip-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 6px 8px 6px 0;
  padding: 9px 12px 9px 58px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  font-weight: 750;
}

.toggle-row {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.participant-section-index__filter {
  min-height: 36px;
  white-space: nowrap;
}
.participant-section-index__filter[aria-pressed="true"] {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
.participant-profile-group[hidden] { display: none !important; }

.toggle-row:hover,
.toggle-row:focus-within {
  border-color: #bfdbfe;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.toggle-row input[type="checkbox"],
.chip-check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-row::before,
.chip-check::before {
  content: "";
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.chip-check::before {
  position: absolute;
  left: 12px;
}

.toggle-row::after,
.chip-check::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.22);
  transform: translateY(-50%);
  transition: transform 160ms ease;
}

.toggle-row:has(input[type="checkbox"]:checked),
.chip-check:has(input[type="checkbox"]:checked) {
  border-color: rgba(37, 99, 235, 0.38);
  background: var(--primary-soft);
}

.toggle-row:has(input[type="checkbox"]:checked)::before,
.chip-check:has(input[type="checkbox"]:checked)::before {
  border-color: var(--primary);
  background: var(--primary);
}

.toggle-row:has(input[type="checkbox"]:checked)::after,
.chip-check:has(input[type="checkbox"]:checked)::after {
  transform: translate(16px, -50%);
}

.toggle-row input[type="checkbox"]:focus-visible + span,
.chip-check input[type="checkbox"]:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 6px;
}

.toggle-row span {
  display: block;
  min-width: 0;
  font-weight: 750;
}

.toggle-row span small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-weight: 600;
}

.switch {
  display: inline-flex;
  align-items: center;
  width: 48px;
  padding: 4px;
  border-radius: 999px;
  background: #d1d5db;
}

.switch span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform 160ms ease;
}

.switch.is-on {
  background: var(--primary);
}

.switch.is-on span {
  transform: translateX(20px);
}

.report-card {
  gap: 14px;
}

.integration-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.integration-card__actions form {
  margin: 0;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.table-actions form,
.admin-actions-row form {
  margin: 0;
}

.admin-control-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.admin-control-form--compact {
  grid-template-columns: 1fr;
  align-items: stretch;
  padding-top: 0;
  border-top: 0;
}

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

.governance-action-row {
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.admin-module-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  -webkit-overflow-scrolling: touch;
}

.admin-module-group {
  display: grid;
  gap: 8px;
  min-width: 240px;
  padding: 12px;
  background: var(--surface);
}

.admin-module-group > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-module-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-module-tab {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px clamp(16px, 3vw, 28px) 0;
  padding: 14px 16px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  color: #78350f;
  background: #fffbeb;
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.1);
}

.impersonation-banner strong,
.impersonation-banner span {
  display: block;
}

.impersonation-banner span {
  color: #92400e;
  font-size: 0.86rem;
}

.registry-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.registry-toolbar .field {
  flex: 1 1 320px;
  margin: 0;
}

.status-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.status-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--text-muted);
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.status-tabs button.is-active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.business-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0);
  pointer-events: none;
  transition: background-color 180ms ease;
}

.detail-drawer[hidden] {
  display: none !important;
  background: transparent;
  backdrop-filter: none;
}

.detail-drawer.is-open {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.detail-drawer__panel {
  width: min(460px, 100%);
  height: 100%;
  padding: 28px;
  overflow: auto;
  background: #fff;
  box-shadow: -24px 0 70px rgba(15, 23, 42, 0.2);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.detail-drawer.is-open .detail-drawer__panel {
  transform: translateX(0);
}

.detail-drawer__close {
  float: right;
}

.detail-drawer h3 {
  margin: 8px 0 18px;
  font-size: 1.55rem;
}

.detail-drawer__body {
  display: grid;
  gap: 10px;
}

.page-header--control {
  align-items: flex-start;
  min-height: auto;
  margin-bottom: 18px;
  padding: clamp(18px, 2.2vw, 24px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.9) 46%, rgba(239, 246, 255, 0.86)),
    var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.page-header--control h2 {
  max-width: 22ch;
  margin: 4px 0 0;
  color: #0f172a;
  font-size: clamp(1.65rem, 2.1vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-header--control p:not(.eyebrow) {
  max-width: 68ch;
  color: #475569;
  font-size: clamp(0.98rem, 1.12vw, 1.08rem);
  line-height: 1.55;
}

.page-header--control .eyebrow {
  margin: 0;
  color: #475569;
  font-size: 0.74rem;
}

.page-header--control .page-header__actions {
  align-self: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 42%;
  padding-top: 6px;
}

.page-header--control .button {
  min-height: 44px;
  padding: 0 16px;
  border-color: rgba(148, 163, 184, 0.38);
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.page-header--control .button:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
}

.custom-filepicker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field--file {
  position: relative;
}

.custom-filepicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.custom-filepicker:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.custom-filepicker__input:focus + .custom-filepicker,
.custom-filepicker:focus-visible {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--focus-ring);
}

.custom-filepicker > span {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  min-width: 0;
}

.custom-filepicker .icon {
  grid-row: span 2;
  align-self: center;
  color: var(--primary);
}

.custom-filepicker strong,
.custom-filepicker small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-filepicker small {
  color: var(--text-muted);
}

.custom-filepicker em {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
  background: #fff;
}

.tour-trigger {
  flex: 0 0 auto;
}

.tour-highlight {
  position: relative;
  z-index: 1001;
  outline: 3px solid rgba(15, 118, 110, 0.34);
  outline-offset: 4px;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.36);
}

.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.tour-card {
  position: fixed;
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  pointer-events: auto;
}

.tour-card h3 {
  margin: 6px 0 8px;
}

.tour-card__body {
  margin: 0;
  color: var(--text-muted);
}

.tour-card__progress {
  display: flex;
  gap: 6px;
  margin: 18px 0 4px;
}

.tour-card__progress span {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
}

.tour-card__progress span.is-active {
  background: var(--primary);
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 28px;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(37, 99, 235, 0.06)),
    var(--surface);
}

.guide-hero h3 {
  max-width: 14ch;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

.guide-hero p:not(.eyebrow) {
  max-width: 58ch;
}

.guide-readiness-meter {
  display: grid;
  gap: 7px;
  max-width: 420px;
  margin-top: 20px;
}

.guide-readiness-meter strong {
  color: var(--text);
}

.guide-readiness-meter span {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
}

.guide-readiness-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #2563eb);
}

.guide-readiness-meter small {
  color: var(--text-muted);
}

.guide-hero__visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.guide-hero__visual span,
.guide-hero__visual i {
  display: block;
  min-height: 64px;
  border-radius: 10px;
  background: #ecfdf5;
}

.guide-hero__visual span:first-child {
  grid-column: span 2;
  min-height: 34px;
  background: #0f766e;
}

.guide-hero__visual span:nth-child(2) {
  background: #eff6ff;
}

.guide-hero__visual span:nth-child(3) {
  background: #fff7ed;
}

.guide-hero__visual i {
  min-height: 46px;
  background: #f1f5f9;
}

.guide-steps {
  display: grid;
  gap: 12px;
}

.guide-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.guide-step:last-child {
  border-bottom: 0;
}

.guide-step > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background: var(--primary);
}

.guide-step h3,
.manual-row strong {
  margin: 0;
}

.guide-page .list-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.guide-page .list-card strong,
.guide-page .list-card small {
  display: block;
}

.guide-step p,
.manual-row p {
  margin: 5px 0 0;
  color: var(--text-muted);
}

.manual-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.manual-row {
  min-height: 128px;
  padding: 20px;
  background: var(--surface);
}

.setup-checklist-panel {
  border-color: #bae6fd;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.guide-control-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.guide-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.guide-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.guide-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.guide-control-card span {
  color: var(--text);
  font-weight: 900;
}

.guide-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.guide-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.guide-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.guide-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.guide-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

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

.setup-check-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.setup-check-card > span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--primary);
  background: rgba(20, 184, 166, 0.1);
}

.setup-check-card.is-complete {
  border-color: #bbf7d0;
}

.setup-check-card.is-complete > span {
  color: var(--success);
  background: var(--success-soft);
}

.setup-check-card.is-pending {
  border-color: #fde68a;
}

.setup-check-card.is-pending > span {
  color: var(--warning);
  background: var(--warning-soft);
}

.setup-check-card strong,
.module-map-row strong {
  display: block;
}

.setup-check-card small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.45;
}

.module-map-row {
  display: grid;
  align-content: start;
  gap: 10px;
}

.module-map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.module-map-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--primary);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.admin-module-tab:hover,
.admin-module-tab.is-active {
  color: var(--primary);
  background: rgba(20, 184, 166, 0.1);
}

.admin-module-tab.is-active {
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.22);
}

.advanced-feature-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.advanced-feature-card h3 {
  margin-bottom: 6px;
}

.advanced-feature-card p {
  color: var(--text-muted);
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
}

.integration-card .button {
  gap: 8px;
}

.report-card__head,
.report-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.report-card__head {
  align-items: flex-start;
}

.report-card__foot {
  align-items: center;
}

.mini-chart {
  display: grid;
  gap: 14px;
}

.mini-chart__row {
  display: grid;
  gap: 8px;
}

.mini-chart__label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #374151;
}

.mini-chart__track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.mini-chart__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.utilization-row {
  display: grid;
  gap: 8px;
}

.audit-row {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
}

.empty-state {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toast strong,
.toast p {
  display: block;
}

.toast p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.toast .icon-button {
  margin: -4px -6px 0 8px;
  box-shadow: none;
}

.toast + .toast {
  margin-top: 10px;
}

.toast--success {
  border-color: #bbf7d0;
  background: var(--success-soft);
}

.toast--warning {
  border-color: #fde68a;
  background: var(--warning-soft);
}

.toast--danger {
  border-color: #fecaca;
  background: var(--danger-soft);
}

.toast--danger strong,
.toast--danger .icon-button {
  color: var(--danger);
}

.toast--neutral {
  background: var(--surface);
}

@media (max-width: 1240px) {
  .hero,
  .content-grid,
  .dashboard-grid--two {
    grid-template-columns: 1fr;
  }

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

  .kanban-grid,
  .report-grid,
  .dashboard-signal-grid,
  .dashboard-control-grid,
  .schedule-signal-grid,
  .task-flow-grid,
  .task-control-grid,
  .award-control-grid,
  .profit-control-grid,
  .audit-control-grid,
  .claim-control-grid,
  .signing-control-grid,
  .task-insight-grid,
  .schedule-capacity-grid,
  .roster-signal-grid,
  .roster-control-grid,
  .referral-signal-grid,
  .referral-handoff-grid,
  .pwa-control-grid,
  .portal-signal-grid,
  .portal-control-grid,
  .ai-signal-grid,
  .ai-control-grid,
  .outcome-signal-grid,
  .outcome-control-grid,
  .care-signal-grid,
  .care-control-grid,
  .document-signal-grid,
  .document-control-grid,
  .payroll-signal-grid,
  .payroll-control-grid,
  .timesheet-signal-grid,
  .timesheet-control-grid,
  .leave-signal-grid,
  .leave-control-grid,
  .billing-signal-grid,
  .integration-signal-grid,
  .integration-control-grid,
  .compliance-signal-grid,
  .compliance-control-grid,
  .staff-signal-grid,
  .staff-control-grid,
  .participant-signal-grid,
  .participant-control-grid,
  .service-signal-grid,
  .service-control-grid,
  .funding-signal-grid,
  .funding-control-grid,
  .report-signal-grid,
  .report-control-grid,
  .invoice-detail-grid,
  .business-signal-grid,
  .business-control-grid,
  .permission-signal-grid,
  .permission-control-grid,
  .settings-signal-grid,
  .settings-control-grid,
  .account-signal-grid,
  .access-signal-grid,
  .access-control-grid,
  .workspace-signal-grid,
  .workspace-control-grid,
  .billing-control-grid,
  .admin-integration-grid,
  .readiness-signal-grid,
  .log-signal-grid,
  .log-control-grid,
  .platform-signal-grid,
  .merchant-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .auth-page {
    align-items: start;
  }

  .auth-shell {
    width: min(620px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .auth-aside {
    display: none;
  }

  .auth-brand {
    display: flex;
  }

  .auth-card {
    gap: 20px;
  }

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

  .auth-security-grid {
    grid-template-columns: 1fr;
  }

  .auth-security-grid span {
    min-height: auto;
  }

  .sidebar {
    width: 240px;
    opacity: 1;
  }

  .workspace {
    margin-left: 240px;
  }

  .workspace--wide {
    margin-left: 0;
  }

  .module-route-loader {
    top: 78px;
    right: 16px;
    bottom: 16px;
    left: 16px;
  }

  .module-route-loader__panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .module-route-loader__steps {
    justify-content: center;
  }

  .search-pill {
    display: none;
  }

  .merchant-switcher {
    min-width: 180px;
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: 0;
  }

  .workspace__content {
    padding: 14px;
  }

  .workspace-breadcrumb {
    min-height: 42px;
    padding: 0 14px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .topbar {
    height: 56px;
    gap: 8px;
    padding: 0 10px;
  }

  .topbar__left {
    gap: 8px;
  }

  .topbar__right {
    flex: 0 0 auto;
    gap: 6px;
  }

  .topbar__left > .icon-button {
    display: none;
  }

  .brand-lockup {
    gap: 8px;
  }

  .brand-lockup strong {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-lockup__mark,
  .avatar {
    width: 30px;
    height: 30px;
  }

  .sidebar {
    top: 56px;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 78px;
    padding: 8px 10px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-right: 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar--collapsed {
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar__intro,
  .sidebar__footer,
  .nav-section > p {
    display: none;
  }

  .sidebar__mobile-brand {
    position: sticky;
    left: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 9px;
    min-width: 156px;
    min-height: 56px;
    padding: 7px 12px 7px 7px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92)),
      var(--surface);
    box-shadow: 8px 0 18px rgba(255, 255, 255, 0.92);
  }

  .sidebar__mobile-brand span:last-child {
    display: grid;
    gap: 1px;
    min-width: 0;
  }

  .sidebar__mobile-brand strong {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.05;
  }

  .sidebar__mobile-brand small {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
  }

  .sidebar__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
  }

  .nav-section {
    display: contents;
  }

  .nav-item {
    flex: 0 0 74px;
    min-height: 56px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    padding: 6px 7px;
    border: 1px solid transparent;
    background: #f8fafc;
  }

  .nav-item span:last-child {
    display: block;
    max-width: 64px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 0.66rem;
    font-weight: 850;
    line-height: 1.05;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-item.is-active {
    border-color: rgba(37, 99, 235, 0.2);
    background: #eff6ff;
    box-shadow: inset 0 -3px 0 var(--primary), 0 8px 16px rgba(37, 99, 235, 0.08);
  }

  .nav-item.is-active span:last-child {
    color: var(--primary-strong);
  }

  .workspace {
    margin-left: 0;
    padding-top: 134px;
  }

  .workspace--wide {
    margin-left: 0;
  }

  .brand-lockup .eyebrow,
  .profile-trigger__identity,
  .profile-trigger__chevron,
  .merchant-switcher {
    display: none;
  }

  .page-header,
  .panel__head,
  .modal__head,
  .report-card__head,
  .report-card__foot,
  .detail-header,
  .invoice-sheet__head,
  .list-card,
  .alert-row,
  .toggle-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header__actions {
    width: 100%;
  }

  .page-header--control {
    padding: 18px;
    border-radius: 12px;
  }

  .page-header--control h2 {
    max-width: none;
    font-size: 1.62rem;
  }

  .page-header--control p:not(.eyebrow) {
    max-width: none;
    font-size: 0.96rem;
  }

  .page-header--control .page-header__actions {
    max-width: none;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .page-header--control .page-header__actions .button {
    width: 100%;
  }

  .topbar__right {
    width: auto;
  }

  .list-card--evidence .list-card__meta {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  .list-card--pwa-conflict .list-card__meta {
    width: 100%;
    justify-items: start;
  }

  .page-header__actions,
  .modal-actions,
  .integration-card__actions,
  .admin-actions-row,
  .auth-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header__actions .button,
  .modal-actions .button,
  .integration-card__actions .button,
  .integration-card__actions form,
  .admin-actions-row .button,
  .admin-actions-row form,
  .auth-actions .button,
  .auth-actions .auth-link {
    width: 100%;
  }

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

  .admin-module-nav {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: var(--surface);
  }

  .admin-module-group {
    min-width: 220px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .tour-trigger {
    display: none;
  }

  .search-pill {
    display: inline-flex;
    justify-content: center;
    min-width: 44px;
    width: 44px;
    padding: 0;
  }

  .search-pill span,
  .search-pill kbd {
    display: none;
  }

  .platform-oversight-pill {
    display: none;
  }

  .guide-hero,
  .manual-list {
    grid-template-columns: 1fr;
  }

  .setup-check-grid {
    grid-template-columns: 1fr;
  }

  .guide-control-grid {
    grid-template-columns: 1fr;
  }

  .setup-check-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .setup-check-card .button {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .tour-backdrop {
    align-items: end;
    justify-items: center;
    padding: 14px;
  }

  .profile-trigger {
    width: auto;
    min-width: 44px;
    height: 40px;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
  }

  .profile-trigger__avatar {
    display: none;
  }

  .profile-trigger__mobile-icon {
    display: inline-flex;
  }

  .profile-trigger__mobile-label {
    display: inline-flex;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 900;
  }

  .account-dropdown {
    right: -2px;
  }

  .field-grid--2,
  .field-grid--3,
  .field-grid--4,
  .detail-grid--2,
  .stats-grid,
  .stats-grid--compact,
  .hero-grid,
  .dashboard-grid--two,
  .focus-grid,
  .quick-action-grid,
  .kanban-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .shift-mini-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .shift-mini-card__meta {
    grid-column: 2;
    justify-content: flex-start;
  }

  .grouped-chart {
    gap: 10px;
    height: 240px;
  }

  .calendar-grid {
    min-width: 980px;
  }

  .mobile-experience-strip,
  .portal-experience-strip,
  .rule-review-strip,
  .pwa-control-grid,
  .signing-evidence-strip,
  .signing-control-grid,
  .signing-readiness-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .mobile-flow,
  .portal-action-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proda-readiness-grid {
    grid-template-columns: 1fr;
  }

  .intake-conversion-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intake-conversion-card {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-evidence-summary,
  .audit-control-grid,
  .audit-evidence-grid {
    grid-template-columns: 1fr;
  }

  .audit-evidence-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audit-evidence-card__meta {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .claim-rejection-summary,
  .claim-rejection-card,
  .claim-resubmission-card,
  .claim-control-grid,
  .claim-state-grid {
    grid-template-columns: 1fr;
  }

  .claim-rejection-card__meta,
  .claim-resubmission-card__meta {
    justify-items: start;
    justify-content: flex-start;
    min-width: 0;
  }

  .claim-resubmission-card__meta small {
    text-align: left;
  }

  .claim-resubmission-card__meta .table-actions {
    justify-content: flex-start;
  }

  .mobile-flow span,
  .portal-action-stack span {
    min-height: 44px;
    white-space: normal;
  }

  .server-table {
    gap: 10px;
  }

  .server-table__toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .server-table__search {
    grid-column: 1 / -1;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .server-table__filter,
  .server-table__length {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .server-table__reset {
    min-height: 44px;
  }

  .server-table__search input {
    width: 100%;
  }

  .server-table__footer {
    align-items: stretch;
  }

  .server-table__pager {
    width: 100%;
  }

  .server-table__pager .button {
    flex: 1;
  }

  .table-shell {
    border-radius: 10px;
    max-height: 58vh;
    box-shadow: inset -16px 0 22px -24px rgba(15, 23, 42, 0.5);
  }

  .table-shell::before {
    content: "Swipe horizontally to review all columns";
    display: block;
  }

  .server-table__empty td,
  .server-table__error td {
    min-width: 100vw;
    padding: 16px 14px;
    white-space: normal;
  }

  .server-table__error td .button {
    display: flex;
    width: 100%;
    margin: 10px 0 0;
  }

  .scheduler-shell,
  .task-board-shell {
    padding: 12px;
  }

  .scheduler-period-control {
    width: 100%;
    justify-content: space-between;
  }

  .scheduler-period-control h2 {
    min-width: 0;
    font-size: 1.1rem;
  }

  .scheduler-actions {
    width: 100%;
  }

  .calendar-view-select,
  .scheduler-actions .button {
    flex: 1;
  }

  .scheduler-filters {
    grid-template-columns: 1fr;
  }

  .scheduler-grid {
    max-height: 640px;
  }

  .roster-validation-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .roster-validation-item .table-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .pwa-sync-health .detail-grid {
    grid-template-columns: 1fr;
  }

  .task-board {
    grid-template-columns: repeat(4, minmax(250px, 78vw));
  }

  .task-column {
    min-height: 460px;
  }
}

@media (max-width: 520px) {
  .auth-page {
    padding: 12px;
  }

  .auth-card {
    padding: 20px;
  }

  .panel,
  .stat-card {
    padding: 16px;
  }

  .auth-shell {
    border-radius: 18px;
  }

  .auth-brand {
    padding-bottom: 14px;
  }

  .auth-card h1 {
    font-size: 2rem;
  }

  .auth-actions {
    gap: 10px;
  }

  .auth-primary-action,
  .auth-link {
    width: 100%;
  }

  .auth-helper-row {
    display: grid;
    gap: 8px;
  }

  .auth-security-grid {
    margin-top: 20px;
  }

  .auth-footnote {
    margin-top: 14px;
  }

  .pin-grid {
    gap: 6px;
  }

  .pin-grid input {
    min-height: 46px;
    font-size: 1.05rem;
  }

  .page {
    gap: 16px;
  }

  h2,
  .dashboard-header h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1rem;
  }

  .stat-card__value {
    font-size: 1.45rem;
  }

  .brand-lockup strong {
    max-width: 36vw;
    font-size: 0.86rem;
  }

  .topbar__right {
    width: auto;
  }

  .notification-button {
    display: none;
  }

  .button,
  .icon-button {
    min-height: 42px;
  }

  .table-shell {
    margin-inline: -2px;
    max-height: 56vh;
  }

  .table-view-toggle {
    display: flex;
  }

  .server-table__toolbar {
    padding: 2px;
  }

  .server-table__search input,
  .server-table__filter select,
  .server-table__length select {
    min-height: 44px;
  }

  .signing-request-preview__grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    min-width: 620px;
  }

  .data-table th,
  .data-table td {
    padding: 11px 12px;
    font-size: 0.82rem;
  }

  .data-table td .button,
  .data-table td .icon-button {
    min-height: 36px;
  }

  .data-table--labelled {
    min-width: 0;
  }

  .data-table--labelled thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .data-table--labelled tbody,
  .data-table--labelled tr,
  .data-table--labelled td {
    display: block;
  }

  .data-table--labelled tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

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

  .data-table--labelled td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 0;
    white-space: normal;
  }

  .data-table--labelled td::before {
    content: attr(data-label);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .data-table--labelled.data-table--controls {
    min-width: 1040px;
  }

  .data-table--labelled.data-table--controls thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .data-table--labelled.data-table--controls tbody {
    display: table-row-group;
  }

  .data-table--labelled.data-table--controls tr {
    display: table-row;
    padding: 0;
    border-bottom: 0;
  }

  .data-table--labelled.data-table--controls th,
  .data-table--labelled.data-table--controls td {
    display: table-cell;
    white-space: nowrap;
  }

  .data-table--labelled.data-table--controls td::before {
    content: none;
  }

  .table-shell.is-wide-table .data-table--labelled {
    min-width: 620px;
  }

  .table-shell.is-wide-table .data-table--controls {
    min-width: 880px;
  }

  .table-shell.is-wide-table .data-table--labelled thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .table-shell.is-wide-table .data-table--labelled tbody {
    display: table-row-group;
  }

  .table-shell.is-wide-table .data-table--labelled tr {
    display: table-row;
    padding: 0;
    border-bottom: 0;
  }

  .table-shell.is-wide-table .data-table--labelled th,
  .table-shell.is-wide-table .data-table--labelled td {
    display: table-cell;
    white-space: nowrap;
  }

  .table-shell.is-wide-table .data-table--labelled td::before {
    content: none;
  }

  .grouped-chart {
    height: 210px;
  }

  .service-chart {
    min-height: 0;
  }
}

@media (max-width: 380px) {
  .workspace__content {
    padding: 12px;
  }

  .brand-lockup strong {
    max-width: 30vw;
  }

  .profile-trigger {
    display: flex;
  }
}

.action-panel .form-grid,
.staff-pwa-card .form-grid,
.signature-panel .form-grid {
  gap: 14px;
}

.pwa-status,
.rule-chip-row,
.export-scope-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pwa-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.pwa-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.pwa-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.pwa-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.pwa-control-card span {
  color: var(--text);
  font-weight: 900;
}

.pwa-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.pwa-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.pwa-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.pwa-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.pwa-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.export-scope-summary {
  justify-content: space-between;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}

.export-scope-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rule-review-strip,
.signing-evidence-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.signing-evidence-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rule-review-strip article,
.signing-evidence-strip article {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.rule-review-strip strong,
.signing-evidence-strip strong {
  color: var(--text);
}

.rule-review-strip span,
.signing-evidence-strip small {
  color: var(--text-muted);
  line-height: 1.5;
}

.roster-validation-panel .panel__head {
  align-items: flex-start;
}

.roster-validation-list {
  display: grid;
  gap: 12px;
}

.roster-validation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
}

.roster-validation-item > div:first-child {
  display: grid;
  gap: 4px;
}

.roster-validation-item strong {
  color: var(--text);
}

.roster-validation-item span,
.roster-validation-item small {
  color: var(--text-muted);
  line-height: 1.45;
}

.roster-signal-panel {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.roster-control-panel {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.roster-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.roster-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.roster-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.roster-control-card span {
  color: var(--text);
  font-weight: 900;
}

.roster-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.roster-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.roster-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.roster-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.roster-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.roster-signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.roster-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.roster-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.roster-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.roster-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.roster-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.roster-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.roster-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-signal-panel {
  border-color: #e9d5ff;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.ai-control-panel {
  border-color: #e9d5ff;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.ai-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ai-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.ai-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.ai-control-card span {
  color: var(--text);
  font-weight: 900;
}

.ai-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.ai-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.ai-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.ai-signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ai-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.ai-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.ai-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.ai-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.ai-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ai-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.ai-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.outcome-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.outcome-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.outcome-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.outcome-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.outcome-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.outcome-control-card span {
  color: var(--text);
  font-weight: 900;
}

.outcome-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.outcome-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.outcome-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.outcome-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.outcome-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.outcome-signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.outcome-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.outcome-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.outcome-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.outcome-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.outcome-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.outcome-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.care-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.care-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.care-evidence-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
}

.care-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.care-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.care-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.care-control-card span {
  color: var(--text);
  font-weight: 900;
}

.care-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.care-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.care-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.care-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.care-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.care-signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.care-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.care-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.care-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.care-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.care-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.care-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.care-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.document-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.document-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.document-access-panel {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ffffff 0%, #f6fdf9 100%);
}

.document-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.document-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.document-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.document-control-card span {
  color: var(--text);
  font-weight: 900;
}

.document-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.document-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.document-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.document-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.document-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.document-signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.document-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.document-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.document-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.document-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.document-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.document-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.document-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.timesheet-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.timesheet-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.timesheet-approval-panel {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ffffff 0%, #f6fdf9 100%);
}

.timesheet-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.timesheet-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.timesheet-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.timesheet-control-card span {
  color: var(--text);
  font-weight: 900;
}

.timesheet-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.timesheet-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.timesheet-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.timesheet-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.timesheet-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.timesheet-signal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.timesheet-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.timesheet-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.timesheet-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.timesheet-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.timesheet-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.timesheet-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.timesheet-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.leave-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.leave-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.leave-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.leave-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.leave-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.leave-control-card span {
  color: var(--text);
  font-weight: 900;
}

.leave-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.leave-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.leave-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.leave-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.leave-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.leave-signal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.leave-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.leave-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.leave-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.leave-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.leave-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.leave-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.leave-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.leave-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.billing-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.billing-signal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.billing-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.billing-signal-card strong {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.billing-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.billing-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.billing-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.billing-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.billing-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.invoice-detail-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.invoice-detail-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}

.invoice-detail-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.invoice-detail-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.invoice-detail-card span {
  color: var(--text);
  font-weight: 900;
}

.invoice-detail-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.invoice-detail-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.invoice-detail-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.invoice-detail-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.invoice-detail-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.integration-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.integration-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.integration-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.integration-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.integration-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.integration-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.integration-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.integration-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.integration-control-card span {
  color: var(--text);
  font-weight: 900;
}

.integration-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.integration-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.integration-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.integration-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.integration-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.integration-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.integration-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.integration-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.integration-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.integration-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.compliance-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.compliance-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.compliance-signal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.compliance-control-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.compliance-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.compliance-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.compliance-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.compliance-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.compliance-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.compliance-control-card span {
  color: var(--text);
  font-weight: 900;
}

.compliance-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.compliance-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.compliance-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.compliance-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.compliance-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.compliance-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.compliance-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.compliance-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.compliance-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.staff-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.staff-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.staff-credential-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
}

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

.staff-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.staff-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.staff-control-card span {
  color: var(--text);
  font-weight: 900;
}

.staff-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.staff-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.staff-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.staff-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.staff-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.staff-signal-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.staff-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.staff-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.staff-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.staff-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.staff-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.staff-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.staff-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.staff-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.participant-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.participant-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.participant-safeguarding-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
}

.participant-consent-panel {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

.participant-privacy-panel {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ffffff 0%, #f6fdf9 100%);
}

.participant-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.participant-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.participant-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.participant-control-card span {
  color: var(--text);
  font-weight: 900;
}

.participant-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.participant-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.participant-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.participant-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.participant-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.participant-signal-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}

.participant-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.participant-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.participant-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.participant-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.participant-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.participant-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.participant-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.participant-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.service-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.service-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.service-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.service-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.service-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.service-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.service-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.service-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.service-control-card span {
  color: var(--text);
  font-weight: 900;
}

.service-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.service-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.service-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.service-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.service-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.service-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.service-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.service-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.service-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.service-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.funding-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.funding-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.funding-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.funding-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.funding-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.funding-control-card span {
  color: var(--text);
  font-weight: 900;
}

.funding-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.funding-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.funding-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.funding-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.funding-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.funding-signal-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 10px;
}

.funding-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.funding-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.funding-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.funding-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.funding-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.funding-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.funding-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.report-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.report-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.report-signal-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.report-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.report-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.report-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.report-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.report-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.report-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.report-control-card span {
  color: var(--text);
  font-weight: 900;
}

.report-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.report-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.report-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.report-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.report-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.report-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.report-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.report-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.report-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.business-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.business-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.business-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.business-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.business-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.business-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.business-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.business-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.business-control-card span {
  color: var(--text);
  font-weight: 900;
}

.business-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.business-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.business-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.business-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.business-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.business-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.business-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.business-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.business-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.business-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.permission-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.permission-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.permission-control-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.permission-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.permission-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.permission-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.permission-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.permission-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.permission-control-card span {
  color: var(--text);
  font-weight: 900;
}

.permission-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.permission-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.permission-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.permission-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.permission-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.permission-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.permission-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.permission-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.permission-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.permission-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.settings-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.settings-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.settings-signal-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.settings-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.settings-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.settings-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.settings-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.settings-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.settings-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.settings-control-card span {
  color: var(--text);
  font-weight: 900;
}

.settings-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.settings-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.settings-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.settings-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.settings-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.settings-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.settings-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.settings-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.account-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.account-signal-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.account-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.account-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.account-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.account-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.account-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.account-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.account-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.account-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.access-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.access-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.access-signal-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.access-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.access-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.access-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.access-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.access-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.access-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.access-control-card span {
  color: var(--text);
  font-weight: 900;
}

.access-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.access-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.access-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.access-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.access-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.access-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.access-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.access-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.access-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.access-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.workspace-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.workspace-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.workspace-signal-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.workspace-control-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.workspace-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.workspace-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.workspace-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.workspace-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.workspace-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.workspace-control-card span {
  color: var(--text);
  font-weight: 900;
}

.workspace-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.workspace-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.workspace-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.workspace-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.workspace-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.workspace-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.workspace-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.workspace-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.workspace-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.workspace-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.billing-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.billing-governance-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.billing-control-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.billing-governance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.billing-control-card,
.billing-governance-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.billing-control-card strong,
.billing-governance-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.billing-control-card span,
.billing-governance-card span {
  color: var(--text);
  font-weight: 900;
}

.billing-control-card small,
.billing-governance-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.billing-control-card--success,
.billing-governance-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.billing-control-card--warning,
.billing-governance-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.billing-control-card--danger,
.billing-governance-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.billing-control-card--neutral,
.billing-governance-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.admin-integration-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.admin-integration-governance-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.admin-integration-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.admin-integration-governance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.admin-integration-card,
.admin-integration-governance-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.admin-integration-card strong,
.admin-integration-governance-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.admin-integration-card span,
.admin-integration-governance-card span {
  color: var(--text);
  font-weight: 900;
}

.admin-integration-card small,
.admin-integration-governance-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-integration-card--success,
.admin-integration-governance-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.admin-integration-card--warning,
.admin-integration-governance-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.admin-integration-card--danger,
.admin-integration-governance-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.admin-integration-card--neutral,
.admin-integration-governance-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.security-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.security-governance-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.security-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(176px, 100%), 1fr));
  gap: 12px;
}

.security-governance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 12px;
}

.security-signal-card,
.security-governance-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.security-signal-card strong,
.security-governance-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.security-signal-card span,
.security-governance-card span {
  min-width: 0;
  color: var(--text);
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: normal;
}

.security-signal-card small,
.security-governance-card small {
  min-width: 0;
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: normal;
}

.security-signal-card--success,
.security-governance-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.security-signal-card--warning,
.security-governance-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.security-signal-card--danger,
.security-governance-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.security-signal-card--neutral,
.security-governance-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.readiness-signal-panel,
.log-signal-panel,
.log-control-panel,
.record-change-panel,
.backup-drill-workbench {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.readiness-signal-grid,
.log-signal-grid,
.log-control-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.log-control-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.readiness-signal-card,
.log-signal-card,
.log-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.readiness-signal-card strong,
.log-signal-card strong,
.log-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.readiness-signal-card span,
.log-signal-card span,
.log-control-card span {
  color: var(--text);
  font-weight: 900;
}

.readiness-signal-card small,
.log-signal-card small,
.log-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.readiness-signal-card--success,
.log-signal-card--success,
.log-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.readiness-signal-card--warning,
.log-signal-card--warning,
.log-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.readiness-signal-card--danger,
.log-signal-card--danger,
.log-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.readiness-signal-card--neutral,
.log-signal-card--neutral,
.log-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.backup-drill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.backup-drill-actions form {
  margin: 0;
}

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

.backup-drill-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.backup-drill-card strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.backup-drill-card small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.backup-drill-card__meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  min-width: 160px;
}

.backup-drill-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.backup-drill-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.backup-drill-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.platform-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.platform-governance-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.platform-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.platform-governance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.platform-signal-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 142px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.platform-governance-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 142px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.platform-signal-card strong,
.platform-governance-card strong {
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
}

.platform-signal-card span,
.platform-governance-card span {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.platform-signal-card small,
.platform-governance-card small {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.platform-signal-card--success,
.platform-governance-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.platform-signal-card--warning,
.platform-governance-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.platform-signal-card--danger,
.platform-governance-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.platform-signal-card--neutral,
.platform-governance-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.merchant-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.merchant-control-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
}

.merchant-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.merchant-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.merchant-control-card span {
  color: var(--text);
  font-weight: 900;
}

.merchant-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.merchant-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.merchant-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.merchant-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.merchant-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.dashboard-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dashboard-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-signal-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  min-height: 142px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.dashboard-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.dashboard-signal-card strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.dashboard-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.dashboard-signal-card span {
  max-width: 14ch;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-control-card span {
  color: var(--text);
  font-weight: 900;
}

.dashboard-signal-card small {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.dashboard-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.dashboard-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.dashboard-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.dashboard-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.dashboard-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.dashboard-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.dashboard-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.dashboard-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.dashboard-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.schedule-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.schedule-signal-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}

.schedule-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.schedule-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.schedule-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.schedule-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.schedule-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.schedule-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.schedule-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.schedule-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.task-flow-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.task-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.task-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.task-flow-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.task-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.task-flow-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.task-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.task-flow-card span {
  color: var(--text);
  font-weight: 900;
}

.task-control-card span {
  color: var(--text);
  font-weight: 900;
}

.task-flow-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.task-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.task-flow-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.task-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.task-flow-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.task-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.task-flow-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.task-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.task-flow-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.task-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.payroll-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.payroll-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.payroll-preapproval-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
}

.payroll-summary-panel .page-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.payroll-summary-panel .page-actions form { margin: 0; }
.payroll-summary-note { margin: 1rem 0 0; color: var(--muted, #64748b); }

.payroll-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.payroll-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.payroll-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.payroll-control-card span {
  color: var(--text);
  font-weight: 900;
}

.payroll-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.payroll-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.payroll-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.payroll-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.payroll-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.payroll-signal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.payroll-signal-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.payroll-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.payroll-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.payroll-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.payroll-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.payroll-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.payroll-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.payroll-signal-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.signing-evidence-strip span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ecfdf5;
  color: var(--primary);
}

.signing-readiness-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.signing-readiness-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.signing-readiness-card > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
}

.signing-readiness-card--success > span {
  background: #dcfce7;
  color: var(--success);
}

.signing-readiness-card--warning > span {
  background: #fef3c7;
  color: var(--warning);
}

.signing-readiness-card strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

.signing-readiness-card small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
}

.signing-readiness-card p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.signing-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.signing-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.signing-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.signing-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.signing-control-card span {
  color: var(--text);
  font-weight: 900;
}

.signing-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.signing-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.signing-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.signing-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.signing-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.evidence-lock-panel {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff 0%, #f7fef9 100%);
}

.signing-preview-workbench {
  margin-bottom: 18px;
}

.signing-template-preview-panel,
.certificate-preview-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.signing-template-preview-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.signing-template-preview-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.signing-template-preview-card__head > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #ecfeff;
  color: var(--primary);
}

.signing-template-preview-card strong {
  color: var(--text);
  font-size: 0.96rem;
}

.signing-template-preview-card small,
.signing-template-preview-card p {
  color: var(--text-muted);
  line-height: 1.45;
}

.signing-template-preview-card p {
  margin: 0;
}

.signing-template-preview-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signing-template-preview-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

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

.certificate-preview-card > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.certificate-preview-card span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-preview-card strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.certificate-preview-card small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.signing-download-ui {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.list-card--evidence {
  align-items: flex-start;
  border-color: #dcfce7;
  background: #ffffff;
}

.list-card--evidence > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.list-card--evidence .list-card__meta {
  min-width: 180px;
}

.pwa-conflict-workbench {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
}

.list-card--pwa-conflict {
  align-items: flex-start;
  border-color: #fed7aa;
  background: #ffffff;
}

.list-card--pwa-conflict > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.proda-readiness-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.proda-readiness-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr) minmax(280px, 1.1fr);
  gap: 14px;
}

.proda-readiness-summary,
.proda-checklist,
.proda-error-preview {
  display: grid;
  gap: 10px;
}

.proda-readiness-summary > div,
.proda-check,
.proda-error-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.proda-readiness-summary span,
.proda-check small {
  color: var(--text-muted);
}

.proda-readiness-summary span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.proda-readiness-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1.45rem;
}

.proda-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.proda-check > span {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
}

.proda-check.is-ready > span {
  background: #dcfce7;
  color: var(--success);
}

.proda-check.is-warning > span {
  background: #fef3c7;
  color: var(--warning);
}

.proda-check strong,
.proda-error-preview strong {
  color: var(--text);
}

.proda-check small,
.proda-error-preview p,
.proda-error-preview li {
  color: var(--text-muted);
  line-height: 1.45;
}

.proda-error-preview ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.claim-state-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.award-control-panel,
.profit-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.award-control-grid,
.profit-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.award-control-card,
.profit-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.award-control-card strong,
.profit-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.award-control-card span,
.profit-control-card span {
  color: var(--text);
  font-weight: 900;
}

.award-control-card small,
.profit-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.award-control-card--success,
.profit-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.award-control-card--warning,
.profit-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.award-control-card--danger,
.profit-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.award-control-card--neutral,
.profit-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.claim-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.claim-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.claim-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.claim-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.claim-control-card span {
  color: var(--text);
  font-weight: 900;
}

.claim-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.claim-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.claim-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.claim-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.claim-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.claim-state-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.claim-state-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.claim-state-card strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.claim-state-card span {
  color: var(--text);
  font-weight: 900;
}

.claim-state-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.claim-state-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.claim-state-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.claim-state-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.claim-rejection-triage {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fff7ed, #ffffff 62%);
}

.claim-resubmission-workbench {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fff7ed, #ffffff 62%);
}

.claim-rejection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.claim-rejection-summary > div,
.claim-rejection-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}

.claim-rejection-summary span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.claim-rejection-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1.25rem;
}

.claim-rejection-summary small,
.claim-rejection-card small {
  color: var(--text-muted);
}

.claim-rejection-list {
  display: grid;
  gap: 10px;
}

.claim-rejection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.claim-rejection-card__code {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.claim-rejection-card strong {
  display: block;
  color: var(--text);
}

.claim-rejection-card__meta {
  display: grid;
  gap: 7px;
  justify-items: end;
  min-width: 230px;
}

.claim-resubmission-list {
  display: grid;
  gap: 12px;
}

.claim-resubmission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.claim-resubmission-card__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.claim-resubmission-card__main > span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff7ed;
  color: #ea580c;
}

.claim-resubmission-card strong {
  color: var(--text);
  font-size: 1rem;
}

.claim-resubmission-card p,
.claim-resubmission-card small {
  color: var(--text-muted);
  line-height: 1.45;
}

.claim-resubmission-card p {
  margin: 6px 0 0;
}

.claim-resubmission-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.claim-resubmission-card__meta small {
  flex-basis: 100%;
  text-align: right;
}

.claim-resubmission-card__meta .table-actions {
  width: 100%;
  justify-content: flex-end;
}

.intake-conversion-panel {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.referral-signal-panel {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.referral-handoff-panel {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
}

.referral-handoff-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.referral-handoff-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.referral-handoff-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.referral-handoff-card span {
  color: var(--text);
  font-weight: 900;
}

.referral-handoff-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.referral-handoff-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.referral-handoff-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.referral-handoff-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.referral-handoff-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

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

.referral-signal-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.referral-signal-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.referral-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.referral-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.referral-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.referral-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.referral-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.intake-conversion-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.intake-conversion-metrics > div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.intake-conversion-metrics span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intake-conversion-metrics strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1.35rem;
}

.intake-conversion-metrics small {
  color: var(--text-muted);
}

.intake-conversion-list {
  display: grid;
  gap: 10px;
}

.intake-conversion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.intake-conversion-card > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.intake-conversion-card strong {
  color: var(--text);
}

.intake-conversion-card small,
.intake-conversion-card span {
  color: var(--text-muted);
}

.intake-conversion-card--success {
  border-color: #bbf7d0;
}

.intake-conversion-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.audit-evidence-panel {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff 0%, #f7fef9 100%);
}

.audit-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.audit-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.audit-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.audit-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.audit-control-card span {
  color: var(--text);
  font-weight: 900;
}

.audit-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.audit-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.audit-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.audit-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.audit-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.audit-evidence-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.audit-evidence-summary > div,
.audit-evidence-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.audit-evidence-summary span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.audit-evidence-summary strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1.3rem;
}

.audit-evidence-summary small {
  color: var(--text-muted);
}

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

.audit-evidence-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.audit-evidence-card > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ecfdf5;
  color: var(--success);
}

.audit-evidence-card.is-gap > span {
  background: #fef3c7;
  color: var(--warning);
}

.audit-evidence-card strong {
  color: var(--text);
}

.audit-evidence-card small {
  color: var(--text-muted);
  line-height: 1.45;
}

.audit-evidence-card__meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.geofence-policy-panel {
  margin-bottom: 18px;
}

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

.geofence-policy-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.geofence-policy-card > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
}

.geofence-policy-card--required > span {
  background: #fee2e2;
  color: var(--danger);
}

.geofence-policy-card--disabled > span {
  background: #dcfce7;
  color: var(--success);
}

.geofence-policy-card strong {
  color: var(--text);
  font-size: 0.96rem;
}

.geofence-policy-card p,
.geofence-policy-card small {
  color: var(--text-muted);
  line-height: 1.45;
}

.geofence-policy-card p {
  margin: 4px 0 8px;
}

.geofence-policy-card small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  font-weight: 800;
}

.offline-queue-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.offline-queue-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.offline-queue-list span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.offline-queue-list small {
  grid-column: 1 / -1;
  color: var(--text-muted);
}

.offline-queue-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.offline-queue-actions button {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.offline-queue-actions button:hover,
.offline-queue-actions button:focus-visible {
  border-color: rgba(37, 99, 235, 0.35);
  background: var(--primary-soft);
  color: var(--primary);
}

.offline-queue-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.pwa-status span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 700;
}

.pwa-sync-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pwa-sync-meta span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.pwa-sync-health .detail-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.staff-pwa-grid .panel__head {
  align-items: flex-start;
}

.mobile-experience-strip,
.portal-experience-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.94), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.mobile-experience-strip h3,
.portal-experience-strip h3 {
  margin: 2px 0 6px;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
}

.mobile-experience-strip p,
.portal-experience-strip p {
  max-width: 62ch;
  margin: 0;
  color: var(--text-muted);
}

.mobile-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 8px;
}

.mobile-flow span,
.portal-action-stack span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-flow .icon,
.portal-action-stack .icon {
  color: var(--primary);
}

.portal-action-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

.portal-signal-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.portal-control-panel {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.portal-claim-panel {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #ffffff 0%, #f6fdf9 100%);
}

.portal-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.portal-control-card {
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.portal-control-card strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.portal-control-card span {
  color: var(--text);
  font-weight: 900;
}

.portal-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.portal-control-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.portal-control-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.portal-control-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.portal-control-card--neutral {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.portal-signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.portal-signal-card {
  display: grid;
  gap: 6px;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.portal-signal-card strong {
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
}

.portal-signal-card span {
  color: var(--text);
  font-weight: 900;
}

.portal-signal-card small {
  color: var(--text-muted);
  line-height: 1.4;
}

.portal-signal-card--success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.portal-signal-card--warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.portal-signal-card--danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.signature-pad {
  display: grid;
  gap: 12px;
}

.signing-request-preview {
  display: grid;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.signing-request-preview h4 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.signing-request-preview__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.signing-request-preview__grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.signing-request-preview span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signing-request-preview strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.9rem;
}

.signing-request-preview small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-muted);
  line-height: 1.45;
}

.signing-request-preview__note {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding-top: 10px;
}

.signature-pad canvas {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 19 / 5.5;
  min-height: 180px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  touch-action: none;
}

.link-inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--primary-strong);
  font-weight: 800;
  text-decoration: none;
}

.custom-prompt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.58);
}

.custom-prompt {
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.24);
}

.custom-prompt__mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--warning);
  background: var(--warning-soft);
}

.custom-prompt--danger {
  border-color: #fecaca;
}

.custom-prompt--danger .custom-prompt__mark {
  color: var(--danger);
  background: var(--danger-soft);
}

/* SupportLedger module workbench polish */
.page {
  gap: clamp(18px, 2vw, 28px);
}

.page-header {
  position: relative;
  overflow: hidden;
  align-items: flex-start;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 30px);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.98) 0 62%, rgba(239, 246, 255, 0.94) 62% 100%),
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    var(--surface);
  background-size: auto, 42px 42px, 42px 42px, auto;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #20c997);
}

.page-header h2 {
  max-width: 920px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.04;
}

.page-header p:not(.eyebrow) {
  max-width: 78ch;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.6;
}

.page-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.page-header__meta span {
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: #334155;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  overflow-wrap: anywhere;
}

.page-header__meta .icon {
  color: var(--primary);
}

.page-header__workbench {
  width: min(100%, 980px);
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.page-header__workbench-item {
  min-width: 0;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.78)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.page-header__workbench-item > .icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.10);
  color: var(--primary);
  font-size: 0.9rem;
}

.page-header__workbench-item span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.page-header__workbench-item strong {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
}

.page-header__workbench-item small {
  min-width: 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-header__actions {
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats-grid {
  gap: 12px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.10);
  border-radius: 14px;
  padding: 16px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.92)),
    var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
  opacity: 0.72;
}

.stat-card--amber::before {
  background: var(--warning);
}

.stat-card--green::before,
.stat-card--emerald::before {
  background: var(--success);
}

.stat-card--rose::before,
.stat-card--danger::before {
  background: var(--danger);
}

.stat-card--purple::before {
  background: #7c3aed;
}

.stat-card__label {
  color: #334155;
  font-weight: 850;
  line-height: 1.22;
}

.stat-card__value {
  margin: 7px 0 6px;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 850;
}

.stat-card__meta {
  max-width: 18rem;
  color: #64748b;
  line-height: 1.35;
}

.panel {
  border-color: rgba(148, 163, 184, 0.32);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.7)),
    var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.panel__head {
  align-items: flex-start;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  padding-bottom: 14px;
}

.panel__head h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  font-weight: 850;
  line-height: 1.2;
}

.panel__head p {
  max-width: 76ch;
  color: #64748b;
  line-height: 1.48;
}

.panel__head > div {
  min-width: 0;
}

.panel__head h3,
.panel__head p,
.panel__head .eyebrow {
  overflow-wrap: anywhere;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
  gap: 12px;
  align-items: stretch;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
) {
  position: relative;
  min-width: 0;
  min-height: 132px;
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 15px;
  align-content: start;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.84)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #94a3b8;
  opacity: 0.9;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
) strong {
  color: #0f172a;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 850;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
) span {
  max-width: 100%;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
) small {
  max-width: 100%;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--success"] {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    linear-gradient(180deg, #ffffff, rgba(240, 253, 244, 0.82)),
    #ffffff;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--success"]::before {
  background: var(--success);
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--warning"] {
  border-color: rgba(245, 158, 11, 0.32);
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 251, 235, 0.86)),
    #ffffff;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--warning"]::before {
  background: var(--warning);
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--danger"] {
  border-color: rgba(239, 68, 68, 0.28);
  background:
    linear-gradient(180deg, #ffffff, rgba(254, 242, 242, 0.86)),
    #ffffff;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--danger"]::before {
  background: var(--danger);
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--neutral"] {
  border-color: rgba(148, 163, 184, 0.26);
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.9)),
    #ffffff;
}

.panel > :is(
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"]
) > :is(
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"]
)[class*="--neutral"]::before {
  background: #94a3b8;
}

.server-table__toolbar,
.client-table__toolbar {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.82);
}

.table-shell {
  border-color: rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.68)),
    var(--surface);
}

.data-table th {
  background: rgba(248, 250, 252, 0.96);
  color: #475569;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.data-table td {
  vertical-align: top;
}

.server-empty-state,
.empty-state {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.96)),
    var(--surface-soft);
}

.table-empty-state {
  align-items: flex-start;
  padding: 18px;
}

.server-empty-state strong,
.empty-state strong {
  color: var(--text);
  font-weight: 850;
}

.server-empty-state p,
.empty-state p {
  color: #64748b;
  line-height: 1.5;
}

.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.empty-state__actions span {
  min-height: 30px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 850;
}

.empty-state__actions .icon {
  color: var(--primary);
}

@media (max-width: 820px) {
  html,
  body,
  .app-shell,
  .workspace,
  .workspace__content,
  .page {
    max-width: 100%;
    overflow-x: clip;
  }

  .workspace-breadcrumb {
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 14px;
    padding-left: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .workspace-breadcrumb > * {
    flex: 0 0 auto;
  }

  .sidebar {
    max-width: 100vw;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .sidebar__nav {
    max-width: max-content;
  }

  .topbar {
    max-width: 100vw;
    overflow: hidden;
  }

  .topbar__left,
  .topbar__right {
    min-width: 0;
  }

  .page-header {
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .page-header__actions {
    justify-content: stretch;
  }

  .page-header__actions .button,
  .page-header__actions button {
    flex: 1 1 150px;
  }

  .page-header__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .page-header__workbench {
    width: calc(100vw - 36px);
    max-width: 100%;
    margin-top: 14px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .page-header__workbench-item {
    flex: 0 0 min(260px, 82vw);
    scroll-snap-align: start;
  }

  .stats-grid {
    gap: 10px;
  }

  .panel {
    padding: 18px;
  }

  .server-table__toolbar,
  .client-table__toolbar {
    align-items: stretch;
  }
}

/* SupportLedger work surface polish */
.page {
  gap: 18px;
}

.page > :is(.panel, .admin-module-nav, .stats-grid, .report-grid, .content-grid, .dashboard-grid--two) {
  min-width: 0;
}

.report-card,
.list-card,
.alert-row,
.toggle-row,
.setup-check-card,
.integration-card,
.audit-evidence-card {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.74)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.report-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.report-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(37, 99, 235, 0.74);
}

.report-card__head,
.report-card__foot {
  min-width: 0;
}

.report-card__head h3,
.report-card h3,
.report-card p,
.list-card__title,
.list-card small {
  overflow-wrap: anywhere;
}

.report-card p {
  max-width: 62ch;
  line-height: 1.46;
}

.report-card:hover,
.integration-card:hover,
.audit-evidence-card:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.token-badge {
  border: 1px solid rgba(37, 99, 235, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.badge {
  min-height: 26px;
  align-items: center;
  line-height: 1;
  white-space: normal;
  text-align: center;
}

.button,
.icon-button,
.admin-module-tab,
.status-tabs button,
.table-view-toggle button {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.button:hover,
.icon-button:hover,
.admin-module-tab:hover {
  transform: translateY(-1px);
}

.button:active,
.icon-button:active,
.admin-module-tab:active {
  transform: translateY(0);
}

.table-actions,
.inline-actions,
.admin-actions-row,
.integration-card__actions {
  min-width: 0;
  align-items: center;
}

.table-actions {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.table-actions > * {
  flex: 0 0 auto;
}

.table-actions .button,
.table-actions .icon-button,
.data-table .button,
.data-table .icon-button {
  min-height: 36px;
}

.server-table,
.client-table {
  min-width: 0;
}

.server-table__toolbar,
.client-table__toolbar {
  position: relative;
  gap: 10px;
  align-items: center;
  border-color: rgba(148, 163, 184, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88)),
    var(--surface);
}

.server-table__toolbar::before,
.client-table__toolbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 14px 0 0 14px;
  background: rgba(37, 99, 235, 0.68);
}

.server-table__search,
.server-table__filter,
.server-table__length {
  min-width: 0;
}

.server-table__search input,
.server-table__filter select,
.server-table__length select,
.client-table__toolbar input,
.client-table__toolbar select {
  border-radius: 10px;
  border-color: rgba(148, 163, 184, 0.34);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.025);
}

.server-table__search input:focus,
.server-table__filter select:focus,
.server-table__length select:focus,
.client-table__toolbar input:focus,
.client-table__toolbar select:focus {
  border-color: rgba(37, 99, 235, 0.62);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
  outline: 0;
}

.server-table__footer,
.client-table__footer {
  min-width: 0;
  color: #475569;
  font-size: 0.84rem;
}

.server-table__pager {
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table-shell {
  overflow: auto;
  max-width: 100%;
  scrollbar-gutter: stable;
}

.data-table {
  min-width: max(760px, 100%);
}

.data-table th,
.data-table td {
  min-width: 132px;
  line-height: 1.45;
}

.data-table th {
  color: #334155;
  letter-spacing: 0;
}

.data-table tbody tr {
  transition: background-color 140ms ease;
}

.data-table tbody tr:hover td {
  background: rgba(239, 246, 255, 0.48);
}

.data-table td:first-child,
.data-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
  box-shadow: 1px 0 0 rgba(148, 163, 184, 0.22);
}

.data-table th:first-child {
  z-index: 3;
  background: rgba(248, 250, 252, 0.98);
}

.form-grid,
.admin-control-form,
.crud-form {
  min-width: 0;
}

.form-grid .field,
.admin-control-form .field,
.crud-form .field {
  min-width: 0;
}

.field input,
.field select,
.field textarea,
.field .select2-container--default .select2-selection--single {
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.34);
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.7)),
    #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  transform: none;
}

.custom-filepicker {
  border-radius: 14px;
  border-color: rgba(37, 99, 235, 0.24);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.62), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.custom-filepicker em {
  border: 1px solid rgba(37, 99, 235, 0.16);
  background: #ffffff;
  font-style: normal;
  font-weight: 850;
}

.rich-text-field {
  border-radius: 14px;
}

.modal {
  border-radius: 18px;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.22);
}

.modal__head {
  min-width: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.modal__head h3 {
  overflow-wrap: anywhere;
}

.detail-drawer__panel {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.detail-drawer__body {
  min-width: 0;
}

.business-check-grid {
  scrollbar-gutter: stable;
}

.status-tabs {
  max-width: 100%;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

.status-tabs button {
  flex: 0 0 auto;
}

@media (max-width: 820px) {
  .page {
    gap: 14px;
  }

  .report-card,
  .list-card,
  .alert-row,
  .toggle-row,
  .setup-check-card,
  .integration-card,
  .audit-evidence-card {
    border-radius: 13px;
  }

  .server-table__toolbar,
  .client-table__toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .server-table__search,
  .server-table__filter,
  .server-table__length {
    display: grid;
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  }

  .server-table__search input {
    width: 100%;
  }

  .server-table__footer,
  .client-table__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .server-table__pager {
    justify-content: stretch;
  }

  .server-table__pager .button {
    flex: 1 1 0;
  }

  .data-table {
    min-width: 760px;
  }

  .data-table th,
  .data-table td {
    min-width: 128px;
    padding: 11px 12px;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    min-width: 160px;
  }

  .table-actions {
    width: min(320px, 72vw);
  }

  .field-grid,
  .field-grid--2,
  .field-grid--3,
  .field-grid--4,
  .admin-control-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal {
    max-width: calc(100vw - 22px);
    border-radius: 16px;
  }

  .detail-drawer__panel {
    width: min(100%, 440px);
    padding: 22px;
  }
}

/* SupportLedger shell polish */
.topbar {
  border-bottom-color: rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 12px 30px rgba(15, 23, 42, 0.035);
  backdrop-filter: blur(14px);
}

.brand-lockup__mark {
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--primary), #1d4ed8),
    var(--primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.brand-lockup strong {
  font-weight: 850;
  letter-spacing: 0;
}

.sidebar {
  border-right-color: rgba(148, 163, 184, 0.25);
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.92)),
    var(--surface);
}

.sidebar__intro {
  border: 1px solid rgba(37, 99, 235, 0.10);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.78), rgba(255, 255, 255, 0.94)),
    var(--surface-soft);
}

.sidebar__intro p:last-child {
  line-height: 1.45;
}

.nav-section {
  gap: 5px;
}

.nav-section > p {
  margin: 14px 8px 4px;
  color: #64748b;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.nav-item {
  min-width: 0;
  border-radius: 12px;
  color: #334155;
  font-weight: 750;
}

.nav-item .icon {
  width: 20px;
  color: #64748b;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  border-color: rgba(37, 99, 235, 0.12);
  background: rgba(239, 246, 255, 0.76);
  color: #1d4ed8;
}

.nav-item:hover .icon {
  color: #2563eb;
}

.nav-item.is-active {
  border-color: rgba(37, 99, 235, 0.26);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.13), rgba(239, 246, 255, 0.92)),
    var(--primary-soft);
  color: #1d4ed8;
  font-weight: 850;
  box-shadow: inset 3px 0 0 #2563eb, 0 10px 22px rgba(37, 99, 235, 0.10);
}

.nav-item.is-active .icon {
  color: #1d4ed8;
}

.sidebar__footer {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.86)),
    var(--surface-soft);
}

.workspace {
  background:
    linear-gradient(180deg, #f8fafc 0, #f6f8fb 44%, #ffffff 100%),
    #f8fafc;
}

.workspace__content {
  padding: clamp(18px, 2.3vw, 28px);
}

.workspace-breadcrumb {
  border-bottom-color: rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.74);
}

.search-pill,
.profile-trigger {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.025);
}

.profile-trigger:hover,
.search-pill--button:hover {
  border-color: rgba(37, 99, 235, 0.22);
  background: #f8fbff;
}

.admin-module-nav {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.admin-module-group {
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.86)),
    var(--surface);
}

.admin-module-group > p {
  color: #64748b;
  letter-spacing: 0;
  text-transform: none;
}

.admin-module-tab {
  border: 1px solid transparent;
  border-radius: 10px;
}

.admin-module-tab.is-active {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(239, 246, 255, 0.96);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.04), 0 8px 18px rgba(37, 99, 235, 0.08);
}

@media (max-width: 820px) {
  .workspace__content {
    padding: 14px;
  }

  .sidebar__intro {
    display: none;
  }

  .sidebar {
    gap: 10px;
  }

  .nav-section > p {
    display: none;
  }

  .nav-item {
    min-height: 42px;
  }

  .admin-module-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-module-group {
    min-width: min(270px, 84vw);
  }
}

/* SupportLedger density states polish */
.stats-grid {
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.stat-card {
  min-width: 0;
  min-height: 138px;
  border-color: rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.82)),
    var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.stat-card:hover {
  border-color: rgba(37, 99, 235, 0.20);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.055);
  transform: translateY(-1px);
}

.stat-card__head {
  min-width: 0;
  height: 100%;
}

.stat-card__head > div {
  min-width: 0;
  display: grid;
  align-content: start;
}

.stat-card__label,
.stat-card__meta,
.stat-card__value {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stat-card__label {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 850;
}

.stat-card__value {
  color: #0f172a;
  line-height: 1.04;
}

.stat-card__meta {
  color: #64748b;
  font-size: 0.82rem;
}

.stat-card .token-badge {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
}

.stat-card--teal::before,
.stat-card--slate::before,
.stat-card--stone::before {
  background: var(--primary);
}

.stat-card--teal .token-badge,
.stat-card--slate .token-badge,
.stat-card--stone .token-badge {
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
}

.stat-card--amber .token-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.stat-card--green .token-badge,
.stat-card--emerald .token-badge {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.stat-card--rose .token-badge,
.stat-card--danger .token-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.stat-card--purple .token-badge {
  background: rgba(124, 58, 237, 0.10);
  color: #6d28d9;
}

.server-empty-state,
.empty-state,
.table-empty-state {
  min-width: 0;
}

.server-empty-state {
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.74), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.server-empty-state__icon {
  border: 1px solid rgba(37, 99, 235, 0.10);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.server-empty-state--error {
  border-color: rgba(239, 68, 68, 0.20);
  background:
    linear-gradient(135deg, rgba(254, 242, 242, 0.82), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.server-empty-state--error .server-empty-state__icon {
  border-color: rgba(239, 68, 68, 0.16);
  background: rgba(239, 68, 68, 0.11);
}

.empty-state__actions span {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
}

.server-table.is-loading .table-shell {
  position: relative;
}

.server-table.is-loading .table-shell::before {
  content: "";
  position: sticky;
  top: 0;
  left: 0;
  z-index: 4;
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.92), transparent);
  background-size: 180% 100%;
  animation: table-load-sweep 1.05s linear infinite;
}

.server-table.is-loading .table-shell::after {
  content: "Loading records";
  position: sticky;
  left: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.10);
}

@keyframes table-load-sweep {
  100% {
    background-position: 180% 0;
  }
}

.skeleton-row td {
  background: linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.82));
}

.skeleton-line,
.skeleton-block {
  background: linear-gradient(90deg, #e2e8f0, #f1f5f9);
}

.form-alert,
.form-notice {
  border-radius: 14px;
  line-height: 1.45;
}

.form-notice {
  border-color: rgba(37, 99, 235, 0.18);
  background: rgba(239, 246, 255, 0.86);
}

.form-alert {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(254, 242, 242, 0.92);
}

.toast {
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.impersonation-banner {
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.92)),
    #fffbeb;
}

@media (max-width: 820px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  }

  .stat-card {
    min-height: 128px;
    padding: 14px;
  }

  .stat-card__head {
    gap: 10px;
  }

  .stat-card .token-badge {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .stat-card__value {
    font-size: 1.42rem;
  }

  .server-empty-state {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .server-empty-state__icon {
    width: 38px;
    height: 38px;
  }

  .empty-state__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* SupportLedger operational queue polish */
.activity-feed,
.shift-mini-list,
.focus-grid,
.stack-list,
.roster-validation-list,
.backup-drill-workbench,
.signing-preview-workbench,
.pwa-conflict-workbench,
.claim-resubmission-workbench {
  min-width: 0;
}

.activity-row,
.shift-mini-card,
.focus-card,
.list-card,
.audit-row,
.detail-pair,
.roster-validation-item,
.legend-row,
.alert-row,
.toggle-row {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.82)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.activity-row:hover,
.shift-mini-card:hover,
.focus-card:hover,
.list-card:hover,
.roster-validation-item:hover,
.legend-row:hover {
  border-color: rgba(37, 99, 235, 0.20);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.055);
}

.activity-row {
  grid-template-columns: 34px minmax(0, 1fr);
}

.activity-row__body strong,
.activity-row__body small,
.shift-mini-card__body strong,
.shift-mini-card__body span,
.shift-mini-card__body small,
.focus-card__body strong,
.focus-card__body small,
.list-card strong,
.list-card small,
.audit-row p,
.audit-row small,
.detail-pair span,
.detail-pair strong,
.detail-pair small,
.roster-validation-item strong,
.roster-validation-item span,
.roster-validation-item small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.status-dot {
  box-shadow: 0 0 0 6px #ffffff, 0 0 0 7px rgba(148, 163, 184, 0.34);
}

.activity-row__body small,
.shift-mini-card__meta .badge,
.list-card__meta small {
  width: fit-content;
  max-width: 100%;
}

.shift-mini-card {
  grid-template-columns: 74px minmax(0, 1fr) minmax(82px, auto);
  border-radius: 15px;
}

.shift-mini-card__date {
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: #ffffff;
}

.shift-mini-card__date strong {
  color: #475569;
  font-weight: 850;
}

.shift-mini-card__date span {
  color: #1d4ed8;
  font-weight: 850;
}

.focus-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.focus-card {
  border-radius: 15px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.86)),
    var(--surface);
}

.focus-card__icon {
  border-radius: 12px;
}

.focus-card__value {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.list-card {
  align-items: flex-start;
  border-radius: 15px;
}

.list-card > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.list-card__meta {
  min-width: 0;
  justify-items: end;
}

.detail-pair {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 15px;
  overflow: hidden;
}

.detail-pair::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(37, 99, 235, 0.58);
}

.detail-pair span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
}

.detail-pair strong {
  color: #0f172a;
  font-weight: 850;
  line-height: 1.25;
}

.detail-pair small {
  color: #64748b;
  line-height: 1.4;
}

.roster-validation-list {
  display: grid;
  gap: 10px;
}

.roster-validation-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.roster-validation-item > div:first-child {
  min-width: 0;
}

.audit-row {
  align-items: flex-start;
}

.audit-row p {
  line-height: 1.45;
}

.legend-row {
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.alert-row--danger {
  border-color: rgba(239, 68, 68, 0.22);
  background:
    linear-gradient(180deg, #ffffff, rgba(254, 242, 242, 0.86)),
    var(--surface);
}

.alert-row--warning {
  border-color: rgba(245, 158, 11, 0.26);
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 251, 235, 0.9)),
    var(--surface);
}

@media (max-width: 820px) {
  .activity-row {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 12px;
  }

  .activity-row::before {
    left: 24px;
  }

  .shift-mini-card {
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .shift-mini-card__meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .focus-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .list-card,
  .roster-validation-item,
  .legend-row,
  .alert-row,
  .toggle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .list-card__meta {
    justify-items: start;
  }

  .access-model-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .access-model-card .token-badge {
    width: 44px;
    height: 44px;
  }

  .roster-validation-item .table-actions {
    width: 100%;
  }
}

/* SupportLedger insight visual polish */
.grouped-chart,
.service-chart,
.mini-chart,
.intake-conversion-metrics {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.78)),
    var(--surface);
}

.grouped-chart {
  padding: 18px 14px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background-image:
    linear-gradient(to top, rgba(148, 163, 184, 0.24) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.78));
  background-size: 100% 25%, auto;
}

.grouped-chart__month {
  min-width: 0;
  color: #64748b;
  font-weight: 750;
}

.grouped-chart__bar {
  border-radius: 7px 7px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.grouped-chart__bar--revenue {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.grouped-chart__bar--costs {
  background: linear-gradient(180deg, #cbd5e1, #64748b);
}

.chart-legend {
  align-items: center;
}

.chart-legend span {
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
  color: #475569;
  font-weight: 800;
}

.service-chart {
  padding: 18px;
}

.service-chart__donut {
  filter: drop-shadow(0 18px 32px rgba(15, 23, 42, 0.10));
}

.service-chart__donut span {
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.26), 0 10px 26px rgba(15, 23, 42, 0.06);
}

.progress {
  min-width: 72px;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: #e2e8f0;
}

.progress span {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #2563eb, #60a5fa),
    var(--primary);
}

.availability {
  min-width: 0;
  gap: 8px;
}

.availability > span {
  color: #475569;
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

.mini-chart {
  padding: 14px;
}

.mini-chart__row {
  min-width: 0;
}

.mini-chart__label {
  color: #475569;
  font-weight: 850;
}

.mini-chart__track {
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mini-chart__bar {
  border-radius: inherit;
  background:
    linear-gradient(90deg, #2563eb, #60a5fa),
    var(--primary);
}

.intake-conversion-metrics {
  padding: 12px;
}

.intake-conversion-metrics > div {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #ffffff;
}

.intake-conversion-metrics span,
.intake-conversion-metrics strong,
.intake-conversion-metrics small {
  overflow-wrap: anywhere;
}

.quick-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.quick-action-grid .button {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  background: #ffffff;
  justify-content: flex-start;
}

@media (max-width: 820px) {
  .grouped-chart {
    min-width: 640px;
  }

  .service-chart {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .service-chart__donut {
    width: min(190px, 70vw);
  }

  .chart-legend {
    gap: 8px;
  }

  .intake-conversion-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* SupportLedger workflow surface polish */
.scheduler-shell,
.task-board-shell,
.action-panel,
.staff-pwa-card,
.signature-panel {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.82)),
    var(--surface);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.055);
}

.scheduler-toolbar,
.task-board-toolbar {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.82);
}

.scheduler-period-control,
.scheduler-actions {
  min-width: 0;
}

.scheduler-period-control h2 {
  color: #0f172a;
  font-weight: 850;
  letter-spacing: 0;
}

.calendar-view-select,
.task-search {
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.30);
  background: #ffffff;
}

.scheduler-filters {
  border-color: rgba(37, 99, 235, 0.14);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.62), rgba(255, 255, 255, 0.94)),
    var(--surface-soft);
}

.scheduler-grid {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
  scrollbar-gutter: stable;
}

.calendar-week-grid > div,
.calendar-month-day {
  border-color: rgba(148, 163, 184, 0.22);
}

.calendar-head,
.calendar-time {
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.92)),
    var(--surface-soft);
}

.calendar-head {
  position: sticky;
  top: 0;
  z-index: 2;
}

.calendar-time {
  position: sticky;
  left: 0;
  z-index: 1;
}

.calendar-slot,
.calendar-month-day {
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.46)),
    var(--surface);
}

.calendar-chip {
  min-width: 0;
  border-radius: 10px;
  border-color: rgba(37, 99, 235, 0.28);
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.76)),
    #dbeafe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.10);
}

.calendar-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.calendar-chip strong,
.calendar-chip span,
.calendar-chip small {
  overflow-wrap: anywhere;
}

.calendar-chip--pending {
  border-color: rgba(245, 158, 11, 0.32);
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 247, 237, 0.92)),
    #ffedd5;
}

.calendar-chip--completed {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    linear-gradient(180deg, #ffffff, rgba(240, 253, 244, 0.92)),
    #dcfce7;
}

.calendar-chip--cancelled {
  border-color: rgba(148, 163, 184, 0.30);
  background:
    linear-gradient(180deg, #ffffff, rgba(241, 245, 249, 0.92)),
    #f1f5f9;
}

.calendar-chip--attention {
  border-color: rgba(245, 158, 11, 0.38);
  background:
    linear-gradient(180deg, #ffffff, rgba(255, 247, 237, 0.96)),
    #fff7ed;
}

.task-board {
  min-width: 0;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.task-column {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.72)),
    var(--surface);
  scroll-snap-align: start;
}

.task-column__head {
  border-radius: 16px 16px 0 0;
  border-bottom-color: rgba(148, 163, 184, 0.24);
}

.task-column__head h3 {
  color: #0f172a;
  font-weight: 850;
}

.task-column__head span {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.task-dropzone {
  min-width: 0;
}

.task-column.is-drag-over {
  border-color: rgba(37, 99, 235, 0.46);
  background: rgba(239, 246, 255, 0.74);
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.task-card {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.80)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.task-card:hover {
  border-color: rgba(37, 99, 235, 0.24);
}

.task-card__head,
.task-card strong,
.task-card span,
.task-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-card--draggable {
  cursor: grab;
}

.task-card--draggable:active {
  cursor: grabbing;
}

.task-move-controls button {
  border-radius: 10px;
  background: #ffffff;
}

.rule-review-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}

.rule-review-strip article {
  min-width: 0;
  border-color: rgba(37, 99, 235, 0.14);
  border-radius: 15px;
  background:
    linear-gradient(180deg, #ffffff, rgba(239, 246, 255, 0.60)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.rule-review-strip strong,
.rule-review-strip span {
  overflow-wrap: anywhere;
}

.offline-queue-list {
  min-width: 0;
  border-radius: 15px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
}

.offline-queue-list li {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.22);
}

.offline-queue-list strong,
.offline-queue-list span,
.offline-queue-list small,
.pwa-sync-meta span,
.pwa-status span {
  overflow-wrap: anywhere;
}

.offline-queue-actions button {
  border-radius: 10px;
}

.pwa-status,
.pwa-sync-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pwa-status span,
.pwa-sync-meta span {
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 850;
}

@media (max-width: 820px) {
  .scheduler-shell,
  .task-board-shell,
  .action-panel,
  .staff-pwa-card,
  .signature-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .scheduler-toolbar,
  .task-board-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .scheduler-period-control,
  .scheduler-actions {
    justify-content: space-between;
  }

  .scheduler-period-control h2 {
    min-width: 0;
    font-size: 1.12rem;
  }

  .scheduler-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .scheduler-grid {
    max-height: 680px;
  }

  .task-board {
    grid-template-columns: repeat(4, minmax(260px, 82vw));
    gap: 12px;
  }

  .task-column {
    min-height: 420px;
  }

  .task-dropzone {
    min-height: 360px;
    padding: 12px;
  }

  .rule-review-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* SupportLedger form and modal polish */
.modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.54);
}

.modal {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.94)),
    var(--surface);
}

.modal__head {
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: -24px -24px 18px;
  padding: 20px 24px 16px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.modal__head h3 {
  color: #0f172a;
  font-weight: 850;
}

.modal-actions {
  min-width: 0;
  flex-wrap: wrap;
}

.modal-actions .button {
  min-height: 42px;
}

.form-grid .field > span,
.admin-control-form .field > span,
.crud-form .field > span {
  color: #334155;
  font-weight: 850;
}

.field input,
.field select,
.field textarea {
  min-width: 0;
}

.password-toggle,
.custom-datepicker-toggle {
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.88);
}

.password-toggle:hover,
.custom-datepicker-toggle:hover {
  background: rgba(239, 246, 255, 0.96);
}

.custom-datepicker-popover,
.select2-dropdown {
  border-color: rgba(148, 163, 184, 0.30);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.custom-datepicker__head strong {
  color: #0f172a;
  font-weight: 850;
}

.custom-datepicker__day {
  border-radius: 10px;
}

.field .select2-container--default .select2-selection--single,
.select2-container--default .select2-search--dropdown .select2-search__field {
  border-radius: 12px;
}

.rich-text-field {
  border-color: rgba(148, 163, 184, 0.30);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.025);
}

.rich-text-toolbar {
  gap: 5px;
  border-bottom-color: rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.92)),
    var(--surface-soft);
}

.rich-text-toolbar button {
  border: 1px solid transparent;
  border-radius: 10px;
}

.rich-text-toolbar button:hover,
.rich-text-toolbar button.is-active {
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(239, 246, 255, 0.92);
  color: #1d4ed8;
}

.rich-text-toolbar > span {
  background: rgba(148, 163, 184, 0.30);
}

.rich-text-surface {
  min-width: 0;
  background: #ffffff;
}

.rich-text-status {
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.74);
}

.chip-fieldset {
  border-color: rgba(148, 163, 184, 0.26);
  border-radius: 15px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.76)),
    var(--surface);
}

.chip-fieldset legend {
  color: #334155;
  font-weight: 850;
  letter-spacing: 0;
}

.signature-panel {
  overflow: hidden;
}

.signing-request-preview {
  border-color: rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.78), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.signing-request-preview__grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.signing-request-preview__grid > div {
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  background: #ffffff;
}

.signature-pad canvas {
  border-color: rgba(37, 99, 235, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.90)),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(148, 163, 184, 0.13) 35px 36px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 28px rgba(15, 23, 42, 0.05);
}

@media (max-width: 820px) {
  .modal {
    width: min(100%, calc(100vw - 18px));
    max-height: calc(100dvh - 18px);
    padding: 0;
  }

  .modal__head {
    margin: 0;
    padding: 18px;
  }

  .modal__body {
    padding: 16px 18px 18px;
  }

  .modal .modal-actions {
    bottom: -18px;
    margin: 0 -18px -18px;
    padding: 12px 18px 16px;
  }

  .modal-actions .button {
    flex: 1 1 160px;
  }

  .rich-text-field.is-expanded {
    inset: 8px;
  }

  .rich-text-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .rich-text-toolbar button,
  .rich-text-toolbar > span {
    flex: 0 0 auto;
  }

  .signature-pad canvas {
    min-height: 150px;
  }
}

/* SupportLedger evidence and export polish */
.signing-template-preview-panel,
.certificate-preview-panel,
.evidence-lock-panel,
.audit-evidence-panel,
.audit-control-panel,
.export-scope-summary,
.invoice-sheet {
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86)),
    var(--surface);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.055);
}

.signing-template-preview-panel .panel__head,
.certificate-preview-panel .panel__head,
.evidence-lock-panel .panel__head,
.audit-evidence-panel .panel__head,
.audit-control-panel .panel__head {
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.signing-template-preview-panel .panel__head h3,
.certificate-preview-panel .panel__head h3,
.evidence-lock-panel .panel__head h3,
.audit-evidence-panel .panel__head h3,
.audit-control-panel .panel__head h3 {
  max-width: 860px;
  text-wrap: balance;
}

.signing-template-preview-panel .panel__head p,
.certificate-preview-panel .panel__head p,
.evidence-lock-panel .panel__head p,
.audit-evidence-panel .panel__head p,
.audit-control-panel .panel__head p {
  max-width: 78ch;
}

.signing-template-preview-grid,
.audit-evidence-grid,
.audit-control-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 14px;
}

.signing-template-preview-card,
.certificate-preview-card > div,
.audit-evidence-summary > div,
.audit-evidence-card,
.audit-control-card,
.list-card--evidence,
.template-download-grid .button {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.76)),
    var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.signing-template-preview-card {
  position: relative;
  padding: 16px;
}

.signing-template-preview-card::before,
.audit-evidence-card::before,
.list-card--evidence::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(37, 99, 235, 0.58);
}

.signing-template-preview-card__head {
  min-width: 0;
}

.signing-template-preview-card__head > span,
.audit-evidence-card > span {
  flex: 0 0 auto;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.signing-template-preview-card strong,
.signing-template-preview-card small,
.signing-template-preview-card p,
.certificate-preview-card span,
.certificate-preview-card strong,
.certificate-preview-card small,
.audit-evidence-summary span,
.audit-evidence-summary strong,
.audit-evidence-summary small,
.audit-evidence-card strong,
.audit-evidence-card small,
.audit-control-card span,
.audit-control-card strong,
.audit-control-card small,
.list-card--evidence strong,
.list-card--evidence small,
.export-scope-summary strong,
.export-scope-summary small,
.invoice-sheet strong,
.invoice-sheet small,
.invoice-sheet td,
.invoice-sheet th {
  min-width: 0;
  overflow-wrap: anywhere;
}

.signing-template-preview-card__meta,
.tag-row,
.signing-download-ui {
  min-width: 0;
  align-items: center;
}

.signing-template-preview-card__meta span,
.tag-row .badge {
  max-width: 100%;
}

.certificate-preview-card {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 14px;
}

.certificate-preview-card > div {
  padding: 16px;
}

.certificate-preview-card span,
.audit-evidence-summary span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-preview-card strong,
.audit-evidence-summary strong {
  line-height: 1.08;
}

.audit-evidence-summary {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}

.audit-evidence-card {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: 14px 14px 14px 16px;
}

.audit-evidence-card__meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  justify-items: start;
  gap: 8px;
  min-width: 0;
}

.audit-evidence-card.is-gap::before {
  background: rgba(245, 158, 11, 0.76);
}

.list-card--evidence {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 15px 16px 15px 18px;
}

.list-card--evidence .list-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.link-inline {
  min-height: 32px;
  max-width: 100%;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  padding: 5px 10px;
  background: #ffffff;
  color: var(--primary-strong);
  line-height: 1.15;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.06);
}

.link-inline:hover,
.link-inline:focus-visible {
  border-color: rgba(37, 99, 235, 0.32);
  background: #eff6ff;
  text-decoration: none;
}

.export-scope-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
}

.export-scope-summary > div {
  min-width: min(100%, 280px);
}

.template-download-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 10px;
}

.template-download-grid .button {
  justify-content: flex-start;
  min-height: 44px;
}

.scope-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.scope-preset-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.scope-preset-card strong,
.scope-preset-card p,
.scope-preset-card code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.scope-preset-card strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.scope-preset-card code {
  display: block;
  padding: 9px 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: normal;
}

.scope-preset-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.scope-preset-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.scope-preset-card__actions .button {
  min-height: 38px;
}

.external-portal-session-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.external-portal-session-head .auth-copy {
  min-width: min(100%, 520px);
  flex: 1 1 520px;
}

.external-portal-session-end {
  flex: 0 0 auto;
}

.external-portal-session-end .button {
  min-height: 44px;
}

.invoice-sheet {
  max-width: 100%;
}

.invoice-sheet__head {
  gap: 14px;
  align-items: flex-start;
}

@media (max-width: 820px) {
  .signing-template-preview-panel,
  .certificate-preview-panel,
  .evidence-lock-panel,
  .audit-evidence-panel,
  .audit-control-panel {
    border-radius: 14px;
  }

  .signing-template-preview-card__head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .signing-template-preview-card__head .badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .list-card--evidence {
    grid-template-columns: minmax(0, 1fr);
  }

  .list-card--evidence .list-card__meta {
    justify-content: flex-start;
  }

  .link-inline {
    width: fit-content;
  }

  .signing-download-ui .button {
    width: 100%;
    justify-content: center;
  }
}

/* SupportLedger empty, error, and loading state polish */
.empty-state,
.server-empty-state,
.table-empty-state {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.86));
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.045);
}

.empty-state::before,
.server-empty-state::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(37, 99, 235, 0.68);
}

.server-empty-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
  min-height: 150px;
  padding: 22px 22px 22px 24px;
}

.server-empty-state__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  color: var(--primary-strong);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.server-empty-state strong,
.empty-state strong {
  color: var(--text);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.2;
  text-wrap: balance;
}

.server-empty-state p,
.empty-state p,
.server-empty-state small,
.empty-state small {
  max-width: 66ch;
  color: var(--text-muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.server-empty-state--error {
  border-color: rgba(239, 68, 68, 0.22);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.09), transparent 34%),
    linear-gradient(180deg, #ffffff, #fff7f7);
}

.server-empty-state--error::before {
  background: rgba(239, 68, 68, 0.76);
}

.server-empty-state--error .server-empty-state__icon {
  border-color: rgba(239, 68, 68, 0.16);
  background: linear-gradient(180deg, #fee2e2, #ffffff);
  color: var(--danger);
}

.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
}

.empty-state__actions span {
  min-height: 30px;
  max-width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.server-table__empty td,
.server-table__error td,
.table-empty-row td {
  padding: 0;
  background: transparent;
}

.server-table__error .button {
  width: fit-content;
  margin-top: 12px;
}

.skeleton-row td {
  padding-block: 16px;
}

.skeleton-line,
.skeleton-block {
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--skeleton-base), var(--skeleton-glow), var(--skeleton-base));
  background-size: 240% 100%;
  animation: skeleton-wave 1.2s ease-in-out infinite;
}

@keyframes skeleton-wave {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

@media (max-width: 700px) {
  .server-empty-state {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .server-empty-state__icon {
    width: 42px;
    height: 42px;
  }

  .empty-state__actions span {
    flex: 1 1 130px;
    justify-content: center;
    text-align: center;
  }
}

/* SupportLedger command workspace polish */
.dashboard-header {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 20px;
  padding: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.98) 0 58%, rgba(239, 246, 255, 0.94) 58% 100%),
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.dashboard-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #22c55e);
}

.dashboard-header h2 {
  max-width: 800px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.03;
}

.dashboard-header p {
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.56;
}

.dashboard-grid,
.report-grid,
.content-grid,
.detail-grid {
  min-width: 0;
}

.report-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 14px;
}

.report-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.admin-overview-card,
.report-card {
  display: grid;
  align-content: space-between;
  gap: 16px;
  min-height: 178px;
  text-decoration: none;
}

.admin-overview-card .badge,
.report-card > .badge {
  width: fit-content;
}

.enquiry-workbench {
  display: grid;
  gap: 16px;
  margin: 0 0 18px;
}

.status-tabs--enquiries {
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.status-tabs--enquiries button {
  white-space: nowrap;
  gap: 8px;
  display: inline-flex;
  align-items: center;
}

.status-tabs--enquiries button span {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--primary);
  font-size: 0.75rem;
}

.enquiry-followup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
}

.enquiry-followup-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.enquiry-followup-card > div:first-child {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.enquiry-followup-card > div:first-child > span,
.enquiry-followup-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.enquiry-followup-card strong,
.enquiry-followup-card small,
.enquiry-followup-card p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.enquiry-followup-card strong {
  color: var(--text);
  font-size: 1rem;
}

.enquiry-followup-card small,
.enquiry-followup-card p {
  color: var(--text-muted);
  line-height: 1.45;
}

.enquiry-followup-card p {
  margin: 0;
}

.enquiry-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
}

.enquiry-control-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 142px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
}

.enquiry-control-card strong {
  color: var(--text);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1;
}

.enquiry-control-card span {
  color: var(--text);
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.enquiry-control-card small {
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.enquiry-control-card--success {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f3fff8 100%);
}

.enquiry-control-card--warning {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}

.enquiry-control-card--danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
}

.report-card__head {
  align-items: flex-start;
}

.report-card__head > div {
  min-width: 0;
}

.report-card__head h3 {
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.18;
}

.report-card__foot {
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.report-card .button {
  width: fit-content;
}

.stack-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.stack-list > .list-card,
.stack-list > .audit-row,
.stack-list > .check-row {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.76)),
    var(--surface);
}

.stack-list > a.list-card {
  text-decoration: none;
}

.list-card {
  min-width: 0;
}

.list-card > div,
.list-card__meta,
.audit-row > div {
  min-width: 0;
}

.list-card strong,
.list-card small,
.audit-row strong,
.audit-row p,
.audit-row small,
.check-row strong,
.check-row small {
  overflow-wrap: anywhere;
}

.access-model-panel {
  overflow: hidden;
}

.access-model-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.access-model-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.82)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.access-model-card .token-badge {
  width: 50px;
  height: 50px;
  border-radius: 12px;
}

.access-model-card__body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.access-model-card__body strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.access-model-card__body small {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}

.detail-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.detail-pair {
  min-width: 0;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 15px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.78)),
    var(--surface);
}

.detail-pair span {
  color: var(--text-soft);
  font-weight: 900;
  text-transform: uppercase;
}

.detail-pair strong {
  color: var(--text);
  line-height: 1.18;
}

.detail-pair small {
  color: var(--text-muted);
  line-height: 1.45;
}

.merchant-control-panel,
.platform-governance-panel,
.dashboard-signal-panel,
.dashboard-control-panel {
  position: relative;
}

.merchant-control-grid,
.platform-governance-grid,
.dashboard-signal-grid,
.dashboard-control-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr));
}

.merchant-control-card,
.platform-governance-card,
.dashboard-signal-card,
.dashboard-control-card {
  min-height: 136px;
}

.grouped-chart,
.service-chart {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.80)),
    var(--surface);
}

.grouped-chart {
  min-height: 280px;
  padding: 18px 14px 12px;
}

.grouped-chart__month {
  min-width: 48px;
}

.grouped-chart__bars {
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.58);
}

.grouped-chart__bar {
  border-radius: 999px 999px 4px 4px;
}

.service-chart {
  padding: 18px;
}

.legend-list {
  min-width: 0;
}

.legend-row {
  min-width: 0;
  gap: 10px;
}

.legend-row__left {
  min-width: 0;
}

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

.quick-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 10px;
}

.quick-action-grid .button {
  justify-content: flex-start;
  min-height: 46px;
}

@media (max-width: 820px) {
  .dashboard-header {
    border-radius: 16px;
    padding: 20px;
  }

  .report-card .button,
  .quick-action-grid .button {
    width: 100%;
    justify-content: center;
  }

  .grouped-chart {
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .grouped-chart__month {
    flex: 0 0 58px;
  }

  .service-chart {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
}

/* SupportLedger navigation, table, and form polish */
.topbar,
.sidebar,
.admin-module-nav,
.server-table,
.client-table {
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.84)),
    var(--surface);
}

.topbar {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.topbar__left,
.topbar__right,
.merchant-switcher,
.profile-trigger__identity {
  min-width: 0;
}

.topbar__left h1,
.topbar__left p,
.profile-trigger strong,
.profile-trigger small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar {
  box-shadow: 10px 0 34px rgba(15, 23, 42, 0.035);
}

.sidebar__intro {
  position: relative;
}

.sidebar__intro::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #22c55e);
}

.nav-item {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-soft);
}

.nav-item .icon {
  flex: 0 0 auto;
}

.nav-item span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item:hover {
  border-color: rgba(37, 99, 235, 0.12);
  background: rgba(239, 246, 255, 0.68);
}

.nav-item.is-active {
  border-color: rgba(37, 99, 235, 0.22);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.13), rgba(239, 246, 255, 0.82)),
    #ffffff;
  color: var(--primary-strong);
  box-shadow: inset 3px 0 0 var(--primary), 0 10px 22px rgba(37, 99, 235, 0.08);
}

.profile-trigger {
  max-width: min(100%, 280px);
  border-color: rgba(148, 163, 184, 0.24);
  background: #ffffff;
}

.profile-trigger:hover,
.account-menu.is-open .profile-trigger {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
}

.profile-menu {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.profile-menu button,
.profile-menu a {
  min-width: 0;
}

.workspace-breadcrumb {
  min-width: 0;
}

.workspace-breadcrumb a,
.workspace-breadcrumb strong {
  min-width: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-module-nav {
  padding: 16px;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
}

.admin-module-group {
  min-width: 0;
}

.admin-module-group > p {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-module-group > div {
  gap: 8px;
}

.admin-module-tab {
  min-height: 38px;
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-soft);
}

.admin-module-tab.is-active {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
  color: var(--primary-strong);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.server-table,
.client-table {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.035);
}

.server-table__toolbar,
.client-table__toolbar,
.server-table__footer,
.client-table__footer {
  gap: 12px;
}

.server-table__toolbar,
.client-table__toolbar {
  align-items: end;
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.78)),
    var(--surface);
}

.server-table__toolbar label,
.client-table__toolbar label {
  min-width: 0;
}

.server-table__search {
  flex: 1 1 280px;
}

.server-table__filter,
.server-table__length {
  flex: 0 1 170px;
}

.server-table__search input,
.server-table__filter select,
.server-table__length select,
.client-table__toolbar input,
.client-table__toolbar select {
  min-height: 44px;
  border-radius: 12px;
}

.table-shell {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: max(760px, 100%);
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
}

.data-table td {
  max-width: 340px;
}

.data-table td :is(strong, small, span, p),
.data-table th {
  overflow-wrap: anywhere;
}

.data-table tbody tr {
  transition: background-color 150ms ease;
}

.data-table tbody tr:hover td {
  background: rgba(239, 246, 255, 0.48);
}

.table-actions {
  justify-content: flex-start;
  gap: 7px;
}

.table-actions .button,
.table-actions .icon-button,
.data-table .button,
.data-table .icon-button {
  min-height: 36px;
}

.field input,
.field select,
.field textarea,
.field .select2-container--default .select2-selection--single,
.custom-filepicker,
.rich-text-field {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 13px;
  background: #ffffff;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.custom-filepicker:hover {
  border-color: rgba(37, 99, 235, 0.24);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(37, 99, 235, 0.42);
}

.custom-datepicker-popover,
.select2-dropdown {
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

@media (max-width: 980px) {
  .topbar {
    gap: 12px;
  }

  .server-table__toolbar,
  .client-table__toolbar {
    align-items: stretch;
  }

  .server-table__search,
  .server-table__filter,
  .server-table__length,
  .server-table__reset {
    flex: 1 1 180px;
  }
}

@media (max-width: 700px) {
  .topbar__left h1 {
    max-width: 58vw;
  }

  .profile-trigger {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .workspace-breadcrumb {
    padding-bottom: 4px;
  }

  .admin-module-nav {
    padding: 12px;
  }

  .admin-module-group > div {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .admin-module-tab {
    flex: 0 0 auto;
  }

  .server-table,
  .client-table {
    border-radius: 14px;
  }

  .data-table {
    min-width: 720px;
  }

  .data-table th,
  .data-table td {
    padding: 12px 14px;
  }
}

/* SupportLedger interaction surface polish */
.modal-backdrop,
.custom-prompt-backdrop,
.global-search {
  background:
    radial-gradient(circle at 50% 12%, rgba(37, 99, 235, 0.10), transparent 28rem),
    rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
}

.tour-backdrop {
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.modal,
.custom-prompt,
.tour-card,
.global-search__dialog,
.detail-drawer__panel {
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.modal__head,
.global-search__head,
.custom-prompt > div:nth-child(2),
.tour-card > .eyebrow {
  min-width: 0;
}

.modal__head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.84)),
    var(--surface);
}

.modal__head h3,
.custom-prompt h3,
.tour-card h3,
.global-search__dialog h3,
.detail-drawer h3 {
  max-width: 100%;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.modal__body {
  min-width: 0;
  scrollbar-gutter: stable;
}

.crud-modal .crud-form {
  display: grid;
  gap: 18px;
  min-height: 0;
}

.crud-modal .field-grid {
  min-height: 0;
}

.modal-actions {
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.modal .modal-actions {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  margin: 0 -28px -24px;
  padding: 14px 28px 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.90), #ffffff 52%),
    var(--surface);
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.06);
}

.modal-actions .button {
  min-width: 112px;
}

.custom-prompt {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  width: min(480px, calc(100vw - 32px));
}

.custom-prompt .modal-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.custom-prompt__mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.custom-prompt--danger .custom-prompt__mark {
  border-color: rgba(239, 68, 68, 0.18);
}

.detail-drawer.is-open {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
}

.detail-drawer__panel {
  width: min(460px, calc(100vw - 22px));
}

.detail-drawer__body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.detail-drawer__body * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-dropdown,
.notification-dropdown,
.profile-menu,
.select2-dropdown,
.custom-datepicker-popover {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.94)),
    var(--surface);
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.16);
}

.account-dropdown__head,
.notification-dropdown__head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.account-dropdown a,
.account-dropdown button,
.notification-dropdown a,
.notification-dropdown button {
  min-width: 0;
  border-radius: 12px;
}

.account-dropdown a:hover,
.account-dropdown button:hover,
.notification-dropdown a:hover,
.notification-dropdown button:hover {
  background: #eff6ff;
  color: var(--primary-strong);
}

.toast-stack {
  display: grid;
  gap: 10px;
}

.toast {
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.92)),
    var(--surface);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
}

.toast {
  position: relative;
}

.toast--success::before {
  background: var(--success);
}

.toast--warning::before {
  background: var(--warning);
}

.toast--danger::before {
  background: var(--danger);
}

.toast strong,
.toast p {
  overflow-wrap: anywhere;
}

.form-busy-status {
  border-color: rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #eff6ff, #ffffff),
    var(--surface);
  color: var(--primary-strong);
}

.button--loading,
.button[aria-busy="true"],
button[aria-busy="true"] {
  position: relative;
  overflow: hidden;
}

.module-route-loader {
  z-index: 95;
}

.module-route-loader__panel {
  border-color: rgba(37, 99, 235, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)),
    var(--surface);
}

.module-route-loader__ring {
  background: conic-gradient(from 90deg, var(--primary), #22c55e, #60a5fa, var(--primary));
}

.module-route-loader__bar {
  background: rgba(37, 99, 235, 0.11);
}

.module-route-loader__steps span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tour-highlight {
  border-radius: 14px;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.22),
    0 20px 46px rgba(37, 99, 235, 0.20);
}

.tour-card {
  width: min(440px, calc(100vw - 32px));
}

.tour-card__progress {
  gap: 6px;
}

.tour-card__progress span {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.30);
}

.tour-card__progress span.is-active {
  background: var(--primary);
}

.global-search__dialog {
  width: min(720px, calc(100vw - 28px));
}

.global-search__dialog input {
  border-radius: 14px;
}

@media (max-width: 820px) {
  .modal,
  .custom-prompt,
  .tour-card,
  .global-search__dialog {
    border-radius: 18px;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions .button {
    flex: 1 1 150px;
    min-width: 0;
  }

  .module-route-loader {
    inset: 76px 12px 12px;
  }

  .module-route-loader__panel {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .custom-prompt {
    grid-template-columns: minmax(0, 1fr);
  }

  .custom-prompt__mark {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 560px) {
  .toast-stack {
    right: 10px;
    left: 10px;
    width: auto;
  }

  .toast {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .detail-drawer__panel {
    width: calc(100vw - 16px);
    border-radius: 18px;
  }
}

/* SupportLedger guide and module depth polish */
.guide-page {
  gap: 22px;
}

.guide-hero {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: stretch;
  border-color: rgba(37, 99, 235, 0.16);
  background:
    radial-gradient(circle at 88% 16%, rgba(37, 99, 235, 0.14), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 52%, #eef6ff 100%);
}

.guide-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(37, 99, 235, 0.05)),
    repeating-linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0 1px, transparent 1px 18px);
  opacity: 0.78;
}

.guide-hero > * {
  position: relative;
  z-index: 1;
}

.guide-hero h3 {
  max-width: 680px;
  font-size: clamp(1.55rem, 2vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.guide-hero p:not(.eyebrow) {
  max-width: 680px;
}

.guide-readiness-meter {
  max-width: 560px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.08);
}

.guide-hero__visual {
  min-height: 250px;
  align-self: stretch;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.84)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 24px 54px rgba(37, 99, 235, 0.12);
}

.guide-hero__visual span,
.guide-hero__visual i {
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}

.guide-control-panel {
  border-color: rgba(37, 99, 235, 0.14);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc),
    var(--surface);
}

.guide-control-panel .panel__head {
  align-items: end;
}

.guide-control-panel .panel__head h3 {
  max-width: 980px;
}

.guide-control-grid {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
}

.guide-control-card {
  min-height: 152px;
  align-content: start;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.86)),
    var(--surface);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.guide-control-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
}

.guide-control-card strong,
.guide-control-card span,
.guide-control-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guide-control-card strong {
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  line-height: 1;
}

.guide-control-card span {
  line-height: 1.08;
}

.guide-steps {
  position: relative;
  gap: 0;
  padding: 6px 0;
}

.guide-step {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.guide-step:last-child {
  border-bottom: 0;
}

.guide-step > span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.guide-step h3 {
  margin-bottom: 3px;
  line-height: 1.18;
}

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

.manual-row {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 18px;
  background:
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.88)),
    var(--surface);
}

.manual-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
  opacity: 0.78;
}

.manual-row strong,
.manual-row p,
.manual-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.manual-row strong {
  display: block;
  color: var(--text);
  line-height: 1.18;
}

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

.module-map-row {
  display: grid;
  gap: 10px;
}

.module-map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-map-links a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-strong);
  font-weight: 800;
  text-decoration: none;
}

.module-map-links a:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #dbeafe;
}

.academy-track-panel,
.academy-playbook-panel,
.academy-resource-panel {
  border-color: rgba(37, 99, 235, 0.14);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc),
    var(--surface);
}

.academy-track-grid,
.academy-playbook-grid,
.academy-resource-grid {
  display: grid;
  gap: 14px;
}

.academy-track-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.academy-playbook-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.academy-track-card,
.academy-playbook-card,
.academy-resource-card {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.90)),
    var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.academy-track-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.academy-track-card__icon,
.academy-playbook-card > span,
.academy-resource-card > span {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: #eff6ff;
  color: var(--primary);
}

.academy-track-card strong,
.academy-playbook-card strong,
.academy-resource-card strong {
  display: block;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.academy-track-card p,
.academy-playbook-card p,
.academy-resource-card p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.academy-track-card .module-map-links {
  padding-top: 2px;
}

.academy-track-card .module-map-links a {
  border-radius: 12px;
  background: #ffffff;
}

.academy-playbook-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.academy-resource-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px;
}

.academy-resource-card a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary-strong);
  font-weight: 850;
  text-decoration: none;
}

.academy-resource-card a:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #dbeafe;
}

.template-download-grid,
.intake-conversion-list,
.evidence-lock-panel .stack-list,
.geofence-policy-panel .stack-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.template-download-grid a,
.intake-conversion-list > *,
.evidence-lock-panel .stack-list > *,
.geofence-policy-panel .stack-list > * {
  min-width: 0;
}

.backup-drill-workbench,
.signing-preview-workbench,
.pwa-conflict-workbench,
.claim-resubmission-workbench {
  border-color: rgba(37, 99, 235, 0.14);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fafc),
    var(--surface);
}

.backup-drill-workbench .stack-list,
.pwa-conflict-workbench .stack-list,
.claim-resubmission-workbench .stack-list {
  gap: 12px;
}

.backup-drill-workbench .stack-list > *,
.pwa-conflict-workbench .stack-list > *,
.claim-resubmission-workbench .stack-list > *,
.signing-preview-workbench .panel {
  border-radius: 18px;
}

.signing-preview-workbench {
  align-items: stretch;
}

.signing-preview-workbench .panel {
  height: 100%;
}

.dashboard-grid--two > .panel,
.dashboard-grid--three > .panel,
.report-grid > .panel {
  min-width: 0;
}

.panel > .empty-state:only-child,
.panel .stack-list > .empty-state:only-child {
  margin: 0;
}

@media (max-width: 980px) {
  .guide-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-hero__visual {
    min-height: 190px;
  }

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

@media (max-width: 680px) {
  .guide-page {
    gap: 16px;
  }

  .guide-hero,
  .guide-control-panel,
  .manual-row {
    border-radius: 18px;
  }

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

  .guide-control-card {
    min-height: 136px;
    padding: 14px;
  }

  .guide-step {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .guide-step > span {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .module-map-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .module-map-links a {
    border-radius: 12px;
  }

  .academy-track-grid,
  .academy-playbook-grid,
  .academy-resource-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .academy-track-card,
  .academy-playbook-card,
  .academy-resource-card {
    border-radius: 18px;
    padding: 16px;
  }
}

@media (max-width: 430px) {
  .guide-control-grid,
  .template-download-grid,
  .intake-conversion-list,
  .evidence-lock-panel .stack-list,
  .geofence-policy-panel .stack-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Responsive metric/card grids shared by admin, dashboard, and module signal panels. */
[class*="-signal-grid"],
[class*="-control-grid"],
[class*="-governance-grid"] {
  grid-template-columns: repeat(auto-fit, minmax(min(176px, 100%), 1fr));
}

.admin-integration-card > small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.button--compact {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.detail-pair--documents {
  align-items: stretch;
}

.document-preview-list {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.document-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #ffffff;
}

.document-preview-card strong,
.document-preview-card span,
.document-preview-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.document-preview-card span,
.document-preview-card small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.document-preview-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

@media (max-width: 760px) {
  .document-preview-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .document-preview-card__actions {
    justify-content: stretch;
  }

  .document-preview-card__actions .button,
  .document-preview-card__actions .badge {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Mobile shell rebrand */
@media (max-width: 760px) {
  .topbar {
    z-index: 2200;
  }

  .sidebar {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 78px;
    gap: 8px;
  }

  .sidebar__mobile-brand {
    display: inline-flex;
  }

  .sidebar__nav {
    align-items: center;
  }

  .nav-item {
    flex-basis: 74px;
    min-height: 56px;
  }

  .nav-item span:last-child {
    display: block;
  }

  .workspace {
    padding-top: 134px;
  }

  .profile-trigger {
    width: auto;
    min-width: 44px;
    height: 40px;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
  }

  .profile-trigger__mobile-label {
    display: inline-flex;
  }
}

@media (max-width: 430px) {
  .sidebar__mobile-brand {
    min-width: 132px;
    padding-right: 9px;
  }

  .sidebar__mobile-brand strong {
    font-size: 0.78rem;
  }

  .sidebar__mobile-brand small {
    font-size: 0.64rem;
  }

  .nav-item {
    flex-basis: 68px;
  }

  .profile-trigger__mobile-label {
    display: none;
  }
}

/* Mobile workspace experience */
@media (max-width: 760px) {
  body {
    background: #f8fafc;
  }

  body.has-mobile-menu-open {
    overflow: hidden;
  }

  .app-shell.is-mobile-menu-open {
    overflow: hidden;
  }

  .topbar {
    height: 58px;
    padding: 0 10px;
  }

  .topbar__left > .sidebar-toggle {
    display: inline-grid;
  }

  .sidebar-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  }

  .brand-lockup strong {
    max-width: 48vw;
    font-size: 0.9rem;
  }

  .brand-lockup .eyebrow {
    display: none;
  }

  .sidebar {
    top: 58px;
    right: auto;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: min(88vw, 330px);
    height: calc(100dvh - 58px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateX(-108%);
    border-top: 0;
    border-right: 1px solid rgba(148, 163, 184, 0.26);
    border-bottom: 0;
    border-radius: 0 22px 0 0;
    background:
      linear-gradient(180deg, #ffffff, #f8fbff),
      var(--surface);
    box-shadow: 24px 0 60px rgba(15, 23, 42, 0.22);
    opacity: 1;
    transition: transform 220ms ease;
  }

  .sidebar.is-mobile-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
  }

  .sidebar__mobile-brand {
    position: static;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 60px;
    padding: 10px;
    box-shadow: none;
  }

  .sidebar__intro {
    display: block;
    padding: 12px;
    border-radius: 16px;
  }

  .sidebar__intro h1 {
    font-size: 1.05rem;
  }

  .sidebar__intro p:last-child {
    display: none;
  }

  .sidebar__footer {
    display: none;
  }

  .sidebar__nav {
    display: grid;
    gap: 14px;
    min-width: 0;
  }

  .nav-section {
    display: grid;
    gap: 8px;
  }

  .nav-section > p {
    display: block;
    margin: 0 2px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: none;
  }

  .nav-item {
    width: 100%;
    min-height: 48px;
    display: flex;
    justify-content: flex-start;
    gap: 11px;
    padding: 9px 10px;
    border-radius: 14px;
    background: #ffffff;
  }

  .nav-item span:last-child {
    display: block;
    max-width: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
  }

  .nav-item.is-active {
    box-shadow: inset 4px 0 0 var(--primary), 0 12px 24px rgba(37, 99, 235, 0.12);
  }

  .workspace {
    margin-left: 0;
    padding-top: 58px;
  }

  .workspace__content {
    padding: 12px;
  }

  .workspace-breadcrumb {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.75rem;
  }

  .page {
    gap: 14px;
  }

  .page-header,
  .dashboard-header,
  .panel {
    border-radius: 16px;
  }

  .page-header,
  .dashboard-header {
    padding: 18px;
  }

  .page-header h2,
  .dashboard-header h2 {
    font-size: clamp(1.45rem, 8vw, 1.95rem);
    line-height: 1.08;
  }

  .page-header p:not(.eyebrow),
  .dashboard-header p {
    font-size: 0.94rem;
    line-height: 1.48;
  }

  .panel {
    padding: 14px;
  }

  .panel__head {
    gap: 10px;
  }

  .stats-grid,
  .report-grid,
  .content-grid,
  .dashboard-grid,
  .dashboard-grid--two,
  .dashboard-grid--three,
  .field-grid,
  .field-grid--2,
  .field-grid--3,
  .field-grid--4,
  .form-grid,
  .quick-action-grid,
  .focus-grid,
  [class*="-signal-grid"],
  [class*="-control-grid"],
  [class*="-governance-grid"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .stat-card,
  [class*="-signal-card"],
  [class*="-control-card"],
  [class*="-governance-card"] {
    min-height: auto;
    padding: 14px;
  }

  .server-table__toolbar,
  .client-table__toolbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .table-shell {
    overflow-x: auto;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 680px;
  }

  .button,
  .icon-button,
  .profile-trigger,
  .search-pill--button {
    min-height: 44px;
  }

  .profile-trigger {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .profile-trigger__mobile-label {
    display: none;
  }

  .account-dropdown,
  .notification-dropdown {
    position: fixed;
    top: 64px;
    right: 10px;
    left: 10px;
    z-index: 2300;
    width: auto;
    max-height: calc(100dvh - 78px);
    overflow-y: auto;
  }

  .account-menu.is-open .account-dropdown,
  .account-menu:focus-within .account-dropdown {
    display: block !important;
  }

  .account-dropdown::before,
  .notification-dropdown::before {
    display: none;
  }
}

@media (min-width: 761px) {
  .sidebar-backdrop {
    display: none !important;
  }
}

@media (max-width: 430px) {
  .brand-lockup strong {
    max-width: 42vw;
  }

  .workspace__content {
    padding: 10px;
  }

  .page-header,
  .dashboard-header,
  .panel {
    border-radius: 14px;
  }
}

/* Modal header text safety */
.modal__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.modal__head > div {
  min-width: 0;
  padding-right: 4px;
}

.modal__head .eyebrow,
.modal__head h3 {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.modal__head .eyebrow {
  margin: 0 0 4px;
  line-height: 1.25;
}

.modal__head h3 {
  line-height: 1.18;
}

.modal__head [data-modal-close] {
  align-self: start;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .modal__head {
    gap: 10px;
    padding-right: 0;
  }

  .modal__head h3 {
    font-size: 1.08rem;
  }
}

/* Super-admin public menu manager */
.public-menu-manager__create {
  margin-bottom: 18px;
}

.public-menu-create,
.public-menu-card {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(150px, 1fr) minmax(150px, 0.8fr) minmax(80px, 0.45fr) minmax(120px, 0.55fr) auto;
  gap: 12px;
  align-items: end;
}

.public-menu-create {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  padding: 14px;
  background: rgba(239, 246, 255, 0.62);
}

.public-menu-manager__grid {
  display: grid;
  gap: 12px;
}

.public-menu-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: #ffffff;
}

.public-menu-card__meta {
  display: grid;
  gap: 6px;
  align-self: center;
}

.public-menu-card__meta small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.public-testimonial-manager .data-table textarea,
.public-testimonial-manager .data-table input,
.public-testimonial-manager .data-table select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.public-testimonial-manager .data-table textarea {
  min-width: 240px;
  min-height: 92px;
  resize: vertical;
}

.public-testimonial-manager .data-table td {
  vertical-align: top;
}

.public-testimonial-manager .data-table td > input,
.public-testimonial-manager .data-table td > select,
.public-testimonial-manager .data-table td > textarea {
  margin-bottom: 8px;
}

@media (max-width: 1100px) {
  .public-menu-create,
  .public-menu-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .public-menu-create,
  .public-menu-card {
    grid-template-columns: 1fr;
  }

  .public-menu-create .button,
  .public-menu-card .button {
    width: 100%;
  }
}

/* Merchant-scoped integration credentials */
.integration-card__credentials {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  margin-top: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: rgba(248, 250, 252, 0.76);
}

.integration-card__credentials > div:first-child {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.integration-card__credentials small {
  color: var(--muted);
  line-height: 1.45;
}

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

.integration-credentials-form .field input {
  min-width: 0;
}

.integration-secret-clear {
  align-self: end;
  justify-self: stretch;
  min-height: 44px;
  width: 100%;
}

.integration-credentials-form .button {
  justify-self: start;
}

.integration-card__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.financial-integration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.financial-integration-grid .integration-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.financial-integration-grid .integration-card__credentials {
  margin-top: 0;
}

.financial-integration-grid .integration-card__actions {
  margin-top: auto;
}

.financial-integration-grid .integration-card__actions form {
  min-width: 0;
}

.financial-integration-overview .detail-grid {
  align-items: stretch;
}

@media (max-width: 1180px) {
  .financial-integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .integration-credentials-form {
    grid-template-columns: 1fr;
  }

  .integration-card__credentials > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .integration-credentials-form .button {
    width: 100%;
  }

  .financial-integration-grid {
    grid-template-columns: 1fr;
  }

  .financial-integration-grid .integration-card__actions .button,
  .financial-integration-grid .integration-card__actions form {
    width: 100%;
  }
}





/* Workforce NDIS compliance additions */
.credential-matrix{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.55rem}.credential-matrix__item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.55rem .7rem;border:1px solid var(--border-color,#dbe3ef);border-radius:.75rem;background:rgba(255,255,255,.72)}.credential-matrix__item span{font-size:.82rem;color:var(--muted-color,#64748b)}
.profile-tab-strip{display:flex;flex-wrap:wrap;gap:.5rem;margin:.75rem 0 1rem}.profile-tab-strip span{padding:.45rem .7rem;border:1px solid var(--border-color,#dbe3ef);border-radius:999px;background:rgba(15,23,42,.03);font-size:.82rem;color:var(--muted-color,#64748b)}


/* Patch: stable record modal layout and OTP UI */
.crud-modal .modal { width: min(1120px, calc(100vw - 48px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
.crud-modal .modal__head { flex: 0 0 auto; padding: 20px 24px; }
.crud-modal .modal__body { flex: 1 1 auto; overflow-y: auto; padding: 24px 28px 28px; }
.crud-modal .modal .modal-actions { position: static; margin: 28px -28px -28px; padding: 18px 28px 22px; background: #fff; border-top: 1px solid rgba(148,163,184,.22); box-shadow: none; }
.crud-modal .field-grid--2 { grid-template-columns: repeat(2, minmax(280px,1fr)); gap: 18px 22px; align-items: start; }
.crud-modal .field--wide { grid-column: 1 / -1; }
.crud-modal .select2-container { width: 100% !important; }
.crud-modal .select2-container--default .select2-selection--single { min-height: 56px; display: flex; align-items: center; border-radius: 14px; }
.crud-modal .field span { font-weight: 800; color: #334155; }
@media (max-width: 760px) { .crud-modal .modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); } .crud-modal .field-grid--2 { grid-template-columns: 1fr; } }
.otp-grid { display:grid; grid-template-columns: repeat(6, minmax(42px,56px)); gap:10px; }
.otp-grid input { height:58px; text-align:center; font-size:24px; font-weight:900; border:1px solid #cbd5e1; border-radius:14px; background:#fff; }
.otp-grid input:focus { outline:3px solid rgba(37,99,235,.16); border-color:#2563eb; }
.profile-tabs-preview { display:flex; flex-wrap:wrap; gap:8px; margin: 0 0 18px; }
.profile-tabs-preview span { padding:8px 12px; border:1px solid #e2e8f0; border-radius:999px; background:#f8fafc; font-size:.85rem; font-weight:800; color:#475569; }


/* Final fix: CRUD modal forms must not cover fields with the action footer. */
.crud-modal .modal {
  width: min(1120px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 48px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.crud-modal .modal__head {
  flex: 0 0 auto !important;
}
.crud-modal .modal__body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding: 24px 28px 32px !important;
}
.crud-modal .crud-form {
  display: block !important;
}
.crud-modal .field-grid--2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
  gap: 18px 22px !important;
  align-items: start !important;
}
.crud-modal .field--wide {
  grid-column: 1 / -1 !important;
}
.crud-modal .modal .modal-actions,
.crud-modal .modal-actions {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  margin: 28px 0 0 !important;
  padding: 18px 0 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-top: 1px solid rgba(148, 163, 184, 0.18) !important;
}
.availability-field .plain-textarea,
.availability-schedule-input {
  width: 100% !important;
  min-height: 210px !important;
  resize: vertical !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  font: inherit !important;
  line-height: 1.55 !important;
  background: #fff !important;
  color: #0f172a !important;
}
.availability-field .field-hint {
  display: block !important;
  margin-top: 8px !important;
  color: #64748b !important;
  font-size: 13px !important;
}
@media (max-width: 760px) {
  .crud-modal .modal {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }
  .crud-modal .field-grid--2 {
    grid-template-columns: 1fr !important;
  }
}

/* Responsive staff availability day/time picker */
.availability-builder {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.availability-builder__rows {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.availability-row {
  display: grid !important;
  grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto !important;
  gap: 12px !important;
  align-items: end !important;
  width: 100% !important;
  padding: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 16px !important;
  background: #f8fafc !important;
}
.availability-row label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
}
.availability-row label span {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #475569 !important;
}
.availability-row__day select,
.availability-time {
  width: 100% !important;
  min-height: 46px !important;
  border: 1px solid rgba(148, 163, 184, 0.38) !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  background: #fff !important;
  color: #0f172a !important;
  font: inherit !important;
  font-weight: 700 !important;
}
.availability-row__times {
  display: grid !important;
  grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr) !important;
  gap: 10px !important;
  align-items: end !important;
}
.availability-row__dash {
  padding: 0 2px 12px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
.availability-builder__actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}
.availability-source {
  display: none !important;
}
@media (max-width: 820px) {
  .availability-row {
    grid-template-columns: 1fr !important;
  }
  .availability-row__times {
    grid-template-columns: 1fr !important;
  }
  .availability-row__dash {
    padding: 0 !important;
    text-align: left !important;
  }
  .availability-builder__actions {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}
@media (max-width: 520px) {
  .crud-modal .modal__body {
    padding: 18px 14px 24px !important;
  }
  .availability-row {
    padding: 10px !important;
    border-radius: 12px !important;
  }
  .availability-row__day select,
  .availability-time {
    min-height: 44px !important;
  }
}


/* Profile workspace layout */
.profile-workspace {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.profile-sidebar {
    position: sticky;
    top: 1rem;
    padding: 1.25rem;
    text-align: center;
}
.profile-avatar {
    width: 112px;
    height: 112px;
    margin: 0 auto 1rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: .04em;
}
.profile-sidebar h2 { margin: .25rem 0; font-size: 1.2rem; }
.profile-sidebar p { margin: 0 0 1rem; color: var(--muted, #64748b); }
.profile-nav { display: grid; gap: .25rem; text-align: left; }
.profile-nav__item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem;
    border-radius: .65rem;
    color: var(--text, #0f172a);
    text-decoration: none;
    font-weight: 650;
}
.profile-nav__item svg, .profile-nav__item i { width: 1rem; color: #64748b; }
.profile-nav__item:hover { background: #f1f5f9; }
.profile-nav__item.is-active { background: #eef2ff; color: #1d4ed8; }

/* Participant profiles use a horizontal tab workspace. Staff profiles retain
   the denser sidebar layout because their module set and workflows differ. */
.profile-workspace--participant {
    grid-template-columns: minmax(0, 1fr);
}
.profile-workspace--participant .profile-sidebar {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 1rem;
    align-items: center;
    padding: 1rem 1.15rem 0;
    text-align: left;
    /* The participant header owns the actions popover. Keep it visible so the
       menu can extend below the summary card instead of being clipped. */
    overflow: visible;
    position: relative;
    z-index: 100;
}
.profile-workspace--participant .profile-main {
    position: relative;
    z-index: 1;
}
.profile-workspace--participant .profile-avatar {
    grid-row: 1 / span 2;
    width: 72px;
    height: 72px;
    margin: 0;
    font-size: 1.45rem;
}
.profile-workspace--participant .profile-sidebar h2 {
    align-self: end;
    margin: 0;
}
.profile-workspace--participant .profile-sidebar > p {
    align-self: start;
    margin: .25rem 0 0;
}
.participant-hero {
    grid-column: 1 / -1;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.15rem 1.5rem;
    align-items: center;
    width: 100%;
    padding: .35rem 0 1rem;
}
.participant-hero__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}
.profile-workspace--participant .participant-hero__identity .profile-avatar {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    font-size: 1.8rem;
}
.participant-hero__identity h1 {
    margin: .15rem 0 .3rem;
    color: #0f172a;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    line-height: 1.15;
}
.participant-hero__identity p { margin: 0; }
.participant-hero__details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: .9rem 1.15rem;
    min-width: 0;
}
.participant-hero__detail {
    display: grid;
    align-content: start;
    gap: .2rem;
    min-width: 0;
}
.participant-hero__detail > span:first-child {
    color: #64748b;
    font-size: .75rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.participant-hero__detail strong {
    overflow-wrap: anywhere;
    color: #1e293b;
    font-size: .9rem;
    line-height: 1.35;
}
.participant-hero__detail .badge { justify-self: start; }
.participant-hero__actions { display: flex; align-self: start; justify-self: end; align-items: center; gap: .65rem; flex-wrap: wrap; }
.participant-hero__actions .button { white-space: nowrap; }
.participant-hero__action-menu { position: relative; }
.participant-hero__action-menu > summary { list-style: none; cursor: pointer; }
.participant-hero__action-menu > summary::-webkit-details-marker { display: none; }
.participant-hero__action-popover { position: absolute; z-index: 40; top: calc(100% + .55rem); right: 0; display: grid; min-width: 260px; padding: .45rem; border: 1px solid #dbe4ef; border-radius: .9rem; background: #fff; box-shadow: 0 18px 48px rgba(15,23,42,.16); }
.participant-hero__action-popover a { display: grid; grid-template-columns: 34px 1fr; gap: .65rem; align-items: center; padding: .7rem; color: #1e293b; text-decoration: none; border-radius: .65rem; }
.participant-hero__action-popover a:hover { background: #f1f5f9; }
.participant-hero__action-popover .icon { color: #2563eb; }
.participant-hero__action-popover span { display: grid; gap: .08rem; }
.participant-hero__action-popover small { color: #64748b; font-weight: 500; }
.profile-workspace--participant .profile-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: .25rem;
    min-width: 0;
    margin-top: 1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    border-top: 1px solid #e2e8f0;
}
.profile-workspace--participant .profile-nav__item {
    flex: 0 0 auto;
    min-height: 48px;
    padding: .75rem .9rem;
    white-space: nowrap;
    scroll-snap-align: start;
    border-bottom: 3px solid transparent;
    border-radius: 0;
}
.profile-workspace--participant .profile-nav__item:hover {
    background: #f8fafc;
}
.profile-workspace--participant .profile-nav__item.is-active {
    background: transparent;
    border-bottom-color: #2563eb;
    color: #1d4ed8;
}
.profile-main { display: grid; gap: 1rem; min-width: 0; }
.profile-main__head,
.profile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.profile-main__head { padding: 1rem 1.15rem; }
.profile-main__head h2 { margin: .15rem 0 0; }
.profile-content { display: grid; gap: 1rem; }
.profile-card { padding: 1rem 1.15rem; }
.profile-card h3 { margin: 0 0 .85rem; font-size: 1rem; }

.participant-profile-group {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #dbe4f0;
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.participant-profile-group + .participant-profile-group {
  margin-top: .4rem;
}

.participant-profile-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  background: #f8fafc;
}
.participant-profile-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.participant-profile-group__toggle > span { min-width: 0; }
.participant-profile-group__toggle:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 5px; border-radius: .35rem; }
.participant-profile-group__chevron { flex: 0 0 auto; color: #64748b; transition: transform .2s ease; }
.participant-profile-group__toggle[aria-expanded="true"] .participant-profile-group__chevron { transform: rotate(180deg); }

.participant-profile-group__title {
  display: block;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 750;
}

.participant-profile-group__description {
  display: block;
  margin-top: .35rem;
  color: var(--muted, #64748b);
  line-height: 1.45;
}

.participant-profile-group__content {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
}
.participant-profile-group__content[hidden] { display: none !important; }

.profile-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
}
.participant-section-completion {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .3rem .65rem;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: .78rem;
  font-weight: 750;
  white-space: nowrap;
}
.participant-section-completion.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.participant-readiness {
  border-left: 4px solid #f59e0b;
}
.participant-readiness.is-ready {
  border-left-color: #22c55e;
}
.participant-readiness .panel__head {
  align-items: flex-start;
  margin-bottom: 1rem;
}
.participant-readiness .panel__head h3,
.participant-readiness .panel__head p { margin: 0; }
.participant-readiness .panel__head > div { display: grid; gap: .3rem; }
.participant-readiness__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .65rem;
}
.participant-readiness__activate { margin: 0; }
.participant-readiness__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.participant-readiness__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid #fde68a;
  border-radius: .75rem;
  background: #fffbeb;
  color: #334155;
  text-decoration: none;
}
.participant-readiness__item.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.participant-readiness__item:hover,
.participant-readiness__item:focus-visible {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.participant-readiness__item strong,
.participant-readiness__item small { display: block; }
.participant-readiness__item small { margin-top: .18rem; color: #64748b; line-height: 1.35; }
.participant-readiness__state {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
}
.participant-readiness__item.is-complete .participant-readiness__state {
  background: #dcfce7;
  color: #15803d;
}
.participant-readiness__action {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: #2563eb;
  font-size: .78rem;
  font-weight: 750;
  white-space: nowrap;
}
.participant-directory-readiness {
  display: inline-grid;
  gap: .25rem;
  color: inherit;
  text-decoration: none;
}
.participant-directory-readiness small {
  color: #64748b;
  font-size: .72rem;
  white-space: nowrap;
}
.participant-directory-readiness:hover small,
.participant-directory-readiness:focus-visible small { color: #2563eb; }
.participant-section-index {
  position: sticky;
  top: .5rem;
  z-index: 8;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: .75rem .9rem;
  border: 1px solid #dbe4f0;
  border-radius: .85rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .07);
  backdrop-filter: blur(8px);
}
@media (max-width: 760px) {
  .participant-readiness .panel__head { display: grid; }
  .participant-readiness__controls { justify-content: flex-start; }
  .participant-readiness__items { grid-template-columns: 1fr; }
  .participant-readiness__action { font-size: 0; }
  .participant-readiness__action .icon { font-size: .85rem; }
}
.participant-section-index > div:first-child {
  display: grid;
  gap: .1rem;
  min-width: 150px;
}
.participant-section-index > div:first-child span {
  color: #64748b;
  font-size: .78rem;
}
.participant-section-index__links {
  display: flex;
  gap: .4rem;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: .15rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.participant-section-index__links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
  min-height: 36px;
  padding: .4rem .65rem;
  border: 1px solid #e2e8f0;
  border-radius: .65rem;
  background: #fff;
  color: #334155;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  scroll-snap-align: start;
}
.participant-section-index__links a:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.participant-section-index__links small {
  color: #64748b;
  font-size: .72rem;
}
.participant-profile-group {
  scroll-margin-top: 6rem;
}
.participant-section-editor { padding: 0; overflow: hidden; }
.participant-section-editor[hidden] { display: none !important; }
.participant-section-editor__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.participant-section-editor__head > div { display: grid; gap: .2rem; min-width: 0; }
.participant-section-editor__head strong { color: #0f172a; font-size: 1rem; }
.participant-section-editor__head small { color: #64748b; line-height: 1.4; }
.participant-section-editor__body { padding: 1rem 1.15rem; }
.profile-detail-row {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 1rem;
    padding: .75rem 0;
    border-top: 1px solid #edf2f7;
}
.profile-detail-row:first-of-type { border-top: 0; }
.profile-detail-row span { color: #64748b; font-weight: 650; }
.profile-detail-row strong { color: #0f172a; font-weight: 700; overflow-wrap: anywhere; }
.participant-profile-subheading { margin: 1.35rem 0 .25rem; padding: .75rem 0 .35rem; border-bottom: 1px solid #dbe4ef; color: #173b68; font-size: 1rem; }
.participant-profile-subheading:first-child { margin-top: 0; }
.profile-rich-text { color: #334155; line-height: 1.6; }
.profile-rich-text p:first-child { margin-top: 0; }
.profile-rich-text p:last-child { margin-bottom: 0; }
.field--column-one { grid-column: 1; }
.participant-address-entry { display: grid; gap: .45rem; }
.participant-address-entry > label { display: grid; gap: .4rem; }
.link-button { appearance: none; border: 0; padding: 0; background: transparent; color: #2563eb; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.manual-address-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: .45rem; padding: 1rem; border: 1px solid #dbe4f0; border-radius: .8rem; background: #f8fafc; }
.manual-address-grid[hidden] { display: none; }
@media (max-width: 640px) { .manual-address-grid { grid-template-columns: 1fr; } .field--column-one { grid-column: auto; } }

@media (max-width: 980px) {
    .profile-workspace { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; text-align: left; }
    .profile-avatar { margin-left: 0; width: 82px; height: 82px; font-size: 1.65rem; }
    .profile-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: .25rem;
        scroll-snap-type: x proximity;
    }
    .profile-nav__item { white-space: nowrap; scroll-snap-align: start; }
}
@media (max-width: 980px) {
    .participant-hero { grid-template-columns: minmax(0, 1fr) auto; }
    .participant-hero__details { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}
@media (max-width: 640px) {
    .participant-section-index {
        position: static;
        grid-template-columns: 1fr;
        gap: .55rem;
    }
    .participant-section-index > div:first-child { min-width: 0; }
    .profile-workspace--participant .profile-sidebar {
        display: block;
        padding: .9rem .9rem 0;
    }
    .participant-hero { display: grid; grid-template-columns: 1fr; gap: 1rem; }
    .participant-hero__identity { align-items: flex-start; }
    .participant-hero__details { grid-template-columns: 1fr 1fr; gap: .8rem; }
    .participant-hero__actions { grid-column: 1 / -1; justify-self: stretch; }
    .participant-hero__actions > .button { flex: 1 1 auto; justify-content: center; }
    .participant-hero__action-menu { margin-left: auto; }
    .profile-workspace--participant .participant-hero__identity .profile-avatar {
        width: 58px;
        height: 58px;
        font-size: 1.15rem;
    }
    .profile-workspace--participant .profile-nav {
        margin-top: .8rem;
    }
    .profile-workspace--participant .profile-nav__item {
        min-height: 44px;
        padding: .65rem .75rem;
    }
    .profile-detail-row { grid-template-columns: 1fr; gap: .25rem; }
    .profile-card { padding: .9rem; }
    .participant-section-editor { padding: 0; }
    .participant-profile-group__head { align-items: flex-start; padding: .8rem; }
    .participant-profile-group__toggle { align-items: flex-start; }
    .participant-profile-group__description { display: none; }
    .profile-section-actions { gap: .35rem; }
    .participant-profile-group__edit { min-width: 42px; padding-inline: .65rem; font-size: 0; }
    .participant-profile-group__edit .icon { margin: 0; font-size: .9rem; }
    .participant-section-editor__head { align-items: flex-start; padding: .9rem; }
    .participant-section-editor__head small { display: none; }
    .participant-section-editor__body { padding: .9rem; }
}
.matrix-record-detail{display:block;margin:.15rem 0}.matrix-record-detail strong{display:block;font-size:.86rem}.matrix-record-detail small{display:block;color:var(--muted-color,#64748b);font-size:.76rem}


/* 2026 NDIS operational UI sweep: responsive forms, cards and tables */
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .panel {
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(15,23,42,.06);
}
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .form-grid,
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) form.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .form-grid label,
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) form label {
  display: grid;
  gap: .45rem;
  color: var(--ink, #0f172a);
  font-weight: 700;
}
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) label > span {
  color: var(--muted, #64748b);
  font-size: .88rem;
}
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) input:not([type="checkbox"]):not([type="radio"]),
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) select,
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 14px;
  background: #fff;
  color: var(--ink, #0f172a);
  font: inherit;
  padding: .72rem .9rem;
  box-sizing: border-box;
}
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) textarea { min-height: 112px; resize: vertical; }
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) input[type="checkbox"] {
  width: 1.15rem !important;
  height: 1.15rem !important;
  min-height: 0 !important;
  margin: .35rem 0 0;
  padding: 0 !important;
  accent-color: #2563eb;
  justify-self: start;
}
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: .25rem;
}
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .stat-grid,
:is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .dashboard-grid {
  gap: 1rem;
}
.table-responsive, .server-table, .data-table-shell { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table-shell table, .server-table table { min-width: 760px; }
@media (max-width: 980px) {
  :is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .form-grid,
  :is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) form.form-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  :is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .page-actions,
  :is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  :is(.mobile-worker-page,.communication-centre-page,.advanced-reporting-page,.complaints-feedback-page,.payroll-integrations-page,.payroll-integrations-centre-page,.claims-revenue-page,.risk-management-page,.support-plan-reviews-page,.reportable-incidents-page,.medication-management-page) .button {
    width: 100%;
    justify-content: center;
  }
}


/* Enterprise UI consistency sweep */
.enterprise-sweep .panel,
.communication-centre-page .panel,
.ozibus-settings-page .panel,
.advanced-reporting-page .panel,
.complaints-feedback-page .panel,
.risk-management-page .panel,
.claims-revenue-page .panel,
.mobile-worker-page .panel,
.provider-kpis-page .panel,
.payroll-integrations-centre-page .panel,
.support-plan-reviews-page .panel,
.reportable-incidents-page .panel {
  border-radius: 22px;
  border: 1px solid var(--border, #dbe4f0);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.enterprise-sweep .data-shell,
.communication-centre-page .data-shell,
.ozibus-settings-page .data-shell,
.advanced-reporting-page .data-shell,
.complaints-feedback-page .data-shell,
.risk-management-page .data-shell,
.claims-revenue-page .data-shell,
.mobile-worker-page .data-shell,
.provider-kpis-page .data-shell,
.payroll-integrations-centre-page .data-shell,
.support-plan-reviews-page .data-shell,
.reportable-incidents-page .data-shell {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.enterprise-sweep .data-shell table,
.communication-centre-page .data-shell table,
.ozibus-settings-page .data-shell table,
.advanced-reporting-page .data-shell table,
.complaints-feedback-page .data-shell table,
.risk-management-page .data-shell table,
.claims-revenue-page .data-shell table,
.mobile-worker-page .data-shell table,
.provider-kpis-page .data-shell table,
.payroll-integrations-centre-page .data-shell table,
.support-plan-reviews-page .data-shell table,
.reportable-incidents-page .data-shell table { min-width: 720px; }
@media (max-width: 760px) {
  .page-header, .panel__head { align-items: flex-start; gap: .75rem; }
  .page-header__actions, .panel__head > :last-child { flex-wrap: wrap; width: 100%; }
  .page-header__actions .button, .panel__head .button { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .form-grid, form.form-grid { grid-template-columns: 1fr !important; }
  .form-grid label, .form-grid .field { min-width: 0; }
  input, select, textarea { max-width: 100%; }
}


/* Workforce responsive stat card grid hardening */
.stat-grid,
.stats-grid,
.data-quality-page .dq-stats,
.branch-operations-page .branch-stats,
.ozibus-settings-page .oz-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.stat-grid > .stat-card,
.stats-grid > .stat-card,
.data-quality-page .dq-stats > .stat-card,
.branch-operations-page .branch-stats > .stat-card,
.ozibus-settings-page .oz-status-grid > .stat-card {
  min-width: 0;
  width: 100%;
}
@media (max-width: 1180px) {
  .stat-grid,
  .stats-grid,
  .data-quality-page .dq-stats,
  .branch-operations-page .branch-stats,
  .ozibus-settings-page .oz-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .stat-grid,
  .stats-grid,
  .data-quality-page .dq-stats,
  .branch-operations-page .branch-stats,
  .ozibus-settings-page .oz-status-grid {
    grid-template-columns: 1fr;
  }
}


/* Workforce enterprise UI grid + facelift patch: recruitment, branch operations, data quality, Ozibus settings */
.data-quality-page .dq-stats,
.branch-operations-page .branch-stats,
.ozibus-settings-page .oz-status-grid,
.recruitment-page .recruitment-stats,
.recruitment-page .stats-grid,
.branch-operations-page .stat-grid,
.ozibus-settings-page .stat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: stretch !important;
  width: 100% !important;
}
.data-quality-page .dq-stats > *,
.branch-operations-page .branch-stats > *,
.ozibus-settings-page .oz-status-grid > *,
.recruitment-page .recruitment-stats > *,
.recruitment-page .stats-grid > *,
.branch-operations-page .stat-grid > *,
.ozibus-settings-page .stat-grid > * {
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.data-quality-page .stat-card,
.branch-operations-page .stat-card,
.ozibus-settings-page .stat-card,
.recruitment-page .stat-card {
  border-radius: 20px !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06) !important;
}
.recruitment-page .recruitment-hero,
.branch-operations-page .branch-hero,
.data-quality-page .dq-hero,
.ozibus-settings-page .oz-hero {
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08) !important;
}
.recruitment-page .recruitment-grid,
.branch-operations-page .branch-grid,
.data-quality-page .dq-grid,
.ozibus-settings-page .oz-settings-grid {
  align-items: start !important;
}
.recruitment-page .card,
.branch-operations-page .card,
.data-quality-page .card,
.ozibus-settings-page .card,
.recruitment-page .panel,
.branch-operations-page .panel,
.data-quality-page .panel,
.ozibus-settings-page .panel {
  border-radius: 22px !important;
  border-color: rgba(148, 163, 184, .24) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .045) !important;
}
.recruitment-page .table-responsive,
.branch-operations-page .data-shell,
.data-quality-page .data-shell,
.ozibus-settings-page .data-shell {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
.recruitment-page .section-heading,
.branch-operations-page .section-heading,
.data-quality-page .section-heading,
.ozibus-settings-page .section-heading {
  gap: .75rem !important;
  flex-wrap: wrap !important;
}
@media (max-width: 1180px) {
  .data-quality-page .dq-stats,
  .branch-operations-page .branch-stats,
  .ozibus-settings-page .oz-status-grid,
  .recruitment-page .recruitment-stats,
  .recruitment-page .stats-grid,
  .branch-operations-page .stat-grid,
  .ozibus-settings-page .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 680px) {
  .data-quality-page .dq-stats,
  .branch-operations-page .branch-stats,
  .ozibus-settings-page .oz-status-grid,
  .recruitment-page .recruitment-stats,
  .recruitment-page .stats-grid,
  .branch-operations-page .stat-grid,
  .ozibus-settings-page .stat-grid {
    grid-template-columns: 1fr !important;
  }
  .recruitment-page .button,
  .branch-operations-page .button,
  .data-quality-page .button,
  .ozibus-settings-page .button {
    width: 100% !important;
    justify-content: center !important;
  }
}


/* === Workforce UI sweep: Recruitment + Bulk Actions + responsive stat grids === */
.stats-grid,
.stats-grid--four,
.recruitment-stats,
.bulk-stats,
.branch-stats,
.dq-stats,
.oz-status-grid,
.enterprise-stat-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  width: 100% !important;
}
.recruitment-page .stat-card,
.bulk-actions-page .stat-card,
.business-continuity-page .stat-card {
  min-height: 138px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(148, 163, 184, .25) !important;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .07) !important;
}
.recruitment-page .recruitment-hero,
.bulk-actions-page .bulk-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 220px !important;
  align-items: center !important;
  gap: 1.25rem !important;
  padding: 1.35rem !important;
  border-radius: 28px !important;
  border: 1px solid rgba(148, 163, 184, .25) !important;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(20,184,166,.10), rgba(255,255,255,.92)) !important;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08) !important;
  margin-bottom: 1rem !important;
}
.recruitment-page .recruitment-hero h2,
.bulk-actions-page .bulk-hero h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem) !important;
  line-height: 1.05 !important;
  margin: .25rem 0 !important;
}
.recruitment-pipeline,
.bulk-score {
  aspect-ratio: 1 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.95) !important;
  border: 10px solid rgba(37,99,235,.16) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
.recruitment-pipeline strong,
.bulk-score strong {font-size: 2.25rem !important; line-height: 1 !important;}
.recruitment-page .recruitment-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
  align-items: start !important;
  margin-bottom: 1.25rem !important;
}
.recruitment-page .recruitment-form,
.bulk-actions-page .bulk-workbench,
.bulk-actions-page .bulk-table-panel,
.recruitment-page .card {
  border-radius: 26px !important;
  border: 1px solid rgba(148, 163, 184, .25) !important;
  background: #fff !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .06) !important;
}
.recruitment-page .form-grid,
.bulk-actions-page .bulk-controls-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}
.recruitment-page .form-grid .span-2,
.bulk-actions-page .bulk-note { grid-column: 1 / -1 !important; }
.recruitment-page .field,
.bulk-actions-page .field { display: grid !important; gap: .42rem !important; }
.recruitment-page input,
.recruitment-page select,
.recruitment-page textarea,
.bulk-actions-page input,
.bulk-actions-page select,
.bulk-actions-page textarea {
  width: 100% !important;
  min-height: 48px !important;
  border: 1px solid rgba(148,163,184,.36) !important;
  border-radius: 16px !important;
  padding: .76rem .95rem !important;
  background: #fff !important;
  font: inherit !important;
}
.recruitment-page textarea,
.bulk-actions-page textarea { min-height: 150px !important; resize: vertical !important; }
.bulk-actions-page .bulk-workbench {
  display: grid !important;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 2fr) !important;
  gap: 1.25rem !important;
  align-items: start !important;
  padding: 1.25rem !important;
}
.bulk-actions-page .bulk-action-footer {
  grid-column: 1 / -1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 1rem !important;
  padding-top: 1rem !important;
  border-top: 1px solid rgba(148,163,184,.22) !important;
}
.bulk-actions-page .bulk-check {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
}
.bulk-actions-page .bulk-check input { min-height: auto !important; width: 18px !important; height: 18px !important; accent-color: var(--primary, #2563eb) !important; }
.recruitment-page .table-responsive,
.bulk-actions-page .data-shell { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
.recruitment-page .data-table,
.bulk-actions-page .data-table { min-width: 760px !important; }
.recruitment-page .guidance-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}
.recruitment-page .guidance-grid > div {
  border: 1px solid rgba(148,163,184,.25) !important;
  border-radius: 18px !important;
  padding: 1rem !important;
  background: linear-gradient(180deg, #fff, #f8fafc) !important;
}
@media (max-width: 1180px) {
  .stats-grid,
  .stats-grid--four,
  .recruitment-stats,
  .bulk-stats,
  .branch-stats,
  .dq-stats,
  .oz-status-grid,
  .enterprise-stat-grid,
  .recruitment-page .guidance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .recruitment-page .recruitment-grid,
  .bulk-actions-page .bulk-workbench,
  .recruitment-page .recruitment-hero,
  .bulk-actions-page .bulk-hero { grid-template-columns: 1fr !important; }
  .recruitment-pipeline,
  .bulk-score { width: 160px !important; justify-self: start !important; }
}
@media (max-width: 680px) {
  .stats-grid,
  .stats-grid--four,
  .recruitment-stats,
  .bulk-stats,
  .branch-stats,
  .dq-stats,
  .oz-status-grid,
  .enterprise-stat-grid,
  .recruitment-page .guidance-grid,
  .recruitment-page .form-grid,
  .bulk-actions-page .bulk-controls-grid { grid-template-columns: 1fr !important; }
  .bulk-actions-page .bulk-action-footer { align-items: stretch !important; flex-direction: column !important; }
  .recruitment-page .button,
  .bulk-actions-page .button { width: 100% !important; justify-content: center !important; }
  .recruitment-pipeline,
  .bulk-score { width: 135px !important; }
}


/* Enterprise consistency sweep: responsive stat grids and modern module layout */
.enterprise-sweep .stats-grid,
.enterprise-sweep .stats-grid--four,
.enterprise-sweep .enterprise-stat-grid,
.recruitment-page .recruitment-stats,
.bulk-actions-page .bulk-stats,
.command-centre-page .command-stats,
.service-desk-page .service-desk-stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: stretch !important;
}
.enterprise-sweep .stat-card,
.enterprise-sweep .panel,
.enterprise-sweep .card {
  border: 1px solid rgba(148, 163, 184, .24) !important;
  border-radius: 24px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .055) !important;
}
.enterprise-hero,
.recruitment-page .recruitment-hero,
.bulk-actions-page .bulk-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) !important;
  gap: 1rem !important;
  align-items: center !important;
  border: 1px solid rgba(59, 130, 246, .18) !important;
  border-radius: 28px !important;
  padding: clamp(1rem, 2vw, 1.5rem) !important;
  background:
    radial-gradient(circle at top right, rgba(14,165,233,.18), transparent 28%),
    linear-gradient(135deg, rgba(37,99,235,.13), rgba(16,185,129,.10), rgba(255,255,255,.82)) !important;
  margin-bottom: 1rem !important;
}
.enterprise-hero h2,
.recruitment-page .recruitment-hero h2,
.bulk-actions-page .bulk-hero h2 {
  font-size: clamp(1.65rem, 3vw, 2.65rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -.04em !important;
  margin: .2rem 0 .55rem !important;
}
.hero-score,
.recruitment-pipeline,
.bulk-score {
  justify-self: end !important;
  min-width: 180px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(59,130,246,.18) !important;
  background: rgba(255,255,255,.94) !important;
  padding: 1rem !important;
  text-align: center !important;
}
.hero-score strong,
.recruitment-pipeline strong,
.bulk-score strong {display:block;font-size:2.45rem;line-height:1;letter-spacing:-.05em;}
.hero-score span,
.recruitment-pipeline span,
.bulk-score span {display:block;color:var(--muted,#64748b);font-weight:800;margin-top:.25rem;}
.recruitment-page .recruitment-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
  align-items: start !important;
}
.recruitment-page .recruitment-form,
.bulk-actions-page .bulk-workbench {
  padding: clamp(1rem, 2vw, 1.25rem) !important;
}
.recruitment-page .form-grid,
.bulk-actions-page .bulk-controls-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}
.recruitment-page .span-2,
.bulk-actions-page .bulk-note { grid-column: 1 / -1 !important; }
.bulk-actions-page .bulk-workbench {
  display: grid !important;
  grid-template-columns: minmax(240px, .55fr) minmax(0, 1.45fr) !important;
  gap: 1.25rem !important;
  align-items: start !important;
}
.bulk-actions-page .bulk-action-footer {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 5 !important;
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  border-radius: 18px !important;
  padding: .85rem !important;
  margin-top: 1rem !important;
}
.enterprise-card-grid,
.recruitment-page .guidance-grid,
.bulk-actions-page .bulk-guidance-grid {
  display:grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}
.enterprise-card-grid > *,
.recruitment-page .guidance-grid > div,
.bulk-actions-page .bulk-guidance-grid > div {
  border: 1px solid rgba(148,163,184,.24) !important;
  border-radius: 18px !important;
  padding: 1rem !important;
  background: linear-gradient(180deg, #fff, #f8fafc) !important;
}
.enterprise-sweep :is(input, select, textarea) {
  border-radius: 16px !important;
  border: 1px solid rgba(148,163,184,.36) !important;
}
.enterprise-sweep .data-shell,
.enterprise-sweep .table-responsive { overflow-x:auto !important; -webkit-overflow-scrolling: touch !important; }
@media (max-width: 1180px) {
  .enterprise-sweep .stats-grid,
  .enterprise-sweep .stats-grid--four,
  .enterprise-sweep .enterprise-stat-grid,
  .recruitment-page .recruitment-stats,
  .bulk-actions-page .bulk-stats,
  .command-centre-page .command-stats,
  .service-desk-page .service-desk-stats,
  .enterprise-card-grid,
  .recruitment-page .guidance-grid,
  .bulk-actions-page .bulk-guidance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .enterprise-hero,
  .recruitment-page .recruitment-hero,
  .bulk-actions-page .bulk-hero,
  .recruitment-page .recruitment-grid,
  .bulk-actions-page .bulk-workbench { grid-template-columns: 1fr !important; }
  .hero-score,.recruitment-pipeline,.bulk-score { justify-self:start !important; }
}
@media (max-width: 700px) {
  .enterprise-sweep .stats-grid,
  .enterprise-sweep .stats-grid--four,
  .enterprise-sweep .enterprise-stat-grid,
  .recruitment-page .recruitment-stats,
  .bulk-actions-page .bulk-stats,
  .command-centre-page .command-stats,
  .service-desk-page .service-desk-stats,
  .enterprise-card-grid,
  .recruitment-page .guidance-grid,
  .bulk-actions-page .bulk-guidance-grid,
  .recruitment-page .form-grid,
  .bulk-actions-page .bulk-controls-grid { grid-template-columns: 1fr !important; }
  .bulk-actions-page .bulk-action-footer { position: static !important; align-items:stretch !important; flex-direction:column !important; }
  .enterprise-sweep .button { width: 100%; justify-content:center; }
}


/* === Final responsive UI hardening: recruitment + bulk actions === */
.recruitment-page .recruitment-stats,
.recruitment-page .stats-grid,
.bulk-actions-page .bulk-stats,
.bulk-actions-page .stats-grid {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:1rem !important;
  width:100% !important;
  align-items:stretch !important;
}
.recruitment-page .recruitment-stats > *,
.recruitment-page .stats-grid > *,
.bulk-actions-page .bulk-stats > *,
.bulk-actions-page .stats-grid > * { min-width:0 !important; width:100% !important; }
.recruitment-page .recruitment-grid,
.bulk-actions-page .bulk-workbench {
  display:grid !important;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  gap:clamp(.9rem,1.8vw,1.35rem) !important;
  align-items:start !important;
}
.bulk-actions-page .bulk-workbench { grid-template-columns:minmax(260px,.8fr) minmax(0,2.2fr) !important; }
.recruitment-page .recruitment-form,
.bulk-actions-page .bulk-workbench,
.bulk-actions-page .bulk-table-panel,
.recruitment-page .card {
  max-width:100% !important;
  overflow:hidden !important;
}
.recruitment-page .form-grid,
.bulk-actions-page .bulk-controls-grid {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:1rem !important;
}
.bulk-actions-page .bulk-controls-grid .bulk-note,
.recruitment-page .form-grid .span-2 { grid-column:1 / -1 !important; }
.recruitment-page :is(input,select,textarea),
.bulk-actions-page :is(input,select,textarea) {
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
.bulk-actions-page .bulk-action-footer {
  grid-column:1 / -1 !important;
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:1rem !important;
  position:static !important;
}
.recruitment-page .table-responsive,
.bulk-actions-page .data-shell { overflow-x:auto !important; max-width:100% !important; }
.recruitment-page table,
.bulk-actions-page table { min-width:760px !important; }
@media (max-width:1180px){
  .recruitment-page .recruitment-stats,
  .recruitment-page .stats-grid,
  .bulk-actions-page .bulk-stats,
  .bulk-actions-page .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .recruitment-page .recruitment-grid,
  .bulk-actions-page .bulk-workbench { grid-template-columns:1fr !important; }
  .bulk-actions-page .bulk-controls-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width:700px){
  .recruitment-page .recruitment-stats,
  .recruitment-page .stats-grid,
  .bulk-actions-page .bulk-stats,
  .bulk-actions-page .stats-grid,
  .recruitment-page .form-grid,
  .bulk-actions-page .bulk-controls-grid { grid-template-columns:1fr !important; }
  .bulk-actions-page .bulk-action-footer { flex-direction:column !important; align-items:stretch !important; }
  .recruitment-page .button,
  .bulk-actions-page .button { width:100% !important; justify-content:center !important; }
}


/* Enterprise UI consistency sweep - responsive forms/cards across newer modules */
.enterprise-sweep .stats-grid,
.stats-grid.stats-grid--four,
.enterprise-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  align-items: stretch !important;
}
.enterprise-sweep .stat-card,
.stats-grid .stat-card { min-width:0; height:100%; }
.enterprise-sweep .form-grid,
.enterprise-sweep .form-grid--two,
.assets-equipment-page .form-grid,
.vendor-supplier-page .form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(240px, 1fr)) !important;
  gap: 1rem !important;
  align-items: start !important;
}
.enterprise-sweep label,
.assets-equipment-page label,
.vendor-supplier-page label {
  display: grid !important;
  gap: .42rem !important;
  font-weight: 700 !important;
  color: var(--text-muted, #475569) !important;
}
.enterprise-sweep input,
.enterprise-sweep select,
.enterprise-sweep textarea,
.assets-equipment-page input,
.assets-equipment-page select,
.assets-equipment-page textarea,
.vendor-supplier-page input,
.vendor-supplier-page select,
.vendor-supplier-page textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.enterprise-sweep .form-span-2,
.assets-equipment-page .form-span-2,
.vendor-supplier-page .form-span-2 { grid-column: 1 / -1 !important; }
.enterprise-sweep .form-actions,
.assets-equipment-page .form-actions,
.vendor-supplier-page .form-actions { display:flex; gap:.75rem; flex-wrap:wrap; align-items:center; }
.enterprise-sweep .enterprise-two-col,
.assets-equipment-page .enterprise-two-col,
.vendor-supplier-page .enterprise-two-col {
  display:grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr) !important;
  gap:1rem !important;
  align-items:start !important;
}
.enterprise-sweep .enterprise-card-grid,
.assets-equipment-page .enterprise-card-grid,
.service-desk-page .enterprise-card-grid,
.vendor-supplier-page .enterprise-card-grid {
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: .9rem !important;
}
.enterprise-sweep .enterprise-card-grid > div,
.assets-equipment-page .enterprise-card-grid > div,
.service-desk-page .enterprise-card-grid > div,
.vendor-supplier-page .enterprise-card-grid > div,
.enterprise-mini-card {
  border:1px solid var(--border,#dbe4f0) !important;
  border-radius:18px !important;
  padding:1rem !important;
  background: var(--surface,#fff) !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.05) !important;
  min-width:0 !important;
}
.enterprise-sweep .enterprise-card-grid strong,
.service-desk-page .enterprise-card-grid strong,
.assets-equipment-page .enterprise-card-grid strong,
.vendor-supplier-page .enterprise-card-grid strong { display:block !important; margin-bottom:.3rem !important; line-height:1.2 !important; }
.enterprise-sweep .enterprise-card-grid small,
.service-desk-page .enterprise-card-grid small,
.assets-equipment-page .enterprise-card-grid small,
.vendor-supplier-page .enterprise-card-grid small { display:block !important; color:var(--muted,#64748b) !important; line-height:1.35 !important; }
.enterprise-sweep .table-wrap, .enterprise-sweep .data-table-wrap { overflow-x:auto; }
@media (max-width: 1180px) {
  .enterprise-sweep .stats-grid,
  .stats-grid.stats-grid--four,
  .enterprise-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .enterprise-sweep .enterprise-two-col,
  .assets-equipment-page .enterprise-two-col,
  .vendor-supplier-page .enterprise-two-col { grid-template-columns: 1fr !important; }
}
@media (max-width: 720px) {
  .enterprise-sweep .stats-grid,
  .stats-grid.stats-grid--four,
  .enterprise-stats-grid,
  .enterprise-sweep .form-grid,
  .enterprise-sweep .form-grid--two,
  .assets-equipment-page .form-grid,
  .vendor-supplier-page .form-grid,
  .enterprise-sweep .enterprise-card-grid,
  .assets-equipment-page .enterprise-card-grid,
  .service-desk-page .enterprise-card-grid,
  .vendor-supplier-page .enterprise-card-grid { grid-template-columns: 1fr !important; }
  .enterprise-sweep .button,
  .assets-equipment-page .button,
  .vendor-supplier-page .button { width:100%; justify-content:center; }
}


/* Global datepicker and form polish sweep */
.field--date,
label.field--date {
  position: relative !important;
}
label.field--date input.custom-datepicker__input,
.field--date input.custom-datepicker__input {
  padding-right: 3rem !important;
}
label.field--date .custom-datepicker-toggle,
.field--date .custom-datepicker-toggle {
  right: .7rem !important;
  bottom: .58rem !important;
  background: var(--surface-muted, #f1f5f9) !important;
  border: 1px solid var(--border, #dbe4f0) !important;
}
.custom-datepicker-popover {
  position: fixed !important;
}

/* Keep form selects aligned to the same definite width as text inputs. */
form .field select,
form label > select,
form .field > .select2-container,
form label > .select2-container {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.field-label-text {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.field-info-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  color: var(--primary, #2563eb);
  cursor: help;
  outline: none;
}

.field-info-tip::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 2800;
  left: 50%;
  bottom: calc(100% + .55rem);
  width: max-content;
  max-width: 16rem;
  padding: .55rem .7rem;
  border-radius: 9px;
  background: #172033;
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .2);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, .25rem);
  transition: opacity .15s ease, transform .15s ease;
}

.field-info-tip:hover::after,
.field-info-tip:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Common writing/password-manager extensions may inject duplicate controls
   into mutation-driven modals. Structured address fields explicitly opt out. */
.participant-address-entry grammarly-extension,
.participant-address-entry grammarly-desktop-integration,
.participant-address-entry com-1password-button,
.participant-address-entry [data-lastpass-icon-root] {
  display: none !important;
}
.assets-equipment-page .panel,
.service-desk-page .panel,
.vendor-supplier-page .panel {
  overflow: hidden;
}
.assets-equipment-page .form-grid label,
.assets-equipment-page form.form-grid label {
  min-width: 0 !important;
}
.assets-equipment-page .form-grid input,
.assets-equipment-page .form-grid select,
.assets-equipment-page .form-grid textarea {
  min-height: 3rem !important;
  border-radius: 14px !important;
  font-weight: 600 !important;
}
.assets-equipment-page .form-grid textarea {
  min-height: 10rem !important;
}
.assets-equipment-page .enterprise-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.assets-equipment-page .enterprise-card-grid > div,
.service-desk-page .enterprise-card-grid > div {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
@media (max-width: 980px) {
  .assets-equipment-page .enterprise-card-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 760px) {
  .enterprise-sweep .form-grid,
  .enterprise-sweep .form-grid--two,
  .assets-equipment-page .form-grid,
  .vendor-supplier-page .form-grid {
    grid-template-columns: 1fr !important;
  }
  .assets-equipment-page .enterprise-two-col,
  .vendor-supplier-page .enterprise-two-col,
  .enterprise-sweep .enterprise-two-col {
    grid-template-columns: 1fr !important;
  }
}


/* Enterprise UI consistency sweep: cards, tables and selects */
.enterprise-sweep .stats-grid,
.stats-grid.stats-grid--four,
.enterprise-stats-grid,
.quality-management-page .stats-grid,
.staff-performance-page .stats-grid {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:1rem !important;
  align-items:stretch;
}
.enterprise-sweep .stats-grid > *,
.stats-grid.stats-grid--four > *,
.enterprise-stats-grid > * { min-width:0; width:100%; height:100%; }
.enterprise-sweep .stat-card,
.enterprise-sweep .card,
.enterprise-sweep .panel { min-width:0; }
.enterprise-two-col,
.staff-performance-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,.75fr);
  gap:1rem;
  align-items:start;
}
.enterprise-sweep .table-shell,
.enterprise-sweep .server-table,
.enterprise-sweep .client-table {
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.enterprise-sweep .data-table,
.server-table .data-table,
.client-table .data-table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:760px;
}
.enterprise-sweep .server-table__toolbar,
.enterprise-sweep .client-table__toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
  align-items:end;
}
.enterprise-sweep .server-table__search,
.enterprise-sweep .server-table__filter,
.enterprise-sweep .server-table__length,
.enterprise-sweep .client-table__toolbar label { flex:1 1 180px; min-width:0; }
.enterprise-sweep :is(select,.custom-select2,.select2-selection--single),
.field :is(select,.custom-select2),
.server-table__toolbar select,
.client-table__toolbar select {
  width:100% !important;
  min-height:44px;
  border-radius:14px !important;
  border:1px solid var(--border,#dbe4f0) !important;
  background:#fff !important;
  color:var(--text,#102033);
}
.enterprise-sweep .select2-container { width:100% !important; }
.enterprise-sweep .select2-container .select2-selection--single { display:flex; align-items:center; height:44px !important; }
.enterprise-sweep .field input,
.enterprise-sweep .field textarea,
.enterprise-sweep .field select { width:100%; min-width:0; }
.enterprise-sweep .quick-actions { display:flex; flex-wrap:wrap; gap:.75rem; }
@media(max-width:1180px){
  .enterprise-sweep .stats-grid,
  .stats-grid.stats-grid--four,
  .enterprise-stats-grid,
  .quality-management-page .stats-grid,
  .staff-performance-page .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .enterprise-two-col,
  .staff-performance-layout { grid-template-columns:1fr; }
}
@media(max-width:720px){
  .enterprise-sweep .stats-grid,
  .stats-grid.stats-grid--four,
  .enterprise-stats-grid,
  .quality-management-page .stats-grid,
  .staff-performance-page .stats-grid { grid-template-columns:1fr !important; }
  .enterprise-sweep .page-header__actions,
  .enterprise-sweep .quick-actions { width:100%; flex-direction:column; }
  .enterprise-sweep .button { width:100%; justify-content:center; }
  .enterprise-sweep .server-table__toolbar,
  .enterprise-sweep .client-table__toolbar,
  .enterprise-sweep .server-table__footer,
  .enterprise-sweep .client-table__footer { flex-direction:column; align-items:stretch; }
  .enterprise-sweep { padding-inline:.55rem; }
}


/* Pass 28: true modal footers and searchable table selects */
.crud-modal .modal {
  display: flex !important;
  flex-direction: column !important;
  max-height: calc(100vh - 48px) !important;
  overflow: hidden !important;
}
.crud-modal .modal__body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  padding-bottom: 28px !important;
}
.crud-modal .modal__footer,
.crud-modal .modal > .modal-actions {
  flex: 0 0 auto !important;
  position: static !important;
  inset: auto !important;
  z-index: 4 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 16px 28px 20px !important;
  border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
  background: linear-gradient(180deg, rgba(248,250,252,.96), #fff) !important;
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.06) !important;
}
.crud-modal .modal__footer [hidden] { display: none !important; }
.table-shell .select2-container,
.data-table .select2-container,
.dataTables_wrapper .select2-container,
[data-server-table] .select2-container {
  min-width: 180px !important;
  max-width: 100% !important;
}
.table-shell .select2-container--default .select2-selection--single,
.data-table .select2-container--default .select2-selection--single,
.dataTables_wrapper .select2-container--default .select2-selection--single,
[data-server-table] .select2-container--default .select2-selection--single {
  min-height: 42px !important;
  border-radius: 12px !important;
  border-color: rgba(148, 163, 184, 0.36) !important;
  display: flex !important;
  align-items: center !important;
  background: #fff !important;
}
@media (max-width: 760px) {
  .crud-modal .modal__footer,
  .crud-modal .modal > .modal-actions {
    flex-direction: column-reverse !important;
    padding: 14px 18px 18px !important;
  }
  .crud-modal .modal__footer .button,
  .crud-modal .modal > .modal-actions .button {
    width: 100% !important;
  }
}

/* Pass 29: sidebar dropdowns, consistent select2 and UI spacing polish */
.sidebar__nav--accordion {
  display: grid;
  gap: .55rem;
}
.sidebar__nav--accordion .nav-section {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  overflow: hidden;
}
.sidebar__nav--accordion .nav-section > p { display: none !important; }
.nav-section__summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: .55rem;
  padding: .72rem .85rem;
  cursor: pointer;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  list-style: none;
  user-select: none;
}
.nav-section__summary::-webkit-details-marker { display: none; }
.nav-section__summary small {
  min-width: 1.75rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  text-align: center;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.72);
  font-size: .72rem;
}
.nav-section__chevron {
  transition: transform .18s ease;
  color: rgba(255,255,255,.62);
}
.nav-section--dropdown[open] .nav-section__chevron { transform: rotate(180deg); }
.nav-section__items {
  display: grid;
  gap: .22rem;
  padding: 0 .45rem .55rem;
}
.sidebar--collapsed .nav-section__summary small,
.sidebar--collapsed .nav-section__summary span:first-child,
.sidebar--collapsed .nav-section__chevron { display: none; }
.sidebar--collapsed .nav-section__items { padding: .35rem; }
.sidebar--collapsed .nav-section--dropdown { border-color: transparent; background: transparent; }
.sidebar--collapsed .nav-section--dropdown:not([open]) .nav-section__items { display: grid; }

.select2-container { max-width: 100%; }
select.custom-select2, .custom-select2--auto, .custom-select2--table-filter { width: 100% !important; }
.select2-container--default .select2-selection--single {
  min-height: 44px !important;
  border: 1px solid rgba(148, 163, 184, .36) !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04) !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 1.35 !important;
  padding-left: .95rem !important;
  padding-right: 2.25rem !important;
  color: var(--text, #102033) !important;
  font-weight: 650;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  right: .45rem !important;
}
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--primary, #0f766e) !important;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .12) !important;
}
.table-shell select,
.server-table__toolbar select,
.client-table__toolbar select,
.dataTables_wrapper select { min-width: 12rem; }
.select2-dropdown {
  border-radius: 14px !important;
  border: 1px solid rgba(148, 163, 184, .3) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16) !important;
  overflow: hidden;
}
.select2-search--dropdown { padding: .65rem !important; }
.select2-container--default .select2-search--dropdown .select2-search__field {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .36);
  padding: .45rem .65rem;
}

.page, .workspace__body { min-width: 0; }
.page-header,
.panel__head,
.card__head {
  gap: 1rem;
  align-items: flex-start;
}
.page-header__actions,
.panel__actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  justify-content: flex-end;
}
.stats-grid,
.stat-grid,
.enterprise-stats-grid {
  gap: 1rem !important;
  align-items: stretch !important;
}
.stat-card,
.metric-card,
.kpi-card,
.panel,
.card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.stat-card {
  padding: 1rem !important;
  border-radius: 20px !important;
}
.stat-card strong,
.metric-card strong,
.kpi-card strong {
  line-height: 1.08;
  letter-spacing: -.02em;
}
.panel {
  border-radius: 22px;
}
.panel > :not(.panel__head):not(style) {
  min-width: 0;
}
.dashboard-grid,
.enterprise-two-col,
.staff-performance-layout {
  gap: 1rem !important;
}
.table-wrap,
.table-shell,
.server-table,
.client-table,
.data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.crud-modal .modal__body { padding: 22px 28px !important; }
.crud-modal .crud-form { display: flex; flex-direction: column; min-height: 0; }
.crud-modal .modal__footer { margin-top: 0 !important; }
@media (max-width: 760px) {
  .page-header__actions,
  .panel__actions,
  .table-actions { justify-content: stretch; }
  .page-header__actions .button,
  .panel__actions .button,
  .table-actions .button { width: 100%; justify-content: center; }
  .stat-card { padding: .9rem !important; }
  .crud-modal .modal__body { padding: 18px !important; }
}


/* Pass 30: sidebar accordion visibility, scheduler resilience, consistent UI polish */
.sidebar__nav--accordion .nav-section,
.sidebar__nav--accordion .nav-section--dropdown {
  background: #ffffff !important;
  border-color: rgba(148, 163, 184, .28) !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .035);
}
.sidebar__nav--accordion .nav-section__summary {
  color: var(--text, #0f172a) !important;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
}
.sidebar__nav--accordion .nav-section__summary span:first-child {
  color: var(--text, #0f172a) !important;
}
.sidebar__nav--accordion .nav-section__summary small {
  background: rgba(37, 99, 235, .10) !important;
  color: var(--primary-strong, #1d4ed8) !important;
}
.nav-section__chevron { color: var(--text-muted, #64748b) !important; display: inline-flex; align-items: center; justify-content: center; }
.nav-section__chevron--open { display: none; }
.nav-section--dropdown[open] .nav-section__chevron--closed { display: none; }
.nav-section--dropdown[open] .nav-section__chevron--open { display: inline-flex; }
.nav-section--dropdown[open] .nav-section__summary {
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}
.scheduler-shell { overflow: hidden; }
.scheduler-grid { min-height: 420px; }
.scheduler-filters .select2-container,
.table-shell .select2-container,
.server-table__toolbar .select2-container,
.client-table__toolbar .select2-container,
.dataTables_wrapper .select2-container { min-width: 12rem; width: 100% !important; }
.stats-grid { align-items: stretch; }
.stat-card, .schedule-signal-card, .schedule-capacity-card { min-width: 0; }
.stat-card strong, .stat-card__value { overflow-wrap: anywhere; }
.panel, .dashboard-panel, .server-table, .client-table { min-width: 0; }
.panel__head { gap: 1rem; align-items: flex-start; }
.panel__head > div { min-width: 0; }


/* Pass 32: consistent cards, datatable filters, scheduler view and section spacing */
.panel,
.section-card,
.card,
.dashboard-card,
.stats-card,
.stat-card {
  box-sizing: border-box;
}
.panel {
  padding: clamp(18px, 2vw, 26px);
}
.panel > .server-table,
.panel > .client-table,
.panel > .table-shell {
  margin-top: 14px;
}
.stats-grid {
  gap: clamp(14px, 1.8vw, 22px);
  align-items: stretch;
}
.stats-grid > *,
.stat-card,
.stats-card {
  min-width: 0;
  height: 100%;
  padding: clamp(16px, 1.6vw, 22px);
}
.server-table__toolbar,
.client-table__toolbar {
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) minmax(120px, 160px) auto;
  align-items: end !important;
  gap: 14px !important;
  padding: 16px !important;
}
.server-table__toolbar label,
.client-table__toolbar label {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  width: 100%;
  min-width: 0;
  white-space: normal !important;
}
.server-table__toolbar label > span,
.client-table__toolbar label > span {
  display: block !important;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  min-width: max-content;
}
.server-table__toolbar input,
.server-table__toolbar select,
.client-table__toolbar input,
.client-table__toolbar select,
.server-table__toolbar .select2-container,
.client-table__toolbar .select2-container {
  width: 100% !important;
  max-width: 100% !important;
}
.server-table__reset,
.client-table__reset {
  align-self: end;
  min-height: 44px;
}
.scheduler-actions .calendar-view-select--native {
  display: inline-block !important;
  visibility: visible !important;
  min-width: 150px;
}
.scheduler-grid {
  min-height: 520px;
}
.calendar-week-grid,
.calendar-month-grid {
  min-width: 920px;
}
.calendar-week-grid {
  display: grid;
  grid-template-columns: 84px repeat(7, minmax(120px, 1fr));
}
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
}
.calendar-slot {
  min-height: 76px;
}
.calendar-month-day {
  min-height: 128px;
}
@media (max-width: 900px) {
  .server-table__toolbar,
  .client-table__toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
  }
  .server-table__reset,
  .client-table__reset {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .participant-profile-group__head {
    display: grid;
  }
  .profile-section-actions {
    justify-content: flex-start;
  }
  .profile-section-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* Pass 33: module spacing rhythm and stat-card breathing room */
.page,
.module-page,
.app-main > section.page {
  display: grid;
  gap: clamp(20px, 2.2vw, 30px);
}
.page > .page-header + .stats-grid,
.module-page > .page-header + .stats-grid,
.page-header + .stats-grid {
  margin-top: clamp(8px, 1vw, 14px) !important;
}
.page > .stats-grid,
.module-page > .stats-grid,
.stats-grid {
  margin-block: clamp(10px, 1.3vw, 18px) clamp(18px, 2.2vw, 30px) !important;
  gap: clamp(18px, 2vw, 26px) !important;
  padding: 0 !important;
}
.stats-grid + .panel,
.stats-grid + .section-card,
.stats-grid + .card,
.stats-grid + article {
  margin-top: 0 !important;
}
.stat-card,
.stats-card,
.schedule-signal-card,
.schedule-capacity-card {
  padding: clamp(20px, 2vw, 28px) !important;
  border-radius: 22px !important;
}
.stat-card__head {
  gap: 16px;
  align-items: flex-start;
}
.token-badge,
.stat-card .token-badge {
  flex: 0 0 auto;
  margin-left: auto;
}
.panel,
.section-card,
.card,
.dashboard-panel,
.admin-card {
  padding: clamp(22px, 2.2vw, 32px) !important;
  border-radius: 24px;
}
.panel + .panel,
.section-card + .section-card,
.card + .card {
  margin-top: clamp(18px, 2vw, 26px);
}
.panel__head,
.section-heading,
.card__head {
  gap: clamp(12px, 1.5vw, 20px) !important;
  margin-bottom: clamp(14px, 1.8vw, 22px);
}
.staff-safety-checks .stats-grid,
.staff-safety-checks-page .stats-grid,
.module-page--safety .stats-grid {
  margin-top: clamp(14px, 1.6vw, 22px) !important;
  margin-bottom: clamp(22px, 2.3vw, 34px) !important;
}
@media (max-width: 720px) {
  .page,
  .module-page,
  .app-main > section.page {
    gap: 18px;
  }
  .stats-grid {
    gap: 16px !important;
    margin-block: 8px 20px !important;
  }
  .stat-card,
  .stats-card,
  .panel,
  .section-card,
  .card,
  .dashboard-panel,
  .admin-card {
    padding: 18px !important;
    border-radius: 18px !important;
  }
}


/* SupportLedger documentation hub */
.supportledger-doc-hub .help-search-wrap { margin: 1rem 0 1.25rem; }
.supportledger-doc-hub [data-help-search] { width: 100%; min-height: 44px; border-radius: 14px; padding: .75rem 1rem; }
.help-article-grid .academy-resource-card span { font-size: 1.35rem; }
.supportledger-help-faq .manual-row { transition: opacity .18s ease, transform .18s ease; }


/* Pass 36: searchable sidebar, scrollable command search and role-based help anchors */
.sidebar-menu-search {
  padding: .25rem .35rem .75rem;
}
.sidebar-menu-search label {
  display: block;
}
.sidebar-menu-search input {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: rgba(255, 255, 255, .95);
  color: var(--text, #0f172a);
  padding: .65rem .8rem;
  font-weight: 650;
  outline: none;
}
.sidebar-menu-search input:focus {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.global-search {
  align-items: start;
  overflow-y: auto;
}
.global-search__dialog {
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(820px, calc(100vh - 8rem));
}
.global-search__results {
  min-height: 0;
  max-height: calc(100vh - 15rem);
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding-bottom: 1.25rem;
}
.global-search__item {
  min-height: 72px;
}
.supportledger-role-manual,
#admin-guide,
#compliance-guide,
#quick-start {
  scroll-margin-top: 96px;
}
@media (max-width: 760px) {
  .global-search { padding-top: 5vh; }
  .global-search__dialog { max-height: 88vh; }
  .global-search__results { max-height: calc(88vh - 9rem); }
}


/* Pass 39: remove duplicate messaging route from menus, standalone dashboard, left aligned accordion text */
.sidebar__nav--accordion { text-align: left; }
.sidebar__nav--accordion .nav-item,
.sidebar__nav--accordion .nav-item span:last-child,
.sidebar__nav--accordion .nav-section__summary,
.sidebar__nav--accordion .nav-section__summary span:first-child {
  text-align: left !important;
}
.sidebar__nav--accordion .nav-section__summary {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  justify-items: stretch;
}
.sidebar__nav--accordion .nav-section__summary span:first-child {
  justify-self: start;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sidebar__nav--accordion .nav-section__summary small,
.sidebar__nav--accordion .nav-section__chevron {
  justify-self: end;
}
.nav-item--standalone {
  border: 1px solid rgba(37, 99, 235, .18);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,246,255,.92)) !important;
  color: var(--text, #0f172a) !important;
  border-radius: 18px;
  margin-bottom: .35rem;
  font-weight: 850;
}
.nav-item--standalone .token-badge { background: rgba(37, 99, 235, .10); color: var(--primary, #2563eb); }
.nav-item--standalone.is-active { border-color: rgba(37, 99, 235, .45); box-shadow: 0 14px 30px rgba(37, 99, 235, .12); }
.comm-v2 .panel--full { grid-column: 1 / -1; }


/* Pass 41: server-table fix support, new feature polish, and final left-aligned sidebar submenu layout */
.sidebar__nav--accordion,
.sidebar__nav--accordion .nav-section,
.sidebar__nav--accordion .nav-section__items {
  width: 100%;
  text-align: left !important;
  justify-items: stretch !important;
  align-items: stretch !important;
}
.sidebar__nav--accordion .nav-section__items {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: .4rem !important;
  padding: .55rem .65rem .75rem !important;
}
.sidebar__nav--accordion .nav-item {
  display: grid !important;
  grid-template-columns: 2.55rem minmax(0, 1fr) !important;
  justify-content: start !important;
  justify-items: start !important;
  align-items: center !important;
  gap: .75rem !important;
  width: 100% !important;
  text-align: left !important;
  padding: .72rem .75rem !important;
}
.sidebar__nav--accordion .nav-item .token-badge {
  grid-column: 1;
  justify-self: start !important;
  flex: 0 0 2.35rem !important;
}
.sidebar__nav--accordion .nav-item > span:last-child {
  grid-column: 2;
  justify-self: start !important;
  min-width: 0 !important;
  max-width: 100% !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.sidebar__nav--accordion .nav-section__summary {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto auto !important;
  justify-items: start !important;
  text-align: left !important;
}
.sidebar__nav--accordion .nav-section__summary span:first-child {
  justify-self: start !important;
  text-align: left !important;
}
.sidebar__nav--accordion .nav-section__summary small,
.sidebar__nav--accordion .nav-section__chevron {
  justify-self: end !important;
}

/* Pass 45: feature governance and field standards */
.feature-standard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.feature-standard-grid > div {
    padding: 1rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 1rem;
    background: var(--surface-muted, #f8fafc);
}
.feature-standard-grid strong,
.feature-standard-grid span {
    display: block;
}
.feature-standard-grid span {
    margin-top: .35rem;
    color: var(--muted, #64748b);
    line-height: 1.45;
}

/* Pass 51: responsive Scheduling calendar */
.scheduler-shell {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.scheduler-toolbar {
  align-items: stretch;
  gap: 14px;
}
.scheduler-period-control,
.scheduler-actions {
  min-width: 0;
}
.scheduler-grid {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.calendar-week-grid,
.calendar-month-grid {
  width: max-content;
  max-width: none;
}
.calendar-month-day.is-outside-month {
  background: #f8fafc;
  color: var(--text-muted);
}
.calendar-empty-note {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  background: var(--surface-soft);
}
.calendar-agenda-list {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 10px;
}
.calendar-agenda-day {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.calendar-agenda-day h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}
.calendar-agenda-day.is-today {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
}
@media (max-width: 1100px) {
  .schedule-signal-grid,
  .schedule-capacity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calendar-week-grid {
    grid-template-columns: 84px repeat(7, minmax(118px, 1fr));
    min-width: 910px;
  }
  .calendar-month-grid {
    grid-template-columns: repeat(7, minmax(116px, 1fr));
    min-width: 812px;
  }
}
@media (max-width: 720px) {
  .scheduler-shell {
    padding: 12px;
    gap: 12px;
  }
  .scheduler-toolbar,
  .scheduler-period-control,
  .scheduler-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .scheduler-period-control {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
  }
  .scheduler-period-control h2 {
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
  }
  .scheduler-actions {
    gap: 10px;
  }
  .scheduler-actions .calendar-view-select--native,
  .calendar-view-select,
  .scheduler-actions .button {
    width: 100% !important;
    min-width: 0 !important;
  }
  .scheduler-filters {
    grid-template-columns: 1fr !important;
    padding: 12px;
  }
  .scheduler-grid {
    max-height: min(68vh, 620px);
    min-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .calendar-week-grid,
  .calendar-month-grid {
    min-width: 0 !important;
    width: 100% !important;
  }
  .calendar-chip {
    min-height: 54px;
    padding: 10px 12px;
    white-space: normal;
  }
  .calendar-chip strong,
  .calendar-chip span,
  .calendar-chip small {
    white-space: normal;
  }
  .schedule-signal-grid,
  .schedule-capacity-grid,
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  .roster-validation-item {
    gap: 10px;
  }
}


/* Pass 51.1: scope scheduling overflow fix to app/scheduling only.
   Do not alter the global app shell; prevent calendar grids from widening the page. */
.scheduling-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
.scheduling-page .page-header,
.scheduling-page .scheduler-shell,
.scheduling-page .scheduler-toolbar,
.scheduling-page .scheduler-period-control,
.scheduling-page .scheduler-actions,
.scheduling-page .scheduler-filters,
.scheduling-page .scheduler-grid,
.scheduling-page .panel,
.scheduling-page .stats-grid,
.scheduling-page .schedule-signal-panel,
.scheduling-page .schedule-capacity-panel,
.scheduling-page .roster-validation-panel {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.scheduling-page .scheduler-shell {
  width: 100%;
  overflow: hidden;
  contain: layout paint;
}
.scheduling-page .scheduler-grid {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.scheduling-page .calendar-week-grid,
.scheduling-page .calendar-month-grid {
  max-width: none;
}
.scheduling-page .calendar-chip,
.scheduling-page .calendar-month-day,
.scheduling-page .calendar-slot {
  min-width: 0;
}
@supports not (overflow: clip) {
  .scheduling-page { overflow-x: hidden; }
}
@media (min-width: 721px) {
  .scheduling-page .calendar-week-grid,
  .scheduling-page .calendar-month-grid {
    width: max-content;
  }
}
@media (max-width: 720px) {
  .scheduling-page { overflow-x: hidden; }
  .scheduling-page .scheduler-grid {
    overflow-x: hidden;
  }
}
body.is-scheduling-route {
  overflow-x: hidden;
}

/* Pass 51.2: scheduling week/month grids should fill the scheduler viewport.
   Pass 51.1 prevented page overflow by making desktop grids max-content; that left
   visible blank space after Sunday on wide screens. Keep the fix scoped to scheduling. */
.scheduling-page .calendar-week-grid,
.scheduling-page .calendar-month-grid {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.scheduling-page .calendar-week-grid {
  grid-template-columns: 88px repeat(7, minmax(0, 1fr)) !important;
}
.scheduling-page .calendar-month-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}
.scheduling-page .calendar-week-grid > div,
.scheduling-page .calendar-month-day {
  min-width: 0 !important;
}
@media (min-width: 721px) {
  .scheduling-page .calendar-week-grid,
  .scheduling-page .calendar-month-grid {
    width: 100% !important;
  }
}

/* SupportLedger address autocomplete */
.supportledger-address-autocomplete {
  background-image: linear-gradient(90deg, rgba(37, 99, 235, .10), rgba(37, 99, 235, 0));
  background-size: 0 100%;
  background-repeat: no-repeat;
}
.pac-container {
  z-index: 20000 !important;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .35);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18);
  overflow: hidden;
  font-family: inherit;
}
.pac-item {
  padding: 10px 14px;
  line-height: 1.35;
  cursor: pointer;
}
.pac-item:hover,
.pac-item-selected {
  background: rgba(37, 99, 235, .08);
}

/* Pass 53: voice dictation for narrative note fields */
.speech-to-text {
  padding-bottom: 3rem;
}
.speech-tools {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}
.speech-tools__button {
  border: 1px solid rgba(37, 99, 235, .25);
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  border-radius: 999px;
  padding: .5rem .75rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.speech-tools__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .14);
}
.speech-tools__button.is-listening {
  background: rgba(220, 38, 38, .10);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, .35);
  animation: speechPulse 1.1s ease-in-out infinite;
}
.speech-tools__status {
  color: #64748b;
  font-size: .82rem;
}
@keyframes speechPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .22); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* Pass 53: shift destination map, scoped to scheduling */
.scheduling-page .shift-map-panel {
  overflow: hidden;
}
.scheduling-page .shift-map-panel .panel__head {
  align-items: center;
  gap: 1rem;
}
.shift-map-canvas {
  width: 100%;
  min-height: 380px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .28);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(239, 246, 255, .9), rgba(255,255,255,.9));
}
.shift-map-empty {
  min-height: 380px;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  color: #64748b;
  font-weight: 700;
}
.shift-map-info {
  max-width: 260px;
  color: #0f172a;
  line-height: 1.4;
}
.shift-map-info a {
  display: inline-flex;
  margin-top: .45rem;
  color: #2563eb;
  font-weight: 800;
}
@media (max-width: 720px) {
  .scheduling-page .shift-map-panel .panel__head {
    align-items: stretch;
  }
  .shift-map-canvas,
  .shift-map-empty {
    min-height: 280px;
  }
}

/* Pass 56: keep horizontal scrolling inside the table viewport only.
   Prevent the table card/footer area from creating a second scrollbar below
   the pagination/info row. */
.server-table,
.client-table,
.data-table-shell,
.panel .server-table,
.section-card .server-table {
  max-width: 100%;
  overflow-x: hidden !important;
}
.server-table > .table-shell,
.client-table > .table-shell,
.server-table .table-responsive,
.client-table .table-responsive,
.dataTables_wrapper .dataTables_scrollBody {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.server-table__footer,
.client-table__footer,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  overflow-x: visible !important;
}
.server-table__footer,
.client-table__footer {
  min-width: 0;
}


/* Pass 65: Public enquiries mobile responsiveness */
.public-enquiries-page,
.public-enquiries-page .panel,
.public-enquiries-page .panel__head,
.public-enquiries-page .enquiry-workbench,
.public-enquiries-page .server-table {
  min-width: 0;
  max-width: 100%;
}
.public-enquiries-page .panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}
.public-enquiries-page .panel__head > div {
  min-width: 0;
  flex: 1 1 280px;
}
.public-enquiries-page .dashboard-stats--compact,
.public-enquiries-page .enquiry-control-grid,
.public-enquiries-page .enquiry-followup-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.public-enquiries-page .status-tabs--enquiries {
  width: 100%;
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.public-enquiries-page .status-tabs--enquiries button {
  flex: 0 0 auto;
}
.public-enquiries-page .table-shell {
  max-width: 100%;
  overflow-x: auto;
}
.public-enquiries-page .data-table {
  min-width: 900px;
}

@media (max-width: 760px) {
  .public-enquiries-page {
    gap: 14px;
  }
  .public-enquiries-page .panel {
    padding: 14px;
    border-radius: 16px;
  }
  .public-enquiries-page .panel__head {
    gap: 10px;
  }
  .public-enquiries-page .panel__head h3 {
    font-size: 1.05rem;
    line-height: 1.25;
  }
  .public-enquiries-page .panel__head p {
    font-size: 0.9rem;
  }
  .public-enquiries-page .dashboard-stats--compact,
  .public-enquiries-page .enquiry-control-grid,
  .public-enquiries-page .enquiry-followup-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .public-enquiries-page .enquiry-control-card,
  .public-enquiries-page .enquiry-followup-card {
    min-height: 0;
    padding: 13px;
  }
  .public-enquiries-page .server-table__toolbar,
  .public-enquiries-page .server-table__footer {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
  }
  .public-enquiries-page .server-table__toolbar label,
  .public-enquiries-page .server-table__search,
  .public-enquiries-page .server-table__filter,
  .public-enquiries-page .server-table__length,
  .public-enquiries-page .server-table__reset {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }
  .public-enquiries-page .server-table__pager {
    width: 100%;
    justify-content: space-between;
  }
  .public-enquiries-page .server-table__pager .button {
    flex: 1 1 0;
  }
}

/* Pass 66: Public enquiries enterprise UI refresh */
.public-enquiries-page {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 100%;
}

.public-enquiries-page .admin-module-nav,
.public-enquiries-page > .panel {
  max-width: 100%;
}

.public-enquiries-page > .panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.86)),
    var(--surface);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.055);
}

.public-enquiries-page .panel__head {
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.public-enquiries-page .panel__head h3 {
  letter-spacing: -0.025em;
  color: #0f172a;
}

.public-enquiries-page .panel__head p {
  max-width: 920px;
  color: #64748b;
}

.public-enquiries-page .dashboard-stats,
.public-enquiries-page .dashboard-stats--compact {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.public-enquiries-page .dashboard-stats--compact > .stat-card {
  min-height: 142px;
  padding: 18px;
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

.public-enquiries-page .dashboard-stats--compact > .stat-card:hover {
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
}

.public-enquiries-page .dashboard-stats--compact .stat-card__head {
  align-items: flex-start;
}

.public-enquiries-page .dashboard-stats--compact .stat-card__value {
  margin: 8px 0 6px;
  font-size: clamp(1.65rem, 2.2vw, 2.35rem);
  font-weight: 900;
}

.public-enquiries-page .dashboard-stats--compact .token-badge {
  margin-left: auto;
  width: 44px;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
}

.public-enquiries-page .stat-card--blue .token-badge,
.public-enquiries-page .stat-card--yellow .token-badge {
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
}

.public-enquiries-page .stat-card--red .token-badge {
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}

.public-enquiries-page .enquiry-control-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.public-enquiries-page .enquiry-control-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 122px;
  padding: 18px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: none;
}

.public-enquiries-page .enquiry-control-card > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.public-enquiries-page .enquiry-control-card strong {
  font-size: clamp(1.6rem, 2vw, 2.15rem);
  font-weight: 900;
}

.public-enquiries-page .enquiry-control-card span:not(.enquiry-control-card__icon) {
  font-size: 0.9rem;
}

.public-enquiries-page .enquiry-control-card__icon {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
}

.public-enquiries-page .enquiry-control-card--success .enquiry-control-card__icon {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.public-enquiries-page .enquiry-control-card--warning .enquiry-control-card__icon {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.public-enquiries-page .enquiry-control-card--danger .enquiry-control-card__icon {
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}

.public-enquiries-page .enquiry-workbench {
  margin: 14px 0 18px;
}

.public-enquiries-page .status-tabs--enquiries {
  width: 100%;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.86);
}

.public-enquiries-page .status-tabs--enquiries button {
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-weight: 800;
}

.public-enquiries-page .status-tabs--enquiries button.is-active,
.public-enquiries-page .status-tabs--enquiries button:hover {
  border-color: rgba(37, 99, 235, 0.18);
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.public-enquiries-page .enquiry-followup-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.public-enquiries-page .enquiry-followup-card {
  min-height: 150px;
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

.public-enquiries-page .enquiry-followup-card__actions .button,
.public-enquiries-page .enquiry-followup-card__actions button {
  min-height: 34px;
  border-radius: 10px;
}

.public-enquiries-page .server-table {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.public-enquiries-page .server-table__toolbar {
  display: grid;
  align-items: end;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) minmax(110px, 140px) auto;
}

.public-enquiries-page .server-table__toolbar label {
  min-width: 0;
}

.public-enquiries-page .server-table__toolbar input,
.public-enquiries-page .server-table__toolbar select {
  min-height: 42px;
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.28);
  background-color: #ffffff;
}

.public-enquiries-page .server-table__reset {
  min-height: 42px;
  border-radius: 12px;
}

.public-enquiries-page .table-shell {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: #ffffff;
}

.public-enquiries-page .data-table--server th,
.public-enquiries-page .data-table--server td {
  padding: 14px 16px;
}

.public-enquiries-page .server-table__footer {
  padding-top: 12px;
}

@media (min-width: 1500px) {
  .public-enquiries-page .dashboard-stats--compact {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .public-enquiries-page .enquiry-control-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .public-enquiries-page .server-table__toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .public-enquiries-page > .panel {
    border-radius: 18px;
  }
  .public-enquiries-page .dashboard-stats--compact,
  .public-enquiries-page .enquiry-control-grid,
  .public-enquiries-page .enquiry-followup-grid,
  .public-enquiries-page .server-table__toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .public-enquiries-page .server-table__toolbar {
    padding: 12px;
  }
  .public-enquiries-page .data-table {
    min-width: 820px;
  }
}

/* Pass 67: Public enquiries card width/readability fix */
.public-enquiries-page .enquiry-signal-panel,
.public-enquiries-page .enquiry-control-panel,
.public-enquiries-page .panel {
  overflow: hidden;
}

.public-enquiries-page .dashboard-stats--compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  align-items: stretch;
}

.public-enquiries-page .dashboard-stats--compact > .stat-card {
  min-width: 0;
  min-height: 136px;
  padding: 18px 20px;
}

.public-enquiries-page .dashboard-stats--compact .stat-card__head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.public-enquiries-page .dashboard-stats--compact .stat-card__head > div {
  min-width: 0;
  max-width: calc(100% - 58px);
}

.public-enquiries-page .dashboard-stats--compact .stat-card__label,
.public-enquiries-page .dashboard-stats--compact .stat-card__meta,
.public-enquiries-page .enquiry-control-card span:not(.enquiry-control-card__icon),
.public-enquiries-page .enquiry-control-card small,
.public-enquiries-page .enquiry-followup-card strong,
.public-enquiries-page .enquiry-followup-card small,
.public-enquiries-page .enquiry-followup-card p {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  white-space: normal;
}

.public-enquiries-page .dashboard-stats--compact .stat-card__label {
  font-size: 0.86rem;
  line-height: 1.2;
}

.public-enquiries-page .dashboard-stats--compact .stat-card__value {
  font-size: clamp(1.85rem, 1.9vw, 2.25rem);
  line-height: 1;
}

.public-enquiries-page .dashboard-stats--compact .stat-card__meta {
  font-size: 0.82rem;
  line-height: 1.35;
}

.public-enquiries-page .dashboard-stats--compact .token-badge {
  flex: 0 0 44px;
}

.public-enquiries-page .enquiry-control-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}

.public-enquiries-page .enquiry-control-card {
  min-height: 112px;
}

.public-enquiries-page .enquiry-followup-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  margin-top: 14px;
}

.public-enquiries-page .enquiry-followup-card {
  min-height: 128px;
  padding: 16px 18px;
}

.public-enquiries-page .enquiry-followup-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.public-enquiries-page .enquiry-followup-card__actions .button,
.public-enquiries-page .enquiry-followup-card__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  min-height: 36px;
  padding-inline: 12px;
  white-space: nowrap;
  line-height: 1;
}

.public-enquiries-page .status-tabs--enquiries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-enquiries-page .status-tabs--enquiries button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .public-enquiries-page .dashboard-stats--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .public-enquiries-page .enquiry-control-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1680px) {
  .public-enquiries-page .dashboard-stats--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .public-enquiries-page .enquiry-control-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .public-enquiries-page .dashboard-stats--compact,
  .public-enquiries-page .enquiry-control-grid,
  .public-enquiries-page .enquiry-followup-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .public-enquiries-page .dashboard-stats--compact .stat-card__head > div {
    max-width: calc(100% - 54px);
  }
  .public-enquiries-page .enquiry-followup-card__actions {
    flex-wrap: wrap;
  }
}

/* Pass 68: Public enquiries table vertical scroll */
.public-enquiries-page .server-table > .table-shell,
.public-enquiries-page .table-shell {
  max-height: clamp(360px, 58vh, 620px) !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.public-enquiries-page .data-table--server thead th,
.public-enquiries-page .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.22);
}

.public-enquiries-page .data-table--server tbody td,
.public-enquiries-page .data-table tbody td {
  vertical-align: top;
}

.public-enquiries-page .server-table__footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 0;
  background: transparent;
}

.public-enquiries-page .server-table__pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 760px) {
  .public-enquiries-page .server-table > .table-shell,
  .public-enquiries-page .table-shell {
    max-height: 62vh !important;
  }

  .public-enquiries-page .server-table__footer {
    align-items: stretch;
  }
}

/* Pass 70: grammar check tool for narrative editors */
.speech-tools__button--grammar {
  background: rgba(16, 185, 129, .08);
  border-color: rgba(16, 185, 129, .28);
  color: #047857;
}
.speech-tools__button--grammar:hover {
  box-shadow: 0 12px 24px rgba(16, 185, 129, .14);
}
.speech-tools__button--grammar.is-busy {
  opacity: .72;
  cursor: wait;
}
.grammar-check-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(6px);
}
.grammar-check-modal__dialog {
  width: min(920px, 100%);
  max-height: min(760px, 92vh);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
  display: flex;
  flex-direction: column;
}
.grammar-check-modal__head,
.grammar-check-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}
.grammar-check-modal__head strong {
  display: block;
  color: #0f172a;
  font-size: 1.05rem;
}
.grammar-check-modal__head span {
  display: block;
  margin-top: .2rem;
  color: #64748b;
  font-size: .9rem;
}
.grammar-check-modal__close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.grammar-check-modal__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem 1rem;
  padding: 1.2rem;
  overflow: auto;
}
.grammar-check-modal__body label {
  color: #334155;
  font-weight: 800;
}
.grammar-check-modal__body textarea {
  min-height: 300px;
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 16px;
  padding: 1rem;
  color: #0f172a;
  line-height: 1.5;
  background: #f8fafc;
}
.grammar-check-modal__body textarea[data-corrected] {
  background: #fff;
}
.grammar-check-modal__foot {
  border-top: 1px solid rgba(226, 232, 240, .9);
  border-bottom: 0;
  justify-content: flex-end;
}
.grammar-check-modal__foot button {
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 12px;
  padding: .7rem 1rem;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
  color: #334155;
}
.grammar-check-modal__foot button[data-apply] {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
@media (max-width: 760px) {
  .grammar-check-modal__body {
    grid-template-columns: 1fr;
  }
  .grammar-check-modal__body textarea {
    min-height: 190px;
  }
}

/* Pass 71: provider-ready leave management upgrade */
.leave-decision-panel,
.leave-entitlement-panel,
.leave-signal-panel,
.leave-control-panel {
  overflow: hidden;
}

.leave-decision-panel {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.leave-decision-panel .server-table,
.leave-entitlement-panel .server-table {
  border-radius: 14px;
  overflow: auto;
  max-height: 420px;
}

.leave-decision-panel table,
.leave-entitlement-panel table {
  min-width: 760px;
}

.leave-decision-panel thead th,
.leave-entitlement-panel thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8fafc;
}

.leave-signal-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.leave-control-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.leave-signal-card,
.leave-control-card {
  min-width: 0;
  word-break: normal;
  overflow-wrap: anywhere;
}

.crud-modal[data-entity="leave"] .crud-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crud-modal[data-entity="leave"] .field:has(textarea),
.crud-modal[data-entity="leave"] .field:has([data-rich-text-surface="true"]) {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .crud-modal[data-entity="leave"] .crud-form {
    grid-template-columns: 1fr;
  }

  .leave-decision-panel .server-table,
  .leave-entitlement-panel .server-table {
    max-height: 360px;
  }
}

/* Pass 75: full-width rich-text editors and always-visible table CTAs */
.rich-text-field,
.rich-text-field * {
  box-sizing: border-box;
}

.rich-text-field {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.field:has(.rich-text-field),
.form-grid > .field:has(.rich-text-field),
.form-grid--two > .field:has(.rich-text-field),
.crud-form > .field:has(.rich-text-field),
.modal__body .field:has(.rich-text-field) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.form-grid,
.form-grid--two,
.crud-form,
.modal__body,
.form-panel,
.panel.form-panel {
  min-width: 0;
}

.form-grid .field,
.form-grid--two .field,
.crud-form .field,
.modal__body .field {
  min-width: 0;
  max-width: 100%;
}

.rich-text-surface {
  width: 100%;
  max-width: 100%;
}

/* Keep long rich-text helper/status text from forcing narrow columns wider. */
.speech-tools,
.speech-tools__status,
.rich-text-status {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Split-card registers should show their CTA/action buttons without requiring horizontal scrolling. */
.table-shell .data-table th:last-child,
.table-shell .data-table td:last-child,
.table-responsive .data-table th:last-child,
.table-responsive .data-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 6;
  background: #ffffff;
  box-shadow: -12px 0 18px -18px rgba(15, 23, 42, 0.45);
  white-space: nowrap;
}

.table-shell .data-table thead th:last-child,
.table-responsive .data-table thead th:last-child {
  z-index: 14;
  background: #f8fafc;
}

.table-shell .data-table td:last-child .button,
.table-responsive .data-table td:last-child .button,
.table-shell .data-table td:last-child button,
.table-responsive .data-table td:last-child button,
.table-shell .data-table td:last-child a,
.table-responsive .data-table td:last-child a {
  max-width: none;
  white-space: nowrap;
}

.supervision-review-layout .panel,
.enterprise-two-col .panel,
.qms-workbench .panel {
  min-width: 0;
  overflow: hidden;
}

.supervision-review-layout .table-shell,
.enterprise-two-col .table-shell,
.qms-workbench .table-shell {
  max-width: 100%;
}

@media (max-width: 1180px) {
  .table-shell .data-table th:last-child,
  .table-shell .data-table td:last-child,
  .table-responsive .data-table th:last-child,
  .table-responsive .data-table td:last-child {
    min-width: 120px;
  }
}

/* Pass 76: responsive editor/workbench/table hardening */
/* New governance/workbench screens were still using two-column desktop layouts inside
   containers that are often narrowed by the sidebar. Stack them earlier so editors and
   table CTAs use the full available card width. */
.qms-workbench,
.enterprise-two-col.qms-workbench {
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
}

.qms-workbench > .panel,
.enterprise-two-col.qms-workbench > .panel,
.qms-workbench > article,
.qms-workbench > aside {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.quality-management-page .qms-workbench form.form-grid,
.quality-management-page .qms-workbench .form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  width: 100% !important;
  max-width: 100% !important;
}

.quality-management-page .qms-workbench .field,
.quality-management-page .qms-workbench label.field,
.quality-management-page .qms-workbench .form-actions {
  min-width: 0 !important;
  max-width: 100% !important;
}

.quality-management-page .qms-workbench .field:has(textarea),
.quality-management-page .qms-workbench .field:has(.rich-text-field),
.quality-management-page .qms-workbench .field:has([data-rich-text-surface="true"]),
.quality-management-page .qms-workbench .form-actions {
  grid-column: 1 / -1 !important;
}

.rich-text-field,
.rich-text-field .rich-text-toolbar,
.rich-text-field .rich-text-surface,
.rich-text-field .rich-text-status,
.rich-text-field .speech-tools,
.rich-text-field .speech-tools__status {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.rich-text-toolbar {
  flex-wrap: wrap !important;
  overflow-x: visible !important;
  gap: .45rem !important;
}

.rich-text-surface {
  min-height: 150px !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.speech-tools {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .55rem !important;
}

.speech-tools__status,
.rich-text-status {
  display: block !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

/* Split register cards need to stack before their tables become unreadable. */
.supervision-review-layout,
.enterprise-two-col:not(.qms-workbench) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 760px), 1fr)) !important;
  align-items: start !important;
}

.supervision-review-layout > .panel,
.enterprise-two-col:not(.qms-workbench) > .panel {
  min-width: 0 !important;
  max-width: 100% !important;
}

.supervision-review-layout .table-shell,
.enterprise-two-col:not(.qms-workbench) .table-shell,
.qms-workbench + .panel .table-shell,
.quality-management-page .table-shell {
  width: 100% !important;
  max-width: 100% !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.supervision-review-layout .data-table,
.enterprise-two-col:not(.qms-workbench) .data-table {
  min-width: 940px !important;
}

/* Keep CTA columns visible and large enough when horizontal scrolling is still required. */
.supervision-review-layout .data-table th:last-child,
.supervision-review-layout .data-table td:last-child,
.enterprise-two-col .data-table th:last-child,
.enterprise-two-col .data-table td:last-child,
.quality-management-page .data-table th:last-child,
.quality-management-page .data-table td:last-child {
  min-width: 150px !important;
  width: 150px !important;
  white-space: nowrap !important;
}

.supervision-review-layout .data-table td:last-child,
.enterprise-two-col .data-table td:last-child,
.quality-management-page .data-table td:last-child {
  overflow: visible !important;
}

.supervision-review-layout .data-table td:last-child .button,
.enterprise-two-col .data-table td:last-child .button,
.quality-management-page .data-table td:last-child .button {
  display: inline-flex !important;
  width: auto !important;
  max-width: none !important;
  min-width: max-content !important;
}

/* Filter/search toolbars should wrap instead of clipping Reset/Rows controls. */
.server-table__toolbar,
.client-table__toolbar,
.table-toolbar,
.data-table-toolbar,
.table-filters,
.table-controls {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: end !important;
  gap: .75rem !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.server-table__toolbar > *,
.client-table__toolbar > *,
.table-toolbar > *,
.data-table-toolbar > *,
.table-filters > *,
.table-controls > * {
  min-width: min(240px, 100%) !important;
  max-width: 100% !important;
}

.server-table__toolbar input[type="search"],
.client-table__toolbar input[type="search"],
.table-toolbar input[type="search"],
.data-table-toolbar input[type="search"] {
  min-width: min(360px, 100%) !important;
}

@media (max-width: 1680px) {
  .supervision-review-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  .quality-management-page .qms-workbench form.form-grid,
  .quality-management-page .qms-workbench .form-grid {
    grid-template-columns: 1fr !important;
  }

  .quality-management-page .qms-workbench .button,
  .quality-management-page .qms-workbench .form-actions .button {
    width: 100% !important;
    justify-content: center !important;
  }

  .rich-text-toolbar button {
    min-width: 38px !important;
  }

  .speech-tools .button,
  .speech-tools button {
    flex: 1 1 150px !important;
    justify-content: center !important;
  }
}


/* Pass 77: restore internal DataTable scrolls after responsive editor/table polish.
   Wide record tables should scroll inside their card, not clip columns or stretch the page. */
.server-table,
.client-table {
  max-width: 100%;
  min-width: 0;
}

.server-table > .table-shell,
.client-table > .table-shell,
.panel > .table-shell,
.report-card > .table-shell,
.list-card > .table-shell,
.admin-card > .table-shell,
.section-card > .table-shell {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: min(62vh, 620px) !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
}

.server-table > .table-shell .data-table,
.client-table > .table-shell .data-table,
.panel > .table-shell .data-table,
.report-card > .table-shell .data-table,
.list-card > .table-shell .data-table,
.admin-card > .table-shell .data-table,
.section-card > .table-shell .data-table {
  width: max-content !important;
  min-width: max(980px, 100%) !important;
  table-layout: auto !important;
}

.server-table > .table-shell .data-table thead th,
.client-table > .table-shell .data-table thead th,
.panel > .table-shell .data-table thead th,
.report-card > .table-shell .data-table thead th,
.list-card > .table-shell .data-table thead th,
.admin-card > .table-shell .data-table thead th,
.section-card > .table-shell .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(248, 250, 252, 0.98);
}

/* Keep the row actions usable while the table scrolls horizontally. */
.data-table th:last-child,
.data-table td:last-child {
  min-width: 150px !important;
  width: 150px !important;
  white-space: nowrap !important;
}

.data-table td:last-child .table-actions,
.data-table td:last-child .inline-actions {
  width: auto !important;
  min-width: max-content !important;
  overflow: visible !important;
  flex-wrap: nowrap !important;
}

.data-table td:last-child .button,
.data-table td:last-child .icon-button {
  flex: 0 0 auto !important;
  min-width: max-content !important;
}

/* On smaller screens, default to the scroll/table view. Card view remains available via the toggle. */
@media (max-width: 820px) {
  .table-shell.is-wide-table,
  .server-table > .table-shell,
  .client-table > .table-shell {
    max-height: 58vh !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
  }

  .table-shell.is-wide-table .data-table,
  .server-table > .table-shell .data-table,
  .client-table > .table-shell .data-table {
    min-width: max(900px, 100%) !important;
  }

  .table-shell.is-wide-table .data-table--labelled thead,
  .server-table > .table-shell .data-table--labelled thead,
  .client-table > .table-shell .data-table--labelled thead {
    position: sticky !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
  }

  .table-shell.is-wide-table .data-table--labelled tbody,
  .table-shell.is-wide-table .data-table--labelled tr,
  .table-shell.is-wide-table .data-table--labelled th,
  .table-shell.is-wide-table .data-table--labelled td,
  .server-table > .table-shell .data-table--labelled tbody,
  .server-table > .table-shell .data-table--labelled tr,
  .server-table > .table-shell .data-table--labelled th,
  .server-table > .table-shell .data-table--labelled td,
  .client-table > .table-shell .data-table--labelled tbody,
  .client-table > .table-shell .data-table--labelled tr,
  .client-table > .table-shell .data-table--labelled th,
  .client-table > .table-shell .data-table--labelled td {
    display: revert !important;
    white-space: nowrap !important;
  }

  .table-shell.is-wide-table .data-table--labelled td::before,
  .server-table > .table-shell .data-table--labelled td::before,
  .client-table > .table-shell .data-table--labelled td::before {
    content: none !important;
  }

  .table-shell.is-stacked-table .data-table--labelled {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Pass 78: mobile DataTable presentation.
   Small screens should use readable stacked cards by default. The Scroll toggle still provides
   a wide horizontal table when needed, but Cards must never inherit the forced min-width rules. */
@media (max-width: 820px) {
  .table-view-toggle {
    display: flex !important;
    position: sticky !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 8 !important;
    align-items: center !important;
    gap: .5rem !important;
    padding: .75rem .85rem !important;
    border-bottom: 1px solid var(--border, #e2e8f0) !important;
    background: rgba(248, 250, 252, .98) !important;
  }

  .table-view-toggle span {
    min-width: max-content !important;
    font-size: .82rem !important;
  }

  .table-view-toggle button {
    min-height: 38px !important;
    padding: .45rem .85rem !important;
    font-size: .86rem !important;
  }

  .table-shell.is-stacked-table,
  .server-table > .table-shell.is-stacked-table,
  .client-table > .table-shell.is-stacked-table,
  .panel > .table-shell.is-stacked-table,
  .admin-card > .table-shell.is-stacked-table,
  .section-card > .table-shell.is-stacked-table {
    max-height: none !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scrollbar-gutter: auto !important;
  }

  .table-shell.is-stacked-table .data-table,
  .table-shell.is-stacked-table .data-table--labelled,
  .table-shell.is-stacked-table .data-table--controls,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls,
  .server-table > .table-shell.is-stacked-table .data-table,
  .client-table > .table-shell.is-stacked-table .data-table,
  .panel > .table-shell.is-stacked-table .data-table,
  .admin-card > .table-shell.is-stacked-table .data-table,
  .section-card > .table-shell.is-stacked-table .data-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .table-shell.is-stacked-table .data-table--labelled thead,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
  }

  .table-shell.is-stacked-table .data-table--labelled tbody,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls tbody {
    display: grid !important;
    width: 100% !important;
    gap: .8rem !important;
  }

  .table-shell.is-stacked-table .data-table--labelled tr,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls tr {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: .9rem !important;
    border: 1px solid var(--border, #e2e8f0) !important;
    border-radius: 18px !important;
    background: var(--surface, #fff) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06) !important;
  }

  .table-shell.is-stacked-table .data-table--labelled th,
  .table-shell.is-stacked-table .data-table--labelled td,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls th,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls td {
    display: grid !important;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: .75rem !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: .55rem 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(226, 232, 240, .75) !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  .table-shell.is-stacked-table .data-table--labelled td:last-child,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls td:last-child {
    grid-template-columns: 1fr !important;
    min-width: 0 !important;
    width: 100% !important;
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .table-shell.is-stacked-table .data-table--labelled td::before,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls td::before {
    content: attr(data-label) !important;
    color: var(--text-soft, #64748b) !important;
    font-size: .72rem !important;
    font-weight: 800 !important;
    letter-spacing: .02em !important;
    text-transform: uppercase !important;
    white-space: normal !important;
  }

  .table-shell.is-stacked-table .data-table--labelled td:last-child::before,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls td:last-child::before {
    margin-bottom: .35rem !important;
  }

  .table-shell.is-stacked-table .table-actions,
  .table-shell.is-stacked-table .inline-actions,
  .table-shell.is-stacked-table td:last-child .table-actions,
  .table-shell.is-stacked-table td:last-child .inline-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: .5rem !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
  }

  .table-shell.is-stacked-table td:last-child .button,
  .table-shell.is-stacked-table td:last-child .icon-button {
    flex: 0 0 auto !important;
    min-width: 42px !important;
    max-width: 100% !important;
  }

  .table-shell.is-wide-table {
    max-height: 58vh !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .table-shell.is-wide-table .data-table,
  .table-shell.is-wide-table .data-table--labelled,
  .table-shell.is-wide-table .data-table--controls {
    width: max-content !important;
    min-width: max(900px, 100%) !important;
  }
}

@media (max-width: 520px) {
  .table-shell.is-stacked-table .data-table--labelled th,
  .table-shell.is-stacked-table .data-table--labelled td,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls th,
  .table-shell.is-stacked-table .data-table--labelled.data-table--controls td {
    grid-template-columns: 1fr !important;
    gap: .25rem !important;
  }

  .table-view-toggle {
    flex-wrap: wrap !important;
  }

  .table-view-toggle span {
    flex: 1 0 100% !important;
  }

  .table-view-toggle button {
    flex: 1 1 calc(50% - .5rem) !important;
  }
}

/* Pass 79: true responsive tables with row details on compact screens */
.data-table__expander-head,
.data-table__expander-cell {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
}
.data-table__expand-row {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.data-table__expand-row .icon {
  transition: transform 160ms ease;
}
tr.is-expanded .data-table__expand-row .icon {
  transform: rotate(180deg);
}
.data-table__details-row[hidden] {
  display: none !important;
}
.data-table__details-row td {
  background: #f8fafc;
  border-top: 0;
  padding: 0 !important;
}
.data-table__details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.38);
}
.data-table__detail-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: #fff;
}
.data-table__detail-item > span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft, #64748b);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.data-table__detail-item > div {
  min-width: 0;
  color: var(--text, #0f172a);
  overflow-wrap: anywhere;
}
@media (min-width: 821px) {
  .data-table__expander-head,
  .data-table__expander-cell,
  .data-table__details-row {
    display: none !important;
  }
}
@media (max-width: 820px) {
  .table-shell {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }
  .table-view-toggle {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 8px 0 12px;
  }
  .table-view-toggle span {
    margin-right: auto;
    color: var(--text-soft, #64748b);
    font-weight: 800;
  }
  .table-view-toggle button {
    border: 1px solid var(--border, #dbe4f0);
    border-radius: 999px;
    background: #fff;
    color: var(--text, #0f172a);
    font-weight: 800;
    padding: 8px 12px;
  }
  .table-view-toggle button.is-active {
    border-color: rgba(37, 99, 235, .35);
    background: rgba(37, 99, 235, .08);
    color: #1d4ed8;
  }
  .table-shell.is-stacked-table {
    overflow-x: hidden;
  }
  .table-shell.is-stacked-table .data-table,
  .table-shell.is-stacked-table .data-table--labelled,
  .table-shell.is-stacked-table .data-table--controls {
    width: 100%;
    min-width: 0 !important;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }
  .table-shell.is-stacked-table .data-table--labelled thead,
  .table-shell.is-stacked-table .data-table--labelled tbody,
  .table-shell.is-stacked-table .data-table--labelled tr {
    position: static !important;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .table-shell.is-stacked-table .data-table--labelled tbody {
    display: table-row-group;
  }
  .table-shell.is-stacked-table .data-table--labelled tr {
    display: table-row;
    padding: 0;
    border-bottom: 0;
  }
  .table-shell.is-stacked-table .data-table--labelled th,
  .table-shell.is-stacked-table .data-table--labelled td {
    display: table-cell;
    white-space: normal !important;
    vertical-align: top;
    padding: 12px 10px;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
  }
  .table-shell.is-stacked-table .data-table--labelled td::before {
    content: none !important;
  }
  .table-shell.is-stacked-table .data-table__mobile-extra {
    display: none !important;
  }
  .table-shell.is-stacked-table .data-table__details-row {
    display: table-row;
  }
  .table-shell.is-stacked-table .data-table__details-row[hidden] {
    display: none !important;
  }
  .table-shell.is-stacked-table .data-table__details-row td {
    display: table-cell !important;
  }
  .table-shell.is-stacked-table .data-table th:first-child,
  .table-shell.is-stacked-table .data-table td:first-child {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
  }
  .table-shell.is-stacked-table .table-actions,
  .table-shell.is-stacked-table td[data-label*="Action"],
  .table-shell.is-stacked-table td[data-label*="action"] {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .table-shell.is-stacked-table .data-table .button,
  .table-shell.is-stacked-table .data-table .icon-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 36px;
  }
  .table-shell.is-wide-table {
    overflow-x: auto;
  }
  .table-shell.is-wide-table .data-table,
  .table-shell.is-wide-table .data-table--labelled,
  .table-shell.is-wide-table .data-table--controls {
    min-width: 760px !important;
  }
  .table-shell.is-wide-table .data-table__mobile-extra {
    display: table-cell !important;
  }
  .table-shell.is-wide-table .data-table__expander-head,
  .table-shell.is-wide-table .data-table__expander-cell,
  .table-shell.is-wide-table .data-table__details-row {
    display: none !important;
  }
}
@media (max-width: 520px) {
  .table-shell.is-stacked-table .data-table--labelled th,
  .table-shell.is-stacked-table .data-table--labelled td {
    padding: 10px 8px;
    font-size: 0.82rem;
  }
  .table-shell.is-stacked-table .data-table__expander-head,
  .table-shell.is-stacked-table .data-table__expander-cell {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
  }
  .table-shell.is-stacked-table .data-table__details-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }
}

/* Pass 82: reliable compact-table collapse and mobile CTA sizing */
.data-table__details-row[hidden],
.data-table__details-row:not(.is-open) {
  display: none !important;
}
.table-shell.is-stacked-table .data-table__details-row.is-open {
  display: table-row !important;
}
.table-shell.is-stacked-table .data-table__expand-row {
  touch-action: manipulation;
}

@media (max-width: 820px) {
  .page-header__actions,
  .panel__actions,
  .panel__head > :last-child,
  .table-actions,
  .quick-action-grid,
  .report-card__actions,
  .integration-card__actions,
  .admin-actions-row,
  .empty-state__actions {
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .page-header__actions,
  .panel__actions,
  .panel__head > :last-child,
  .table-actions,
  .integration-card__actions,
  .admin-actions-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .page-header__actions .button,
  .page-header__actions button:not(.icon-button),
  .panel__actions .button,
  .panel__head > :last-child .button,
  .table-actions .button,
  .quick-action-grid .button,
  .report-card .button,
  .integration-card__actions .button,
  .admin-actions-row .button,
  .empty-state__actions .button {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: auto !important;
    flex: 0 1 auto !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  .page-header__actions .button:only-child,
  .panel__actions .button:only-child,
  .table-actions .button:only-child,
  .quick-action-grid .button:only-child,
  .report-card .button:only-child,
  .admin-actions-row .button:only-child {
    flex: 0 1 auto !important;
  }

  .quick-action-grid {
    display: flex !important;
    flex-wrap: wrap !important;
  }

  .quick-action-grid .button {
    flex: 1 1 min(190px, 100%) !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .page-header__actions .button,
  .page-header__actions button:not(.icon-button),
  .panel__actions .button,
  .panel__head > :last-child .button,
  .table-actions .button,
  .quick-action-grid .button,
  .report-card .button,
  .integration-card__actions .button,
  .admin-actions-row .button,
  .empty-state__actions .button {
    flex: 1 1 calc(50% - 8px) !important;
    min-height: 40px !important;
    padding: 9px 12px !important;
    font-size: 0.88rem !important;
  }

  .page-header__actions .button:only-child,
  .panel__actions .button:only-child,
  .table-actions .button:only-child,
  .quick-action-grid .button:only-child,
  .report-card .button:only-child,
  .admin-actions-row .button:only-child {
    flex-basis: auto !important;
    max-width: max-content !important;
  }
}

/* Pass 83: force responsive row details to close/open from JS state only */
.data-table__details-row[hidden],
.data-table__details-row[aria-hidden="true"],
.data-table__details-row:not(.is-open) {
  display: none !important;
}
@media (max-width: 820px) {
  .table-shell.is-stacked-table .data-table__details-row.is-open:not([hidden]) {
    display: table-row !important;
  }
}

/* Pass 86: compact modal CTAs on mobile
   Keep CRUD/modal action bars visible without turning action buttons into oversized blocks. */
.crud-modal .modal__footer,
.crud-modal .modal > .modal-actions,
.modal .modal-actions {
  min-height: 0 !important;
}

.crud-modal .modal__footer .button,
.crud-modal .modal__footer button,
.crud-modal .modal > .modal-actions .button,
.crud-modal .modal > .modal-actions button,
.modal .modal-actions .button,
.modal .modal-actions button {
  min-height: 42px !important;
  max-height: 48px !important;
  height: auto !important;
  padding: 10px 16px !important;
  line-height: 1.15 !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 760px) {
  .crud-modal .modal {
    max-height: calc(100dvh - 16px) !important;
  }

  .crud-modal .modal__body {
    padding-bottom: 16px !important;
  }

  .crud-modal .modal__footer,
  .crud-modal .modal > .modal-actions,
  .modal .modal-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
  }

  .crud-modal .modal__footer .button,
  .crud-modal .modal__footer button,
  .crud-modal .modal > .modal-actions .button,
  .crud-modal .modal > .modal-actions button,
  .modal .modal-actions .button,
  .modal .modal-actions button {
    width: auto !important;
    min-width: 112px !important;
    max-width: 100% !important;
    flex: 0 1 auto !important;
    min-height: 42px !important;
    max-height: 48px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
  }

  .crud-modal .modal__footer .button.button--primary,
  .crud-modal .modal__footer button.button--primary,
  .crud-modal .modal__footer [data-crud-submit],
  .crud-modal .modal > .modal-actions .button.button--primary,
  .crud-modal .modal > .modal-actions button.button--primary,
  .modal .modal-actions .button.button--primary,
  .modal .modal-actions button.button--primary {
    flex: 1 1 148px !important;
    max-width: 220px !important;
  }
}

@media (max-width: 420px) {
  .crud-modal .modal__footer,
  .crud-modal .modal > .modal-actions,
  .modal .modal-actions {
    justify-content: stretch !important;
  }

  .crud-modal .modal__footer .button,
  .crud-modal .modal__footer button,
  .crud-modal .modal > .modal-actions .button,
  .crud-modal .modal > .modal-actions button,
  .modal .modal-actions .button,
  .modal .modal-actions button {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0 !important;
    max-width: none !important;
    font-size: 0.92rem !important;
  }

  .crud-modal .modal__footer [data-crud-submit],
  .crud-modal .modal__footer .button.button--primary,
  .crud-modal .modal__footer button.button--primary,
  .modal .modal-actions .button.button--primary,
  .modal .modal-actions button.button--primary {
    flex: 1 1 calc(50% - 6px) !important;
    max-width: none !important;
  }
}


/* Pass 87: extend working row toggle to Details view. */
@media (max-width: 820px) {
  .table-shell.is-stacked-table .data-table tbody tr:not(.data-table__details-row) {
    cursor: pointer;
  }
  .table-shell.is-stacked-table .data-table tbody tr:not(.data-table__details-row) a,
  .table-shell.is-stacked-table .data-table tbody tr:not(.data-table__details-row) button,
  .table-shell.is-stacked-table .data-table tbody tr:not(.data-table__details-row) .button,
  .table-shell.is-stacked-table .data-table tbody tr:not(.data-table__details-row) .icon-button {
    cursor: pointer;
  }
  .table-shell.is-wide-table .data-table__details-row,
  .table-shell:not(.is-stacked-table) .data-table__details-row {
    display: none !important;
  }
}

/* Pass 88: mobile responsive modal shell, form fields and footer CTAs */
@media (max-width: 760px) {
  .modal-backdrop,
  .crud-modal,
  [data-modal-backdrop] {
    padding: 8px !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  .modal,
  .crud-modal .modal,
  .custom-prompt .modal {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: calc(100dvh - 16px) !important;
    margin: 0 auto !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .modal__head,
  .crud-modal .modal__head {
    flex: 0 0 auto !important;
    padding: 16px 18px 12px !important;
    gap: 10px !important;
  }

  .modal__head h2,
  .modal__head h3,
  .crud-modal .modal__head h2,
  .crud-modal .modal__head h3 {
    font-size: clamp(1.2rem, 6vw, 1.55rem) !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere !important;
  }

  .modal__body,
  .crud-modal .modal__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 18px 18px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .crud-modal .field-grid,
  .crud-modal .field-grid--2,
  .modal .field-grid,
  .modal .field-grid--2,
  .modal .field-grid--4,
  .modal form .field-grid,
  .modal form .field-grid--2,
  .modal form .field-grid--4 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .modal label,
  .crud-modal label,
  .modal .field,
  .crud-modal .field,
  .modal .field--wide,
  .crud-modal .field--wide {
    width: 100% !important;
    min-width: 0 !important;
    grid-column: 1 / -1 !important;
  }

  .modal input,
  .modal select,
  .modal textarea,
  .crud-modal input,
  .crud-modal select,
  .crud-modal textarea,
  .modal .select2-container,
  .crud-modal .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .modal .rich-text-editor,
  .modal .rich-text-card,
  .modal .rich-text-shell,
  .modal .rich-text-wrap,
  .modal [data-rich-text-editor],
  .modal [data-rich-text-surface],
  .crud-modal .rich-text-editor,
  .crud-modal .rich-text-card,
  .crud-modal .rich-text-shell,
  .crud-modal .rich-text-wrap,
  .crud-modal [data-rich-text-editor],
  .crud-modal [data-rich-text-surface] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .modal .rich-text-toolbar,
  .crud-modal .rich-text-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    overflow: visible !important;
  }

  .modal .editor-assist,
  .modal .voice-assist,
  .modal .grammar-assist,
  .modal [data-editor-actions],
  .crud-modal .editor-assist,
  .crud-modal .voice-assist,
  .crud-modal .grammar-assist,
  .crud-modal [data-editor-actions] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .modal__footer,
  .modal .modal-actions,
  .crud-modal .modal__footer,
  .crud-modal .modal > .modal-actions,
  .crud-modal .modal-actions {
    flex: 0 0 auto !important;
    position: static !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 12px 18px 16px !important;
    background: linear-gradient(180deg, rgba(248,250,252,.96), #fff) !important;
    border-top: 1px solid rgba(148, 163, 184, .22) !important;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .06) !important;
  }

  .modal__footer .button,
  .modal .modal-actions .button,
  .crud-modal .modal__footer .button,
  .crud-modal .modal > .modal-actions .button,
  .crud-modal .modal-actions .button {
    width: 100% !important;
    min-height: 46px !important;
    height: auto !important;
    max-height: none !important;
    padding: 11px 16px !important;
    border-radius: 13px !important;
    font-size: .95rem !important;
    line-height: 1.25 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal__footer .button--ghost,
  .modal .modal-actions .button--ghost,
  .crud-modal .modal__footer .button--ghost,
  .crud-modal .modal-actions .button--ghost {
    background: #fff !important;
  }

  body.modal-open,
  body.has-modal-open {
    overflow: hidden !important;
  }
}

@media (max-width: 420px) {
  .modal-backdrop,
  .crud-modal,
  [data-modal-backdrop] {
    padding: 4px !important;
  }

  .modal,
  .crud-modal .modal,
  .custom-prompt .modal {
    max-height: calc(100dvh - 8px) !important;
    border-radius: 16px !important;
  }

  .modal__head,
  .crud-modal .modal__head,
  .modal__body,
  .crud-modal .modal__body {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .modal__footer,
  .modal .modal-actions,
  .crud-modal .modal__footer,
  .crud-modal .modal > .modal-actions,
  .crud-modal .modal-actions {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


/* Pass 89: default details rows are collapsed and prompt actions stay compact on mobile. */
table.data-table tbody tr.data-table__details-row:not(.is-open),
table.data-table tbody tr.data-table__details-row[aria-hidden="true"],
table.data-table tbody tr.data-table__details-row[hidden] {
  display: none !important;
}

.custom-prompt-backdrop .custom-prompt {
  max-height: calc(100dvh - 24px) !important;
  overflow-y: auto !important;
}

.custom-prompt-backdrop .custom-prompt .modal-actions {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.custom-prompt-backdrop .custom-prompt .modal-actions .button,
.custom-prompt-backdrop .custom-prompt .modal-actions button {
  width: auto !important;
  min-width: 112px !important;
  max-width: 180px !important;
  min-height: 42px !important;
  max-height: 48px !important;
  height: auto !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  flex: 0 1 auto !important;
  line-height: 1.15 !important;
}

@media (max-width: 520px) {
  .custom-prompt-backdrop {
    padding: 12px !important;
    align-items: center !important;
  }
  .custom-prompt-backdrop .custom-prompt {
    width: min(100%, 420px) !important;
    padding: 24px 22px !important;
    border-radius: 20px !important;
  }
  .custom-prompt-backdrop .custom-prompt .modal-actions {
    flex-direction: row !important;
    justify-content: stretch !important;
  }
  .custom-prompt-backdrop .custom-prompt .modal-actions .button,
  .custom-prompt-backdrop .custom-prompt .modal-actions button {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
  }
}


/* Pass 90: mobile Details view shows the primary column only.
   Remaining columns are revealed through the row expander, preventing duplicate
   stacked records and keeping CTAs inside the expanded detail area. */
@media (max-width: 820px) {
  .table-shell.is-stacked-table .data-table--responsive-details th.data-table__mobile-extra,
  .table-shell.is-stacked-table .data-table--responsive-details td.data-table__mobile-extra {
    display: none !important;
  }

  .table-shell.is-stacked-table .data-table--responsive-details th:not(.data-table__expander-head):not(.data-table__mobile-extra),
  .table-shell.is-stacked-table .data-table--responsive-details td:not(.data-table__expander-cell):not(.data-table__mobile-extra) {
    width: auto !important;
    max-width: none !important;
  }

  .table-shell.is-stacked-table .data-table--responsive-details .data-table__details-grid {
    grid-template-columns: 1fr !important;
  }

  .table-shell.is-stacked-table .data-table--responsive-details .data-table__detail-item .table-actions,
  .table-shell.is-stacked-table .data-table--responsive-details .data-table__detail-item [data-label*="Action"],
  .table-shell.is-stacked-table .data-table--responsive-details .data-table__detail-item [data-label*="action"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }
}

/* pass91: modern knowledge base */
.supportledger-help-kb .kb-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,460px);gap:1.25rem;align-items:end;background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(20,184,166,.08));}
.supportledger-help-kb .kb-hero h2{font-size:clamp(1.65rem,3vw,2.5rem);margin:.25rem 0;line-height:1.05;}
.kb-search{display:flex;gap:.65rem;align-items:center;background:#fff;border:1px solid var(--border,#dbe3ef);border-radius:18px;padding:.75rem 1rem;box-shadow:0 16px 36px rgba(15,23,42,.08);}
.kb-search input{border:0;outline:0;width:100%;font:inherit;min-height:36px;background:transparent;}
.kb-category-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem;margin:1rem 0;}
.kb-category-card{display:grid;gap:.45rem;text-align:left;background:#fff;border:1px solid var(--border,#dbe3ef);border-radius:20px;padding:1rem;color:inherit;cursor:pointer;box-shadow:0 10px 28px rgba(15,23,42,.05);}
.kb-category-card span{width:42px;height:42px;border-radius:14px;display:inline-grid;place-items:center;background:rgba(37,99,235,.10);color:#2563eb;}
.kb-category-card strong{font-size:1rem;}
.kb-category-card small{color:var(--muted,#64748b);line-height:1.45;}
.kb-category-card em{font-style:normal;color:#2563eb;font-weight:700;font-size:.82rem;}
.kb-category-card.is-active{border-color:#2563eb;box-shadow:0 16px 36px rgba(37,99,235,.16);}
.kb-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:1rem;align-items:start;}
.kb-side{display:grid;gap:1rem;}
.kb-article-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;}
.kb-article-card{border:1px solid var(--border,#dbe3ef);border-radius:20px;background:#fff;padding:1rem;display:flex;flex-direction:column;gap:.75rem;box-shadow:0 12px 30px rgba(15,23,42,.04);}
.kb-article-card__head{display:grid;gap:.25rem;}
.kb-article-card__head span{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#2563eb;font-weight:800;}
.kb-article-card__head strong{font-size:1.05rem;color:var(--text,#0f172a);}
.kb-article-card p,.kb-article-card dd{color:var(--muted,#64748b);line-height:1.5;margin:0;}
.kb-article-card details{border-top:1px solid var(--border,#e5e7eb);padding-top:.75rem;}
.kb-article-card summary{cursor:pointer;font-weight:800;color:#334155;}
.kb-article-card dl{display:grid;gap:.25rem;margin:.65rem 0 0;}
.kb-article-card dt{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;font-weight:900;}
.kb-article-card footer{margin-top:auto;display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;}
.kb-article-card footer a,.kb-article-card footer button{border:1px solid var(--border,#dbe3ef);background:#f8fafc;border-radius:999px;padding:.45rem .75rem;color:#334155;text-decoration:none;font-weight:700;font-size:.82rem;}
.kb-relation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem;}
.kb-relation-grid div{border:1px solid var(--border,#dbe3ef);border-radius:18px;padding:1rem;background:#fff;display:grid;gap:.4rem;}
.kb-relation-grid strong{color:#0f172a;}
.kb-relation-grid span{color:#64748b;line-height:1.45;}
@media(max-width:1040px){.supportledger-help-kb .kb-hero,.kb-layout{grid-template-columns:1fr;}.kb-side{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));}}
@media(max-width:640px){.kb-category-grid,.kb-article-grid,.kb-side{grid-template-columns:1fr;}.supportledger-help-kb .kb-hero{padding:1rem;border-radius:20px}.kb-article-card footer a,.kb-article-card footer button{width:100%;text-align:center;justify-content:center;}}
.public-plan-grid--four{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));}
.public-plan-grid article em{display:block;margin:-.25rem 0 .75rem;color:#2563eb;font-style:normal;font-weight:800;}

/* Pass 93: market-readiness panels for leave, portals, agreements, funding and audit. */
.sl-market-panel {
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239,246,255,0.74));
}
.sl-readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}
.sl-readiness-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 18px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.sl-readiness-card strong {
    font-size: 1.35rem;
    line-height: 1;
    color: #0f172a;
}
.sl-readiness-card span {
    font-weight: 800;
    color: #334155;
}
.sl-readiness-card small {
    color: #64748b;
    line-height: 1.4;
}
.sl-readiness-card--success { border-color: rgba(34, 197, 94, .28); background: linear-gradient(180deg, #fff, #f0fdf4); }
.sl-readiness-card--warning { border-color: rgba(245, 158, 11, .30); background: linear-gradient(180deg, #fff, #fffbeb); }
.sl-readiness-card--danger { border-color: rgba(239, 68, 68, .30); background: linear-gradient(180deg, #fff, #fef2f2); }
.sl-readiness-card--neutral { border-color: rgba(148, 163, 184, .30); background: linear-gradient(180deg, #fff, #f8fafc); }
@media (max-width: 640px) {
    .sl-readiness-grid { grid-template-columns: 1fr; }
    .sl-readiness-card { padding: 14px; border-radius: 14px; }
}

/* Pass 95: provider onboarding and release-candidate hardening refinements. */
.pass95-onboarding .setup-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.pass95-onboarding .setup-step-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
  min-width: 0;
}
.pass95-onboarding .setup-step-card:hover,
.pass95-onboarding .setup-step-card:focus-visible {
  border-color: rgba(37, 99, 235, .44);
  box-shadow: 0 18px 36px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}
.pass95-onboarding .setup-step-card span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: rgba(37, 99, 235, .10);
  color: #2563eb;
}
.pass95-onboarding .setup-step-card strong { color: #0f172a; }
.pass95-onboarding .setup-step-card small { color: #64748b; line-height: 1.45; }
.pass95-onboarding .setup-step-card em { font-style: normal; color: #2563eb; font-weight: 800; font-size: .82rem; }
@media (max-width: 640px) {
  .pass95-onboarding .setup-step-grid { grid-template-columns: 1fr; }
  .pass95-onboarding .setup-step-card { padding: 14px; border-radius: 14px; }
}

/* Pass102: provider billing plan choices */
.plan-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.plan-choice-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 16px;
    padding: 1rem;
    background: var(--surface, #fff);
    display: flex;
    flex-direction: column;
    gap: .7rem;
    min-width: 0;
}
.plan-choice-card.is-current {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}
.plan-choice-card strong { display: block; font-size: 1rem; }
.plan-choice-card small { display: block; color: var(--muted, #64748b); overflow-wrap: anywhere; }
.plan-choice-card p { margin: 0; font-weight: 700; }
.plan-choice-card form { margin-top: auto; }
.plan-choice-card .button { width: 100%; justify-content: center; }
@media (max-width: 640px) {
    .plan-choice-grid { grid-template-columns: 1fr; }
    .plan-choice-card { padding: .85rem; }
    .plan-choice-card .button { width: auto; max-width: 100%; }
}

/* Pass103: billing launch loop readiness */
.billing-readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .9rem;
    margin-top: 1rem;
}
.billing-readiness-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    padding: .95rem;
    background: var(--surface, #fff);
    min-width: 0;
}
.billing-readiness-card strong {
    display: block;
    color: var(--text, #0f172a);
    font-size: 1rem;
}
.billing-readiness-card span {
    display: block;
    color: var(--text-muted, #475569);
    font-weight: 700;
    margin-top: .2rem;
}
.billing-readiness-card small {
    display: block;
    color: var(--muted, #64748b);
    margin-top: .35rem;
    overflow-wrap: anywhere;
}
.billing-readiness-card--success { border-color: rgba(16, 185, 129, .35); background: rgba(16, 185, 129, .06); }
.billing-readiness-card--danger { border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .06); }
.billing-readiness-card--neutral { border-color: rgba(100, 116, 139, .28); background: rgba(100, 116, 139, .06); }
@media (max-width: 640px) {
    .billing-readiness-grid { grid-template-columns: 1fr; }
    .billing-readiness-card { padding: .85rem; }
}

/* Admin Stripe package manager: DataTable register plus modal editor. */
.admin-stripe-package-panel {
    overflow: hidden;
}
.admin-stripe-package-panel .client-table {
    margin-top: 1rem;
}
.admin-stripe-config-form .field-grid {
    align-items: stretch;
}
.admin-stripe-config-form .field {
    min-width: 0;
}
.admin-stripe-config-form .field > span,
.admin-stripe-config-form .field small {
    overflow-wrap: anywhere;
    word-break: normal;
}
.admin-stripe-config-form .field input,
.admin-stripe-config-form .field select,
.admin-stripe-config-form .field .select2-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
@media (max-width: 1180px) {
    .admin-stripe-config-form .field-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 720px) {
    .admin-stripe-config-form .field-grid,
    .admin-stripe-config-form .field-grid--2,
    .admin-stripe-config-form .field-grid--3,
    .admin-stripe-config-form .field-grid--4 {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .admin-stripe-config-form .field > span {
        display: block;
        line-height: 1.25;
    }
}
.stripe-package-row-actions,
.stripe-package-toggles {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
}
.stripe-package-row-actions form {
    margin: 0;
}
.stripe-package-row-actions .icon-button {
    flex: 0 0 auto;
}
.admin-stripe-package-modal .modal {
    width: min(1080px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 40px);
    overflow: hidden;
}
.stripe-package-modal-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.stripe-package-modal-form .modal__body {
    display: grid;
    gap: 1rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}
.stripe-package-modal-form textarea {
    min-height: 110px;
}
.admin-stripe-package-modal .stripe-package-modal-form .modal__footer {
    width: 100% !important;
    box-sizing: border-box;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 16px 28px 20px !important;
    border-top: 1px solid rgba(148, 163, 184, .22) !important;
    background: linear-gradient(180deg, rgba(248, 250, 252, .96), #fff) !important;
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .06) !important;
}
.admin-stripe-package-modal .stripe-package-modal-form .modal__footer .button {
    width: auto !important;
    min-width: 140px !important;
    flex: 0 0 auto !important;
    white-space: nowrap;
}
@media (max-width: 860px) {
    .admin-stripe-package-modal .modal {
        width: calc(100vw - 16px);
    }
    .stripe-package-row-actions {
        gap: .45rem;
    }
}
@media (max-width: 640px) {
    .admin-stripe-package-modal .stripe-package-modal-form .modal__footer {
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        padding: 14px 18px 18px !important;
    }
    .admin-stripe-package-modal .stripe-package-modal-form .modal__footer .button {
        width: 100% !important;
    }
}
/* Merchant Oversight: provider database assignment inspector */
.merchant-accounts-table-panel .data-table th:last-child,
.merchant-accounts-table-panel .data-table td:last-child {
  width: 570px !important;
  min-width: 570px !important;
  max-width: 570px !important;
  vertical-align: top;
}

.merchant-accounts-table-panel .data-table td:last-child .table-actions {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: visible !important;
}

.merchant-accounts-table-panel .data-table td:last-child .table-actions > * {
  margin: 0;
}

.merchant-accounts-table-panel .tenant-assignment-details:not([open]) {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

.tenant-assignment-details {
  width: min(430px, 100%);
}

.tenant-assignment-details > summary {
  list-style: none;
  cursor: pointer;
  width: max-content;
}

.tenant-assignment-details__summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 9px;
  background: var(--surface, #fff);
  color: var(--text, #111827);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.tenant-assignment-details__summary:hover {
  border-color: var(--primary, #2563eb);
  color: var(--primary, #2563eb);
}

.tenant-assignment-details > summary::-webkit-details-marker {
  display: none;
}

.tenant-assignment-details[open] {
  flex-basis: 100%;
}

.tenant-assignment-details__body {
  min-width: min(390px, calc(100vw - 80px));
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--border-color, #d9e2ec);
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 14px 34px rgba(15, 42, 67, .12);
}

.tenant-assignment-details[open] .tenant-assignment-details__body {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 2500;
  width: min(860px, calc(100vw - 48px));
  max-height: calc(100vh - 112px);
  margin: 0;
  overflow: auto;
  transform: translateX(-50%);
}

.tenant-assignment-details__body h4 {
  margin: 0 0 10px;
}

.provider-pricing-details__body {
  position: relative;
}

.provider-pricing-details__body > .modal__close {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
}

.provider-pricing-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border-color, #d9e2ec);
  border-radius: 14px;
  background: rgba(248, 250, 252, .88);
}

.provider-pricing-form__head strong,
.provider-pricing-form__head small {
  display: block;
}

.provider-pricing-form__head small {
  margin-top: 3px;
  color: var(--muted, #627d98);
}

.provider-pricing-form textarea {
  resize: vertical;
}

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

.tenant-assignment-details__grid > div {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(241, 245, 249, .78);
}

.tenant-assignment-details__grid span,
.tenant-assignment-details__grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.tenant-assignment-details__grid span {
  margin-bottom: 3px;
  color: var(--muted, #627d98);
  font-size: .75rem;
}

.tenant-assignment-details__grid strong {
  color: var(--text, #243b53);
  font-size: .82rem;
}

@media (max-width: 720px) {
  .merchant-accounts-table-panel .data-table th:last-child,
  .merchant-accounts-table-panel .data-table td:last-child {
    width: 470px !important;
    min-width: 470px !important;
    max-width: 470px !important;
  }

  .merchant-accounts-table-panel .data-table td:last-child .table-actions {
    flex-wrap: wrap !important;
  }

  .tenant-assignment-details {
    width: 100%;
  }

  .tenant-assignment-details__body {
    min-width: min(310px, calc(100vw - 48px));
  }

  .tenant-assignment-details[open] .tenant-assignment-details__body {
    top: 70px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 84px);
  }

  .tenant-assignment-details__grid {
    grid-template-columns: 1fr;
  }
}
.crud-modal[data-entity="participant"] .modal {
  width: min(920px, calc(100vw - 32px));
}

.crud-modal[data-entity="participant"] .modal__body {
  min-height: 420px;
}

.crud-wizard {
  display: grid;
  gap: 24px;
  width: 100%;
}

.crud-wizard__nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crud-wizard__nav li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-muted, #667085);
  background: var(--surface-soft, #f5f7fa);
  font-size: .85rem;
  font-weight: 700;
}

.crud-wizard__nav li > span {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.crud-wizard__nav li.is-active {
  color: var(--primary, #2446a8);
  background: #eef3ff;
}

.crud-wizard__nav li.is-complete {
  color: #157f3d;
  background: #edf9f1;
}

.crud-wizard__step[hidden] {
  display: none !important;
}

.crud-wizard__notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #315071;
  background: #f2f6fc;
  font-size: .9rem;
}

.onboarding-section-heading {
  margin-top: 18px;
  padding: 12px 16px;
  border-left: 4px solid #315e49;
  border-radius: 8px;
  background: #edf5ef;
}

.onboarding-section-heading h4 {
  margin: 0;
  color: #244d39;
  font-size: 1rem;
}

.onboarding-note-group {
  display: block;
  margin-top: 12px;
  border: 1px solid #cfdecf;
  border-radius: 10px;
  background: #fff;
}

.onboarding-note-group summary {
  padding: 14px 16px;
  color: #244d39;
  background: #edf5ef;
  font-weight: 700;
  cursor: pointer;
}

.onboarding-note-group > .field-grid {
  padding: 16px;
}

.onboarding-signature canvas {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 8px 0;
  border: 1px solid #b8c9d7;
  border-radius: 8px;
  background: #fff;
  cursor: crosshair;
}

.field-confidential {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid #bfd1ff;
  border-radius: 999px;
  color: #315fae;
  background: #f2f6ff;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: middle;
}

.field-confidential .icon {
  font-size: .65rem;
}

.crud-modal[data-entity="participant"] .modal__footer [data-crud-submit][hidden],
.crud-modal[data-entity="participant"] .modal__footer [data-wizard-next][hidden],
.crud-modal[data-entity="participant"] .modal__footer [data-wizard-previous][hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .crud-wizard__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crud-wizard__nav li {
    padding: 8px;
    font-size: .78rem;
  }
}
