@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Outfit:wght@600;700;800&display=swap');

:root {
  --bg: #f2f8f1;
  --bg-strong: #e4f0e5;
  --surface: #ffffff;
  --surface-soft: #f5faf5;
  --line: #cadecc;
  --line-strong: #b5c9b8;
  --text: #1b3323;
  --muted: #5c7362;
  --primary: #2f8f4b;
  --primary-strong: #21723a;
  --accent: #cc9a33;
  --danger: #bc3345;
  --shadow-sm: 0 12px 30px rgba(33, 92, 48, 0.09);
  --shadow-md: 0 20px 48px rgba(33, 92, 48, 0.14);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-body: 'Manrope', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-head: 'Outfit', 'Manrope', 'Avenir Next', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 95% -10%, rgba(93, 179, 109, 0.27), transparent 44%),
    radial-gradient(circle at -12% 110%, rgba(55, 138, 78, 0.16), transparent 48%),
    linear-gradient(150deg, #fbfefb 0%, var(--bg) 58%, #ebf4ed 100%);
}

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

h1,
h2,
h3,
p,
dl,
dd,
dt {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  letter-spacing: -0.01em;
}

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  flex: 0 0 280px;
  background:
    radial-gradient(circle at 120% -8%, rgba(80, 171, 102, 0.25), transparent 35%),
    linear-gradient(180deg, #f6fbf6 0%, #e9f3ea 100%);
  border-right: 1px solid var(--line);
  padding: 18px 14px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 180ms ease, flex-basis 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #dce9dd;
}

.brand-mark {
  width: 88px;
  height: 56px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  border: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand-text strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 3px;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.82rem;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: calc(100vh - 118px);
}

.menu-item {
  appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  background: transparent;
  border-radius: 12px;
  padding: 11px 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  color: #244130;
  border: 1px solid transparent;
  cursor: pointer;
}

.menu-item:hover {
  background: #e6f1e8;
  border-color: #d9e9dc;
}

.menu-item.is-active {
  background: linear-gradient(120deg, #d2e7d6, #e9f3eb);
  border-color: #c3dac8;
}

.menu-item-logout {
  margin-top: auto;
  color: #5d3a3a;
}

.menu-item-report {
  margin-top: 4px;
  background: #f9fcf9;
  border-color: #d6e5d9;
  box-shadow: inset 0 0 0 1px #e2eee4;
  border-left: 3px solid #5cae72;
}

.menu-item-report:hover {
  background: #e9f3eb;
  border-color: #c8dbcd;
}

.sidebar-collapse-btn {
  margin-left: auto;
}

.sidebar-collapse-btn .icon {
  transform: rotate(180deg);
  transition: transform 180ms ease;
}

.content-wrap {
  flex: 1;
  min-width: 0;
  padding: 18px 22px 28px;
}

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

.topbar-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar h1 {
  font-size: 1.55rem;
  margin-bottom: 5px;
}

.topbar p {
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: #2c5339;
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  border-color: #adc6b4;
  background: #f8fbf8;
}

.mobile-only {
  display: none;
}

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

.alert {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid transparent;
  font-weight: 700;
}

.alert-success {
  background: #e4f7e8;
  border-color: #b7d9c0;
  color: #1f6736;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  box-shadow: var(--shadow-md);
  max-width: min(92vw, 480px);
}

.alert-error {
  background: #fdecef;
  border-color: #e8c0c8;
  color: #943044;
}

.alert-info {
  background: #e9f2fd;
  border-color: #c1d4ed;
  color: #1d4f84;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.stat-card p {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 7px;
}

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

.stat-highlight {
  background: linear-gradient(145deg, #f8fcf8, #e9f6ec);
  border-color: #bdd9c5;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.toolbar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-title h2 {
  font-size: 1.16rem;
  margin-bottom: 0;
}

.toolbar-title p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

.card-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: none;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk-status-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bulk-selection-count {
  font-size: 0.8rem;
  font-weight: 800;
  color: #355a43;
  background: #edf6ef;
  border: 1px solid #d3e2d6;
  border-radius: 999px;
  padding: 5px 10px;
}

.btn {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), #3dad5c);
  box-shadow: 0 8px 18px rgba(47, 155, 80, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(120deg, #2a9148, #369f54);
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: #234631;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.filters-meta {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: #486551;
  white-space: nowrap;
}

.btn-filter-reset {
  white-space: nowrap;
}

.field-inline {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.field-inline input,
.field-inline select {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text);
  min-width: 70px;
}

.search-field {
  min-width: clamp(280px, 48vw, 680px);
  flex: 1;
}

.search-field-short {
  min-width: clamp(220px, 36vw, 420px);
  flex: 0 1 420px;
}

.search-field .icon {
  color: #40644f;
  flex-shrink: 0;
}

.search-field input {
  width: 100%;
  min-width: 250px;
}

.checkbox-inline {
  padding-right: 12px;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
}

.member-table th,
.member-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.member-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3e5e49;
  background: #f4faf5;
  white-space: nowrap;
  cursor: pointer;
}

.member-table th.no-sort {
  cursor: default;
}

.member-table th.col-select,
.member-table td.col-select {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}

.member-table th.col-actions,
.member-table td.col-actions {
  width: 120px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.member-table td.col-select input[type='checkbox'],
.member-table th.col-select input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.member-table tbody tr:hover,
.member-table tbody tr:focus {
  background: #f2faf3;
}

.member-table tbody tr.is-selected {
  background: #e3f3e8;
}

.member-table tbody tr.is-selected:hover,
.member-table tbody tr.is-selected:focus {
  background: #d9efdf;
}

.member-table tbody tr.is-hidden {
  display: none;
}

.btn-row-action {
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.compact-table th,
.compact-table td {
  padding: 10px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge-aktiv {
  background: #d7f0dd;
  color: #1f6f38;
}

.badge-passiv {
  background: #edf1ef;
  color: #50665a;
}

.badge-ehrenmitglied {
  background: #faefcf;
  color: #8b6515;
}

.badge-ausgetreten {
  background: #fbe8eb;
  color: #a52a3e;
}

.badge-verstorben {
  background: #ececef;
  color: #444b57;
}

.badge-honor {
  background: #f7ebc9;
  color: #7f5d14;
}

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

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

.chart-panel {
  padding: 14px;
}

.chart-panel-wide {
  grid-column: span 8;
}

.chart-panel-wide-right {
  grid-column: span 4;
}

.chart-panel:not(.chart-panel-wide):not(.chart-panel-wide-right) {
  grid-column: span 4;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 1.02rem;
}

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

.fact-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed #dde9df;
  padding-bottom: 7px;
}

.fact-list dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.fact-list dd {
  font-weight: 800;
  text-align: right;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 0.84rem;
}

.chart-canvas-wrap {
  position: relative;
  height: 300px;
}

.chart-canvas-wrap.small {
  height: 250px;
}

.chart-canvas-wrap.xs {
  height: 210px;
}

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

.dashboard-map {
  height: 300px;
  border: 1px solid #cfded2;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fcf9 0%, #eef6f0 100%);
}

.map-value-marker-wrap {
  background: transparent;
  border: 0;
}

.map-value-marker {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 2px solid #2f8f4b;
  background: linear-gradient(180deg, #dbefdf 0%, #b9dfc3 100%);
  color: #1f4b2f;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(33, 92, 48, 0.24);
}

.map-value-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #2f8f4b;
}

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

.legend-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 5px;
  font-size: 0.86rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  background: var(--dot, #2f9b50);
}

.dashboard-kpi-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #2f5c3e;
  background: #eff8f0;
  border: 1px solid #d6e7d9;
  border-radius: 999px;
  padding: 8px 12px;
}

.empty-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.member-panel {
  overflow: hidden;
}

.member-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.member-shell.is-info-hidden {
  grid-template-columns: 1fr;
}

.member-shell.is-info-hidden .member-info-card {
  display: none;
}

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

.member-info-card {
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fbf7 0%, #eef6f0 100%);
  padding: 16px;
  display: grid;
  gap: 12px;
  min-height: 100%;
}

.member-info-card h3 {
  font-size: 1rem;
}

.info-list {
  display: grid;
  gap: 9px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed #d4e1d7;
  padding-bottom: 6px;
  font-size: 0.85rem;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  font-weight: 800;
  text-align: right;
}

.member-info-btn.is-active {
  border-color: #92b39e;
  background: #ebf5ee;
}

.member-form {
  display: grid;
  gap: 0;
}

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f3f8f3;
}

.tab-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #2a4b36;
  cursor: pointer;
}

.tab-btn.is-active {
  color: #fff;
  border-color: #2f9b50;
  background: linear-gradient(120deg, #2f9b50, #4aac63);
}

.tab-panel {
  display: none;
  padding: 16px;
}

.tab-panel.is-active {
  display: block;
}

.tab-grid {
  display: grid;
  gap: 12px;
}

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

.tab-grid.one-col {
  grid-template-columns: 1fr;
}

.tab-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #355742;
}

.tab-grid input,
.tab-grid select,
.tab-grid textarea {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

.tab-grid textarea {
  resize: vertical;
}

.wide-field {
  grid-column: 1 / -1;
}

.multi-select {
  min-height: 220px;
}

.piece-fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.piece-fieldset legend {
  padding: 0 6px;
  color: #41624e;
  font-size: 0.8rem;
  font-weight: 800;
}

.piece-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.piece-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #375944;
}

.piece-item input {
  margin: 0;
}

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

.summary-card {
  border: 1px solid #d4e2d7;
  border-radius: 12px;
  background: #f7fbf8;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.summary-card p {
  color: #486251;
  font-size: 0.84rem;
}

.summary-count {
  font-family: var(--font-head);
  font-size: 1.48rem;
  font-weight: 700;
  color: #224833;
}

.list-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.list-preview span {
  border: 1px solid #d1e1d4;
  background: #edf6ef;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: #2f523d;
}

.selection-dialog {
  width: min(760px, calc(100vw - 30px));
  border: 1px solid #bfd3c3;
  border-radius: 16px;
  padding: 0;
  box-shadow: var(--shadow-md);
}

.pdf-overlay-dialog {
  width: min(980px, calc(100vw - 24px));
  max-height: 98vh;
}

.pdf-overlay-dialog .dialog-body {
  padding: 10px 14px 14px;
  background: #edf3ee;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.pdf-overlay-body {
  max-height: calc(98vh - 82px);
}

.pdf-preview-overlay {
  width: min(100%, 840px);
  max-width: 840px;
  aspect-ratio: 210 / 297;
  height: min(calc((100vw - 140px) * 1.4142), calc(98vh - 106px));
  border: 1px solid #cddbcf;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(32, 70, 43, 0.15);
  background: #fff;
}

.selection-dialog::backdrop {
  background: rgba(27, 53, 34, 0.35);
}

.dialog-head {
  border-bottom: 1px solid #d6e5d9;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.dialog-head h3 {
  font-size: 1rem;
}

.pdf-year-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pdf-year-controls .field-inline {
  padding: 6px 9px;
}

.pdf-year-controls .field-inline input {
  width: 90px;
}

.pdf-year-controls.is-hidden {
  display: none;
}

.dialog-body {
  padding: 16px;
  max-height: min(90vh, 870px);
  overflow: auto;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #d6e5d9;
  background: #f7fbf8;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.checkbox-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 9px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fff;
  font-size: 0.84rem;
}

.checkbox-item.is-hidden {
  display: none;
}

.checkbox-item input {
  margin-top: 2px;
}

.checkbox-item small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.selection-search {
  margin-bottom: 10px;
}

.selection-search.search-field {
  min-width: 0;
  width: 100%;
}

.fee-pill {
  border: 1px solid #bdd3c1;
  border-radius: 12px;
  background: #eff8f1;
  color: #245038;
  padding: 11px 12px;
  font-weight: 800;
}

.fee-pill small {
  display: block;
  margin-top: 3px;
  font-weight: 700;
  color: #527061;
}

.honor-list {
  display: grid;
  gap: 10px;
}

.honor-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  gap: 8px;
  align-items: end;
}

.honor-row .btn {
  padding-inline: 10px;
}

.honor-empty {
  color: var(--muted);
  font-size: 0.85rem;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 8px;
  align-items: end;
}

.activity-row .btn {
  padding-inline: 10px;
}

.activity-name-combo {
  display: grid;
  gap: 6px;
}

.activity-name-combo .is-hidden {
  display: none;
}

.tagify {
  border-radius: 10px;
  border-color: var(--line-strong);
}

.tagify:focus-within {
  border-color: #7aa688;
}

.icon {
  width: 18px;
  height: 18px;
}

.layout.is-collapsed .sidebar {
  width: 86px;
  flex-basis: 86px;
}

.layout.is-collapsed .brand-text,
.layout.is-collapsed .menu-label {
  display: none;
}

.layout.is-collapsed .brand {
  justify-content: center;
  margin-bottom: 8px;
}

.layout.is-collapsed .brand-mark {
  width: 48px;
  height: 48px;
}

.layout.is-collapsed .menu-item {
  justify-content: center;
  padding-inline: 0;
}

.layout.is-collapsed .sidebar-collapse-btn {
  margin-left: 0;
}

.layout.is-collapsed .sidebar-collapse-btn .icon {
  transform: rotate(0deg);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-shell {
  width: min(470px, 100%);
}

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.brand-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-inline h1 {
  font-size: 1.22rem;
  margin-bottom: 4px;
}

.brand-inline p {
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

.login-form input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.print-body {
  background: #f2f2f2;
  font-family: 'Avenir Next', 'Segoe UI', sans-serif;
  padding: 16px;
}

.print-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.print-sheet {
  width: min(210mm, 100%);
  margin: 0 auto;
  background: #fff;
  color: #222;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 14mm;
  display: grid;
  gap: 12px;
}

.print-shell {
  min-height: min(84vh, 1100px);
}

.pdf-preview {
  width: 100%;
  /* height: min(1200px, 72vh); */
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  background: #fff;
}

.print-sheet h1 {
  font-size: 1.5rem;
}

.print-subtitle {
  color: #5f5f5f;
}

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

.print-grid.two-cols {
  gap: 16px;
}

.print-grid.two-cols > div {
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  padding: 10px;
}

.print-grid.two-cols h2 {
  margin-bottom: 8px;
  font-size: 1rem;
}

@media (max-width: 1300px) {
  .stats-grid-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-panel-wide,
  .chart-panel-wide-right,
  .chart-panel:not(.chart-panel-wide):not(.chart-panel-wide-right) {
    grid-column: span 6;
  }
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    left: -320px;
    z-index: 40;
    transition: left 180ms ease;
    box-shadow: var(--shadow-md);
  }

  .layout.is-mobile-open .sidebar {
    left: 0;
  }

  .layout.is-collapsed .sidebar {
    width: 280px;
    flex-basis: 280px;
  }

  .layout.is-collapsed .brand-text,
  .layout.is-collapsed .menu-label {
    display: block;
  }

  .layout.is-collapsed .menu-item {
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .mobile-only {
    display: inline-grid;
  }

  .content-wrap {
    padding: 14px;
  }

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

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .bulk-status-form {
    width: 100%;
    justify-content: space-between;
  }

  .filters-meta {
    margin-left: 0;
  }

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

  .chart-panel-wide,
  .chart-panel-wide-right,
  .chart-panel:not(.chart-panel-wide):not(.chart-panel-wide-right) {
    grid-column: span 12;
  }

  .dashboard-map {
    height: 250px;
  }

  .tab-grid.two-cols {
    grid-template-columns: 1fr;
  }

  .member-shell,
  .member-shell.is-info-hidden {
    grid-template-columns: 1fr;
  }

  .member-info-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .pdf-preview {
    height: 68vh;
  }

  .pdf-preview-overlay {
    width: 100%;
    max-width: 100%;
    height: min(calc((100vw - 48px) * 1.4142), calc(98vh - 112px));
    border-radius: 8px;
  }

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

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

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

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

@media print {
  .no-print {
    display: none !important;
  }

  .print-body {
    background: #fff;
    padding: 0;
  }

  .print-sheet {
    border: 0;
    border-radius: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}
