/* Premium ERP shell and dashboard layer. Scoped to authenticated application pages. */

.admin-shell {
  --erp-primary: #2563eb;
  --erp-primary-hover: #1d4ed8;
  --erp-primary-soft: #eef4ff;
  --erp-primary-soft-strong: #e5eeff;
  --erp-bg: #f3f7fc;
  --erp-surface: #ffffff;
  --erp-surface-soft: #f8fafc;
  --erp-sidebar: #f8fafd;
  --erp-text: #101828;
  --erp-text-secondary: #475467;
  --erp-muted: #667085;
  --erp-border: #e1e8f0;
  --erp-border-soft: #edf2f7;
  --erp-success: #12a66a;
  --erp-warning: #f59e0b;
  --erp-danger: #e5484d;
  --erp-radius-sm: 9px;
  --erp-radius-md: 12px;
  --erp-radius-lg: 14px;
  --erp-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.04);
  --tb-bg: var(--erp-bg);
  --tb-surface: var(--erp-surface);
  --tb-surface-muted: var(--erp-surface-soft);
  --tb-border: var(--erp-border);
  --tb-border-soft: var(--erp-border-soft);
  --tb-text: var(--erp-text-secondary);
  --tb-muted: var(--erp-muted);
  --tb-heading: var(--erp-text);
  --tb-primary: var(--erp-primary);
  --tb-primary-dark: var(--erp-primary-hover);
  --tb-success: var(--erp-success);
  --tb-warning: var(--erp-warning);
  --tb-danger: var(--erp-danger);
  --tb-radius: var(--erp-radius-md);
  --tb-sidebar-width: 256px;
  --tb-topbar-height: 68px;
  background: var(--tb-bg);
  color: var(--tb-text);
}

.admin-shell .app-frame {
  background: var(--tb-bg);
}

.admin-shell .app-sidebar {
  color: var(--tb-text);
  background: #fff;
  border-right: 1px solid var(--tb-border);
  box-shadow: 12px 0 30px rgba(15, 23, 42, 0.025);
  transition: width 0.22s ease, flex-basis 0.22s ease, transform 0.22s ease;
}

.admin-shell .sidebar-header {
  min-height: var(--tb-topbar-height);
  position: relative;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--tb-border-soft);
}

.admin-shell .sidebar-brand {
  max-width: calc(var(--tb-sidebar-width) - 62px);
}

.admin-shell .sidebar-brand .brand-mark,
.admin-shell .sidebar-brand .brand-initials {
  border-radius: 11px;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.admin-shell .sidebar-brand .brand-copy strong,
.admin-shell .sidebar-brand strong {
  color: #0f172a;
  letter-spacing: -0.02em;
}

.admin-shell .sidebar-brand .brand-copy small,
.admin-shell .sidebar-brand small {
  color: #64748b;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-collapse-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid var(--tb-border);
  border-radius: 9px;
  color: #64748b;
  background: #fff;
  font-size: 0.76rem;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
  outline: none;
}

.admin-shell .sidebar-nav {
  gap: 3px;
  padding: 14px 12px 18px;
  scrollbar-color: #cbd5e1 transparent;
}

.admin-shell .sidebar-groups {
  gap: 3px;
}

.admin-shell .sidebar-link {
  min-height: 42px;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #526176;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: none;
  transition: color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.admin-shell .sidebar-link i {
  color: #8190a5;
  font-size: 0.91rem;
}

.admin-shell .sidebar-link:hover {
  color: #0f172a;
  background: #f1f5f9;
  transform: none;
}

.admin-shell .sidebar-link:hover i {
  color: #2563eb;
}

.admin-shell .sidebar-link.active {
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.admin-shell .sidebar-link.active i {
  color: #2563eb;
}

.admin-shell .sidebar-child {
  min-height: 36px;
  margin-left: 7px;
  padding-block: 7px;
  border-left-color: #dbe3ee;
  border-radius: 8px;
  font-size: 0.81rem;
}

.admin-shell .sidebar-child.active {
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: none;
}

.admin-shell .sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--tb-border-soft);
}

.admin-shell .sidebar-status {
  padding: 9px 10px;
  border-color: #e2e8f0;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.76rem;
}

.admin-shell .app-topbar {
  min-height: var(--tb-topbar-height);
  padding: 11px 28px;
  border-bottom-color: #e9eef5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.015);
  backdrop-filter: blur(18px);
}

.admin-shell .topbar-search {
  max-width: 460px;
}

.admin-shell .topbar-search .form-control {
  min-height: 42px;
  padding-right: 48px;
  border-color: #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
  font-size: 0.875rem;
  box-shadow: none;
}

.admin-shell .topbar-search .form-control:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.admin-shell .topbar-search .form-control:focus {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.topbar-search-shortcut {
  position: absolute;
  top: 50%;
  right: 11px;
  padding: 2px 7px;
  border: 1px solid #dbe3ee;
  border-bottom-width: 2px;
  border-radius: 6px;
  color: #94a3b8;
  background: #fff;
  font: 600 0.72rem/1.35 Inter, sans-serif;
  transform: translateY(-50%);
}

.admin-shell .topbar-actions {
  gap: 8px;
}

.admin-shell .header-action,
.admin-shell .icon-btn {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #64748b;
}

.admin-shell .header-action:hover,
.admin-shell .header-action:focus,
.admin-shell .icon-btn:hover,
.admin-shell .icon-btn:focus {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #dbeafe;
  box-shadow: none;
  transform: none;
}

.admin-shell .quick-action-btn {
  min-height: 40px;
  padding-inline: 14px;
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
  border-radius: 10px;
  font-size: 0.82rem;
}

.admin-shell .quick-action-btn:hover,
.admin-shell .quick-action-btn:focus {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.admin-shell .user-profile.header-action {
  min-height: 42px;
  padding: 4px 10px 4px 5px;
  border-color: #e2e8f0;
  border-radius: 11px;
}

.admin-shell .user-avatar {
  color: #1d4ed8;
  background: #dbeafe;
}

.admin-shell .app-page {
  width: min(100%, 1600px);
  padding: 28px 30px 38px;
}

.admin-shell .portal-footer {
  background: #fff;
}

/* Collapsed desktop sidebar */
@media (min-width: 1200px) {
  .admin-shell.sidebar-collapsed .app-sidebar {
    width: 82px;
    flex-basis: 82px;
  }

  .admin-shell.sidebar-collapsed .sidebar-header {
    gap: 4px;
    padding-inline: 8px;
  }

  .admin-shell.sidebar-collapsed .sidebar-brand {
    max-width: 40px;
    gap: 0;
  }

  .admin-shell.sidebar-collapsed .sidebar-brand .brand-copy,
  .admin-shell.sidebar-collapsed .sidebar-brand > span:not(.brand-mark):not(.brand-logo-frame),
  .admin-shell.sidebar-collapsed .sidebar-brand > div:not(.brand-mark):not(.brand-logo-frame),
  .admin-shell.sidebar-collapsed .sidebar-link span,
  .admin-shell.sidebar-collapsed .sidebar-chevron,
  .admin-shell.sidebar-collapsed .sidebar-status span:not(.status-dot) {
    display: none;
  }

  .admin-shell.sidebar-collapsed .sidebar-nav {
    padding-inline: 10px;
  }

  .admin-shell.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: 10px;
  }

  .admin-shell.sidebar-collapsed .sidebar-link i {
    width: 20px;
    margin: 0;
  }

  .admin-shell.sidebar-collapsed .sidebar-submenu {
    display: none !important;
  }

  .admin-shell.sidebar-collapsed .sidebar-footer {
    padding-inline: 10px;
  }

  .admin-shell.sidebar-collapsed .sidebar-status {
    justify-content: center;
    padding-inline: 8px;
  }
}

/* Notification center */
.notification-center-trigger {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1rem;
}

.notification-center-menu {
  width: min(420px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 88px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.notification-center-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #edf2f7;
}

.notification-center-header > div {
  display: grid;
  gap: 2px;
}

.notification-center-header strong {
  color: #0f172a;
  font-size: 1rem;
}

.notification-center-header span {
  color: #64748b;
  font-size: 0.76rem;
}

.notification-mark-all-form {
  flex: 0 0 auto;
}

.notification-mark-all {
  padding: 3px 0;
  border: 0;
  color: #2563eb;
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.notification-mark-all:hover,
.notification-mark-all:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.notification-center-body {
  max-height: min(520px, calc(100vh - 220px));
  overflow-y: auto;
  scrollbar-width: thin;
}

.notification-group + .notification-group {
  border-top: 1px solid #edf2f7;
}

.notification-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  color: #64748b;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notification-group-heading span:last-child {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  text-align: center;
}

.notification-center-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  align-items: start;
  gap: 11px;
  padding: 11px 16px;
  color: #334155;
  text-decoration: none;
  transition: background-color 0.16s ease;
}

.notification-center-item:hover,
.notification-center-item:focus {
  color: #0f172a;
  background: #f8fafc;
}

.notification-center-item.is-read {
  opacity: 0.72;
}

.notification-category-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  font-size: 0.78rem;
}

.notification-category-alert {
  color: #dc2626;
  background: #fef2f2;
}

.notification-category-update {
  color: #2563eb;
  background: #eff6ff;
}

.notification-category-approval {
  color: #7c3aed;
  background: #f5f3ff;
}

.notification-center-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notification-center-copy strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.82rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-center-copy > span {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notification-center-copy time {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 0.69rem;
  font-weight: 600;
}

.notification-unread-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: #2563eb;
}

.notification-center-item.is-read .notification-unread-dot {
  background: transparent;
}

.notification-group-empty {
  padding: 12px 16px 16px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.notification-center-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid #edf2f7;
  color: #2563eb;
  background: #fafcff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.notification-center-footer:hover {
  color: #1d4ed8;
  background: #f5f9ff;
}

/* Admin dashboard */
.admin-dashboard {
  display: grid;
  gap: 24px;
  color: #334155;
}

.admin-dashboard .page-heading,
.admin-dashboard .kpi-grid,
.admin-dashboard .analytics-grid,
.admin-dashboard .section-grid,
.admin-dashboard .bank-cash-section {
  margin-bottom: 0;
}

.dashboard-page-heading {
  align-items: flex-end;
  margin: 0;
}

.dashboard-heading-copy {
  min-width: 0;
}

.dashboard-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 650;
}

.dashboard-breadcrumb i {
  font-size: 0.52rem;
}

.dashboard-breadcrumb strong {
  color: #64748b;
}

.dashboard-page-heading h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.75rem, 2.2vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.dashboard-page-heading p {
  max-width: 760px;
  margin: 7px 0 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.55;
}

.dashboard-heading-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.dashboard-heading-actions .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 15px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.btn-secondary-soft {
  color: #475569;
  background: #fff;
  border: 1px solid #dbe3ee;
}

.btn-secondary-soft:hover,
.btn-secondary-soft:focus {
  color: #1d4ed8;
  background: #f8fafc;
  border-color: #bfdbfe;
}

.admin-dashboard .surface,
.admin-dashboard .kpi-card,
.admin-dashboard .quick-action {
  border-color: #e2e8f0;
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025), 0 8px 24px rgba(15, 23, 42, 0.025);
}

.admin-dashboard .kpi-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 14px;
}

.admin-kpi-card {
  min-height: 150px;
  position: relative;
  padding: 18px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-kpi-card::after {
  content: "";
  width: 72px;
  height: 72px;
  position: absolute;
  top: -36px;
  right: -28px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.035;
}

.admin-kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.admin-kpi-card .kpi-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 9px;
  font-size: 0.8rem;
}

.admin-kpi-card.kpi-primary .kpi-icon {
  color: #2563eb;
  background: #eff6ff;
}

.admin-kpi-card.kpi-success .kpi-icon,
.admin-kpi-card.kpi-revenue .kpi-icon {
  color: #16a34a;
  background: #f0fdf4;
}

.admin-kpi-card.kpi-warning .kpi-icon {
  color: #d97706;
  background: #fffbeb;
}

.admin-kpi-card.kpi-danger .kpi-icon {
  color: #dc2626;
  background: #fef2f2;
}

.admin-kpi-card.kpi-neutral .kpi-icon {
  color: #7c3aed;
  background: #f5f3ff;
}

.admin-kpi-card .kpi-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.admin-kpi-card .kpi-value {
  margin-top: 5px;
  color: #0f172a;
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.admin-kpi-card .kpi-note {
  margin-top: 7px;
  color: #94a3b8;
  font-size: 0.73rem;
}

.dashboard-quick-section {
  display: grid;
  gap: 12px;
}

.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-section-heading-compact {
  margin-bottom: 0;
}

.dashboard-section-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #2563eb;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dashboard-section-heading h2,
.dashboard-finance-section > .section-title h2,
.dashboard-client-section > .section-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.admin-dashboard .quick-action-grid {
  gap: 12px;
}

.admin-dashboard .quick-action {
  min-height: 82px;
  gap: 12px;
  padding: 14px;
  color: #334155;
  box-shadow: none;
  transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-dashboard .quick-action > i:first-child {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  color: #2563eb;
  background: #eff6ff;
}

.admin-dashboard .quick-action > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.admin-dashboard .quick-action strong {
  color: #0f172a;
  font-size: 0.82rem;
}

.admin-dashboard .quick-action small {
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-dashboard .quick-action .quick-action-arrow {
  width: auto;
  height: auto;
  margin-left: auto;
  color: #cbd5e1;
  background: transparent;
  font-size: 0.7rem;
}

.admin-dashboard .quick-action:hover {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.admin-dashboard .quick-action:hover .quick-action-arrow {
  color: #2563eb;
}

.dashboard-finance-section {
  padding: 22px;
}

.dashboard-finance-section > .section-title {
  align-items: flex-end;
  margin-bottom: 18px;
}

.admin-dashboard .cash-flow-filter-bar .form-control,
.admin-dashboard .cash-flow-filter-bar .form-select {
  min-height: 38px;
  border-color: #e2e8f0;
  border-radius: 9px;
  background-color: #fff;
  font-size: 0.77rem;
}

.admin-dashboard .cash-flow-filter-bar .btn,
.admin-dashboard .cash-flow-repair-form .btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  font-size: 0.75rem;
}

.admin-dashboard .bank-cash-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.admin-dashboard .bank-cash-card {
  min-height: 128px;
  padding: 16px;
  border-color: #edf2f7;
  background: #fbfdff;
  box-shadow: none;
}

.admin-dashboard .bank-cash-card .kpi-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
}

.admin-dashboard .bank-cash-card .kpi-value {
  font-size: 1.3rem;
}

.admin-dashboard .bank-cash-detail-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.45fr);
  gap: 14px;
}

.admin-dashboard .bank-cash-chart,
.admin-dashboard .bank-breakdown-panel {
  padding: 18px;
  border-color: #edf2f7;
  border-radius: 11px;
  background: #fff;
}

.admin-dashboard .section-title h2 {
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-dashboard .analytics-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.8fr);
  gap: 16px;
}

.dashboard-chart-card {
  padding: 20px;
}

.chart-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 0.68rem;
  font-weight: 700;
}

.admin-dashboard .chart-panel {
  min-height: 245px;
}

.admin-dashboard .chart-panel canvas {
  height: 245px !important;
}

.admin-dashboard .chart-state {
  color: #94a3b8;
  font-size: 0.8rem;
}

.dashboard-activity-grid {
  gap: 16px;
}

.dashboard-activity-card {
  padding: 20px;
}

.dashboard-activity-card .notification-list {
  display: grid;
  gap: 0;
}

.dashboard-activity-card .notification-list li {
  position: relative;
  padding: 12px 0 12px 16px;
  border-color: #edf2f7;
}

.dashboard-activity-card .notification-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  top: 19px;
  left: 0;
  border-radius: 50%;
  background: #2563eb;
}

.dashboard-activity-card .notification-list .badge {
  padding: 4px 7px;
  font-size: 0.64rem;
}

.dashboard-client-section {
  padding: 0;
  overflow: hidden;
}

.dashboard-client-section > .section-title {
  margin: 0;
  padding: 20px 22px 14px;
}

.admin-dashboard .filter-bar {
  margin: 0 20px 16px;
  padding: 10px;
  border-color: #e2e8f0;
  border-radius: 11px;
  background: #f8fafc;
}

.admin-dashboard .search-field {
  min-width: 250px;
}

.admin-dashboard .search-field .form-control {
  min-height: 36px;
  border-color: #e2e8f0;
  border-radius: 9px;
  background: #fff;
  font-size: 0.78rem;
}

.admin-dashboard .filter-bar .btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-color: #dbe3ee;
  border-radius: 8px;
  color: #526176;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.admin-dashboard .filter-bar .btn-dark,
.admin-dashboard .filter-bar .btn-primary,
.admin-dashboard .filter-bar .btn-success,
.admin-dashboard .filter-bar .btn-warning,
.admin-dashboard .filter-bar .btn-danger,
.admin-dashboard .filter-bar .btn-secondary {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.dashboard-bulk-toolbar {
  align-items: center;
  justify-content: space-between;
  margin: 0 20px 12px;
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 0.76rem;
}

.dashboard-bulk-toolbar:not([hidden]) {
  display: flex;
}

.dashboard-bulk-toolbar .btn-link {
  color: #1d4ed8;
  font-size: 0.74rem;
  text-decoration: none;
}

.dashboard-client-section .table-responsive {
  max-height: 620px;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
}

.dashboard-client-section .table {
  min-width: 1180px;
}

.dashboard-client-section .table thead th {
  top: 0;
  padding: 11px 12px;
  color: #64748b;
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
  font-size: 0.65rem;
  letter-spacing: 0.055em;
}

.dashboard-client-section .table tbody td {
  padding: 13px 12px;
  border-color: #edf2f7;
  color: #475569;
  font-size: 0.78rem;
}

.dashboard-client-section .table tbody tr {
  transition: background-color 0.15s ease;
}

.dashboard-client-section .table tbody tr:hover {
  background: #fafcff;
}

.dashboard-client-section .table tbody tr.client-row-attention {
  box-shadow: inset 3px 0 0 #ef4444;
}

.dashboard-client-section .table tbody tr.client-row-warning {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.dashboard-client-section .selection-cell {
  width: 40px;
  min-width: 40px;
  text-align: center;
}

.dashboard-client-section .form-check-input {
  width: 16px;
  height: 16px;
  margin: 0;
  border-color: #cbd5e1;
  border-radius: 5px;
}

.dashboard-client-section .form-check-input:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-badge > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-paid,
.status-active {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.status-due-soon {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.status-overdue,
.status-failed {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.status-disabled {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.table-binary-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

.table-binary-state.is-positive {
  color: #15803d;
}

.table-binary-state.is-missing {
  color: #b45309;
}

.client-action-trigger {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  color: #64748b;
  background: #fff;
}

.client-action-trigger:hover,
.client-action-trigger:focus {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.client-action-menu .dropdown-menu {
  min-width: 180px;
  padding: 6px;
  border-color: #e2e8f0;
  border-radius: 11px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.client-action-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
}

.client-action-menu .dropdown-item i {
  width: 16px;
  color: currentColor;
  text-align: center;
}

.dashboard-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  color: #64748b;
  background: #fff;
  font-size: 0.74rem;
}

.dashboard-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-pagination-actions label {
  color: #94a3b8;
  font-size: 0.7rem;
}

.dashboard-pagination-actions .form-select {
  width: 64px;
  min-height: 32px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.dashboard-pagination-actions .btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-color: #e2e8f0;
  border-radius: 8px;
}

@media (max-width: 1399.98px) {
  .admin-dashboard .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-dashboard .bank-cash-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .admin-shell .app-sidebar {
    width: min(88vw, 286px);
  }

  .admin-shell .app-page {
    padding: 24px;
  }

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

@media (max-width: 991.98px) {
  .admin-dashboard .analytics-grid,
  .admin-dashboard .bank-cash-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-dashboard .bank-cash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-finance-section > .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-dashboard .bank-cash-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .admin-shell .app-topbar {
    min-height: 60px;
    padding: 9px 12px;
  }

  .admin-shell .topbar-search-shortcut,
  .admin-shell .quick-action-btn span,
  .admin-shell .user-profile-text,
  .admin-shell .user-profile.header-action > .fa-chevron-down {
    display: none;
  }

  .admin-shell .quick-action-btn {
    width: 40px;
    padding: 0;
  }

  .admin-shell .app-page {
    padding: 20px 14px 28px;
  }

  .admin-dashboard {
    gap: 20px;
  }

  .dashboard-page-heading {
    align-items: stretch;
  }

  .dashboard-heading-actions {
    width: 100%;
  }

  .dashboard-heading-actions .btn {
    flex: 1 1 0;
  }

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

  .admin-kpi-card {
    min-height: 138px;
    padding: 15px;
  }

  .dashboard-finance-section {
    padding: 16px;
  }

  .admin-dashboard .cash-flow-filter-bar,
  .admin-dashboard .bank-cash-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-dashboard .cash-flow-filter-bar .form-select,
  .admin-dashboard .cash-flow-filter-bar .form-control {
    width: 100%;
    min-width: 0;
  }

  .admin-dashboard .cash-flow-filter-bar .btn,
  .admin-dashboard .cash-flow-repair-form,
  .admin-dashboard .cash-flow-repair-form .btn {
    width: 100%;
  }

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

  .dashboard-client-section > .section-title {
    padding-inline: 16px;
  }

  .admin-dashboard .filter-bar {
    margin-inline: 14px;
    overflow-x: auto;
  }

  .admin-dashboard .filter-bar .search-field {
    min-width: 100%;
  }

  .dashboard-bulk-toolbar {
    margin-inline: 14px;
  }

  .dashboard-table-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 14px;
  }

  .dashboard-pagination-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {
  .admin-shell .header-notifications {
    gap: 0 !important;
  }

  .notification-center-menu {
    width: calc(100vw - 16px);
  }

  .notification-center-header {
    padding-inline: 14px;
  }

  .notification-center-item {
    padding-inline: 14px;
  }

  .admin-dashboard .kpi-grid,
  .admin-dashboard .bank-cash-kpi-grid,
  .admin-dashboard .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .admin-kpi-card {
    min-height: 126px;
  }

  .admin-dashboard .quick-action {
    min-height: 76px;
  }

  .admin-dashboard .cash-flow-filter-bar,
  .admin-dashboard .bank-cash-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-card,
  .dashboard-activity-card {
    padding: 16px;
  }

  .admin-dashboard .chart-panel,
  .admin-dashboard .chart-panel canvas {
    min-height: 210px;
    height: 210px !important;
  }
}

/* TekkBizz authenticated product design system */
.admin-shell,
.admin-shell .app-frame,
.admin-shell .app-content {
  background: var(--erp-bg);
}

.admin-shell .app-sidebar {
  width: var(--tb-sidebar-width);
  flex-basis: var(--tb-sidebar-width);
  color: var(--erp-text-secondary);
  background: linear-gradient(180deg, #f8fbff 0%, var(--erp-sidebar) 52%, #f3f7fc 100%);
  border-right-color: var(--erp-border);
  box-shadow: 8px 0 26px rgba(16, 24, 40, 0.035);
}

.admin-shell .sidebar-header {
  min-height: 72px;
  padding: 14px 14px 14px 18px;
  border-bottom-color: var(--erp-border);
}

.admin-shell .sidebar-brand .brand-mark,
.admin-shell .sidebar-brand .brand-initials {
  background: linear-gradient(145deg, #3b82f6, var(--erp-primary-hover));
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.admin-shell .sidebar-section-label {
  margin: 17px 10px 5px;
  color: #8a99ad;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.admin-shell .sidebar-section-label:first-child { margin-top: 3px; }
.admin-shell .sidebar-nav { padding: 13px 10px 18px; }
.admin-shell .sidebar-link { min-height: 43px; padding-inline: 12px; border-radius: var(--erp-radius-sm); color: #526176; }
.admin-shell .sidebar-link:hover { color: #183b74; background: #edf4ff; }
.admin-shell .sidebar-link:hover i { color: var(--erp-primary); }
.admin-shell .sidebar-link.active { color: var(--erp-primary-hover); background: #e8f0ff; box-shadow: inset 3px 0 0 var(--erp-primary); }
.admin-shell .sidebar-link.active i { color: var(--erp-primary); }
.admin-shell .sidebar-child { background: transparent; }
.admin-shell .sidebar-footer { border-top-color: var(--erp-border); }
.admin-shell .sidebar-status { border-color: #dbe6f2; background: rgba(255, 255, 255, 0.72); }

.admin-shell .app-topbar {
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 1025;
  padding-block: 10px;
  border-bottom-color: rgba(225, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  backdrop-filter: blur(16px);
}

.admin-shell .topbar-search .form-control { border-color: var(--erp-border); background: #f6f9fd; border-radius: 10px; }
.admin-shell .topbar-search .form-control:focus { border-color: var(--erp-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.topbar-search-shortcut { padding-inline: 6px; font-size: 0.62rem; }
.admin-shell .user-profile.header-action { border-color: transparent; background: transparent; }
.admin-shell .user-profile.header-action:hover,
.admin-shell .user-profile.header-action:focus { border-color: transparent; background: var(--erp-primary-soft); }
.admin-shell .profile-menu { border-color: var(--erp-border); border-radius: var(--erp-radius-md); box-shadow: 0 18px 42px rgba(16, 24, 40, 0.14); }
.admin-shell .profile-menu .dropdown-item { border-radius: 7px; }
.admin-shell .app-page { width: min(100%, 1500px); padding: 28px; }
.admin-shell .portal-footer { background: var(--erp-bg); }

@media (min-width: 1200px) {
  .admin-shell.sidebar-collapsed .app-sidebar { width: 74px; flex-basis: 74px; }
  .admin-shell.sidebar-collapsed .sidebar-section-label { display: none; }
}

.admin-dashboard { gap: 20px; color: var(--erp-text-secondary); }
.dashboard-page-heading { order: 1; }
.admin-dashboard > .kpi-grid { order: 2; }
.dashboard-secondary-metrics { order: 3; }
.dashboard-quick-section { order: 4; }
.admin-dashboard > .analytics-grid { order: 5; }
.dashboard-finance-section { order: 6; }
.dashboard-activity-grid { order: 7; }
.dashboard-client-section { order: 8; }

.dashboard-page-heading { align-items: flex-end; padding-bottom: 2px; }
.dashboard-page-heading h1 { color: var(--erp-text); font-size: clamp(1.8rem, 2.2vw, 2.05rem); }
.dashboard-page-heading p { margin-top: 8px; color: var(--erp-text-secondary); }
.dashboard-date-line { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--erp-muted); font-size: 0.74rem; font-weight: 600; }
.dashboard-date-line i { color: var(--erp-primary); }

.admin-dashboard .surface,
.admin-dashboard .kpi-card,
.admin-dashboard .quick-action {
  border-color: #e3e9f1;
  box-shadow: var(--erp-shadow-sm);
}

.admin-dashboard .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.admin-kpi-card { min-height: 142px; padding: 18px 19px; border-radius: var(--erp-radius-md); }
.admin-kpi-card::before { width: 36px; height: 3px; position: absolute; top: 0; left: 19px; content: ""; border-radius: 0 0 4px 4px; background: var(--erp-primary); opacity: 0.82; }
.admin-kpi-card.kpi-revenue::before { background: var(--erp-success); }
.admin-kpi-card.kpi-danger::before { background: var(--erp-danger); }
.admin-kpi-card.kpi-warning::before { background: var(--erp-warning); }
.admin-kpi-card .kpi-icon { width: 36px; height: 36px; margin-bottom: 13px; border-radius: 9px; font-size: 0.86rem; }
.admin-kpi-card.kpi-primary .kpi-icon { color: var(--erp-primary); background: var(--erp-primary-soft); }
.admin-kpi-card.kpi-revenue .kpi-icon { color: var(--erp-success); background: #ecfdf3; }
.admin-kpi-card.kpi-danger .kpi-icon { color: var(--erp-danger); background: #fff1f2; }
.admin-kpi-card.kpi-warning .kpi-icon { color: #c77700; background: #fff8e7; }
.admin-kpi-card .kpi-label { color: var(--erp-muted); font-size: 0.74rem; }
.admin-kpi-card .kpi-value { color: var(--erp-text); font-size: clamp(1.55rem, 2.1vw, 1.95rem); }
.admin-kpi-card .kpi-note { color: #8694a7; }

.dashboard-secondary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-secondary-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-right: 1px solid var(--erp-border-soft); }
.dashboard-secondary-metrics > div:last-child { border-right: 0; }
.dashboard-secondary-metrics span { color: var(--erp-muted); font-size: 0.75rem; font-weight: 600; }
.dashboard-secondary-metrics strong { color: var(--erp-text); font-size: 1rem; font-weight: 750; }

.dashboard-quick-section { padding: 15px 16px; border: 1px solid #dbe7fb; border-radius: var(--erp-radius-lg); background: linear-gradient(105deg, #eef4ff, #f5f8ff); }
.dashboard-quick-section .dashboard-section-heading { margin-bottom: 10px; }
.dashboard-quick-section .dashboard-section-eyebrow { display: none; }
.dashboard-quick-section .dashboard-section-heading h2 { font-size: 0.95rem; }
.admin-dashboard .quick-action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.admin-dashboard .quick-action { min-height: 56px; gap: 9px; padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.9); box-shadow: none; }
.admin-dashboard .quick-action > i:first-child { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; font-size: 0.72rem; }
.admin-dashboard .quick-action small { display: none; }
.admin-dashboard .quick-action .quick-action-arrow { font-size: 0.62rem; }

.admin-dashboard .analytics-grid { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.9fr); gap: 16px; }
.dashboard-chart-card { padding: 21px; border-radius: var(--erp-radius-lg) !important; }
.admin-dashboard .chart-panel { min-height: 252px; }
.admin-dashboard .chart-panel canvas { height: 252px !important; }
.admin-dashboard .chart-panel-donut { max-width: 300px; margin-inline: auto; }

.dashboard-finance-section { padding: 21px; border-radius: var(--erp-radius-lg); }
.admin-dashboard .bank-cash-kpi-grid { gap: 0; overflow: hidden; border: 1px solid var(--erp-border-soft); border-radius: var(--erp-radius-md); background: var(--erp-surface-soft); }
.admin-dashboard .bank-cash-card { min-height: 112px; padding: 15px 17px; border: 0; border-right: 1px solid var(--erp-border-soft); border-radius: 0; background: transparent; box-shadow: none; }
.admin-dashboard .bank-cash-card:last-child { border-right: 0; }
.admin-dashboard .bank-cash-card .kpi-icon { margin-bottom: 7px; }
.admin-dashboard .bank-cash-card .kpi-note { display: none; }
.admin-dashboard .bank-cash-chart,
.admin-dashboard .bank-breakdown-panel { border-color: var(--erp-border-soft); box-shadow: none; }
.admin-dashboard [data-chart-panel="cashflow"].is-empty { min-height: 128px; }
.admin-dashboard [data-chart-panel="cashflow"].is-empty canvas { height: 128px !important; }

.dashboard-activity-card { border-radius: var(--erp-radius-lg) !important; }
.dashboard-empty-state { min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.dashboard-empty-state > i { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; border-radius: 9px; color: var(--erp-primary); background: var(--erp-primary-soft); }
.dashboard-empty-state > div { display: grid; gap: 3px; }
.dashboard-empty-state strong { color: var(--erp-text); font-size: 0.8rem; }
.dashboard-empty-state span { color: var(--erp-muted); font-size: 0.72rem; }

.dashboard-client-section { border-radius: var(--erp-radius-lg) !important; }
.dashboard-table-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(125px, auto)) auto auto auto auto; align-items: center; gap: 8px; }
.admin-dashboard .filter-bar.dashboard-table-toolbar { overflow: visible; background: #f7f9fc; }
.admin-dashboard .dashboard-table-toolbar .form-select { width: auto; min-width: 0; min-height: 36px; border-color: var(--erp-border); border-radius: 9px; color: var(--erp-text-secondary); background-color: var(--erp-surface); font-size: 0.72rem; font-weight: 600; }
.admin-dashboard .dashboard-table-toolbar .btn-primary { color: #fff; background: var(--erp-primary); border-color: var(--erp-primary); }
.dashboard-filter-reset { width: 36px; justify-content: center; padding-inline: 0 !important; }
.dashboard-client-section .table thead th { color: #58677b; background: #f6f8fb; }
.dashboard-client-section .table tbody tr:hover { background: #f8fbff; }
.client-identity { min-width: 210px; display: flex; align-items: center; gap: 10px; }
.client-initial { width: 34px; height: 34px; display: inline-grid; flex: 0 0 34px; place-items: center; border-radius: 50%; color: var(--erp-primary-hover); background: var(--erp-primary-soft-strong); font-size: 0.74rem; font-weight: 800; }
.numeric-cell { color: var(--erp-text) !important; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 1399.98px) {
  .admin-dashboard .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-table-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(115px, auto)) auto auto; }
  .dashboard-table-toolbar > :nth-last-child(-n+2) { grid-row: 2; }
  .dashboard-table-toolbar > :nth-last-child(2) { grid-column: -3; }
  .dashboard-table-toolbar > :last-child { grid-column: -2; }
}

@media (max-width: 991.98px) {
  .admin-shell .app-page { padding: 20px; }
  .dashboard-secondary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-secondary-metrics > div:nth-child(2) { border-right: 0; }
  .dashboard-secondary-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--erp-border-soft); }
  .admin-dashboard .analytics-grid { grid-template-columns: 1fr; }
  .dashboard-table-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-table-toolbar .search-field { grid-column: 1 / -1; }
  .dashboard-table-toolbar > :nth-last-child(-n+2) { grid-row: auto; grid-column: auto; }
}

@media (max-width: 767.98px) {
  .admin-shell .app-sidebar { width: min(88vw, 292px); }
  .admin-shell .app-page { padding: 16px; }
  .admin-dashboard { gap: 16px; }
  .dashboard-page-heading { align-items: stretch; }
  .admin-kpi-card { min-height: 116px; padding: 13px; }
  .admin-kpi-card::before { left: 13px; }
  .admin-kpi-card .kpi-icon { width: 29px; height: 29px; margin-bottom: 9px; }
  .admin-kpi-card .kpi-value { font-size: clamp(1.18rem, 5vw, 1.55rem); }
  .admin-kpi-card .kpi-note { margin-top: 4px; font-size: 0.67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dashboard-secondary-metrics > div { padding: 11px 12px; }
  .dashboard-finance-section { padding: 16px; }
  .admin-dashboard .bank-cash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-dashboard .bank-cash-card { border-right: 0; border-bottom: 1px solid var(--erp-border-soft); }
  .admin-dashboard .bank-cash-card:nth-child(odd) { border-right: 1px solid var(--erp-border-soft); }
  .admin-dashboard .bank-cash-card:last-child { border-bottom: 0; }
  .admin-dashboard .filter-bar.dashboard-table-toolbar { display: grid; margin-inline: 12px; overflow: visible; }
  .admin-dashboard .filter-bar .search-field { min-width: 0; }
  .dashboard-client-section .table-responsive { max-height: none; padding: 0 12px 12px; border: 0; overflow: visible; }
  .dashboard-client-section .table { min-width: 0; display: block; margin: 0; }
  .dashboard-client-section .table thead { display: none; }
  .dashboard-client-section .table tbody { display: grid; gap: 10px; }
  .dashboard-client-section .table tbody tr[data-dashboard-row] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px; border: 1px solid var(--erp-border); border-radius: var(--erp-radius-md); background: var(--erp-surface); box-shadow: var(--erp-shadow-sm); }
  .dashboard-client-section .table tbody tr[hidden] { display: none !important; }
  .dashboard-client-section .table tbody td { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 0; border: 0; text-align: right !important; }
  .dashboard-client-section .table tbody td::before { content: attr(data-label); color: #8a99ad; font-size: 0.64rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
  .dashboard-client-section .selection-cell,
  .dashboard-client-section .serial-cell { display: none !important; }
  .dashboard-client-section .client-cell { grid-column: 1 / -1; justify-content: flex-start !important; padding-bottom: 10px !important; border-bottom: 1px solid var(--erp-border-soft) !important; text-align: left !important; }
  .dashboard-client-section .client-cell::before { display: none; }
  .client-identity { min-width: 0; }
  .dashboard-client-section .actions-cell { grid-column: 1 / -1; justify-content: flex-end !important; padding-top: 3px !important; }
  .dashboard-client-section .actions-cell::before { margin-right: auto; }
  .dashboard-client-section .table tbody > tr:not([data-dashboard-row]) { display: block; }
}

@media (max-width: 575.98px) {
  .admin-dashboard .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-kpi-card { min-height: 108px; padding: 12px; }
  .admin-kpi-card .kpi-label { font-size: 0.64rem; }
  .dashboard-secondary-metrics span { font-size: 0.67rem; }
  .dashboard-secondary-metrics strong { font-size: 0.88rem; }
  .admin-dashboard .quick-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-dashboard .quick-action { min-width: 0; min-height: 48px; }
  .dashboard-table-toolbar { grid-template-columns: 1fr; }
  .dashboard-table-toolbar .search-field { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-shell .app-sidebar,
  .admin-shell .sidebar-link,
  .admin-dashboard .admin-kpi-card,
  .admin-dashboard .quick-action {
    transition: none;
  }
}

/* Admin settings */
.admin-settings-page {
  width: min(100%, 1480px);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  color: var(--erp-text);
}

.settings-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 2px 4px;
}

.settings-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #92a0b4;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.settings-breadcrumb i { font-size: 0.52rem; }
.settings-breadcrumb strong { color: #53647c; font-weight: 750; }
.settings-title-row { display: flex; align-items: center; gap: 14px; }

.settings-title-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--erp-primary);
  background: linear-gradient(145deg, #edf5ff, #e2eeff);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
  font-size: 1.05rem;
}

.settings-title-row h1 {
  margin: 0;
  color: #101a2d;
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.settings-title-row p { margin: 3px 0 0; color: var(--erp-muted); font-size: 0.9rem; }

.settings-back-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid var(--erp-border);
  border-radius: 11px;
  color: #42526a;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 12px rgba(32, 54, 86, 0.04);
  font-size: 0.8rem;
  font-weight: 750;
}

.settings-back-button:hover { border-color: #b6c8e1; color: var(--erp-primary); background: #fff; }

.settings-card {
  overflow: hidden;
  border: 1px solid var(--erp-border);
  border-radius: 18px;
  background: var(--erp-surface);
  box-shadow: 0 8px 28px rgba(31, 54, 88, 0.055);
}

.settings-branding-card { padding: 24px; }
.settings-card-heading { display: flex; align-items: flex-start; gap: 13px; }
.settings-card-heading h2 { margin: 1px 0 3px; color: #142036; font-size: 1.08rem; font-weight: 800; letter-spacing: -0.018em; }
.settings-card-heading p { margin: 0; color: var(--erp-muted); font-size: 0.79rem; line-height: 1.5; }

.settings-eyebrow {
  display: block;
  color: var(--erp-primary);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.settings-section-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 11px;
  font-size: 0.92rem;
}

.settings-section-icon-blue { color: var(--erp-primary); background: var(--erp-primary-soft); }
.settings-section-icon-violet { color: #7651d6; background: #f2edff; }
.settings-section-icon-amber { color: #c57913; background: #fff5df; }

.settings-branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 28px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--erp-border-soft);
}

.settings-brand-form { min-width: 0; }
.settings-validation-summary:empty { display: none; }
.settings-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-field { min-width: 0; }
.settings-field .form-label { margin-bottom: 7px; color: #33435a; font-size: 0.75rem; font-weight: 750; }
.settings-input-wrap { position: relative; }

.settings-input-wrap > i {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  transform: translateY(-50%);
  color: #96a6ba;
  font-size: 0.82rem;
  pointer-events: none;
}

.settings-input-wrap .form-control {
  min-height: 43px;
  padding-left: 38px;
  border-color: var(--erp-border);
  border-radius: 11px;
  color: var(--erp-text);
  background: #fbfdff;
  font-size: 0.82rem;
  box-shadow: none;
}

.settings-input-wrap .form-control:focus {
  border-color: rgba(37, 99, 235, 0.5);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.settings-field-hint { display: block; margin-top: 6px; color: #8a99ad; font-size: 0.68rem; line-height: 1.4; }
.settings-logo-field { margin-top: 17px; }

.settings-upload-box {
  min-height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(200px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px dashed #bfd0e7;
  border-radius: 13px;
  background: #f8fbff;
}

.settings-upload-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--erp-primary);
  background: #eaf2ff;
}

.settings-upload-copy { min-width: 0; display: grid; gap: 2px; }
.settings-upload-copy strong { color: #24334a; font-size: 0.76rem; }
.settings-upload-copy span { overflow: hidden; color: #8796aa; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }

.settings-upload-box .form-control {
  min-width: 200px;
  padding: 5px;
  border-color: var(--erp-border);
  border-radius: 9px;
  background: #fff;
  color: #66768c;
  font-size: 0.7rem;
}

.settings-upload-box .form-control::file-selector-button {
  margin-right: 9px;
  padding: 7px 11px;
  border: 0;
  border-radius: 7px;
  color: var(--erp-primary);
  background: var(--erp-primary-soft);
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}

.settings-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 19px; }
.settings-save-note { display: flex; align-items: center; gap: 7px; color: #718197; font-size: 0.7rem; }
.settings-save-note i { color: #9aabc0; }
.settings-save-button { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding-inline: 17px; border-radius: 10px; font-size: 0.76rem; font-weight: 750; box-shadow: 0 7px 16px rgba(37, 99, 235, 0.18); }

.settings-brand-preview {
  min-width: 0;
  padding: 15px;
  border: 1px solid #d8e4f3;
  border-radius: 15px;
  background: linear-gradient(145deg, #f8fbff, #f2f7fe);
}

.settings-preview-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: #687990; font-size: 0.68rem; font-weight: 750; }
.settings-status-chip { display: inline-flex; align-items: center; gap: 5px; color: #16824d; }
.settings-status-chip i { font-size: 0.62rem; }

.settings-preview-window {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  background: linear-gradient(140deg, #172c5b 0%, #1f4bb1 60%, #2f6cef 100%);
  box-shadow: 0 13px 26px rgba(22, 57, 124, 0.18);
}

.settings-preview-glow { position: absolute; top: -75px; right: -45px; width: 180px; height: 180px; border-radius: 50%; background: rgba(120, 181, 255, 0.24); filter: blur(3px); }
.settings-preview-brand { position: relative; display: flex; align-items: center; gap: 12px; }
.settings-preview-logo-frame { width: 48px; height: 48px; overflow: hidden; display: grid; flex: 0 0 48px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 14px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 8px 20px rgba(10, 29, 68, 0.18); }
.settings-preview-logo { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.settings-preview-initials { color: var(--erp-primary-hover); font-size: 0.88rem; font-weight: 850; }
.settings-preview-copy { min-width: 0; display: grid; gap: 2px; color: #fff; }
.settings-preview-copy strong { overflow: hidden; font-size: 1rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.settings-preview-copy small { overflow: hidden; color: rgba(255, 255, 255, 0.72); font-size: 0.67rem; font-weight: 650; letter-spacing: 0.045em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.settings-preview-nav { position: relative; display: grid; gap: 7px; width: 64%; }
.settings-preview-nav span { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); }
.settings-preview-nav span:nth-child(2) { width: 78%; }
.settings-preview-nav span:nth-child(3) { width: 54%; }
.settings-preview-nav .is-active { width: 92%; background: rgba(255, 255, 255, 0.54); }
.settings-brand-preview > p { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0; color: #7d8da2; font-size: 0.66rem; }

.settings-information-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.settings-info-card { padding: 21px; }
.settings-card-heading-compact { padding-bottom: 18px; border-bottom: 1px solid var(--erp-border-soft); }
.settings-detail-list { display: grid; }
.settings-detail-row { min-height: 72px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--erp-border-soft); }
.settings-detail-row:last-child { border-bottom: 0; }
.settings-detail-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 0.78rem; }
.settings-detail-symbol-blue { color: var(--erp-primary); background: var(--erp-primary-soft); }
.settings-detail-symbol-green { color: #16945c; background: #eaf9f1; }
.settings-detail-symbol-violet { color: #7651d6; background: #f2edff; }
.settings-detail-content { min-width: 0; display: grid; gap: 2px; }
.settings-detail-content strong { color: #2b3a51; font-size: 0.76rem; font-weight: 750; }
.settings-detail-content span { color: #8a99ac; font-size: 0.67rem; }
.settings-route-group { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.settings-route-pill { display: inline-flex; padding: 5px 8px; border: 1px solid #d8e5f5; border-radius: 7px; color: #3165b8; background: #f5f9ff; font-family: var(--bs-font-monospace); font-size: 0.66rem; font-weight: 700; }
.settings-value-pill { padding: 5px 9px; border-radius: 99px; color: #53657d; background: #f1f5fa; font-size: 0.68rem; font-weight: 750; white-space: nowrap; }
.settings-status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 99px; font-size: 0.67rem; font-weight: 750; white-space: nowrap; }
.settings-status-pill.is-enabled { color: #13794a; background: #e8f8f0; }
.settings-status-pill.is-disabled { color: #a24f52; background: #fff0f0; }
.settings-config-note { display: flex; align-items: center; gap: 8px; margin: 8px -5px -5px; padding: 10px 12px; border-radius: 10px; color: #6e7f94; background: #f7f9fc; font-size: 0.67rem; }
.settings-config-note i { color: #8da0b7; }
.settings-config-note code { color: var(--erp-primary); }

@media (max-width: 1199.98px) {
  .settings-branding-layout { grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr); gap: 20px; }
  .settings-upload-box { grid-template-columns: auto minmax(0, 1fr); }
  .settings-upload-box .form-control { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 991.98px) {
  .settings-branding-layout { grid-template-columns: 1fr; }
  .settings-brand-preview { max-width: none; }
  .settings-preview-window { min-height: 180px; }
  .settings-information-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
  .admin-settings-page { gap: 15px; }
  .settings-page-header { align-items: stretch; }
  .settings-back-button { align-self: flex-end; }
  .settings-branding-card, .settings-info-card { padding: 17px; border-radius: 15px; }
  .settings-fields-grid { grid-template-columns: 1fr; }
  .settings-branding-layout { margin-top: 17px; padding-top: 17px; }
}

@media (max-width: 575.98px) {
  .settings-page-header { display: grid; }
  .settings-breadcrumb { margin-bottom: 10px; }
  .settings-title-icon { display: none; }
  .settings-title-row h1 { font-size: 1.7rem; }
  .settings-title-row p { font-size: 0.79rem; }
  .settings-back-button { justify-content: center; }
  .settings-upload-box { grid-template-columns: auto minmax(0, 1fr); }
  .settings-upload-box .form-control { min-width: 0; }
  .settings-form-footer { align-items: stretch; flex-direction: column; }
  .settings-save-button { justify-content: center; width: 100%; }
  .settings-detail-row { grid-template-columns: auto minmax(0, 1fr); padding: 12px 0; }
  .settings-detail-row > :last-child { grid-column: 2; justify-self: start; }
  .settings-route-group { justify-content: flex-start; }
}

/* Admin profile */
.admin-profile-page {
  width: min(100%, 1480px);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  color: var(--erp-text);
}

.admin-profile-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 2px 4px;
}

.profile-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #92a0b4;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-breadcrumb i { font-size: 0.52rem; }
.profile-breadcrumb strong { color: #53647c; font-weight: 750; }
.admin-profile-title-row { display: flex; align-items: center; gap: 14px; }

.admin-profile-title-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--erp-primary);
  background: linear-gradient(145deg, #edf5ff, #e2eeff);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
  font-size: 1.05rem;
}

.admin-profile-eyebrow {
  display: block;
  margin-bottom: 1px;
  color: var(--erp-primary);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-profile-title-row h1 {
  margin: 0;
  color: #101a2d;
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.admin-profile-title-row p { margin: 3px 0 0; color: var(--erp-muted); font-size: 0.86rem; }

.admin-profile-back-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid var(--erp-border);
  border-radius: 11px;
  color: #42526a;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 12px rgba(32, 54, 86, 0.04);
  font-size: 0.8rem;
  font-weight: 750;
}

.admin-profile-back-button:hover { border-color: #b6c8e1; color: var(--erp-primary); background: #fff; }
.admin-profile-validation:empty { display: none; }
.admin-profile-layout { display: grid; grid-template-columns: minmax(255px, 300px) minmax(0, 1fr); align-items: start; gap: 20px; }
.admin-profile-sidebar { position: sticky; top: 88px; display: grid; gap: 14px; }

.admin-profile-identity-card,
.admin-profile-security-card,
.admin-profile-card,
.admin-profile-actions {
  border: 1px solid var(--erp-border);
  border-radius: 18px;
  background: var(--erp-surface);
  box-shadow: 0 8px 28px rgba(31, 54, 88, 0.055);
}

.admin-profile-identity-card { position: relative; overflow: hidden; padding: 0 20px 20px; }
.admin-profile-cover { position: relative; height: 88px; margin: 0 -20px; overflow: hidden; background: linear-gradient(135deg, #172c5b 0%, #2355c4 58%, #3a7af4 100%); }
.admin-profile-cover::after { content: ""; position: absolute; right: -34px; bottom: -60px; width: 155px; height: 155px; border-radius: 50%; background: rgba(147, 197, 253, 0.22); }
.admin-profile-cover span { position: absolute; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); }
.admin-profile-cover span:first-child { top: 24px; left: 20px; width: 76px; }
.admin-profile-cover span:last-child { top: 38px; left: 20px; width: 48px; }
.admin-profile-avatar-wrap { position: relative; z-index: 1; width: max-content; margin-top: -37px; }

.admin-profile-avatar {
  width: 76px;
  height: 76px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 22px;
  object-fit: cover;
  color: var(--erp-primary-hover);
  background: linear-gradient(145deg, #edf5ff, #dceaff);
  box-shadow: 0 10px 24px rgba(31, 68, 132, 0.18);
}

.admin-profile-avatar-initials { font-size: 1.24rem; font-weight: 850; }
.admin-profile-online-dot { position: absolute; right: -2px; bottom: 3px; width: 15px; height: 15px; border: 3px solid #fff; border-radius: 50%; background: #20b46a; }
.admin-profile-identity-copy { padding: 13px 0 17px; border-bottom: 1px solid var(--erp-border-soft); }
.admin-profile-identity-copy h2 { margin: 0 0 3px; color: #17233a; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.018em; }
.admin-profile-identity-copy p { margin: 0 0 10px; overflow-wrap: anywhere; color: #75869c; font-size: 0.72rem; }

.admin-profile-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 99px;
  color: var(--erp-primary-hover);
  background: var(--erp-primary-soft);
  font-size: 0.65rem;
  font-weight: 750;
}

.admin-profile-facts { display: grid; padding-top: 7px; }
.admin-profile-facts > div { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--erp-border-soft); }
.admin-profile-facts > div:last-child { border-bottom: 0; }
.admin-profile-fact-icon { width: 30px; height: 30px; display: inline-grid; flex: 0 0 30px; place-items: center; border-radius: 9px; font-size: 0.7rem; }
.admin-profile-fact-icon.is-blue { color: var(--erp-primary); background: var(--erp-primary-soft); }
.admin-profile-fact-icon.is-green { color: #168451; background: #e9f8f0; }
.admin-profile-facts > div > span:last-child { min-width: 0; display: grid; gap: 1px; }
.admin-profile-facts small { color: #8a99ad; font-size: 0.61rem; font-weight: 700; text-transform: uppercase; }
.admin-profile-facts strong { overflow-wrap: anywhere; color: #33435a; font-size: 0.69rem; font-weight: 750; }

.admin-profile-security-card { display: flex; align-items: flex-start; gap: 11px; padding: 15px; background: linear-gradient(145deg, #fbfdff, #f5f9ff); }
.admin-profile-security-icon { width: 32px; height: 32px; display: inline-grid; flex: 0 0 32px; place-items: center; border-radius: 9px; color: #7353cb; background: #f0ebff; font-size: 0.72rem; }
.admin-profile-security-card strong { display: block; margin-bottom: 3px; color: #35445a; font-size: 0.71rem; }
.admin-profile-security-card p { margin: 0; color: #8796aa; font-size: 0.63rem; line-height: 1.45; }

.admin-profile-editor { min-width: 0; display: grid; gap: 16px; }
.admin-profile-card { padding: 22px; }
.admin-profile-card-heading { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--erp-border-soft); }
.admin-profile-section-icon { width: 36px; height: 36px; display: inline-grid; flex: 0 0 36px; place-items: center; border-radius: 10px; font-size: 0.83rem; }
.admin-profile-section-icon.is-blue { color: var(--erp-primary); background: var(--erp-primary-soft); }
.admin-profile-section-icon.is-violet { color: #7651d6; background: #f2edff; }
.admin-profile-section-icon.is-amber { color: #c57913; background: #fff5df; }
.admin-profile-section-kicker { display: block; color: var(--erp-primary); font-size: 0.59rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.admin-profile-card-heading h2 { margin: 1px 0 3px; color: #17233a; font-size: 1rem; font-weight: 800; letter-spacing: -0.015em; }
.admin-profile-card-heading p { margin: 0; color: #8291a5; font-size: 0.72rem; line-height: 1.45; }

.admin-profile-photo-upload { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; padding-top: 18px; }
.admin-profile-photo-preview-wrap { width: 74px; height: 74px; }
.admin-profile-photo-preview { width: 74px; height: 74px; display: inline-grid; place-items: center; overflow: hidden; border: 1px solid #d8e4f3; border-radius: 18px; object-fit: cover; background: #fff; box-shadow: 0 7px 18px rgba(31, 54, 88, 0.09); }
.admin-profile-photo-placeholder { color: var(--erp-primary); background: linear-gradient(145deg, #edf5ff, #f0fdfa); font-size: 1.25rem; }
.admin-profile-upload-content { min-width: 0; }
.admin-profile-upload-content > .form-label { margin-bottom: 6px; color: #34445a; font-size: 0.72rem; font-weight: 750; }

.admin-profile-upload-control {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 12px;
  border: 1px dashed #bfd0e7;
  border-radius: 12px;
  background: #f8fbff;
}

.admin-profile-upload-copy { min-width: 0; display: grid; gap: 2px; }
.admin-profile-upload-copy strong { color: #34445a; font-size: 0.72rem; }
.admin-profile-upload-copy small { overflow: hidden; color: #8998ab; font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile-upload-control .form-control { min-width: 210px; padding: 5px; border-color: var(--erp-border); border-radius: 9px; color: #66768c; background: #fff; font-size: 0.68rem; }
.admin-profile-upload-control .form-control::file-selector-button { margin-right: 8px; padding: 7px 10px; border: 0; border-radius: 7px; color: var(--erp-primary); background: var(--erp-primary-soft); font-size: 0.68rem; font-weight: 750; cursor: pointer; }

.admin-profile-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 16px; padding-top: 18px; }
.admin-profile-field { min-width: 0; }
.admin-profile-field-wide { grid-column: 1 / -1; }
.admin-profile-field .form-label { margin-bottom: 6px; color: #34445a; font-size: 0.71rem; font-weight: 750; }
.admin-profile-input-wrap { position: relative; }
.admin-profile-input-wrap > i { position: absolute; z-index: 1; top: 50%; left: 12px; transform: translateY(-50%); color: #9aa9bc; font-size: 0.76rem; pointer-events: none; }
.admin-profile-input-wrap .form-control { min-height: 41px; padding-left: 36px; border-color: var(--erp-border); border-radius: 10px; color: var(--erp-text); background: #fbfdff; font-size: 0.78rem; box-shadow: none; }
.admin-profile-input-wrap .form-control:focus { border-color: rgba(37, 99, 235, 0.5); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09); }
.admin-profile-input-wrap.is-readonly .form-control { padding-right: 37px; color: #718198; background: #f4f7fa; }
.admin-profile-lock-icon { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #a4b1c1; font-size: 0.68rem; }
.admin-profile-field-hint { margin-top: 5px; color: #8b99ac; font-size: 0.63rem; line-height: 1.4; }

.admin-profile-actions { position: sticky; z-index: 2; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px 13px 17px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); }
.admin-profile-actions > div { display: flex; align-items: center; gap: 7px; color: #7b8ba0; font-size: 0.67rem; }
.admin-profile-actions > div i { color: #98a8ba; }
.admin-profile-action-buttons { display: flex; align-items: center; gap: 9px; }
.admin-profile-cancel-button { min-height: 39px; display: inline-flex; align-items: center; padding: 0 15px; border: 1px solid var(--erp-border); border-radius: 10px; color: #56677d; background: #fff; font-size: 0.72rem; font-weight: 750; }
.admin-profile-cancel-button:hover { border-color: #bdcce0; color: #33445b; background: #f8fafc; }
.admin-profile-save-button { min-height: 39px; display: inline-flex; align-items: center; gap: 7px; padding-inline: 16px; border-radius: 10px; font-size: 0.72rem; font-weight: 750; box-shadow: 0 7px 16px rgba(37, 99, 235, 0.18); }

@media (max-width: 1199.98px) {
  .admin-profile-layout { grid-template-columns: minmax(235px, 270px) minmax(0, 1fr); }
  .admin-profile-upload-control { grid-template-columns: 1fr; }
  .admin-profile-upload-control .form-control { min-width: 0; width: 100%; }
}

@media (max-width: 991.98px) {
  .admin-profile-layout { grid-template-columns: 1fr; }
  .admin-profile-sidebar { position: static; grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.6fr); align-items: stretch; }
  .admin-profile-security-card { align-items: center; }
}

@media (max-width: 767.98px) {
  .admin-profile-page { gap: 15px; }
  .admin-profile-header { align-items: stretch; }
  .admin-profile-back-button { align-self: flex-end; }
  .admin-profile-sidebar { grid-template-columns: 1fr; }
  .admin-profile-card { padding: 17px; border-radius: 15px; }
  .admin-profile-photo-upload { align-items: start; }
  .admin-profile-fields-grid { grid-template-columns: 1fr; }
  .admin-profile-field-wide { grid-column: auto; }
}

@media (max-width: 575.98px) {
  .admin-profile-header { display: grid; }
  .profile-breadcrumb { margin-bottom: 10px; }
  .admin-profile-title-icon { display: none; }
  .admin-profile-title-row h1 { font-size: 1.7rem; }
  .admin-profile-title-row p { font-size: 0.79rem; }
  .admin-profile-back-button { justify-content: center; }
  .admin-profile-photo-upload { grid-template-columns: 1fr; }
  .admin-profile-photo-preview-wrap { margin: 0 auto; }
  .admin-profile-upload-control { padding: 10px; }
  .admin-profile-actions { position: static; align-items: stretch; flex-direction: column; }
  .admin-profile-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .admin-profile-cancel-button, .admin-profile-save-button { justify-content: center; width: 100%; }
}

/* Client health command center */
.client-management-page { gap: 18px; }
.client-management-page .dashboard-page-heading { margin-bottom: 0; }

.client-portfolio-pulse {
  --health-accent: #21c47b;
  --health-accent-rgb: 33, 196, 123;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(520px, 1.6fr) auto;
  align-items: stretch;
  border: 1px solid #1d3974;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(62, 125, 255, 0.24), transparent 34%),
    linear-gradient(132deg, #101d3a 0%, #162e61 54%, #164377 100%);
  box-shadow: 0 16px 38px rgba(24, 48, 97, 0.18);
}

.client-portfolio-pulse.is-watch { --health-accent: #f3b13f; --health-accent-rgb: 243, 177, 63; }
.client-portfolio-pulse.is-risk { --health-accent: #fb6b71; --health-accent-rgb: 251, 107, 113; }

.client-portfolio-pulse::before {
  content: "";
  position: absolute;
  top: -90px;
  right: 10%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(var(--health-accent-rgb), 0.1);
  filter: blur(4px);
}

.client-pulse-primary { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 22px 24px; border-right: 1px solid rgba(255, 255, 255, 0.1); }
.client-pulse-heading { min-width: 0; }
.client-live-indicator { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 7px; color: #a9c9ff; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.client-live-indicator i,
.client-monitoring-badge i,
.client-health-copy strong i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--health-accent, #21c47b);
  box-shadow: 0 0 0 4px rgba(var(--health-accent-rgb, 33, 196, 123), 0.14);
}

.client-live-indicator i { animation: client-health-pulse 1.9s ease-out infinite; }
.client-pulse-heading h2 { margin: 0 0 4px; font-size: 1.28rem; font-weight: 800; letter-spacing: -0.025em; }
.client-pulse-heading p { max-width: 390px; margin: 0; color: rgba(229, 239, 255, 0.68); font-size: 0.68rem; line-height: 1.5; }
.client-pulse-visual { display: flex; align-items: center; gap: 11px; }

.client-pulse-ring {
  --pulse-score: 0;
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  flex: 0 0 72px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--health-accent) calc(var(--pulse-score) * 1%), rgba(255, 255, 255, 0.12) 0);
  box-shadow: 0 0 28px rgba(var(--health-accent-rgb), 0.2);
}

.client-pulse-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #142957; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.client-pulse-ring > span { position: relative; display: grid; place-items: center; line-height: 1; }
.client-pulse-ring strong { font-size: 1.18rem; font-weight: 850; }
.client-pulse-ring small { margin-top: 3px; color: rgba(255, 255, 255, 0.54); font-size: 0.49rem; }
.client-pulse-status { display: grid; gap: 2px; }
.client-pulse-status strong { color: var(--health-accent); font-size: 0.75rem; }
.client-pulse-status span { color: rgba(255, 255, 255, 0.52); font-size: 0.58rem; white-space: nowrap; }

.client-pulse-wave { position: absolute; right: 18px; bottom: 9px; left: 24px; height: 20px; display: flex; align-items: end; gap: 4px; opacity: 0.2; pointer-events: none; }
.client-pulse-wave i { width: 3px; height: 5px; border-radius: 99px; background: var(--health-accent); animation: client-wave 1.8s ease-in-out infinite; }
.client-pulse-wave i:nth-child(2n) { height: 11px; animation-delay: -0.4s; }
.client-pulse-wave i:nth-child(3n) { height: 17px; animation-delay: -0.9s; }
.client-pulse-wave i:nth-child(4n) { height: 8px; animation-delay: -1.2s; }

.client-pulse-metrics { position: relative; display: grid; grid-template-columns: repeat(4, minmax(105px, 1fr)); align-items: center; padding: 15px 12px; }
.client-pulse-metric { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 13px; border-right: 1px solid rgba(255, 255, 255, 0.09); }
.client-pulse-metric:last-child { border-right: 0; }
.client-pulse-metric-icon { width: 31px; height: 31px; display: inline-grid; flex: 0 0 31px; place-items: center; border-radius: 9px; font-size: 0.72rem; }
.client-pulse-metric.is-healthy .client-pulse-metric-icon { color: #56e3a5; background: rgba(33, 196, 123, 0.13); }
.client-pulse-metric.is-watch .client-pulse-metric-icon { color: #ffc55d; background: rgba(243, 177, 63, 0.13); }
.client-pulse-metric.is-risk .client-pulse-metric-icon { color: #ff8e92; background: rgba(251, 107, 113, 0.13); }
.client-pulse-metric.is-ready .client-pulse-metric-icon { color: #86afff; background: rgba(76, 128, 238, 0.16); }
.client-pulse-metric > span:last-child { min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1px 6px; }
.client-pulse-metric small { color: rgba(255, 255, 255, 0.58); font-size: 0.59rem; font-weight: 700; white-space: nowrap; }
.client-pulse-metric strong { grid-row: 1 / span 2; grid-column: 2; color: #fff; font-size: 1.15rem; font-weight: 820; }
.client-pulse-metric em { color: rgba(255, 255, 255, 0.4); font-size: 0.52rem; font-style: normal; white-space: nowrap; }

.client-health-refresh { position: relative; align-self: center; display: inline-flex; align-items: center; gap: 7px; margin-right: 18px; padding: 8px 11px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 9px; color: #dce9ff; background: rgba(255, 255, 255, 0.07); font-size: 0.62rem; font-weight: 750; white-space: nowrap; }
.client-health-refresh:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.client-health-refresh.is-refreshing i { animation: client-spin 0.65s linear infinite; }

.client-command-center { overflow: visible; }
.client-command-center > .section-title { align-items: center; padding: 19px 21px 15px; }
.client-monitoring-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #d6e3f3; border-radius: 99px; color: #4a607d; background: #f8fbff; font-size: 0.63rem; font-weight: 750; }
.client-monitoring-badge i { --health-accent: #21b875; --health-accent-rgb: 33, 184, 117; width: 6px; height: 6px; animation: client-health-pulse 1.9s ease-out infinite; }

.client-management-page .client-health-toolbar { grid-template-columns: minmax(245px, 1fr) repeat(4, minmax(118px, auto)) auto auto auto; margin: 0 20px 16px; padding: 9px; border: 1px solid var(--erp-border-soft); border-radius: 12px; }
.client-management-page .client-health-toolbar .search-field { min-height: 36px; }
.client-command-center .table-responsive { border-top: 1px solid var(--erp-border-soft); }
.client-command-center .table { min-width: 1310px; }
.client-command-center .table thead th { padding-top: 12px; padding-bottom: 12px; }
.client-command-center .table tbody tr { height: 68px; }
.client-command-center .table tbody td { padding-top: 10px; padding-bottom: 10px; }

.client-health-indicator {
  --health-accent: #21b875;
  --health-accent-rgb: 33, 184, 117;
  min-width: 142px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.client-health-indicator.is-watch { --health-accent: #e69a23; --health-accent-rgb: 230, 154, 35; }
.client-health-indicator.is-risk { --health-accent: #e64d54; --health-accent-rgb: 230, 77, 84; }

.client-health-ring {
  --health-score: 0;
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--health-accent) calc(var(--health-score) * 1%), #e9eef5 0);
}

.client-health-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.client-health-ring strong { position: relative; color: #33445b; font-size: 0.62rem; font-weight: 850; }
.client-health-copy { min-width: 0; display: grid; gap: 2px; }
.client-health-copy > strong { display: flex; align-items: center; gap: 6px; color: var(--health-accent); font-size: 0.69rem; font-weight: 800; }
.client-health-copy > strong i { width: 5px; height: 5px; flex: 0 0 5px; }
.client-health-copy small { max-width: 105px; overflow: hidden; color: #8a98aa; font-size: 0.58rem; text-overflow: ellipsis; white-space: nowrap; }

@keyframes client-health-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--health-accent-rgb), 0.45); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(var(--health-accent-rgb), 0); }
}

@keyframes client-wave {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

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

@media (max-width: 1399.98px) {
  .client-portfolio-pulse { grid-template-columns: minmax(320px, 0.95fr) minmax(440px, 1.4fr) auto; }
  .client-pulse-primary { padding-inline: 19px; }
  .client-pulse-metric { padding-inline: 9px; }
  .client-pulse-metric-icon { display: none; }
  .client-management-page .client-health-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(115px, auto)) auto auto; }
  .client-management-page .client-health-toolbar > :nth-child(5) { grid-column: 2; grid-row: 2; }
  .client-management-page .client-health-toolbar > :nth-last-child(-n+3) { grid-row: 2; }
}

@media (max-width: 1199.98px) {
  .client-portfolio-pulse { grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.25fr); }
  .client-health-refresh { position: absolute; top: 14px; right: 0; margin-right: 14px; }
  .client-pulse-metrics { padding-right: 120px; grid-template-columns: repeat(2, minmax(115px, 1fr)); }
  .client-pulse-metric:nth-child(2) { border-right: 0; }
  .client-pulse-metric:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
}

@media (max-width: 991.98px) {
  .client-portfolio-pulse { grid-template-columns: 1fr; }
  .client-pulse-primary { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .client-pulse-metrics { padding-right: 130px; }
  .client-health-refresh { bottom: 22px; top: auto; }
  .client-management-page .client-health-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-management-page .client-health-toolbar .search-field { grid-column: 1 / -1; }
  .client-management-page .client-health-toolbar > :nth-child(5),
  .client-management-page .client-health-toolbar > :nth-last-child(-n+3) { grid-column: auto; grid-row: auto; }
}

@media (max-width: 767.98px) {
  .client-portfolio-pulse { border-radius: 16px; }
  .client-pulse-primary { grid-template-columns: 1fr; padding: 19px; }
  .client-pulse-visual { justify-content: flex-start; }
  .client-pulse-wave { left: 19px; }
  .client-pulse-metrics { padding: 10px; padding-bottom: 58px; }
  .client-health-refresh { right: 50%; bottom: 13px; margin: 0; transform: translateX(50%); }
  .client-command-center > .section-title { align-items: flex-start; flex-direction: column; }
  .client-management-page .client-health-toolbar { margin-inline: 12px; }
  .client-command-center .table { min-width: 0; }
  .client-command-center .client-health-cell { grid-column: 1 / -1; justify-content: flex-start !important; padding: 9px 0 !important; border-bottom: 1px solid var(--erp-border-soft) !important; text-align: left !important; }
  .client-command-center .client-health-cell::before { margin-right: auto; }
  .client-health-indicator { min-width: 0; }
  .client-health-copy small { max-width: none; }
}

@media (max-width: 575.98px) {
  .client-pulse-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-pulse-metric { padding: 9px; }
  .client-pulse-metric:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, 0.09); }
  .client-management-page .client-health-toolbar { grid-template-columns: 1fr; }
  .client-management-page .client-health-toolbar .search-field { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .client-live-indicator i,
  .client-monitoring-badge i,
  .client-pulse-wave i,
  .client-health-refresh.is-refreshing i { animation: none; }
}

/* Member operations command center */
.member-command-page {
  --member-ink: #10213a;
  --member-muted: #718198;
  --member-blue: #3169f5;
  --member-cyan: #25c8d4;
  display: grid;
  gap: 18px;
  max-width: 1540px;
  margin: 0 auto;
  padding: 2px 0 24px;
}

.member-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2px 2px; }
.member-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #92a1b7; font-size: 0.68rem; font-weight: 700; }
.member-breadcrumb i { font-size: 0.48rem; }
.member-breadcrumb strong { color: #52637c; }
.member-page-header h1 { margin: 0; color: #0d1b32; font-size: clamp(1.75rem, 2.2vw, 2.2rem); font-weight: 800; letter-spacing: -0.045em; }
.member-page-header p { margin: 5px 0 0; color: #65758b; font-size: 0.84rem; }
.member-header-actions { display: flex; gap: 9px; }
.member-header-actions .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding-inline: 16px; border-radius: 10px; font-size: 0.76rem; font-weight: 750; box-shadow: none; }
.member-header-actions .btn-primary { border-color: #3169f5; background: #3169f5; box-shadow: 0 9px 20px rgba(49, 105, 245, 0.18); }

.member-collection-pulse {
  position: relative;
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(390px, 0.95fr) minmax(590px, 1.45fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 8% 0%, rgba(43, 210, 219, 0.18), transparent 33%),
    radial-gradient(circle at 98% 100%, rgba(77, 111, 255, 0.25), transparent 36%),
    linear-gradient(126deg, #0b1d3b 0%, #102b57 52%, #173c76 100%);
  box-shadow: 0 18px 38px rgba(23, 48, 88, 0.14);
}

.member-collection-pulse::before { content: ""; position: absolute; inset: 0; opacity: 0.13; background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(90deg, #000, transparent 64%); }
.member-pulse-summary { position: relative; z-index: 1; padding: 25px 27px; border-right: 1px solid rgba(255, 255, 255, 0.1); }
.member-live-label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 23px; color: #a9c3e8; font-size: 0.64rem; font-weight: 750; letter-spacing: 0.02em; text-transform: uppercase; }
.member-live-label i { width: 7px; height: 7px; border-radius: 50%; background: #32d69d; box-shadow: 0 0 0 5px rgba(50, 214, 157, 0.12); animation: member-live-pulse 2s ease-out infinite; }
.member-pulse-main { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 22px; }
.member-collection-ring { --member-progress: 0; width: 116px; height: 116px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(#39d8c5 calc(var(--member-progress) * 1%), rgba(255, 255, 255, 0.1) 0); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 34px rgba(38, 208, 198, 0.1); }
.member-collection-ring::before { content: ""; position: absolute; width: 91px; height: 91px; border-radius: 50%; background: linear-gradient(145deg, #102b55, #0c2346); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.member-collection-ring div { position: relative; display: grid; text-align: center; }
.member-collection-ring strong { font-size: 1.65rem; line-height: 1; letter-spacing: -0.05em; }
.member-collection-ring span { margin-top: 5px; color: #9db6d9; font-size: 0.59rem; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.member-eyebrow { display: block; color: #3169f5; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.member-pulse-main .member-eyebrow { color: #51ddd1; }
.member-pulse-main h2 { margin: 7px 0 7px; color: #fff; font-size: 1.35rem; font-weight: 780; letter-spacing: -0.03em; }
.member-pulse-main p { max-width: 340px; margin: 0; color: #9eb5d5; font-size: 0.71rem; line-height: 1.55; }
.member-pulse-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; }
.member-pulse-metric { display: flex; flex-direction: column; justify-content: center; min-height: 90px; padding: 18px 20px; border-right: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); }
.member-pulse-metric:nth-child(2n) { border-right: 0; }
.member-pulse-metric:nth-child(n+3) { border-bottom: 0; }
.member-pulse-metric > span { display: flex; align-items: center; gap: 7px; color: #a9bedc; font-size: 0.64rem; font-weight: 720; }
.member-pulse-metric > span i { color: #7da8ff; }
.member-pulse-metric.is-success > span i { color: #43daa2; }
.member-pulse-metric.is-warning > span i { color: #f6bd57; }
.member-pulse-metric.is-danger > span i { color: #ff7e86; }
.member-pulse-metric > strong { margin-top: 8px; color: #fff; font-size: 1.3rem; font-weight: 790; letter-spacing: -0.025em; }
.member-pulse-metric > small { margin-top: 3px; color: #8099bd; font-size: 0.61rem; }
.member-pulse-orbit { position: absolute; right: -87px; bottom: -160px; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 36px rgba(255,255,255,.018), 0 0 0 72px rgba(255,255,255,.012); }

.member-overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.72fr); gap: 18px; }
.member-occupancy-card,
.member-quick-actions,
.member-due-panel { border: 1px solid #dfe7f1; border-radius: 16px; background: #fff; box-shadow: 0 8px 25px rgba(28, 48, 74, 0.055); }
.member-occupancy-card { padding: 22px; }
.member-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.member-section-heading h2 { margin: 5px 0 2px; color: var(--member-ink); font-size: 1rem; font-weight: 780; letter-spacing: -0.02em; }
.member-section-heading p { margin: 0; color: #7c8ba1; font-size: 0.68rem; }
.member-occupancy-rate { display: grid; text-align: right; }
.member-occupancy-rate strong { color: #162d4e; font-size: 1.65rem; line-height: 1; letter-spacing: -0.05em; }
.member-occupancy-rate span { margin-top: 4px; color: #8494aa; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; }
.member-occupancy-track { height: 11px; display: flex; overflow: hidden; margin: 23px 0 13px; border-radius: 99px; background: #edf2f7; }
.member-occupancy-track span { min-width: 0; transition: width .45s ease; }
.member-occupancy-track .is-owner, .member-occupancy-legend i.is-owner { background: #3169f5; }
.member-occupancy-track .is-tenant, .member-occupancy-legend i.is-tenant { background: #27c6c3; }
.member-occupancy-track .is-vacant, .member-occupancy-legend i.is-vacant { background: #dfe6ef; }
.member-occupancy-track .is-empty { background: linear-gradient(90deg, #e8eef5, #f3f6f9); }
.member-occupancy-legend { display: flex; gap: 20px; color: #65758b; font-size: 0.64rem; }
.member-occupancy-legend > div { display: flex; align-items: center; gap: 7px; }
.member-occupancy-legend i { width: 7px; height: 7px; border-radius: 50%; }
.member-occupancy-legend strong { color: #293c57; }
.member-portfolio-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; padding-top: 19px; border-top: 1px solid #edf1f6; }
.member-portfolio-stats > div { display: grid; grid-template-columns: 37px auto; grid-template-rows: auto auto; align-items: center; padding: 10px 12px; border: 1px solid #e8edf4; border-radius: 11px; background: #fafcff; }
.member-portfolio-stats > div > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #3169f5; background: #edf3ff; font-size: 0.75rem; }
.member-portfolio-stats strong { color: #1b2d47; font-size: 1rem; line-height: 1.15; }
.member-portfolio-stats small { color: #8290a4; font-size: 0.58rem; }

.member-quick-actions { padding: 21px; }
.member-action-list { display: grid; gap: 7px; margin-top: 14px; }
.member-action-list > a { display: grid; grid-template-columns: 37px 1fr 18px; align-items: center; gap: 11px; padding: 9px; border: 1px solid transparent; border-radius: 10px; color: inherit; text-decoration: none; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.member-action-list > a:hover { border-color: #e1e9f4; background: #f8fbff; transform: translateX(2px); }
.member-action-list > a > span { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; color: #3169f5; background: #edf3ff; }
.member-action-list > a > span.is-violet { color: #7655d7; background: #f2eeff; }
.member-action-list > a > span.is-amber { color: #d88b14; background: #fff5df; }
.member-action-list > a > span.is-green { color: #159c68; background: #e9f9f1; }
.member-action-list > a > div { min-width: 0; display: grid; gap: 2px; }
.member-action-list strong { color: #233651; font-size: 0.7rem; }
.member-action-list small { overflow: hidden; color: #8593a6; font-size: 0.59rem; text-overflow: ellipsis; white-space: nowrap; }
.member-action-list > a > i { color: #afbccd; font-size: 0.65rem; transition: color .16s ease, transform .16s ease; }
.member-action-list > a:hover > i { color: #3169f5; transform: translateX(2px); }

.member-due-panel { overflow: hidden; }
.member-due-panel > .member-section-heading { align-items: center; padding: 20px 22px 17px; }
.member-text-link { display: inline-flex; align-items: center; gap: 8px; color: #3169f5; font-size: 0.67rem; font-weight: 750; text-decoration: none; }
.member-text-link:hover { color: #1e4fd5; }
.member-due-panel .table-responsive { border-top: 1px solid #edf1f6; }
.member-due-panel .table { min-width: 920px; }
.member-due-panel .table thead th { padding: 11px 16px; border-color: #e7edf4; color: #718097; background: #f7f9fc; font-size: 0.57rem; font-weight: 780; letter-spacing: .035em; text-transform: uppercase; }
.member-due-panel .table tbody td { padding: 13px 16px; border-color: #edf1f6; color: #52627a; font-size: 0.68rem; }
.member-person-cell { display: flex; align-items: center; gap: 10px; }
.member-person-cell > span { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 10px; color: #285cdb; background: #eaf1ff; font-size: 0.63rem; font-weight: 800; }
.member-person-cell > div, .member-date { display: grid; gap: 2px; }
.member-person-cell strong, .member-date strong { color: #243750; font-size: 0.69rem; }
.member-person-cell small, .member-date small { color: #8997aa; font-size: 0.58rem; }
.member-type-pill, .member-unit-pill, .member-due-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; font-size: 0.6rem; font-weight: 720; }
.member-type-pill { color: #6547bb; background: #f1edff; }
.member-unit-pill { color: #405773; background: #f1f5f9; }
.member-unit-pill i { color: #7d8ea5; }
.member-due-status { color: #b76c00; background: #fff5df; }
.member-due-status i { width: 5px; height: 5px; border-radius: 50%; background: #efa01c; box-shadow: 0 0 0 3px rgba(239,160,28,.12); }
.member-amount { color: #203550; }
.member-row-action { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #dee6ef; border-radius: 8px; color: #65758a; background: #fff; text-decoration: none; }
.member-row-action:hover { border-color: #b9ccf8; color: #3169f5; background: #f7faff; }

.member-empty-state { min-height: 170px; display: grid; grid-template-columns: 72px minmax(260px, 1fr) auto; align-items: center; gap: 18px; padding: 26px 30px; border-top: 1px solid #edf1f6; background: linear-gradient(105deg, #fbfdff, #f7faff); }
.member-empty-visual { position: relative; width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid #dce8f8; border-radius: 18px; color: #3169f5; background: linear-gradient(145deg, #f4f8ff, #eaf3ff); font-size: 1.45rem; box-shadow: 0 10px 22px rgba(48, 105, 245, 0.08); }
.member-empty-visual > span { position: absolute; right: -5px; bottom: -5px; width: 24px; height: 24px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #20b879; font-size: .52rem; }
.member-empty-state h3 { margin: 0 0 5px; color: #1c304b; font-size: 0.88rem; font-weight: 780; }
.member-empty-state p { max-width: 600px; margin: 0; color: #7b8a9f; font-size: 0.68rem; line-height: 1.55; }
.member-empty-state .btn { padding: 9px 13px; border-radius: 9px; font-size: 0.68rem; font-weight: 740; }

@keyframes member-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(50, 214, 157, 0.35); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(50, 214, 157, 0); }
}

@media (max-width: 1199.98px) {
  .member-collection-pulse { grid-template-columns: minmax(350px, 0.9fr) minmax(460px, 1.2fr); }
  .member-pulse-summary { padding-inline: 22px; }
  .member-overview-grid { grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr); }
  .member-portfolio-stats > div { padding-inline: 8px; }
}

@media (max-width: 991.98px) {
  .member-collection-pulse { grid-template-columns: 1fr; }
  .member-pulse-summary { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .member-overview-grid { grid-template-columns: 1fr; }
  .member-action-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .member-command-page { gap: 14px; }
  .member-page-header { align-items: flex-start; flex-direction: column; }
  .member-header-actions { width: 100%; }
  .member-header-actions .btn { flex: 1; }
  .member-pulse-main { grid-template-columns: 92px 1fr; gap: 16px; }
  .member-collection-ring { width: 92px; height: 92px; }
  .member-collection-ring::before { width: 71px; height: 71px; }
  .member-collection-ring strong { font-size: 1.35rem; }
  .member-pulse-metrics { padding: 10px; }
  .member-pulse-metric { padding: 14px 12px; }
  .member-portfolio-stats { grid-template-columns: 1fr; }
  .member-action-list { grid-template-columns: 1fr; }
  .member-empty-state { grid-template-columns: 58px 1fr; padding: 22px; }
  .member-empty-visual { width: 56px; height: 56px; border-radius: 15px; font-size: 1.2rem; }
  .member-empty-state .btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 575.98px) {
  .member-header-actions { flex-direction: column-reverse; }
  .member-pulse-summary { padding: 21px 18px; }
  .member-pulse-main { grid-template-columns: 1fr; }
  .member-pulse-metrics { grid-template-columns: 1fr; }
  .member-pulse-metric { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-pulse-metric:nth-child(3) { border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-occupancy-card, .member-quick-actions { padding: 18px; }
  .member-section-heading { align-items: flex-start; }
  .member-occupancy-legend { align-items: flex-start; flex-direction: column; gap: 8px; }
  .member-due-panel > .member-section-heading { align-items: flex-start; flex-direction: column; padding-inline: 18px; }
  .member-empty-state { grid-template-columns: 1fr; padding: 22px 18px; }
  .member-empty-state .btn { grid-column: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .member-live-label i { animation: none; }
  .member-occupancy-track span,
  .member-action-list > a { transition: none; }
}

/* Premium member directory */
.member-directory-page { display: grid; gap: 17px; max-width: 1540px; margin: 0 auto; padding: 2px 0 24px; }
.member-directory-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2px 2px; }
.member-directory-header h1 { margin: 0; color: #0d1b32; font-size: clamp(1.75rem, 2.2vw, 2.2rem); font-weight: 800; letter-spacing: -0.045em; }
.member-directory-header p { margin: 5px 0 0; color: #65758b; font-size: 0.84rem; }

.member-directory-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.member-directory-stats article { min-width: 0; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: 1fr auto; align-items: center; gap: 2px 12px; padding: 15px 16px 13px; border: 1px solid #e0e7f0; border-radius: 13px; background: #fff; box-shadow: 0 5px 18px rgba(24, 45, 72, 0.045); }
.member-directory-stats article > span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #3169f5; background: #eaf1ff; font-size: .85rem; }
.member-directory-stats article > span.is-green { color: #139866; background: #e8f8f0; }
.member-directory-stats article > span.is-violet { color: #7655d7; background: #f1edff; }
.member-directory-stats article > span.is-cyan { color: #138fa8; background: #e8f8fb; }
.member-directory-stats article > span.is-amber { color: #d5840b; background: #fff4dc; }
.member-directory-stats article > div { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.member-directory-stats small { overflow: hidden; color: #718096; font-size: .61rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.member-directory-stats strong { color: #172b46; font-size: 1.08rem; font-weight: 820; letter-spacing: -.025em; white-space: nowrap; }
.member-directory-stats strong b { color: #b0bccb; font-weight: 500; }
.member-directory-stats em { overflow: hidden; color: #96a3b5; font-size: .56rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.member-directory-stats article.needs-attention { border-color: #f4d8a5; background: linear-gradient(145deg, #fff, #fffbf3); }

.member-directory-panel { overflow: hidden; border: 1px solid #dde6f0; border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(27, 47, 73, 0.06); }
.member-directory-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 21px 16px; }
.member-directory-title h2 { margin: 5px 0 2px; color: #142640; font-size: 1rem; font-weight: 790; letter-spacing: -.022em; }
.member-directory-title p { margin: 0; color: #7b8a9f; font-size: .66rem; }
.member-directory-count { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #dce6f2; border-radius: 99px; color: #63758d; background: #f9fbfe; font-size: .61rem; }
.member-directory-count > i { width: 6px; height: 6px; border-radius: 50%; background: #2bb77c; box-shadow: 0 0 0 4px rgba(43,183,124,.1); }
.member-directory-count strong { color: #253a56; }

.member-directory-toolbar { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(165px, .28fr) minmax(190px, .32fr) auto 38px; gap: 8px; margin: 0 20px 17px; padding: 9px; border: 1px solid #dfe7f1; border-radius: 12px; background: #f8fafd; }
.member-directory-search, .member-filter-field { position: relative; display: flex; align-items: center; margin: 0; }
.member-directory-search > i, .member-filter-field > i { position: absolute; z-index: 1; left: 12px; color: #8ca0b8; font-size: .7rem; pointer-events: none; }
.member-directory-toolbar .form-control, .member-directory-toolbar .form-select { height: 38px; border-color: #dce5ef; border-radius: 9px; color: #354a65; background-color: #fff; font-size: .68rem; box-shadow: none; }
.member-directory-toolbar .form-control { padding: 7px 39px 7px 34px; }
.member-directory-toolbar .form-select { padding-left: 34px; }
.member-directory-toolbar .form-control:focus, .member-directory-toolbar .form-select:focus { border-color: #94b3fa; box-shadow: 0 0 0 3px rgba(49,105,245,.08); }
.member-directory-search kbd { position: absolute; right: 10px; min-width: 20px; padding: 2px 5px; border: 1px solid #dce4ee; border-radius: 5px; color: #8392a6; background: #f7f9fc; font-family: inherit; font-size: .55rem; text-align: center; box-shadow: none; }
.member-directory-toolbar .btn { min-height: 38px; padding-inline: 15px; border-radius: 9px; font-size: .66rem; font-weight: 760; }
.member-filter-reset { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #dce5ef; border-radius: 9px; color: #75869b; background: #fff; text-decoration: none; }
.member-filter-reset:hover, .member-filter-reset.is-active { border-color: #b9cdfa; color: #3169f5; background: #f5f8ff; }

.member-directory-table-wrap { border-top: 1px solid #e8edf4; }
.member-directory-table { min-width: 1230px; }
.member-directory-table thead th { padding: 12px 14px; border-color: #e4eaf2; color: #75849a; background: #f6f8fb; font-size: .56rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.member-directory-table thead th:first-child, .member-directory-table tbody td:first-child { padding-left: 21px; }
.member-directory-table thead th:last-child, .member-directory-table tbody td:last-child { padding-right: 21px; }
.member-directory-table tbody tr { position: relative; height: 68px; box-shadow: inset 3px 0 0 transparent; transition: background .15s ease, box-shadow .15s ease; }
.member-directory-table tbody tr:hover { background: #fbfdff; }
.member-directory-table tbody tr.has-risk { box-shadow: inset 3px 0 0 #e64d54; }
.member-directory-table tbody tr.has-warning { box-shadow: inset 3px 0 0 #efa11b; }
.member-directory-table tbody td { padding: 11px 14px; border-color: #edf1f6; color: #52627a; font-size: .66rem; }
.member-directory-person { min-width: 165px; display: flex; align-items: center; gap: 10px; }
.member-directory-person > span { width: 37px; height: 37px; display: grid; flex: 0 0 37px; place-items: center; border-radius: 11px; color: #285cda; background: linear-gradient(145deg, #eef4ff, #e2ecff); font-size: .64rem; font-weight: 820; }
.member-directory-person > div, .member-unit-detail, .member-rate, .member-monthly-value, .member-directory-date { min-width: 0; display: grid; gap: 2px; }
.member-directory-person strong, .member-unit-detail strong, .member-rate strong, .member-directory-date strong { color: #263a55; font-size: .67rem; font-weight: 730; white-space: nowrap; }
.member-directory-person small, .member-unit-detail small, .member-rate small, .member-monthly-value small, .member-directory-date small { color: #8997aa; font-size: .56rem; white-space: nowrap; }
.member-kind { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; color: #6546b8; background: #f0ecff; font-size: .58rem; font-weight: 740; }
.member-kind.tenant { color: #127b91; background: #e8f8fb; }
.member-monthly-value strong { color: #152d4e; font-size: .75rem; font-weight: 820; white-space: nowrap; }
.member-payment-state, .member-account-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid transparent; border-radius: 99px; font-size: .57rem; font-weight: 750; white-space: nowrap; }
.member-payment-state > i, .member-account-state > i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.member-payment-state.is-paid { border-color: #b9ecd3; color: #14875d; background: #edfbf4; }
.member-payment-state.is-due-soon { border-color: #f6dca8; color: #b56c00; background: #fff8e9; }
.member-payment-state.is-overdue, .member-payment-state.is-failed { border-color: #fac8ca; color: #c7353d; background: #fff0f1; }
.member-payment-state.is-partial { border-color: #d8c9fb; color: #6c4cbe; background: #f5f1ff; }
.member-payment-state.is-carried { border-color: #c8d7ed; color: #506884; background: #f1f5fa; }
.member-payment-state.is-cancelled { border-color: #d9dee6; color: #7c8999; background: #f5f6f8; }
.member-payment-state.is-pending { border-color: #cadcf8; color: #3466b8; background: #eff5ff; }
.member-estimated-due { display: block; margin-top: 4px; color: #9b6a20; font-size: .54rem; white-space: nowrap; }
.member-account-state.is-active { border-color: #b9ecd3; color: #14875d; background: #edfbf4; }
.member-account-state.is-inactive { border-color: #d9dee6; color: #7a8798; background: #f4f6f8; }
.member-directory-actions { display: inline-flex; gap: 6px; }
.member-directory-actions a { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #dce5ef; border-radius: 8px; color: #65778e; background: #fff; text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.member-directory-actions a:hover { border-color: #aec5fa; color: #3169f5; background: #f5f8ff; }
.member-directory-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 20px; color: #8492a5; background: #fbfcfe; font-size: .58rem; }
.member-directory-footer strong { color: #40536d; }
.member-directory-footer span:last-child { display: inline-flex; align-items: center; gap: 6px; }

.member-directory-empty { min-height: 265px; display: grid; grid-template-columns: 92px minmax(340px, 1fr) minmax(250px, .55fr); align-items: center; gap: 26px; padding: 42px 46px; border-top: 1px solid #e8edf4; background: radial-gradient(circle at 2% 50%, rgba(49,105,245,.055), transparent 28%), linear-gradient(110deg, #fff, #f8fbff); }
.member-directory-empty-visual { position: relative; width: 88px; height: 88px; display: grid; place-items: center; border: 1px solid #dbe7fa; border-radius: 24px; color: #3169f5; background: linear-gradient(145deg, #f3f7ff, #e7f0ff); font-size: 1.8rem; box-shadow: 0 15px 30px rgba(45, 99, 220, .09); }
.member-directory-empty-visual > span { position: absolute; right: -7px; bottom: -7px; width: 30px; height: 30px; display: grid; place-items: center; border: 4px solid #fff; border-radius: 50%; color: #fff; background: #21b57a; font-size: .62rem; }
.member-directory-empty h3 { margin: 6px 0 6px; color: #172c49; font-size: 1.08rem; font-weight: 800; letter-spacing: -.025em; }
.member-directory-empty p { max-width: 600px; margin: 0; color: #748399; font-size: .7rem; line-height: 1.6; }
.member-directory-empty > div:nth-child(2) > div { display: flex; gap: 8px; margin-top: 17px; }
.member-directory-empty .btn { min-height: 38px; display: inline-flex; align-items: center; border-radius: 9px; font-size: .65rem; font-weight: 750; }
.member-directory-empty aside { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid #e0e9f4; border-radius: 12px; background: rgba(255,255,255,.8); box-shadow: 0 6px 18px rgba(28,48,74,.04); }
.member-directory-empty aside > span { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 10px; color: #159665; background: #e9f9f1; }
.member-directory-empty aside > div { display: grid; gap: 3px; }
.member-directory-empty aside strong { color: #324761; font-size: .63rem; }
.member-directory-empty aside small { color: #8593a6; font-size: .56rem; line-height: 1.45; }

@media (max-width: 1399.98px) {
  .member-directory-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-directory-toolbar { grid-template-columns: minmax(260px, 1fr) minmax(155px, .3fr) minmax(180px, .35fr) auto 38px; }
}

@media (max-width: 991.98px) {
  .member-directory-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-directory-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-directory-search { grid-column: 1 / -1; }
  .member-directory-toolbar .btn { min-width: 120px; }
  .member-directory-empty { grid-template-columns: 82px 1fr; padding: 35px; }
  .member-directory-empty aside { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  .member-directory-header { align-items: flex-start; flex-direction: column; }
  .member-directory-stats { grid-template-columns: 1fr; }
  .member-directory-title { align-items: flex-start; flex-direction: column; }
  .member-directory-toolbar { margin-inline: 12px; }
  .member-directory-empty { grid-template-columns: 64px 1fr; gap: 18px; padding: 28px 22px; }
  .member-directory-empty-visual { width: 64px; height: 64px; border-radius: 18px; font-size: 1.35rem; }
  .member-directory-empty-visual > span { width: 25px; height: 25px; border-width: 3px; }
}

@media (max-width: 575.98px) {
  .member-directory-toolbar { grid-template-columns: 1fr; }
  .member-directory-search { grid-column: auto; }
  .member-directory-toolbar .btn, .member-filter-reset { width: 100%; }
  .member-directory-footer { align-items: flex-start; flex-direction: column; }
  .member-directory-empty { grid-template-columns: 1fr; }
  .member-directory-empty > div:nth-child(2) > div { flex-direction: column; }
  .member-directory-empty .btn { justify-content: center; width: 100%; }
  .member-directory-empty aside { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .member-directory-table tbody tr,
  .member-directory-actions a { transition: none; }
}

/* Guided member setup form */
.member-form-page { display: grid; gap: 17px; max-width: 1540px; margin: 0 auto; padding: 2px 0 28px; }
.member-form-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2px 2px; }
.member-form-header h1 { margin: 0; color: #0d1b32; font-size: clamp(1.75rem, 2.2vw, 2.2rem); font-weight: 800; letter-spacing: -.045em; }
.member-form-header p { margin: 5px 0 0; color: #65758b; font-size: .84rem; }

.member-setup-steps { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: center; padding: 13px 18px; border: 1px solid #dfe7f1; border-radius: 13px; background: #fff; box-shadow: 0 5px 18px rgba(28,48,74,.04); }
.member-setup-steps > div { display: flex; align-items: center; gap: 9px; min-width: 118px; }
.member-setup-steps > div > span { width: 29px; height: 29px; display: grid; flex: 0 0 29px; place-items: center; border: 1px solid #dae3ee; border-radius: 9px; color: #77879b; background: #f7f9fc; font-size: .56rem; font-weight: 800; }
.member-setup-steps > div.is-active > span { border-color: #3169f5; color: #fff; background: #3169f5; box-shadow: 0 6px 14px rgba(49,105,245,.18); }
.member-setup-steps > div > div { display: grid; gap: 1px; }
.member-setup-steps strong { color: #344861; font-size: .63rem; }
.member-setup-steps small { color: #94a0b1; font-size: .54rem; }
.member-setup-steps > i { height: 1px; margin: 0 17px; background: linear-gradient(90deg, #dfe6ee, #eaf0f5); }

.member-setup-form { min-width: 0; }
.member-form-validation:empty { display: none; }
.member-form-validation { margin-bottom: 13px; padding: 12px 14px; border: 1px solid #facaca; border-radius: 10px; color: #bd343b; background: #fff3f3; font-size: .68rem; }
.member-form-validation ul { margin: 0; }
.member-setup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 17px; }
.member-setup-content { min-width: 0; display: grid; gap: 15px; }
.member-form-card { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 15px; background: #fff; box-shadow: 0 7px 22px rgba(27,47,73,.05); }
.member-form-card-header { display: flex; align-items: center; gap: 13px; padding: 18px 20px 15px; border-bottom: 1px solid #edf1f6; background: linear-gradient(110deg, #fff, #fbfdff); }
.member-form-step { position: relative; width: 43px; height: 43px; display: grid; flex: 0 0 43px; place-items: center; border-radius: 12px; color: #3169f5; background: #eaf1ff; }
.member-form-step b { position: absolute; top: -5px; left: -5px; width: 18px; height: 18px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #3169f5; font-size: .44rem; box-shadow: 0 3px 7px rgba(32,70,156,.14); }
.member-form-step.is-violet { color: #7655d7; background: #f0ecff; }
.member-form-step.is-violet b { background: #7655d7; }
.member-form-step.is-cyan { color: #128fa5; background: #e7f8fb; }
.member-form-step.is-cyan b { background: #17a3b7; }
.member-form-step.is-amber { color: #d3840c; background: #fff3dc; }
.member-form-step.is-amber b { background: #df941d; }
.member-form-card-header > div { min-width: 0; }
.member-form-card-header h2 { margin: 4px 0 2px; color: #172b46; font-size: .95rem; font-weight: 790; letter-spacing: -.02em; }
.member-form-card-header p { margin: 0; color: #7e8ca0; font-size: .62rem; }
.member-required-note { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 6px 9px; border: 1px solid #e0e7ef; border-radius: 99px; color: #7b899d; background: #fff; font-size: .55rem; font-weight: 700; white-space: nowrap; }
.member-required-note i { width: 5px; height: 5px; border-radius: 50%; background: #e74c54; }

.member-form-fields { display: grid; grid-template-columns: 1.15fr 1.15fr .72fr .72fr .8fr; gap: 13px; padding: 18px 20px; }
.member-form-fields.is-three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.member-field { min-width: 0; }
.member-field.is-wide { grid-column: span 2; }
.member-field > label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #40536c; font-size: .62rem; font-weight: 720; }
.member-field > label b { color: #e64c54; }
.member-field > label small { color: #9aa7b7; font-size: .52rem; font-weight: 550; }
.member-field > label > span { padding: 3px 6px; border-radius: 99px; color: #2d67e7; background: #edf3ff; font-size: .49rem; font-weight: 750; }
.member-field > small { display: block; margin-top: 5px; color: #8a98aa; font-size: .54rem; line-height: 1.45; }
.member-input { position: relative; display: flex; align-items: center; }
.member-input > i { position: absolute; z-index: 2; left: 12px; color: #93a3b7; font-size: .68rem; pointer-events: none; }
.member-input .form-control, .member-input .form-select { min-height: 39px; padding: 8px 11px 8px 34px; border-color: #dce5ef; border-radius: 9px; color: #334861; background-color: #fff; font-size: .67rem; box-shadow: none; }
.member-input .form-control::placeholder { color: #abb6c5; }
.member-input .form-control:focus, .member-input .form-select:focus { border-color: #91b1fa; box-shadow: 0 0 0 3px rgba(49,105,245,.08); }
.member-input .form-control[readonly] { color: #2256cb; background: #f2f6ff; font-weight: 800; }
.member-input.has-suffix .form-control { padding-right: 43px; }
.member-input.has-suffix > span { position: absolute; right: 11px; color: #8695a8; font-size: .57rem; font-weight: 700; }
.member-input.has-action .form-control { padding-right: 40px; }
.member-input.has-action button { position: absolute; right: 5px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; color: #8392a5; background: transparent; font-size: .65rem; }
.member-input.has-action button:hover { color: #3169f5; background: #edf3ff; }
.member-field-error { display: block; margin-top: 4px; color: #cf3b43; font-size: .54rem; }
.member-field-error:empty { display: none; }

.member-rate-builder { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: center; gap: 7px; padding: 16px 20px 20px; border-top: 1px solid #edf1f6; background: #fafcff; }
.member-rate-symbol { width: 25px; height: 25px; display: grid; place-items: center; align-self: center; margin-top: 15px; border: 1px solid #dfe6ef; border-radius: 50%; color: #8b99ab; background: #fff; font-size: .55rem; }
.member-calculated-field { padding: 10px 11px; border: 1px solid #dbe6fb; border-radius: 11px; background: #f5f8ff; }
.member-calculated-field .member-input .form-control { border-color: transparent; background: #fff; }

.member-access-panel { display: grid; grid-template-columns: minmax(330px, 1fr) minmax(280px, .72fr); align-items: end; gap: 17px; margin: 0 20px 20px; padding: 13px; border: 1px solid #e1e8f1; border-radius: 11px; background: #f8fafd; }
.member-switch-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; margin: 0; cursor: pointer; }
.member-switch-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #3169f5; background: #eaf1ff; }
.member-switch-row > span:nth-child(2), .member-tenant-toggle > span:first-child, .member-end-month > span:last-child { display: grid; gap: 2px; }
.member-switch-row strong, .member-tenant-toggle strong, .member-end-month strong { color: #354a64; font-size: .63rem; }
.member-switch-row small, .member-tenant-toggle small, .member-end-month small { color: #8694a7; font-size: .54rem; font-weight: 500; }
.member-switch { position: relative; width: 36px; height: 20px; display: block; flex: 0 0 36px; }
.member-switch .form-check-input { position: absolute; z-index: 2; inset: 0; width: 36px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.member-switch > i { position: absolute; inset: 0; border-radius: 99px; background: #cbd5e1; transition: background .17s ease; }
.member-switch > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(30,42,59,.18); transition: transform .17s ease; }
.member-switch .form-check-input:checked + i { background: #3169f5; }
.member-switch .form-check-input:checked + i::after { transform: translateX(16px); }
.member-switch .form-check-input:focus + i { box-shadow: 0 0 0 3px rgba(49,105,245,.13); }

.member-tenant-toggle { display: flex; align-items: center; gap: 12px; margin-left: auto; padding: 8px 10px 8px 12px; border: 1px solid #dfe7f0; border-radius: 10px; background: #fff; cursor: pointer; }
.member-tenant-card.has-tenant .member-form-card-header { background: linear-gradient(110deg, #fff, #f5fcfd); }
.member-tenant-disabled { display: flex; align-items: center; gap: 13px; margin: 18px 20px 20px; padding: 15px; border: 1px dashed #d9e3ee; border-radius: 11px; background: #fafcfe; }
.member-tenant-disabled > span { width: 38px; height: 38px; display: grid; flex: 0 0 38px; place-items: center; border-radius: 10px; color: #72859c; background: #edf2f7; }
.member-tenant-disabled > div { display: grid; gap: 3px; }
.member-tenant-disabled strong { color: #455a74; font-size: .65rem; }
.member-tenant-disabled small { color: #8896a9; font-size: .56rem; }
.member-tenant-fields > .member-form-fields { padding-bottom: 14px; }

.member-billing-fields { padding-bottom: 13px; }
.member-end-month { display: inline-flex; align-items: center; gap: 11px; margin: 0 20px 20px; padding: 11px 13px; border: 1px solid #e0e7f0; border-radius: 10px; background: #fafcff; cursor: pointer; }

.member-setup-aside { position: sticky; top: calc(var(--tb-topbar-height) + 15px); display: grid; gap: 13px; }
.member-billing-preview { position: relative; overflow: hidden; padding: 21px; border-radius: 15px; color: #fff; background: radial-gradient(circle at 100% 0%, rgba(46,209,205,.2), transparent 35%), linear-gradient(145deg, #102b54, #173e77); box-shadow: 0 14px 29px rgba(24,53,97,.16); }
.member-billing-preview::after { content: ""; position: absolute; right: -42px; bottom: -62px; width: 145px; height: 145px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.025), 0 0 0 48px rgba(255,255,255,.015); }
.member-preview-label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 24px; color: #a8c2e5; font-size: .55rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.member-preview-label > i { width: 6px; height: 6px; border-radius: 50%; background: #35d7a0; box-shadow: 0 0 0 4px rgba(53,215,160,.12); }
.member-billing-preview > .member-eyebrow { position: relative; z-index: 1; color: #50d8d2; }
.member-billing-preview > strong { position: relative; z-index: 1; display: block; margin: 7px 0 4px; font-size: 1.75rem; font-weight: 820; letter-spacing: -.05em; }
.member-billing-preview > p { position: relative; z-index: 1; margin: 0; color: #9eb6d5; font-size: .59rem; line-height: 1.5; }
.member-billing-preview > div:last-child { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.1); }
.member-billing-preview > div:last-child > span { min-width: 0; display: grid; grid-template-columns: 19px 1fr; grid-template-rows: auto auto; align-items: center; }
.member-billing-preview > div:last-child i { grid-row: 1 / 3; color: #73a1e9; font-size: .67rem; }
.member-billing-preview > div:last-child small { color: #829cbe; font-size: .5rem; }
.member-billing-preview > div:last-child b { overflow: hidden; color: #eef5ff; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }

.member-setup-guide { padding: 18px; border: 1px solid #dfe7f1; border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(27,47,73,.05); }
.member-setup-guide .member-section-heading { align-items: center; }
.member-setup-guide .member-section-heading > strong { color: #3169f5; font-size: 1rem; letter-spacing: -.03em; }
.member-setup-progress { height: 5px; overflow: hidden; margin: 14px 0 16px; border-radius: 99px; background: #e8edf4; }
.member-setup-progress > i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3169f5, #23c5ca); transition: width .25s ease; }
.member-setup-guide ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.member-setup-guide li { display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 9px; padding: 7px; border-radius: 9px; transition: background .17s ease; }
.member-setup-guide li > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #a5b1c0; background: #edf1f5; font-size: .52rem; }
.member-setup-guide li > div { display: grid; gap: 1px; }
.member-setup-guide li strong { color: #53667d; font-size: .59rem; }
.member-setup-guide li small { color: #98a4b4; font-size: .51rem; }
.member-setup-guide li.is-complete { background: #f4fbf8; }
.member-setup-guide li.is-complete > span { color: #fff; background: #20b77a; }
.member-setup-guide li.is-complete strong { color: #2d5949; }
.member-form-tip { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid #d9e5fb; border-radius: 12px; background: #f3f7ff; }
.member-form-tip > span { width: 31px; height: 31px; display: grid; flex: 0 0 31px; place-items: center; border-radius: 9px; color: #3169f5; background: #e2ebff; }
.member-form-tip > div { display: grid; gap: 3px; }
.member-form-tip strong { color: #395272; font-size: .59rem; }
.member-form-tip p { margin: 0; color: #7e8ea4; font-size: .52rem; line-height: 1.45; }

.member-form-actions { position: sticky; z-index: 10; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; padding: 12px 15px; border: 1px solid #dbe4ef; border-radius: 13px; background: rgba(255,255,255,.95); box-shadow: 0 -8px 25px rgba(25,44,69,.075); backdrop-filter: blur(12px); }
.member-form-actions > div:first-child { display: flex; align-items: center; gap: 10px; }
.member-form-actions > div:first-child > i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #1a9869; background: #e9f8f1; }
.member-form-actions > div:first-child > span { display: grid; gap: 1px; }
.member-form-actions > div:first-child strong { color: #40546e; font-size: .6rem; }
.member-form-actions > div:first-child small { color: #8c99aa; font-size: .52rem; }
.member-form-actions > div:last-child { display: flex; gap: 8px; }
.member-form-actions .btn { min-width: 108px; min-height: 39px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font-size: .66rem; font-weight: 760; }
.member-form-actions .btn-primary { min-width: 145px; box-shadow: 0 7px 16px rgba(49,105,245,.17); }

@media (max-width: 1199.98px) {
  .member-setup-layout { grid-template-columns: minmax(0, 1fr) 275px; }
  .member-form-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-form-fields .member-field:nth-child(4), .member-form-fields .member-field:nth-child(5) { grid-column: auto; }
  .member-setup-aside { top: calc(var(--tb-topbar-height) + 10px); }
}

@media (max-width: 991.98px) {
  .member-setup-steps > i { margin-inline: 8px; }
  .member-setup-steps > div { min-width: 0; }
  .member-setup-steps small { display: none; }
  .member-setup-layout { grid-template-columns: 1fr; }
  .member-setup-aside { position: static; grid-template-columns: 1fr 1fr; }
  .member-form-tip { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  .member-form-header { align-items: flex-start; flex-direction: column; }
  .member-setup-steps { grid-template-columns: repeat(4, 1fr); }
  .member-setup-steps > i { display: none; }
  .member-setup-steps > div { justify-content: center; }
  .member-setup-steps > div > div { display: none; }
  .member-form-fields, .member-form-fields.is-three-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-field.is-wide { grid-column: span 2; }
  .member-rate-builder { grid-template-columns: 1fr; }
  .member-rate-symbol { display: none; }
  .member-access-panel { grid-template-columns: 1fr; }
  .member-tenant-toggle { margin-left: 0; }
  .member-form-card-header { align-items: flex-start; flex-wrap: wrap; }
  .member-required-note { margin-left: 0; }
  .member-form-actions > div:first-child { display: none; }
  .member-form-actions { justify-content: flex-end; }
}

@media (max-width: 575.98px) {
  .member-form-fields, .member-form-fields.is-three-column { grid-template-columns: 1fr; padding-inline: 16px; }
  .member-field.is-wide { grid-column: auto; }
  .member-rate-builder { padding-inline: 16px; }
  .member-access-panel { min-width: 0; margin-inline: 16px; }
  .member-switch-row { grid-template-columns: 36px 1fr; }
  .member-switch-row > .member-switch { grid-column: 1 / -1; margin-left: 47px; }
  .member-tenant-toggle { width: 100%; justify-content: space-between; }
  .member-setup-aside { grid-template-columns: 1fr; }
  .member-form-tip { grid-column: auto; }
  .member-form-actions > div:last-child { width: 100%; }
  .member-form-actions .btn { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .member-switch > i,
  .member-switch > i::after,
  .member-setup-progress > i,
  .member-setup-guide li { transition: none; }
}

/* Member billing operations console */
.member-billing-page { display: grid; gap: 17px; max-width: 1540px; margin: 0 auto; padding: 2px 0 28px; }
.member-billing-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2px 2px; }
.member-billing-header h1 { margin: 0; color: #0d1b32; font-size: clamp(1.75rem,2.2vw,2.2rem); font-weight: 800; letter-spacing: -.045em; }
.member-billing-header p { margin: 5px 0 0; color: #65758b; font-size: .84rem; }
.member-billing-lock { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #f3d79e; border-radius: 12px; background: #fff9ec; }
.member-billing-lock > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #b77612; background: #ffefcc; }
.member-billing-lock > div { display: grid; gap: 2px; }
.member-billing-lock strong { color: #684d22; font-size: .66rem; }
.member-billing-lock small { color: #8d754f; font-size: .57rem; }
.member-billing-lock .btn { border-radius: 9px; font-size: .62rem; font-weight: 750; }

.member-billing-pulse { position: relative; display: grid; grid-template-columns: minmax(330px,.86fr) minmax(460px,1.15fr) 280px; min-height: 213px; overflow: hidden; border: 1px solid rgba(255,255,255,.07); border-radius: 18px; color: #fff; background: radial-gradient(circle at 4% 0%,rgba(45,210,204,.17),transparent 31%), radial-gradient(circle at 100% 100%,rgba(66,103,241,.2),transparent 34%), linear-gradient(125deg,#0b1e3b,#112d58 54%,#173c73); box-shadow: 0 18px 38px rgba(23,48,88,.14); }
.member-billing-pulse::before { content: ""; position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.14) 1px,transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(90deg,#000,transparent 72%); }
.member-billing-primary { position: relative; z-index: 1; padding: 23px 25px; border-right: 1px solid rgba(255,255,255,.1); }
.member-billing-primary .member-live-label { margin-bottom: 22px; }
.member-billing-primary > .member-eyebrow { color: #54dad3; }
.member-billing-primary > strong { display: block; margin: 7px 0 5px; font-size: 1.9rem; font-weight: 830; letter-spacing: -.055em; }
.member-billing-primary > p { max-width: 340px; margin: 0; color: #9eb5d3; font-size: .61rem; line-height: 1.55; }
.member-billing-primary-meta { display: flex; gap: 8px; margin-top: 17px; }
.member-billing-primary-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.11); border-radius: 99px; color: #b3c6e0; background: rgba(255,255,255,.055); font-size: .55rem; }
.member-billing-primary-meta span i { color: #73a6f5; }
.member-billing-primary-meta span.has-risk i { color: #ff7c85; }
.member-billing-primary-meta span b { color: #fff; }
.member-billing-signals { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 14px; }
.member-billing-signals article { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 9px; min-width: 0; padding: 14px; border-right: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); }
.member-billing-signals article:nth-child(2n) { border-right: 0; }
.member-billing-signals article:nth-child(n+3) { border-bottom: 0; }
.member-billing-signals article > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #80aaff; background: rgba(80,133,240,.14); font-size: .73rem; }
.member-billing-signals article > span.is-green { color: #4cdda8; background: rgba(48,196,143,.13); }
.member-billing-signals article > span.is-amber { color: #fac366; background: rgba(238,168,50,.13); }
.member-billing-signals article > span.is-violet { color: #b5a1ff; background: rgba(130,101,233,.14); }
.member-billing-signals article > div { min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; }
.member-billing-signals small { color: #8fa9cb; font-size: .54rem; }
.member-billing-signals strong { grid-row: 1 / 3; grid-column: 2; color: #fff; font-size: 1.15rem; letter-spacing: -.035em; }
.member-billing-signals em { overflow: hidden; color: #b3c4dc; font-size: .55rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.member-billing-runbook { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 21px; border-left: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.member-billing-runbook .member-eyebrow { color: #59ddd5; }
.member-billing-runbook h2 { margin: 6px 0 4px; color: #fff; font-size: .92rem; font-weight: 780; }
.member-billing-runbook p { margin: 0 0 13px; color: #95adcc; font-size: .56rem; line-height: 1.5; }
.member-billing-runbook form + form { margin-top: 7px; }
.member-billing-runbook .btn { width: 100%; min-height: 34px; border-radius: 8px; font-size: .58rem; font-weight: 750; }
.member-billing-runbook .btn-light { color: #173769; }

.member-billing-panel { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 15px; background: #fff; box-shadow: 0 8px 25px rgba(28,48,74,.055); }
.member-billing-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 21px 16px; }
.member-billing-panel-heading h2 { margin: 5px 0 2px; color: #172b46; font-size: .96rem; font-weight: 790; letter-spacing: -.022em; }
.member-billing-panel-heading p { margin: 0; color: #7d8b9f; font-size: .62rem; }
.member-billing-panel-heading > a { display: inline-flex; align-items: center; gap: 7px; color: #3169f5; font-size: .6rem; font-weight: 750; text-decoration: none; }
.member-panel-count { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #dce5ef; border-radius: 99px; color: #6f7f93; background: #f9fbfd; font-size: .57rem; white-space: nowrap; }
.member-panel-count i { width: 5px; height: 5px; border-radius: 50%; background: #25b67b; box-shadow: 0 0 0 4px rgba(37,182,123,.1); }
.member-panel-count strong { color: #2c415d; }
.member-billing-panel .table-responsive { border-top: 1px solid #e8edf4; }
.member-billing-table { min-width: 1120px; }
.member-billing-table thead th { padding: 11px 14px; border-color: #e5ebf2; color: #76859a; background: #f6f8fb; font-size: .55rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.member-billing-table thead th:first-child,.member-billing-table tbody td:first-child { padding-left: 21px; }
.member-billing-table thead th:last-child,.member-billing-table tbody td:last-child { padding-right: 21px; }
.member-billing-table tbody tr { height: 66px; box-shadow: inset 3px 0 0 transparent; }
.member-billing-table tbody tr.has-risk { box-shadow: inset 3px 0 0 #e64d54; }
.member-billing-table tbody tr.has-warning { box-shadow: inset 3px 0 0 #eca022; }
.member-billing-table tbody td { padding: 10px 14px; border-color: #edf1f6; color: #53647a; font-size: .63rem; }
.member-billing-person,.member-invoice-number { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.member-billing-person > span { width: 35px; height: 35px; display: grid; flex: 0 0 35px; place-items: center; border-radius: 10px; color: #285ddb; background: #e8f0ff; font-size: .59rem; font-weight: 820; }
.member-billing-person > div,.member-invoice-number > div,.member-billing-value,.member-billing-date { display: grid; gap: 2px; }
.member-billing-person strong,.member-invoice-number strong,.member-billing-date strong,.member-table-primary { color: #273b56; font-size: .65rem; font-weight: 730; white-space: nowrap; }
.member-billing-person small,.member-invoice-number small,.member-billing-value small,.member-billing-date small { color: #8a98aa; font-size: .54rem; white-space: nowrap; }
.member-billing-unit,.member-cycle-count,.member-method-pill,.member-invoice-reference { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; color: #4b617c; background: #f0f4f8; font-size: .56rem; font-weight: 700; white-space: nowrap; }
.member-billing-unit i { color: #7e91a9; }
.member-cycle-count strong { color: #2f64df; }
.member-billing-cycle-summary { display: grid; gap: 8px; width: 175px; max-width: 100%; }
.member-billing-cycle-line { display: grid; justify-items: start; gap: 4px; }
.member-billing-cycle-months { font-size: .63rem; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.member-billing-value strong,.member-estimated-value { color: #183250; font-size: .71rem; font-weight: 820; white-space: nowrap; }
.member-invoice-number > span { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 9px; color: #3169f5; background: #edf3ff; }
.member-invoice-reference { color: #5d4aa1; background: #f2efff; }
.member-method-pill { color: #24647a; background: #eaf8fa; }
.member-receipt-waiting { display: inline-flex; align-items: center; gap: 6px; color: #8c98a8; font-size: .54rem; white-space: nowrap; }
.member-billing-actions { display: inline-flex; gap: 6px; }
.member-billing-actions form { margin: 0; }
.member-billing-actions button { height: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid #c9d8f5; border-radius: 8px; color: #3169f5; background: #f7f9ff; font-size: .56rem; font-weight: 740; }
.member-billing-actions button.is-payment { border-color: #b9e8d1; color: #14875d; background: #f0faf5; }
.member-billing-actions button:hover { background: #edf3ff; }
.member-billing-actions button.is-payment:hover { background: #e6f7ef; }
.member-billing-actions button:disabled { cursor: not-allowed; opacity: .5; }
.member-document-actions { display: inline-flex; gap: 5px; }
.member-document-actions a { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #dce5ef; border-radius: 8px; color: #6b7d93; background: #fff; text-decoration: none; }
.member-document-actions a:hover { border-color: #b4c8fa; color: #3169f5; background: #f6f9ff; }
.member-document-actions a.is-receipt { color: #168b61; background: #f1fbf6; }

.member-billing-empty { min-height: 155px; display: grid; grid-template-columns: 66px minmax(300px,1fr) auto; align-items: center; gap: 18px; padding: 26px 29px; border-top: 1px solid #e8edf4; background: radial-gradient(circle at 2% 50%,rgba(49,105,245,.045),transparent 30%),linear-gradient(110deg,#fff,#f9fbfe); }
.member-billing-empty-visual { position: relative; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid #dae6f8; border-radius: 18px; color: #3169f5; background: linear-gradient(145deg,#f2f7ff,#e7f0ff); font-size: 1.3rem; box-shadow: 0 10px 22px rgba(48,104,226,.08); }
.member-billing-empty-visual > span { position: absolute; right: -5px; bottom: -5px; width: 24px; height: 24px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; color: #fff; background: #20b77a; font-size: .48rem; }
.member-billing-empty h3 { margin: 5px 0 4px; color: #1d314c; font-size: .86rem; font-weight: 790; }
.member-billing-empty p { max-width: 620px; margin: 0; color: #7a899e; font-size: .62rem; line-height: 1.5; }
.member-billing-empty .btn { border-radius: 9px; font-size: .61rem; font-weight: 740; }

.member-receipt-toolbar { display: grid; grid-template-columns: repeat(3,minmax(170px,1fr)) auto; align-items: end; gap: 8px; margin: 0 20px 16px; padding: 10px; border: 1px solid #dfe7f1; border-radius: 11px; background: #f8fafd; }
.member-receipt-toolbar label { min-width: 0; margin: 0; }
.member-receipt-toolbar label > span { display: block; margin: 0 0 5px 2px; color: #60728a; font-size: .55rem; font-weight: 730; }
.member-receipt-toolbar label > div { position: relative; display: flex; align-items: center; }
.member-receipt-toolbar label i { position: absolute; z-index: 1; left: 11px; color: #8ca0b7; font-size: .63rem; pointer-events: none; }
.member-receipt-toolbar .form-control,.member-receipt-toolbar .form-select { min-height: 36px; padding-left: 32px; border-color: #dce5ef; border-radius: 8px; color: #3f536c; background-color: #fff; font-size: .62rem; box-shadow: none; }
.member-receipt-toolbar .btn { min-height: 36px; padding-inline: 14px; border-radius: 8px; font-size: .59rem; font-weight: 750; }

.member-payment-modal .modal-content { overflow: hidden; border: 0; border-radius: 16px; box-shadow: 0 25px 70px rgba(16,34,61,.25); }
.member-payment-modal .modal-header { align-items: flex-start; padding: 20px 21px 16px; border-bottom: 1px solid #e8edf4; background: linear-gradient(110deg,#fff,#f6f9ff); }
.member-payment-modal .modal-title { margin: 4px 0 2px; color: #172b46; font-size: 1rem; font-weight: 790; }
.member-payment-modal .modal-header p { margin: 0; color: #7f8da1; font-size: .57rem; }
.member-payment-modal .modal-body { padding: 18px 21px; }
.member-modal-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.member-modal-fields label { min-width: 0; margin: 0; }
.member-modal-fields label.is-wide { grid-column: 1 / -1; }
.member-modal-fields label > span { display: block; margin-bottom: 5px; color: #4c6078; font-size: .58rem; font-weight: 720; }
.member-modal-fields label > div { position: relative; display: flex; align-items: center; }
.member-modal-fields label > div > i { position: absolute; z-index: 1; left: 11px; color: #8ea0b5; font-size: .63rem; pointer-events: none; }
.member-modal-fields .form-control,.member-modal-fields .form-select { min-height: 38px; padding-left: 32px; border-color: #dce5ef; border-radius: 8px; color: #3c5069; font-size: .63rem; box-shadow: none; }
.member-modal-fields textarea.form-control { padding: 9px 11px; }
.member-modal-fields label > small { display: block; margin-top: 4px; color: #919dae; font-size: .52rem; }
.member-payment-modal .modal-footer { padding: 12px 21px; border-top-color: #e8edf4; background: #fafbfd; }
.member-payment-modal .modal-footer .btn { min-width: 105px; border-radius: 8px; font-size: .61rem; font-weight: 740; }

@media (max-width: 1299.98px) {
  .member-billing-pulse { grid-template-columns: minmax(310px,.8fr) minmax(390px,1fr) 250px; }
  .member-billing-primary { padding-inline: 21px; }
  .member-billing-signals article { padding: 11px; }
  .member-billing-runbook { padding: 17px; }
}

@media (max-width: 1099.98px) {
  .member-billing-pulse { grid-template-columns: minmax(330px,.8fr) minmax(430px,1.1fr); }
  .member-billing-runbook { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
  .member-billing-runbook .member-eyebrow,.member-billing-runbook p { display: none; }
  .member-billing-runbook h2 { margin: 0; }
  .member-billing-runbook form + form { margin-top: 0; }
  .member-billing-runbook .btn { min-width: 165px; }
}

@media (max-width: 991.98px) {
  .member-billing-header { align-items: flex-start; flex-direction: column; }
  .member-receipt-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 767.98px) {
  .member-billing-pulse { grid-template-columns: 1fr; }
  .member-billing-primary { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .member-billing-runbook { grid-column: auto; grid-template-columns: 1fr; }
  .member-billing-runbook form,.member-billing-runbook .btn { width: 100%; }
  .member-billing-panel-heading { align-items: flex-start; flex-direction: column; }
  .member-billing-empty { grid-template-columns: 58px 1fr; padding: 23px 20px; }
  .member-billing-empty-visual { width: 56px; height: 56px; border-radius: 15px; }
  .member-billing-empty .btn { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 575.98px) {
  .member-billing-signals { grid-template-columns: 1fr; }
  .member-billing-signals article { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-billing-signals article:nth-child(3) { border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-billing-lock { grid-template-columns: 38px 1fr; }
  .member-billing-lock .btn { grid-column: 1 / -1; }
  .member-receipt-toolbar { grid-template-columns: 1fr; margin-inline: 12px; }
  .member-billing-empty { grid-template-columns: 1fr; }
  .member-billing-empty .btn { grid-column: auto; width: 100%; }
  .member-modal-fields { grid-template-columns: 1fr; }
  .member-modal-fields label.is-wide { grid-column: auto; }
}

/* Member reporting and intelligence */
.member-reports-page { display: grid; gap: 17px; max-width: 1540px; margin: 0 auto; padding: 2px 0 28px; }
.member-reports-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2px 2px; }
.member-reports-header h1 { margin: 0; color: #0d1b32; font-size: clamp(1.75rem,2.2vw,2.2rem); font-weight: 800; letter-spacing: -.045em; }
.member-reports-header p { margin: 5px 0 0; color: #65758b; font-size: .84rem; }

.member-report-pulse { position: relative; display: grid; grid-template-columns: minmax(420px,1.05fr) minmax(470px,1.2fr) 250px; min-height: 216px; overflow: hidden; border: 1px solid rgba(255,255,255,.07); border-radius: 18px; color: #fff; background: radial-gradient(circle at 5% 0%,rgba(38,207,207,.17),transparent 32%),radial-gradient(circle at 100% 100%,rgba(78,103,242,.2),transparent 35%),linear-gradient(125deg,#0b1e3b,#112d58 54%,#173c73); box-shadow: 0 18px 38px rgba(23,48,88,.14); }
.member-report-pulse::before { content: ""; position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.17) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.13) 1px,transparent 1px); background-size: 41px 41px; mask-image: linear-gradient(90deg,#000,transparent 73%); }
.member-report-primary { position: relative; z-index: 1; display: grid; grid-template-columns: 102px 1fr; align-items: center; gap: 18px; padding: 22px 25px; border-right: 1px solid rgba(255,255,255,.1); }
.member-report-primary .member-live-label { position: absolute; top: 22px; left: 25px; margin: 0; }
.member-report-ring { --report-progress: 0; position: relative; width: 102px; height: 102px; display: grid; place-items: center; margin-top: 22px; border-radius: 50%; background: conic-gradient(#3ad8c8 calc(var(--report-progress) * 1%),rgba(255,255,255,.1) 0); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07),0 0 30px rgba(39,211,202,.09); }
.member-report-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: linear-gradient(145deg,#102c56,#0d2448); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.member-report-ring > div { position: relative; display: grid; text-align: center; }
.member-report-ring strong { font-size: 1.45rem; line-height: 1; letter-spacing: -.05em; }
.member-report-ring span { margin-top: 4px; color: #9fb7d7; font-size: .5rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.member-report-primary-copy { min-width: 0; margin-top: 21px; }
.member-report-primary-copy .member-eyebrow { color: #50d9d2; }
.member-report-primary-copy h2 { margin: 6px 0 5px; color: #fff; font-size: 1.05rem; font-weight: 780; letter-spacing: -.025em; }
.member-report-primary-copy p { margin: 0; color: #9eb5d3; font-size: .57rem; line-height: 1.5; }
.member-report-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 14px; }
.member-report-metrics article { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 9px; padding: 13px; border-right: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); }
.member-report-metrics article:nth-child(2n) { border-right: 0; }
.member-report-metrics article:nth-child(n+3) { border-bottom: 0; }
.member-report-metrics article > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #82abff; background: rgba(80,133,240,.14); font-size: .72rem; }
.member-report-metrics article > span.is-green { color: #4cdda8; background: rgba(48,196,143,.13); }
.member-report-metrics article > span.is-amber { color: #fac366; background: rgba(238,168,50,.13); }
.member-report-metrics article > span.is-violet { color: #b5a1ff; background: rgba(130,101,233,.14); }
.member-report-metrics article > div { min-width: 0; display: grid; gap: 2px; }
.member-report-metrics small { color: #8fa8c9; font-size: .52rem; }
.member-report-metrics strong { overflow: hidden; color: #fff; font-size: .84rem; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.member-report-metrics em { color: #b0c2da; font-size: .51rem; font-style: normal; }
.member-report-statuses { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 19px; border-left: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.member-report-statuses .member-eyebrow { color: #51d9d2; }
.member-report-statuses h2 { margin: 6px 0 13px; color: #fff; font-size: .88rem; font-weight: 780; }
.member-report-statuses > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.member-report-statuses > div > span { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.04); }
.member-report-statuses > div i { width: 5px; height: 5px; border-radius: 50%; background: #9aabc2; }
.member-report-statuses > div span.is-danger i { background: #ff747d; box-shadow: 0 0 0 4px rgba(255,116,125,.1); }
.member-report-statuses > div span.is-warning i { background: #f3b64f; box-shadow: 0 0 0 4px rgba(243,182,79,.1); }
.member-report-statuses > div span.is-success i { background: #43d89f; box-shadow: 0 0 0 4px rgba(67,216,159,.1); }
.member-report-statuses > div b { color: #fff; font-size: .8rem; }
.member-report-statuses > div small { color: #9eb2cf; font-size: .46rem; }
.member-report-statuses > p { margin: 12px 0 0; color: #91a8c7; font-size: .51rem; text-align: center; }
.member-report-statuses > p strong { color: #fff; }
.member-report-statuses > p i { display: inline-block; width: 3px; height: 3px; margin: 0 5px 2px; border-radius: 50%; background: #5d789f; }

.member-report-panel { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 15px; background: #fff; box-shadow: 0 8px 25px rgba(28,48,74,.055); }
.member-report-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 21px 15px; }
.member-report-panel-heading h2 { margin: 5px 0 2px; color: #172b46; font-size: .96rem; font-weight: 790; letter-spacing: -.022em; }
.member-report-panel-heading p { margin: 0; color: #7d8b9f; font-size: .62rem; }
.member-report-filtered { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #bfd0fa; border-radius: 99px; color: #3169f5; background: #f2f6ff; font-size: .56rem; font-weight: 730; }
.member-report-toolbar { display: grid; grid-template-columns: repeat(2,minmax(140px,.8fr)) repeat(2,minmax(115px,.55fr)) repeat(2,minmax(155px,.85fr)) auto 38px; align-items: end; gap: 7px; margin: 0 20px 15px; padding: 9px; border: 1px solid #dfe7f1; border-radius: 11px; background: #f8fafd; }
.member-report-toolbar label { min-width: 0; margin: 0; }
.member-report-toolbar label > span { display: block; margin: 0 0 5px 2px; color: #60728a; font-size: .53rem; font-weight: 730; }
.member-report-toolbar label > div { position: relative; display: flex; align-items: center; }
.member-report-toolbar label i { position: absolute; z-index: 1; left: 10px; color: #8ca0b7; font-size: .61rem; pointer-events: none; }
.member-report-toolbar .form-control,.member-report-toolbar .form-select { min-height: 36px; padding: 7px 9px 7px 30px; border-color: #dce5ef; border-radius: 8px; color: #3f536c; background-color: #fff; font-size: .6rem; box-shadow: none; }
.member-report-toolbar .form-control:focus,.member-report-toolbar .form-select:focus { border-color: #93b1f7; box-shadow: 0 0 0 3px rgba(49,105,245,.08); }
.member-report-toolbar .btn { min-height: 36px; padding-inline: 13px; border-radius: 8px; font-size: .58rem; font-weight: 750; }
.member-report-reset { width: 38px; height: 36px; display: grid; place-items: center; border: 1px solid #dce5ef; border-radius: 8px; color: #77889d; background: #fff; text-decoration: none; }
.member-report-reset:hover,.member-report-reset.is-active { border-color: #b7caf8; color: #3169f5; background: #f4f7ff; }
.member-active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 20px 14px; }
.member-active-filters > span { margin-right: 3px; color: #8290a2; font-size: .53rem; font-weight: 750; text-transform: uppercase; }
.member-active-filters > i { padding: 5px 7px; border: 1px solid #dfe7f0; border-radius: 99px; color: #66778d; background: #fafbfd; font-size: .53rem; font-style: normal; }
.member-active-filters > i b { color: #334b69; }

.member-report-table-wrap { border-top: 1px solid #e8edf4; }
.member-report-table { min-width: 1430px; }
.member-report-table thead th { padding: 11px 12px; border-color: #e5ebf2; color: #76859a; background: #f6f8fb; font-size: .53rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.member-report-table thead th:first-child,.member-report-table tbody td:first-child { padding-left: 21px; }
.member-report-table thead th:last-child,.member-report-table tbody td:last-child { padding-right: 21px; }
.member-report-table tbody tr { height: 66px; box-shadow: inset 3px 0 0 transparent; }
.member-report-table tbody tr.has-risk { box-shadow: inset 3px 0 0 #e64d54; }
.member-report-table tbody tr.has-warning { box-shadow: inset 3px 0 0 #eca022; }
.member-report-table tbody td { padding: 10px 12px; border-color: #edf1f6; color: #53647a; font-size: .61rem; }
.member-report-person { min-width: 145px; display: flex; align-items: center; gap: 9px; }
.member-report-person > span { width: 35px; height: 35px; display: grid; flex: 0 0 35px; place-items: center; border-radius: 10px; color: #285ddb; background: #e8f0ff; font-size: .59rem; font-weight: 820; }
.member-report-person > div,.member-report-unit,.member-report-money { display: grid; gap: 2px; }
.member-report-person strong,.member-report-unit strong,.member-report-money strong { color: #283c57; font-size: .63rem; font-weight: 730; white-space: nowrap; }
.member-report-person small,.member-report-unit small,.member-report-money small { color: #8b99ab; font-size: .52rem; white-space: nowrap; }
.member-report-unit strong { display: inline-flex; align-items: center; gap: 6px; }
.member-report-unit strong i { color: #7f92aa; }
.member-report-area { color: #344b67; font-weight: 720; white-space: nowrap; }
.member-report-area small { color: #8b99aa; font-size: .5rem; }
.member-report-monthly,.member-report-amount { color: #19324f; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.member-report-amount.is-paid { color: #14875d; }
.member-report-amount.is-discount { color: #7254bd; }
.member-report-amount.is-balance { color: #c03d44; }
.member-report-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 20px; color: #8492a5; background: #fbfcfe; font-size: .56rem; }
.member-report-footer strong { color: #40536d; }
.member-report-footer a { display: inline-flex; align-items: center; gap: 6px; color: #3169f5; font-weight: 720; text-decoration: none; }

.member-report-empty { min-height: 235px; display: grid; grid-template-columns: 86px minmax(340px,1fr) minmax(250px,.55fr); align-items: center; gap: 25px; padding: 38px 43px; border-top: 1px solid #e8edf4; background: radial-gradient(circle at 2% 50%,rgba(49,105,245,.05),transparent 29%),linear-gradient(110deg,#fff,#f8fbff); }
.member-report-empty-visual { position: relative; width: 82px; height: 82px; display: grid; place-items: center; border: 1px solid #dae6f8; border-radius: 22px; color: #3169f5; background: linear-gradient(145deg,#f2f7ff,#e7f0ff); font-size: 1.65rem; box-shadow: 0 14px 28px rgba(48,104,226,.085); }
.member-report-empty-visual > span { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; display: grid; place-items: center; border: 4px solid #fff; border-radius: 50%; color: #fff; background: #21b67b; font-size: .55rem; }
.member-report-empty h3 { margin: 6px 0 5px; color: #1d314c; font-size: 1rem; font-weight: 800; letter-spacing: -.022em; }
.member-report-empty p { max-width: 620px; margin: 0; color: #77869b; font-size: .66rem; line-height: 1.55; }
.member-report-empty > div:nth-child(2) > div { display: flex; gap: 8px; margin-top: 15px; }
.member-report-empty .btn { min-height: 37px; display: inline-flex; align-items: center; border-radius: 9px; font-size: .6rem; font-weight: 740; }
.member-report-empty aside { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid #dfe8f4; border-radius: 11px; background: rgba(255,255,255,.82); }
.member-report-empty aside > span { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 9px; color: #179465; background: #e9f8f1; }
.member-report-empty aside > div { display: grid; gap: 3px; }
.member-report-empty aside strong { color: #3e526b; font-size: .59rem; }
.member-report-empty aside small { color: #8794a6; font-size: .52rem; line-height: 1.45; }

@media (max-width: 1299.98px) {
  .member-report-pulse { grid-template-columns: minmax(390px,1fr) minmax(420px,1.1fr) 225px; }
  .member-report-primary { padding-inline: 21px; }
  .member-report-metrics article { padding: 10px; }
  .member-report-toolbar { grid-template-columns: repeat(4,minmax(130px,1fr)); }
  .member-report-toolbar .btn { min-width: 130px; }
}

@media (max-width: 1099.98px) {
  .member-report-pulse { grid-template-columns: minmax(370px,.95fr) minmax(420px,1.05fr); }
  .member-report-statuses { grid-column: 1 / -1; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 13px; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
  .member-report-statuses h2 { margin: 0; }
  .member-report-statuses > div { min-width: 250px; }
  .member-report-statuses > p { margin: 0; }
}

@media (max-width: 991.98px) {
  .member-reports-header { align-items: flex-start; flex-direction: column; }
  .member-report-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .member-report-empty { grid-template-columns: 76px 1fr; padding: 32px; }
  .member-report-empty aside { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  .member-report-pulse { grid-template-columns: 1fr; }
  .member-report-primary { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .member-report-statuses { grid-column: auto; grid-template-columns: 1fr; }
  .member-report-statuses > div { min-width: 0; }
  .member-report-panel-heading { align-items: flex-start; flex-direction: column; }
  .member-report-empty { grid-template-columns: 62px 1fr; gap: 18px; padding: 26px 21px; }
  .member-report-empty-visual { width: 60px; height: 60px; border-radius: 17px; font-size: 1.3rem; }
  .member-report-empty-visual > span { width: 24px; height: 24px; border-width: 3px; }
}

@media (max-width: 575.98px) {
  .member-report-primary { grid-template-columns: 86px 1fr; }
  .member-report-ring { width: 86px; height: 86px; }
  .member-report-ring strong { font-size: 1.25rem; }
  .member-report-metrics { grid-template-columns: 1fr; }
  .member-report-metrics article { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-report-metrics article:nth-child(3) { border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-report-toolbar { grid-template-columns: 1fr; margin-inline: 12px; }
  .member-report-reset { width: 100%; }
  .member-report-footer { align-items: flex-start; flex-direction: column; }
  .member-report-empty { grid-template-columns: 1fr; }
  .member-report-empty > div:nth-child(2) > div { flex-direction: column; }
  .member-report-empty .btn { justify-content: center; width: 100%; }
  .member-report-empty aside { grid-column: auto; }
}

/* Member billing policy settings */
.member-policy-page { display: grid; gap: 17px; max-width: 1540px; margin: 0 auto; padding: 2px 0 28px; }
.member-policy-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2px 2px; }
.member-policy-header h1 { margin: 0; color: #0d1b32; font-size: clamp(1.75rem,2.2vw,2.2rem); font-weight: 800; letter-spacing: -.045em; }
.member-policy-header p { margin: 5px 0 0; color: #65758b; font-size: .84rem; }

.member-policy-pulse { position: relative; display: grid; grid-template-columns: minmax(390px,1fr) minmax(440px,1.05fr) 260px; min-height: 205px; overflow: hidden; border: 1px solid rgba(255,255,255,.07); border-radius: 18px; color: #fff; background: radial-gradient(circle at 5% 0%,rgba(38,207,207,.17),transparent 32%),radial-gradient(circle at 100% 100%,rgba(78,103,242,.2),transparent 35%),linear-gradient(125deg,#0b1e3b,#112d58 54%,#173c73); box-shadow: 0 18px 38px rgba(23,48,88,.14); }
.member-policy-pulse::before { content: ""; position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.17) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.13) 1px,transparent 1px); background-size: 41px 41px; mask-image: linear-gradient(90deg,#000,transparent 73%); }
.member-policy-primary { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 23px 25px; border-right: 1px solid rgba(255,255,255,.1); }
.member-policy-primary .member-live-label { margin-bottom: 19px; }
.member-policy-primary > .member-eyebrow { color: #50d9d2; }
.member-policy-primary > strong { display: block; margin: 6px 0 3px; color: #fff; font-size: 1.75rem; font-weight: 830; letter-spacing: -.05em; }
.member-policy-primary > strong small { color: #9db4d3; font-size: .62rem; font-weight: 650; letter-spacing: 0; }
.member-policy-primary h2 { margin: 2px 0 4px; color: #eaf2ff; font-size: .72rem; font-weight: 730; }
.member-policy-primary p { max-width: 390px; margin: 0; color: #95adcc; font-size: .56rem; line-height: 1.5; }
.member-policy-signals { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 13px; }
.member-policy-signals article { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 9px; min-width: 0; padding: 13px; border-right: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); }
.member-policy-signals article:nth-child(2n) { border-right: 0; }
.member-policy-signals article:nth-child(n+3) { border-bottom: 0; }
.member-policy-signals article > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #82abff; background: rgba(80,133,240,.14); font-size: .72rem; }
.member-policy-signals article > span.is-violet { color: #b5a1ff; background: rgba(130,101,233,.14); }
.member-policy-signals article > span.is-green { color: #4cdda8; background: rgba(48,196,143,.13); }
.member-policy-signals article > span.is-amber { color: #fac366; background: rgba(238,168,50,.13); }
.member-policy-signals article > div { min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; }
.member-policy-signals small { color: #8fa8c9; font-size: .52rem; }
.member-policy-signals strong { grid-row: 1 / 3; grid-column: 2; color: #fff; font-size: 1.05rem; letter-spacing: -.03em; }
.member-policy-signals em { overflow: hidden; color: #b0c2da; font-size: .51rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.member-policy-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 20px; border-left: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.member-policy-note > span { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: #55ddd4; background: rgba(255,255,255,.055); }
.member-policy-note > div { min-width: 0; }
.member-policy-note .member-eyebrow { color: #52d9d2; }
.member-policy-note h2 { margin: 6px 0 4px; color: #fff; font-size: .84rem; font-weight: 770; }
.member-policy-note p { margin: 0; color: #93aac9; font-size: .54rem; line-height: 1.5; }

.member-policy-builders { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 17px; }
.member-policy-card { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 15px; background: #fff; box-shadow: 0 8px 25px rgba(28,48,74,.055); }
.member-policy-card-heading { display: flex; align-items: center; gap: 12px; padding: 18px 20px 15px; border-bottom: 1px solid #e9eef4; background: linear-gradient(110deg,#fff,#f9fbff); }
.member-policy-icon { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border-radius: 12px; color: #3169f5; background: #eaf1ff; }
.member-policy-card.is-discount .member-policy-icon { color: #7655d7; background: #f0ecff; }
.member-policy-card-heading > div { min-width: 0; }
.member-policy-card-heading h2 { margin: 4px 0 2px; color: #172b46; font-size: .9rem; font-weight: 790; letter-spacing: -.02em; }
.member-policy-card-heading p { margin: 0; color: #7f8da1; font-size: .57rem; }
.member-policy-badge { margin-left: auto; padding: 6px 8px; border: 1px solid #dce5ef; border-radius: 99px; color: #63758c; background: #fff; font-size: .52rem; font-weight: 740; white-space: nowrap; }
.member-policy-form { padding: 18px 20px 0; }
.member-policy-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.member-policy-fields.is-discount { grid-template-columns: repeat(3,minmax(0,1fr)); }
.member-policy-fields label { min-width: 0; margin: 0; }
.member-policy-fields label > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #4a5e77; font-size: .59rem; font-weight: 720; }
.member-policy-fields label > span b { color: #e24b53; }
.member-policy-fields label > span small { color: #9ba7b7; font-size: .49rem; font-weight: 550; }
.member-policy-fields label > div { position: relative; display: flex; align-items: center; }
.member-policy-fields label > div > i { position: absolute; z-index: 1; left: 11px; color: #8fa1b5; font-size: .63rem; pointer-events: none; }
.member-policy-fields .form-control,.member-policy-fields .form-select { min-height: 39px; padding: 8px 10px 8px 33px; border-color: #dce5ef; border-radius: 9px; color: #3b5069; background-color: #fff; font-size: .64rem; box-shadow: none; }
.member-policy-fields .form-control:focus,.member-policy-fields .form-select:focus { border-color: #93b1f7; box-shadow: 0 0 0 3px rgba(49,105,245,.08); }
.member-policy-fields label > div.has-suffix .form-control { padding-right: 47px; }
.member-policy-fields label > div.has-suffix > em { position: absolute; right: 10px; color: #8190a3; font-size: .51rem; font-style: normal; font-weight: 700; }
.member-policy-fields label > small { display: block; margin-top: 5px; color: #8e9bac; font-size: .51rem; line-height: 1.4; }
.member-policy-switches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.member-policy-switches.is-single { grid-template-columns: minmax(0,1fr); max-width: 340px; }
.member-policy-switches > label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 11px; border: 1px solid #e0e7f0; border-radius: 10px; background: #fafcff; cursor: pointer; }
.member-policy-switches > label > span:last-child { display: grid; gap: 2px; }
.member-policy-switches strong { color: #40546d; font-size: .58rem; }
.member-policy-switches small { color: #8996a8; font-size: .5rem; }
.member-policy-preview { display: grid; grid-template-columns: 39px 1fr auto; align-items: center; gap: 11px; margin-top: 14px; padding: 12px; border: 1px solid #d9e5fb; border-radius: 11px; background: #f3f7ff; }
.member-policy-preview > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; color: #3169f5; background: #e3ecff; }
.member-policy-preview.is-discount { border-color: #dfd5fa; background: #f7f4ff; }
.member-policy-preview.is-discount > span { color: #7655d7; background: #eae3ff; }
.member-policy-preview > div { min-width: 0; display: grid; gap: 2px; }
.member-policy-preview small { color: #708198; font-size: .51rem; }
.member-policy-preview strong { overflow: hidden; color: #1d3f77; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.member-policy-preview.is-discount strong { color: #5b42a2; }
.member-policy-preview > em { color: #6f8198; font-size: .51rem; font-style: normal; text-align: right; }
.member-policy-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 17px -20px 0; padding: 12px 20px; border-top: 1px solid #e9eef4; background: #fafbfd; }
.member-policy-form > footer > span { display: inline-flex; align-items: center; gap: 6px; color: #8693a5; font-size: .5rem; }
.member-policy-form > footer > span i { color: #6f8aba; }
.member-policy-form > footer .btn { min-height: 36px; border-radius: 8px; font-size: .59rem; font-weight: 750; white-space: nowrap; }

.member-policy-library { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 15px; background: #fff; box-shadow: 0 8px 25px rgba(28,48,74,.055); }
.member-policy-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 21px 16px; border-bottom: 1px solid #e9eef4; }
.member-policy-library-heading h2 { margin: 5px 0 2px; color: #172b46; font-size: .95rem; font-weight: 790; letter-spacing: -.02em; }
.member-policy-library-heading p { margin: 0; color: #7d8b9f; font-size: .61rem; }
.member-policy-library-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.member-policy-library-grid > article { min-width: 0; padding: 18px 20px 20px; }
.member-policy-library-grid > article + article { border-left: 1px solid #e9eef4; }
.member-policy-list-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.member-policy-list-heading > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #3169f5; background: #eaf1ff; }
.member-policy-list-heading > span.is-violet { color: #7655d7; background: #f0ecff; }
.member-policy-list-heading > div { display: grid; gap: 2px; }
.member-policy-list-heading strong { color: #344a64; font-size: .64rem; }
.member-policy-list-heading small { color: #8a97a9; font-size: .52rem; }
.member-policy-list { display: grid; gap: 7px; }
.member-policy-list > div { display: grid; grid-template-columns: 34px minmax(120px,1fr) auto auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #e2e9f1; border-radius: 10px; background: #fbfcfe; }
.member-policy-list > div.is-inactive { opacity: .62; }
.member-policy-list-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #3169f5; background: #edf3ff; }
.member-policy-list-icon.is-violet { color: #7655d7; background: #f1edff; }
.member-policy-list > div > div:nth-child(2),.member-policy-list-value { min-width: 0; display: grid; gap: 2px; }
.member-policy-list > div > div:nth-child(2) strong { overflow: hidden; color: #354a64; font-size: .6rem; text-overflow: ellipsis; white-space: nowrap; }
.member-policy-list > div > div:nth-child(2) small,.member-policy-list-value small { color: #8c99aa; font-size: .49rem; white-space: nowrap; }
.member-policy-list-value { text-align: right; }
.member-policy-list-value strong { color: #1e395e; font-size: .64rem; white-space: nowrap; }
.member-policy-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #bce9d4; border-radius: 99px; color: #15885e; background: #eefaf4; font-size: .5rem; font-weight: 730; white-space: nowrap; }
.member-policy-status > i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.member-policy-status.is-inactive { border-color: #d9dfe7; color: #7d8999; background: #f4f6f8; }
.member-policy-list-empty { min-height: 86px; display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px dashed #dbe4ee; border-radius: 10px; background: #fafcfe; }
.member-policy-list-empty > span { width: 37px; height: 37px; display: grid; flex: 0 0 37px; place-items: center; border-radius: 10px; color: #73859b; background: #edf2f7; }
.member-policy-list-empty > span.is-violet { color: #7655d7; background: #f0ecff; }
.member-policy-list-empty > div { display: grid; gap: 3px; }
.member-policy-list-empty strong { color: #455a73; font-size: .6rem; }
.member-policy-list-empty small { color: #8996a8; font-size: .51rem; }

@media (max-width: 1199.98px) {
  .member-policy-pulse { grid-template-columns: minmax(350px,.9fr) minmax(390px,1fr) 230px; }
  .member-policy-primary { padding-inline: 21px; }
  .member-policy-signals article { padding: 10px; }
  .member-policy-fields.is-discount { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .member-policy-fields.is-discount label:last-child { grid-column: 1 / -1; }
}

@media (max-width: 991.98px) {
  .member-policy-header { align-items: flex-start; flex-direction: column; }
  .member-policy-pulse { grid-template-columns: minmax(350px,.9fr) minmax(390px,1.1fr); }
  .member-policy-note { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
  .member-policy-builders { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
  .member-policy-pulse { grid-template-columns: 1fr; }
  .member-policy-primary { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .member-policy-note { grid-column: auto; }
  .member-policy-library-grid { grid-template-columns: 1fr; }
  .member-policy-library-grid > article + article { border-top: 1px solid #e9eef4; border-left: 0; }
}

@media (max-width: 575.98px) {
  .member-policy-signals { grid-template-columns: 1fr; }
  .member-policy-signals article { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-policy-signals article:nth-child(3) { border-bottom: 1px solid rgba(255,255,255,.09); }
  .member-policy-card-heading { align-items: flex-start; flex-wrap: wrap; }
  .member-policy-badge { margin-left: 0; }
  .member-policy-fields,.member-policy-fields.is-discount { grid-template-columns: 1fr; }
  .member-policy-fields.is-discount label:last-child { grid-column: auto; }
  .member-policy-switches { grid-template-columns: 1fr; }
  .member-policy-preview { grid-template-columns: 39px 1fr; }
  .member-policy-preview > em { grid-column: 1 / -1; text-align: left; }
  .member-policy-form > footer { align-items: flex-start; flex-direction: column; }
  .member-policy-form > footer .btn { width: 100%; }
  .member-policy-library-heading { align-items: flex-start; flex-direction: column; }
  .member-policy-list > div { grid-template-columns: 34px 1fr auto; }
  .member-policy-status { grid-column: 2 / -1; justify-self: start; }
}
