/* iSAC Shared Components — Admin Portal & Customer App */

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

html {
  font-family: var(--font-sans);
  background: var(--surface-page);
  color: var(--text-secondary);
}

/* ─── Text color utilities (DS-COLOR-TEXT) ─── */

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-disabled { color: var(--text-disabled); }
.text-inverse { color: var(--text-inverse); }
.text-brand { color: var(--text-brand); }
.text-danger { color: var(--text-danger); }
.text-warning { color: var(--text-warning); }
.text-success { color: var(--text-success); }
.text-info { color: var(--text-info); }

.field::placeholder,
.select::placeholder,
textarea.field::placeholder {
  color: var(--text-subtle);
  opacity: 1;
}

.field:disabled,
.select:disabled,
textarea.field:disabled {
  color: var(--text-disabled);
}

body { margin: 0; }

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

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

img, svg { display: block; max-width: 100%; }

/* ─── Layout shells ─── */

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

.admin-layout {
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.admin-shell {
  --admin-sidebar-current: var(--admin-sidebar-width);
  grid-template-columns: var(--admin-sidebar-current) minmax(0, 1fr);
  transition: grid-template-columns var(--admin-shell-transition);
  overflow-x: clip;
  max-width: 100vw;
}

.admin-shell--sidebar-collapsed {
  --admin-sidebar-current: var(--admin-sidebar-collapsed-width);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, var(--isac-brand-900), var(--surface-inverse));
  color: var(--text-inverse);
  padding: var(--space-5) var(--space-4);
  overflow: auto;
  z-index: var(--z-sidebar);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--isac-brand-400), var(--isac-blue-500));
  display: grid;
  place-items: center;
  font-weight: var(--font-weight-heavy);
}

.brand-title { font-weight: var(--font-weight-heavy); font-size: 17px; }
.brand-sub { font-size: var(--fs-xs); opacity: 0.78; }

.nav-group {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--admin-type-sidebar-group-size);
  font-weight: var(--admin-type-sidebar-group-weight);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--isac-brand-200);
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-sidebar-group {
  margin: 0;
}

.admin-sidebar-group:first-child .admin-sidebar-group__toggle {
  margin-top: 0;
}

.admin-sidebar-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  min-height: 40px;
  margin: var(--space-4) 0 var(--space-2);
  padding: 10px var(--space-3);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.admin-sidebar-group__toggle:hover,
.admin-sidebar-group__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-inverse);
  outline: none;
}

.admin-sidebar-group.is-active .admin-sidebar-group__toggle {
  color: var(--isac-brand-100);
}

.admin-sidebar-group__label {
  flex: 1;
  min-width: 0;
}

.admin-sidebar-group__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

.admin-sidebar-group__chevron .icon {
  width: 14px;
  height: 14px;
  color: var(--isac-brand-200);
}

.admin-sidebar-group__toggle:hover .admin-sidebar-group__chevron .icon,
.admin-sidebar-group.is-active .admin-sidebar-group__chevron .icon {
  color: var(--text-inverse);
}

.admin-sidebar-group__panel {
  display: block;
  overflow: hidden;
  transition: opacity var(--transition-fast);
}

.admin-sidebar-group.is-collapsed .admin-sidebar-group__panel {
  display: none;
}

.admin-sidebar-group.is-expanded .admin-sidebar-group__panel {
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--isac-brand-100);
  margin: 2px 0;
  font-size: var(--admin-type-sidebar-nav-size);
  font-weight: var(--admin-type-sidebar-nav-weight);
  transition: background var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-inverse);
}

.nav-icon {
  width: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon .icon { color: var(--isac-brand-200); }

.nav-link:hover .nav-icon .icon,
.nav-link.active .nav-icon .icon {
  color: var(--text-inverse);
}

/* ——— Icon system ——— */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: currentColor;
}

.icon-sm { width: var(--icon-size-sm); height: var(--icon-size-sm); }
.icon-md { width: var(--icon-size-md); height: var(--icon-size-md); }
.icon-lg { width: var(--icon-size-lg); height: var(--icon-size-lg); }

.icon-muted { color: var(--text-muted); }
.icon-primary { color: var(--color-primary); }
.icon-danger { color: var(--color-danger); }
.icon-success { color: var(--color-success); }
.icon-warning { color: var(--color-warning); }

.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.tab-icon .icon { color: var(--text-muted); }
.tab-item.active .tab-icon .icon { color: var(--color-primary); }

.quick-action-icon,
.home-shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-1);
}

.quick-action-icon .icon,
.home-shortcut-icon .icon {
  color: var(--color-primary);
}

.searchbox-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.header-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-badge-weight);
  line-height: var(--admin-type-badge-line);
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-width: 44px;
  min-height: 44px;
}

.header-notify-badge {
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.sidebar-toggle .icon { color: var(--text-default); }

.page-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.skeleton-hero {
  height: 120px;
  border-radius: var(--radius-lg);
}

.skeleton-line.md { width: 75%; }

.page-error-state {
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.page-error-actions,
.empty-state-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.error-state-icon,
.permission-denied-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.admin-main { min-width: 0; }

.topbar {
  height: var(--topbar);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: color-mix(in srgb, var(--surface-card) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
}

.searchbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  min-width: 340px;
  color: var(--text-muted);
}

.page {
  padding: var(--space-6);
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ─── Admin Typography System (AUX-TYPO) ─── */

.admin-type-page-title,
.admin-type-page-desc,
.admin-type-section-title,
.admin-type-card-title,
.admin-type-body,
.admin-type-meta,
.admin-type-table-header,
.admin-type-table-cell,
.admin-type-form-label,
.admin-type-form-help,
.admin-type-metric-lg,
.admin-type-metric-md,
.admin-type-button,
.admin-type-badge {
  font-family: var(--font-sans);
}

.admin-type-page-title {
  font-size: var(--admin-type-page-title-size);
  font-weight: var(--admin-type-page-title-weight);
  line-height: var(--admin-type-page-title-line);
  color: var(--text-strong);
}

.admin-type-page-desc {
  font-size: var(--admin-type-page-desc-size);
  font-weight: var(--admin-type-page-desc-weight);
  line-height: var(--admin-type-page-desc-line);
  color: var(--text-muted);
}

.admin-type-section-title {
  font-size: var(--admin-type-section-title-size);
  font-weight: var(--admin-type-section-title-weight);
  line-height: var(--admin-type-section-title-line);
  color: var(--text-strong);
}

.admin-type-card-title {
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
  line-height: var(--admin-type-card-title-line);
  color: var(--text-strong);
}

.admin-type-body {
  font-size: var(--admin-type-body-size);
  font-weight: var(--admin-type-body-weight);
  line-height: var(--admin-type-body-line);
  color: var(--text-default);
}

.admin-type-meta {
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
  line-height: var(--admin-type-meta-line);
  color: var(--text-muted);
}

.admin-type-table-header {
  font-size: var(--admin-type-table-header-size);
  font-weight: var(--admin-type-table-header-weight);
  line-height: var(--admin-type-table-header-line);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-type-table-cell {
  font-size: var(--admin-type-table-cell-size);
  font-weight: var(--admin-type-table-cell-weight);
  line-height: var(--admin-type-table-cell-line);
  color: var(--text-default);
}

.admin-type-form-label {
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  line-height: var(--admin-type-form-label-line);
  color: var(--text-muted);
}

.admin-type-form-help {
  font-size: var(--admin-type-form-help-size);
  font-weight: var(--admin-type-form-help-weight);
  line-height: var(--admin-type-form-help-line);
  color: var(--text-muted);
}

.admin-type-metric-lg {
  font-size: var(--admin-type-metric-lg-size);
  font-weight: var(--admin-type-metric-lg-weight);
  line-height: var(--admin-type-metric-lg-line);
  color: var(--text-strong);
}

.admin-type-metric-md {
  font-size: var(--admin-type-metric-md-size);
  font-weight: var(--admin-type-metric-md-weight);
  line-height: var(--admin-type-metric-md-line);
  color: var(--text-strong);
}

.admin-type-button {
  font-size: var(--admin-type-button-size);
  font-weight: var(--admin-type-button-weight);
  line-height: var(--admin-type-button-line);
}

.admin-type-badge {
  font-size: var(--admin-type-badge-size);
  font-weight: var(--admin-type-badge-weight);
  line-height: var(--admin-type-badge-line);
}

/* Admin shell + workspace typography bindings */
.admin-layout .page-title {
  font-size: var(--admin-type-page-title-size);
  font-weight: var(--admin-type-page-title-weight);
  line-height: var(--admin-type-page-title-line);
}

.admin-layout .page-desc {
  font-size: var(--admin-type-page-desc-size);
  font-weight: var(--admin-type-page-desc-weight);
  line-height: var(--admin-type-page-desc-line);
}

.admin-layout .nav-group {
  font-size: var(--admin-type-sidebar-group-size);
  font-weight: var(--admin-type-sidebar-group-weight);
}

.admin-layout .nav-link {
  font-size: var(--admin-type-sidebar-nav-size);
  font-weight: var(--admin-type-sidebar-nav-weight);
}

.admin-layout .nav-link.active {
  font-weight: var(--font-weight-emphasis);
}

.admin-layout b,
.admin-layout .data-table td b {
  font-weight: var(--font-weight-emphasis);
}

.admin-layout .breadcrumb-item.active {
  font-weight: var(--font-weight-emphasis);
}

.admin-layout .badge {
  font-size: var(--admin-type-badge-size);
  font-weight: var(--admin-type-badge-weight);
  line-height: var(--admin-type-badge-line);
}

.admin-layout .btn {
  font-size: var(--admin-type-button-size);
  font-weight: var(--admin-type-button-weight);
  line-height: var(--admin-type-button-line);
}

.admin-layout .data-table th {
  font-size: var(--admin-type-table-header-size);
  font-weight: var(--admin-type-table-header-weight);
  line-height: var(--admin-type-table-header-line);
}

.admin-layout .data-table td {
  font-size: var(--admin-type-table-cell-size);
  font-weight: var(--admin-type-table-cell-weight);
  line-height: var(--admin-type-table-cell-line);
}

.admin-layout .data-table td a {
  font-weight: var(--font-weight-emphasis);
}

.admin-layout .form-row label {
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  line-height: var(--admin-type-form-label-line);
}

.admin-layout .field,
.admin-layout .select,
.admin-layout textarea.field {
  font-size: var(--admin-type-body-size);
  font-weight: var(--admin-type-body-weight);
}

.admin-layout .field-hint,
.admin-layout .field-error {
  font-size: var(--admin-type-form-help-size);
  font-weight: var(--admin-type-form-help-weight);
  line-height: var(--admin-type-form-help-line);
}

.admin-layout .field-error {
  font-weight: var(--font-weight-semibold);
  color: var(--text-danger);
}

.admin-layout .kpi-label {
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
}

.admin-layout .kpi-value {
  font-size: var(--admin-type-metric-lg-size);
  font-weight: var(--admin-type-metric-lg-weight);
  line-height: var(--admin-type-metric-lg-line);
}

.admin-layout .kpi-sub {
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
}

.admin-layout .dropdown-menu-item {
  font-size: var(--admin-type-body-size);
  font-weight: var(--font-weight-semibold);
}

.admin-layout .drawer-header h2,
.admin-layout .modal-header h2 {
  font-size: var(--admin-type-drawer-title-size);
  font-weight: var(--admin-type-drawer-title-weight);
  line-height: var(--admin-type-drawer-title-line);
}

/* ─── Page header & breadcrumb ─── */

.page-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
  margin-bottom: var(--space-5);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.breadcrumb-item { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; color: var(--text-subtle); }
.breadcrumb-item a:hover { color: var(--color-primary); }
.breadcrumb-item.active { color: var(--text-strong); font-weight: var(--font-weight-medium); }

.eyebrow {
  font-size: var(--admin-type-meta-size);
  color: var(--text-brand);
  font-weight: var(--admin-type-sidebar-group-weight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-title {
  font-size: var(--admin-type-page-title-size);
  line-height: var(--admin-type-page-title-line);
  color: var(--text-strong);
  font-weight: var(--admin-type-page-title-weight);
  margin: var(--space-1) 0;
}

.page-desc {
  font-size: var(--admin-type-page-desc-size);
  font-weight: var(--admin-type-page-desc-weight);
  line-height: var(--admin-type-page-desc-line);
  color: var(--text-muted);
  margin: var(--space-1) 0 0;
}

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

/* ─── Buttons ─── */

.btn {
  border: 0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--admin-type-button-size);
  font-weight: var(--admin-type-button-weight);
  line-height: var(--admin-type-button-line);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-sm { padding: 7px 10px; font-size: var(--fs-sm); }
.btn-lg { padding: 12px 18px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--color-primary);
  color: var(--text-inverse);
}

.btn-primary:hover:not(:disabled) { background: var(--color-primary-hover); }

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-default);
  border: 1px solid var(--border-soft);
}

.btn-secondary:hover:not(:disabled) { background: var(--surface-subtle); }

.btn-soft {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.btn-soft:hover:not(:disabled) { background: var(--color-primary-muted); }

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
}

.btn-ghost:hover:not(:disabled) { background: var(--color-primary-soft); }

.btn-danger {
  background: var(--status-rejected-bg);
  color: var(--status-rejected-fg);
}

.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--status-rejected-bg) 80%, var(--status-rejected-fg)); }

/* ─── Grid & cards ─── */

.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-pad { padding: 18px; }
.card-flat { box-shadow: none; }
.card-header { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-soft); }
.card-footer { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border-soft); }

.kpi { padding: 18px; }
.kpi-label {
  color: var(--text-muted);
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
}
.kpi-value {
  font-size: var(--admin-type-metric-lg-size);
  font-weight: var(--admin-type-metric-lg-weight);
  line-height: var(--admin-type-metric-lg-line);
  color: var(--text-strong);
  margin-top: var(--space-2);
}
.kpi-sub {
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
  margin-top: var(--space-2);
  color: var(--color-success);
}

/* ─── Forms ─── */

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

.form-row label {
  display: block;
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  line-height: var(--admin-type-form-label-line);
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-row .field,
.form-row .select,
textarea.field { width: 100%; }

.field,
.select,
textarea.field {
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  padding: 10px var(--space-3);
  color: var(--text-default);
  min-height: 40px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field:focus,
.select:focus,
textarea.field:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.field.is-invalid { border-color: var(--color-danger); }
.field-hint {
  font-size: var(--admin-type-form-help-size);
  font-weight: var(--admin-type-form-help-weight);
  line-height: var(--admin-type-form-help-line);
  color: var(--text-muted);
  margin-top: var(--space-1);
}
.field-error {
  font-size: var(--admin-type-form-help-size);
  font-weight: var(--font-weight-semibold);
  line-height: var(--admin-type-form-help-line);
  color: var(--text-danger);
  margin-top: var(--space-1);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.req { color: var(--color-danger); }

.check-row,
.radio-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-md);
  color: var(--text-default);
  cursor: pointer;
}

.check-row input,
.radio-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border-muted);
  border-radius: var(--radius-pill);
  transition: background var(--transition-base);
  cursor: pointer;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--surface-card);
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-xs);
}

.switch input:checked + .switch-slider { background: var(--color-primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch input:focus-visible + .switch-slider { box-shadow: var(--shadow-focus); }

/* ─── Filter bar / toolbar ─── */

.toolbar,
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.filter-bar.standalone {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: var(--space-4);
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── Data table ─── */

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.data-table th {
  font-size: var(--admin-type-table-header-size);
  font-weight: var(--admin-type-table-header-weight);
  line-height: var(--admin-type-table-header-line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-subtle);
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.data-table td {
  font-size: var(--admin-type-table-cell-size);
  font-weight: var(--admin-type-table-cell-weight);
  line-height: var(--admin-type-table-cell-line);
  padding: 14px var(--space-3);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table td a,
.data-table td b {
  font-weight: var(--font-weight-medium);
}

.data-table td[colspan] {
  white-space: normal;
}

.data-table tr:hover td { background: var(--surface-hover); }

/* ─── Badge ─── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  font-size: var(--admin-type-badge-size);
  font-weight: var(--admin-type-badge-weight);
  line-height: var(--admin-type-badge-line);
}

.badge.draft { background: var(--status-draft-bg); color: var(--status-draft-fg); }
.badge.submitted { background: var(--status-submitted-bg); color: var(--status-submitted-fg); }
.badge.review,
.badge.pending { background: var(--status-review-bg); color: var(--status-review-fg); }
.badge.approved,
.badge.active { background: var(--status-approved-bg); color: var(--status-approved-fg); }
.badge.rejected,
.badge.locked { background: var(--status-rejected-bg); color: var(--status-rejected-fg); }

/* ─── Tabs ─── */

.tabs {
  display: flex;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border-soft);
  padding: 0 18px;
  overflow-x: auto;
}

.tab {
  padding: 14px var(--space-1);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab:hover { color: var(--text-default); }
.tab.active { color: var(--color-primary); border-color: var(--color-primary); }

/* ─── Detail layout ─── */

.detail-layout {
  display: grid;
  grid-template-columns: 1fr var(--detail-aside);
  gap: var(--space-4);
}

.info-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-3);
  font-size: var(--fs-md);
}

.info-list dt { color: var(--text-muted); }
.info-list dd { margin: 0; color: var(--text-strong); font-weight: var(--font-weight-medium); }

/* ─── Stepper ─── */

.stepper {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-weight: var(--font-weight-bold);
}

.step-no {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--border-soft);
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
}

.step.active .step-no {
  background: var(--color-primary);
  color: var(--text-inverse);
}

.step.done .step-no {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* ─── Timeline ─── */

.timeline {
  position: relative;
  padding-left: var(--space-5);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border-soft);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ─── Page states ─── */

.state-box,
.empty-state,
.loading-state,
.error-state,
.permission-denied {
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-align: center;
}

.state-box,
.empty-state {
  border: 1px dashed var(--border-muted);
  background: var(--surface-card);
}

.empty-state-icon {
  font-size: var(--fs-4xl);
  margin-bottom: var(--space-3);
  line-height: 1;
}

.loading-state {
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto var(--space-3);
  border: 3px solid var(--border-soft);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: isac-spin 0.8s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--surface-subtle) 25%, var(--border-soft) 50%, var(--surface-subtle) 75%);
  background-size: 200% 100%;
  animation: isac-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

@keyframes isac-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line { height: 14px; margin-bottom: var(--space-2); }
.skeleton-line.lg { height: 28px; width: 60%; }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); }

.error-state {
  border: 1px solid color-mix(in srgb, var(--color-danger) 25%, var(--border-soft));
  background: var(--surface-danger-soft);
}

.error-state-icon {
  font-size: var(--fs-4xl);
  margin-bottom: var(--space-3);
}

.error-state h3 { color: var(--text-danger); margin: 0 0 var(--space-2); }

.permission-denied {
  border: 1px solid var(--border-brand);
  background: var(--color-primary-soft);
}

.permission-denied-icon {
  font-size: var(--fs-4xl);
  margin-bottom: var(--space-3);
}

.permission-denied h3 { color: var(--color-primary); margin: 0 0 var(--space-2); }

/* ─── Modal & drawer ─── */

.modal-backdrop,
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}

.drawer-backdrop {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
  z-index: var(--z-drawer);
}

.modal-backdrop.open,
.drawer-backdrop.open { display: flex; }

.modal {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  max-width: 620px;
  width: 100%;
  box-shadow: var(--shadow-pop);
  padding: 22px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.modal-header h2 {
  margin: 0;
  font-size: var(--admin-type-drawer-title-size);
  font-weight: var(--admin-type-drawer-title-weight);
  line-height: var(--admin-type-drawer-title-line);
  color: var(--text-strong);
}
.modal-footer { margin-top: var(--space-5); display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }

.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(520px, 100%);
  background: var(--surface-card);
  box-shadow: var(--shadow-pop);
  z-index: calc(var(--z-drawer) + 1);
  transform: translateX(104%);
  transition: transform var(--transition-base);
  padding: 22px;
  overflow: auto;
}

.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.drawer-header h2 {
  margin: 0;
  font-size: var(--admin-type-drawer-title-size);
  font-weight: var(--admin-type-drawer-title-weight);
  line-height: var(--admin-type-drawer-title-line);
  color: var(--text-strong);
}

.drawer-wide { width: min(640px, 100%); }

.template-var-panel {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

.tpl-var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-2) 0;
}

.tpl-var-chip {
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  font-size: 0.85em;
  color: var(--color-primary);
}

.tpl-var-chip:hover { border-color: var(--color-primary); }

.tpl-preview-box {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-card);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
}

.report-hub-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition-base);
}

.report-hub-card:hover {
  box-shadow: var(--shadow-md);
}

.report-hub-icon { font-size: 1.75rem; }

/* ─── Toast ─── */

.toast {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  padding: var(--space-3) 14px;
  box-shadow: var(--shadow-pop);
  display: none;
  z-index: var(--z-toast);
  max-width: min(360px, calc(100vw - 40px));
}

.toast.open { display: block; }

.toast-success { background: var(--color-primary); color: var(--text-inverse); }
.toast-error { background: var(--color-danger); color: var(--text-inverse); }
.toast-warning { background: var(--color-warning); color: var(--text-strong); }
.toast-info { background: var(--surface-inverse); color: var(--text-inverse); }

.toast--customer {
  left: var(--space-4);
  right: var(--space-4);
  bottom: calc(var(--mobile-tab) + var(--safe-area-bottom) + var(--space-3));
}

.toast--customer.toast--sticky-offset {
  bottom: calc(var(--mobile-tab) + var(--safe-area-bottom) + 84px);
}

.toast--customer.toast--auth {
  bottom: calc(var(--safe-area-bottom) + var(--space-4));
}

/* ─── Mobile shell ─── */

.mobile-shell {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface-subtle);
  box-shadow: 0 0 0 1px var(--border-soft);
  position: relative;
  padding-bottom: calc(var(--mobile-tab) + var(--safe-area-bottom));
}

.mobile-top {
  min-height: 56px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  padding-top: var(--safe-area-top);
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.customer-shell-header.customer-page-header--home,
.customer-shell-header.customer-page-header--section,
.customer-shell-header.customer-page-header--sub {
  height: calc(56px + var(--safe-area-top, 0px));
  min-height: calc(56px + var(--safe-area-top, 0px));
  max-height: calc(56px + var(--safe-area-top, 0px));
  padding-bottom: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.customer-shell-header.customer-page-header--auth {
  justify-content: flex-start;
  gap: var(--space-2);
}

.customer-page-header__bar {
  display: contents;
}

.customer-page-header--home .customer-page-header__bar,
.customer-page-header--section .customer-page-header__bar,
.customer-page-header--sub .customer-page-header__bar {
  display: grid;
  width: 100%;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  align-items: center;
}

.customer-page-header--home .customer-page-header__bar,
.customer-page-header--section .customer-page-header__bar,
.customer-page-header--sub .customer-page-header__bar {
  grid-template-columns: 72px 1fr 72px;
}

/* Bell + avatar — Home only */
.customer-shell-header:not(.customer-page-header--home) #headerActions,
.customer-shell-header:not(.customer-page-header--home) #headerNotify,
.customer-shell-header:not(.customer-page-header--home) #headerProfile {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.customer-shell-header.customer-page-header--home #headerActions {
  display: flex !important;
  visibility: visible !important;
  width: auto !important;
  height: auto !important;
  min-width: 0;
  pointer-events: auto;
}

.customer-shell-header.customer-page-header--home #headerNotify,
.customer-shell-header.customer-page-header--home #headerProfile {
  display: inline-flex !important;
  visibility: visible !important;
  width: auto !important;
  height: auto !important;
  min-width: 44px;
  min-height: 44px;
  pointer-events: auto;
}

.customer-page-header__right .actions {
  flex-wrap: nowrap;
  gap: var(--space-1);
}

#headerActions[hidden],
#headerNotify[hidden],
#headerProfile[hidden] {
  display: none !important;
}

.customer-page-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.customer-page-header--home .customer-page-header__left,
.customer-page-header--section .customer-page-header__left,
.customer-page-header--sub .customer-page-header__left {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.customer-page-header__center {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  text-align: center;
  margin: 0;
  padding: 0 var(--space-1);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-page-header__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
}

.customer-page-header--home .customer-page-header__right,
.customer-page-header--section .customer-page-header__right,
.customer-page-header--sub .customer-page-header__right {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.customer-page-header__title {
  margin: 0;
  font-size: var(--type-page-title-size);
  font-weight: var(--type-page-title-weight);
  line-height: var(--type-page-title-line);
  color: var(--text-strong);
}

.customer-page-header__center.customer-page-header__title {
  font-size: var(--type-page-title-size);
  font-weight: var(--type-page-title-weight);
  line-height: var(--type-page-title-line);
}

.customer-page-header--home .customer-page-header__title {
  font-size: var(--type-app-title-size);
  font-weight: var(--type-app-title-weight);
  line-height: var(--type-app-title-line);
}

#mobileHeaderTitle {
  display: none !important;
}

.customer-page-header__back {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: none;
  place-items: center;
  color: var(--text-strong);
}

.customer-page-header__back.is-visible {
  display: grid;
}

.customer-page-header--home .customer-page-header__back,
.customer-page-header--section .customer-page-header__back {
  display: none !important;
}

.customer-page-header__back[hidden] {
  display: none !important;
}

.customer-page-header__spacer {
  display: block;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  flex-shrink: 0;
}

.customer-page-header__spacer[hidden] {
  display: none !important;
}

.customer-page-lead {
  margin: 0 0 var(--space-3);
}

.customer-page-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-3);
}

.customer-avatar__initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--type-caption-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-badge-line);
}

.notification-badge,
.header-notify-badge {
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.mobile-page {
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--safe-area-bottom));
}

.hero-card {
  background: var(--surface-card);
  color: var(--text-default);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  padding: var(--space-4);
  box-shadow: none;
}

.hero-card .eyebrow { color: var(--isac-brand-100); }
.hero-title { margin: 6px 0; }
.hero-subtitle { opacity: 0.9; }
.hero-card .hero-notify-link { color: var(--text-inverse); }
.qr-placeholder { font-size: 72px; line-height: 1; color: var(--text-muted); }

/* ─── Customer Typography System (CUX-TYPO) ─── */

.type-app-title,
.type-page-title,
.type-section-title,
.type-card-title,
.type-body,
.type-body-strong,
.type-caption,
.type-meta,
.type-metric-lg,
.type-metric-md,
.type-button,
.type-badge {
  font-family: var(--font-sans);
}

.type-app-title {
  font-size: var(--type-app-title-size);
  font-weight: var(--type-app-title-weight);
  line-height: var(--type-app-title-line);
  color: var(--text-strong);
}

.type-page-title {
  font-size: var(--type-page-title-size);
  font-weight: var(--type-page-title-weight);
  line-height: var(--type-page-title-line);
  color: var(--text-strong);
}

.type-section-title {
  font-size: var(--type-section-title-size);
  font-weight: var(--type-section-title-weight);
  line-height: var(--type-section-title-line);
  color: var(--text-strong);
}

.type-card-title {
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
  color: var(--text-strong);
}

.type-body {
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  color: var(--text-default);
}

.type-body-strong {
  font-size: var(--type-body-strong-size);
  font-weight: var(--type-body-strong-weight);
  line-height: var(--type-body-strong-line);
  color: var(--text-strong);
}

.type-caption,
.type-meta {
  font-size: var(--type-caption-size);
  font-weight: var(--type-caption-weight);
  line-height: var(--type-caption-line);
  color: var(--text-muted);
}

.type-metric-lg {
  font-size: var(--type-metric-lg-size);
  font-weight: var(--type-metric-lg-weight);
  line-height: var(--type-metric-lg-line);
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

.type-metric-md {
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--text-strong);
}

.type-button {
  font-size: var(--type-button-size);
  font-weight: var(--type-button-weight);
  line-height: var(--type-button-line);
}

.type-badge {
  font-size: var(--type-badge-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-badge-line);
}

.mobile-shell .badge {
  font-size: var(--type-badge-size);
  font-weight: var(--type-badge-weight);
  line-height: var(--type-badge-line);
}

.mobile-shell .btn {
  font-size: var(--type-button-size);
  font-weight: var(--type-button-weight);
  line-height: var(--type-button-line);
}

.mobile-shell .page-desc {
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
}

/* Weight soften — Customer App (tránh 700 rải rác) */
.mobile-shell b,
.mobile-shell strong {
  font-weight: var(--font-weight-emphasis);
}

.mobile-shell .tab-item.active,
.mobile-shell [class*="-nav-tabs"] a.active {
  font-weight: var(--font-weight-medium);
}

.mobile-shell :is(
  .financial-snapshot-label,
  .active-application-module,
  .active-application-next-label,
  .customer-quick-action,
  .loan-request-status-code,
  .loan-amount-selector .field,
  .tenor-selector-label,
  .tenor-selector-option,
  .repayment-period,
  .repayment-total,
  .repayment-period-card-breakdown dd,
  .borrower-info-summary dd,
  .loan-sticky-summary-metrics,
  .rate-highlight-label,
  .home-shortcut-chip,
  .home-policy-notice-body b
) {
  font-weight: var(--font-weight-title);
}

.mobile-shell :is(
  .active-application-cta,
  .featured-product-rate,
  .featured-product-cta,
  .auth-links a,
  .loan-request-card-cta,
  .loan-detail-nav a.active,
  .app-status-timeline-step.is-active .app-status-timeline-text,
  .loan-status-timeline-step.is-active .loan-status-timeline-label,
  .loan-wizard-step.is-active .loan-wizard-label
) {
  font-weight: var(--font-weight-emphasis);
}

/* ── Customer App — Home & Auth (Phase 25 + Home Visual Refinement) ── */

.customer-hero,
.customer-status-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  padding: var(--space-2) var(--space-3);
  color: var(--text-default);
  margin-bottom: var(--space-2);
}

.customer-status-greeting {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.35;
}

.customer-status-name {
  font-weight: var(--font-weight-title);
  color: var(--text-strong);
}

.customer-status-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.customer-status-meta .badge {
  font-size: var(--type-badge-size);
  padding: 1px 7px;
}

.customer-status-member {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.customer-status-trust {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  margin: var(--space-2) 0 0;
  font-size: var(--type-caption-size);
  font-weight: var(--type-caption-weight);
  color: var(--text-muted);
  line-height: var(--type-caption-line);
}

.customer-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}

.customer-hero-cta-primary {
  min-height: 36px;
  padding: 6px 12px;
  font-size: var(--fs-sm);
}

.customer-hero-cta-secondary {
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-emphasis);
  color: var(--color-primary);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.home-policy-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-notice-radius);
}

.home-policy-notice--compact {
  border-left: 3px solid var(--color-info);
}

.home-policy-notice-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-policy-notice-body b {
  font-size: var(--fs-sm);
  color: var(--text-strong);
}

.home-policy-notice-body .page-desc {
  font-size: var(--fs-xs);
}

.home-policy-notice-btn {
  flex-shrink: 0;
  min-height: 32px;
  padding: 4px 10px;
  font-size: var(--fs-xs);
}

.financial-snapshot-card {
  display: block;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  color: inherit;
  transition: border-color var(--transition-fast);
}

.financial-snapshot-card:hover { border-color: var(--border-brand); }

.financial-snapshot-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.financial-snapshot-label {
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
}

.financial-snapshot-badge .badge {
  font-size: var(--type-badge-size);
  padding: 2px 8px;
}

.financial-snapshot-primary {
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-soft);
}

.financial-snapshot-primary-value {
  display: block;
  font-size: var(--type-metric-lg-size);
  font-weight: var(--type-metric-lg-weight);
  color: var(--text-strong);
  line-height: var(--type-metric-lg-line);
  letter-spacing: -0.01em;
}

.mobile-page--home .financial-snapshot-primary-value {
  color: var(--color-primary);
}

.financial-snapshot-primary .page-desc {
  font-size: var(--fs-xs);
  margin-top: 2px;
}

.financial-snapshot-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}

.financial-snapshot-secondary-item b {
  display: block;
  font-size: var(--fs-md);
  color: var(--text-strong);
  line-height: 1.2;
}

.financial-snapshot-secondary-item .page-desc {
  font-size: var(--type-caption-size);
  margin-top: 2px;
}

.financial-snapshot-updated {
  margin: var(--space-2) 0 0;
  font-size: var(--type-caption-size);
  text-align: right;
  color: var(--text-subtle);
}

.active-application-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.active-application-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.active-application-module {
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.active-application-code {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--fs-md);
  color: var(--text-strong);
}

.active-application-summary { margin: 0; }

.active-application-next {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.active-application-next-label {
  font-weight: var(--font-weight-bold);
  color: var(--text-default);
}

.active-application-card .app-status-timeline--compact {
  margin: var(--space-2) 0 0;
}

.active-application-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  min-height: 44px;
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-decoration: none;
}

.customer-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.customer-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 68px;
  padding: var(--space-2);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-bold);
  text-align: center;
  color: var(--text-strong);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.customer-quick-action:active,
.customer-quick-action:hover { border-color: var(--border-brand); }

.customer-quick-grid--home {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.customer-quick-grid--home .customer-quick-action {
  min-height: 64px;
}

.customer-quick-grid--home .customer-quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.customer-quick-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.featured-product-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  color: inherit;
  min-height: 44px;
}

.featured-product-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.featured-product-body { flex: 1; min-width: 0; }
.featured-product-body b {
  display: block;
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
  color: var(--text-strong);
}
.featured-product-rate { font-size: var(--fs-sm); font-weight: var(--font-weight-bold); color: var(--color-primary); }

.featured-product-cta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  flex-shrink: 0;
}

.trust-signal-block {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.trust-signal-list { display: grid; gap: var(--space-3); margin-top: var(--space-3); }

.trust-signal-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.trust-signal-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.security-microcopy {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
}

.security-microcopy--demo { background: color-mix(in srgb, var(--color-primary) 6%, var(--surface-muted)); }

.security-microcopy-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.security-microcopy-line + .security-microcopy-line { margin-top: var(--space-2); }

.app-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-3);
}

.app-section-header-title {
  margin: 0;
  font-size: var(--type-section-title-size);
  font-weight: var(--type-section-title-weight);
  line-height: var(--type-section-title-line);
  color: var(--text-strong);
}

.mobile-promo-banner {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-4);
}

.mobile-promo-banner-card {
  flex: 0 0 240px;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  color: inherit;
}

.mobile-promo-banner-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.auth-hero {
  text-align: center;
  margin-bottom: var(--space-5);
}

.auth-hero-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  box-shadow: var(--ca-card-elevation);
}

.auth-hero-title {
  margin: 0 0 var(--space-1);
  font-size: var(--type-page-title-size);
  font-weight: var(--type-page-title-weight);
  line-height: var(--type-page-title-line);
  color: var(--text-strong);
}

.auth-hero-org {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.auth-hero-subtitle { margin: 0; }

.auth-trust-panel {
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  display: grid;
  gap: var(--space-3);
}

.auth-trust-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.auth-trust-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.otp-security-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: center;
}

.app-status-timeline {
  display: flex;
  gap: var(--space-1);
  margin: var(--space-2) 0;
}

.app-status-timeline-step {
  flex: 1;
  text-align: center;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--text-muted);
}

.app-status-timeline-dot {
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

.app-status-timeline-step.is-done .app-status-timeline-dot,
.app-status-timeline-step.is-active .app-status-timeline-dot { background: var(--color-primary); }

.app-status-timeline-step.is-active .app-status-timeline-text { color: var(--color-primary); font-weight: var(--font-weight-bold); }

.app-status-timeline--compact { display: block; margin: var(--space-2) 0; }

.app-status-timeline--compact .app-status-timeline-track {
  height: 4px;
  background: var(--border-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-1);
}

.app-status-timeline--compact .app-status-timeline-bar {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  width: calc(var(--progress, 0) * 1%);
  transition: width var(--transition-fast);
}

.app-status-timeline-label { display: block; }

.customer-empty-state {
  text-align: center;
  padding: var(--space-4);
  background: var(--surface-subtle);
  border: 1px dashed var(--border-soft);
  border-radius: var(--ca-card-radius);
  margin-bottom: var(--space-3);
}

.customer-empty-state-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.customer-sticky-cta .btn { min-height: 44px; }

.icon-inverse { color: var(--text-inverse); }

@media (max-width: 360px) {
  .financial-snapshot-metrics { grid-template-columns: 1fr 1fr; }
  .financial-snapshot-metrics .financial-snapshot-metric:last-child { grid-column: 1 / -1; }
  .customer-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-action {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-2);
  text-align: center;
  font-size: var(--type-caption-size);
  font-weight: var(--type-body-strong-weight);
}

.mobile-shell .quick-action {
  font-weight: var(--type-badge-weight);
}

.quick-icon { font-size: 22px; margin-bottom: 6px; }

.mobile-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.bottom-tab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  max-width: 480px;
  width: 100%;
  height: calc(var(--mobile-tab) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: var(--surface-card);
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: var(--z-sticky);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-1) 0;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--text-muted);
  gap: var(--space-1);
  transition: color var(--transition-fast);
}

.tab-item.active {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

.sticky-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--mobile-tab) + var(--safe-area-bottom));
  max-width: 480px;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--surface-card) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-soft);
  z-index: calc(var(--z-sticky) - 1);
}

.mobile-shell.is-auth {
  padding-bottom: var(--safe-area-bottom);
}

.mobile-shell.is-auth .sticky-cta {
  bottom: var(--safe-area-bottom);
}

.mobile-shell.has-sticky-cta .mobile-page {
  padding-bottom: calc(80px + var(--safe-area-bottom));
}

.mobile-shell.is-auth.has-sticky-cta .mobile-page {
  padding-bottom: calc(72px + var(--safe-area-bottom));
}

.mobile-top.is-minimal .brand-sub { display: none; }

/* In-page duplicate header — deprecated; shell owns page title */
.customer-page-header:not(.mobile-top) {
  display: none;
}

.customer-page-title { margin: 0; font-size: var(--fs-xl); color: var(--text-strong); }
.customer-back { flex-shrink: 0; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.customer-back-spacer { width: 44px; flex-shrink: 0; }
.customer-header-actions { flex-shrink: 0; }

.auth-brand {
  text-align: center;
  margin-bottom: var(--space-5);
}

.auth-brand-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  box-shadow: var(--ca-card-elevation);
}

.auth-brand-title {
  margin: 0 0 var(--space-1);
  font-size: var(--type-page-title-size);
  font-weight: var(--type-page-title-weight);
  line-height: var(--type-page-title-line);
  color: var(--text-strong);
}

.auth-page-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}

.auth-links a { color: var(--color-primary); font-weight: var(--font-weight-bold); }

.account-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.account-type-card {
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  cursor: pointer;
  background: var(--surface-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.account-type-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.account-type-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2);
}

.auth-onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.auth-onboarding-actions .btn,
.auth-page-card .btn-primary,
.auth-page-card .btn-ghost.btn-block { min-height: 44px; }

.onboarding-carousel { text-align: center; }

.onboarding-slides {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-slide {
  display: none;
  padding: var(--space-4);
}

.onboarding-slide.active { display: block; }

.onboarding-slide[data-accent="loan"] .onboarding-icon { color: var(--color-primary); }
.onboarding-slide[data-accent="savings"] .onboarding-icon { color: var(--isac-brand-600); }
.onboarding-slide[data-accent="salary"] .onboarding-icon { color: var(--isac-brand-700); }

.onboarding-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.onboarding-icon .icon { width: 56px; height: 56px; }

.onboarding-slide h2 {
  margin: 0 0 var(--space-3);
  color: var(--text-strong);
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--border-strong);
  padding: 0;
  cursor: pointer;
}

.onboarding-dot.active {
  width: 24px;
  background: var(--color-primary);
}

.otp-input-group {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin: var(--space-4) 0;
}

.otp-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--text-strong);
}

.otp-digit:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.otp-countdown {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.otp-countdown.is-ready { color: var(--color-primary); }

.register-progress {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.register-progress-step {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-soft);
}

.register-progress-step.is-done,
.register-progress-step.is-active {
  background: var(--color-primary);
}

.field.is-invalid { border-color: var(--color-danger); }

/* ─── Catalog helpers ─── */

.catalog-section { margin-bottom: var(--space-6); }
.catalog-section h2 {
  font-size: var(--fs-xl);
  color: var(--text-strong);
  margin: 0 0 var(--space-3);
}
.catalog-section h3 {
  font-size: var(--fs-lg);
  color: var(--text-strong);
  margin: 0 0 var(--space-2);
}
.catalog-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.catalog-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
}
.catalog-nav a:hover { background: var(--color-primary-muted); }

.catalog-admin-shell-demo {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 120px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--surface-page);
}

.catalog-admin-shell-demo--expanded {
  grid-template-columns: 140px minmax(0, 1fr);
}

.catalog-admin-shell-demo--collapsed {
  grid-template-columns: 52px minmax(0, 1fr);
}

.catalog-admin-shell-demo__sidebar {
  background: linear-gradient(180deg, var(--isac-brand-900), var(--surface-inverse));
  color: var(--text-inverse);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catalog-admin-shell-demo__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-medium);
  margin-bottom: 4px;
}

.catalog-admin-shell-demo__mark {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--isac-brand-400), var(--isac-blue-500));
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: var(--font-weight-heavy);
  flex-shrink: 0;
}

.catalog-admin-shell-demo__main {
  padding: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.catalog-admin-shell-demo__toggle {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.catalog-admin-shell-demo--drawer .catalog-admin-shell-demo__backdrop {
  position: absolute;
  inset: 0;
  background: var(--surface-overlay);
  z-index: 1;
}

.catalog-admin-shell-demo--drawer .catalog-admin-shell-demo__sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  box-shadow: var(--shadow-pop);
}

.catalog-admin-shell-demo--drawer .catalog-admin-shell-demo__main {
  position: relative;
  z-index: 0;
}

.token-swatch {
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  margin-bottom: var(--space-2);
}
.token-label { font-size: var(--fs-xs); color: var(--text-muted); }

/* ─── Admin shell patterns ─── */

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.sidebar-toggle,
.admin-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
}

.searchbox .field {
  border: 0;
  background: transparent;
  min-height: auto;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.searchbox .field:focus { box-shadow: none; }

.icon-btn {
  position: relative;
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--color-danger);
  color: var(--text-inverse);
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-badge-weight);
  display: grid;
  place-items: center;
}

.user-menu { position: relative; }

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  border-radius: var(--radius-pill);
  padding: 6px 12px 6px 6px;
  cursor: pointer;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--isac-brand-500), var(--isac-brand-700));
  color: var(--text-inverse);
  display: grid;
  place-items: center;
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-badge-weight);
}

.user-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: var(--space-2);
  z-index: var(--z-dropdown);
}

.user-menu.open .user-menu-panel { display: block; }

.user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-md);
  color: var(--text-default);
}

.user-menu-item:hover { background: var(--surface-subtle); }
.user-menu-divider { height: 1px; background: var(--border-soft); margin: var(--space-1) 0; }

.role-pill {
  font-size: var(--fs-xs);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.sidebar-overlay,
.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  z-index: calc(var(--z-sidebar) - 1);
}

.admin-sidebar-backdrop.is-open,
.admin-shell--drawer-open .admin-sidebar-backdrop,
.admin-layout.sidebar-open .sidebar-overlay {
  display: block;
}

body.admin-shell-drawer-open {
  overflow: hidden;
}

/* AUX-SHELL — desktop collapsed sidebar */
@media (min-width: 981px) {
  .admin-shell--sidebar-collapsed .admin-sidebar,
  .admin-sidebar--collapsed {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }

  .admin-shell--sidebar-collapsed .admin-sidebar__brand,
  .admin-sidebar--collapsed .admin-sidebar__brand {
    justify-content: center;
    gap: 0;
    margin-bottom: var(--space-5);
  }

  .admin-shell--sidebar-collapsed .admin-sidebar__brand-text,
  .admin-sidebar--collapsed .admin-sidebar__brand-text {
    display: none;
  }

  .admin-shell--sidebar-collapsed .admin-sidebar-group__toggle,
  .admin-sidebar--collapsed .admin-sidebar-group__toggle {
    display: none;
  }

  .admin-shell--sidebar-collapsed .admin-sidebar-group__panel,
  .admin-sidebar--collapsed .admin-sidebar-group__panel {
    display: block !important;
  }

  .admin-shell--sidebar-collapsed .admin-sidebar-group__panel[hidden],
  .admin-sidebar--collapsed .admin-sidebar-group__panel[hidden] {
    display: block !important;
  }

  .admin-shell--sidebar-collapsed .admin-sidebar-group,
  .admin-sidebar--collapsed .admin-sidebar-group {
    margin: 0;
  }

  .admin-shell--sidebar-collapsed .admin-sidebar .nav-link,
  .admin-sidebar--collapsed .nav-link {
    justify-content: center;
    gap: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
  }

  .admin-shell--sidebar-collapsed .admin-sidebar .nav-icon,
  .admin-sidebar--collapsed .nav-icon {
    width: 22px;
    height: 22px;
    margin: 0;
  }
}

/* ─── Dashboard patterns ─── */

.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.kpi.tone-success .kpi-sub { color: var(--color-success); }
.kpi.tone-warning .kpi-sub { color: var(--color-warning); }
.kpi.tone-danger .kpi-sub { color: var(--color-danger); }
.kpi.tone-info .kpi-sub { color: var(--color-info); }
.kpi.tone-danger .kpi-value { color: var(--color-danger); }

.dashboard-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-4);
  align-items: start;
}

.dashboard-aside { min-width: 0; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.section-head h2 {
  margin: 0;
  font-size: var(--fs-xl);
  color: var(--text-strong);
}

.demo-state-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  background: var(--surface-muted);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
}

.demo-state-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: var(--font-weight-bold);
}

.demo-state-bar .btn.active {
  background: var(--color-primary);
  color: var(--text-inverse);
}

.alert-stack { display: grid; gap: var(--space-3); }

.alert-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
}

.alert-card b { display: block; color: var(--text-strong); margin-bottom: var(--space-1); }

.alert-danger { border-color: color-mix(in srgb, var(--color-danger) 30%, var(--border-soft)); background: var(--surface-danger-soft); }
.alert-warning { border-color: color-mix(in srgb, var(--color-warning) 30%, var(--border-soft)); background: var(--surface-warning-soft); }
.alert-info { border-color: color-mix(in srgb, var(--color-info) 30%, var(--border-soft)); background: var(--surface-info-soft); }

.mini-chart-head h3 { margin: 0 0 var(--space-1); font-size: var(--fs-lg); color: var(--text-strong); }
.mini-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: 160px;
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-soft);
}

.mini-chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
  height: 100%;
}

.mini-chart-bar::before {
  content: "";
  width: 100%;
  max-width: 36px;
  height: var(--bar-h);
  min-height: 8px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: linear-gradient(180deg, var(--isac-brand-400), var(--isac-brand-700));
}

.mini-chart-val {
  font-size: var(--admin-type-meta-size);
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
}
.mini-chart-lbl { font-size: var(--fs-xs); color: var(--text-muted); }

/* ─── Customer admin patterns ─── */

.customer-summary-title {
  margin: 0 0 var(--space-1);
  font-size: var(--admin-type-section-title-size);
  font-weight: var(--admin-type-section-title-weight);
  line-height: var(--admin-type-section-title-line);
  color: var(--text-strong);
}

.customer-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.summary-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
}

.summary-meta dt {
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.summary-meta dd {
  margin: 0;
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
}

.service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }

.service-chip {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.doc-preview-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.doc-preview-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

.doc-preview-body { flex: 1; min-width: 0; }
.doc-preview-body b { display: block; margin-bottom: var(--space-1); }

.kyc-action-panel {
  padding: var(--space-4);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  margin-top: var(--space-4);
}

.mobile-data-list { display: none; }

.mobile-data-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.mobile-data-card .row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
}

.mobile-data-card .row dt { color: var(--text-muted); }
.mobile-data-card .row dd { margin: 0; font-weight: var(--font-weight-bold); text-align: right; }

.desktop-table-only { display: block; }

/* ─── RBAC: roles & permission matrix ─── */

.role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.role-card-head h3 { margin: 0; color: var(--text-strong); }

.role-lock-badge {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-muted);
  white-space: nowrap;
}

.role-card-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.rbac-role-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.rbac-role-toolbar .filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.admin-lock-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-brand);
  background: var(--color-primary-soft);
  margin-bottom: var(--space-4);
}

.admin-lock-notice b { color: var(--color-primary); display: block; margin-bottom: var(--space-1); }

.perm-matrix-wrap {
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.perm-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 720px;
}

.perm-matrix th,
.perm-matrix td {
  border-bottom: 1px solid var(--border-soft);
  padding: var(--space-2) var(--space-2);
  text-align: center;
  vertical-align: middle;
}

.perm-matrix thead th {
  background: var(--surface-muted);
  position: sticky;
  top: 0;
  z-index: 1;
}

.perm-module-col {
  text-align: left !important;
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  min-width: 140px;
  position: sticky;
  left: 0;
  background: var(--surface-card);
  z-index: 2;
  box-shadow: 2px 0 0 var(--border-soft);
}

.perm-matrix thead .perm-module-col {
  background: var(--surface-muted);
  z-index: 3;
}

.perm-action-col { min-width: 44px; }

.perm-action-short {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
}

.perm-action-full {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: var(--font-weight-normal);
  margin-top: 2px;
}

.perm-toggle {
  display: inline-flex;
  cursor: pointer;
}

.perm-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.perm-toggle-ui {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-soft);
  background: var(--surface-subtle);
  display: grid;
  place-items: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.perm-toggle-ui::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background var(--transition-fast);
}

.perm-toggle.is-on .perm-toggle-ui {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.perm-toggle.is-on .perm-toggle-ui::after {
  background: var(--color-primary);
}

.perm-toggle:not(.is-disabled):hover .perm-toggle-ui {
  border-color: var(--color-primary);
}

.perm-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.perm-matrix tbody tr:hover td:not(.perm-module-col) {
  background: var(--surface-muted);
}

.perm-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.perm-chip {
  font-size: var(--fs-xs);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-muted);
}

.perm-chip.is-granted {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
}

.workflow-stepper { margin-bottom: var(--space-4); }
.workflow-stepper.is-rejected .step.active { border-color: var(--color-danger); color: var(--color-danger); }
.workflow-rejected-note { margin-top: var(--space-2); color: var(--color-danger); }

.doc-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.doc-checklist-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.doc-checklist-info { flex: 1; min-width: 0; }
.doc-checklist-status { flex-shrink: 0; }

.doc-version-tag {
  font-size: var(--fs-xs);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-muted);
  margin-left: var(--space-1);
}

/* ——— Command Center ——— */
.operational-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-5);
  background: linear-gradient(135deg, var(--surface-card) 0%, var(--surface-muted) 100%);
  border: 1px solid var(--border-brand);
}

.operational-hero-title {
  margin: var(--space-1) 0 var(--space-2);
  font-size: var(--admin-type-section-title-size);
  font-weight: var(--admin-type-section-title-weight);
  line-height: var(--admin-type-section-title-line);
  color: var(--text-strong);
}

.hero-sla-overdue b { color: var(--color-danger); }

.operational-hero-stats {
  display: flex;
  gap: var(--space-4);
  text-align: center;
}

.operational-hero-stat {
  min-width: 88px;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
}

.operational-hero-stat.hero-stat-danger .queue-metric-value { color: var(--color-danger); }

.command-bar { margin-bottom: var(--space-4); }

.command-bar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
}

.command-bar-main {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: var(--space-3);
  min-width: 280px;
}

.command-bar-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.command-bar-search .field { width: 100%; padding-left: 36px; }

.command-bar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.command-bar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.command-bar-filters .select,
.command-bar-filters .field { min-width: 140px; }

.command-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.filter-demo-notice {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-info-soft);
  border: 1px solid color-mix(in srgb, var(--color-info) 25%, var(--border-soft));
  font-size: var(--fs-sm);
  color: var(--text-default);
}

.work-queue-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.queue-metric-card {
  display: block;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 40px;
}

.queue-metric-card:hover {
  border-color: var(--border-brand);
  box-shadow: var(--shadow-card);
}

.queue-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.queue-metric-value {
  font-size: var(--admin-type-metric-md-size);
  font-weight: var(--admin-type-metric-md-weight);
  line-height: var(--admin-type-metric-md-line);
  color: var(--text-strong);
}

.queue-metric-label {
  font-size: var(--admin-type-body-size);
  font-weight: var(--font-weight-medium);
  color: var(--text-strong);
}

.queue-metric-desc {
  margin: var(--space-1) 0 0;
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
}

.priority-badge,
.sla-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.priority-high { background: var(--surface-danger-soft); color: var(--text-danger); }
.priority-normal { background: var(--surface-subtle); color: var(--text-muted); }
.priority-low { background: var(--surface-muted); color: var(--text-muted); }

.sla-ok { background: var(--status-approved-bg); color: var(--status-approved-fg); }
.sla-warning { background: var(--status-review-bg); color: var(--status-review-fg); }
.sla-overdue { background: var(--status-rejected-bg); color: var(--status-rejected-fg); }

.risk-signal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-sm);
}

.risk-high, .risk-overdue { color: var(--color-danger); }
.risk-warning { color: var(--color-warning); }
.risk-low { color: var(--text-muted); }

.mini-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-sm);
}

.mini-trend-up .mini-trend-arrow { color: var(--color-success); }
.mini-trend-down .mini-trend-arrow { color: var(--color-danger); }

.alert-card-icon { flex-shrink: 0; margin-top: 2px; }

.next-action { min-height: 40px; min-width: 40px; }

.col-index {
  width: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.col-actions {
  width: 52px;
  min-width: 52px;
  text-align: center;
  position: relative;
  overflow: visible;
}

.data-table td.col-actions,
.data-table th.col-actions-head {
  position: relative;
  overflow: visible;
}

.work-queue-table-wrap .table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.row-action-menu {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.row-action-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: var(--space-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.row-action-trigger:hover,
.row-action-menu.is-open .row-action-trigger {
  background: var(--surface-muted);
  color: var(--color-primary);
  border-color: var(--border-brand);
}

.dropdown-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 200px;
  max-width: 280px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  z-index: var(--z-dropdown);
  padding: var(--space-1);
  display: none;
  flex-direction: column;
}

.dropdown-menu-panel[hidden] {
  display: none !important;
}

.row-action-menu.is-open .dropdown-menu-panel,
.dropdown-menu-panel.dropdown-menu-panel-fixed {
  display: flex;
}

.dropdown-menu-panel-fixed {
  position: fixed;
  right: auto;
  margin: 0;
}

.dropdown-menu-panel-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  text-align: left;
  padding: 10px var(--space-3);
  min-height: 40px;
  border: none;
  background: none;
  color: var(--text-strong);
  font-size: var(--admin-type-body-size);
  font-weight: var(--font-weight-semibold);
  line-height: var(--admin-type-body-line);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
}

.dropdown-menu-item:hover:not(.is-disabled):not(:disabled) {
  background: var(--surface-muted);
  color: var(--color-primary);
}

.dropdown-menu-item.is-disabled,
.dropdown-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dropdown-menu-item-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--text-muted);
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-subtle);
}

.pagination-summary {
  margin: 0;
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.pagination-pages { display: flex; gap: var(--space-1); }

.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--text-default);
  text-decoration: none;
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
}

.pagination-page:hover { border-color: var(--border-brand); color: var(--color-primary); }

.pagination-page.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--text-inverse);
  font-weight: var(--font-weight-medium);
}

.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.pagination-size-select { min-width: 100px; }

.pagination-prev.is-disabled,
.pagination-next.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.work-queue-table-wrap { margin-bottom: var(--space-4); }

.work-queue-mobile-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.work-queue-mobile-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.work-queue-mobile-card-title { flex: 1; font-weight: var(--font-weight-medium); }

.work-queue-mobile-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: var(--fs-sm);
}

.work-queue-mobile-row dt { color: var(--text-muted); }
.work-queue-mobile-row dd { margin: 0; text-align: right; }

/* ——— Loan Workspace ——— */
.loan-workspace { display: flex; flex-direction: column; gap: var(--space-4); }

.loan-workspace-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.loan-workspace-back { display: inline-flex; align-items: center; gap: var(--space-1); }

.loan-workspace-header-badges { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.loan-workspace-header-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
}

.loan-workspace-title {
  margin: var(--space-1) 0;
  font-size: var(--admin-type-section-title-size);
  font-weight: var(--admin-type-section-title-weight);
  line-height: var(--admin-type-section-title-line);
  color: var(--text-strong);
}

.loan-workspace-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, auto));
  gap: var(--space-3) var(--space-5);
  margin: 0;
  font-size: var(--fs-sm);
}

.loan-workspace-meta dt { color: var(--text-muted); font-size: var(--fs-xs); }
.loan-workspace-meta dd { margin: 0; font-weight: var(--font-weight-medium); }

.loan-next-action-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-4);
  align-items: center;
  border: 1px solid var(--border-brand);
  background: var(--surface-muted);
}

.loan-next-action-icon { display: flex; align-items: center; justify-content: center; }

.loan-next-action-body h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
  line-height: var(--admin-type-card-title-line);
}

.loan-next-action-cta { flex-wrap: wrap; justify-content: flex-end; }

.loan-workspace-tabs { padding: 0; overflow: hidden; }
.loan-workspace-tabs .tabs { padding: 0 var(--space-4); border-bottom: 1px solid var(--border-soft); }

.loan-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-4);
  align-items: start;
}

.loan-workspace-grid--single { grid-template-columns: 1fr; }

.loan-decision-summary.tone-success { border-color: var(--border-brand); background: var(--surface-muted); }

.loan-main-panel { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }

.loan-context-rail { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }

.loan-facts-grid-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0 0;
}

.loan-facts-cell dt {
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.loan-facts-cell dd {
  margin: 0;
  font-size: var(--admin-type-body-size);
  font-weight: var(--font-weight-medium);
}

.customer-360-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.customer-360-head h3 { margin: 0; font-size: var(--fs-lg); display: flex; align-items: center; gap: var(--space-2); }

.customer-360-section { margin-top: var(--space-4); }
.customer-360-section h4 { margin: 0 0 var(--space-2); font-size: var(--fs-sm); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.customer-360-list { margin: 0; padding-left: var(--space-4); font-size: var(--fs-sm); }

/* ——— Customer 360 Workspace (Batch D1) ——— */
.customer-workspace-header-actions { flex-wrap: wrap; justify-content: flex-end; }

.admin-next-action-panel--warning { border-color: var(--border-warning); background: var(--surface-warning-muted, var(--surface-muted)); }
.admin-next-action-panel--danger { border-color: var(--border-danger); background: var(--surface-danger-muted, var(--surface-muted)); }
.admin-next-action-panel--success { border-color: var(--border-brand); }

.customer-mini-status h4,
.customer-risk-signal h4,
.customer-service-snapshot h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-mini-status-value { margin-bottom: var(--space-1); }

.customer-service-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--fs-sm);
}

.customer-service-counts dt { color: var(--text-muted); font-size: var(--fs-xs); }
.customer-service-counts dd { margin: 0; }

.customer-last-activity { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border-soft); }

.kyc-review-header-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
}

.kyc-review-meta {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-sm);
}

.kyc-review-meta dt { color: var(--text-muted); font-size: var(--fs-xs); }
.kyc-review-meta dd { margin: 0; font-weight: var(--font-weight-medium); }

.kyc-reason-templates { flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }

.transaction-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.transaction-summary-label {
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.transaction-summary-value {
  font-size: var(--admin-type-metric-md-size);
  font-weight: var(--admin-type-metric-md-weight);
  line-height: var(--admin-type-metric-md-line);
  color: var(--text-strong);
  margin-top: var(--space-1);
}

.customer-file-section { margin-bottom: var(--space-5); }
.customer-file-section h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
  line-height: var(--admin-type-card-title-line);
}

.header-action-dropdown .dropdown-menu-panel { min-width: 200px; }

.page.customer-workspace-page { padding-bottom: calc(var(--space-16) + var(--space-4)); }

/* ——— Savings Admin Workspace (Batch D2) ——— */
.savings-admin-workspace { display: flex; flex-direction: column; gap: var(--space-4); }
.savings-admin-header-actions { flex-wrap: wrap; justify-content: flex-end; }
.savings-admin-meta { margin-top: var(--space-3); }

.savings-request-summary-card h3,
.savings-payment-context-panel h3,
.savings-interest-accrual-card h3,
.savings-maturity-panel h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
  line-height: var(--admin-type-card-title-line);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.savings-payment-context-actions { margin-top: var(--space-3); flex-wrap: wrap; }
.savings-payment-context-panel .payment-trust-box { margin-top: var(--space-4); }

.savings-maturity-actions { margin-top: var(--space-3); flex-wrap: wrap; }

.settlement-detail-drawer { width: min(480px, 100vw); max-width: 100%; }
.settlement-decision-panel h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  color: var(--text-muted);
}

.page.savings-admin-workspace-page { padding-bottom: calc(var(--space-16) + var(--space-4)); }

@media (max-width: 960px) {
  .savings-admin-context-rail { order: 2; }
}

/* ——— Salary Admin Workspace (Batch D3) ——— */
.salary-admin-workspace { display: flex; flex-direction: column; gap: var(--space-4); }
.salary-admin-header-actions { flex-wrap: wrap; justify-content: flex-end; }

.salary-company-summary-card h3,
.salary-company-contract-card h3,
.salary-company-limit-summary h3,
.salary-request-admin-summary-card h3,
.salary-request-decision-panel h3,
.salary-request-risk-panel h3,
.salary-record-detail-panel h3,
.salary-record-payment-context h3,
.salary-repayment-action-panel h3,
.salary-limit-recap-card h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
  line-height: var(--admin-type-card-title-line);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.salary-employee-summary-panel h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  color: var(--text-muted);
}

.employee-verification-drawer { width: min(440px, 100vw); max-width: 100%; }

.salary-dual-limit-form-section .form-section { margin-bottom: var(--space-4); }
.salary-dual-limit-form-section .form-section h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
}

.page.salary-admin-workspace-page { padding-bottom: calc(var(--space-16) + var(--space-4)); }

@media (max-width: 960px) {
  .salary-company-context-rail,
  .salary-admin-context-rail { order: 2; }
}

/* ——— Contract Admin Workspace (Batch D7) ——— */
.contract-workspace { display: flex; flex-direction: column; gap: var(--space-4); }
.contract-workspace-header-actions { flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.contract-workspace-meta { margin-top: var(--space-3); }

.contract-lifecycle-stepper .contract-lifecycle-title {
  margin: 0 0 var(--space-3);
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
  line-height: var(--admin-type-card-title-line);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.contract-context-rail { display: flex; flex-direction: column; gap: var(--space-3); }
.contract-rail-card h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.contract-rail-stats { margin-top: var(--space-2); }

.contract-document-panel .contract-viewer-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.covenant-summary-card,
.disbursement-summary-card {
  margin-bottom: var(--space-3);
}

.covenant-summary-head,
.disbursement-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.disbursement-summary-amount {
  font-size: var(--fs-xl);
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.covenant-summary-actions,
.covenant-detail-drawer,
.disbursement-detail-drawer {
  width: min(480px, 100vw);
  max-width: 100%;
}

.contract-tab-workspace { display: flex; flex-direction: column; gap: var(--space-4); }

.contract-schedule-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.contract-schedule-summary .transaction-summary-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.collection-summary-panel h3 {
  margin: 0 0 var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.contract-risk-panel h3 {
  margin: 0 0 var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.page.contract-workspace-page { padding-bottom: calc(var(--space-16) + var(--space-4)); }

@media (max-width: 960px) {
  .contract-context-rail { order: 2; }
}

/* ——— Admin Config / Form (Batch D4) ——— */
.admin-form-section { margin-bottom: var(--space-3); }
.admin-form-section-header h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--admin-type-card-title-size);
  font-weight: var(--admin-type-card-title-weight);
  line-height: var(--admin-type-card-title-line);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.admin-form-section-body { display: flex; flex-direction: column; gap: var(--space-3); }

.admin-drawer-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-subtle);
}
.admin-drawer-footer-actions { justify-content: flex-end; flex-wrap: wrap; }

.admin-validation-recap h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  color: var(--text-muted);
}
.admin-validation-recap-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.admin-validation-recap-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
}

.admin-config-trust-note h4,
.admin-audit-note h4,
.admin-publish-status-card h4,
.admin-effective-date-card h4,
.content-publish-decision-panel h4,
.notification-template-preview h4 {
  margin: 0 0 var(--space-2);
  font-size: var(--admin-type-form-label-size);
  font-weight: var(--admin-type-form-label-weight);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.admin-masked-secret-row { align-items: stretch; }
.admin-masked-secret-row .field { flex: 1; min-width: 0; }

.content-form-drawer,
.master-data-form-shell {
  width: min(480px, 100vw);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
}
.content-form-drawer-body,
.master-data-form-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.homepage-config-workspace { display: flex; flex-direction: column; gap: var(--space-4); }
.homepage-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: var(--space-4);
  align-items: start;
}
.homepage-preview-rail-sticky { position: sticky; top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }

.homepage-section-accordion { display: flex; flex-direction: column; gap: var(--space-2); }
.homepage-section-accordion-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.homepage-section-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  list-style: none;
}
.homepage-section-accordion-summary::-webkit-details-marker { display: none; }
.homepage-section-accordion-meta { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.homepage-section-accordion-body { padding: 0 var(--space-4) var(--space-4); }

.settings-config-page { display: flex; flex-direction: column; gap: var(--space-4); }
.settings-group-card-body { display: flex; flex-direction: column; gap: var(--space-3); }

.onepay-config-security-panel .loan-workspace-grid { align-items: start; }

@media (max-width: 960px) {
  .homepage-config-grid { grid-template-columns: 1fr; }
  .homepage-preview-rail { order: -1; }
  .homepage-preview-rail-sticky { position: static; }
}

.risk-assessment-panel h3,
.loan-decision-summary h3,
.collateral-summary h3,
.review-notes-panel h3,
.approval-decision-panel h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.document-checklist-head { margin-bottom: var(--space-4); }
.document-checklist-head h3 { margin: 0 0 var(--space-1); }

.document-checklist-list { display: flex; flex-direction: column; gap: var(--space-2); }

.document-checklist-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.document-checklist-index {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
  font-weight: var(--font-weight-medium);
}

.document-checklist-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  min-width: 0;
}

.document-checklist-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.document-upload-zone {
  margin-top: var(--space-4);
  padding: var(--space-5);
  border: 2px dashed var(--border-muted);
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--surface-subtle);
}

.document-upload-zone p { margin: var(--space-2) 0 0; }

.review-workspace-split,
.approval-workspace-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
}

.form-section {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-soft);
}

.form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.form-section h4 {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.approval-decision-panel { border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--border-soft)); }

.reject-reason-box {
  border: 1px solid color-mix(in srgb, var(--color-danger) 30%, var(--border-soft));
  background: var(--surface-danger-soft);
}

.reject-reason-box h3 { color: var(--text-danger); }

.condition-list {
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

.condition-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--fs-sm);
}

.risk-warnings li { color: var(--text-warning); }

.risk-flag-item { color: var(--text-danger); }

.loan-command-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.loan-command-bar-title { margin: 0; font-size: var(--fs-lg); }

.sticky-decision-bar {
  position: sticky;
  bottom: 0;
  z-index: var(--z-sticky);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.sticky-decision-actions { flex-wrap: wrap; }

.contract-readiness-panel { border: 1px solid var(--border-brand); background: var(--surface-muted); }

.page.loan-workspace-page { padding-bottom: calc(var(--space-16) + var(--space-4)); }

@media (max-width: 1100px) {
  .loan-workspace-grid { grid-template-columns: 1fr; }
  .loan-workspace-meta { grid-template-columns: repeat(2, 1fr); }
  .review-workspace-split,
  .approval-workspace-split { grid-template-columns: 1fr; }
  .loan-facts-grid-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .loan-next-action-panel { grid-template-columns: 1fr; }
  .loan-next-action-cta { justify-content: flex-start; }
  .document-checklist-item { grid-template-columns: 28px 1fr; }
  .document-checklist-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

@media (max-width: 1200px) {
  .kpi-grid-6 { grid-template-columns: repeat(3, 1fr); }
  .operational-hero { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .kpi-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .work-queue-summary { grid-template-columns: repeat(2, 1fr); }
  .operational-hero-stats { flex-wrap: wrap; justify-content: flex-start; }
  .command-bar-main { flex-direction: column; }
}

/* Legacy action-menu — kept for backward compat */
.action-menu { position: relative; display: inline-block; }
.action-menu summary { list-style: none; cursor: pointer; }
.action-menu summary::-webkit-details-marker { display: none; }

.action-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  z-index: var(--z-dropdown);
  padding: var(--space-1);
  display: flex;
  flex-direction: column;
}

.action-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border: none;
  background: none;
  color: var(--text-strong);
  font: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
}

.action-menu-item:hover {
  background: var(--surface-muted);
  color: var(--color-primary);
}

.allocation-card {
  padding: var(--space-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.allocation-card.compact { padding: var(--space-3); }

.allocation-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-strong);
}

.allocation-rows { display: flex; flex-direction: column; gap: var(--space-2); }

.allocation-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-sm);
}

.allocation-label { color: var(--text-muted); }
.allocation-value { font-weight: var(--font-weight-bold); color: var(--color-primary); }

.disbursement-progress {
  margin-top: var(--space-3);
}

.disbursement-progress-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  overflow: hidden;
  margin-top: var(--space-2);
}

.disbursement-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  width: var(--progress, 0%);
}

.loan-officer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-brand);
  background: var(--color-primary-soft);
  margin-bottom: var(--space-4);
}

.rbac-demo-panel {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
}

/* ─── Salary Advance ─── */

.salary-limit-panel {
  padding: var(--space-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.salary-limit-panel.compact { padding: var(--space-3); }

.salary-limit-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-strong);
}

.salary-limit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.salary-limit-card {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  position: relative;
}

.salary-limit-card.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.salary-limit-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.salary-limit-icon { font-size: 20px; flex-shrink: 0; }

.salary-limit-value {
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--color-primary);
}

.salary-limit-badge {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--surface-card);
  font-weight: var(--font-weight-bold);
}

.salary-limit-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
}

.salary-limit-stat b {
  display: block;
  font-size: var(--fs-md);
  color: var(--text-strong);
}

.salary-limit-stat.is-highlight b { color: var(--color-primary); }

.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.guarantee-card {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.guarantee-card.is-empty {
  opacity: 0.55;
  border-style: dashed;
}

.guarantee-card-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.column-mapping-wrap {
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}

.column-mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.column-mapping-table th,
.column-mapping-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: middle;
}

.column-mapping-table th[scope="row"] {
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  width: 180px;
}

.import-result-summary { margin-top: var(--space-3); }

.import-result-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.import-kpi {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  text-align: center;
}

.import-kpi b {
  display: block;
  font-size: var(--fs-xl);
  color: var(--text-strong);
  margin-top: var(--space-1);
}

.import-kpi.is-success b { color: var(--color-primary); }
.import-kpi.is-danger b { color: var(--color-danger); }

.import-upload-zone {
  padding: var(--space-6);
  border: 2px dashed var(--border-brand);
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  text-align: center;
}

.import-upload-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.preview-list-icon { display: inline-flex; flex-shrink: 0; }

.preview-bottom-tab span {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-xs);
}

.salary-workflow .stepper { flex-wrap: wrap; }

/* ─── Content & Homepage ─── */

.segment-badge {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-muted);
  white-space: nowrap;
}

.content-version-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.content-version-tag {
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-bold);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.content-reconsent-badge {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--status-review-bg);
  color: var(--status-review-fg);
  font-weight: var(--font-weight-bold);
}

.banner-thumb {
  width: 100%;
  min-height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary-soft), var(--surface-muted));
  border: 1px solid var(--border-brand);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-3);
  text-align: center;
}

.banner-thumb-icon { font-size: 24px; }
.banner-thumb-label { font-size: var(--fs-xs); color: var(--text-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.banner-table-cell {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.mobile-home-preview {
  position: sticky;
  top: var(--space-4);
}

.mobile-home-preview-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  text-align: center;
}

.mobile-home-preview-frame {
  width: 320px;
  max-width: 100%;
  margin: 0 auto;
  border: 2px solid var(--border-soft);
  border-radius: 24px;
  background: var(--surface-page);
  padding: var(--space-3);
  max-height: 640px;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}

.preview-hero {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  border: 1px solid var(--border-brand);
  margin-bottom: var(--space-3);
}

.preview-hero .hero-title { font-size: var(--fs-lg); margin: var(--space-1) 0; }
.preview-hero .hero-subtitle { font-size: var(--fs-xs); color: var(--text-muted); margin: 0; }

.preview-banner-carousel {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-1);
}

.preview-banner-card {
  flex: 0 0 85%;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-card);
}

.preview-banner-text { padding: var(--space-2); }
.preview-banner-text b { font-size: var(--fs-sm); display: block; }

.preview-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.preview-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-strong);
  font-size: var(--fs-xs);
  text-align: center;
}

.preview-quick-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.preview-section { margin-bottom: var(--space-3); }
.preview-section h4 { font-size: var(--fs-sm); margin: 0 0 var(--space-2); color: var(--text-strong); }

.preview-list-card {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  margin-bottom: var(--space-2);
  font-size: var(--fs-sm);
}

.preview-list-card b { display: block; font-size: var(--fs-sm); }

.preview-bottom-tab {
  display: flex;
  justify-content: space-around;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border-soft);
  font-size: var(--admin-type-meta-size);
  font-weight: var(--admin-type-meta-weight);
  color: var(--text-muted);
}

.preview-bottom-tab .active { color: var(--color-primary); font-weight: var(--font-weight-bold); }

.homepage-section-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  margin-bottom: var(--space-2);
}

.homepage-section-row.is-disabled { opacity: 0.55; }

.homepage-section-info { flex: 1; min-width: 0; }
.homepage-section-info b { display: block; }
.homepage-section-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.faq-accordion details {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  margin-bottom: var(--space-2);
}

.faq-accordion summary {
  padding: var(--space-3);
  cursor: pointer;
  font-size: var(--type-body-strong-size);
  font-weight: var(--type-body-strong-weight);
  line-height: var(--type-body-strong-line);
  list-style: none;
}

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

.faq-accordion .faq-answer {
  padding: 0 var(--space-3) var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  border-top: 1px solid var(--border-soft);
}

.home-banner-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--space-4));
  padding: 0 var(--space-4) var(--space-1);
}

.home-banner-card {
  flex: 0 0 88%;
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  color: inherit;
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-brand);
  background: var(--color-primary-soft);
}

.home-banner-visual {
  width: 100%;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin-bottom: var(--space-2);
}

.home-banner-card b { display: block; font-size: var(--fs-md); }

.home-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-4) 0 var(--space-3);
}

.home-section-title h3 {
  margin: 0;
  font-size: var(--type-section-title-size);
  font-weight: var(--type-section-title-weight);
  line-height: var(--type-section-title-line);
  color: var(--text-strong);
}

.rate-highlight-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
}

.rate-highlight-card {
  flex: 0 0 140px;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  text-decoration: none;
  color: inherit;
}

.rate-highlight-value {
  display: block;
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--color-primary);
}

.rate-highlight-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  margin-top: var(--space-1);
}

.home-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.home-shortcut-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  text-decoration: none;
}

.mobile-upload-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.mobile-upload-thumb {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--surface-subtle);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.mobile-upload-body { flex: 1; min-width: 0; }

.profile-menu-list {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  overflow: hidden;
}

.profile-menu-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
}

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

.profile-menu-icon { font-size: 1.25rem; flex-shrink: 0; }
.profile-menu-text { flex: 1; min-width: 0; }
.profile-menu-text b { display: block; }
.profile-menu-badge { flex-shrink: 0; }
.profile-menu-chevron { color: var(--text-muted); font-size: 1.25rem; }

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.profile-stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  text-align: center;
}

.profile-stat-card b {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-strong);
}

.notification-list { display: flex; flex-direction: column; gap: var(--space-2); }

.notification-item {
  display: block;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: inherit;
}

.notification-item.is-unread {
  border-left: 3px solid var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 4%, var(--surface-card));
}

.notification-item-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: flex-start;
}

.notification-item-head b {
  font-size: var(--type-body-strong-size);
  font-weight: var(--type-body-strong-weight);
  line-height: var(--type-body-strong-line);
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 6px;
}

.bank-account-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.bank-account-card.is-primary {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

.bank-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.alert-card.alert-success {
  border-color: color-mix(in srgb, var(--color-primary) 40%, var(--border-soft));
  background: color-mix(in srgb, var(--color-primary) 6%, var(--surface-card));
}

/* ─── Member & Payment (Customer App) ─── */

.payment-method-grid {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.payment-method-card {
  display: block;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.payment-method-card:has(input:checked),
.payment-method-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.payment-method-card input { position: absolute; opacity: 0; pointer-events: none; }

.payment-method-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.onepay-payment-box {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
}

.onepay-payment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.onepay-badge {
  font-size: var(--type-badge-size);
  font-weight: var(--type-badge-weight);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--surface-subtle));
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.onepay-amount {
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--text-strong);
}

.onepay-meta code { font-size: var(--fs-xs); word-break: break-all; }

.onepay-url { display: block; max-height: 3.6em; overflow: hidden; }

.bank-qr-box {
  text-align: center;
  padding: var(--space-5);
  background: var(--surface-subtle);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0;
}

.bank-qr-box .qr-placeholder { margin-bottom: var(--space-3); }

.payment-result-state {
  text-align: center;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
}

.payment-result-state.is-success { border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border-soft)); }
.payment-result-state.is-error { border-color: color-mix(in srgb, var(--color-danger) 35%, var(--border-soft)); }
.payment-result-state.is-pending { border-color: color-mix(in srgb, var(--status-review-fg, var(--color-primary)) 25%, var(--border-soft)); }

.payment-result-icon { font-size: 3rem; line-height: 1; margin-bottom: var(--space-3); }

.payment-result-state h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
  color: var(--text-strong);
}

.member-fee-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
}

.member-fee-side { text-align: right; flex-shrink: 0; }

.member-nav-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  padding-bottom: 0;
}

.member-nav-tabs a {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  text-decoration: none;
}

.member-nav-tabs a.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-card));
}

/* ─── Profile / KYC / Payment (Phase 27) ─── */

.profile-overview-hero {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.profile-overview-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.profile-overview-name {
  margin: var(--space-1) 0;
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
  color: var(--text-strong);
}

.profile-overview-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.profile-overview-ring {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  background: conic-gradient(var(--color-primary) calc(var(--percent, 0) * 1%), var(--surface-subtle) 0);
  position: relative;
}

.profile-overview-ring::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
}

.profile-overview-percent {
  position: relative;
  z-index: 1;
  font-size: var(--type-caption-size);
  font-weight: var(--type-badge-weight);
  color: var(--color-primary);
}

.profile-overview-cta { margin-top: var(--space-3); min-height: 44px; }

.profile-completion-card,
.personal-info-card,
.business-info-card,
.kyc-progress-card,
.kyc-requirement-checklist,
.kyc-upload-quality-guide,
.kyc-reject-reason-panel,
.member-status-card,
.member-fee-card,
.payment-trust-box,
.payment-instruction-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.profile-completion-card h3,
.kyc-requirement-checklist h3,
.kyc-upload-quality-guide h3,
.payment-instruction-card h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
  color: var(--text-strong);
}

.profile-completion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.profile-completion-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-soft);
}

.profile-completion-item:last-child { border-bottom: none; }
.profile-completion-item.is-done b { color: var(--color-primary); }
.profile-completion-icon { flex-shrink: 0; }

.personal-info-row,
.business-info-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-soft);
}

.personal-info-row:last-child,
.business-info-row:last-child { border-bottom: none; }

.personal-info-row b,
.business-info-row b {
  text-align: right;
  word-break: break-word;
}

.profile-form-section {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.profile-form-section h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
  color: var(--text-strong);
}

.bank-account-form-card .drawer-header h2 { margin: 0; }

.bank-account-number {
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  letter-spacing: 0.04em;
  margin: var(--space-2) 0;
  color: var(--text-strong);
}

.bank-account-icon { flex-shrink: 0; }

.bank-account-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.bank-account-actions .btn { min-height: 44px; }

.kyc-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.kyc-progress-bar-track {
  height: 6px;
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.kyc-progress-bar {
  height: 100%;
  width: calc(var(--progress, 0) * 1%);
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transition: width var(--transition-fast);
}

.kyc-progress-next {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-sm);
}

.kyc-requirement-checklist ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.kyc-requirement-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.kyc-upload-quality-guide ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.kyc-upload-quality-guide li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.kyc-document-upload-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
}

.kyc-document-upload-icon { flex-shrink: 0; }
.kyc-document-upload-body { flex: 1; min-width: 0; }
.kyc-document-upload-body b { display: block; margin-bottom: var(--space-1); }

.kyc-reject-reason-panel {
  border-color: color-mix(in srgb, var(--color-danger) 35%, var(--border-soft));
  background: color-mix(in srgb, var(--color-danger) 4%, var(--surface-card));
}

.kyc-resubmit-panel {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--surface-card));
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--border-soft));
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
}

.member-status-card .member-status-code {
  display: block;
  font-size: var(--fs-xl);
  font-weight: var(--font-weight-bold);
  margin: var(--space-1) 0 var(--space-2);
  color: var(--text-strong);
}

.member-fee-amount {
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: var(--space-1) 0;
}

.member-fee-benefits {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.member-registration-stepper { margin-bottom: var(--space-4); }

.payment-trust-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.payment-trust-amount {
  font-size: var(--fs-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  margin: var(--space-2) 0;
}

.payment-method-card--stacked {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  min-height: 44px;
}

.payment-method-card--stacked .payment-method-icon { grid-row: 1 / 3; margin: 0; }

.payment-result-hero .payment-result-amount {
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  margin: var(--space-2) 0;
}

.payment-instruction-card .borrower-info-summary { margin-bottom: var(--space-3); }

.payment-qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5);
  background: var(--surface-subtle);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  margin-top: var(--space-3);
}

.payment-history-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.payment-history-card { margin-bottom: var(--space-2); }

.payment-history-main { flex: 1; min-width: 0; }
.payment-history-main b { display: block; margin-bottom: var(--space-1); }

.secure-payment-microcopy {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
}

.secure-payment-microcopy p {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.secure-payment-microcopy p:last-child { margin-bottom: 0; }

.transaction-status-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: var(--space-4) 0;
  padding-left: var(--space-2);
}

.transaction-status-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
  position: relative;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.transaction-status-step::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 20px;
  bottom: -4px;
  width: 2px;
  background: var(--border-soft);
}

.transaction-status-step:last-child::before { display: none; }

.transaction-status-dot {
  position: absolute;
  left: 0;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-soft);
  background: var(--surface-card);
  flex-shrink: 0;
}

.transaction-status-step.is-done .transaction-status-dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.transaction-status-step.is-active .transaction-status-dot {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.transaction-status-step.is-done,
.transaction-status-step.is-active {
  color: var(--text-strong);
  font-weight: var(--font-weight-bold);
}

.kyc-review-status-timeline { margin-bottom: var(--space-4); }

.drawer-close-btn {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
}

/* ─── Customer Savings / Salary (Phase 28) ─── */

.savings-hero,
.salary-hero {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.savings-hero-top,
.salary-hero-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.savings-hero-title,
.salary-hero-limit {
  margin: var(--space-1) 0;
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--text-strong);
}

.savings-hero-rate { margin: var(--space-2) 0 0; font-size: var(--fs-sm); }
.savings-hero-cta,
.salary-hero-cta { margin-top: var(--space-3); min-height: 44px; }

.savings-product-card {
  display: block;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  margin-bottom: var(--space-3);
  text-decoration: none;
  color: inherit;
}

.savings-product-card:hover {
  border-color: var(--border-brand);
}

.savings-product-head,
.savings-record-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.savings-product-icon,
.savings-record-icon { flex-shrink: 0; }

.savings-product-meta,
.savings-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin: var(--space-2) 0;
}

.savings-product-cta { margin-top: var(--space-2); }

.savings-rate-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
}

.savings-rate-value {
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--color-primary);
}

.savings-product-detail-card,
.savings-interest-estimate-card,
.savings-request-review-card,
.savings-request-status-card,
.savings-settlement-card,
.savings-payment-method-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.savings-detail-block ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.savings-amount-selector,
.savings-tenor-selector,
.salary-amount-selector {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.savings-request-stepper,
.salary-request-stepper { margin-bottom: var(--space-4); }

.savings-request-card,
.salary-request-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2);
}

.savings-request-link,
.salary-request-link,
.savings-record-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.savings-request-amount,
.salary-request-amount {
  font-size: var(--fs-md);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  margin: var(--space-1) 0;
}

.savings-record-card {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  margin-bottom: var(--space-2);
}

.savings-record-amount {
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: var(--space-2) 0;
}

.savings-record-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.savings-record-actions .btn { min-height: 44px; }

.savings-maturity-notice,
.savings-trust-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: color-mix(in srgb, var(--color-primary) 5%, var(--surface-card));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
}

.savings-trust-note p,
.salary-repayment-notice p {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  color: var(--text-muted);
}

.savings-status-next,
.salary-status-next {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
}

.employee-verification-card,
.employee-verified-card,
.salary-guarantee-card,
.salary-attendance-summary-card,
.salary-request-review-card,
.salary-request-status-card,
.salary-company-trust-block {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.employee-verified-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.salary-attendance-days {
  font-size: var(--fs-xl);
  margin: var(--space-2) 0;
}

.salary-repayment-notice {
  padding: var(--space-3);
  background: var(--surface-subtle);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
}

/* Customer detail polish (Batch D5) */
.salary-payment-status-hero {
  margin-bottom: var(--space-4);
}

.salary-payment-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.salary-payment-summary-strip div {
  text-align: center;
}

.salary-payment-summary-strip dt {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.salary-payment-summary-strip dd {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-sm);
}

.salary-payment-history-card {
  display: block;
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.salary-payment-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.salary-payment-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.salary-payment-amount {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: var(--space-2) 0 var(--space-1);
}

.salary-payment-trust-footer {
  margin-top: var(--space-4);
}

.customer-inline-success-card {
  text-align: center;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
}

.customer-inline-success-icon {
  margin-bottom: var(--space-3);
}

.customer-inline-success-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.customer-inline-success-actions .btn {
  min-height: 44px;
}

.need-more-info-banner .need-more-info-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.need-more-info-hint {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: var(--space-2) 0 0;
}

.onboarding-progress-hint {
  text-align: center;
  margin-bottom: var(--space-4);
}

.onboarding-progress-text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.onboarding-progress-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.onboarding-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-soft);
}

.onboarding-progress-dot.is-active {
  background: var(--color-primary);
  width: 20px;
}

.onboarding-progress-dot.is-done {
  background: var(--color-primary);
  opacity: 0.5;
}

.settlement-confirm-row {
  padding: var(--space-4);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
}

.settlement-confirm-row input[type="checkbox"] {
  min-width: 20px;
  min-height: 20px;
}

.salary-limit-education-panel .salary-limit-icon {
  display: flex;
  align-items: center;
}

/* ─── Support / Notifications / Rates / Policy (Phase 29) ─── */

.support-hero,
.notification-center-hero,
.rate-hero,
.policy-reader-hero {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  margin-bottom: var(--space-4);
}

.support-hero h2,
.notification-center-hero h2,
.rate-hero h2,
.policy-reader-hero h2 {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-lg);
  color: var(--text-strong);
}

.notification-center-hero-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.notification-latest {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-sm);
}

.faq-category-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}

.faq-category-icon { flex-shrink: 0; }

.faq-accordion-item summary {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  min-height: 44px;
  cursor: pointer;
}

.faq-accordion-chevron { flex-shrink: 0; margin-top: 2px; }

.contact-support-card,
.hotline-card,
.notification-preference-card,
.policy-section-card,
.rate-comparison-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.hotline-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hotline-number {
  font-size: var(--fs-xl);
  color: var(--color-primary);
}

.support-trust-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: color-mix(in srgb, var(--color-primary) 5%, var(--surface-card));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}

.support-trust-note p {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  color: var(--text-muted);
}

.notification-card {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  margin-bottom: var(--space-2);
}

.notification-card.is-unread {
  border-left: 3px solid var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 4%, var(--surface-card));
}

.notification-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.notification-card-icon { flex-shrink: 0; }
.notification-card-body { flex: 1; min-width: 0; }

.notification-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.notification-card-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--fs-xs);
}

.notification-pref-row { margin-bottom: var(--space-2); min-height: 44px; }

.rate-segment-tabs { margin-bottom: var(--space-4); }

.rate-effective-date-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}

.loan-rate-card,
.deposit-rate-card,
.savings-rate-card.deposit-rate-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.loan-rate-card-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.loan-rate-value {
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--color-primary);
}

.loan-rate-value small {
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-normal);
  color: var(--text-muted);
}

.loan-rate-conditions {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.rate-comparison-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.rate-comparison-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-soft);
}

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

.policy-section-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.terms-consent-notice {
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--color-primary) 5%, var(--surface-card));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
}

.terms-consent-notice p {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}

.terms-consent-notice p:last-child { margin-bottom: 0; }

.savings-nav-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  padding-bottom: 0;
}

.savings-nav-tabs a {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  text-decoration: none;
}

.savings-nav-tabs a.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-card));
}

.content-nav-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  padding-bottom: 0;
}

.content-nav-tabs a {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  text-decoration: none;
}

.content-nav-tabs a.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-card));
}

.rate-effective-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--surface-card));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
}

.rate-product-group {
  margin-bottom: var(--space-4);
}

.rate-product-group-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.rate-row-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.rate-row-card {
  padding: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.rate-row-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.rate-row-tenor {
  font-weight: var(--font-weight-bold);
}

.rate-row-value {
  font-size: var(--type-metric-md-size);
  font-weight: var(--type-metric-md-weight);
  line-height: var(--type-metric-md-line);
  color: var(--color-primary);
}

.rate-row-value small {
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
}

.rate-disclaimer {
  padding: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  background: var(--surface-muted);
  border-radius: var(--radius-md);
}

.faq-search-bar {
  margin-bottom: var(--space-3);
}

.faq-item[hidden] {
  display: none !important;
}

.faq-empty-search {
  padding: var(--space-4);
  text-align: center;
  color: var(--text-muted);
}

.legal-document {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.legal-section-title {
  font-size: var(--type-body-strong-size);
  font-weight: var(--type-body-strong-weight);
  line-height: var(--type-body-strong-line);
  margin-bottom: var(--space-2);
  color: var(--text-strong);
}

.legal-section p {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
  line-height: 1.6;
}

.news-list-card {
  display: block;
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
}

.news-list-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.news-detail-meta {
  margin-bottom: var(--space-3);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.contact-info-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.contact-info-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.contact-info-note {
  font-size: var(--fs-xs);
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 160px;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--surface-muted);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}

.map-placeholder-icon {
  font-size: 2rem;
}

.map-placeholder-label {
  font-weight: var(--font-weight-bold);
}

.salary-nav-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  overflow-x: auto;
  padding-bottom: 0;
}

.salary-nav-tabs a {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  text-decoration: none;
}

.salary-nav-tabs a.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-card));
}

.guarantee-form-grid .form-row { margin-bottom: var(--space-3); }

.limit-type-picker {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.limit-type-option {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--surface-card);
}

.limit-type-option:has(input:checked) {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, var(--surface-card));
}

.savings-book-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.savings-book-card .book-code {
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

/* ─── Customer Loan Flow ─── */

.kyc-gate-banner { margin-bottom: var(--space-4); }

.loan-application-hero {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  color: var(--text-default);
}

.loan-application-hero-title {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
}
.loan-application-hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.loan-application-hero .btn-ghost { color: var(--color-primary); margin-top: var(--space-2); }

.loan-product-card {
  display: block;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  margin-bottom: var(--space-3);
  color: inherit;
  transition: border-color var(--transition-fast);
}

.loan-product-card:hover { border-color: var(--border-brand); }

.loan-product-comparison { display: grid; gap: var(--space-3); }

.loan-product-conditions {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.loan-product-actions {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.loan-product-actions .btn { min-height: 44px; }

.guided-loan-stepper { margin-bottom: var(--space-3); }

.loan-amount-selector .field { font-size: var(--fs-lg); font-weight: var(--font-weight-bold); }

.tenor-selector-label { display: block; margin-bottom: var(--space-2); font-weight: var(--font-weight-bold); }

.tenor-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.tenor-selector-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  cursor: pointer;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
}

.tenor-selector-option input { position: absolute; opacity: 0; pointer-events: none; }
.tenor-selector-option.is-selected { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-card)); color: var(--color-primary); }

.repayment-estimate-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.repayment-estimate-title {
  margin: 0 0 var(--space-3);
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
}

.repayment-estimate-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.repayment-estimate-metrics b { display: block; color: var(--text-strong); }
.repayment-estimate-highlight { color: var(--color-primary); }

.borrower-info-summary {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.borrower-info-summary div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--fs-sm);
}

.borrower-info-summary dt { color: var(--text-muted); }
.borrower-info-summary dd { margin: 0; font-weight: var(--font-weight-bold); text-align: right; }

.income-info-card,
.collateral-option-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.collateral-option-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  cursor: pointer;
  margin-top: var(--space-2);
}

.collateral-option-card.is-selected { border-color: var(--color-primary); }

.loan-document-upload-guide {
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.loan-document-upload-guide ul {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
  display: grid;
  gap: var(--space-2);
  font-size: var(--fs-sm);
}

.loan-document-upload-guide li { display: flex; align-items: center; gap: var(--space-2); }

.loan-document-upload-card {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
}

.loan-document-upload-card-icon { flex-shrink: 0; }
.loan-document-upload-card-body { flex: 1; min-width: 0; }
.loan-document-upload-card .btn { min-height: 44px; min-width: 44px; }

.loan-application-review-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.loan-application-review-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: flex-start;
}

.loan-request-status-card {
  background: var(--surface-card);
  color: var(--text-default);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.loan-request-status-code {
  font-size: var(--fs-lg);
  font-weight: var(--font-weight-bold);
  display: block;
  margin: var(--space-1) 0;
  color: var(--text-strong);
}
.loan-request-status-card .badge { font-size: var(--type-badge-size); padding: 2px 8px; }
.loan-request-next-step,
.customer-status-next-step {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-sm);
  color: var(--text-strong);
}

.customer-status-caption {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.loan-status-timeline {
  display: flex;
  gap: var(--space-1);
  margin: var(--space-4) 0;
  overflow-x: auto;
  padding-bottom: 0;
}

.loan-status-timeline-step {
  flex: 1;
  min-width: 64px;
  text-align: center;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  color: var(--text-muted);
}

.loan-status-timeline-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

.loan-status-timeline-step.is-done .loan-status-timeline-dot,
.loan-status-timeline-step.is-active .loan-status-timeline-dot { background: var(--color-primary); }

.loan-status-timeline-step.is-active .loan-status-timeline-label { color: var(--color-primary); font-weight: var(--font-weight-bold); }

.loan-draft-notice {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-muted));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  font-size: var(--fs-sm);
}

.loan-requirement-hint {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: var(--space-2) 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.loan-sticky-summary {
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}

.loan-sticky-summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.loan-safe-submit-panel {
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-top: var(--space-3);
}

.loan-request-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.loan-request-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.repayment-period-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
}

.repayment-period-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}

.repayment-period-card-no { font-weight: var(--type-card-title-weight); color: var(--text-strong); }
.repayment-period-card-due { font-size: var(--fs-sm); color: var(--text-muted); text-align: center; }
.repayment-period-card-total { color: var(--color-primary); }

.repayment-period-card-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  font-size: var(--fs-xs);
  text-align: center;
}

.repayment-period-card-breakdown dt { color: var(--text-muted); }
.repayment-period-card-breakdown dd { margin: 0; font-weight: var(--font-weight-bold); }

.wizard-step-panel { margin-bottom: var(--space-3); }

.wizard-step-title {
  margin: 0 0 var(--space-1);
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
}

.product-detail-faq { margin-top: var(--space-3); }
.product-detail-faq details { margin-bottom: var(--space-2); }

.loan-required-actions {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.loan-required-actions .btn { min-height: 44px; }

.loan-trust-footer {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
}

/* ─── CUX-1 — Customer App Visual Tone Calibration ─── */

.ca-compact-notice {
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-notice-radius);
  font-size: var(--fs-sm);
}

.ca-compact-notice--warning {
  border-left: 3px solid var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 4%, var(--surface-subtle));
}

.ca-compact-notice--info {
  border-left: 3px solid var(--color-info);
}

.ca-compact-notice--danger {
  border-left: 3px solid var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 3%, var(--surface-subtle));
}

.ca-compact-notice b {
  font-size: var(--fs-sm);
  color: var(--text-strong);
}

.ca-compact-notice .page-desc {
  font-size: var(--fs-xs);
  margin: var(--space-1) 0 0;
}

.need-more-info-banner .need-more-info-head { margin-bottom: var(--space-1); }

.mobile-page .btn-lg {
  padding: 10px 16px;
  font-size: var(--fs-md);
  min-height: 44px;
}

.mobile-page .customer-sticky-cta .btn,
.mobile-page .sticky-cta .btn {
  min-height: 44px;
  padding: 10px 16px;
}

.kyc-reject-reason-panel { border-left: 3px solid var(--color-danger); }

.security-microcopy {
  background: var(--surface-subtle);
  padding: var(--space-3);
}

.mobile-top.is-minimal .mobile-top-title { font-weight: var(--font-weight-bold); }

/* ─── CUX-2 — Customer Home dashboard refinement ─── */

.mobile-page--home {
  padding-top: var(--space-3);
}

.mobile-page--home .app-section-header {
  margin: var(--space-3) 0 var(--space-2);
}

.mobile-page--home .app-section-header:first-of-type {
  margin-top: var(--space-2);
}

.home-trust-compact {
  padding: var(--space-3);
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-notice-radius);
}

.home-trust-compact-line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.home-trust-compact-line + .home-trust-compact-line { margin-top: var(--space-1); }

.home-trust-compact-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-decoration: none;
}

.mobile-page--home .featured-product-card {
  padding: var(--space-2) var(--space-3);
}

.mobile-page--home .featured-product-icon {
  width: 40px;
  height: 40px;
}

.header-notify-icon .icon { color: var(--text-muted); }

/* ─── CUX-4 — Trust & financial communication ─── */

.financial-microcopy,
.rate-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  margin: var(--space-2) 0 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.status-explanation {
  margin: var(--space-1) 0 var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.payment-result-ipn {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

.financial-snapshot-card .rate-disclaimer {
  margin-top: var(--space-1);
  padding-top: var(--space-1);
  border-top: 1px solid var(--border-soft);
}

.loan-product-card .rate-disclaimer,
.savings-product-card .rate-disclaimer {
  margin: var(--space-2) 0 0;
}

@media (max-width: 360px) {
  .tenor-selector-grid { grid-template-columns: repeat(2, 1fr); }
  .repayment-estimate-metrics { grid-template-columns: 1fr; }
}

.loan-product-head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-2);
}

.loan-product-head b,
.savings-product-head b,
.savings-record-head b {
  display: block;
  font-size: var(--type-card-title-size);
  font-weight: var(--type-card-title-weight);
  line-height: var(--type-card-title-line);
  color: var(--text-strong);
}

.loan-product-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--surface-card));
  font-size: 1.35rem;
  flex-shrink: 0;
}

.loan-product-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.loan-wizard-stepper {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: 0;
  margin-bottom: var(--space-4);
}

.loan-wizard-step {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  opacity: 0.55;
}

.loan-wizard-step.is-active,
.loan-wizard-step.is-done { opacity: 1; }

.loan-wizard-no {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-bold);
  border: 2px solid var(--border-soft);
  color: var(--text-muted);
  background: var(--surface-card);
}

.loan-wizard-step.is-active .loan-wizard-no {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--surface-card));
}

.loan-wizard-step.is-done .loan-wizard-no {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--surface-card);
}

.loan-wizard-label {
  font-size: var(--type-caption-size);
  text-align: center;
  color: var(--text-muted);
  max-width: 72px;
  line-height: var(--type-caption-line);
}

.loan-wizard-step.is-active .loan-wizard-label { color: var(--text-strong); font-weight: var(--font-weight-bold); }

/* Customer App — ẩn thanh cuộn (giữ scroll / vuốt) */

/* Viewport dọc — trang cuộn chính trên mobile */
html:has(.mobile-shell),
body:has(.mobile-shell) {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html:has(.mobile-shell)::-webkit-scrollbar,
body:has(.mobile-shell)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* Vùng overflow dọc trong shell (sheet, drawer) */
.mobile-shell .customer-sheet-body,
.mobile-shell .drawer {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mobile-shell .customer-sheet-body::-webkit-scrollbar,
.mobile-shell .drawer::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* Viewport ngang — strip/tab/wizard */
.mobile-shell .ca-horizontal-scroll,
.mobile-shell [class*="-nav-tabs"],
.mobile-shell .mobile-filter-chips,
.mobile-shell .notification-filter-chips,
.mobile-shell .loan-wizard-stepper,
.mobile-shell .guided-loan-stepper,
.mobile-shell .loan-detail-nav,
.mobile-shell .loan-status-timeline,
.mobile-shell .mobile-promo-banner,
.mobile-shell .home-banner-scroll,
.mobile-shell .rate-highlight-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mobile-shell .ca-horizontal-scroll::-webkit-scrollbar,
.mobile-shell [class*="-nav-tabs"]::-webkit-scrollbar,
.mobile-shell .mobile-filter-chips::-webkit-scrollbar,
.mobile-shell .notification-filter-chips::-webkit-scrollbar,
.mobile-shell .loan-wizard-stepper::-webkit-scrollbar,
.mobile-shell .guided-loan-stepper::-webkit-scrollbar,
.mobile-shell .loan-detail-nav::-webkit-scrollbar,
.mobile-shell .loan-status-timeline::-webkit-scrollbar,
.mobile-shell .mobile-promo-banner::-webkit-scrollbar,
.mobile-shell .home-banner-scroll::-webkit-scrollbar,
.mobile-shell .rate-highlight-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.mobile-filter-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin-bottom: var(--space-4);
  padding-bottom: 0;
}

.notification-filter-chips {
  overflow-x: auto;
  margin-bottom: var(--space-4);
  padding-bottom: 0;
}

.filter-chip {
  flex-shrink: 0;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface-card);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--surface-card));
}

.repayment-schedule-row {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  background: var(--surface-card);
  overflow: hidden;
}

.repayment-schedule-row summary {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  list-style: none;
  align-items: center;
}

.repayment-schedule-row summary::-webkit-details-marker { display: none; }

.repayment-period { font-weight: var(--font-weight-bold); color: var(--text-strong); }
.repayment-due { font-size: var(--fs-sm); color: var(--text-muted); }
.repayment-total { font-weight: var(--font-weight-bold); color: var(--color-primary); }

.repayment-breakdown { padding: 0 var(--space-4) var(--space-3); }

.loan-detail-nav {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  overflow-x: auto;
}

.loan-detail-nav a {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-muted);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  text-decoration: none;
}

.loan-detail-nav a.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.loan-request-row {
  display: block;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  text-decoration: none;
  color: inherit;
}

.loan-request-row-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

/* ─── Master Data ─── */

.master-data-version-tag {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-weight: var(--font-weight-bold);
  margin-left: var(--space-1);
}

.master-data-rate {
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.master-data-page .tabs {
  margin-bottom: var(--space-4);
}

.master-data-drawer .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

/* ─── Responsive ─── */

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

@media (max-width: 980px) {
  .admin-layout,
  .admin-shell {
    grid-template-columns: 1fr;
    --admin-sidebar-current: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(var(--admin-sidebar-width), 88vw);
    transform: translateX(-104%);
    transition: transform var(--admin-shell-transition);
    display: block;
    box-shadow: var(--shadow-pop);
  }

  .admin-shell--drawer-open .admin-sidebar,
  .admin-layout.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }
  .searchbox { min-width: 0; flex: 1; }
  .topbar { padding: 0 14px; gap: var(--space-2); }
  .topbar-right .role-pill { display: none; }
  .page { padding: var(--space-4); }
  .grid-4, .grid-3, .grid-2, .detail-layout, .form-grid,
  .master-data-drawer .form-grid,
  .salary-limit-grid, .guarantee-grid, .import-result-kpis { grid-template-columns: 1fr; }
  .kpi-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-header { display: block; }
  .actions { margin-top: var(--space-3); }
  .info-list { grid-template-columns: 1fr; }
  .data-table { min-width: 960px; }
  .desktop-table-only { display: none; }
  .mobile-data-list { display: block; }
}

@media (max-width: 640px) {
  .page-title { font-size: var(--admin-type-page-title-size); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── CUX-5 — Customer App consistency pass ─── */

.customer-status-hero {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-left: var(--ca-hero-accent);
  border-radius: var(--ca-card-radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.customer-status-hero .badge {
  font-size: var(--type-badge-size);
  padding: 2px 8px;
}

.customer-status-hero.loan-request-status-card,
.customer-status-hero.savings-request-status-card,
.customer-status-hero.savings-record-status-card,
.customer-status-hero.salary-request-status-card,
.customer-status-hero.kyc-progress-card,
.customer-status-hero.member-status-card {
  margin-bottom: var(--space-4);
}

.customer-notice-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.customer-notice-action {
  margin-top: var(--space-2);
}

.customer-notice-action .btn { min-height: 44px; }

.mobile-page .alert-card {
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-notice-radius);
  font-size: var(--fs-sm);
}

.mobile-page .alert-card.alert-warning {
  border-left: 3px solid var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 4%, var(--surface-subtle));
}

.mobile-page .alert-card.alert-danger {
  border-left: 3px solid var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 3%, var(--surface-subtle));
}

.mobile-page .alert-card b {
  font-size: var(--fs-sm);
  color: var(--text-strong);
}

.mobile-page .alert-card .page-desc {
  font-size: var(--fs-xs);
  margin: var(--space-1) 0 0;
}

.customer-timeline--vertical .transaction-status-label {
  line-height: 1.35;
}

.customer-timeline--horizontal .loan-status-timeline-label {
  font-size: var(--fs-xs);
  line-height: 1.25;
}

.customer-timeline--horizontal .loan-status-timeline-step.is-done .loan-status-timeline-label,
.customer-timeline--horizontal .loan-status-timeline-step.is-active .loan-status-timeline-label {
  color: var(--text-strong);
}

.mobile-page .btn-danger,
.mobile-page .btn.btn-danger {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--surface-card);
}

.mobile-page h3.mt-4 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  font-size: var(--fs-md);
  color: var(--text-strong);
}

/* ─── CUX-3 — Mobile interaction maturity ─── */

.customer-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: color-mix(in srgb, var(--surface-inverse) 40%, transparent);
  padding: 0;
}

.customer-sheet-backdrop.open { display: flex; }

.customer-bottom-sheet {
  width: 100%;
  max-width: 480px;
  max-height: min(85vh, 640px);
  background: var(--surface-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.customer-sheet-backdrop.open .customer-bottom-sheet {
  transform: translateY(0);
}

.customer-sheet-grabber {
  width: 40px;
  height: 4px;
  margin: var(--space-2) auto 0;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  flex-shrink: 0;
}

.customer-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-2);
}

.customer-sheet-title {
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--text-strong);
}

.customer-sheet-close {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.customer-sheet-body {
  padding: 0 var(--space-4) var(--space-3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-sheet-footer {
  padding: var(--space-3) var(--space-4) calc(var(--space-4) + var(--safe-area-bottom));
  border-top: 1px solid var(--border-soft);
  background: var(--surface-card);
}

.customer-sheet-footer .btn { min-height: 44px; }

.customer-confirm-recap {
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--ca-card-radius);
  font-size: var(--fs-sm);
}

.customer-confirm-recap b { color: var(--text-strong); }

body.customer-sheet-open { overflow: hidden; }

.cta-disabled-hint {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-align: left;
}

.customer-safe-submit-panel {
  margin-top: var(--space-3);
}

.mobile-page .field:focus-visible,
.mobile-page .select:focus-visible,
.mobile-page textarea.field:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.mobile-page .field.is-invalid,
.mobile-page .select.is-invalid {
  border-color: var(--color-danger);
}

.mobile-page .field-error:not([hidden]) {
  display: block;
}

.mobile-page .sticky-cta .btn:disabled {
  opacity: 0.5;
}

@media (max-width: 360px) {
  .customer-sheet-body { padding-inline: var(--space-3); }
  .customer-sheet-footer { padding-inline: var(--space-3); }
}
