:root {
  --app-bg: #f5f6f8;
  --app-panel: #ffffff;
  --app-border: #d9dee7;
  --app-ink: #1d2733;
  --app-muted: #657384;
  --app-accent: #95AD20;
  --app-accent-dark: #758819;
  --app-row: #eef3f8;
}

html {
  font-size: 14px;
  height: 100%;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-ink);
}

.auth-body {
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(149, 173, 32, 0.12), rgba(36, 138, 141, 0.08)),
    var(--app-bg);
}

.app-main {
  flex: 1 0 auto;
}

a {
  color: var(--app-accent);
}

.btn-primary {
  --bs-btn-bg: var(--app-accent);
  --bs-btn-border-color: var(--app-accent);
  --bs-btn-hover-bg: var(--app-accent-dark);
  --bs-btn-hover-border-color: var(--app-accent-dark);
  --bs-btn-active-bg: var(--app-accent-dark);
  --bs-btn-active-border-color: var(--app-accent-dark);
  color: #ffffff;
  background-color: var(--app-accent);
  border-color: var(--app-accent);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: #ffffff;
  background-color: var(--app-accent-dark);
  border-color: var(--app-accent-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--app-accent-dark);
  --bs-btn-border-color: var(--app-accent);
  --bs-btn-hover-bg: var(--app-accent);
  --bs-btn-hover-border-color: var(--app-accent);
  --bs-btn-active-bg: var(--app-accent-dark);
  --bs-btn-active-border-color: var(--app-accent-dark);
  color: var(--app-accent-dark);
  border-color: var(--app-accent);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #ffffff;
  background-color: var(--app-accent);
  border-color: var(--app-accent);
}

.dx-button-mode-contained.dx-button-default,
.dx-button-mode-contained.dx-button-success {
  background-color: var(--app-accent);
  border-color: var(--app-accent);
}

.dx-button-mode-contained.dx-button-default.dx-state-hover,
.dx-button-mode-contained.dx-button-success.dx-state-hover,
.dx-button-mode-contained.dx-button-default.dx-state-focused,
.dx-button-mode-contained.dx-button-success.dx-state-focused {
  background-color: var(--app-accent-dark);
  border-color: var(--app-accent-dark);
}

.form-control:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 0.18rem rgba(149, 173, 32, 0.24);
}

.app-nav {
  background: #ffffff;
}

.navbar-brand {
  font-weight: 700;
  color: var(--app-ink);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin-right: 48px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.app-brand img {
  display: block;
  width: auto;
  height: 42px;
  max-width: 210px;
}

.app-nav .nav-link {
  color: var(--app-ink);
  font-weight: 600;
}

.app-nav .nav-link.disabled {
  color: #8a95a3;
}

.auth-nav {
  align-items: center;
}

.auth-link {
  border: 0;
  font-weight: 600;
}

.auth-user {
  color: var(--app-muted);
}

.header-issue-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b42318 !important;
  font-weight: 700;
}

.header-issue-triangle {
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-bottom: 13px solid #b42318;
  border-left: 7px solid transparent;
}

.header-issue-count {
  min-width: 18px;
  padding: 1px 5px;
  color: #ffffff;
  background: #b42318;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.auth-panel {
  display: flex;
  justify-content: center;
  padding: 48px 16px;
}

.auth-card {
  width: min(100%, 600px);
  padding: 28px;
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  box-shadow: 0 18px 45px rgba(29, 39, 51, 0.12);
}

.auth-brand {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(260px, auto) minmax(120px, 1fr);
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--app-border);
}

.auth-brand-main {
  display: contents;
}

.auth-brand-main img {
  justify-self: center;
  width: auto;
  height: 74px;
}

.auth-brand-main strong {
  display: block;
  justify-self: center;
  max-width: 280px;
  color: var(--app-ink);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.auth-partner-logo {
  justify-self: center;
  width: auto;
  height: 74px;
}

.auth-card h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.auth-card p {
  margin: 6px 0 20px;
  color: var(--app-muted);
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 16px;
}

.page-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

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

.setup-alert {
  max-width: 960px;
}

.page-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.member-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.member-list-panel,
.member-detail-panel {
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 6px;
}

.member-list-panel {
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.member-search {
  padding: 14px;
  border-bottom: 1px solid var(--app-border);
}

.member-list {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.member-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf0f4;
  color: var(--app-ink);
  text-decoration: none;
}

.member-list-item:hover,
.member-list-item.active {
  background: var(--app-row);
}

.member-list-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-list-item small {
  color: var(--app-muted);
}

.member-detail-panel {
  padding: 18px;
  min-height: 520px;
}

.member-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--app-border);
}

.member-summary h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.member-summary p {
  margin: 4px 0 0;
  color: var(--app-muted);
}

.member-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.member-profile-image {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  object-fit: cover;
  background: #f0f3f7;
  border: 1px solid var(--app-border);
  border-radius: 6px;
}

.donation-total {
  min-width: 180px;
  text-align: right;
}

.member-actions {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.donation-total span,
.detail-grid span,
.section-title span {
  display: block;
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.donation-total strong {
  display: block;
  font-size: 1.6rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 0;
}

.detail-grid div {
  min-width: 0;
}

.detail-grid strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 10px;
}

.section-title h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.donation-table {
  border: 1px solid var(--app-border);
}

.donation-table thead th {
  color: var(--app-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  background: #f0f3f7;
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  color: var(--app-muted);
  font-weight: 600;
}

.edit-form {
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  padding: 18px;
}

.filter-panel,
.data-panel,
.donation-results {
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) minmax(100px, 130px) auto;
  gap: 14px;
  align-items: end;
}

.report-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(220px, 260px) auto;
  gap: 14px;
  align-items: end;
}

.team-builder-filter {
  display: grid;
  grid-template-columns: minmax(180px, 240px) auto;
  gap: 14px;
  align-items: end;
  justify-content: start;
}

.team-builder-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.team-builder-total {
  min-width: 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 6px;
}

.team-builder-total span {
  display: block;
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.team-builder-total strong {
  display: block;
  margin-top: 3px;
  font-size: 1.18rem;
}

.team-builder-total-emphasis {
  border-color: #dbe7a3;
  border-top: 3px solid var(--app-accent);
}

.team-totals-flyout {
  width: min(100vw, 680px);
}

.team-totals-flyout .offcanvas-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--app-border);
}

.team-totals-flyout .offcanvas-header span {
  display: block;
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.team-totals-table {
  margin-bottom: 0;
}

.team-totals-table td strong,
.team-totals-table td small {
  display: block;
}

.team-totals-table td small {
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.team-totals-table .selected-team-total {
  background: #f5f9e8;
}

.team-totals-table .selected-team-total td:first-child {
  border-left: 3px solid var(--app-accent);
}

.donation-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

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

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

.import-metrics {
  margin-bottom: 16px;
}

.report-metrics {
  margin-bottom: 16px;
}

.dashboard-metrics {
  margin-bottom: 16px;
}

.dashboard-metrics .metric {
  border-top: 4px solid var(--app-accent);
}

.dashboard-metrics .metric:nth-child(2) {
  border-top-color: #248A8D;
}

.dashboard-metrics .metric:nth-child(3) {
  border-top-color: #D6A329;
}

.dashboard-metrics .metric:nth-child(4) {
  border-top-color: #4F6F8F;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.65fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.dashboard-panel {
  min-width: 0;
  padding: 16px;
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-top: 3px solid #dbe7a3;
  border-radius: 6px;
}

.donation-trend-panel {
  border-top-color: #95AD20;
}

.campaign-goal-panel {
  border-top-color: #248A8D;
}

.top-members-panel {
  border-top-color: #4F6F8F;
}

.payment-mix-panel {
  border-top-color: #248A8D;
}

.dashboard-panel:nth-child(3) {
  border-top-color: #D6A329;
}

.dashboard-panel:nth-child(4) {
  border-top-color: #4F6F8F;
}

.dashboard-panel-wide {
  grid-column: span 1;
}

.dashboard-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-panel h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.dashboard-panel header span {
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-chart {
  width: 100%;
  height: 340px;
}

.dashboard-chart-tall {
  height: 520px;
}

.campaign-goal-content {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 250px;
}

.campaign-goal-ring {
  --goal-angle: 0deg;
  display: grid;
  width: 132px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--app-panel) 0 54%, transparent 55%),
    conic-gradient(#95AD20 0 var(--goal-angle), #dfe8bd var(--goal-angle) 360deg);
  box-shadow: inset 0 0 0 1px rgba(117, 136, 25, 0.16);
}

.campaign-goal-ring div {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--app-border);
}

.campaign-goal-ring strong {
  color: #1d2733;
  font-size: 1.75rem;
  line-height: 1;
}

.campaign-goal-ring span,
.campaign-goal-details span,
.campaign-goal-details small {
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.campaign-goal-details {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.campaign-goal-details strong {
  color: #1d2733;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1;
}

.campaign-goal-details small {
  color: #248A8D;
}

.campaign-goal-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  background: #e6edf5;
  border: 1px solid var(--app-border);
  border-radius: 999px;
}

.campaign-goal-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #95AD20, #248A8D, #D6A329);
  border-radius: inherit;
}

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

.dashboard-table thead th {
  color: var(--app-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  background: #f0f3f7;
}

.import-progress-panel {
  margin-bottom: 16px;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  background: #e6edf5;
  border: 1px solid var(--app-border);
  border-radius: 999px;
}

.progress-fill {
  height: 100%;
  background: var(--app-accent);
  transition: width 0.25s ease;
}

.import-progress-failed .progress-fill {
  background: #b42318;
}

.import-progress-details {
  margin-top: 16px;
}

.import-progress-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.metric {
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  padding: 14px 16px;
}

.metric span {
  display: block;
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--app-muted);
  font-weight: 600;
}

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

.results-header,
.results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.results-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--app-border);
}

.results-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

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

.report-preview-panel {
  padding: 0;
  overflow: hidden;
}

.report-preview-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 190px);
  border: 0;
  background: #ffffff;
}

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

.report-table th,
.report-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--app-border);
  vertical-align: top;
}

.report-table thead th {
  color: var(--app-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  background: #f0f3f7;
}

.report-table tbody tr:hover {
  background: var(--app-row);
}

.report-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--app-border);
  border-bottom: 0;
}

.report-table .numeric {
  text-align: right;
  white-space: nowrap;
}

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

.team-structure-panel,
.available-members-panel {
  min-width: 0;
}

.team-role-card {
  padding: 14px;
  margin-bottom: 14px;
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 6px;
}

.team-drop-zone,
.team-member-drop-zone {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.team-member-drop-zone {
  min-height: 92px;
  margin-top: 12px;
  padding: 10px;
  background: #ffffff;
  border: 1px dashed var(--app-border);
  border-radius: 6px;
}

.team-drop-zone.drag-over,
.team-member-drop-zone.drag-over {
  background: #f5f9e8;
  border-color: var(--app-accent);
  box-shadow: inset 0 0 0 1px var(--app-accent);
}

.team-member-drop-zone.disabled {
  opacity: 0.65;
}

.team-member-drop-heading {
  color: var(--app-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.team-grid-draggable {
  cursor: grab;
}

.team-grid-draggable:active {
  cursor: grabbing;
}

.team-role-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.team-role-card strong {
  display: block;
  font-size: 1.05rem;
}

.team-role-card small {
  display: block;
  margin-top: 2px;
  color: var(--app-muted);
  font-weight: 600;
}

.team-assignment-row,
.team-member-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.team-assignment-row form,
.team-member-list form {
  flex-shrink: 0;
}

.empty-slot,
.team-member-empty {
  color: var(--app-muted);
}

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

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

.direct-member-zone {
  margin-top: 0;
}

.team-member-list {
  display: grid;
  gap: 8px;
  padding: 8px 0 0;
  margin: 10px 0 0;
  list-style: none;
  border-top: 1px solid var(--app-border);
}

.team-member-list li {
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--app-border);
  border-radius: 6px;
}

.team-member-list li:last-child {
  border-bottom: 1px solid var(--app-border);
}

.team-member-list span,
.team-member-list small {
  display: block;
}

.team-member-table th:first-child,
.team-member-table td:first-child {
  width: 36px;
}

.team-builder-actions {
  display: grid;
  gap: 12px;
}

.team-builder-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr);
  gap: 12px;
  align-items: end;
}

.team-builder-control-stack {
  display: grid;
  gap: 6px;
}

.team-builder-control-stack .form-label {
  margin-bottom: 0;
}

.team-builder-control-stack .form-label:not(:first-child) {
  margin-top: 8px;
}

.team-builder-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-builder-grid {
  min-height: 420px;
}

.auto-build-preview {
  display: grid;
  gap: 12px;
}

.auto-build-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--app-muted);
  font-weight: 600;
}

.auto-build-summary strong {
  color: var(--app-ink);
}

.auto-build-table {
  margin-bottom: 0;
}

.auto-build-apply {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(29, 39, 51, 0.38);
}

.processing-overlay.show {
  display: flex;
}

.processing-dialog {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  padding: 18px 22px;
  color: var(--app-ink);
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-top: 4px solid var(--app-accent);
  border-radius: 6px;
  box-shadow: 0 18px 45px rgba(29, 39, 51, 0.22);
}

.processing-dialog .spinner-border {
  color: var(--app-accent);
}

.results-header span {
  display: block;
  margin-top: 2px;
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.results-footer {
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
}

.donation-table-wrap {
  max-height: min(64vh, 760px);
  overflow: auto;
  margin: 12px 0;
  border: 1px solid var(--app-border);
}

.donation-table {
  margin-bottom: 0;
  border: 0;
}

.donation-table > :not(caption) > * > * {
  border-bottom-width: 0;
}

.donation-table tbody tr:hover {
  background: var(--app-row);
}

.donation-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.donation-table a {
  text-decoration: none;
  font-weight: 500;
}

.donation-table a:hover,
.donation-table a:focus {
  text-decoration: underline;
}

.donation-grid {
  margin-top: 12px;
}

.donation-grid .dx-datagrid {
  background: transparent;
  color: var(--app-ink);
}

.donation-grid .dx-datagrid-headers {
  color: var(--app-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #f0f3f7;
}

.donation-grid .dx-datagrid-rowsview,
.donation-grid .dx-datagrid-headers,
.donation-grid .dx-datagrid-total-footer,
.donation-grid .dx-datagrid-borders > .dx-pager {
  border-color: var(--app-border);
}

.donation-grid .dx-datagrid-rowsview .dx-row > td {
  border-top: 0;
  border-bottom: 0;
  vertical-align: middle;
}

.donation-grid .dx-datagrid-rowsview .dx-data-row.dx-state-hover > td {
  background: var(--app-row);
}

.donation-grid a {
  color: var(--app-accent);
  font-weight: 500;
  text-decoration: none;
}

.donation-grid a:hover,
.donation-grid a:focus {
  text-decoration: underline;
}

.form-section {
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--app-border);
}

.form-section h2 {
  margin: 0 0 12px;
  font-size: 1.08rem;
  font-weight: 700;
}

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

.form-grid .span-2 {
  grid-column: span 2;
}

.form-grid .span-4 {
  grid-column: span 4;
}

.settings-form textarea {
  resize: vertical;
}

.email-error-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-field .btn {
  min-width: 72px;
}

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

.tool-tile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-content: start;
  column-gap: 14px;
  min-height: 120px;
  padding: 16px;
  color: var(--app-ink);
  text-decoration: none;
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: 6px;
}

.tool-tile:hover,
.tool-tile:focus {
  color: var(--app-ink);
  background: var(--app-row);
}

.report-placeholder {
  cursor: default;
}

.report-placeholder:hover,
.report-placeholder:focus {
  background: var(--app-panel);
}

.tool-icon {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--app-accent-dark);
  background: #f5f9e8;
  border: 1px solid #dbe7a3;
  border-radius: 6px;
}

.tool-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.tool-title {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.tool-tile strong {
  display: block;
  color: var(--app-muted);
  font-weight: 600;
}

.import-panel .detail-grid {
  padding-bottom: 18px;
}

.import-actions {
  padding-top: 16px;
  border-top: 1px solid var(--app-border);
}

.user-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.user-table th,
.user-table td {
  padding: 4px 18px 4px 0;
  vertical-align: middle;
  white-space: nowrap;
}

.user-table th:first-child,
.user-table td:first-child {
  width: 280px;
}

.user-table th:nth-child(2),
.user-table td:nth-child(2) {
  width: 220px;
}

.user-table th:nth-child(3),
.user-table td:nth-child(3),
.user-table th:nth-child(4),
.user-table td:nth-child(4) {
  width: 120px;
}

.user-table th:last-child,
.user-table td:last-child {
  width: 220px;
  padding-right: 0;
}

.inline-user-form,
.user-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-user-form .form-select {
  width: 150px;
}

.temporary-password {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  color: var(--app-ink);
  background: #fff8dd;
  border: 1px solid #e4c96a;
  border-radius: 4px;
  font-size: 1rem;
}

.validation-summary {
  margin-bottom: 12px;
}

.footer {
  flex-shrink: 0;
  width: 100%;
  height: 56px;
  line-height: 56px;
  background: #95AD20;
  color: #ffffff !important;
}

@media (max-width: 960px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .member-list-panel {
    position: static;
  }

  .member-list {
    max-height: 280px;
  }

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

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

  .form-grid .span-4 {
    grid-column: span 2;
  }

  .filter-form,
  .report-filter-form,
  .team-builder-filter,
  .team-builder-layout,
  .team-builder-totals,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-builder-layout,
  .team-builder-toolbar,
  .coordinator-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-header,
  .member-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions,
  .member-actions,
  .donation-total {
    justify-content: flex-start;
    text-align: left;
  }

  .member-actions {
    flex-direction: column;
  }

  .detail-grid,
  .form-grid,
  .filter-form,
  .report-filter-form,
  .team-builder-filter,
  .team-builder-totals,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: span 1;
  }

  .form-grid .span-4 {
    grid-column: span 1;
  }

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

  .campaign-goal-content {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
    text-align: center;
  }
}
