html {
  font-size: 16px;
  min-height: 100%;
  position: relative;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: #f5f7fb;
  color: #1d2a35;
  font-family: "Segoe UI", Arial, sans-serif;
  margin-bottom: 72px;
  overflow-x: hidden;
}

body.public-layout {
  padding-top: var(--fixed-header-height, 68px);
}

a {
  color: #075eb4;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
}

.btn-primary {
  background: #075eb4;
  border-color: #075eb4;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #044d96;
  border-color: #044d96;
}

.btn-outline-danger {
  background: #ffffff;
  border: 1px solid #dc3545;
  color: #b4232f;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background: #dc3545;
  color: #ffffff;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(12, 111, 189, 0.18);
}

.app-navbar {
  background: #ffffff;
  border-bottom: 1px solid #dce6ef;
  box-shadow: 0 6px 24px rgba(18, 50, 82, 0.06);
  margin-bottom: 0;
}

.site-header {
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1100;
}

.app-navbar .container {
  gap: 0.75rem;
}

.app-navbar .nav-link {
  color: #33485c;
  font-weight: 650;
}

.app-brand {
  align-items: center;
  color: #075eb4;
  display: inline-flex;
  font-weight: 800;
  gap: 0.6rem;
  min-width: 0;
  white-space: normal;
}

.app-brand--image {
  max-width: min(340px, 48vw);
  padding-bottom: 0.35rem;
  padding-top: 0.35rem;
}

.brand-logo {
  display: block;
  height: 60px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.mobile-admin-action {
  display: none;
  margin-left: auto;
}

.desktop-admin-action {
  align-items: center;
  gap: 0.75rem;
}

.public-nav-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.public-nav-actions form {
  margin: 0;
}

.public-home-link {
  color: #33485c;
  font-weight: 700;
  margin-left: 1.25rem;
  text-decoration: none;
}

.public-home-link:hover {
  color: #075eb4;
}

.account-state-button {
  align-items: center;
  background: #075eb4;
  border: 1px solid #075eb4;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 800;
  gap: 0.55rem;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  text-decoration: none;
}

.account-state-button:hover,
.account-state-button:focus {
  background: #064f97;
  border-color: #064f97;
  color: #fff;
}

.account-state-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.app-navbar .navbar-toggler {
  border-color: #075eb4;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
}

.app-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(7, 94, 180, 0.18);
}

.brand-mark,
.dashboard-logo-mark {
  background: linear-gradient(135deg, #075eb4, #20a386);
  border-radius: 6px;
  display: inline-block;
  height: 28px;
  position: relative;
  width: 28px;
}

.brand-mark::after,
.dashboard-logo-mark::after {
  border: 2px solid #ffffff;
  border-radius: 4px;
  content: "";
  height: 14px;
  left: 7px;
  position: absolute;
  top: 7px;
  transform: rotate(45deg);
  width: 14px;
}

.footer {
  background: #ffffff;
  bottom: 0;
  line-height: 58px;
  position: absolute;
  width: 100%;
}

.footer .container {
  position: relative;
}

.footer-signin-link {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 0.75rem;
  text-decoration: none;
  top: 10px;
  transition: background 160ms ease, transform 160ms ease;
  width: 38px;
}

.footer-signin-link:hover,
.footer-signin-link:focus {
  background: #044d96;
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-signin-link svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 25px;
}

.member-hero {
  align-items: center;
  background: linear-gradient(135deg, #174f7d 0%, #075eb4 58%, #3d82c3 100%);
  color: #ffffff;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 calc(50% - 50vw) 0;
  min-height: 350px;
  padding: 4rem max(1.5rem, calc((100vw - 1140px) / 2)) 6rem;
}

.member-hero h1 {
  font-size: clamp(2.5rem, 4vw, 5.75rem);
  font-weight: 450;
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 1.35rem;
  text-align: center;
  /*max-width: 1120px;*/
}

.member-hero .lead {
  color: #dfefff;
  font-size: 1.40rem;
 /* max-width: 920px;*/
   text-align: center;
}

.member-hero__panel {
  align-self: end;
  background: rgba(255, 255, 255, 0.95);
  border-left: 5px solid #dc2626;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  color: #1d2a35;
  padding: 1.35rem;
}

.member-hero__panel strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.eyebrow {
  color: #075eb4;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.member-hero .eyebrow {
  color: #a9e8dc;
}

.panel-kicker {
  color: #687887;
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.portal-alert {
  border-radius: 8px;
  margin-top: -1.5rem;
}

.portal-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  margin-bottom: 3rem;
}

.portal-action-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: -6rem calc(50% - 50vw) 3rem;
  padding: 0 max(3rem, calc((100vw - 1540px) / 2));
  position: relative;
  z-index: 1;
}

.portal-action-card {
  background:
    linear-gradient(135deg, rgba(7, 94, 180, 0.88), rgba(12, 51, 91, 0.78)),
    linear-gradient(45deg, #075eb4, #20a386);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(18, 50, 82, 0.16);
  color: #ffffff;
  display: grid;
  min-height: 180px;
  padding: 1.35rem;
  text-decoration: none;
}

.portal-action-card:hover,
.portal-action-card:focus {
  color: #ffffff;
  transform: translateY(-3px);
  border: 3px solid rgba(255, 255, 255, 0.28);
}

.portal-action-card span {
  color: #bdf1e7;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-action-card strong {
  align-self: center;
  display: block;
  font-size: 1.45rem;
  line-height: 1.08;
}

.portal-action-card small {
  align-self: end;
  color: #e9f4ff;
  font-size: 0.96rem;
}

.portal-action-card--prayer {
  background:
    linear-gradient(135deg, rgba(7, 94, 180, 0.9), rgba(24, 165, 88, 0.62)),
    linear-gradient(45deg, #075eb4, #18a558);
}

.portal-action-card--counselling {
  background:
    linear-gradient(135deg, rgba(12, 51, 91, 0.9), rgba(24, 165, 88, 0.68)),
    linear-gradient(45deg, #0c335b, #18a558);
}

.portal-action-card--email {
  background:
    linear-gradient(135deg, rgba(12, 51, 91, 0.82), rgba(24, 165, 88, 0.82)),
    linear-gradient(45deg, #075eb4, #18a558);
}

.portal-action-card--suggestion {
  background:
    linear-gradient(135deg, rgba(24, 165, 88, 0.68), rgba(220, 38, 38, 0.82)),
    linear-gradient(45deg, #075eb4, #dc2626);
}

.portal-action-card--events {
    background: linear-gradient(45deg, #18a558, #075eb4), 
        linear-gradient(135deg, rgba(7, 94, 180, 0.82), rgba(24, 165, 88, 0.82));
}

.portal-action-card--transport {
  background:
    linear-gradient(135deg, rgba(7, 94, 180, 0.9), rgba(12, 51, 91, 0.66)),
    url("../image/transport-bus.png") center right 18% / contain no-repeat,
    linear-gradient(45deg, #075eb4, #18a558);
}

.portal-action-card--team {
  background:
    linear-gradient(135deg, rgba(7, 94, 180, 0.9), rgba(220, 38, 38, 0.72)),
    linear-gradient(45deg, #075eb4, #18a558);
}

.portal-forms-section {
  margin: 0 auto 3rem;
  max-width: 1540px;
}

.portal-section-heading {
  margin-bottom: 1rem;
}

.portal-section-heading span {
  color: #075eb4;
  display: block;
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-section-heading h2 {
  color: #061a2f;
  font-size: 2rem;
  font-weight: 850;
  margin: 0;
}

.portal-action-grid--forms {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 0;
  padding: 0;
}

.portal-action-card--form {
  background:
    linear-gradient(135deg, rgba(7, 94, 180, 0.92), rgba(24, 165, 88, 0.72)),
    linear-gradient(45deg, #075eb4, #18a558);
}

.portal-page-header {
  margin: 2rem auto 1.5rem;
  max-width: 1120px;
  padding: 0 1rem;
}

.portal-page-header h1 {
  color: #061b33;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.portal-page-header p:last-child {
  color: #526272;
  font-size: 1.1rem;
}

.portal-empty-state {
  margin: 0 auto 3rem;
  max-width: 1120px;
}

.portal-form-shell {
  margin: 3rem auto;
  max-width: 980px;
}

.portal-form-shell h1 {
  color: #0c335b;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 850;
  line-height: 1;
}

.portal-honeypot {
  left: -9999px;
  position: absolute;
  top: auto;
}

.portal-check-group {
  border: 0;
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
}

.portal-check-group legend {
  color: #314457;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.portal-check-group label,
.portal-consent {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.team-department-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.team-department-option {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  margin: 0;
  min-height: 50px;
  padding: 0.75rem 0.9rem;
}

.team-department-option:has(input:checked) {
  background: #e8f6ef;
  border-color: #18a558;
}

.team-department-option span {
  color: #1d2a35;
  font-weight: 750;
}

.verification-code-input {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-card,
.auth-card,
.admin-panel,
.verse-card,
.metric-card,
.quick-actions a {
  background: #ffffff;
  border: 1px solid #d4dde6;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(18, 50, 82, 0.08);
}

.portal-card {
  padding: 2rem;
}

.portal-card--narrow {
  margin-left: auto;
  margin-right: auto;
  max-width: 1120px;
}

.portal-card--accent {
  border-top: 5px solid #20a386;
}

.error-page {
  display: grid;
  margin: 3rem auto;
  max-width: 820px;
  min-height: 55vh;
  place-items: center;
}

.error-card {
  background: #ffffff;
  border: 1px solid #d4dde6;
  border-left: 6px solid #dc2626;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(18, 50, 82, 0.12);
  padding: 2rem;
  width: 100%;
}

.error-card h1 {
  color: #0c335b;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 850;
  line-height: 1;
  margin: 0.4rem 0 1rem;
}

.error-card p {
  color: #536575;
  font-size: 1.05rem;
}

.error-detail {
  border-top: 1px solid #e1e7ed;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: 120px minmax(0, 1fr);
  padding: 0.75rem 0;
}

.error-detail strong,
.error-message strong {
  color: #314457;
}

.error-detail span,
.error-message p {
  overflow-wrap: anywhere;
}

.error-message {
  background: #fff7f7;
  border: 1px solid #f0b8b8;
  border-radius: 8px;
  margin-top: 1rem;
  padding: 1rem;
}

.error-message p {
  color: #7f1d1d;
  margin: 0.35rem 0 0;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.section-heading h2,
.auth-card h2,
.admin-panel h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 1.25rem;
}

.muted-copy {
  color: #5d6b78;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--compact {
  gap: 0.75rem;
}

.form-section-grid {
  display: grid;
  gap: 1rem;
  grid-column: 1 / -1;
}

.form-section-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-section-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  margin-bottom: 1rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.inline-date-fields {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(82px, 0.7fr) minmax(130px, 1.3fr);
}

.inline-date-fields--three {
  grid-template-columns: minmax(76px, 0.55fr) minmax(120px, 1fr) minmax(120px, 0.85fr);
}

label {
  color: #314457;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.required-field-marker {
  color: #dc2626;
  font-weight: 800;
}

.access-denied-popup {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #f3b2b2;
  border-left: 5px solid #dc2626;
  box-shadow: 0 12px 32px rgba(24, 47, 76, 0.18);
  color: #7f1d1d;
  display: grid;
  gap: 0.25rem;
  max-width: min(92vw, 470px);
  padding: 1rem 3rem 1rem 1rem;
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 4000;
}

.access-denied-popup button {
  background: transparent;
  border: 0;
  color: #7f1d1d;
  font-size: 1.5rem;
  line-height: 1;
  position: absolute;
  right: 0.75rem;
  top: 0.55rem;
}

.form-control,
.form-select {
  border-color: #c7d4df;
  border-radius: 6px;
  min-height: 44px;
  max-width: 100%;
  width: 100%;
}

.auth-shell {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  margin: 4rem auto;
  max-width: 1020px;
}

.auth-copy h1 {
  color: #0c335b;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 850;
  line-height: 1;
}

.auth-copy p {
  color: #536575;
  font-size: 1.08rem;
  max-width: 540px;
}

.auth-card {
  padding: 2rem;
}

.auth-help-row {
  display: flex;
  justify-content: flex-end;
}

.auth-help-row a {
  color: #005bb7;
  font-weight: 800;
  text-decoration: none;
}

.auth-help-row a:hover {
  text-decoration: underline;
}

.dashboard-body {
  background: #f4f4f4;
  margin: 0;
  min-height: 100vh;
  padding-top: var(--fixed-header-height, 58px);
}

.admin-sticky-header {
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.dashboard-topbar {
  align-items: center;
  background: #0960b5;
  color: #ffffff;
  display: flex;
  height: 58px;
  justify-content: space-between;
  padding: 0 1.4rem;
}

.dashboard-logo {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  font-size: 1.45rem;
  font-weight: 800;
  gap: 0.6rem;
  text-decoration: none;
}

.dashboard-logo:hover {
  color: #ffffff;
}

.dashboard-logo-mark {
  background: #ffffff;
}

.dashboard-logo-mark::after {
  border-color: #0960b5;
}

.dashboard-topbar__tools {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.admin-portal-link {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  padding: 0.42rem 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.admin-portal-link:hover,
.admin-portal-link:focus {
  background: #ffffff;
  color: #075eb4;
}

.topbar-icon {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 5px;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  position: relative;
  text-decoration: none;
  width: 28px;
}

.topbar-icon:hover {
  color: #ffffff;
}

.notification-menu {
  position: relative;
}

.notification-toggle {
  cursor: pointer;
}

.notification-badge {
  align-items: center;
  background: #dc2626;
  border: 2px solid #0960b5;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.65rem;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 0.2rem;
  position: absolute;
  right: -9px;
  top: -8px;
}

.notification-dropdown {
  background: #ffffff;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(17, 37, 58, 0.22);
  color: #1d2a35;
  min-width: 340px;
  position: absolute;
  right: 0;
  top: 40px;
  z-index: 20;
}

.notification-header {
  align-items: center;
  border-bottom: 1px solid #e1e7ed;
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.notification-header button {
  background: transparent;
  border: 0;
  color: #075eb4;
  font-weight: 800;
}

.notification-item,
.notification-view-all {
  color: #1d2a35;
  display: block;
  padding: 0.85rem 1rem;
  text-decoration: none;
}

.notification-item {
  border-bottom: 1px solid #edf1f5;
}

.notification-item:not(.read) {
  border-left: 4px solid #dc2626;
}

.notification-item strong,
.notification-item span {
  display: block;
}

.notification-item span {
  color: #637383;
  font-size: 0.9rem;
}

.notification-view-all {
  color: #075eb4;
  font-weight: 800;
}

.admin-name {
  font-weight: 700;
}

.help-button {
  background: #dc2626;
  border: 0;
  border-radius: 22px;
  color: #ffffff;
  font-weight: 800;
  padding: 0.55rem 1.4rem;
}

.dashboard-tabs {
  align-items: center;
  background: #d8ecfb;
  border-bottom: 1px solid #b9d0e4;
  display: none;
  gap: 0.5rem;
  justify-content: center;
  min-height: 50px;
  overflow-x: auto;
  padding: 0.5rem 1rem;
}

.dashboard-tabs a {
  border-radius: 999px;
  color: #075eb4;
  font-weight: 700;
  min-width: max-content;
  padding: 0.45rem 1.5rem;
  text-decoration: none;
  text-transform: uppercase;
}

.dashboard-tabs a.active {
  background: #0960b5;
  color: #ffffff;
}

.admin-mobile-select {
  display: none;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  transition: grid-template-columns 0.18s ease;
}

.dashboard-sidebar {
  align-content: stretch;
  align-self: start;
  background: #ffffff;
  /*border: 1px solid #d8e2ec;*/
  /*border-radius: 12px;*/
  box-shadow: 0 16px 32px rgba(18, 50, 82, 0.08);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--fixed-header-height, 58px) - 28px);
 /* margin: 18px 0 0 14px;*/
  max-height: calc(100vh - var(--fixed-header-height, 58px) - 28px);
  overflow: visible;
  padding: 0.75rem;
  position: sticky;
/*  top: calc(var(--fixed-header-height, 58px) + 14px);*/
}

.sidebar-nav {
  display: grid;
  flex: 1 1 auto;
  gap: 0.18rem;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.1rem;
}

.dashboard-sidebar a,
.sidebar-category-toggle {
  align-items: center;
  border-radius: 7px;
  border: 0;
  color: #5a6672;
  display: flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.7rem;
  min-height: 38px;
  padding: 0 0.65rem;
  text-decoration: none;
  width: 100%;
}

.sidebar-category-toggle {
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.sidebar-toggle {
    align-items: center;
    background: #0960b5;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(76, 84, 255, 0.24);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: -13px;
    top: 16px;
    width: 26px;
    z-index: 2;
}

.dashboard-sidebar a.active {
  background: #0960b5;
  color: #ffffff;
}

.sidebar-category.active > .sidebar-category-toggle,
.sidebar-category.open > .sidebar-category-toggle {
  background: #edf6ff;
  color: #075eb4;
}

.dashboard-sidebar span,
.action-icon {
  align-items: center;
  border: 2px solid currentColor;
  border-radius: 5px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.sidebar-toggle span {
  align-items: center;
  border: 0;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: auto;
  justify-content: center;
  width: auto;
}

.sidebar-search {
  align-items: center;
  background: #f3f6fb;
  border-radius: 7px;
  display: flex;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  min-height: 38px;
  padding: 0 0.65rem;
}

.sidebar-category {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.sidebar-category-toggle strong {
  flex: 1 1 auto;
}

.sidebar-category-toggle em {
  color: currentColor;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.16s ease;
}

.sidebar-category.open > .sidebar-category-toggle em {
  transform: rotate(90deg);
}

.sidebar-subnav {
  display: none;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.08rem 0 0.18rem 0.45rem;
}

.sidebar-category.open > .sidebar-subnav {
  display: grid;
}

.sidebar-subnav a {
  font-size: 0.84rem;
  min-height: 34px;
  padding-left: 0.45rem;
}

.sidebar-subnav a span {
  font-size: 0.68rem;
  height: 22px;
  width: 22px;
}

.sidebar-search span {
  color: #6b7480;
  font-weight: 800;
}

.sidebar-search input {
  background: transparent;
  border: 0;
  color: #1d2a35;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.dashboard-sidebar strong {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-body.sidebar-collapsed .dashboard-shell {
  grid-template-columns: 82px minmax(0, 1fr);
}

.dashboard-body.sidebar-collapsed .dashboard-sidebar {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}

.dashboard-body.sidebar-collapsed .dashboard-sidebar a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.dashboard-body.sidebar-collapsed .sidebar-category-toggle {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.dashboard-body.sidebar-collapsed .dashboard-sidebar strong,
.dashboard-body.sidebar-collapsed .sidebar-category-toggle em,
.dashboard-body.sidebar-collapsed .sidebar-search input {
  display: none;
}

.dashboard-body.sidebar-collapsed .sidebar-subnav {
  display: none !important;
}

.dashboard-body.sidebar-collapsed .sidebar-search {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.dashboard-main {
  padding: 2rem 2rem 2rem;
  min-width: 0;
}

.dashboard-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.dashboard-title-row h1 {
  color: #0d325b;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.breadcrumb-line {
  color: #075eb4;
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.dashboard-layout {
  align-items: start;
  display: grid;
  gap: 1.6rem;
  /*grid-template-columns: minmax(0, 1fr) minmax(280px, 438px);*/
}

.dashboard-layout > *,
.quick-actions,
.quick-actions a {
  min-width: 0;
}

.dashboard-content-stack {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.verse-card {
  min-height: 190px;
  padding: 2.4rem 3.8rem;
}

.verse-text {
  color: #075eb4;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.verse-card span {
  color: #075eb4;
  font-size: 1.05rem;
}

.metric-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  min-height: 150px;
  padding: 1.6rem 1.7rem;
  text-align: right;
}

.metric-card-link {
  color: #1d2a35;
  display: block;
  text-decoration: none;
}

.metric-card-link:hover,
.metric-card-link:focus,
.metric-card-link.active {
  border-color: #075eb4;
  box-shadow: 0 12px 34px rgba(7, 94, 180, 0.14);
  color: #1d2a35;
}

.metric-card span {
  color: #637383;
  display: block;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-card strong {
  color: #0960b5;
  display: block;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.1;
  margin-top: 0.6rem;
}

.dashboard-detail-panel {
  scroll-margin-top: 1rem;
}

.workflow-status-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-status-grid a {
  border: 1px solid #cbd8e4;
  border-radius: 8px;
  color: #102235;
  display: flex;
  justify-content: space-between;
  min-height: 86px;
  padding: 1rem;
  text-decoration: none;
}

.workflow-status-grid a:hover,
.workflow-status-grid a:focus {
  border-color: #075eb4;
  box-shadow: 0 12px 34px rgba(7, 94, 180, 0.12);
}

.workflow-status-grid span {
  color: #516375;
  font-weight: 800;
  max-width: 12rem;
}

.workflow-status-grid strong {
  color: #0960b5;
  font-size: 2.2rem;
  line-height: 1;
}

.dashboard-activity-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-activity-grid h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.dashboard-detail-list {
  display: grid;
  gap: 0.6rem;
}

.dashboard-detail-list a {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  color: #1d2a35;
  display: block;
  padding: 0.85rem;
  text-decoration: none;
}

.dashboard-detail-list a:hover,
.dashboard-detail-list a:focus {
  background: #f8fbfd;
  border-color: #b7d7f3;
}

.dashboard-detail-list strong,
.dashboard-detail-list span,
.dashboard-detail-list small {
  display: block;
}

.dashboard-detail-list span,
.dashboard-detail-list small {
  color: #637383;
}

.quick-actions {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.quick-actions a {
  color: #075eb4;
  display: grid;
  gap: 0.2rem 1.2rem;
  grid-template-columns: 52px minmax(0, 1fr);
  min-height: 94px;
  padding: 1.25rem;
  text-decoration: none;
}

.quick-actions .action-icon {
  background: #0960b5;
  border-color: #0960b5;
  color: #ffffff;
  grid-row: span 2;
  height: 52px;
  width: 52px;
}

.quick-actions strong {
  font-size: 1.04rem;
  overflow-wrap: anywhere;
}

.quick-actions small {
  color: #075eb4;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.qr-code-panel {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
}

.qr-code-preview {
  display: grid;
  place-items: center;
}

.qr-code-frame {
  background: #ffffff;
  border: 1px solid #cbd8e5;
  border-radius: 8px;
  box-shadow: 0 16px 30px rgba(12, 42, 75, 0.08);
  padding: 1rem;
}

.qr-code-frame img {
  display: block;
  height: auto;
  max-width: 280px;
  width: 100%;
}

.qr-code-copy {
  display: grid;
  gap: 1rem;
}

.qr-code-copy h2 {
  margin: 0;
}

.qr-link-box {
  display: grid;
  gap: 0.4rem;
}

.admin-panel {
  padding: 1.1rem;
}

.button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.panel-heading > span {
  color: #637383;
  font-weight: 800;
}

.admin-table {
  min-width: 980px;
}

.admin-table th {
  color: #637383;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.admin-table td {
  color: #293b4b;
  vertical-align: top;
}

.admin-table td span {
  color: #687887;
  display: block;
  font-size: 0.88rem;
}

.inline-form {
  display: inline-flex;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.priority-pill {
  border-radius: 999px;
  display: inline-block;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
}

.priority-normal {
  background: #e9f4ff;
  color: #075eb4;
}

.priority-high {
  background: #e7f7ef;
  color: #137b45;
}

.priority-urgent {
  background: #ffe6e6;
  color: #b42020;
}

.case-form {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 132px minmax(130px, 1fr) minmax(150px, 1.2fr) auto;
}

.case-form--wide {
  grid-template-columns: 140px minmax(150px, 1fr) minmax(160px, 1.1fr) auto auto;
}

.case-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.datatable-toolbar {
  align-items: center;
  display: flex;
  gap: 0.6rem;
}

.datatable-toolbar label,
.datatable-toolbar span {
  color: #637383;
  font-weight: 800;
  margin: 0;
}

.datatable-toolbar .form-select {
  min-height: 38px;
  min-width: 92px;
}

.datatable tbody tr:nth-child(even) {
  background: #f8fbfd;
}

.member-filter-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  margin-bottom: 1rem;
}

.member-filter-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.reports-filter-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.reports-search {
  grid-column: span 2;
}

.reports-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  grid-column: 1 / -1;
}

.reports-results-panel {
  margin-top: 1.25rem;
}

.reports-table-wrap {
  max-height: 62vh;
  overflow: auto;
}

@media (max-width: 1100px) {
  .reports-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-search {
    grid-column: 1 / -1;
  }
}

.member-table-status {
  margin-bottom: 0.75rem;
}

.summary-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-grid a {
  border: 1px solid #d9e3ec;
  border-left: 5px solid #18a558;
  border-radius: 8px;
  color: #1d2a35;
  display: block;
  padding: 1.1rem;
  text-decoration: none;
}

.summary-grid strong {
  color: #075eb4;
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.summary-grid span {
  color: #637383;
  display: block;
  font-weight: 700;
  margin-top: 0.4rem;
}

.notification-list {
  display: grid;
  gap: 0.75rem;
}

.notification-row {
  align-items: center;
  border: 1px solid #d9e3ec;
  border-left: 5px solid #dc2626;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
  text-decoration: none;
}

.notification-row.read {
  border-left-color: #18a558;
  opacity: 0.72;
}

.notification-row strong,
.notification-row span {
  display: block;
}

.notification-row span,
.notification-row small {
  color: #637383;
}

.notification-compose-panel {
  margin-bottom: 1.5rem;
}

.notification-compose-form,
.template-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.notification-member-picker {
  margin-bottom: 1rem;
}

.selected-member-area {
  margin-bottom: 0.9rem;
}

.selected-member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.selected-member-chip {
  align-items: center;
  background: #e9f4ff;
  border: 1px solid #b7d7f3;
  border-radius: 999px;
  color: #075eb4;
  display: inline-flex;
  font-weight: 800;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.35rem 0.45rem 0.35rem 0.75rem;
}

.selected-member-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-member-chip button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b7d7f3;
  border-radius: 999px;
  color: #dc2626;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 24px;
}

.template-form {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.template-form--full {
  border: 0;
  padding: 0;
}

.email-template-menu-panel,
.automation-send-panel {
  max-width: 980px;
}

.email-template-menu {
  display: grid;
  gap: 1rem 2rem;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  max-width: 820px;
}

.email-template-menu .btn {
  color: #00703c;
  font-size: 1.05rem;
  font-weight: 850;
  padding: 0.55rem 1rem;
}

.email-template-menu-note {
  color: #061a2f;
  font-size: 1.08rem;
  line-height: 1.45;
  margin: 2rem 0 0;
  max-width: 880px;
}

.email-template-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  margin-bottom: 1.5rem;
}

.email-preview {
  background: #ffffff;
  color: #061a2f;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  line-height: 1.65;
}

.email-preview img {
  display: block;
  height: auto;
  margin: 0 0 1.75rem;
  max-width: 680px;
  width: 100%;
}

.email-preview p {
  margin: 0 0 1.15rem;
}

.automation-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  margin-bottom: 1.5rem;
}

.email-artwork {
  display: grid;
  gap: 1rem;
}

.email-artwork img {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  display: block;
  width: 100%;
}

.empty-admin-page {
  max-width: 1120px;
}

.empty-admin-page h2 {
  font-weight: 800;
}

.empty-admin-page p:last-child {
  color: #637383;
  font-size: 1.05rem;
  margin-bottom: 0;
}

.Departments-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.Departments-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.Departments-link {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  color: #1d2a35;
  display: block;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.Departments-link.active {
  background: #0960b5;
  border-color: #0960b5;
  color: #ffffff;
}

.Departments-link strong,
.Departments-link span,
.Departments-link small {
  display: block;
}

.Departments-link span,
.Departments-link small {
  color: inherit;
  font-size: 0.88rem;
  opacity: 0.82;
}

.department-summary-card {
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  display: grid;
  gap: 0.25rem;
  margin: 0.75rem 0 1.25rem;
  padding: 0.9rem 1rem;
}

.department-summary-card strong {
  color: #005eb8;
}

.department-summary-card span,
.department-summary-card small {
  color: #526272;
  font-weight: 700;
}

.Departments-head {
  color: #637383;
  font-weight: 700;
  margin: 0.35rem 0 0;
}

.Departments-form {
  border-top: 1px solid #d9e3ec;
  padding-top: 1.25rem;
}

.Departments-form h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.member-add-form {
  align-items: end;
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
 /* display: grid;*/
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 1.25rem;
  padding: 1rem;
}

.member-search-box {
  position: relative;
}

.member-search-box small {
  color: #637383;
  display: block;
  margin-top: 0.35rem;
}

.member-search-results {
  background: #ffffff;
  border: 1px solid #c7d4df;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(18, 50, 82, 0.16);
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 10;
}

.member-search-option,
.member-search-empty {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  color: #1d2a35;
  display: block;
  padding: 0.75rem 0.9rem;
  text-align: left;
  width: 100%;
}

.member-search-option:hover,
.member-search-option:focus {
  background: #e9f4ff;
}

.member-search-option strong,
.member-search-option span {
  display: block;
}

.member-search-option span,
.member-search-empty {
  color: #637383;
  font-size: 0.88rem;
}

.Departments-member-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.Departments-member-card {
  border: 1px solid #d9e3ec;
  border-left: 5px solid #18a558;
  border-radius: 8px;
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
}

.Departments-member-card span,
.Departments-member-card small {
  color: #637383;
}

.followup-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.followup-list {
  display: grid;
  gap: 0.55rem;
}

.followup-link {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  color: #1d2a35;
  display: block;
  padding: 0.9rem 1rem;
  text-decoration: none;
}

.followup-link.active {
  background: #0960b5;
  border-color: #0960b5;
  color: #ffffff;
}

.followup-link strong,
.followup-link span,
.followup-link small {
  display: block;
}

.followup-link span,
.followup-link small {
  color: inherit;
  font-size: 0.88rem;
  opacity: 0.82;
}

.followup-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.followup-summary {
  margin-bottom: 1.25rem;
}

.followup-notes {
  margin-top: 1.4rem;
}

.escalate-followup-panel {
  border-top: 1px solid #d9e3ec;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
}

.followup-note {
  border: 1px solid #d9e3ec;
  border-left: 5px solid #18a558;
  border-radius: 8px;
  margin-top: 0.75rem;
  padding: 1rem;
}

.followup-note strong,
.followup-note span,
.followup-note small {
  display: block;
}

.followup-note span,
.followup-note small {
  color: #637383;
}

.followup-note p {
  margin: 0.65rem 0;
}

.audit-timeline {
  display: grid;
  gap: 0.75rem;
}

.audit-item {
  border: 1px solid #d9e3ec;
  border-left: 5px solid #075eb4;
  border-radius: 8px;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  padding: 1rem;
}

.audit-item strong,
.audit-item span,
.audit-item small {
  display: block;
}

.audit-item span,
.audit-item small,
.audit-item p {
  color: #637383;
}

.audit-item p {
  margin: 0.55rem 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.gallery-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.gallery-section {
  border-top: 1px solid #d9e3ec;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.gallery-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.gallery-section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.gallery-section-heading h3 {
  color: #0d325b;
  font-size: 1.05rem;
  font-weight: 850;
  margin: 0;
}

.gallery-section-heading span {
  color: #637383;
  font-weight: 800;
}

.gallery-grid img {
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  display: block;
  height: 150px;
  object-fit: cover;
  width: 100%;
}

.gallery-card {
  display: grid;
  gap: 0.35rem;
}

.gallery-card strong,
.gallery-card span {
  display: block;
  overflow-wrap: anywhere;
}

.gallery-card span {
  color: #637383;
  font-size: 0.9rem;
}

.escalation-notes-panel {
  margin-top: 1.5rem;
}

.system-admin-panel {
  margin-bottom: 1.5rem;
}

.system-admin-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-details-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.profile-details-grid div {
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 6px;
  min-width: 0;
  padding: 0.85rem;
}

.profile-details-grid dt {
  color: #52667a;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.profile-details-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.role-checkbox-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.role-checkbox-grid--compact {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  margin: 0.75rem 0;
}

.role-check {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 6px;
  display: flex;
  gap: 0.45rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
}

.role-multi-select + .select2-container {
  max-width: 100%;
}

.role-multi-select + .select2-container .select2-selection--multiple {
  min-height: 46px;
  padding: 0.2rem;
}

.role-multi-select + .select2-container .select2-selection__choice {
  max-width: calc(100% - 0.5rem);
}

.role-multi-select + .select2-container .select2-selection__choice__display {
  overflow-wrap: anywhere;
  white-space: normal;
}

.inline-edit-details summary {
  color: #075eb4;
  cursor: pointer;
  font-weight: 800;
}

.inline-access-form {
  background: #f8fbfd;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  margin-top: 0.75rem;
  max-width: 540px;
  padding: 0.85rem;
}

.inline-action-row,
.inline-delete-form {
  margin-top: 0.65rem;
}

.event-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.event-signup-check {
  align-self: end;
  border: 1px solid #d9e3ec;
  border-radius: 6px;
  margin: 0;
  padding: 0.85rem 1rem;
}

.member-events-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.member-calendar {
  background: #ffffff;
  border-radius: 8px;
  padding: 1.4rem;
}

.calendar-header,
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.35rem;
}

.calendar-header strong {
  color: #061a2f;
  font-size: 1.35rem;
}

.calendar-header a {
  color: #637383;
  font-size: 1.5rem;
  text-decoration: none;
}

.calendar-weekdays span,
.calendar-day {
  align-items: center;
  color: #061a2f;
  display: flex;
  justify-content: center;
  min-height: 44px;
  position: relative;
}

.calendar-day.muted {
  color: #bdc5cd;
}

.calendar-day.today span {
  color: #075eb4;
  font-weight: 900;
}

.calendar-day i {
  background: #18a558;
  border-radius: 999px;
  bottom: 5px;
  height: 5px;
  position: absolute;
  width: 5px;
}

.member-event-list h2 {
  color: #061a2f;
  font-weight: 850;
  margin-bottom: 1rem;
}

.member-event-item {
  display: grid;
  gap: 1rem;
  grid-template-columns: 220px minmax(0, 1fr);
  margin-bottom: 0.8rem;
}

.member-event-image img {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.event-no-image {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: #eef3f7;
  border: 1px dashed #b8c7d6;
  border-radius: 8px;
  color: #637383;
  display: flex;
  font-weight: 800;
  justify-content: center;
  width: 100%;
}

.event-no-image--detail {
  min-height: 260px;
}

.member-event-title {
  color: #061a2f;
  display: block;
  font-size: 1.2rem;
  font-weight: 850;
  text-decoration: none;
}

.member-event-item span,
.member-event-item small {
  color: #33485c;
  display: block;
  margin-top: 0.3rem;
}

.member-event-item small,
.event-signup-pill {
  background: #eef3f7;
  border-radius: 5px;
  color: #061a2f;
  display: inline-flex;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
}

.event-detail-card {
  display: grid;
  gap: 1.5rem;
}

.event-detail-card img {
  border-radius: 8px;
  display: block;
  max-height: 460px;
  object-fit: cover;
  width: 100%;
}

.event-detail-date {
  color: #075eb4;
  font-weight: 850;
}

.DSM_Visitors-panel {
  margin-bottom: 1.5rem;
}

.inline-action-form {
  margin: 0;
}

.manual-escalation-panel {
  margin-bottom: 1.5rem;
}

.manual-escalation-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.segmented-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.segmented-options label,
.select-all-check {
  align-items: center;
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  display: inline-flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0.7rem 0.9rem;
}

.recipient-picker {
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  padding: 1rem;
}

.recipient-picker-header {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 0.9rem;
}

.selected-count {
  color: #075eb4;
  font-weight: 800;
  margin: -0.2rem 0 0.8rem;
}

.recipient-list {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 330px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.recipient-option {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  display: flex;
  gap: 0.7rem;
  margin: 0;
  padding: 0.8rem;
}

.recipient-option span,
.recipient-option small {
  display: block;
}

.recipient-option small {
  color: #637383;
  overflow-wrap: anywhere;
}

.DSM_Visitors-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.DSM_Visitors-form-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  grid-column: 1 / -1;
}

.DSM_Visitors-form-actions span {
  color: #637383;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

.detail-list {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: 160px minmax(0, 1fr);
  margin-bottom: 1.25rem;
}

.detail-list dt {
  color: #637383;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.detail-notes {
  border-top: 1px solid #d9e3ec;
  padding-top: 1rem;
}

.detail-notes h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.detail-notes pre {
  background: #f8fbfd;
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  color: #1d2a35;
  font-family: "Segoe UI", Arial, sans-serif;
  padding: 1rem;
  white-space: pre-wrap;
}

.member-list {
  display: grid;
  gap: 0.75rem;
}

.member-list article {
  border: 1px solid #e1e7ed;
  border-radius: 7px;
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
}

.member-list article div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  justify-content: space-between;
}

.member-list article span,
.member-list article small,
.member-list article p {
  color: #637383;
  margin: 0;
}

.dashboard-footer {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #c9d1d9;
  bottom: 0;
  color: #075eb4;
  display: flex;
  font-size: 0.9rem;
  justify-content: space-between;
  left: 0;
  min-height: 38px;
  padding: 0 1rem;
  position: fixed;
  right: 0;
}

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .dashboard-layout,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    margin-bottom: 90px;
  }

  .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .member-hero,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .member-hero {
    gap: 1.25rem;
    margin-left: -1rem;
    margin-right: -1rem;
    min-height: auto;
    padding: 2.75rem 1.5rem 3.75rem;
  }

  .member-hero h1 {
    font-size: 3rem;
    line-height: 1.03;
    margin-bottom: 1rem;
  }

  .member-hero .lead {
    font-size: 1.05rem;
    line-height: 1.55;
  }

  .member-hero__panel {
    align-self: stretch;
    box-shadow: none;
  }

  .hero-actions {
    margin-top: 1.35rem;
  }

  .portal-card {
    padding: 1.35rem;
  }

  .portal-alert {
    margin-top: 0;
  }

  .portal-action-grid {
    grid-template-columns: 1fr;
    margin: -1.5rem 0 2rem;
  }

  .portal-action-card {
    min-height: 170px;
  }

  .auth-shell {
    margin: 2rem auto;
  }

  .auth-copy h1 {
    font-size: 2.4rem;
  }

  .auth-card {
    padding: 1.35rem;
  }

  .form-grid,
  .form-section-grid,
  .metric-grid,
  .workflow-status-grid,
  .dashboard-activity-grid,
  .case-form,
  .case-form--wide,
  .summary-grid,
  .automation-grid,
  .email-template-menu,
  .email-template-layout,
  .event-form,
  .member-events-layout,
  .member-event-item,
  .Departments-layout,
  .followup-layout,
  .followup-form,
  .system-admin-form,
  .profile-details-grid,
  .member-add-form,
  .Departments-member-grid,
  .DSM_Visitors-form,
  .manual-escalation-form,
  .notification-compose-form,
  .template-grid,
  .recipient-picker-header,
  .recipient-list,
  .detail-layout,
  .qr-code-panel,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .admin-panel,
  .form-field,
  .member-add-form,
  .DSM_Visitors-form,
  .event-form,
  .system-admin-form,
  .case-form,
  .case-form--wide,
  .notification-compose-form,
  .manual-escalation-form,
  .template-form {
    min-width: 0;
    max-width: 100%;
  }

  .admin-panel {
    overflow-x: hidden;
  }

  .form-field,
  .form-field--full {
    grid-column: 1 / -1;
    width: 100%;
  }

  .form-control,
  .form-select,
  textarea,
  input,
  select {
    max-width: 100%;
    min-width: 0;
  }

  .DSM_Visitors-form-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .DSM_Visitors-form-actions > .btn,
  .DSM_Visitors-form-actions > button,
  .DSM_Visitors-form-actions > a,
  .member-add-form .btn,
  .member-add-form button {
    max-width: 100%;
    width: 100%;
  }

  .dashboard-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
    height: auto;
    padding: 0.8rem 1rem;
  }

  .dashboard-topbar .app-brand--image {
    max-width: min(260px, 78vw);
  }

  .dashboard-topbar .brand-logo {
    height: 40px;
  }

  .dashboard-topbar__tools {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    width: 100%;
  }

  .admin-portal-link {
    grid-column: 1 / -1;
    text-align: center;
  }

  .dashboard-logo {
    font-size: 1.12rem;
    line-height: 1.2;
    max-width: 100%;
  }

  .admin-name {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .help-button {
    padding: 0.5rem 0.8rem;
    white-space: nowrap;
  }

  .dashboard-tabs {
    display: none;
  }

  .admin-mobile-select {
    background: #d8ecfb;
    border-bottom: 1px solid #b9d0e4;
    display: block;
    padding: 0.85rem 1rem;
  }

  .admin-mobile-select label {
    color: #075eb4;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
  }

  .admin-mobile-select .form-select {
    background-color: #ffffff;
    color: #1d2a35;
    font-weight: 800;
    width: 100%;
  }

  .dashboard-shell {
    display: block;
  }

  .dashboard-sidebar {
    display: none;
  }

  .dashboard-main {
    max-width: 100vw;
    padding: 1.25rem 1rem 4rem;
  }

  .member-filter-grid {
    grid-template-columns: 1fr;
  }

  .role-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .member-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .verse-card {
    padding: 1.35rem;
  }

  .metric-card {
    min-height: 116px;
    padding: 1rem;
  }

  .metric-card span {
    overflow-wrap: anywhere;
  }

  .metric-card strong {
    font-size: 2.25rem;
  }

  .quick-actions a {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .quick-actions .action-icon {
    height: 42px;
    width: 42px;
  }

  .notification-dropdown {
    left: auto;
    min-width: min(340px, calc(100vw - 2rem));
    right: -4rem;
  }

  .notification-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-panel {
    padding: 1rem;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .datatable-toolbar {
    flex-wrap: wrap;
  }

  .table-responsive {
    overflow: visible;
  }

  .admin-table {
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    background: #ffffff;
    border: 1px solid #d9e3ec;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(18, 50, 82, 0.06);
    margin-bottom: 0.9rem;
    padding: 0.75rem;
  }

  .admin-table td {
    border: 0;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    padding: 0.45rem 0;
  }

  .admin-table td::before {
    color: #637383;
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .admin-table td[colspan] {
    grid-template-columns: 1fr;
  }

  .admin-table td[colspan]::before {
    margin-bottom: 0.35rem;
  }

  .admin-table td span {
    overflow-wrap: anywhere;
  }

  .audit-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .app-navbar .container {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
  }

  .app-brand {
  align-items: center;
  color: #075eb4;
  display: inline-flex;
  font-weight: 800;
  gap: 0.6rem;
  min-width: 0;
  white-space: normal;
}

  .brand-mark {
    flex: 0 0 auto;
  }

  .app-brand--image {
  max-width: min(340px, 48vw);
  padding-bottom: 0.35rem;
  padding-top: 0.35rem;
}

.brand-logo {
  display: block;
  height: 46px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.mobile-admin-action {
    display: block;
  }

  .desktop-admin-action {
    display: none;
  }

  .app-navbar .navbar-collapse {
    flex-basis: 100%;
  }

  .app-navbar .navbar-nav {
    padding-top: 0.75rem;
  }

  .app-navbar .nav-link {
    padding-left: 0;
  }

  .mobile-admin-action .btn {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .public-nav-actions {
    gap: 0.5rem;
  }

  .public-home-link {
    font-size: 0.88rem;
    margin-left: 0.5rem;
  }

  .account-state-button {
    font-size: 0.88rem;
    min-height: 40px;
    padding: 0.45rem 0.7rem;
  }

  .member-hero h1 {
    font-size: 2.55rem;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .section-heading h2,
  .auth-card h2,
  .admin-panel h2 {
    font-size: 1.3rem;
  }

  .dashboard-title-row h1 {
    font-size: 1.3rem;
  }

  .dashboard-topbar {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .dashboard-topbar .app-brand--image {
    max-width: min(230px, 84vw);
  }

  .dashboard-topbar .brand-logo {
    height: 36px;
  }

  .dashboard-topbar__tools {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .dashboard-topbar__tools form {
    grid-column: 1 / -1;
  }

  .dashboard-topbar__tools .help-button {
    width: 100%;
  }

  .breadcrumb-line {
    font-size: 1rem;
  }

  .dashboard-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 0.35rem;
    padding-top: 0.35rem;
  }
}

@media (max-width: 390px) {
  .app-brand {
  align-items: center;
  color: #075eb4;
  display: inline-flex;
  font-weight: 800;
  gap: 0.6rem;
  min-width: 0;
  white-space: normal;
}

  .brand-mark {
    height: 24px;
    width: 24px;
  }

  .brand-mark::after {
    height: 12px;
    left: 6px;
    top: 6px;
    width: 12px;
  }

  .mobile-admin-action .btn {
    font-size: 0.78rem;
  }

  .member-hero h1 {
    font-size: 2.15rem;
  }

  .member-hero {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .admin-table td {
    grid-template-columns: 1fr;
  }
}

.topbar-icon svg {
  display: block;
  height: 18px;
  width: 18px;
}

.topbar-icon svg path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.admin-profile-link svg path {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 820px) {
  .dashboard-topbar {
    align-items: center;
    flex-direction: row;
    gap: 0.55rem;
    height: 56px;
    min-height: 56px;
    padding: 0.4rem 0.75rem;
  }

  .dashboard-topbar .app-brand--image {
    flex: 1 1 auto;
    max-width: min(170px, 44vw);
    min-width: 0;
    padding: 0;
  }

  .dashboard-topbar .brand-logo {
    height: 32px;
    max-width: 100%;
  }

  .dashboard-topbar__tools {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.35rem;
    grid-template-columns: none;
    justify-content: flex-end;
    width: auto;
  }

  .admin-portal-link {
    display: none;
  }

  .dashboard-topbar__tools form {
    display: inline-flex;
    grid-column: auto;
    margin: 0;
  }

  .topbar-icon {
    border-radius: 7px;
    height: 30px;
    min-width: 30px;
    width: 30px;
  }

  .topbar-icon svg {
    height: 16px;
    width: 16px;
  }

  .admin-sticky-header.mobile-admin-select-hidden .admin-mobile-select {
    display: none;
  }

  .admin-mobile-select {
    padding: 0.55rem 0.75rem;
  }

  .admin-mobile-select label {
    font-size: 0.68rem;
    margin-bottom: 0.25rem;
  }

  .admin-mobile-select .form-select {
    min-height: 38px;
  }

  .notification-dropdown {
    min-width: min(320px, calc(100vw - 1rem));
    right: 0;
    top: 36px;
  }
}

@media (max-width: 575.98px) {
  .dashboard-topbar {
    padding: 0.35rem 0.55rem;
  }

  .dashboard-topbar .app-brand--image {
    max-width: min(150px, 42vw);
  }

  .dashboard-topbar .brand-logo {
    height: 30px;
  }

  .dashboard-topbar__tools {
    display: flex;
    grid-template-columns: none;
    width: auto;
  }

  .dashboard-topbar__tools form {
    grid-column: auto;
  }

  .topbar-icon {
    height: 29px;
    min-width: 29px;
    width: 29px;
  }
}



@keyframes siteDissolveIn {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.public-layout main {
  animation: siteDissolveIn 700ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .public-layout main {
    animation: none;
  }
}

.idle-session-warning {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 4000;
  display: none;
  align-items: center;
  gap: 18px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 16px 18px;
  color: #0c335b;
  background: #fff;
  border: 1px solid #bad3ea;
  border-left: 6px solid #ed1c24;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(12, 51, 91, 0.2);
}

.idle-session-warning.show {
  display: flex;
}

.idle-session-warning strong {
  display: block;
  margin-bottom: 4px;
}

.idle-session-warning p {
  margin: 0;
  color: #52687c;
}

@media (max-width: 640px) {
  .idle-session-warning {
    right: 16px;
    bottom: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
  }
}

.portal-action-card--business {
  background: linear-gradient(135deg, #0b5fb2 0%, #128b55 100%);
}

.business-directory-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
}

.business-card {
  background: #fff;
  border: 1px solid #cfdae5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.business-card__flyer {
  background: #edf3f7;
  display: block;
  height: 150px;
  overflow: hidden;
}

.business-card img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.business-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
}

.business-card h2 {
  font-size: 1.12rem;
  margin: 0;
}

.business-card p {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #52687c;
  display: -webkit-box;
  font-size: 0.92rem;
  margin: 0;
  overflow: hidden;
}

.business-card small {
  color: #637383;
  display: block;
  overflow-wrap: anywhere;
}

.business-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.business-flyer-preview {
  background: #edf3f7;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  max-width: 360px;
  overflow: hidden;
}

.business-flyer-preview img {
  display: block;
  height: 220px;
  object-fit: contain;
  width: 100%;
}

.business-detail {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
}

.business-detail__flyer {
  background: #edf3f7;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  overflow: hidden;
}

.business-detail__flyer img {
  display: block;
  max-height: 560px;
  object-fit: contain;
  width: 100%;
}

.business-detail__body h1 {
  overflow-wrap: anywhere;
}

.business-detail__body p {
  color: #52687c;
  line-height: 1.65;
  white-space: pre-line;
}

.table-thumb {
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  height: 64px;
  object-fit: cover;
  width: 96px;
}

.business-advert-form {
  display: grid;
  gap: 0.25rem;
  max-width: 680px;
}

.business-advert-form,
.business-advert-form * {
  box-sizing: border-box;
}

.business-advert-form input,
.business-advert-form textarea {
  max-width: 100%;
  width: 100%;
}

.business-advert-visibility {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  width: fit-content;
}

.business-advert-visibility .form-check-input {
  flex: 0 0 auto;
  height: 1.15rem;
  margin: 0;
  min-height: 0;
  width: 1.15rem;
}

.business-advert-visibility .form-check-label {
  margin: 0;
}

.form-field label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.password-input-shell {
    position: relative;
}

.password-input-shell .form-control {
    padding-right: 4.5rem;
}

.password-input-shell input::-ms-clear,
.password-input-shell input::-ms-reveal {
    display: none;
}

.password-visibility-toggle {
    background: transparent;
    border: 0;
    color: #075bb4;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.4rem 0.55rem;
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
    color: #003f82;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .portal-form-shell {
        margin: 1rem auto;
    }

    .portal-card {
        padding: 1rem;
    }

    .business-directory-grid {
        grid-template-columns: 1fr;
    }

    .business-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .business-card__flyer {
        height: 100%;
        min-height: 150px;
    }

    .business-detail {
        grid-template-columns: 1fr;
    }

    .business-detail__flyer img {
        max-height: 420px;
    }

    .business-advert-form {
        max-width: 100%;
    }
}

