:root {
  --sw-primary: #2563eb;
  --sw-primary-dark: #1d4ed8;
  --sw-bg: #f8fafc;
  --sw-surface: #ffffff;
  --sw-surface-soft: #eff6ff;
  --sw-border: #e5e7eb;
  --sw-text: #0f172a;
  --sw-text-muted: #475569;
  --sw-success: #22c55e;
  --sw-warning: #f59e0b;
  --sw-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --sw-radius-lg: 24px;
  --sw-radius-md: 18px;
  --sw-radius-sm: 12px;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f8fafc 38%, #f1f5f9 100%);
  color: var(--sw-text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.auth-page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-page-brand {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
}

.brand-link-dark {
  color: var(--sw-text);
}

.brand-link-dark small {
  color: var(--sw-text-muted);
}

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

.auth-inline-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--sw-primary-dark);
}

.auth-demo-callout {
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--sw-radius-md);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(191, 219, 254, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-demo-callout h2 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.1rem;
}

.auth-demo-callout p {
  margin: 0;
  color: var(--sw-text-muted);
}

.auth-demo-callout form {
  margin: 0;
  flex-shrink: 0;
}

.auth-demo-callout .btn-sw-secondary {
  min-width: 9rem;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.18);
}

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

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  padding: 1.5rem;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-link {
  display: flex;
  align-items: center;
  color: #fff;
}

.brand-logo {
  display: block;
  height: auto;
  max-width: 100%;
}

.brand-logo-auth {
  width: min(260px, 60vw);
}

.brand-logo-sidebar {
  width: 188px;
}

.brand-logo-mobile {
  width: 148px;
}

.brand-logo-offcanvas {
  width: 148px;
}

.mobile-brand-link {
  display: inline-flex;
  align-items: center;
}

.sidebar-workspace {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: var(--sw-radius-md);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.sidebar-workspace h2 {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.15rem;
  color: #fff;
}

.sidebar-kicker,
.page-eyebrow,
.summary-label,
.panel-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
}

.sidebar-kicker {
  color: #93c5fd;
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  font-size: 0.82rem;
  font-weight: 600;
}

.sidebar-nav {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.35rem;
}

.sidebar-link {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  color: #cbd5e1;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: rgba(148, 163, 184, 0.14);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(29, 78, 216, 0.64));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.2);
}

.sidebar-link-secondary {
  opacity: 0.86;
  font-size: 0.96rem;
}

.sidebar-link-placeholder::after {
  content: "Soon";
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.sidebar-footer {
  margin-top: auto;
}

.sidebar-tip {
  padding: 1rem;
  border-radius: var(--sw-radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.sidebar-tip strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #fff;
}

.sidebar-tip span {
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.mobile-bar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0;
}

.mobile-brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.mobile-menu-button {
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: var(--sw-primary-dark);
  font-weight: 700;
}

.mobile-workspace {
  color: var(--sw-text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dev-link-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: var(--sw-radius-sm);
  background: rgba(239, 246, 255, 0.95);
}

.dev-link-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.dev-link-card p {
  margin: 0 0 0.9rem;
  color: var(--sw-text-muted);
}

.public-checkin-card {
  margin-top: 1rem;
}

.checkin-prep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.checkin-task-list {
  display: grid;
  gap: 0.85rem;
}

.checkin-task-item {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 420px);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--sw-radius-md);
  background: rgba(255, 255, 255, 0.9);
}

.checkin-task-main {
  min-width: 0;
}

.checkin-task-toggle {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
}

.checkin-task-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkin-task-circle {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid rgba(71, 85, 105, 0.72);
  background: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.checkin-task-toggle input:checked + .checkin-task-circle {
  background: var(--sw-primary);
  border-color: var(--sw-primary);
}

.checkin-task-toggle input:checked + .checkin-task-circle::before {
  content: "\2713";
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
}

.checkin-task-copy strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.checkin-task-copy p,
.checkin-task-checkbox span {
  margin: 0;
  color: var(--sw-text-muted);
  line-height: 1.5;
}

.checkin-task-input {
  min-width: 0;
}

.task-input-muted {
  display: flex;
  justify-content: flex-end;
}

.checkin-task-item.is-checked {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.95);
}

.checkin-task-item .form-control:disabled {
  background: rgba(248, 250, 252, 0.9);
  color: var(--sw-text-muted);
}

.checkin-task-item {
  grid-template-columns: minmax(0, 2fr) minmax(240px, 420px);
  align-items: center;
}

.checkin-task-input {
  min-width: 0;
}

.progress-trend {
  min-height: 0;
}

@media (max-width: 768px) {
  .checkin-prep-grid {
    grid-template-columns: 1fr;
  }

  .checkin-task-item {
    grid-template-columns: 1fr;
  }

  .checkin-task-input {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .public-checkin-shell {
    padding-top: 3rem;
  }

  .public-checkin-shell .public-checkin-article {
    padding: 2rem;
  }
}

.checkin-task-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--sw-text);
}

.celebration-state {
  border-style: solid;
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.92), rgba(239, 246, 255, 0.92));
}

.progress-shell {
  display: grid;
  gap: 0.75rem;
}

.progress-track {
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #2563eb);
}

.challenge-details-panel {
  margin-top: 1rem;
}

.owner-task-home-card {
  margin-bottom: 1rem;
}

.owner-log-setup-card {
  margin-bottom: 1rem;
  background: rgba(248, 250, 252, 0.92);
}

.owner-prep-grid {
  margin-bottom: 0;
}

.challenge-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.challenge-details-summary::-webkit-details-marker {
  display: none;
}

.challenge-details-summary strong {
  display: block;
  margin-top: 0.2rem;
}

.external-link-list {
  margin-top: 1rem;
}

.external-link-item {
  padding: 1rem;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-border);
  background: rgba(248, 250, 252, 0.9);
  box-shadow: none;
}

.external-link-url {
  margin: 0.85rem 0;
}

.compact-form-block {
  margin-top: 1rem;
}

.page-shell {
  padding: 1rem 1rem 2rem;
}

.content-container {
  max-width: 1320px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.page-eyebrow {
  color: var(--sw-primary);
}

.page-header h1 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 700;
  line-height: 1.05;
}

.page-description {
  max-width: 48rem;
  margin: 0;
  color: var(--sw-text-muted);
  font-size: 1rem;
}

.page-header-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.75rem;
  min-height: 3rem;
  flex-wrap: wrap;
}

.workspace-switch-form {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 220px;
}

.workspace-switch-label {
  color: var(--sw-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  padding-left: 0.1rem;
}

.workspace-switch-select {
  min-width: 220px;
  min-height: 3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  line-height: 1.2;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  padding-right: 2.5rem;
}

.logout-form {
  margin: 0;
}

.logout-form .btn-sw-secondary,
.page-header-actions > .btn-sw-secondary,
.page-header-actions > .btn-sw-primary {
  min-height: 3rem;
  min-width: 8.5rem;
}

.page-context {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.context-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--sw-primary-dark);
  font-size: 0.84rem;
  font-weight: 700;
}

.context-pill-muted {
  background: rgba(15, 23, 42, 0.06);
  color: var(--sw-text-muted);
}

.surface-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--sw-radius-lg);
  box-shadow: var(--sw-shadow);
}

.btn-sw-primary,
.btn-sw-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn-with-icon {
  gap: 0.35rem;
}

.btn-icon {
  line-height: 1;
}

.btn-sw-primary {
  border: none;
  background: linear-gradient(135deg, var(--sw-primary), var(--sw-primary-dark));
  color: #fff;
}

.btn-sw-secondary {
  border: 1px solid var(--sw-border);
  background: rgba(255, 255, 255, 0.88);
  color: var(--sw-text);
}

.btn-sw-primary:hover,
.btn-sw-primary:focus-visible {
  background: linear-gradient(135deg, var(--sw-primary-dark), #1e40af);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

.btn-sw-secondary:hover,
.btn-sw-secondary:focus-visible {
  border-color: rgba(37, 99, 235, 0.28);
  background: rgba(239, 246, 255, 0.92);
  color: var(--sw-primary-dark);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.btn-sw-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn-sw-danger:hover,
.btn-sw-danger:focus-visible {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  color: #fff;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
  transform: translateY(-1px);
}

.btn-sw-small {
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
}

.page-header-actions .btn-sw-primary,
.page-header-actions .btn-sw-secondary,
.page-header-actions .logout-form .btn-sw-secondary {
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}

.offcanvas {
  background: #0f172a;
  color: #e2e8f0;
}

.offcanvas-title {
  margin: 0;
}

.offcanvas .btn-close {
  filter: invert(1);
}

.sidebar-workspace-mobile {
  margin-top: 0;
  margin-bottom: 1rem;
}

.sidebar-nav-mobile .sidebar-link {
  color: #e2e8f0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-badge-info {
  background: rgba(37, 99, 235, 0.12);
  color: var(--sw-primary-dark);
}

.status-badge-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.dashboard-grid {
  display: grid;
  gap: 1.1rem;
}

.toolbar-card,
.members-table-card,
.form-card {
  padding: 1.25rem;
}

.members-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: end;
}

.payments-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 1fr) minmax(180px, 0.75fr) auto;
  gap: 1rem;
  align-items: end;
}

.members-toolbar-actions,
.form-actions,
.table-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.small-note {
  margin: 0;
  font-size: 0.82rem;
}

.activity-toolbar-intro {
  margin-bottom: 0;
}

.activity-toolbar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.activity-primary-actions {
  justify-content: flex-end;
  align-items: center;
  flex: 0 0 auto;
}

.activity-filter-actions {
  align-items: flex-end;
  justify-content: flex-start;
}

.activity-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.missing-grid-card {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.94));
}

.missing-grid-card-calm {
  border-color: rgba(34, 197, 94, 0.18);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.9), rgba(255, 255, 255, 0.96));
}

.missing-today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.missing-member-card {
  padding: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--sw-radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.missing-member-card .dashboard-inline-actions {
  margin-top: 1rem;
}

.missing-member-program {
  margin: 0.45rem 0 0;
  font-weight: 700;
  color: var(--sw-text);
}

.table-actions-center {
  justify-content: center;
}

.table-cell-center {
  text-align: center;
}

.inline-post-form {
  display: inline-flex;
  margin: 0;
}

.toolbar-copy h3 {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
}

.toolbar-copy-spaced {
  margin-bottom: 1rem;
}

.toolbar-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.toolbar-header-actions {
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.members-alert {
  border-radius: var(--sw-radius-md);
  border: 1px solid rgba(34, 197, 94, 0.2);
  background: rgba(240, 253, 244, 0.9);
  color: #166534;
}

.panel-header-tight {
  margin-bottom: 1rem;
}

.panel-card-emphasis {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.08);
}

.panel-card-compact {
  padding: 0.95rem 1rem;
}

.members-table {
  margin-bottom: 0;
}

.members-table thead th {
  border-bottom: 1px solid var(--sw-border);
  color: var(--sw-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.members-table tbody td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-color: var(--sw-border);
  vertical-align: middle;
}

.members-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.28);
}

.table-primary-link {
  font-weight: 700;
  color: var(--sw-primary-dark);
}

.table-secondary-text {
  margin-top: 0.3rem;
  color: var(--sw-text-muted);
  font-size: 0.9rem;
}

.table-stack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-notes {
  min-width: 16rem;
  max-width: 22rem;
  color: var(--sw-text-muted);
  line-height: 1.5;
}

.payment-amount {
  font-weight: 700;
  color: var(--sw-text);
}

.empty-list-state {
  margin-top: 0.5rem;
}

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

.member-form-full {
  grid-column: 1 / -1;
}

.validation-summary {
  margin-bottom: 1rem;
}

.form-intro {
  max-width: 40rem;
  margin: 0.45rem 0 0;
  color: var(--sw-text-muted);
}

.field-hint {
  margin-top: 0.35rem;
  color: var(--sw-text-muted);
  font-size: 0.86rem;
}

.auth-shell {
  width: min(100%, 760px);
}

.auth-card {
  padding: 1.6rem;
}

.auth-card-compact {
  width: min(100%, 520px);
}

.public-checkin-shell {
  display: flex;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.public-checkin-shell .public-checkin-article {
  width: min(100%, 1040px);
}

.public-checkin-shell .public-task-card {
  width: 100%;
}

.auth-header h1 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
}

.auth-header p {
  margin: 0;
  color: var(--sw-text-muted);
  line-height: 1.6;
}

.auth-form-grid {
  display: grid;
  gap: 1rem;
}

.auth-section-title {
  margin-top: 0.35rem;
}

.settings-check-inline {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin: 1rem 0 0;
}

.settings-preferences {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sw-border);
}

.settings-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius-md);
  background: rgba(248, 250, 252, 0.9);
}

.settings-toggle strong {
  display: block;
  margin-bottom: 0.2rem;
}

.settings-toggle small {
  color: var(--sw-text-muted);
  line-height: 1.5;
}

.settings-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.settings-advanced {
  padding: 0;
  overflow: hidden;
}

.settings-advanced-summary {
  display: block;
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 1.5rem;
}

.settings-advanced-summary::-webkit-details-marker {
  display: none;
}

.settings-advanced[open] .settings-advanced-summary {
  border-bottom: 1px solid var(--sw-border);
}

.settings-advanced-body {
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.settings-subsection {
  margin: 0;
}

.settings-admin-card {
  padding: 1.1rem;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius-md);
  background: rgba(248, 250, 252, 0.9);
}

.settings-admin-card h3 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.1rem;
}

.settings-admin-card p:not(.panel-kicker) {
  margin: 0;
  color: var(--sw-text-muted);
  line-height: 1.55;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1rem;
}

.detail-summary-card {
  grid-row: span 2;
}

.detail-summary-card-no-span {
  grid-row: auto;
}

.detail-grid-span-full {
  grid-column: 1 / -1;
}

.detail-list {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.member-detail-row-list {
  gap: 0.55rem;
}

.member-detail-row-list div {
  padding-bottom: 0.8rem;
}

.member-detail-row-list dt {
  margin-bottom: 0.22rem;
}

.detail-quick-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-stat-card {
  padding: 0.9rem 1rem;
  border-radius: var(--sw-radius-md);
  background: var(--sw-surface-soft);
}

.detail-stat-card span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--sw-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-stat-card strong {
  font-size: 1rem;
}

.detail-list div {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sw-border);
}

.detail-list div:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.detail-list dt {
  margin-bottom: 0.3rem;
  color: var(--sw-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-list dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.member-detail-row-list dd {
  font-size: 0.98rem;
}

.detail-notes {
  margin: 0;
  color: var(--sw-text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.compact-empty-state {
  padding: 1rem;
}

.program-summary-note {
  padding: 1rem;
  border-radius: var(--sw-radius-md);
  background: rgba(239, 246, 255, 0.7);
}

.program-summary-note strong {
  display: block;
  margin-bottom: 0.35rem;
}

.program-summary-note p {
  margin: 0;
  color: var(--sw-text-muted);
  line-height: 1.55;
}

.program-summary-meta {
  margin-top: 0.45rem !important;
}

.inline-status {
  color: var(--sw-primary-dark);
  font-weight: 700;
}

.assignment-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.program-invite-card .assignment-form-row {
  grid-template-columns: minmax(180px, 240px) auto;
  gap: 0.75rem;
  align-items: end;
}

.program-invite-card .assignment-select {
  max-width: 15rem;
}

.program-invite-card .empty-state {
  margin-top: 1rem;
}

.invite-links-table-wrap {
  margin-top: 1rem;
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius-lg);
  background: var(--sw-surface);
  overflow: hidden;
}

.invite-links-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.invite-links-table thead th {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--sw-border);
  color: var(--sw-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.invite-links-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--sw-border);
  color: var(--sw-text);
  vertical-align: middle;
}

.invite-links-table tbody tr:last-child td {
  border-bottom: none;
}

.invite-links-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.35);
}

.invite-links-table thead th:first-child,
.invite-links-table tbody td:first-child {
  width: 62%;
}

.invite-links-table thead th:nth-child(2),
.invite-links-table tbody td:nth-child(2) {
  width: 120px;
  white-space: nowrap;
}

.invite-links-table thead th:last-child,
.invite-links-table tbody td:last-child {
  width: 150px;
  white-space: nowrap;
}

.program-invite-card .table-secondary-text {
  line-height: 1.45;
}

.invite-create-action .btn-sw-secondary {
  min-width: 12.5rem;
  min-height: 2.8rem;
}

.compact-row-program-members {
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
}

.participant-search-row {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(190px, 230px) minmax(320px, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1rem;
}

.participant-select-all {
  padding-bottom: 0;
}

.participant-select-all .form-check {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.participant-select-all .form-check-input {
  margin-top: 0;
}

.participant-search-label {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
}

.participant-search-label .form-label {
  margin-bottom: 0;
  white-space: nowrap;
  font-weight: 600;
}

.participant-manager-actions,
.participant-modal-header-actions,
.review-preset-actions {
  margin-top: 0;
}

.participant-manager-actions > .btn-sw-primary,
.participant-manager-actions > .btn-sw-secondary,
.participant-modal-header-actions > .btn-sw-primary,
.participant-modal-header-actions > .btn-sw-secondary,
.review-preset-actions > .btn-sw-secondary {
  min-height: 2.65rem;
}

.participant-row-clickable {
  cursor: pointer;
}

.participant-contact-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.participant-grid-table {
  border: 1px solid var(--sw-border);
  border-radius: var(--sw-radius-lg);
  background: var(--sw-surface);
  overflow: hidden;
}

.participant-data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.participant-grid-table-modal .participant-data-table {
  min-width: 640px;
}

.participant-data-table thead th {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--sw-border);
  color: var(--sw-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.participant-data-table tbody td {
  padding: 1.05rem 1rem;
  border-bottom: 1px solid var(--sw-border);
  color: var(--sw-text);
  vertical-align: middle;
  white-space: nowrap;
}

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

.participant-data-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.4);
}

.participant-row-clickable:hover a {
  color: var(--sw-primary-dark);
}

.participant-data-table thead th:first-child,
.participant-data-table tbody td:first-child {
  padding-left: 1.15rem;
}

.participant-data-table thead th:last-child,
.participant-data-table tbody td:last-child {
  padding-right: 1.15rem;
}

.participant-data-table thead th:first-child,
.participant-data-table tbody td:first-child {
  width: 96px;
}

.participant-data-table-assigned thead th:nth-child(2),
.participant-data-table-assigned tbody td:nth-child(2) {
  width: 190px;
}

.participant-data-table-assigned thead th:nth-child(3),
.participant-data-table-assigned tbody td:nth-child(3) {
  width: 280px;
}

.participant-data-table-assigned thead th:nth-child(4),
.participant-data-table-assigned tbody td:nth-child(4) {
  width: 170px;
}

.participant-data-table-assigned thead th:nth-child(5),
.participant-data-table-assigned tbody td:nth-child(5) {
  width: 190px;
}

.participant-data-table-available thead th:nth-child(4),
.participant-data-table-available tbody td:nth-child(4) {
  width: 170px;
}

.participant-data-table input.form-check-input {
  margin-top: 0;
}

.participant-modal-tools {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.participant-modal-select-all {
  margin-bottom: 0;
}

.participant-modal-search-label {
  margin: 0;
  color: var(--sw-text);
  font-weight: 600;
}

.select-search-field {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.select-search-input {
  min-height: 2.65rem;
}

.metrics-grid-spacing {
  height: 1rem;
}

.review-preset-actions {
  align-items: center;
}

.review-preset-hint {
  width: 100%;
  margin: 0 0 0.15rem;
}

.invite-actions {
  margin-top: 0;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
}

.invite-icon-button {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
}

.invite-icon-button .btn-icon {
  font-size: 1rem;
}

.dashboard-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.9rem 1rem;
}

.dashboard-action-bar h3 {
  margin: 0.35rem 0 0;
  font-size: 1.1rem;
}

.action-bar-description {
  margin: 0.45rem 0 0;
  color: var(--sw-text-muted);
  max-width: 42rem;
}

.action-bar-date {
  margin: 0.65rem 0 0;
  color: var(--sw-text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.action-bar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action-center-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.action-center-metrics div {
  padding: 0.75rem 0.85rem;
  border-radius: var(--sw-radius-md);
  background: var(--sw-surface-soft);
}

.action-center-metrics strong {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 1.3rem;
}

.action-center-metrics span {
  color: var(--sw-text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.action-bar-utility {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 110px;
}

.dashboard-section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-section-intro h2 {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
}

.dashboard-section-intro p {
  max-width: 34rem;
  margin: 0;
  color: var(--sw-text-muted);
}

.dashboard-fitness-band {
  padding: 1.25rem 1.35rem;
  display: grid;
  gap: 1rem;
}

.dashboard-signal-strip {
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.8rem;
}

.signal-strip-copy h3 {
  margin: 0.35rem 0 0;
  font-size: 1.08rem;
}

.signal-strip-meta {
  margin: 0.3rem 0 0;
  color: var(--sw-text-muted);
  line-height: 1.4;
}

.signal-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.signal-strip-grid-service {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signal-tile {
  padding: 0.9rem 0.95rem;
  border-radius: var(--sw-radius-md);
  background: rgba(239, 246, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.signal-tile span {
  display: block;
  color: var(--sw-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.signal-tile strong {
  display: block;
  margin: 0.3rem 0 0.55rem;
  font-size: 1.65rem;
}

.signal-tile p {
  margin: 0.4rem 0 0;
  color: var(--sw-text-muted);
  line-height: 1.45;
  font-size: 0.94rem;
}

.signal-tile-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(248, 113, 113, 0.08));
  border-color: rgba(239, 68, 68, 0.22);
}

.signal-tile-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(251, 191, 36, 0.08));
  border-color: rgba(245, 158, 11, 0.22);
}

.mini-sparkline {
  display: flex;
  align-items: end;
  gap: 0.25rem;
  min-height: 1.6rem;
}

.mini-sparkline span {
  flex: 1 1 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--sw-primary), #60a5fa);
  min-height: 0.3rem;
}

.mini-sparkline-success span {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.mini-sparkline-muted span {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.service-health-bar {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  min-height: 0.6rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: var(--sw-surface-soft);
  overflow: hidden;
}

.service-health-bar span {
  border-radius: 999px;
}

.service-health-open {
  background: linear-gradient(135deg, var(--sw-primary), #60a5fa);
}

.service-health-scheduled {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.service-health-overdue {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.service-health-unassigned {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.activity-list-compact {
  gap: 0.75rem;
}

.compact-feed-footer {
  margin: 0.75rem 0 0;
  color: var(--sw-text-muted);
  font-size: 0.92rem;
}

.fitness-band-copy h3 {
  margin: 0.35rem 0 0;
  font-size: 1.2rem;
}

.fitness-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.fitness-metric-card {
  padding: 1rem 1.05rem;
  border-radius: var(--sw-radius-md);
  background: rgba(239, 246, 255, 0.7);
}

.fitness-metric-card-spotlight {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(29, 78, 216, 0.94));
  color: #fff;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.18);
}

.fitness-metric-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--sw-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fitness-metric-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.85rem;
}

.fitness-metric-card p {
  margin: 0;
  color: var(--sw-text-muted);
  line-height: 1.5;
}

.fitness-metric-card.fitness-metric-card-spotlight span,
.fitness-metric-card.fitness-metric-card-spotlight p,
.fitness-metric-card.fitness-metric-card-spotlight strong {
  color: #fff;
}

.fitness-metric-card.fitness-metric-card-spotlight p {
  color: rgba(255, 255, 255, 0.92);
}

.fitness-metric-card-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(248, 113, 113, 0.1));
  border-color: rgba(239, 68, 68, 0.26);
}

.fitness-metric-card-danger span,
.fitness-metric-card-danger strong {
  color: #991b1b;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.dashboard-summary-grid-mini {
  margin-top: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.summary-card {
  padding: 1.4rem;
}

.summary-card-mini {
  padding: 1rem 1.05rem;
}

.summary-card-mini h2 {
  margin: 0.4rem 0 0.28rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.summary-card h2 {
  margin: 0.5rem 0 0.4rem;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.summary-label {
  color: var(--sw-primary);
}

.summary-meta {
  margin: 0;
  color: var(--sw-text-muted);
  line-height: 1.5;
}

.accent-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.92));
  color: #fff;
  border-color: transparent;
}

.spotlight-card {
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.16);
}

.warning-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(251, 191, 36, 0.12));
  border-color: rgba(245, 158, 11, 0.28);
}

.warning-card .summary-label {
  color: #b45309;
}

.accent-card .summary-label,
.accent-card .summary-meta {
  color: rgba(255, 255, 255, 0.84);
}

.danger-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.12));
  border-color: rgba(239, 68, 68, 0.24);
}

.danger-card .summary-label {
  color: #991b1b;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.7fr);
  gap: 1rem;
}

.dashboard-stack {
  display: grid;
  gap: 1rem;
}

.dashboard-rail {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.panel-card {
  padding: 1.25rem;
}

.dashboard-rail .panel-card {
  padding: 1rem;
}

.panel-hero {
  min-height: 100%;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h3 {
  margin: 0.35rem 0 0;
  font-size: 1.2rem;
}

.panel-header-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.panel-kicker {
  color: var(--sw-primary);
}

.panel-link,
.panel-status {
  color: var(--sw-primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  letter-spacing: 0.01em;
}

.panel-link:hover,
.panel-status:hover {
  color: var(--sw-primary-dark);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.hero-metrics div {
  padding: 1rem;
  border-radius: var(--sw-radius-md);
  background: var(--sw-surface-soft);
}

.hero-metrics strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.7rem;
}

.hero-metrics span {
  color: var(--sw-text-muted);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.activity-list {
  display: grid;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.activity-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

.activity-item p {
  margin: 0;
  color: var(--sw-text-muted);
}

.activity-bullet {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sw-primary), #60a5fa);
  box-shadow: 0 0 0 0.35rem rgba(37, 99, 235, 0.12);
}

.activity-bullet-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 0 0 0.35rem rgba(34, 197, 94, 0.14);
}

.activity-bullet-muted {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: 0 0 0 0.35rem rgba(100, 116, 139, 0.14);
}

.activity-bullet-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 0 0 0.35rem rgba(245, 158, 11, 0.16);
}

.activity-bullet-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 0 0.35rem rgba(239, 68, 68, 0.14);
}

.compact-table {
  display: grid;
  gap: 0.5rem;
}

.compact-table-scroll {
  max-height: 24rem;
  overflow: auto;
  padding-right: 0.35rem;
}

.compact-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--sw-border);
}

.compact-row-tight {
  padding: 0.55rem 0;
}

.compact-table-kpi .compact-row {
  grid-template-columns: 1fr auto;
}

.compact-row:last-child {
  border-bottom: none;
}

.compact-row-head {
  padding-top: 0;
  color: var(--sw-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compact-table-ranks .compact-row,
.compact-row-rank-head {
  grid-template-columns: 0.7fr 1.6fr 0.7fr;
}

.compact-table-payments .compact-row,
.compact-row-payment-head {
  grid-template-columns: 1.6fr 0.9fr 0.7fr;
}

.compact-table-inbox .compact-row,
.compact-row-inbox-head {
  grid-template-columns: 1.45fr 1.35fr 0.65fr;
}

.compact-table-member-notes .compact-row,
.compact-row-member-note-head {
  grid-template-columns: 1.5fr 1fr 0.8fr;
}

.compact-table-member-reminders .compact-row,
.compact-row-member-reminder-head {
  grid-template-columns: 1.5fr 0.9fr 0.7fr;
}

.compact-table-member-payments .compact-row,
.compact-row-member-payment-head {
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
}

.compact-table-member-links .compact-row,
.compact-row-member-link-head {
  grid-template-columns: 1.6fr 1.2fr 1fr;
}

.compact-table-member-requests .compact-row,
.compact-row-member-request-head {
  grid-template-columns: 1.5fr 1.1fr 0.7fr;
}

.compact-row-member-note strong,
.compact-row-member-reminder strong,
.compact-row-member-payment strong,
.compact-row-member-link strong,
.compact-row-member-request strong {
  display: block;
}

.compact-row-inbox strong {
  display: block;
}

.compact-row-inbox .status-pill {
  display: inline-flex;
  margin-bottom: 0.2rem;
}

.member-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.payment-trend-card {
  margin-top: 0.85rem;
  margin-bottom: 0.85rem;
}

.payment-trend {
  display: flex;
  align-items: end;
  gap: 0.3rem;
  min-height: 2.1rem;
  padding: 0.2rem 0.15rem 0;
}

.payment-trend span {
  flex: 1 1 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.55));
  min-height: 0.45rem;
}

.compact-row-metric-grid {
  grid-template-columns: 1.5fr 0.7fr 1fr 0.75fr;
}

.compact-secondary {
  display: block;
  margin-top: 0.2rem;
  color: var(--sw-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.member-program-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
}

.member-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  min-width: 14rem;
}

.member-week-strip-compact {
  min-width: 12rem;
}

.member-week-day {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.25rem;
  border-radius: 0.8rem;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.member-week-day-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.member-week-day-link:hover,
.member-week-day-link:focus-visible {
  color: inherit;
  text-decoration: none;
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.member-week-day.is-active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.22);
}

.member-week-label {
  color: var(--sw-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.member-week-date {
  color: var(--sw-text);
  font-size: 0.88rem;
  font-weight: 700;
}

.member-week-day.is-active .member-week-label,
.member-week-day.is-active .member-week-date {
  color: var(--sw-primary-dark);
}

.table-actions-menu {
  position: relative;
  display: inline-flex;
}

.table-menu-trigger {
  min-width: 2.35rem;
  padding-inline: 0.7rem;
  line-height: 1;
}

.table-menu-trigger.dropdown-toggle::after {
  display: none;
}

.row-action-menu {
  min-width: 12rem;
  padding: 0.45rem;
  border-radius: 1rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.row-action-menu .dropdown-item {
  border-radius: 0.75rem;
  padding: 0.65rem 0.8rem;
  font-weight: 600;
}

.row-action-menu .dropdown-item:hover,
.row-action-menu .dropdown-item:focus {
  background: rgba(37, 99, 235, 0.08);
  color: var(--sw-primary-dark);
}

.leaderboard-rank {
  display: inline-flex;
  min-width: 3rem;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--sw-primary-dark);
  font-weight: 700;
}

.leaderboard-highlight {
  display: inline-flex;
  margin-left: 0.45rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--sw-primary-dark);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.leaderboard-review-preview {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.leaderboard-review-preview-item {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.leaderboard-review-preview-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.detail-context-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pill.success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.status-pill.neutral {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-pill.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.status-pill.muted {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.empty-state {
  padding: 1.2rem;
  border-radius: var(--sw-radius-md);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.85), rgba(248, 250, 252, 0.92));
  border: 1px dashed rgba(37, 99, 235, 0.2);
}

.empty-state strong {
  display: block;
  margin-bottom: 0.45rem;
}

.empty-state p {
  margin-bottom: 1rem;
  color: var(--sw-text-muted);
  line-height: 1.55;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (min-width: 992px) {
  .app-main {
    margin-left: 290px;
  }

  .page-shell {
    padding: 2rem;
  }
}

@media (max-width: 1199.98px) {
  .dashboard-summary-grid,
  .dashboard-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-strip-grid {
    grid-template-columns: 1fr;
  }

  .fitness-metric-grid {
    grid-template-columns: 1fr;
  }

  .panel-hero {
    grid-column: 1 / -1;
  }

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

  .checkin-task-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .checkin-task-input {
    grid-column: 2;
  }

  .member-week-strip {
    min-width: 0;
  }
}

@media (max-width: 991.98px) {
  .page-header {
    flex-direction: column;
  }

  .page-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-summary-grid,
  .dashboard-main-grid,
  .hero-metrics,
  .dashboard-action-bar {
    grid-template-columns: 1fr;
  }

  .dashboard-stack,
  .dashboard-rail {
    gap: 0.85rem;
  }

  .signal-strip-grid,
  .signal-strip-grid-service {
    grid-template-columns: 1fr;
  }

  .dashboard-action-bar {
    display: grid;
  }

  .action-bar-buttons {
    width: 100%;
  }

  .action-bar-utility {
    justify-content: flex-start;
  }

  .dashboard-section-intro {
    grid-template-columns: 1fr;
  }

  .dashboard-section-intro {
    display: grid;
  }

  .member-week-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    min-width: 0;
  }

  .members-toolbar,
  .payments-toolbar,
  .member-form-grid,
  .detail-grid,
  .checkin-prep-grid,
  .assignment-form-row {
    grid-template-columns: 1fr;
  }

  .participant-search-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .participant-search-label .form-label {
    white-space: normal;
  }

  .program-invite-card .assignment-form-row {
    grid-template-columns: 1fr;
  }

  .program-invite-card .assignment-select {
    max-width: none;
  }

  .invite-create-action .btn-sw-secondary,
  .participant-manager-actions > .btn-sw-primary,
  .participant-manager-actions > .btn-sw-secondary {
    width: 100%;
  }

  .participant-modal-tools {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .toolbar-card-header,
  .settings-admin-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-card-header {
    display: grid;
  }

  .detail-summary-card {
    grid-row: auto;
  }

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

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

  .auth-page-brand {
    position: static;
    margin-bottom: 1rem;
  }

  .brand-logo-auth {
    width: min(220px, 72vw);
  }
}

@media (max-width: 575.98px) {
  .page-shell {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .page-header-actions,
  .action-bar-buttons,
  .hero-actions,
  .members-toolbar-actions,
  .form-actions,
  .table-actions {
    width: 100%;
  }

  .workspace-switch-form,
  .workspace-switch-select {
    width: 100%;
    min-width: 0;
  }

  .page-header-actions > *,
  .action-bar-buttons > *,
  .hero-actions > *,
  .members-toolbar-actions > *,
  .form-actions > *,
  .table-actions > *,
  .dashboard-inline-actions > *,
  .preset-link-row > *,
  .assignment-form-row > .assignment-action > * {
    flex: 1 1 100%;
  }

  .activity-toolbar-header {
    flex-direction: column;
  }

  .toolbar-header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .activity-primary-actions {
    width: 100%;
    justify-content: stretch;
  }

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

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

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

  .compact-row,
  .compact-row-head,
  .checkin-task-item {
    grid-template-columns: 1fr;
  }

  .checkin-task-input {
    grid-column: auto;
  }

  .compact-row-program-members {
    grid-template-columns: 1fr;
  }

  .compact-row-metric-grid {
    grid-template-columns: 1fr;
  }

  .compact-row-payment,
  .compact-row-payment-head {
    grid-template-columns: 1fr;
  }

  .member-link-actions {
    width: 100%;
  }

  .member-link-actions > * {
    flex: 1 1 100%;
  }

  .members-table-card .table-responsive {
    overflow: visible;
  }

  .leaderboard-mobile-table thead {
    display: none;
  }

  .leaderboard-mobile-table,
  .leaderboard-mobile-table tbody,
  .leaderboard-mobile-table tr,
  .leaderboard-mobile-table td {
    display: block;
    width: 100%;
  }

  .leaderboard-mobile-table tbody tr {
    margin-bottom: 0.9rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-md);
    background: rgba(248, 250, 252, 0.86);
  }

  .leaderboard-mobile-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .leaderboard-mobile-table tbody td {
    padding: 0.55rem 0;
    border: none;
  }

  .leaderboard-mobile-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    color: var(--sw-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .leaderboard-mobile-table .dashboard-inline-actions > .form-control,
  .leaderboard-mobile-table .dashboard-inline-actions > .btn-sw-secondary {
    width: 100%;
  }

  .dashboard-inline-actions,
  .preset-link-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-inline-actions > *,
  .preset-link-row > * {
    width: 100%;
  }

  .leaderboard-review-preview-item .dashboard-inline-actions > * {
    width: 100%;
  }

  .sidebar-link-placeholder::after {
    display: none;
  }
}
.preset-link-row,
.dashboard-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.preset-link-row {
    margin-bottom: 1rem;
}

.reminder-handoff-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0.3rem 0 0.2rem;
  color: var(--sw-text-muted);
  font-size: 0.92rem;
}

.reminder-handoff-meta span {
  display: inline-flex;
  align-items: center;
}

.compact-form-section {
  padding: 1rem;
  border: 1px dashed rgba(37, 99, 235, 0.18);
  border-radius: var(--sw-radius-md);
  background: rgba(248, 250, 252, 0.82);
}

.reminder-preset-card {
  margin-bottom: 1rem;
}

.reminder-handoff-card {
  margin-bottom: 0.75rem;
}

.metric-presets {
  margin-bottom: 0.9rem;
}

.metric-presets .field-hint {
  margin-bottom: 0.6rem;
}

.custom-metric-details {
  padding: 0.8rem 1rem;
  border: 1px dashed rgba(37, 99, 235, 0.2);
  border-radius: var(--sw-radius-md);
  background: rgba(248, 250, 252, 0.75);
}

.custom-metric-details > summary {
  cursor: pointer;
  font-weight: 700;
}

.custom-metric-details[open] > summary {
  margin-bottom: 0.8rem;
}

.metric-checkbox-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100%;
}

.metric-required {
  color: #b91c1c;
  font-weight: 700;
  margin-left: 0.2rem;
}

.auth-form-full {
  grid-column: 1 / -1;
}
