:root {
  /*  Heritage Baptist Church Brand Palette  */
  --color-primary: #c69760;
  /* Heritage Mustard  — main accent */
  --color-primary-dark: #a87d4a;
  /* Mustard hover state */
  --color-gold: #9a865f;
  /* Heritage Gold */
  --color-dark-gold: #847153;
  /* Heritage Dark Gold */
  --color-beige: #c6b08d;
  /* Heritage Beige */
  --color-olive: #808e6b;
  /* Heritage Olive Green */
  --color-slate: #899cad;
  /* Heritage Slate Blue */
  --color-dark: #202222;
  /* Heritage Dark Grey — near black */
  --color-white: #ffffff;
  --color-background: #ffffff;
  --color-light: #f5f1eb;
  /* warm off-white — card backgrounds */
  --color-light-2: #ede8df;
  /* slightly deeper warm tint — borders */

  /*  Semantic aliases  */
  --color-secondary: var(--color-beige);
  --color-accent: var(--color-gold);
  --color-success: var(--color-olive);
  --color-warning: var(--color-primary);
  --color-danger: #b91c1c;

  /*  Typography  */
  --font-display: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;

  /*  Shadows  */
  --shadow-sm: 0 1px 4px rgba(32, 34, 34, 0.07);
  --shadow-md: 0 4px 16px rgba(32, 34, 34, 0.11);
  --shadow-lg: 0 10px 30px rgba(32, 34, 34, 0.16);

  /*  Transitions  */
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--color-background);
  color: var(--color-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* the wrapper div around <main>— grows to fill leftover space,
pushing footer down */

body > .container {
  flex: 1 0 auto;
}

header {
  flex-shrink: 0;
  height: 50px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.2;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary);
}
.navbar {
  background: var(--color-dark) !important;
  border-bottom: 3px solid var(--color-primary);
  box-shadow: 0 2px 20px rgba(32, 34, 34, 0.4);
  /* position:sticky was extensively diagnosed live (getComputedStyle on
     every ancestor, getBoundingClientRect while scrolling) and ruled out
     every documented cause of sticky failing — no overflow/transform/
     will-change/contain on any ancestor from nav up to html, top:0px
     computing correctly, html confirmed as the real scrolling container.
     Despite that, the measured position never clamped at 0 across an
     entire scroll session — it just tracked scroll distance like a
     normal static element the whole way. Since sticky should have
     worked per spec and empirically didn't, switched to fixed instead:
     it positions relative to the viewport directly, sidestepping
     whatever containing-block subtlety was actually happening, rather
     than continuing to chase an explanation. See header/main below for
     the flow-compensation this requires. */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1020;
}

/* nav is no longer in normal flow (position:fixed), so header's own
   height would otherwise collapse to 0 and the page's actual content
   would render underneath/behind the fixed nav bar. header's height
   above holds that space open; main-content's padding-top here pushes
   the actual content down to clear the fixed nav sitting on top of it.
   Replaces Bootstrap's pt-4 utility (used previously) — Bootstrap
   utilities are !important by design, so a plain CSS rule couldn't
   have overridden it to get the extra clearance needed here. */
.main-content {
  /* header (70px, above) already reserves the flow-space the fixed nav
     needs — this is just the small visual gap below it, roughly
     matching what Bootstrap's pt-4 (1.5rem) gave before. Previously
     90px here on top of header's 70px meant ~160px of empty space
     before content started, not the ~90px intended. */
  padding-top: 24px;
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--color-white) !important;
  margin-left: 0px;
}
/* Justify navlinks to right hand side of hte screen on screens bigger than mobile */
@media (min-width: 576px) {
  .nav-links .navbar-nav {
    justify-content: flex-end;
  }
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75) !important;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary) !important;
}
.nav-logo {
  width: 34px;
}

.hamburger {
  border: none;
  background: transparent;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.hamburger:focus {
  box-shadow: none;
  outline: none;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Animate into an X when the menu is open */
.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile dropdown panel styling */
@media (max-width: 575.98px) {
  .nav-links {
    background: var(--color-dark);
    padding: 1rem 0;
  }

  .nav-links .navbar-nav {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem;
  }
}

.btn-primary {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: var(--color-dark) !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 0.6rem 1.4rem;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--color-primary-dark) !important;
  border-color: var(--color-primary-dark) !important;
  color: var(--color-white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline variant */
.btn-outline-primary {
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-outline-primary:hover {
  background: var(--color-primary) !important;
  color: var(--color-dark) !important;
}

.btn-outline-secondary {
  border-color: var(--color-secondary) !important;
  color: var(--color-dark-gold) !important;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-outline-secondary:hover {
  background: var(--color-secondary) !important;
  border-color: var(--color-secondary) !important;
  color: var(--color-dark) !important;
}

.btn-logout {
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 1rem;
  text-transform: uppercase;
}

.btn-logout:hover {
  background: var(--color-primary) !important;
  color: var(--color-dark) !important;
}
/* Danger (delete) */
.btn-danger {
  background: var(--color-danger) !important;
  border-color: var(--color-danger) !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
}

.page-title {
  padding-top: 2rem;
  padding-bottom: 0.25rem;
}

/* Index Page */

/* Search bar wrapper — YouTube-style pill */
.search-bar-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 32rem;
  min-width: 12.5rem;
  height: 40px;
  border: 1.5px solid var(--color-primary-dark);
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-white);
  transition: var(--transition);
}

.search-bar-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(198, 151, 96, 0.2);
}

.search-bar-wrap .search-bar {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0 1rem;
}

.search-bar-wrap .search-bar:focus {
  border: none;
  box-shadow: none;
  outline: none;
}

.search-icon-btn {
  flex: 0 0 auto;
  height: 100%;
  padding: 0 1.1rem;
  border: none;
  border-left: 1.5px solid var(--color-primary-dark);
  background: var(--color-light);
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.search-icon-btn:hover {
  background: var(--color-primary);
  color: var(--color-light);
}

.select-wrap {
  position: relative;
  display: inline-block;
  max-width: 136px;
}

.select-wrap::after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  /* required for solid icons to render */
  content: "\f078";
  /* fa-chevron-down unicode */
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--color-dark);
  font-size: 0.75rem;
}

.member-list {
  list-style: none;
}
.member-list * {
  box-sizing: border-box;
}

.member-list--admin {
}

.member-list--index {
  margin-left: -2rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding-top: 2rem;
  gap: 1rem;
  /* space between cards, both directions */
}

.member-card {
  background: var(--color-white);
  border: 1px solid var(--color-light-2);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  padding: 0.25rem;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  cursor: pointer;
  position: relative;

  /* col-12: full width by default */
  flex: 0 0 100%;
  max-width: 100%;
}

.member-card-photo {
  flex: 0 0 33.333%;
  max-width: 33.333%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.member-card-photo img {
  width: 4.5rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}
.member-card-photo i {
  /* keep the fallback icon the same size as the image would be, for consistency */
  font-size: 4.5rem;
  color: var(--color-primary);
}

/* col-sm-6: ≥576px → 2 per row */
@media (min-width: 576px) {
  .member-card {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
  }
}

/* col-lg-3: ≥992px → 4 per row */
@media (min-width: 992px) {
  .member-card {
    flex: 0 0 calc(25% - 0.75rem);
    max-width: calc(25% - 0.75rem);
  }
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.member-card .card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-dark);
}

.member-name {
  text-transform: capitalize;
}

.member-card .card-subtitle {
  font-size: 0.82rem;
  color: var(--color-gold);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.member-card .card-text {
  font-size: 0.85rem;
  color: var(--color-dark);
  opacity: 0.8;
}

.member-card-info {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.75rem;
  font-size: medium;
}

/* Member modal */

.modal-content {
  border: none;
  border-radius: 0.5rem;
  overflow: hidden;
}

.modal-header {
  background: var(--color-dark);
  border-bottom: 3px solid var(--color-primary);
  padding: 1rem 1.5rem;
}

.modal-header .modal-title {
  color: var(--color-primary);
  font-weight: 600;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(2);
  opacity: 0.85;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.member-modal-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin-bottom: 1.25rem;
}

.member-modal-photo img {
  width: 100%;
  max-width: 16rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1rem;
}

.member-modal-photo i {
  /* keep the fallback icon the same size as the image would be, for consistency */
  width: 100%;
  max-width: 16rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  color: var(--color-primary);
  background: var(--color-light);
  border-radius: 1rem;
}

.family-group {
  margin-bottom: 4rem;
}

.family-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-top: 2px solid var(--color-primary);
  border-bottom: 2px dashed var(--color-beige);
}

.family-group-photo {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-light);
  border: 2px solid var(--color-light);
}

.family-group-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.family-group-photo i {
  font-size: 2rem;
  color: var(--color-dark);
}

.family-group-photo--clickable {
  position: relative;
  cursor: zoom-in;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.family-group-photo--clickable::after {
  content: "\f065";
  /* Font Awesome magnifying glass */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;

  position: absolute;
  top: 6.5px;
  right: 8px;

  width: 18px;
  height: 18px;

  border-radius: 50%;
  background: rgba(32, 34, 34, 0.8);
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 0.65rem;
  z-index: 2;
  pointer-events: none;
}

.family-group-photo--clickable:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.family-group-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: 0.02em;
  margin: 0;
}
.family-group-photo--unassigned {
  background: var(--color-light);
  border-color: var(--color-light-2);
}

.family-group-photo--unassigned i {
  color: var(--color-dark);
}

.family-photo-modal .modal-header {
  border-bottom: none;
  padding: 0.75rem 1rem;
}

.family-photo-modal .modal-title {
  font-size: 1rem;
}

.family-photo-modal .modal-dialog {
  max-width: 800px;
  width: 90vw;
  margin: 5vh auto;
  display: flex;
}

.family-photo-modal .modal-content {
  width: 100%;
  background: var(--color-dark);
  border: none;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
}

.family-photo-modal .modal-header {
  border-bottom: none;
  flex: 0 0 auto;
  padding: 0.75rem 1rem;
}

.family-photo-modal .modal-title {
  color: var(--color-primary);
  font-size: 1rem;
}

.family-photo-modal .modal-body {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.family-photo-full {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 0.25rem;
}

@media (max-width: 576px) {
  .family-photo-modal .modal-dialog {
    max-width: 100vw;
    width: 100vw;
    height: 100dvh;
    margin: 0;
  }

  .family-photo-modal .modal-content {
    border-radius: 0;
  }

  .family-photo-modal .modal-header {
    padding: 0.6rem 0.85rem;
  }

  .family-photo-full {
    max-height: 100%;
  }
}
.section-warm {
  background: var(--color-light);
  border: 1px solid var(--color-light-2);
  border-radius: 8px;
  padding: 1.5rem;
}

.section-dark {
  background: var(--color-dark);
  color: var(--color-white);
  border-radius: 8px;
  padding: 1.5rem;
}

.section-dark h2,
.section-dark h3 {
  color: var(--color-primary);
}
.form-control,
.form-select {
  border: 1.5px solid var(--color-light-2);
  border-radius: 4px;
  font-family: var(--font-body);
  color: var(--color-dark);
  background: var(--color-white);
  transition: var(--transition);
  border-color: var(--color-primary-dark);
}

input[type="date"] {
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.form-select {
  cursor: pointer;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary-dark);
  box-shadow: 0 0 0 3px rgba(198, 151, 96, 0.2);
  outline: none;
}

.form-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-dark);
  opacity: 0.75;
  margin-bottom: 0.3rem;
}
.alert-success {
  background: rgba(128, 142, 107, 0.15);
  /* olive tint */
  border-color: var(--color-olive);
  color: var(--color-dark);
  font-family: var(--font-body);
  border-radius: 4px;
}

.alert-danger {
  background: rgba(185, 28, 28, 0.08);
  border-color: var(--color-danger);
  color: var(--color-dark);
  border-radius: 4px;
}

.alert .btn-close {
  opacity: 0.5;
}

.alert .btn-close:hover {
  opacity: 1;
}
/* -------------------------- Admin Page ------------ */
.admin-card {
  background: var(--color-white);
  border: 1px solid var(--color-light-2);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  overflow: hidden;
}

.admin-card .card-header {
  background: var(--color-light);
  border-bottom: 2px solid var(--color-light-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dark);
  padding: 0.85rem 1.25rem;
}

.admin-card .card-body {
  padding: 1.25rem;
}

.admin-add-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.admin-card--editing {
  border: 2px solid var(--color-primary);
}

.admin-card--editing .card-header {
  background: var(--color-primary);
  color: var(--color-dark);
}
.form-field {
  display: flex;
  flex-direction: column;
}

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

@media (max-width: 575.98px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-light-2);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-dark);
}

.admin-list-item:last-child {
  border-bottom: none;
}

.admin-stat-card {
  background: var(--color-dark);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.admin-stat-value {
  color: var(--color-primary-dark);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.admin-stat-label {
  margin-top: 0.5rem;
  color: var(--color-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
}

.upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.upcoming-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-light-2);
}

.upcoming-list-item:last-child {
  border-bottom: none;
}

.upcoming-date {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.upcoming-icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-light-2);
  background: var(--color-white);
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.upcoming-icon-btn:hover {
  background: var(--color-primary);
  color: var(--color-light);
  border-color: var(--color-primary);
}

.upcoming-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-primary);
  color: var(--color-dark);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--color-white);
}

.upcoming-offcanvas {
  width: 360px;
}

.upcoming-offcanvas .offcanvas-header {
  background: var(--color-dark);
  border-bottom: 3px solid var(--color-primary);
}

.upcoming-offcanvas .offcanvas-title {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1rem;
}

.upcoming-offcanvas .btn-close {
  filter: invert(1) grayscale(100%) brightness(2);
}

.upcoming-modal-heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

/* Table */
.table {
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.table thead th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dark);
  opacity: 0.6;
  background: var(--color-light);
  border-bottom: 2px solid var(--color-light-2);
}

.table-hover tbody tr:hover {
  background: rgba(198, 151, 96, 0.06);
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.table-avatar-icon {
  font-size: 44px;
  color: var(--color-primary);
}
.login-page {
  min-height: 100vh;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("https://cpmfiles1.com/heritagebaptist.co.za/home-wallpaper.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  /* makes image lighter */
}

.login-container {
  position: relative;
  z-index: 1;
}
.login-header {
  background-color: var(--color-dark);
  padding: 2rem 2.5rem;
  text-align: center;
  border-radius: 8px 8px 0 0;
  margin: -2.5rem -2.5rem 2rem -2.5rem;
}

.login-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-beige);
  margin-bottom: 1rem;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--color-gold);
  opacity: 0.5;
}

.divider-ornament {
  color: var(--color-gold);
  font-size: 0.75rem;
}

.login-subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-white);
  opacity: 0.85;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.quote-author {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-gold);
  opacity: 0.8;
}

.login-card {
  background: var(--color-light);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 8px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
}

.login-card h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--color-dark);
  margin-bottom: 0.25rem;
}

.login-card .text-muted {
  font-size: 0.85rem;
  color: var(--color-gold) !important;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  z-index: 10;
  padding: 0.25rem;
}
/* Family name badge on member card */

.badge-family {
  margin-top: auto;
  padding-top: 0.35rem;
  align-self: flex-start;
  background: rgba(198, 151, 96, 0.15);
  color: var(--color-dark-gold);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  border: 1px solid rgba(198, 151, 96, 0.3);

  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Small circular role initial badge (E / D / M) */
.badge-role-circle {
  position: absolute;
  bottom: 1rem;
  right: 3rem;
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

/* Elder - dark/gold */
.badge-role-circle--elder {
  background: var(--color-dark);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

/* Deacon - gold */
.badge-role-circle--deacon {
  background: rgba(198, 151, 96, 0.9);
  color: var(--color-dark);
  border: 1px solid var(--color-primary);
}

/* Member - light */
.badge-role-circle--member {
  background: rgba(198, 151, 96, 0.15);
  color: var(--color-dark-gold);
  border: 1px solid rgba(198, 151, 96, 0.3);
}
/* Upcoming birthday/anniversary */
.badge-upcoming {
  width: 0.5rem;
  background: var(--color-primary);
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.25rem;
  border-radius: 20px;
}

.empty-state {
  width: 100%;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-dark);
  opacity: 0.7;
}

.empty-state i {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  display: block;
}

.empty-state p {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.alert {
  margin-top: 1.5rem;
}

.footer {
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  flex-shrink: 0;
}

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

.ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.ring .band {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 12px solid var(--color-dark);
}

.ring .diamond {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 0.25rem;
  height: 0.25rem;
  background: var(--color-dark);
}

/*  Global toast notifications   */
.app-toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.app-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: white;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  font-size: 13.5px;
  line-height: 1.4;
  border-left: 4px solid var(--dir-mustard);
  color: var(--dir-dark);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.app-toast--visible {
  opacity: 1;
  transform: translateX(0);
}

.app-toast--leaving {
  opacity: 0;
  transform: translateX(24px);
}

.app-toast--success { border-left-color: #4a8c5f; }
.app-toast--error   { border-left-color: #c0524a; }
.app-toast--info    { border-left-color: var(--dir-mustard); }

.app-toast-icon {
  margin-top: 1px;
  flex-shrink: 0;
  font-size: 15px;
}
.app-toast--success .app-toast-icon { color: #4a8c5f; }
.app-toast--error   .app-toast-icon { color: #c0524a; }
.app-toast--info    .app-toast-icon { color: var(--dir-mustard); }

.app-toast-message { flex: 1; }

.app-toast-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--dir-grey);
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
}
.app-toast-close:hover { color: var(--dir-dark); }

@media (max-width: 576px) {
  .app-toast-stack { left: 16px; right: 16px; max-width: none; }
}

/*  Global photo lightbox   */
.app-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0);
  align-items: center;
  justify-content: center;
  padding: 32px;
  transition: background 0.2s ease;
  cursor: zoom-out;
}
.app-lightbox--open { display: flex; }
.app-lightbox--visible { background: rgba(0, 0, 0, 0.85); }

.app-lightbox-img {
  max-width: min(90vw, 720px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: default;
}
.app-lightbox--visible .app-lightbox-img { opacity: 1; transform: scale(1); }

.app-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.app-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* Any photo that opens the lightbox gets this so it reads as clickable */
.lightbox-trigger { cursor: zoom-in; }

/*  Profile photo — click to view, camera badge to change   */
.profile-photo-wrap {
  position: relative;
  display: inline-block;
}
.profile-photo-camera-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: 3px solid #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease;
}
.profile-photo-camera-btn:hover { background: var(--color-primary-dark); }

/*  Phone number: country code + local number   */
.phone-input-group { display: flex; gap: 8px; }
.phone-input-group .phone-country-code { flex: 0 0 auto; width: 130px; }
.phone-input-group input[type="tel"] { flex: 1 1 auto; min-width: 0; }
