:root {
  --color-primary: #237a3b;
  --color-secondary: #1f6f9e;
  --color-accent: #d99a22;
  --color-background: #f4f7f5;
  --color-surface: #ffffff;
  --color-text: #1d2b24;
  --color-muted: #65736b;
  --color-sidebar: #173f2a;
  --color-button: #237a3b;
  --color-border: #d8e0da;
  --color-danger: #b42318;
  --color-warning: #b36b00;
  --color-success: #237a3b;
  --shadow-soft: 0 10px 25px rgba(22, 51, 35, 0.08);
  --radius: 8px;
  --font-sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
  min-width: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.mobile-backdrop {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--color-sidebar);
  color: #ffffff;
  padding: 22px 18px;
}

.brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 20px;
  padding-bottom: 18px;
}

.brand-mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  display: inline-flex;
  font-size: 22px;
  font-weight: 800;
  height: 52px;
  justify-content: center;
  margin-bottom: 12px;
  width: 70px;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.brand p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  margin: 0;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-group {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 14px 0 2px;
}

.nav-link {
  align-items: center;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  font-size: 17px;
  font-weight: 700;
  gap: 12px;
  padding: 13px 14px;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.nav-link.nav-child {
  font-size: 15px;
  margin-left: 18px;
  padding-left: 12px;
}

.nav-link.nav-child .nav-icon {
  height: 30px;
  min-width: 30px;
  width: 30px;
}

.nav-link.nav-child .nav-icon svg {
  height: 17px;
  width: 17px;
}

.nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.94);
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  min-width: 36px;
  transition: background 0.15s ease, color 0.15s ease;
  width: 36px;
}

.nav-icon svg {
  display: block;
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.content {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 82px;
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.button.mobile-menu {
  display: none;
}

.page-title h2 {
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 4px;
}

.breadcrumbs {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
}

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

.main-view {
  margin: 0 auto;
  max-width: 1580px;
  padding: 26px;
}

.page-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-header h3 {
  font-size: 24px;
  margin: 0 0 4px;
}

.page-header p {
  color: var(--color-muted);
  margin: 0;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.button.primary {
  background: var(--color-button);
  color: #ffffff;
}

.button.primary:hover {
  filter: brightness(0.94);
}

.button.secondary {
  background: #ffffff;
  border-color: var(--color-border);
  color: var(--color-text);
}

.button.secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.button.warning {
  background: #fff6e4;
  border-color: #ffd999;
  color: #7a4600;
}

.button.danger {
  background: #fff1f0;
  border-color: #ffccc7;
  color: var(--color-danger);
}

.button.small {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 15px;
}

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

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

.app-card-grid {
  align-items: stretch;
  display: grid;
  gap: 22px;
}

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

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

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

.app-card-grid--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.app-split-grid {
  align-items: stretch;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.grid > *,
.app-card-grid > *,
.app-split-grid > *,
.toolbar > *,
.filter-fields > *,
.form-grid > *,
.field > *,
.section-actions > *,
.modal > *,
.modal form > *,
.computed-grid > *,
.stepper > *,
.preset-grid > *,
.check-row > *,
.profile-heading > *,
.donut-wrap > *,
.bar-row > *,
.line-chart-wrap > * {
  min-width: 0;
}

.dashboard-section {
  margin: 24px 0 0;
}

.dashboard-tabs {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 16px;
}

.dashboard-tabs a {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-size: 18px;
  font-weight: 900;
  padding: 14px 16px;
  text-align: center;
  text-decoration: none;
}

.dashboard-tabs a.active,
.dashboard-tabs a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.dashboard-stat-strip {
  margin: 16px 0 0;
}

.dashboard-chart-grid {
  align-items: stretch;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-chart-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-chart-grid > .dashboard-card {
  min-height: 520px;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 24px;
}

.dashboard-card-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dashboard-card-title {
  color: var(--color-text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

.dashboard-card-description {
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.4;
  margin: 6px 0 0;
}

.dashboard-card-action {
  flex: 0 0 auto;
}

.dashboard-card-action .button {
  border-radius: 10px;
  min-height: 42px;
  padding: 0 18px;
}

.dashboard-stats-grid,
.dashboard-stat-strip.stats-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-stat-strip .stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
}

.dashboard-source-card {
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-source-card:hover,
.dashboard-source-card:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.dashboard-source-card-action {
  color: var(--color-primary);
  display: inline-block;
  font-size: 13px;
  font-weight: 900;
  margin-top: 10px;
}

.dashboard-source-panel {
  margin-top: 18px;
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(170px, 1fr));
}

.two-column {
  align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

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

.app-card,
.panel,
.stat-card,
.form-section,
.chart-card,
.summary-card,
.financial-tab-panel,
.computed-item,
.empty-state {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  min-width: 0;
}

.app-card,
.panel,
.form-section,
.chart-card {
  padding: 22px 24px;
}

.app-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.app-card-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-card-title {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

.app-card-subtitle,
.app-card-description {
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.app-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.app-card-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: auto;
}

.app-card-action {
  flex: 0 0 auto;
}

.app-card .button {
  border-radius: 10px;
  min-height: 44px;
  padding-inline: 18px;
}

.app-action-card {
  min-height: 260px;
}

.app-action-card .app-card-body {
  justify-content: space-between;
}

.app-form-card .form-grid {
  gap: 18px 22px;
}

.app-table-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.app-table-card .data-table-toolbar {
  background: #f8fbf9;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.app-table-card .table-wrap {
  border-radius: 14px;
}

.app-empty-card {
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.chart-canvas-wrap {
  position: relative;
}

.chart-canvas-wrap canvas {
  display: block;
  width: 100%;
}

.dashboard-chart-body {
  flex: 0 0 340px;
  height: 340px;
  min-height: 340px;
  width: 100%;
}

.dashboard-chart-body canvas {
  height: 100% !important;
  width: 100% !important;
}

.demographic-barangay-card,
.demographic-pair-card {
  grid-column: 1 / -1;
}

.demographic-chart-table-layout {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 0.75fr);
}

.demographic-chart-table-layout .dashboard-chart-body {
  flex-basis: auto;
}

.demographic-summary-table-wrap {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
}

.demographic-summary-table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

.demographic-summary-table th,
.demographic-summary-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
}

.demographic-summary-table th {
  background: #eef6f0;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 950;
}

.demographic-summary-table td:last-child,
.demographic-summary-table th:last-child {
  text-align: right;
}

.demographic-summary-table td:nth-child(2),
.demographic-summary-table th:nth-child(2) {
  text-align: right;
  white-space: nowrap;
}

.demographic-summary-table .total-row td {
  background: #f7faf8;
  color: var(--color-text);
  font-weight: 950;
}

.chart-empty {
  align-items: center;
  background: #f7faf8;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 260px;
  padding: 18px;
  text-align: center;
}

.service-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.service-card p {
  color: var(--color-muted);
  margin: 0;
}

.location-map-summary {
  margin-bottom: 16px;
}

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

.location-filter-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.location-map-canvas {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  min-height: 430px;
  overflow: hidden;
  position: relative;
}

.analytics-leaflet-map {
  height: 430px;
  min-height: 430px;
  width: 100%;
}

.analytics-map-fallback {
  align-items: center;
  color: var(--color-muted);
  display: grid;
  font-weight: 800;
  gap: 8px;
  min-height: 280px;
  padding: 24px;
  text-align: center;
}

.leaflet-reset-view {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.leaflet-reset-view:hover,
.leaflet-reset-view:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.stat-card {
  container-type: inline-size;
  justify-content: center;
  min-height: 150px;
  padding: 20px;
}

.stat-card .label {
  color: var(--color-muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
}

.stat-card .value {
  color: var(--color-text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stat-card .helper {
  color: var(--color-muted);
  font-size: 14px;
  margin-top: 10px;
}

.panel-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title h3,
.panel-title h4 {
  font-size: 20px;
  margin: 0;
}

.panel-title p {
  color: var(--color-muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.dashboard-card-header.panel-title {
  align-items: flex-start;
  margin-bottom: 18px;
}

.dashboard-card .chart-empty {
  flex: 0 0 340px;
  min-height: 340px;
}

.toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(150px, 190px));
  margin-bottom: 14px;
}

.toolbar.reports-toolbar {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.filter-bar {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.filter-fields {
  display: grid;
  flex: 1;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

.field label {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 800;
}

.required-marker {
  color: var(--color-danger);
  margin-left: 4px;
}

.field small {
  color: var(--color-muted);
  display: block;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  background: #ffffff;
  border: 1px solid #b8c5bd;
  border-radius: var(--radius);
  color: var(--color-text);
  min-height: 46px;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.field select {
  text-overflow: ellipsis;
}

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

.field input[type='checkbox'] {
  height: 20px;
  min-height: auto;
  width: 20px;
}

.field input[type='color'] {
  height: 46px;
  padding: 4px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.button:focus {
  outline: 3px solid rgba(35, 122, 59, 0.22);
  outline-offset: 1px;
}

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

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

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

.form-section {
  margin-bottom: 16px;
}

.form-section h4 {
  font-size: 18px;
  margin: 0;
}

.form-section .section-helper {
  color: var(--color-muted);
  margin: 6px 0 0;
}

.section-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  min-width: 0;
}

.section-actions .button {
  flex: 0 1 auto;
}

.data-table {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.data-table-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.table-status {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 800;
}

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

.table-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-pagination label {
  align-items: center;
  color: var(--color-muted);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 6px;
}

.table-pagination select {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  min-height: 36px;
  padding: 6px 8px;
}

.table-wrap {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  max-height: min(68vh, 720px);
  overflow: auto;
  position: relative;
}

.statement-edit-note {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

.statement-panel-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 12px 0;
}

.statement-panel-header h4 {
  margin: 0;
}

.financial-tab-panel {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  min-width: 0;
  padding: 22px 24px;
}

.financial-table-wrap {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: visible;
  width: 100%;
}

.financial-edit-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.financial-edit-table th,
.financial-edit-table td {
  max-width: none;
  overflow: visible;
  padding: 8px;
  text-overflow: clip;
  white-space: normal;
}

.financial-edit-table thead th {
  position: static;
}

.financial-edit-table th:first-child,
.financial-edit-table td:first-child {
  width: 34%;
}

.financial-input {
  background: #ffffff;
  border: 1px solid #cfdad2;
  border-radius: 6px;
  color: var(--color-ink);
  font: inherit;
  min-height: 36px;
  padding: 7px 8px;
  width: 100%;
}

.financial-input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
  outline: 0;
}

.financial-number {
  text-align: right;
}

.columns-menu {
  margin: 0;
  position: relative;
}

.columns-menu summary {
  display: inline-flex;
  list-style: none;
}

.columns-menu-panel {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-width: 360px;
  min-width: 260px;
  padding: 12px;
  position: absolute;
  right: 0;
  z-index: 12;
}

.columns-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.columns-menu-panel label {
  align-items: center;
  display: flex;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

table {
  border-collapse: collapse;
  min-width: 100%;
  table-layout: auto;
}

caption {
  font-weight: 900;
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

th,
td {
  border-bottom: 1px solid #dfe6e1;
  border-right: 1px solid #edf1ee;
  padding: 12px 13px;
  text-align: left;
  vertical-align: top;
}

td {
  max-width: 320px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

th:last-child,
td:last-child {
  border-right: 0;
}

thead th {
  background: #eef4f0;
  color: #24342a;
  font-size: 14px;
  font-weight: 900;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 3;
}

.sticky-col {
  left: 0;
  min-width: 170px;
  position: sticky;
  z-index: 2;
}

th.sticky-col {
  z-index: 5;
}

td.sticky-col {
  background: inherit;
  box-shadow: 1px 0 0 #dfe6e1;
  font-weight: 800;
}

.sticky-actions {
  min-width: 190px;
  position: sticky;
  right: 0;
  z-index: 2;
}

th.sticky-actions {
  z-index: 5;
}

td.sticky-actions {
  background: inherit;
  box-shadow: -1px 0 0 #dfe6e1;
}

tbody tr:nth-child(even) {
  background: #fbfcfb;
}

tbody tr:hover {
  background: #f4fbf6;
}

.sort-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  gap: 4px;
  justify-content: flex-start;
  min-height: 32px;
  padding: 0;
  text-align: left;
  user-select: none;
  width: 100%;
}

.sort-button:focus {
  outline: 3px solid rgba(35, 122, 59, 0.22);
  outline-offset: 2px;
}

.table-message {
  background: #f8fbf9;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  font-weight: 800;
  padding: 12px 14px;
}

.table-message.error {
  background: #fff1f0;
  color: var(--color-danger);
}

.empty-cell {
  color: var(--color-muted);
  padding: 28px;
  text-align: center;
}

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

.app-table-empty-wrap {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
}

.table-empty-state {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin: 14px;
  padding: 22px;
  text-align: center;
}

.cell-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.app-table-scroll {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  max-width: 100%;
  overflow: auto;
  position: relative;
  width: 100%;
}

.app-data-table {
  background: #ffffff;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  table-layout: auto;
}

.app-data-table th,
.app-data-table td {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #edf2f7;
  color: var(--color-text);
  overflow-wrap: anywhere;
  padding: 10px 12px;
  vertical-align: middle;
}

.app-data-table thead th {
  background: #eef4fb;
  color: #24342a;
  font-size: 14px;
  font-weight: 900;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 6;
}

.app-data-table tbody tr:nth-child(even) td {
  background: #fbfcfb;
}

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

.app-data-table .sticky-left-1 {
  background: #ffffff;
  box-shadow: 6px 0 8px -8px rgba(15, 23, 42, 0.35);
  left: 0;
  min-width: 170px;
  position: sticky;
  z-index: 4;
}

.app-data-table .sticky-left-1.is-number-col {
  min-width: 110px;
  width: 110px;
}

.app-data-table thead .sticky-left-1 {
  background: #eef4fb;
  z-index: 8;
}

.app-data-table tbody tr:nth-child(even) .sticky-left-1 {
  background: #fbfcfb;
}

.app-data-table tbody tr:hover .sticky-left-1 {
  background: #f8fafc;
}

.app-data-table .sticky-actions {
  background: #ffffff;
  box-shadow: -6px 0 8px -8px rgba(15, 23, 42, 0.35);
  min-width: 150px;
  overflow: visible;
  position: sticky;
  right: 0;
  width: 150px;
  z-index: 5;
}

.app-data-table .sticky-actions.actions-wide {
  min-width: 220px;
  width: 220px;
}

.app-data-table .sticky-actions.actions-compact {
  min-width: 150px;
  width: 150px;
}

.app-data-table thead .sticky-actions {
  background: #eef4fb;
  z-index: 9;
}

.app-data-table tbody tr:nth-child(even) .sticky-actions {
  background: #fbfcfb;
}

.app-data-table tbody tr:hover .sticky-actions {
  background: #f8fafc;
}

.app-data-table .nowrap {
  white-space: nowrap;
}

.app-data-table .address-cell {
  max-width: 340px;
  min-width: 240px;
  white-space: normal;
}

.table-actions,
.cell-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
}

.table-actions .button,
.cell-actions .button,
.table-actions button,
.cell-actions button {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  white-space: nowrap;
}

.app-data-table td.sticky-actions,
.app-data-table td.actions-col {
  vertical-align: middle;
}

.status-badge {
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-active,
.status-approved,
.status-updated,
.status-completed,
.status-submitted,
.status-signed,
.status-paid {
  background: #e7f6eb;
  border-color: #b9e1c3;
  color: #17652d;
}

.status-upcoming {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
}

.status-due-soon {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.status-due-today {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.status-mapped,
.status-confirmed {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.status-needs-review,
.status-approximate {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.status-missing-coordinates,
.status-missing-permanent-address {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.status-failed {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.status-partially-paid {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.status-pending,
.status-draft,
.status-missing,
.status-delayed {
  background: #fff7e8;
  border-color: #f2cc8d;
  color: #7a4d00;
}

.status-disapproved,
.status-rejected,
.status-defaulted,
.status-delinquent,
.status-overdue {
  background: #fff1f0;
  border-color: #ffccc7;
  color: var(--color-danger);
}

.status-released,
.status-not-applicable {
  background: #eaf4ff;
  border-color: #b8d9f4;
  color: #155c8a;
}

.tabs {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.member-tabs-scroll {
  margin-bottom: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.member-tabs {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: max-content;
}

.member-tab {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  min-height: 40px;
  padding: 8px 14px;
  white-space: nowrap;
  width: auto;
}

.member-tab:hover {
  background: #f3f7f4;
  border-color: #b9d5c1;
  color: var(--color-text);
}

.member-tab:focus-visible {
  outline: 3px solid rgba(35, 122, 59, 0.22);
  outline-offset: 2px;
}

.member-tab.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  width: auto;
}

.member-biodata-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-biodata-grid .form-section:first-child {
  align-self: start;
  grid-column: 1 / -1;
}

.member-biodata-grid .form-section:nth-child(2) {
  align-self: start;
  grid-column: 1 / -1;
}

.member-biodata-grid .personal-info-lower-grid {
  grid-column: 1 / -1;
}

.member-biodata-grid > .form-section {
  min-height: 0;
}

.member-personal-info-card .app-card-body {
  flex: 0 1 auto;
}

.member-personal-info-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.personal-info-fields-stack {
  display: grid;
  gap: 16px;
}

.member-profile-picture-card {
  align-self: start;
  background: #f8fbf9;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.member-profile-picture-card .large-avatar {
  height: 76px;
  width: 76px;
}

.member-personal-info-card .member-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-profile-picture-header h5 {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

.member-profile-picture-header p {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin: 4px 0 0;
}

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

.member-form-grid .field,
.address-contact-grid .field {
  align-content: start;
}

.member-form-grid .field label,
.address-contact-grid .field label {
  align-items: flex-start;
  display: flex;
  min-height: 38px;
}

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

.personal-info-lower-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
}

.family-background-card {
  align-self: start;
  min-height: 0;
  width: 100%;
}

.family-background-grid {
  gap: 18px;
}

.family-background-field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.family-background-card textarea {
  min-height: 80px;
  resize: vertical;
}

.address-contact-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.address-contact-section {
  border-top: 1px solid var(--color-border);
  padding-top: 18px;
}

.address-contact-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.address-contact-section-title {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 900;
  margin: 0 0 4px;
}

.address-contact-section-helper {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 14px;
}

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

.address-contact-grid .field-full {
  grid-column: 1 / -1;
}

.address-contact-card textarea {
  min-height: 84px;
  resize: vertical;
}

.address-contact-card input,
.address-contact-card select {
  min-height: 42px;
}

.checkbox-row {
  align-items: center;
  color: var(--color-text);
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  min-height: 42px;
}

.checkbox-row input {
  flex: 0 0 auto;
  height: 16px;
  min-height: 16px;
  width: 16px;
}

.financial-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.financial-tabs .tab {
  border-bottom: 1px solid var(--color-border);
  border-radius: 8px;
  flex: 1 0 max-content;
  min-width: max-content;
  overflow: visible;
  padding-inline: 18px;
  text-overflow: clip;
}

.financial-tabs .tab.active {
  box-shadow: 0 4px 12px rgb(35 122 59 / 18%);
}

.financial-statements-panel .data-table-toolbar {
  background: #f8fbf9;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.financial-statements-panel .table-wrap {
  max-height: none;
}

.financial-statements-panel tbody tr:hover td {
  background: #f2f8f3;
}

.tab {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--color-muted);
  font-weight: 900;
  min-height: 44px;
  padding: 9px 13px;
  white-space: nowrap;
}

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

.summary-card {
  padding: 22px 24px;
}

.summary-card h4 {
  font-size: 18px;
  margin: 0;
}

.summary-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.summary-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.summary-row span:first-child {
  color: var(--color-muted);
  flex: 1 1 auto;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-row strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
  word-break: break-word;
}

.chart-card {
  min-height: 320px;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-label {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  min-width: 0;
}

.bar-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-label span:last-child {
  flex: 0 1 auto;
  max-width: 46%;
  text-align: right;
}

.chart-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chart-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.bar-track {
  background: #edf2ef;
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
}

.bar-fill {
  background: var(--color-primary);
  height: 100%;
}

.mini-chart {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(38px, 1fr));
  min-height: 160px;
}

.mini-col {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.mini-bar {
  background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
  border-radius: 6px 6px 0 0;
  min-height: 14px;
  width: 100%;
}

.mini-label {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.collection-lower-summary {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.collection-summary-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collection-summary-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.collection-summary-card .app-card-header {
  padding: 18px 18px 12px;
}

.collection-summary-table {
  border-top: 1px solid var(--color-border);
  display: grid;
  min-width: 0;
}

.collection-summary-head,
.collection-summary-row {
  align-items: center;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.collection-summary-head {
  background: #e8f1fb;
  color: #06306f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  padding: 12px 16px;
  text-transform: uppercase;
}

.collection-summary-head span:not(:first-child),
.summary-row-metric {
  text-align: right;
}

.collection-summary-body {
  max-height: 300px;
  overflow: auto;
}

.collection-summary-row {
  border-top: 1px solid #e2e8f0;
  color: var(--color-text);
  padding: 14px 16px;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.collection-summary-row:hover,
.collection-summary-row:focus {
  background: #f8fbff;
  color: #0f3b70;
  outline: none;
}

.collection-summary-row--two {
  grid-template-columns: 1fr 1.35fr;
}

.collection-summary-row--three {
  grid-template-columns: 0.75fr 1.45fr 1fr;
}

.summary-row-main,
.summary-row-metric strong {
  display: block;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-row-metric {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.summary-mini-bar {
  background: #edf2f7;
  border-radius: 999px;
  display: block;
  height: 6px;
  justify-self: stretch;
  overflow: hidden;
  width: 100%;
}

.summary-mini-bar span {
  background: #0f3b70;
  border-radius: inherit;
  display: block;
  height: 100%;
}

.collection-summary-empty {
  color: var(--color-muted);
  font-weight: 800;
  padding: 28px 18px;
  text-align: center;
}

.collection-summary-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.collection-summary-footer span {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  margin-right: 6px;
}

.donut-wrap {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 190px minmax(0, 1fr);
}

.donut {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  container-type: inline-size;
  display: flex;
  justify-content: center;
  position: relative;
}

.donut::after {
  background: var(--color-surface);
  border-radius: 50%;
  content: '';
  inset: 32px;
  position: absolute;
}

.donut span {
  display: block;
  font-size: clamp(12px, 10cqw, 26px);
  font-weight: 900;
  line-height: 1;
  max-width: 58%;
  overflow: hidden;
  position: relative;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 1;
}

.chart-legend {
  display: grid;
  gap: 8px;
}

.chart-legend span {
  align-items: center;
  display: flex;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
}

.chart-legend .chart-label {
  flex: 0 1 auto;
}

.chart-legend .chart-value {
  flex: 1 1 auto;
}

.chart-legend i {
  border-radius: 4px;
  flex: 0 0 14px;
  display: inline-block;
  height: 14px;
  width: 14px;
}

.grouped-chart {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  min-height: 210px;
}

.grouped-chart-row {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.grouped-chart-bars {
  align-items: end;
  display: flex;
  gap: 5px;
  height: 160px;
}

.grouped-chart-bar {
  border-radius: 5px 5px 0 0;
  display: block;
  width: 18px;
}

.grouped-chart-label {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.line-chart-wrap {
  display: grid;
  gap: 10px;
}

.line-chart {
  background: #fbfcfb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  height: auto;
  max-height: 260px;
  width: 100%;
}

.line-chart line {
  stroke: #cfd8d2;
  stroke-width: 1.5;
}

.line-chart polyline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.line-chart text {
  fill: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

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

.print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.print-layout {
  display: grid;
  gap: 18px;
}

.print-layout .data-table {
  display: block;
}

.print-layout .data-table-toolbar,
.print-layout .columns-menu {
  display: none;
}

.print-layout .table-wrap {
  border-radius: 0;
  max-height: none;
  overflow: visible;
}

.print-layout table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.print-layout th,
.print-layout td {
  max-width: none;
  overflow: visible;
  padding: 6px;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.print-layout thead th,
.print-layout .sticky-col,
.print-layout .sticky-actions {
  box-shadow: none;
  min-width: 0;
  position: static;
}

.a4-page {
  background: #ffffff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  color: #111111;
  margin: 0 auto;
  min-height: 1123px;
  padding: 36px;
  width: 794px;
}

.print-page-body {
  overflow: visible;
}

.printable-header {
  align-items: center;
  border-bottom: 2px solid #111111;
  display: grid;
  gap: 12px;
  grid-template-columns: 60px minmax(0, 1fr) minmax(160px, 34%);
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.printable-header > * {
  min-width: 0;
}

.printable-header > strong {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.printable-header h1 {
  font-size: 18px;
  margin: 0;
}

.printable-header p {
  margin: 2px 0 0;
}

.print-logo {
  align-items: center;
  border: 2px solid #111111;
  border-radius: 50%;
  display: flex;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.print-section {
  break-inside: avoid;
  margin-bottom: 14px;
}

.print-section h2 {
  border-bottom: 1px solid #333333;
  font-size: 16px;
  margin: 0 0 8px;
  padding-bottom: 4px;
}

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

.print-fields div {
  border: 1px solid #999999;
  min-height: 34px;
  padding: 5px 7px;
}

.print-fields strong {
  display: block;
  font-size: 11px;
}

.print-fields span {
  display: block;
  min-height: 16px;
}

.print-consent {
  border: 1px solid #999999;
  margin: 12px 0;
  padding: 10px;
}

.signature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 26px;
}

.signature-line {
  border-top: 1px solid #111111;
  margin-top: 34px;
  padding-top: 5px;
  text-align: center;
}

.signature-line span {
  display: block;
  min-height: 18px;
}

.signature-line strong {
  display: block;
  font-size: 12px;
}

.printable-footer {
  align-items: center;
  border-top: 1px solid #111111;
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 8px;
}

.profile-heading {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  margin-bottom: 18px;
}

.avatar {
  align-items: center;
  background: #e5f3ea;
  border: 1px solid #b9dfc4;
  border-radius: var(--radius);
  color: var(--color-primary);
  display: flex;
  font-size: 25px;
  font-weight: 900;
  height: 70px;
  justify-content: center;
  width: 70px;
}

.member-photo {
  object-fit: cover;
}

.table-avatar {
  border-radius: 50%;
  font-size: 13px;
  height: 42px;
  width: 42px;
}

.member-table-photo {
  align-items: center;
  background: #e5f3ea;
  border: 1px solid #b9dfc4;
  border-radius: 999px;
  color: var(--color-primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  object-fit: cover;
  width: 36px;
}

.app-data-table .photo-cell {
  min-width: 72px;
  text-align: center;
  width: 72px;
}

.member-registry-print {
  display: none;
}

.registry-print-header {
  background: #9ccd89;
  border: 1px solid #4f7f42;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  padding: 6px 8px 4px;
  text-align: center;
}

.registry-print-header h1 {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  text-transform: uppercase;
}

.registry-print-header p {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  margin: 2px 0 0;
}

.registry-print-table {
  border-collapse: collapse;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8px;
  table-layout: fixed;
  width: 100%;
}

.registry-print-table th,
.registry-print-table td {
  border: 1px solid #4b5563;
  line-height: 1.15;
  padding: 2px 3px;
  vertical-align: middle;
  word-break: normal;
}

.registry-print-table thead th {
  background: #9ccd89;
  color: #000000;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.registry-print-table tbody td {
  background: #dbeafe;
}

.registry-print-table tbody tr:nth-child(even) td {
  background: #cfe0f5;
}

.registry-print-table .money-cell {
  text-align: right;
  white-space: nowrap;
}

.registry-col-no {
  width: 28px;
}

.registry-col-name {
  width: 78px;
}

.registry-col-tin {
  width: 86px;
}

.registry-col-mobile {
  width: 84px;
}

.registry-col-birthdate {
  width: 66px;
}

.registry-col-address {
  width: 74px;
}

.registry-col-city {
  width: 86px;
}

.registry-col-capital {
  width: 80px;
}

.registry-total-row td {
  background: #f4d7bf;
  font-weight: 900;
}

.registry-total-label {
  text-align: left;
}

.registry-signatories {
  background: #f4d7bf;
  border: 1px solid #b78b69;
  border-top: 0;
  display: grid;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  gap: 40px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px 28px 10px;
}

.registry-signatory {
  display: grid;
  gap: 4px;
}

.registry-signatory-line {
  border-bottom: 1px solid #000000;
  height: 24px;
  margin-top: 4px;
}

.registry-signatory-name {
  font-weight: 900;
  min-height: 10px;
  text-align: center;
}

.registry-signatory-title {
  font-size: 8px;
  text-align: center;
}

.large-avatar {
  height: 96px;
  width: 96px;
}

.profile-picture-editor {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 76px minmax(0, 1fr);
}

.profile-picture-controls {
  display: grid;
  gap: 8px;
  justify-items: start;
  min-width: 0;
}

.profile-upload-button {
  align-items: center;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  justify-content: center;
  line-height: 1.2;
  min-height: 40px;
  padding: 10px 14px;
}

.profile-upload-button input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.profile-upload-button:hover,
.profile-upload-button:focus-within {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.profile-file-name {
  color: var(--color-muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-picture-remove {
  align-items: center;
  background: #fff8f7;
  border: 1px solid #f4c7c3;
  border-radius: 8px;
  color: var(--color-danger);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  justify-self: start;
  line-height: 1.2;
  padding: 9px 11px;
}

.profile-picture-remove input {
  accent-color: var(--color-danger);
  height: 16px;
  margin: 0;
  width: 16px;
}

.check-row {
  align-items: center;
  color: var(--color-text);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
}

.muted {
  color: var(--color-muted);
  font-weight: 700;
  margin: 0;
}

.profile-heading h3 {
  font-size: 24px;
  margin: 0 0 5px;
}

.profile-meta {
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
}

.profile-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.step {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 900;
  min-height: 54px;
  padding: 9px;
  text-align: left;
}

.step.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

.checklist {
  display: grid;
  gap: 10px;
}

.check-row {
  align-items: end;
  background: #fbfcfb;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) 170px 160px minmax(180px, 1fr) auto;
  padding: 12px;
}

.check-title {
  font-weight: 900;
}

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

.computed-item {
  background: #f8fbf9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  container-type: inline-size;
  padding: 14px;
}

.computed-item span {
  color: var(--color-muted);
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.computed-item strong {
  display: block;
  font-size: 22px;
  margin-top: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@supports (font-size: 1cqw) {
  .stat-card .value {
    font-size: clamp(20px, 12cqw, 28px);
  }

  .computed-item strong {
    font-size: clamp(18px, 11cqw, 22px);
  }

  .donut span {
    font-size: clamp(12px, 10cqw, 26px);
  }
}

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

.preset-button {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  display: grid;
  font-weight: 900;
  gap: 10px;
  min-height: 82px;
  padding: 10px;
  text-align: left;
}

.preset-button:hover {
  border-color: var(--color-primary);
}

.preset-swatches {
  display: flex;
  gap: 5px;
}

.swatch {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  height: 20px;
  width: 20px;
}

.theme-preview {
  background: var(--preview-bg, var(--color-background));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--preview-text, var(--color-text));
  overflow: hidden;
}

.theme-preview .preview-sidebar {
  background: var(--preview-sidebar, var(--color-sidebar));
  color: #ffffff;
  padding: 13px;
}

.theme-preview .preview-body {
  padding: 14px;
}

.theme-preview .preview-button {
  background: var(--preview-button, var(--color-button));
  border-radius: var(--radius);
  color: #ffffff;
  display: inline-block;
  font-weight: 900;
  margin-top: 12px;
  padding: 10px 14px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(16, 24, 20, 0.48);
  display: none;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 18px;
  position: fixed;
  z-index: 100;
}

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

.modal {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
  max-width: 520px;
  min-height: 0;
  overflow: hidden;
  padding: 22px;
  width: 100%;
}

.modal-large {
  max-width: 860px;
}

.modal-header {
  align-items: flex-start;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  min-width: 0;
}

.modal-header > div {
  min-width: min(100%, 240px);
}

.modal-header h3,
.modal-header p {
  margin-left: 0;
  margin-right: 0;
}

.modal-close-button {
  flex: 0 0 auto;
}

.modal h3 {
  font-size: 23px;
  margin: 0 0 8px;
}

.modal p {
  color: var(--color-muted);
  margin: 0 0 18px;
}

.modal > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.modal fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.modal-actions {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.modal-actions .button {
  flex: 0 1 auto;
}

.family-modal-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.family-modal-section h4 {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

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

.checkbox-card {
  align-items: center;
  background: #f8fbf9;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  font-weight: 800;
  padding: 10px 12px;
}

.checkbox-card input {
  height: 18px;
  width: 18px;
}

.family-form-groups {
  display: grid;
  gap: 18px;
}

.family-form-group {
  display: grid;
  gap: 14px;
}

.family-form-group h4 {
  color: var(--color-text);
  font-size: 17px;
  font-weight: 900;
  margin: 0;
}

.form-subsection {
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
}

.subsection-heading h4 {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 4px;
}

.subsection-heading p {
  color: var(--color-muted);
  font-weight: 700;
  margin: 0;
}

.self-employment-direct-section .family-form-group {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
}

.conditional-field.is-hidden,
.manual-barangay-field.is-hidden {
  display: none;
}

.computed-income-summary {
  align-items: center;
  background: #f2f8f4;
  border: 1px solid #b7dcc4;
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 16px;
}

.computed-income-summary span {
  color: var(--color-muted);
  font-weight: 900;
}

.computed-income-summary strong {
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 950;
}

.member-family-background-section {
  align-self: start;
  grid-column: 1 / -1;
}

.personal-info-subsection {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: inherit;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button.personal-info-subsection {
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.personal-info-subsection:hover,
.personal-info-subsection:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 10px 26px rgba(35, 122, 59, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.personal-info-subsection h4 {
  color: var(--color-text);
  font-size: 17px;
  font-weight: 900;
  margin: 0;
}

.personal-info-subsection p {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 0;
}

.family-background-trigger-meta {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.membership-workflow-layout {
  display: grid;
  gap: 18px;
}

.membership-workflow-section {
  display: grid;
  gap: 12px;
}

.compact-heading h4 {
  font-size: 16px;
  margin: 0;
}

.membership-basic-grid {
  align-items: start;
  display: grid;
  gap: 16px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-id-helper {
  align-items: center;
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  margin-top: 6px;
}

.member-id-helper .button {
  border-radius: 8px;
  font-size: 12px;
  min-height: 28px;
  padding: 0 10px;
}

.membership-workflow-card {
  align-items: center;
  border-radius: 12px;
  gap: 16px;
  min-height: auto;
  padding: 14px 16px;
}

.membership-workflow-card h4 {
  font-size: 15px;
}

.membership-workflow-card p {
  font-size: 13px;
}

.membership-workflow-card .family-background-trigger-meta {
  justify-content: flex-end;
  min-width: 150px;
}

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

.membership-fee-grid .field-full {
  grid-column: 1 / -1;
}

.computed-status-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d8e2ee;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 14px;
}

.computed-status-label {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.status-chip {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  min-height: 26px;
  padding: 0 10px;
  white-space: nowrap;
}

.membership-summary-grid {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.membership-summary-card {
  padding: 16px;
}

.membership-summary-kv {
  display: grid;
  gap: 8px;
  margin: 0;
}

.membership-summary-row {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1fr);
}

.membership-summary-row dt {
  color: var(--color-muted);
  font-weight: 900;
}

.membership-summary-row dd {
  color: var(--color-text);
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.membership-summary-row.is-full {
  grid-template-columns: 1fr;
}

.membership-summary-row.is-full dd {
  text-align: left;
}

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

.family-background-trigger {
  min-height: auto;
  padding: 16px 18px;
}

.assessment-checklist {
  display: grid;
  gap: 10px;
}

.assessment-check {
  align-items: center;
  background: #f8fbf9;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.assessment-check span {
  color: var(--color-muted);
  font-weight: 950;
}

.assessment-check strong {
  color: var(--color-text);
}

.assessment-check em {
  color: var(--color-muted);
  font-style: normal;
  font-weight: 800;
}

.assessment-check.is-passed span {
  color: var(--color-success);
}

.assessment-check.is-failed span {
  color: var(--color-danger);
}

.membership-assessment-summary {
  margin-bottom: 12px;
}

.status-chip {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-chip.status-encoded {
  background: #dcfce7;
  color: #166534;
}

.status-chip.status-not-encoded {
  background: #f1f5f9;
  color: #475569;
}

.status-chip--paid {
  background: #dcfce7;
  color: #166534;
}

.status-chip--partial {
  background: #fef3c7;
  color: #92400e;
}

.status-chip--unpaid {
  background: #fee2e2;
  color: #991b1b;
}

.family-background-action-text {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.family-background-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.family-background-summary div {
  background: #f8fbf9;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.family-background-summary span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.family-background-summary strong {
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notice {
  background: #f0f7ff;
  border: 1px solid #b8d9f4;
  border-radius: var(--radius);
  color: #174d73;
  font-weight: 800;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.sacada-alert {
  border-radius: 16px !important;
  color: var(--color-text) !important;
  font-family: inherit !important;
  padding: 18px !important;
}

.sacada-toast {
  border: 1px solid var(--color-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16) !important;
  color: var(--color-text) !important;
  font-family: inherit !important;
}

.sacada-swal-confirm,
.sacada-swal-danger,
.sacada-swal-cancel {
  align-items: center;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
}

.sacada-swal-confirm {
  background: var(--color-button);
  border: 1px solid var(--color-button);
  color: #ffffff;
}

.sacada-swal-danger {
  background: var(--color-danger);
  border: 1px solid var(--color-danger);
  color: #ffffff;
}

.sacada-swal-cancel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--color-text);
}

.sacada-swal-confirm:hover {
  filter: brightness(0.94);
}

.sacada-swal-danger:hover {
  filter: brightness(0.9);
}

.sacada-swal-cancel:hover {
  background: #f8fafc;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

@media (max-width: 600px) {
  .modal-backdrop {
    align-items: flex-start;
    padding: 10px;
  }

  .modal {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .modal-header {
    gap: 10px;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .membership-fee-grid {
    grid-template-columns: 1fr;
  }

  .membership-fee-grid .field-full {
    grid-column: auto;
  }

  .computed-status-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-height: 720px) {
  .modal-backdrop {
    align-items: flex-start;
  }
}

.empty-state {
  color: var(--color-muted);
  padding: 24px;
  text-align: center;
}

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

.muted {
  color: var(--color-muted);
}

.print-only {
  display: none;
}

@media (max-width: 1250px) {
  .app-card-grid--5,
  .app-card-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .app-split-grid {
    grid-template-columns: 1fr;
  }

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

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

  .demographic-chart-table-layout {
    grid-template-columns: 1fr;
  }

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

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

  .dashboard-chart-grid > .dashboard-card {
    min-height: 500px;
  }

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

  .two-column,
  .three-column {
    grid-template-columns: 1fr;
  }

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

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

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

  .donut-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .mobile-backdrop.open {
    background: rgba(16, 24, 20, 0.48);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 80;
  }

  .sidebar {
    display: none;
    height: 100vh;
    left: 0;
    max-width: min(86vw, 340px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 90;
  }

  .sidebar.open {
    display: block;
  }

  .button.mobile-menu {
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0;
    height: 46px;
    padding: 0;
    position: relative;
    width: 46px;
  }

  .button.mobile-menu::before {
    background: currentColor;
    box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
    content: '';
    display: block;
    height: 2px;
    width: 20px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 14px 18px;
    position: sticky;
  }

  .global-actions {
    display: none;
  }

  .main-view {
    max-width: 100%;
    overflow-x: hidden;
    padding: 18px;
    width: 100vw;
  }

  .content,
  .topbar,
  .page-header,
  .panel,
  .dashboard-section,
  .chart-card,
  .form-section,
  .stat-card,
  .summary-card {
    max-width: 100%;
    min-width: 0;
  }

  .page-header > div,
  .page-title {
    min-width: 0;
  }

  .page-header p,
  .panel-title p,
  .section-helper {
    display: block;
    max-width: min(30rem, calc(100vw - 36px));
    overflow-wrap: anywhere;
    white-space: normal;
    width: 100%;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

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

  .dashboard-card-header {
    flex-direction: column;
  }

  .dashboard-card-action,
  .dashboard-card-action .button {
    width: 100%;
  }

  .collection-summary-footer {
    align-items: stretch;
    justify-content: stretch;
  }

  .collection-summary-footer span,
  .collection-summary-footer .button {
    width: 100%;
  }

  .app-card-header {
    flex-direction: column;
  }

  .app-card-action,
  .app-card-action .button,
  .app-card-footer .button {
    width: 100%;
  }

  .app-card-grid--5,
  .app-card-grid--4,
  .app-card-grid--3,
  .app-card-grid--2 {
    grid-template-columns: 1fr;
  }

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

  .dashboard-chart-grid > .dashboard-card {
    min-height: 540px;
  }

  .dashboard-chart-body {
    flex-basis: 320px;
    height: 320px;
    min-height: 320px;
  }

  .page-header > div:first-child {
    width: 100%;
  }

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

  .page-header .top-actions .button {
    flex: 1 1 100%;
  }

  .profile-heading {
    grid-template-columns: 1fr;
  }

  .profile-heading {
    display: grid;
  }

  .member-biodata-grid,
  .personal-info-lower-grid,
  .member-form-grid,
  .education-specialization-grid,
  .address-contact-grid,
  .family-background-summary {
    grid-template-columns: 1fr;
  }

  .address-contact-grid .field-full {
    grid-column: auto;
  }

  .member-personal-info-layout {
    grid-template-columns: 1fr;
  }

  .profile-picture-editor {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .personal-info-subsection {
    align-items: stretch;
    flex-direction: column;
  }

  .membership-basic-grid,
  .membership-summary-grid {
    grid-template-columns: 1fr;
  }

  .membership-workflow-card .family-background-trigger-meta {
    justify-content: space-between;
    min-width: 0;
  }

  .family-background-trigger-meta {
    justify-content: space-between;
    width: 100%;
  }

  .stats-grid,
  .dashboard-stat-strip.stats-grid,
  .form-grid,
  .form-grid.two,
  .form-grid.four,
  .toolbar,
  .toolbar.reports-toolbar,
  .computed-grid,
  .stepper,
  .preset-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .data-table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .table-controls,
  .table-pagination {
    justify-content: stretch;
  }

  .table-pagination .button,
  .columns-menu summary {
    flex: 1 1 auto;
  }

  .columns-menu-panel {
    left: 0;
    right: auto;
  }

  .statement-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .financial-edit-table {
    font-size: 13px;
    min-width: 720px;
  }

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

  .financial-edit-table th,
  .financial-edit-table td {
    padding: 6px;
  }

  .financial-input {
    min-height: 44px;
    padding: 7px 6px;
  }

  .a4-page {
    width: 100%;
    min-height: auto;
    padding: 18px;
  }

  .printable-header,
  .print-fields,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .app-data-table .sticky-actions {
    min-width: 150px;
    width: 150px;
  }

  .app-data-table .sticky-actions.actions-wide {
    min-width: 200px;
    width: 200px;
  }

  .table-actions,
  .cell-actions {
    align-items: center;
    flex-direction: row;
  }

  .table-actions .button,
  .cell-actions .button {
    width: auto;
  }
}

@media print {
  .sidebar,
  .topbar,
  .button,
  .toolbar,
  .filter-bar,
  .tabs,
  .member-tabs-scroll,
  .section-actions,
  .print-actions {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main-view {
    max-width: none;
    padding: 0;
  }

  @page {
    margin: 12mm;
    size: A4 portrait;
  }

  @page member-registry {
    margin: 8mm;
    size: A4 landscape;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .print-layout {
    display: block;
  }

  .data-table-toolbar,
  .columns-menu,
  .table-pagination,
  .table-controls {
    display: none !important;
  }

  .data-table {
    display: block !important;
  }

  .table-wrap,
  .financial-table-wrap {
    border-radius: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  table,
  .financial-edit-table {
    min-width: 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  caption {
    height: auto;
    overflow: visible;
    position: static;
    text-align: left;
    width: auto;
  }

  thead {
    display: table-header-group;
  }

  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  th,
  td,
  .financial-edit-table th,
  .financial-edit-table td {
    max-width: none !important;
    overflow: visible !important;
    padding: 4px 5px !important;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  thead th,
  .sticky-col,
  .sticky-actions {
    box-shadow: none !important;
    min-width: 0 !important;
    position: static !important;
  }

  .financial-input {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .statement-edit-note,
  .statement-panel-header .button {
    display: none !important;
  }

  .a4-page {
    border: 0;
    box-shadow: none;
    break-after: page;
    min-height: auto;
    overflow: visible;
    padding: 0;
    width: auto;
  }

  .print-page-body {
    overflow: visible;
  }

  .member-list-page-header,
  .member-list-panel > .toolbar,
  .member-list-panel > [data-results-group='memberFilters'],
  .member-list-panel > .data-table {
    display: none !important;
  }

  .member-list-panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .member-registry-print {
    color: #000000;
    display: block !important;
    page: member-registry;
  }

  .registry-print-table {
    font-size: 8px;
  }

  .registry-print-table th,
  .registry-print-table td {
    padding: 2px 3px !important;
  }

  .printable-header {
    gap: 8px;
    grid-template-columns: 46px minmax(0, 1fr) minmax(130px, 32%);
  }

  .print-logo {
    height: 40px;
    width: 40px;
  }

  .printable-header h1 {
    font-size: 13px;
  }

  .printable-header p,
  .printable-header > strong {
    font-size: 11px;
  }

  .printable-header > strong {
    max-width: 28ch;
  }

  .panel,
  .form-section,
  .chart-card,
  .stat-card {
    box-shadow: none;
  }

  .print-only {
    display: block;
  }
}
