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

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: #f7f8fa;
  color: #172033;
  margin-bottom: 72px;
}

[hidden] {
  display: none !important;
}

.is-hidden,
.is-filtered-out {
  display: none !important;
}

.truncate-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.description-full {
  white-space: pre-line;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(15, 98, 254, 0.22);
}

.navbar-brand {
  font-weight: 700;
}

.home-hero,
.auth-panel,
.task-row,
.admin-panel,
.quick-cards > div,
.empty-state {
  background: #fff;
  border: 1px solid #e2e7ef;
  border-radius: 8px;
}

.home-hero {
  padding: 3rem;
}

.home-hero h1,
.page-heading h1,
.auth-panel h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  color: #b42318;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.lead {
  color: #516070;
  max-width: 760px;
}

.heart-target {
  color: #172033;
  font-size: 1.1rem;
  margin: 1rem 0 0;
}

.user-home-hero {
  margin-bottom: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.quick-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1rem;
}

.quick-cards > div {
  padding: 1.5rem;
}

.contribution-cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-panel {
  align-content: start;
  display: grid;
  gap: 1rem;
}

.stat-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.stat-list div,
.top-user-list li {
  align-items: center;
  border-bottom: 1px solid #e8edf4;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 0.65rem;
}

.stat-list div:last-child,
.top-user-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stat-list dt {
  color: #415063;
  font-weight: 700;
}

.stat-list dd {
  font-size: 1.1rem;
  font-weight: 850;
  margin: 0;
}

.stat-list .stat-total {
  border-bottom-color: #cdd7e5;
}

.stat-list .stat-total dt,
.stat-list .stat-total dd {
  color: #172033;
  font-weight: 850;
}

.stat-list .stat-breakdown {
  border-bottom: 0;
  font-style: italic;
  padding-bottom: 0;
}

.stat-list .stat-breakdown dt {
  color: #667085;
  font-weight: 600;
}

.stat-list .stat-breakdown dd {
  color: #415063;
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.panel-heading-line {
  align-items: center;
  align-self: start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.panel-heading-line h2 {
  margin: 0;
}

.user-task-panel {
  margin-top: 1rem;
}

.compact-task-list {
  display: grid;
  gap: 0.5rem;
}

.compact-task-row {
  align-items: center;
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  color: #172033;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.75rem 0.9rem;
  text-decoration: none;
}

.compact-task-row:hover,
.compact-task-row:focus-visible {
  background: #f8fbff;
  border-color: #b8cffc;
  color: #172033;
}

.compact-task-row small,
.compact-task-row strong {
  display: block;
}

.compact-task-row small {
  color: #667085;
  font-size: 0.82rem;
}

.compact-task-row strong {
  font-size: 1rem;
  font-weight: 800;
}

.top-user-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-left: 1.25rem;
}

.quick-cards h2,
.task-row h2,
.admin-panel h2 {
  font-size: 1.25rem;
  font-weight: 750;
}

.auth-grid {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  margin: 2rem auto;
  max-width: 960px;
}

.auth-panel {
  display: grid;
  gap: 1rem;
  padding: 2rem;
}

.auth-intro-panel {
  align-content: center;
}

.login-form {
  align-content: center;
}

.page-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.task-list {
  display: grid;
  gap: 1rem;
}

.task-tabs {
  margin-bottom: 1rem;
}

.task-tabs .nav-link {
  align-items: center;
  color: #415063;
  display: flex;
  gap: 0.5rem;
}

.task-tabs .nav-link.active {
  color: #172033;
  font-weight: 800;
}

.tab-count {
  background: #e8edf4;
  border-radius: 999px;
  color: #415063;
  font-size: 0.8rem;
  line-height: 1;
  min-width: 1.5rem;
  padding: 0.25rem 0.45rem;
  text-align: center;
}

.task-tabs .nav-link.active .tab-count {
  background: #0f62fe;
  color: #fff;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 1.5rem 0 0.75rem;
}

.task-row {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1.25rem;
}

.task-row-link {
  color: inherit;
  cursor: pointer;
  grid-template-columns: minmax(0, 1fr) 1.5rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-row-link:hover {
  background: #f1f6ff;
  border-color: #b8cffc;
  color: inherit;
}

.task-row-link:focus-visible {
  outline: 3px solid rgba(15, 98, 254, 0.35);
  outline-offset: 2px;
}

.row-chevron {
  color: #697789;
  font-size: 2rem;
  line-height: 1;
  place-self: center end;
}

.task-title-line,
.task-detail-header {
  align-items: start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.task-main p,
.muted {
  color: #586576;
}

.assigned-summary {
  margin-bottom: 0;
}

.admin-task-summary {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.admin-task-summary h2 {
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0;
}

.admin-task-summary p {
  color: #172033;
  margin: 0.85rem 0;
}

.summary-date,
.summary-location,
.summary-needed,
.summary-count {
  font-size: 0.9rem;
}

.summary-date,
.summary-location,
.summary-needed {
  color: #697789;
  font-weight: 700;
}

.summary-count {
  border-radius: 999px;
  justify-self: start;
  padding: 0.3rem 0.55rem;
}

.summary-count span {
  font-weight: 500;
}

.summary-close-date {
  color: #697789;
  font-size: 0.85rem;
  font-style: italic;
}

.task-meta {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 1rem 0 0;
}

.task-meta div {
  min-width: 0;
}

.task-meta dt {
  color: #697789;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.task-meta dd {
  margin: 0;
}

.task-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.group-members-line {
  color: #415063;
  font-size: 0.92rem;
}

.task-action {
  min-width: 150px;
}

.task-action .btn {
  width: 100%;
}

.empty-state {
  color: #586576;
  padding: 1.5rem;
}

.admin-panel {
  padding: 1.5rem;
}

.task-detail-summary-panel {
  margin-bottom: 1rem;
}

.admin-notes-panel {
  margin-bottom: 1rem;
}

.login-link-panel {
  margin-bottom: 1rem;
}

.admin-notes-form {
  display: grid;
  gap: 0.75rem;
}

.notes-indicator {
  align-items: center;
  background: #c1121f;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 900;
  height: 1.1rem;
  justify-content: center;
  margin-left: 0.35rem;
  width: 1.1rem;
}

.assignment-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.task-edit-form {
  margin-top: 1rem;
}

.task-edit-panel {
  background: #fff;
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.task-edit-form .form-section {
  border-bottom: 0;
  padding-bottom: 1rem;
}

.task-edit-form .form-label {
  font-weight: 800;
}

.compact-number-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-section {
  border-bottom: 1px solid #b8cffc;
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
}

.registration-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.registration-grid h3 {
  font-size: 0.95rem;
  font-weight: 800;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.delete-form {
  display: none;
}

.inline-action-form {
  margin-top: 1rem;
}

.bottom-action-form {
  margin-top: 1.5rem;
}

.close-registration-form {
  margin-top: 0.75rem;
}

.volunteers-panel {
  display: grid;
  gap: 1rem;
}

.volunteer-panel {
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.volunteer-panel h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.volunteer-panel h3.assignment-count-shortage {
  color: #b42318;
}

.volunteer-panel h3.assignment-count-complete {
  color: #167044;
}

.volunteer-panel h3.assignment-count-over {
  color: #0f62fe;
}

.heart-score {
  display: inline-flex;
  gap: 0.08rem;
  margin-left: 0.25rem;
  color: #c1121f;
  font-weight: 800;
  white-space: nowrap;
}

.selected-panel {
  background: #edfdf3;
  border-color: #a8e9bf;
}

.selected-panel h3 {
  color: #167044;
}

.source-panel {
  background: #fff;
}

.source-panel h3 {
  color: #415063;
}

.source-list-block {
  display: grid;
  gap: 1rem;
}

.source-list-block + .source-list-block {
  border-top: 1px solid #e2e7ef;
  padding-top: 1rem;
}

.collapsible-source-section {
  display: block;
}

.collapsible-source-section summary {
  color: #415063;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  list-style-position: inside;
}

.collapsible-source-section[open] {
  display: grid;
}

.collapsible-source-section[open] summary {
  margin-bottom: 1rem;
}

.section-heading-line {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.source-help-block {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.source-help-block p {
  margin: 0;
}

.group-header-actions,
.group-inline-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.group-inline-actions {
  margin: 0;
}

.group-registration-form {
  display: grid;
  gap: 1rem;
}

.source-action-row {
  display: flex;
  justify-content: flex-end;
}

.group-inline-actions span {
  color: #415063;
  font-weight: 800;
}

.registration-group {
  display: contents;
}

.registered-person {
  display: block;
}

.remove-registration-form {
  margin: 0;
}

.move-row {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  color: #172033;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem;
  text-align: left;
  width: 100%;
}

.move-row strong {
  overflow-wrap: anywhere;
}

.move-icon {
  display: block;
  flex: 0 0 auto;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.move-row-remove .move-icon {
  color: #b42318;
}

.move-row-add .move-icon {
  color: #0f62fe;
}

.move-row-remove:hover,
.move-row-remove:focus-visible {
  background: #fff4f2;
  border-color: #b42318;
}

.move-row-add:hover,
.move-row-add:focus-visible {
  background: #f1f6ff;
  border-color: #0f62fe;
}

.assigned-person-row,
.candidate-person {
  display: block;
}

.registration-group-color-0 .move-row {
  background: #f1f6ff;
  border-color: #b8cffc;
}

.registration-group-color-1 .move-row {
  background: #ecfdf3;
  border-color: #abefc6;
}

.registration-group-color-2 .move-row {
  background: #fffaeb;
  border-color: #fedf89;
}

.registration-group-color-3 .move-row {
  background: #fff1f3;
  border-color: #fecdd6;
}

.registration-group-color-4 .move-row {
  background: #f4f3ff;
  border-color: #d9d6fe;
}

.registration-group-color-5 .move-row {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.add-assignment-form {
  margin: 0;
}

.member-source-list {
  display: grid;
  gap: 0.75rem;
}

.membership-list {
  display: grid;
  gap: 1rem;
}

.membership-row {
  align-items: end;
  border-bottom: 1px solid #e8edf4;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto;
  padding-bottom: 1rem;
}

.membership-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.membership-row .mb-3,
.membership-row-actions {
  margin-bottom: 0 !important;
}


.btn-primary:disabled,
.btn-primary.disabled {
  background-color: #98a2b3;
  border-color: #98a2b3;
  color: #fff;
}


.assignment-form h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.person-list {
  display: grid;
  gap: 0.5rem;
}

.group-list {
  display: grid;
  gap: 0.75rem;
}

.selection-group {
  border: 1px solid #d7dde8;
  border-radius: 8px;
  padding: 0.75rem;
}

.group-heading {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.group-heading span {
  color: #697789;
  font-size: 0.85rem;
}

.person-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.person-row {
  align-items: start;
  background: #f7f8fa;
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
}

.person-row small {
  color: #697789;
  display: block;
  overflow-wrap: anywhere;
}

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

@media (max-width: 760px) {
  .auth-grid,
  .auth-panel,
  .admin-grid,
  .task-row:not(.task-row-link) {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .auth-panel {
    padding: 1.5rem;
  }

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

  .task-action {
    width: 100%;
  }

  .admin-panel {
    padding: 1rem;
  }

  .task-detail-header {
    display: grid;
    gap: 0.5rem;
  }

  .person-list.compact {
    grid-template-columns: 1fr;
  }

  .person-row {
    align-items: center;
  }

  .membership-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .assignment-form .btn {
    width: 100%;
  }

  .group-heading {
    align-items: start;
    display: grid;
    gap: 0.15rem;
  }
}
