:root {
  --bg: #f4f1ea;
  --bg-2: #e7f0f1;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #51606b;
  --primary: #0f766e;
  --primary-strong: #0b4f4a;
  --accent: #f59e0b;
  --danger: #dc2626;
  --border: #d8e1e8;
  --shadow: rgba(15, 23, 42, 0.08);
  --discipleship-kgap: #0f766e;
  --discipleship-msk: #0284c7;
  --discipleship-dg1: #d97706;
  --discipleship-dg2: #7c3aed;
  --discipleship-dg3: #dc2626;
  --modal-max-height: 80dvh;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Noto Sans", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 420px at 8% -10%, #d8efe8 0%, transparent 60%),
    radial-gradient(900px 520px at 90% 0%, #f7e8d1 0%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.96));
  background-attachment: fixed;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.page-tree,
.page-tree-v2 {
  height: 100vh;
  overflow: hidden;
}

.page-tree .app-shell,
.page-tree .app-main,
.page-tree-v2 .app-shell,
.page-tree-v2 .app-main {
  height: 100%;
  overflow: hidden;
}

.page-tree .container,
.page-tree-v2 .container {
  height: 100%;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-discipleship-groups-list,
.page-discipleship-people-list,
.page-discipleship-table-scroll,
.page-dg_reports_recap {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-member-table-scroll {
  height: 100vh;
  overflow: hidden;
}

.page-members {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-member_completeness,
.page-member_families {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-member-families-scroll {
  height: 100vh;
  overflow: hidden;
}

.page-discipleship-groups-list .app-shell,
.page-discipleship-people-list .app-shell,
.page-discipleship-table-scroll .app-shell,
.page-dg_reports_recap .app-shell,
.page-discipleship-groups-list .app-main,
.page-discipleship-people-list .app-main,
.page-discipleship-table-scroll .app-main,
.page-dg_reports_recap .app-main {
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.page-member-table-scroll .app-shell,
.page-member-table-scroll .app-main {
  height: 100%;
  overflow: hidden;
}

.page-members .app-shell,
.page-members .app-main {
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.page-member_completeness .app-shell,
.page-member_completeness .app-main,
.page-member_families .app-shell,
.page-member_families .app-main {
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.page-member-families-scroll .app-shell,
.page-member-families-scroll .app-main {
  height: 100%;
  overflow: hidden;
}

.page-discipleship-dashboard .container,
.page-discipleship-groups-list .container,
.page-discipleship-people-list .container,
.page-discipleship-table-scroll .container,
.page-dg_reports_recap .container {
  min-height: 100%;
  height: auto;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}

.page-member-table-scroll .container {
  height: 100%;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-members .container {
  min-height: 100%;
  height: auto;
  overflow: visible;
}

.page-member_completeness .container,
.page-member_families .container {
  min-height: 100%;
  height: auto;
  overflow: visible;
}

.page-member-families-scroll .container {
  height: 100%;
  margin: 0 auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-discipleship-dashboard .container,
.page-discipleship-groups-list .container,
.page-discipleship-people-list .container,
.page-discipleship-table-scroll .container,
.page-dg_reports_recap .container,
.page-msk_classes .container,
.page-spiritual_journey .container,
.page-member-table-scroll .container,
.page-member-families-scroll .container {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.page-discipleship-groups-list .container > h1,
.page-discipleship-people-list .container > h1 {
  margin: 0;
}

.discipleship-page-head {
  margin-bottom: 8px;
}

.discipleship-page-head h1 {
  margin: 0;
}

.page-discipleship-groups-list .discipleship-list-card,
.page-discipleship-people-list .discipleship-list-card {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-discipleship-groups-list .discipleship-list-card .table-wrap,
.page-discipleship-people-list .discipleship-list-card .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}

.page-discipleship-table-scroll .table-card-plain {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-discipleship-table-scroll .table-card-plain .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.page-dg_reports_recap .dg-recap-section-card {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-dg_reports_recap .dg-recap-section-card > .table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.page-discipleship-groups-list .discipleship-list-card .table thead th,
.page-discipleship-people-list .discipleship-list-card .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 var(--border);
}

.page-discipleship-table-scroll .table-card-plain .table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.page-discipleship-groups-list .discipleship-list-card .dg-recap-pagination-row,
.page-discipleship-people-list .discipleship-list-card .dg-recap-pagination-row {
  margin-top: 10px;
}

.page-member-table-scroll .members-main-table {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-members .members-main-table {
  flex: 0 0 auto;
}

.page-member_completeness .member-completeness-main-table,
.page-member_families .member-families-main-table {
  flex: 0 0 auto;
}

.page-member-table-scroll .member-completeness-main-table {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-member-table-scroll .members-main-table .table-wrap {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: auto;
}

.page-member-table-scroll .member-completeness-main-table .table-wrap {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: auto;
}

.page-member-table-scroll .members-main-table .table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.page-member-table-scroll .member-completeness-main-table .table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.page-member-families-scroll .member-families-main-table {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-member-families-scroll .member-families-main-table .table-wrap {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: auto;
}

.page-member-families-scroll .member-families-main-table .table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.page-member_completeness.page-member-table-scroll,
.page-member_families.page-member-families-scroll {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.page-member_completeness.page-member-table-scroll .app-shell,
.page-member_completeness.page-member-table-scroll .app-main,
.page-member_families.page-member-families-scroll .app-shell,
.page-member_families.page-member-families-scroll .app-main {
  min-height: 100vh;
  height: auto;
  overflow: visible;
}

.page-member_completeness.page-member-table-scroll .container,
.page-member_families.page-member-families-scroll .container {
  min-height: 100%;
  height: auto;
  overflow: visible;
}

.page-member_completeness.page-member-table-scroll .member-completeness-main-table,
.page-member_families.page-member-families-scroll .member-families-main-table {
  flex: 0 0 auto;
}

.page-member-table-scroll .member-left-archive {
  margin-bottom: 0;
}

.page-member-table-scroll .member-left-archive .member-left-archive-wrap {
  height: 340px;
  max-height: 340px;
  overflow: auto;
}

.page-member-table-scroll .member-left-archive .member-left-archive-wrap .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  letter-spacing: 0.2px;
}

h1 {
  margin: 8px 0 20px;
  font-size: 28px;
}

h2 {
  margin: 0 0 8px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-toggle {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #0b1220, #111c2f);
  color: #e2e8f0;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-brand .brand {
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.6);
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.6);
}

.sidebar-nav,
.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-group summary {
  list-style: none;
  cursor: pointer;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  gap: 8px;
}

button.nav-item {
  width: 100%;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.nav-item.active {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #111827;
}

.nav-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nav-item .badge {
  font-size: 10px;
  padding: 3px 6px;
}

.chevron {
  font-size: 11px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-group[open] .chevron {
  transform: rotate(180deg);
}

.nav-sub {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 10px;
  padding-left: 8px;
  border-left: 1px dashed rgba(255, 255, 255, 0.12);
}

.nav-sub .nav-item {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 500;
}

.nav-sub .nav-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: #fbbf24;
}

.page-login .container {
  max-width: 420px;
  margin: 80px auto;
}

.page-public-links .container {
  max-width: 560px;
  margin: 56px auto;
}

.page-public-menu {
  background-color: #f3f7f9;
  background-image:
    radial-gradient(900px 420px at 8% -12%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(780px 420px at 92% -8%, rgba(245, 158, 11, 0.16), transparent 58%),
    linear-gradient(180deg, #f7fbfc 0%, #f6f2ea 100%);
}

.page-public-menu .container {
  max-width: 980px;
  margin: 30px auto 54px;
}

.public-menu-card {
  padding: 26px;
  border-radius: 20px;
  background:
    radial-gradient(340px 180px at -5% -12%, rgba(20, 184, 166, 0.18), transparent 72%),
    radial-gradient(320px 170px at 105% -8%, rgba(251, 191, 36, 0.14), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.09);
}

.page-dg-public .public-menu-card {
  max-width: 1160px;
  margin: 0 auto;
}

.public-menu-shell {
  display: grid;
  gap: 16px;
}

.public-menu-head {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.public-menu-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
}

.public-menu-brand img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.public-menu-brand h1 {
  display: none;
}

.public-menu-tagline {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: #1f2937;
}

.public-menu-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.public-menu-tile {
  grid-column: span 4;
  position: relative;
  min-height: 150px;
  border-radius: 16px;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95)),
    radial-gradient(170px 92px at 0% 100%, rgba(15, 118, 110, 0.1), transparent 74%);
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  padding: 16px 15px;
  gap: 7px;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.public-menu-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0f766e, #14b8a6, #f59e0b);
  opacity: 0.86;
}

.public-menu-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.46);
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.15);
}

.public-menu-tile-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #0d9488;
  font-weight: 700;
}

.public-menu-tile-title {
  display: block;
  font-weight: 700;
  font-size: clamp(20px, 1.85vw, 30px);
  line-height: 1.06;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: normal;
  overflow-wrap: break-word;
}

.public-menu-tile-title.is-long {
  font-size: clamp(18px, 1.6vw, 25px);
}

.public-menu-tile-title.is-xlong {
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.08;
}

.public-menu-tile:not(.is-primary) .public-menu-tile-title {
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.08;
}

.public-menu-tile-sub {
  display: block;
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.25px;
  color: #475569;
}

.public-menu-tile-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.public-menu-tile-cta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.14s ease;
}

.public-menu-tile:hover .public-menu-tile-cta svg {
  transform: translateX(1px);
}

.public-menu-tile:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.36);
  outline-offset: 1px;
}

.public-menu-tile.is-primary {
  grid-column: span 6;
  min-height: 200px;
  padding: 22px 20px;
  border-color: rgba(245, 158, 11, 0.46);
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 235, 0.94)),
    radial-gradient(170px 92px at 0% 100%, rgba(245, 158, 11, 0.18), transparent 74%);
}

.public-menu-tile.is-primary .public-menu-tile-title {
  font-size: clamp(26px, 2.2vw, 38px);
  line-height: 1.02;
}

.public-menu-tile.is-primary .public-menu-tile-title.is-long,
.public-menu-tile.is-primary .public-menu-tile-title.is-xlong {
  font-size: clamp(22px, 1.85vw, 32px);
  line-height: 1.04;
}

.public-menu-tile.is-primary .public-menu-tile-eyebrow {
  color: #b45309;
}

.public-menu-tile.is-primary .public-menu-tile-cta {
  color: #b45309;
  font-size: 15px;
}

.public-empty-card {
  max-width: 760px;
  margin: 36px auto 0;
  text-align: center;
}

.public-empty-card h2 {
  margin-bottom: 8px;
}

.public-empty-card p {
  margin-top: 0;
  color: var(--muted);
}

.public-material-card {
  max-width: 1020px;
  margin: 0 auto;
}

.public-material-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.public-material-head h2 {
  margin: 0;
}

.public-material-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.public-material-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
}

.public-material-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.public-material-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95)),
    radial-gradient(170px 92px at 0% 100%, rgba(15, 118, 110, 0.08), transparent 74%);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.public-material-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #0f766e, #14b8a6, #f59e0b);
  opacity: 0.84;
}

.public-material-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
}

.public-material-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.public-material-title {
  font-weight: 700;
  color: var(--text);
  font-size: 18px;
  line-height: 1.24;
  padding-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.public-material-ext {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.public-material-desc {
  color: #475569;
  font-size: 13px;
}

.public-material-meta {
  color: #64748b;
  font-size: 12px;
  letter-spacing: 0.1px;
}

.public-material-actions {
  margin-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.public-material-footer {
  margin-top: 14px;
}

.public-question-card,
.public-answer-results-card {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto 18px;
  box-sizing: border-box;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    radial-gradient(360px 180px at 0% 0%, rgba(20, 184, 166, 0.12), transparent 72%),
    radial-gradient(320px 160px at 100% 0%, rgba(245, 158, 11, 0.1), transparent 72%);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.public-question-card::before,
.public-answer-results-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #0f766e, #14b8a6, #f59e0b);
}

.public-question-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.74);
}

.public-question-kicker {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(240, 253, 250, 0.86);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-question-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.public-question-head p {
  margin: 0;
  max-width: 720px;
  color: #475569;
  line-height: 1.55;
}

.public-question-form.public-question-form {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.public-question-form .public-question-field {
  display: grid;
  gap: 8px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}

.public-question-field-full,
.public-question-password-panel {
  grid-column: 1 / -1;
}

.public-question-field input,
.public-question-field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.public-question-field input:focus,
.public-question-field textarea:focus {
  border-color: rgba(15, 118, 110, 0.62);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
  outline: none;
}

.public-question-form textarea {
  min-height: 190px;
  resize: vertical;
}

.public-question-password-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(240, 253, 250, 0.82), rgba(255, 251, 235, 0.52)),
    #fff;
}

.public-question-password-copy {
  display: grid;
  gap: 4px;
}

.public-question-password-copy strong {
  color: #0f172a;
  font-size: 15px;
}

.public-question-password-copy span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.public-question-password-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.public-answer-password-panel {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: end;
  min-width: 0;
}

.public-question-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid rgba(203, 213, 225, 0.62);
}

.public-question-actions .btn {
  min-height: 42px;
  justify-content: center;
  font-weight: 700;
}

.public-answer-results-head {
  margin-bottom: 12px;
}

.public-answer-list,
.difficult-question-admin-list {
  display: grid;
  gap: 14px;
}

.public-answer-item,
.difficult-question-admin-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.public-answer-item-head,
.difficult-question-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.public-answer-date,
.difficult-question-admin-head span,
.public-answer-response span,
.difficult-question-admin-answer span {
  color: #64748b;
  font-size: 12px;
}

.public-answer-question,
.difficult-question-admin-question {
  padding: 12px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.94);
  color: #0f172a;
  line-height: 1.58;
  white-space: normal;
}

.public-answer-response,
.difficult-question-admin-answer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(240, 253, 250, 0.72);
  color: #134e4a;
  line-height: 1.58;
}

@media (max-width: 720px) {
  .public-question-card,
  .public-answer-results-card {
    border-radius: 18px;
    padding: 18px;
  }

  .public-question-form.public-question-form,
  .public-question-password-fields,
  .public-answer-password-panel {
    grid-template-columns: 1fr;
  }

  .public-question-head h2 {
    font-size: clamp(25px, 8vw, 34px);
  }

  .public-question-form textarea {
    min-height: 170px;
  }

  .public-question-actions {
    align-items: stretch;
  }

  .public-question-actions .btn {
    width: 100%;
  }

  .public-answer-item-head {
    flex-direction: column;
  }
}

.difficult-question-admin-hero,
.difficult-question-admin-card {
  max-width: 1180px;
}

.difficult-question-admin-head > div {
  display: grid;
  gap: 4px;
}

.difficult-question-answer-form {
  gap: 10px;
}

.difficult-question-answer-form textarea {
  min-height: 130px;
}

.page-file-preview-standalone {
  background: #111827;
}

.page-file-preview-standalone .container {
  max-width: none;
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
}

.page-file-preview-standalone .file-page-embed {
  display: block;
  width: 100%;
  height: 100vh;
  border: 0;
  background: #111827;
}

.page-public-material-preview .container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.public-material-preview-shell {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #111827;
}

.public-material-native-pdf {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.public-material-native-pdf[hidden],
.public-material-pdfjs-viewer[hidden],
.public-material-pdfjs-status[hidden],
.public-material-pdfjs-fallback[hidden] {
  display: none !important;
}

.page-public-material-preview .file-page-embed.public-material-preview-embed {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.public-material-pdfjs-viewer {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 10px 18px;
  background: #f8fafc;
  -webkit-overflow-scrolling: touch;
}

.public-material-pdfjs-status,
.public-material-pdfjs-fallback {
  max-width: 720px;
  margin: 16px auto;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.public-material-pdfjs-fallback a {
  color: #0f766e;
  font-weight: 700;
}

.public-material-pdfjs-pages {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.public-material-pdfjs-page {
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.2);
}

.public-material-preview-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-top: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.16);
}

.public-material-journal-btn,
.public-material-feedback-btn {
  min-height: 44px;
  min-width: min(100%, 240px);
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .public-material-preview-actions {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .public-material-journal-btn,
  .public-material-feedback-btn {
    width: 100%;
  }
}

.page-public-links {
  background-color: #0b1220;
  background-image:
    linear-gradient(160deg, rgba(7, 13, 23, 0.72), rgba(7, 13, 23, 0.58)),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("public-bg-rec-kutisari.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.public-links-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 34px rgba(2, 8, 23, 0.3);
  backdrop-filter: blur(4px);
}

.public-links-head {
  text-align: center;
  margin-bottom: 16px;
}

.public-links-logo {
  margin-bottom: 10px;
}

.public-links-logo img {
  width: 84px;
  height: auto;
  display: inline-block;
}

.public-links-title {
  font-family: "Fraunces", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.public-links-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.public-links-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.public-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.public-link-preview {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: #f0fdfa;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.public-link-preview svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-link-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.public-link-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 14px 22px rgba(15, 23, 42, 0.12);
}

.public-link-item-title {
  font-weight: 700;
}

.public-link-item-desc {
  font-size: 13px;
  color: var(--muted);
}

.page-dg-public .container {
  max-width: 1080px;
}

.public-branch-select-card {
  padding: 24px;
}

.public-branch-head {
  margin-bottom: 18px;
}

.public-branch-title-row {
  margin-bottom: 10px;
  align-items: flex-start;
}

.public-branch-title-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.public-branch-title-wrap h2 {
  margin: 0;
}

.public-branch-subtitle {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.public-branch-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.public-branch-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25px;
}

.public-branch-divider {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.5);
  flex: 0 0 5px;
}

.public-branch-guide {
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.public-branch-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.public-branch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.public-branch-link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  min-height: 142px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 18px 17px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.public-branch-link-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  opacity: 0.86;
}

.public-branch-card-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #0f766e;
  font-weight: 700;
}

.public-branch-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
}

.public-branch-card-title {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.12;
  font-weight: 700;
  color: var(--text);
}

.public-branch-card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.public-branch-card-cta svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.14s ease;
}

.public-branch-link-card:hover .public-branch-card-cta svg {
  transform: translateX(1px);
}

.public-branch-link-card:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.36);
  outline-offset: 1px;
}

.public-branch-actions {
  margin-top: 22px;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .public-material-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .public-menu-tile {
    grid-column: span 1;
  }

  .public-menu-tile.is-primary {
    grid-column: span 1;
    min-height: 188px;
  }

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

@media (max-width: 640px) {
  .page-public-menu .container {
    margin: 20px auto 40px;
  }

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

  .public-menu-card {
    padding: 16px;
    border-radius: 18px;
  }

  .public-menu-tagline {
    font-size: 12px;
  }

  .public-menu-tile {
    grid-column: span 1;
    min-height: 148px;
    border-radius: 16px;
    padding: 14px 12px;
  }

  .public-menu-tile.is-primary {
    grid-column: span 2;
    min-height: 170px;
    padding: 18px 14px;
  }

  .public-material-item {
    padding: 12px 13px;
  }

  .public-material-list {
    grid-template-columns: 1fr;
  }

  .public-material-title {
    font-size: 16px;
  }

  .public-material-ext {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 10px;
  }

  .public-branch-select-card {
    padding: 18px;
  }

  .public-branch-subtitle {
    font-size: 13px;
  }

  .public-branch-divider {
    display: none;
  }

  .public-branch-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .public-branch-link-card {
    min-height: 124px;
    padding: 16px 15px;
  }
}

.public-social-wrap {
  margin-top: 12px;
  text-align: center;
}

.public-social-label {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.public-social-row {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.public-social-link {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1px;
  transition: color 0.14s ease, opacity 0.14s ease, text-decoration-color 0.14s ease;
  line-height: 1.2;
  opacity: 0.92;
}

.public-social-link:hover {
  color: #ffffff;
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.8);
}

.public-social-link.is-instagram {
  border: 0;
  background: transparent;
}

.public-social-link.is-youtube {
  border: 0;
  background: transparent;
}

.public-social-sep {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  display: inline-block;
  flex: 0 0 4px;
}

.page-public-menu .public-social-label {
  color: rgba(17, 24, 39, 0.65);
}

.page-dg-public .public-social-label {
  color: rgba(17, 24, 39, 0.65);
}

.page-public-menu .public-social-link {
  color: rgba(17, 24, 39, 0.86);
}

.page-dg-public .public-social-link {
  color: rgba(17, 24, 39, 0.86);
}

.page-public-menu .public-social-link:hover {
  color: #111827;
  text-decoration-color: rgba(17, 24, 39, 0.58);
}

.page-dg-public .public-social-link:hover {
  color: #111827;
  text-decoration-color: rgba(17, 24, 39, 0.58);
}

.page-public-menu .public-social-sep {
  background: rgba(17, 24, 39, 0.35);
}

.page-dg-public .public-social-sep {
  background: rgba(17, 24, 39, 0.35);
}

.public-login-fab {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.35);
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
  z-index: 30;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.public-login-fab-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
}

.public-login-fab-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-login-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.3);
}

.login-card {
  padding: 24px;
}

.login-head {
  margin-bottom: 12px;
}

.login-title {
  font-family: "Fraunces", serif;
  font-size: 24px;
  font-weight: 700;
}

.login-sub {
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  grid-template-columns: 1fr;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.topbar {
  background: linear-gradient(120deg, #0b1220, #111c2f);
  color: #f8fafc;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  color: #e2e8f0;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.container {
  max-width: 1200px;
  margin: 32px auto 64px;
  padding: 0 28px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 14px 30px var(--shadow);
}

.card.table-card-plain {
  --plain-table-border: rgba(148, 163, 184, 0.42);
  --plain-table-head-bg: linear-gradient(180deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.86));
  --plain-table-row-odd: rgba(255, 255, 255, 0.22);
  --plain-table-row-even: rgba(255, 255, 255, 0.12);
  --plain-table-row-hover: rgba(15, 118, 110, 0.14);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.stats.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 6px;
}

.stat {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.stats.compact .stat {
  min-height: 128px;
  padding: 16px 14px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.stat-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.stats .stat {
  --stat-accent: #0f766e;
  --stat-glow: rgba(15, 118, 110, 0.14);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: start;
  text-align: center;
  gap: 6px;
  min-height: 146px;
  padding: 18px 16px;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats .stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.11);
}

.stats .stat::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--stat-accent), #ffffff);
}

.stats .stat::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -58px;
  top: -74px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--stat-glow) 0%, rgba(255, 255, 255, 0) 72%);
  pointer-events: none;
}

.stats .stat:nth-child(1) {
  --stat-accent: #0284c7;
  --stat-glow: rgba(2, 132, 199, 0.18);
}

.stats .stat:nth-child(2) {
  --stat-accent: #0f766e;
  --stat-glow: rgba(15, 118, 110, 0.16);
}

.stats .stat:nth-child(3) {
  --stat-accent: #d97706;
  --stat-glow: rgba(217, 119, 6, 0.17);
}

.stats .stat:nth-child(4) {
  --stat-accent: #16a34a;
  --stat-glow: rgba(22, 163, 74, 0.16);
}

.stats .stat:nth-child(5) {
  --stat-accent: #dc2626;
  --stat-glow: rgba(220, 38, 38, 0.14);
}

.stats .stat-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #64748b;
}

.stats .stat-value {
  align-self: center;
  margin-top: 2px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-size: clamp(32px, 2.1vw, 42px);
  overflow-wrap: normal;
  text-wrap: balance;
  color: #0f172a;
}

.stats .stat-value.stat-value-with-target {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0;
}

.stats .stat-value.stat-value-with-target .stat-current {
  font-size: 1em;
  font-weight: 800;
  color: #0f172a;
}

.stats .stat-value.stat-value-with-target .stat-divider {
  font-size: 0.72em;
  font-weight: 700;
  color: #94a3b8;
  transform: translateY(-1px);
}

.stats .stat-value.stat-value-with-target .stat-target {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1;
  color: #64748b;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  padding: 7px 12px;
  transform: translateY(-1px);
}

.stats .stat-sub.stat-sub-target {
  margin-top: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #94a3b8;
}

.stats .stat-sub {
  align-self: end;
  margin-top: 0;
  font-size: 13px;
  color: #475569;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.table th {
  background: #f8fafc;
  font-weight: 600;
}

.table tr.row-highlight td {
  background: rgba(15, 118, 110, 0.08);
}

.card.table-card-plain .table-wrap {
  position: relative;
  max-height: min(68vh, 760px);
  overflow: auto;
  border: 1px solid var(--plain-table-border);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.46), rgba(241, 245, 249, 0.26));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    0 10px 22px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card.table-card-plain .table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.card.table-card-plain .table-wrap::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

.card.table-card-plain .table-wrap::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.55);
  border-radius: 999px;
}

.card.table-card-plain .table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(51, 65, 85, 0.7);
}

.card.table-card-plain .table {
  border-collapse: separate;
  border-spacing: 0;
}

.card.table-card-plain .table th,
.card.table-card-plain .table td {
  padding: 11px 12px;
  border-bottom-color: rgba(148, 163, 184, 0.34);
}

.card.table-card-plain .table th {
  background: var(--plain-table-head-bg);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.card.table-card-plain .table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.card.table-card-plain .table thead th:first-child {
  border-top-left-radius: 14px;
}

.card.table-card-plain .table thead th:last-child {
  border-top-right-radius: 14px;
}

.card.table-card-plain .table tbody tr:nth-child(odd) td {
  background: var(--plain-table-row-odd);
}

.card.table-card-plain .table tbody tr:nth-child(even) td {
  background: var(--plain-table-row-even);
}

.card.table-card-plain .table tbody tr:hover td {
  background: var(--plain-table-row-hover);
}

.card.table-card-plain .table tbody tr.row-highlight td {
  background: rgba(15, 118, 110, 0.18);
}

.card.table-card-plain .table tbody tr:last-child td {
  border-bottom: 0;
}

.card.table-card-plain .table tbody td:first-child {
  font-weight: 600;
  color: #0f172a;
}

.card.table-card-plain .table td.actions {
  white-space: nowrap;
}

.page-discipleship-groups-list .discipleship-list-card.table-card-plain .table thead th,
.page-discipleship-people-list .discipleship-list-card.table-card-plain .table thead th {
  background: var(--plain-table-head-bg);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.4);
}

.page-member-table-scroll .members-main-table .table-wrap,
.page-member-table-scroll .member-completeness-main-table .table-wrap,
.page-member-families-scroll .member-families-main-table .table-wrap {
  max-height: none;
  height: 100%;
}

.page-members .members-main-table .table-wrap {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.page-member_completeness.page-member-table-scroll .member-completeness-main-table .table-wrap,
.page-member_families.page-member-families-scroll .member-families-main-table .table-wrap,
.page-member_completeness .member-completeness-main-table .table-wrap,
.page-member_families .member-families-main-table .table-wrap {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.page-member_birthdays .table-card-plain .table-wrap {
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

.journey-name-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.journey-name-main {
  font-weight: 600;
}

.journey-name-badges,
.journey-inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#spiritual-journey-table td.actions {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

#spiritual-journey-table td.actions > * {
  margin-right: 0;
}

#spiritual-journey-table {
  table-layout: fixed;
  margin: 0 auto;
}

#spiritual-journey-table .journey-col-name {
  width: 30%;
}

#spiritual-journey-table .journey-col-track {
  width: 70%;
}

#spiritual-journey-table th,
#spiritual-journey-table td {
  vertical-align: middle;
}

#spiritual-journey-table th:not(:first-child),
#spiritual-journey-table td:not(:first-child) {
  text-align: center;
}

#spiritual-journey-table .journey-inline-badges {
  justify-content: center;
  flex-wrap: wrap;
}

#spiritual-journey-table .journey-inline-badges .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

#spiritual-journey-table td.actions > .btn {
  margin: 0;
}

@media (max-width: 900px) {
  #spiritual-journey-table {
    table-layout: auto;
    min-width: 760px;
  }

  #spiritual-journey-table .journey-col-name,
  #spiritual-journey-table .journey-col-track {
    width: auto;
  }

#spiritual-journey-table th,
#spiritual-journey-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

#spiritual-journey-table .journey-col-track,
#spiritual-journey-table td:nth-child(2),
#spiritual-journey-table th:nth-child(2) {
  text-align: center;
}

#spiritual-journey-table .journey-col-name,
#spiritual-journey-table td:nth-child(1),
#spiritual-journey-table th:nth-child(1) {
  text-align: left;
}

  #spiritual-journey-table .journey-inline-badges {
    justify-content: flex-start;
  }

  #spiritual-journey-table td.actions {
    white-space: normal;
  }
}

.page-member-families .member-family-tools {
  align-items: center;
  gap: 8px;
}

.page-member-completeness .container {
  gap: 10px;
}

.page-member-completeness .discipleship-page-head {
  margin-bottom: 0;
}

.page-member-completeness .member-completeness-filter-form {
  gap: 8px;
}

.member-completeness-filter-select {
  width: 220px;
  min-width: 180px;
}

.member-completeness-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.member-completeness-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.page-member-families #member-families-table th {
  white-space: nowrap;
}

.member-family-note-strong {
  font-weight: 700;
  color: var(--text);
}

.member-family-divider td {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

.member-family-row.is-linked {
  background: linear-gradient(90deg, rgba(209, 250, 229, 0.45), transparent 46%);
}

.member-family-row.is-single {
  background: linear-gradient(90deg, rgba(229, 231, 235, 0.5), transparent 46%);
}

.member-family-index {
  color: var(--muted);
  font-weight: 700;
}

.member-family-title {
  font-weight: 700;
}

.member-family-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 700;
}

.member-family-members,
.member-family-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-family-member,
.member-family-contact {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  background: #f0fdfa;
  color: #0b4f4a;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
  font-weight: 600;
}

.member-family-contact {
  border-color: rgba(59, 130, 246, 0.28);
  background: #eff6ff;
  color: #1e3a8a;
}

a.member-family-member.note-link,
a.member-family-contact.note-link {
  text-decoration: none;
}

a.member-family-member.note-link {
  color: #0b4f4a;
}

a.member-family-contact.note-link {
  color: #1e3a8a;
}

.member-family-member:hover,
.member-family-contact:hover {
  filter: brightness(0.98);
}

a.member-family-member.note-link:hover,
a.member-family-contact.note-link:hover {
  text-decoration: none;
}

.member-family-empty {
  color: var(--muted);
}

.note-link {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 600;
}

.note-link:hover {
  text-decoration: underline;
}

button.note-link.member-inline-trigger,
button.note-link.member-photo-preview-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.member-photo-current {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.member-photo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-photo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.member-photo-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.form-grid.worship-attendance-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

.form-grid label,
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.form-row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

input,
select,
textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--primary);
}

.form-grid label.check-label,
.form-row label.check-label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.dg-checklist {
  margin: 0;
  padding: 14px 14px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dg-panel {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dg-checklist label.check-label {
  font-weight: 500;
  line-height: 1.45;
  align-items: flex-start;
}

.dg-checklist label.check-label input[type="checkbox"] {
  margin-top: 2px;
  flex: 0 0 auto;
}

.dg-checklist.msk-session-checklist {
  gap: 10px;
}

.msk-session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px 12px;
}

.dg-checklist.msk-session-checklist label.check-label {
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  background: rgba(255, 255, 255, 0.92);
}

.dg-checklist.msk-session-checklist label.check-label input[type="checkbox"] {
  margin-top: 0;
}

.dg-rating {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dg-rating-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dg-rating-hint {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.dg-rating-hint span:last-child {
  text-align: right;
}

.dg-rating-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.dg-rating-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.dg-rating-option input[type="radio"] {
  margin: 0;
}

.dg-rating-option span {
  line-height: 1;
}

.dg-absence-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dg-absence-reason {
  margin-top: 4px;
}

.form-grid label.dg-question,
.dg-question {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: #000000;
}

.dg-checklist legend,
.dg-rating legend,
.dg-section-title {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: #000000;
  padding: 0;
}

.question-label {
  display: inline-block;
}

.required-mark {
  color: #dc2626;
}

.dg-question select,
.dg-question input,
.dg-question textarea {
  font-weight: 400;
}

.public-dg-report-card > .card-row {
  margin-bottom: 14px;
  align-items: flex-start;
}

.public-dg-report-card > .card-row h2 {
  margin: 0;
  line-height: 1.08;
}

.form-grid.dg-public-report-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.form-grid.dg-public-report-form > * {
  min-width: 0;
}

.form-grid.dg-public-report-form .dg-panel,
.form-grid.dg-public-report-form .dg-checklist,
.form-grid.dg-public-report-form .dg-rating {
  min-height: 0;
}

.form-grid.dg-public-report-form .dg-section-absence,
.form-grid.dg-public-report-form .dg-section-quality,
.form-grid.dg-public-report-form .dg-section-sharing,
.form-grid.dg-public-report-form .dg-section-sharer {
  align-self: stretch;
}

.form-grid.dg-public-report-form .dg-section-sharing .dg-rating-body {
  flex: 1;
  justify-content: center;
}

.form-grid.dg-public-report-form .dg-section-sharing .dg-rating-scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(100%, 286px);
  margin: 0 auto;
}

.form-grid.dg-public-report-form .dg-section-sharing .dg-rating-option {
  flex: 0 0 min(64px, calc((100% - 30px) / 4));
  max-width: min(64px, calc((100% - 30px) / 4));
  min-height: 72px;
  flex-direction: column;
  gap: 8px;
  padding: 10px 4px;
}

.form-grid.dg-public-report-form .panel-note {
  margin: 0;
  line-height: 1.45;
}

.form-grid.dg-public-report-form .dg-section-absence textarea,
.form-grid.dg-public-report-form .dg-section-notes textarea {
  min-height: 116px;
}

.form-grid.dg-public-report-form .dg-section-notes,
.form-grid.dg-public-report-form .dg-section-photo {
  grid-column: span 2;
  align-self: stretch;
  min-height: 220px;
}

.form-grid.dg-public-report-form .dg-section-notes textarea,
.form-grid.dg-public-report-form .dg-section-photo .dg-upload-field {
  flex: 1;
  width: 100%;
  min-height: 150px;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 12px;
  background: #ffffff;
}

.form-grid.dg-public-report-form .dg-section-photo {
  gap: 12px;
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-field {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.94));
  text-align: center;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-field:hover {
  border-color: rgba(15, 118, 110, 0.44);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-field.has-value {
  border-color: rgba(15, 118, 110, 0.42);
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.98), rgba(236, 253, 245, 0.96));
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-field.is-disabled {
  opacity: 0.72;
  box-shadow: none;
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #1d8f84);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-meta {
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  word-break: break-word;
}

.form-grid.dg-public-report-form .dg-section-photo .dg-upload-hint {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.form-grid.dg-public-report-form .dg-section-photo input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.form-grid.dg-public-report-form .dg-section-photo input[type="file"]:disabled {
  cursor: not-allowed;
}

.form-grid.dg-public-report-form .dg-form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.form-grid.dg-public-report-form .dg-form-actions .btn {
  min-width: 156px;
  justify-content: center;
}

@media (max-width: 1100px) {
  .form-grid.dg-public-report-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid.dg-public-report-form .dg-section-notes,
  .form-grid.dg-public-report-form .dg-section-photo {
    grid-column: span 1;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-body {
    justify-content: flex-start;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 0;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-option {
    flex: initial;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .form-grid.dg-public-report-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-grid.dg-public-report-form .dg-section-notes,
  .form-grid.dg-public-report-form .dg-section-photo {
    grid-column: span 1;
  }

  .form-grid.dg-public-report-form .dg-form-actions {
    padding-top: 8px;
    margin-top: 0;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-body {
    justify-content: flex-start;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-hint {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-hint span:last-child {
    text-align: right;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin: 0;
  }

  .form-grid.dg-public-report-form .dg-section-sharing .dg-rating-option {
    flex: initial;
    max-width: none;
    min-height: 68px;
    gap: 6px;
    padding: 9px 4px;
  }
}

.form-grid label.dg-member-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
  margin: 0;
}

.form-grid label.dg-member-item input[type="checkbox"] {
  margin-top: 2px;
  flex: 0 0 auto;
}

.public-feedback-card > .public-feedback-head {
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.public-feedback-card h2 {
  margin: 0;
  line-height: 1.08;
}

.public-feedback-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.form-grid.public-member-feedback-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.form-grid.public-member-feedback-form > * {
  min-width: 0;
}

.public-feedback-group-meta {
  min-height: 44px;
  align-self: stretch;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.public-feedback-section {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: #f8fafc;
}

.public-feedback-section-head {
  margin-bottom: 14px;
}

.public-feedback-section-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.public-feedback-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.public-feedback-rating {
  background: #ffffff;
}

.public-feedback-rating legend {
  min-height: 36px;
}

.public-feedback-rating .dg-rating-scale {
  gap: 6px;
}

.public-feedback-rating .dg-rating-option {
  min-height: 42px;
  padding: 7px 3px;
  border-radius: 8px;
}

.public-feedback-rating.is-scale-5 .dg-rating-scale {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 420px;
}

.public-feedback-hint.has-middle {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.public-feedback-hint.has-middle span:nth-child(2) {
  text-align: center;
}

.public-feedback-note {
  grid-column: span 2;
  min-height: 150px;
}

.public-feedback-note textarea {
  min-height: 96px;
}

.public-feedback-optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.public-feedback-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.public-feedback-actions .btn {
  min-width: 132px;
  justify-content: center;
}

@media (max-width: 860px) {
  .form-grid.public-member-feedback-form,
  .public-feedback-section-grid {
    grid-template-columns: 1fr;
  }

  .public-feedback-note {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .public-feedback-card > .public-feedback-head {
    gap: 10px;
  }

  .public-feedback-section {
    padding: 12px;
  }

  .public-feedback-section-head h3 {
    font-size: 16px;
  }

  .public-feedback-rating .dg-rating-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .public-feedback-rating .dg-rating-option {
    min-height: 40px;
  }

  .public-feedback-hint.has-middle {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .public-feedback-hint.has-middle span,
  .public-feedback-hint.has-middle span:last-child,
  .public-feedback-hint.has-middle span:nth-child(2) {
    text-align: left;
  }

  .public-feedback-actions {
    justify-content: stretch;
  }

  .public-feedback-actions .btn {
    width: 100%;
  }
}

.dg-recap-table td {
  vertical-align: top;
}

.dg-recap-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(380px 180px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.dg-recap-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-dg1) 72%, white) 46%, var(--discipleship-dg3) 100%);
}

.dg-recap-hero-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.dg-recap-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.dg-recap-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dg-recap-hero-copy h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.dg-recap-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.dg-recap-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  width: min(100%, 420px);
}

.dg-recap-hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 213, 225, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dg-recap-hero-stat-action {
  cursor: pointer;
  text-align: left;
  border-color: color-mix(in srgb, var(--discipleship-kgap) 24%, white);
  background:
    radial-gradient(140px 80px at 100% 0%, color-mix(in srgb, var(--discipleship-kgap) 12%, white), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--discipleship-kgap) 8%, white), rgba(255, 255, 255, 0.96));
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.dg-recap-hero-stat-action:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--discipleship-kgap) 38%, white);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.16);
}

.dg-recap-hero-stat-action .dg-recap-subtext {
  display: block;
  margin-top: 8px;
  color: color-mix(in srgb, var(--discipleship-kgap) 70%, #334155);
}

.dg-recap-hero-stat-action .dg-recap-hero-stat-label,
.dg-recap-hero-stat-action .dg-recap-hero-stat-value {
  color: var(--discipleship-kgap);
}

.dg-recap-hero-tools {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.88);
  justify-content: flex-end;
}

.dg-recap-hero-search-wrap {
  width: min(100%, 440px);
  margin-left: auto;
}

.dg-recap-hero-tools .dg-recap-summary-search {
  width: 100%;
}

.dg-recap-calendar-modal-card {
  width: min(920px, 94vw);
  height: min(var(--modal-max-height), 760px);
  max-height: var(--modal-max-height);
}

.dg-recap-calendar-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.dg-recap-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dg-recap-calendar-toolbar-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.dg-recap-calendar-toolbar .btn.dg-recap-calendar-month-report-btn {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--discipleship-kgap) 18%, white), color-mix(in srgb, var(--discipleship-kgap) 10%, white));
  color: var(--discipleship-kgap);
  border: 1px solid color-mix(in srgb, var(--discipleship-kgap) 26%, white);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.1);
  white-space: nowrap;
}

.dg-recap-calendar-toolbar .btn.dg-recap-calendar-month-report-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--discipleship-kgap) 24%, white), color-mix(in srgb, var(--discipleship-kgap) 14%, white));
  border-color: color-mix(in srgb, var(--discipleship-kgap) 38%, white);
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.14);
}

.dg-recap-calendar-toolbar .btn.dg-recap-calendar-month-report-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--discipleship-kgap) 34%, white);
  outline-offset: 2px;
}

.dg-recap-calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dg-recap-calendar-nav-title {
  min-width: 220px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
}

.dg-recap-calendar-nav-title:hover {
  color: var(--discipleship-kgap);
}

.dg-recap-calendar-nav-title:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--discipleship-kgap) 36%, white);
  outline-offset: 4px;
  border-radius: 10px;
}

.dg-recap-calendar-month-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dg-recap-calendar-nav-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}

.dg-recap-calendar-nav-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.dg-recap-calendar-legend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.dg-recap-calendar-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--discipleship-kgap);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--discipleship-kgap) 14%, white);
}

.dg-recap-calendar-panels {
  flex: 1 1 auto;
  min-height: 0;
}

.dg-recap-calendar-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dg-recap-calendar-panel.is-hidden {
  display: none;
}

.dg-recap-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.dg-recap-calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.dg-recap-calendar-grid-body {
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
  grid-template-rows: repeat(6, minmax(0, 1fr));
}

.dg-recap-calendar-day {
  min-height: 0;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  align-content: start;
  gap: 5px;
  overflow: hidden;
}

button.dg-recap-calendar-day {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

button.dg-recap-calendar-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.12);
}

button.note-link.dg-recap-photo-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.dg-recap-calendar-day.is-empty {
  background: rgba(248, 250, 252, 0.55);
}

.dg-recap-calendar-day.has-report {
  border-color: color-mix(in srgb, var(--discipleship-kgap) 22%, white);
  background: linear-gradient(180deg, color-mix(in srgb, var(--discipleship-kgap) 8%, white), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dg-recap-calendar-day-number {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.dg-recap-calendar-day-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 10px;
  font-weight: 800;
}

.dg-recap-calendar-day-meta {
  font-size: 10px;
  line-height: 1.35;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .dg-recap-calendar-toolbar {
    align-items: stretch;
  }

  .dg-recap-calendar-toolbar-side {
    justify-content: flex-start;
  }

  .dg-recap-calendar-toolbar .btn.dg-recap-calendar-month-report-btn {
    justify-content: center;
  }

  .dg-recap-calendar-nav {
    width: 100%;
    justify-content: space-between;
  }

  .dg-recap-calendar-nav-title {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 16px;
  }

  .dg-recap-calendar-grid {
    gap: 4px;
  }

  .dg-recap-calendar-weekday {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .dg-recap-calendar-day {
    padding: 6px 4px;
    border-radius: 12px;
    gap: 4px;
    justify-items: center;
    align-content: start;
  }

  .dg-recap-calendar-day-number {
    width: 100%;
    text-align: center;
    font-size: 11px;
    line-height: 1.1;
  }

  .dg-recap-calendar-day-count {
    min-height: 18px;
    padding: 2px 5px;
    font-size: 9px;
    line-height: 1;
  }

  .dg-recap-calendar-day-meta {
    display: none;
  }
}

.dg-recap-hero-stat-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dg-recap-hero-stat-value {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.dg-recap-section-card {
  overflow: hidden;
}

.dg-recap-section-head {
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.dg-recap-section-head h2 {
  margin: 0;
}

.dg-recap-section-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.dg-recap-summary-search {
  width: 100%;
}

.dg-recap-main-cell {
  display: grid;
  gap: 6px;
}

.dg-recap-main-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.dg-recap-number-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #334155;
  font-weight: 800;
}

.dg-recap-number-chip.is-accent {
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
}

.dg-recap-report-trigger {
  cursor: pointer;
  border: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.dg-recap-report-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.14);
}

.dg-recap-report-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--discipleship-kgap) 56%, white);
  outline-offset: 2px;
}

.dg-recap-group-report-modal-card {
  width: min(1080px, 94vw);
  height: min(var(--modal-max-height), 860px);
  max-height: var(--modal-max-height);
}

.dg-recap-group-report-modal-card .modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.dg-recap-group-report-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 18px;
  overflow: auto;
}

.dg-recap-group-report-table {
  table-layout: fixed;
  min-width: 1460px;
}

.dg-recap-group-report-table th {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.dg-recap-group-report-table th,
.dg-recap-group-report-table td {
  white-space: normal;
  vertical-align: top;
}

.dg-recap-group-report-table th:nth-child(1),
.dg-recap-group-report-table td:nth-child(1) { width: 11%; }

.dg-recap-group-report-table th:nth-child(2),
.dg-recap-group-report-table td:nth-child(2) { width: 11%; }

.dg-recap-group-report-table th:nth-child(3),
.dg-recap-group-report-table td:nth-child(3) { width: 13%; }

.dg-recap-group-report-table th:nth-child(4),
.dg-recap-group-report-table td:nth-child(4) { width: 10%; }

.dg-recap-group-report-table th:nth-child(5),
.dg-recap-group-report-table td:nth-child(5) { width: 14%; }

.dg-recap-group-report-table th:nth-child(6),
.dg-recap-group-report-table td:nth-child(6) { width: 13%; }

.dg-recap-group-report-table th:nth-child(7),
.dg-recap-group-report-table td:nth-child(7) { width: 8%; }

.dg-recap-group-report-table th:nth-child(8),
.dg-recap-group-report-table td:nth-child(8) { width: 12%; }

.dg-recap-group-report-table th:nth-child(9),
.dg-recap-group-report-table td:nth-child(9) { width: 10%; }

.dg-recap-group-report-table th:nth-child(10),
.dg-recap-group-report-table td:nth-child(10) { width: 12%; }

.dg-recap-group-report-table .dg-recap-main-title {
  font-size: 15px;
  line-height: 1.4;
}

.dg-recap-group-report-table .dg-recap-number-chip {
  min-width: 72px;
}

.dg-recap-stage-badge,
.dg-recap-stage-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.dg-recap-stage-badge {
  margin-right: 10px;
}

.dg-recap-stage-badge.dg1,
.dg-recap-stage-pill.is-dg1 {
  background: color-mix(in srgb, var(--discipleship-dg1) 12%, white);
  color: var(--discipleship-dg1);
}

.dg-recap-stage-badge.dg2,
.dg-recap-stage-pill.is-dg2 {
  background: color-mix(in srgb, var(--discipleship-dg2) 12%, white);
  color: var(--discipleship-dg2);
}

.dg-recap-stage-badge.dg3,
.dg-recap-stage-pill.is-dg3 {
  background: color-mix(in srgb, var(--discipleship-dg3) 14%, white);
  color: var(--discipleship-dg3);
}

.dg-recap-stage-pill.is-neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.dg-recap-text {
  min-width: 180px;
  line-height: 1.45;
}

.dg-recap-subtext {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.dg-recap-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dg-recap-photo-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dg-recap-category + .dg-recap-category {
  margin-top: 14px;
}

.dg-recap-category-title {
  margin: 0 0 8px;
  font-size: 16px;
  color: #111827;
}

.dg-recap-pagination-row {
  margin-top: 10px;
}

.dg-recap-pagination {
  align-items: center;
}

.dg-recap-page-current {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 2px;
}

#dg-recap-report-list .dg-recap-report-tools {
  display: flex;
  flex: 0 1 auto;
  margin-left: auto;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

#dg-recap-report-list > .card-row {
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.dg-recap-report-tools {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dg-recap-filter {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dg-recap-filter .search {
  flex: 1 1 240px;
  width: 240px;
  min-width: 180px;
}

.dg-recap-report-search {
  flex: 0 1 240px;
  width: 240px;
  min-width: 180px;
  margin-left: auto;
}

#dg-recap-report-list .dg-recap-filter {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}

#dg-recap-report-list .dg-recap-filter .search {
  flex: 0 1 190px;
  width: 190px;
  min-width: 160px;
}

#dg-recap-report-list .dg-recap-report-search {
  flex: 0 1 190px;
  width: 190px;
  min-width: 160px;
  margin-left: 0;
}

.dg-recap-filter .search,
.dg-recap-report-search {
  height: 40px;
  line-height: 1.2;
}

#dg-recap-report-list .dg-recap-filter .search,
#dg-recap-report-list .dg-recap-report-search {
  height: 36px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
}

.central-rekap-toolbar {
  margin: 0 0 22px;
  padding: 12px 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  height: auto;
  min-height: 0;
  display: block;
  flex: 0 0 auto;
  align-self: stretch;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98)),
    radial-gradient(180px 80px at 10% 0%, rgba(245, 158, 11, 0.18), transparent 70%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.central-rekap-toolbar-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-height: max-content;
}

.app-page.is-central-readonly .container > .central-rekap-toolbar {
  margin: 0 0 22px;
}

.app-page.is-central-readonly .container > .central-rekap-toolbar + .card-row.discipleship-page-head {
  margin: 0 0 10px;
}

.app-page.is-central-readonly .container > .central-rekap-toolbar + h1 {
  margin: 0 0 10px;
}

.central-rekap-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.central-rekap-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.central-rekap-current {
  font-size: 13px;
  color: var(--muted);
}

.central-rekap-current strong {
  color: var(--text);
  font-weight: 700;
}

.central-rekap-quick {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px 0 0;
  width: 100%;
  clear: both;
}

.central-rekap-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.central-rekap-chip:hover {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #92400e;
}

.central-rekap-chip.active {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
}

.app-page.is-central-readonly .container {
  margin-top: 0;
  padding-top: 24px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.app-page.is-central-readonly .container > .card-row.discipleship-page-head {
  margin-top: 0;
}

.app-page.is-central-readonly.page-discipleship-groups-list .container > .central-rekap-toolbar,
.app-page.is-central-readonly.page-discipleship-people-list .container > .central-rekap-toolbar,
.app-page.is-central-readonly.page-discipleship-table-scroll .container > .central-rekap-toolbar,
.app-page.is-central-readonly.page-member-table-scroll .container > .central-rekap-toolbar,
.app-page.is-central-readonly.page-member-families-scroll .container > .central-rekap-toolbar {
  margin-bottom: 22px;
}

.app-page.is-central-readonly.page-msk_classes .container > .central-rekap-toolbar,
.app-page.is-central-readonly.page-spiritual_journey .container > .central-rekap-toolbar,
.app-page.is-central-readonly.page-tree-v2 .container > .central-rekap-toolbar,
.app-page.is-central-readonly.page-discipleship-dashboard .container > .central-rekap-toolbar {
  margin-bottom: 22px;
}

#discipleship-dashboard-groups .dg-recap-filter.dashboard-search-compact,
#discipleship-dashboard-people .dg-recap-filter.dashboard-search-compact {
  flex: 0 1 auto;
  align-self: flex-start;
  margin-bottom: 8px;
}

#discipleship-dashboard-groups .dg-recap-filter.dashboard-search-compact .search,
#discipleship-dashboard-people .dg-recap-filter.dashboard-search-compact .search {
  flex: 0 1 200px;
  width: 200px;
  min-width: 150px;
  height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.btn.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.member-form-actions.is-right {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.msk-form-actions.is-right {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.22);
}

.btn.secondary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
}

.btn.ghost {
  background: #eef2f7;
  color: #111827;
  box-shadow: none;
}

.btn.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.btn.tiny {
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: none;
}

.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.actions:not(td) {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.table td.actions {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  min-width: 172px;
}

.table td.actions > * {
  display: inline-block;
  vertical-align: middle;
  margin: 2px 5px 2px 0;
}

.table td.actions > .btn,
.table td.actions > .inline .btn {
  display: inline-flex;
}

.table td.actions > .inline {
  display: inline-block;
}

.table td.actions > *:last-child {
  margin-right: 0;
}

.table th.actions-head {
  text-align: center;
  white-space: nowrap;
  min-width: 172px;
}

.table th.select-head,
.table td.select-cell {
  text-align: center;
}

.table td.select-cell {
  width: 56px;
}

.inline {
  display: inline-block;
}

.inline {
  display: inline;
}

.search {
  width: min(100%, 240px);
  max-width: 100%;
}

.table-tools,
.msk-table-tools,
.members-table-tools,
.worship-table-tools {
  align-items: center;
}

.msk-table-tools .msk-table-search {
  width: 240px;
  min-width: 180px;
}

.members-table-tools .members-table-search {
  width: 240px;
  min-width: 180px;
}

.worship-table-tools .worship-table-search {
  width: 240px;
  min-width: 180px;
}

.msk-table-tools .msk-batch-select {
  width: 200px;
  min-width: 170px;
}

@media (min-width: 721px) {
  .card-row .actions.table-tools,
  .card-row .actions.msk-table-tools,
  .card-row .actions.members-table-tools,
  .card-row .actions.worship-table-tools {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
  }
  .card-row .actions.msk-table-tools .msk-table-search {
    flex: 0 1 240px;
    width: 240px;
    margin-left: 0;
  }
  .card-row .actions.members-table-tools .members-table-search {
    flex: 0 1 240px;
    width: 240px;
    margin-left: 0;
  }
  .card-row .actions.worship-table-tools .worship-table-search {
    flex: 0 1 240px;
    width: 240px;
    margin-left: 0;
  }
}

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

.tree {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tree-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
}

.tree-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tree-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
}

.zoom-value {
  font-size: 12px;
  color: var(--muted);
  min-width: 44px;
  text-align: center;
}

.tree-zoom {
  transform-origin: top left;
}

.drag-scroll {
  cursor: grab;
}

.drag-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.tree ul {
  list-style: none;
  margin: 0;
  padding-left: 18px;
  border-left: 1px dashed var(--border);
}

.tree li {
  margin: 8px 0;
}

.tree.horizontal {
  overflow: visible;
  padding-bottom: 6px;
}

.tree.horizontal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: none;
}

.tree.horizontal > ul {
  min-width: max-content;
}

.tree.horizontal .tree-row {
  --row-gap: 12px;
  display: flex;
  align-items: flex-start;
  gap: var(--row-gap);
  margin: 8px 0;
}

.tree.horizontal .tree-row.has-children {
  align-items: stretch;
}

.tree.horizontal .tree-row.has-children > .tree-node {
  align-self: center;
}

.tree.horizontal .tree-row.is-group-leader {
  position: relative;
  padding-top: 12px;
  padding-bottom: 12px;
}

.tree.horizontal ul > .tree-row.is-group-leader::before,
.tree.horizontal ul > .tree-row.is-group-leader::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px dashed rgba(71, 85, 105, 0.48);
}

.tree.horizontal ul > .tree-row.is-group-leader::before {
  top: 0;
}

.tree.horizontal ul > .tree-row.is-group-leader::after {
  bottom: 0;
}

.tree.horizontal ul > .tree-row.is-group-leader + .tree-row.is-group-leader::before {
  display: none;
}


.tree.horizontal .tree-row > ul:not(.group-list) {
  margin: 0;
  padding-left: 18px;
  border-left: 1px dashed var(--border);
}

.group-list {
  list-style: none;
  margin: 0;
  padding-left: 18px;
  position: relative;
  margin-left: 0;
}


.group-node {
  margin: 8px 0;
}

.group-card {
  min-width: 170px;
  background: linear-gradient(135deg, var(--group-bg1, #fef3c7), var(--group-bg2, #fef9e7));
  border: 1px solid var(--group-border, rgba(245, 158, 11, 0.2));
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  position: relative;
}


.group-node.is-ungrouped .group-card {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.3);
}

.group-title {
  font-weight: 700;
  font-size: 12px;
}

.group-meta {
  font-size: 11px;
  color: var(--muted);
}

.group-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.group-progress.muted {
  color: var(--muted);
}

.progress-track {
  height: 6px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--group-accent, #10b981), var(--group-accent-2, #22c55e));
}

.group-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.group-members {
  list-style: none;
  margin: 6px 0 0;
  padding-left: 0;
}

.group-members .tree-row {
  --row-gap: 12px;
  display: flex;
  align-items: flex-start;
  gap: var(--row-gap);
  margin: 8px 0;
}

.group-members .tree-row.has-children {
  align-items: center;
}

.group-members .tree-row > ul {
  margin: 0;
  padding-left: 18px;
  border-left: none;
}


.tree.horizontal .tree-node {
  width: 190px;
  padding: 8px 10px;
}

.tree-node {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.tree-node.is-selected {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), 0 12px 22px rgba(15, 23, 42, 0.12);
}

.tree-title {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.tree-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.tree-actions .btn.tiny {
  padding: 3px 6px;
  font-size: 11px;
}

.tree-v2-intro {
  margin-bottom: 0;
  padding: 12px 14px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.9));
}

.tree-v2-intro-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tree-v2-intro-note {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

.tree-v2-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}

.tree-v2-legend-chip.person {
  background: #e0ecff;
  color: #1e3a8a;
  border-color: #bfdbfe;
}

.tree-v2-legend-chip.group {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.tree-v2-legend-chip.ungrouped {
  background: #fee2e2;
  color: #9f1239;
  border-color: #fca5a5;
}

.tree-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(20, 184, 166, 0.12), transparent 60%),
    radial-gradient(360px 180px at 100% 0%, rgba(59, 130, 246, 0.1), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.tree-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #2dd4bf 0%, #60a5fa 55%, #a78bfa 100%);
}

.tree-hero-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.tree-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.tree-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, #14b8a6 12%, white);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tree-hero-copy h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.tree-hero-copy p {
  margin: 0;
  max-width: 820px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.tree-hero-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.tree-hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: rgba(255, 255, 255, 0.78);
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.tree-hero-zoom-controls {
  display: inline-grid;
  grid-template-columns: 36px minmax(54px, auto) 36px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.tree-hero-zoom-controls .btn.tiny.ghost {
  min-width: 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;
  border: 1px solid #d9e2ec;
  color: #0f172a;
  box-shadow: none;
}

.tree-hero-zoom-controls .zoom-value {
  min-width: 50px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.discipleship-dashboard-hero-card,
.people-hero-card,
.groups-hero-card,
.journey-hero-card,
.msk-hero-card,
.dg-recap-hero-card,
.tree-hero-card {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.discipleship-dashboard-hero-copy h2,
.people-hero-copy h1,
.groups-hero-copy h1,
.journey-hero-copy h1,
.msk-hero-copy h1,
.dg-recap-hero-copy h1,
.tree-hero-copy h1,
.central-page-head h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.discipleship-dashboard-hero-copy p,
.people-hero-copy p,
.groups-hero-copy p,
.journey-hero-copy p,
.msk-hero-copy p,
.dg-recap-hero-copy p,
.tree-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.discipleship-dashboard-hero-kicker,
.people-hero-kicker,
.groups-hero-kicker,
.journey-hero-kicker,
.msk-hero-kicker,
.dg-recap-hero-kicker,
.tree-hero-kicker {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tree-v2-card {
  margin-bottom: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px;
  background:
    radial-gradient(780px 260px at 50% -120px, rgba(59, 130, 246, 0.12), transparent 65%),
    radial-gradient(620px 300px at 95% 18%, rgba(245, 158, 11, 0.1), transparent 72%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.9));
}

.tree-v2-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tree-v2-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.tree-v2-zoom {
  transform-origin: top center;
  width: max-content;
  min-width: 100%;
}

.tree-v2-graph {
  --tree-v2-node-width: 206px;
  --tree-v2-node-height: 92px;
  min-width: max-content;
  padding: 10px 24px 24px;
}

.tree-v2-root,
.tree-v2-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree-v2-root {
  display: flex;
  justify-content: center;
}

.tree-v2-item {
  position: relative;
  list-style: none;
  text-align: center;
  padding: 0;
}

.tree-v2-node {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: var(--tree-v2-node-width);
  min-width: var(--tree-v2-node-width);
  max-width: var(--tree-v2-node-width);
  height: var(--tree-v2-node-height);
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
  text-align: left;
  overflow: hidden;
}

.tree-v2-node.is-actionable {
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.tree-v2-node.is-actionable:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.16);
}

.tree-v2-node.is-actionable:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.tree-v2-person {
  background: linear-gradient(150deg, #ffffff, #f8fafc);
  border-color: #dbe3ee;
}

.tree-v2-person.is-male {
  background: linear-gradient(150deg, #eff6ff, #dbeafe);
  border-color: #93c5fd;
}

.tree-v2-person.is-female {
  background: linear-gradient(150deg, #fdf2f8, #fce7f3);
  border-color: #f9a8d4;
}

.tree-v2-person.is-root {
  background: linear-gradient(150deg, #fff7ed, #ffedd5);
  border-color: #fdba74;
  box-shadow: 0 12px 24px rgba(194, 65, 12, 0.16);
}

.tree-v2-group {
  background: linear-gradient(150deg, #fefce8, #fef3c7);
  border-color: #fcd34d;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.tree-v2-group.is-dg1 {
  background: linear-gradient(150deg, color-mix(in srgb, var(--discipleship-dg1) 8%, white), color-mix(in srgb, var(--discipleship-dg1) 16%, white));
  border-color: color-mix(in srgb, var(--discipleship-dg1) 32%, white);
}

.tree-v2-group.is-dg2 {
  background: linear-gradient(150deg, color-mix(in srgb, var(--discipleship-dg2) 8%, white), color-mix(in srgb, var(--discipleship-dg2) 16%, white));
  border-color: color-mix(in srgb, var(--discipleship-dg2) 32%, white);
}

.tree-v2-group.is-dg3 {
  background: linear-gradient(150deg, color-mix(in srgb, var(--discipleship-dg3) 8%, white), color-mix(in srgb, var(--discipleship-dg3) 16%, white));
  border-color: color-mix(in srgb, var(--discipleship-dg3) 32%, white);
}

.tree-v2-item-group.is-ungrouped > .tree-v2-group {
  background: linear-gradient(150deg, #fff1f2, #ffe4e6);
  border-color: #fda4af;
}

.tree-v2-node-head {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.tree-v2-node-head-groups-only {
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  height: 100%;
}

.tree-v2-node-head-groups-only .tree-v2-node-badges {
  justify-content: center;
}

.tree-v2-group .tree-v2-meta {
  display: none;
}

.tree-v2-node-head .badge {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 10px;
  padding: 3px 7px;
}

.tree-v2-group .tree-v2-node-head .badge {
  font-size: 13px;
  padding: 6px 14px;
}

.tree-v2-node-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.tree-v2-status-badge.is-active {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  border: 1px solid #86efac;
}

.tree-v2-status-badge.is-inactive {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #334155;
  border: 1px solid #cbd5e1;
}

.tree-v2-name {
  display: block;
  width: 100%;
  min-width: 0;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-v2-meta {
  width: 100%;
  font-size: 11px;
  color: #475569;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tree-v2-empty {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

.tree-v2-children {
  --tree-v2-gap: 16px;
  --tree-v2-connector: 18px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--tree-v2-gap);
  margin-top: 16px;
  padding-top: var(--tree-v2-connector);
}

.tree-v2-children::before {
  content: "";
  position: absolute;
  top: calc(var(--tree-v2-connector) * -1);
  left: 50%;
  height: var(--tree-v2-connector);
  border-left: 2px solid #c7d3e0;
  transform: translateX(-50%);
}

.tree-v2-children > .tree-v2-item::before,
.tree-v2-children > .tree-v2-item::after {
  content: "";
  position: absolute;
  top: calc(var(--tree-v2-connector) * -1);
}

.tree-v2-children > .tree-v2-item::before {
  left: 50%;
  height: var(--tree-v2-connector);
  border-left: 2px solid #c7d3e0;
  transform: translateX(-50%);
}

.tree-v2-children > .tree-v2-item::after {
  left: calc(var(--tree-v2-gap) * -0.5);
  right: calc(var(--tree-v2-gap) * -0.5);
  border-top: 2px solid #c7d3e0;
}

.tree-v2-children > .tree-v2-item:first-child::after {
  left: 50%;
}

.tree-v2-children > .tree-v2-item:last-child::after {
  right: 50%;
}

.tree-v2-children > .tree-v2-item:only-child::after {
  display: none;
}

.tree-v2-level-members {
  --tree-v2-gap: 12px;
  gap: var(--tree-v2-gap);
}

.tree-v2-level-members > .tree-v2-item > .tree-v2-person:not(.is-male):not(.is-female) {
  background: linear-gradient(150deg, #ffffff, #f8fafc);
  border-color: #dbe3ee;
}

.tree-v2-level-members .tree-v2-level-groups {
  --tree-v2-gap: 12px;
  gap: var(--tree-v2-gap);
}

.tree-v2-action-modal-card {
  width: min(540px, calc(100vw - 28px));
  border-radius: 18px;
  overflow: hidden;
}

.tree-v2-action-modal-card .modal-head {
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
}

.tree-v2-action-modal-card .modal-title {
  margin: 0;
  padding-right: 12px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tree-v2-action-modal-card .modal-body {
  padding: 16px 18px 18px;
}

.tree-v2-action-modal-card [data-tree-v2-action-close] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: #f8fafc;
  border-color: rgba(226, 232, 240, 0.92);
  color: #475569;
  box-shadow: none;
  font-size: 16px;
  line-height: 1;
}

.tree-v2-action-modal-card [data-tree-v2-action-close]:hover,
.tree-v2-action-modal-card [data-tree-v2-action-close]:focus-visible {
  background: #eef2f7;
  color: #0f172a;
}

.tree-v2-action-modal-card .tree-v2-action-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0;
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn {
  min-height: 30px;
  min-width: 0;
  flex: 0 0 auto;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
  box-shadow: none;
  white-space: nowrap;
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn.ghost {
  background: #eef2f7;
  color: #0f172a;
  border: 1px solid rgba(203, 213, 225, 0.9);
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn[data-tree-v2-action-do="view_history"] {
  background: #eef2f7;
  color: #0f172a;
  border: 1px solid rgba(203, 213, 225, 0.9);
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn[data-tree-v2-action-do="add_group"] {
  background: linear-gradient(135deg, #275f58, #1f766d);
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn[data-tree-v2-action-do="add_member"] {
  background: linear-gradient(135deg, #2c6c7a, #2f8790);
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn[data-tree-v2-action-do="edit_person"] {
  background: linear-gradient(135deg, #3a5f8a, #4975a3);
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn[data-tree-v2-action-do="upgrade_group"] {
  background: linear-gradient(135deg, #6b5f2e, #8a7a39);
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn.secondary[data-tree-v2-action-do="complete_group"] {
  background: linear-gradient(135deg, #d9a441, #c98727);
  color: #1f2937;
}

.tree-v2-action-modal-card .tree-v2-action-buttons .btn.danger[data-tree-v2-action-do="leave_group"] {
  background: linear-gradient(135deg, #db5a4a, #bb2f2f);
}

.page-discipleship-people-list .discipleship-list-card.table-card-plain {
  flex: 0 0 auto;
  min-height: auto;
  display: block;
}

.page-discipleship-groups-list .discipleship-list-card.table-card-plain {
  flex: 0 0 auto;
  min-height: auto;
  display: block;
}

.page-msk_classes .table-card-plain {
  flex: 0 0 auto;
  min-height: auto;
  display: block;
}

.page-dg_reports_recap .dg-recap-section-card {
  flex: 0 0 auto;
  min-height: auto;
  display: block;
}

.page-spiritual_journey .table-card-plain {
  flex: 0 0 auto;
  min-height: auto;
  display: block;
}

.page-discipleship-groups-list .discipleship-list-card.table-card-plain .table-wrap,
.app-page.is-central-readonly.page-discipleship-groups-list .discipleship-list-card.table-card-plain .table-wrap,
.page-discipleship-people-list .discipleship-list-card.table-card-plain .table-wrap,
.app-page.is-central-readonly.page-discipleship-people-list .discipleship-list-card.table-card-plain .table-wrap,
.page-spiritual_journey .table-card-plain .table-wrap,
.app-page.is-central-readonly.page-spiritual_journey .table-card-plain .table-wrap,
.page-dg_reports_recap .dg-recap-section-card > .table-wrap,
.app-page.is-central-readonly.page-dg_reports_recap .dg-recap-section-card > .table-wrap,
.page-msk_classes .table-card-plain .table-wrap,
.app-page.is-central-readonly.page-msk_classes .table-card-plain .table-wrap {
  flex: 0 0 auto;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

@media (max-width: 640px) {
  .tree-v2-action-modal-card .modal-head {
    padding: 14px 14px 12px;
  }

  .tree-v2-action-modal-card .modal-body {
    padding: 14px;
  }

  .tree-v2-action-modal-card .tree-v2-action-buttons {
    gap: 8px;
  }

  .tree-v2-action-modal-card .tree-v2-action-buttons .btn {
    flex-basis: 100%;
    min-width: 0;
  }
}

.icon-btn {
  padding: 4px;
  width: 28px;
  height: 28px;
  justify-content: center;
}

.btn.secondary.icon-btn {
  color: #fff;
}

.icon-btn .icon {
  width: 16px;
  height: 16px;
  display: block;
}

.icon-btn .icon path,
.icon-btn .icon circle {
  stroke-width: 2.2;
}

.table-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 9999;
}

.modal.is-open {
  display: flex;
}

.modal[data-dg-recap-photo-modal] {
  z-index: 10020;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: min(560px, 92vw);
  max-height: var(--modal-max-height);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  padding: 16px;
  margin: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-title {
  font-weight: 700;
  font-size: 16px;
}

.modal-body {
  margin-top: 0;
  padding: 12px 16px 16px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-form {
  display: grid;
  gap: 10px;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.member-view-modal-card {
  width: min(920px, 96vw);
}

.msk-form-modal-card {
  height: var(--modal-max-height);
  max-height: var(--modal-max-height);
}

.msk-form-modal-card .modal-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.member-view-table-wrap {
  max-height: calc(var(--modal-max-height) - 150px);
  overflow: auto;
}

.msk-view-modal-card,
.msk-form-modal-card {
  width: min(800px, 88vw);
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.8);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
  position: relative;
  background:
    linear-gradient(180deg, rgba(247, 252, 252, 0.98), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.msk-view-modal-card::before,
.msk-form-modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-msk) 72%, white) 46%, var(--discipleship-dg1) 100%);
}

.msk-view-modal-card .modal-head,
.msk-form-modal-card .modal-head {
  padding: 10px 12px 8px;
  background: transparent;
  border-bottom: 1px solid rgba(203, 213, 225, 0.82);
}

.msk-view-modal-card .modal-title,
.msk-form-modal-card .modal-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.06;
  color: #0f172a;
}

.msk-view-modal-card .modal-body,
.msk-form-modal-card .modal-body {
  padding: 8px 12px 10px;
}

.msk-view-modal-card .modal-actions {
  padding: 7px 12px 10px;
  border-top: 1px solid rgba(203, 213, 225, 0.82);
  background: rgba(248, 250, 252, 0.9);
}

.msk-view-modal-card .modal-head > .btn.ghost,
.msk-form-modal-card .modal-head > .btn.ghost {
  min-width: 26px;
  min-height: 26px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
  flex: 0 0 26px;
}

.msk-form-modal-body {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 34%),
    radial-gradient(circle at top right, rgba(2, 132, 199, 0.06), transparent 30%),
    transparent;
}

.msk-participant-form {
  gap: 6px;
}

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

.msk-form-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.1), transparent 42%),
    radial-gradient(circle at top right, rgba(2, 132, 199, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.msk-form-banner-copy {
  display: grid;
  gap: 4px;
  max-width: 520px;
}

.msk-form-banner-kicker,
.msk-form-section-kicker,
.msk-view-section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-msk) 10%, white);
  color: var(--discipleship-msk);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.msk-form-banner-copy h3,
.msk-form-section-head h3,
.msk-view-section-head h4 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  color: #0f172a;
}

.msk-form-banner-copy h3 {
  font-size: clamp(14px, 1.45vw, 17px);
  line-height: 1.08;
}

.msk-form-banner-copy p,
.msk-form-section-head p {
  margin: 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.4;
}

.msk-form-banner-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 220px;
}

.msk-form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.86);
  color: #475569;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.msk-form-badge.is-status.is-pending {
  color: #64748b;
}

.msk-form-badge.is-status.is-progress {
  color: var(--discipleship-msk);
  border-color: color-mix(in srgb, var(--discipleship-msk) 26%, white);
  background: color-mix(in srgb, var(--discipleship-msk) 10%, white);
}

.msk-form-badge.is-status.is-complete {
  color: #0f766e;
  border-color: rgba(45, 212, 191, 0.26);
  background: rgba(204, 251, 241, 0.9);
}

.msk-form-section {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 14px 30px rgba(148, 163, 184, 0.08);
}

.msk-form-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.msk-form-section-head > div {
  display: grid;
  gap: 4px;
}

.msk-form-section-head h3 {
  font-size: clamp(14px, 1.45vw, 17px);
  line-height: 1.12;
}

.msk-form-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.msk-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 100%;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.98));
  color: #475569;
  font-size: 10px;
}

.msk-form-field.is-wide,
.msk-form-meta-card.is-wide,
.msk-form-note.is-wide {
  grid-column: 1 / -1;
}

.msk-form-field-label {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.msk-form-field input,
.msk-form-field select,
.msk-form-field textarea {
  border-radius: 8px;
  border-color: rgba(203, 213, 225, 0.96);
  background: #ffffff;
  min-height: 30px;
  padding: 6px 8px;
}

.msk-form-field textarea {
  min-height: 56px;
  resize: vertical;
}

.msk-form-field input:focus,
.msk-form-field select:focus,
.msk-form-field textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--discipleship-msk) 34%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--discipleship-msk) 12%, transparent);
}

.msk-form-field.is-upload input[type="file"] {
  border: 1px dashed rgba(148, 163, 184, 0.72);
  background: rgba(248, 250, 252, 0.95);
  padding: 7px;
}

.msk-form-field-hint {
  font-size: 8px;
  color: #64748b;
}

.msk-form-meta-card {
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  background: rgba(248, 250, 252, 0.9);
}

.msk-photo-list .member-photo-current {
  margin-bottom: 5px;
  font-weight: 700;
  color: #334155;
}

.msk-photo-list .member-photo-item {
  justify-content: space-between;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.92);
}

.msk-form-note {
  margin: 0;
  padding: 8px 9px;
  border-radius: 8px;
}

.msk-progress-fieldset {
  padding: 8px 10px 7px;
  border-radius: 10px;
  border-color: rgba(191, 219, 254, 0.82);
  background:
    radial-gradient(circle at top left, rgba(2, 132, 199, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.msk-progress-fieldset legend {
  padding: 0 8px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--discipleship-msk);
}

.msk-form-actions.is-right {
  grid-column: 1 / -1;
  margin-top: 2px;
  align-items: center;
}

.msk-view-sheet {
  display: grid;
  gap: 6px;
}

.msk-view-summary-card {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 36%),
    radial-gradient(circle at top right, rgba(2, 132, 199, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.msk-view-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.msk-view-summary-item {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  background: rgba(255, 255, 255, 0.92);
}

.msk-view-summary-item span {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.msk-view-summary-item strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.msk-view-summary-item.is-status strong .msk-status-badge {
  vertical-align: top;
}

.msk-view-progress {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(191, 219, 254, 0.82);
  background: rgba(255, 255, 255, 0.92);
}

.msk-view-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.msk-view-section {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.msk-view-section.is-wide {
  grid-column: 1 / -1;
}

.msk-view-section-head {
  display: grid;
  gap: 4px;
}

.msk-view-section-head h4 {
  font-size: clamp(14px, 1.45vw, 17px);
  line-height: 1.12;
}

.msk-view-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.msk-view-detail {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  background: rgba(255, 255, 255, 0.94);
}

.msk-view-detail.is-wide {
  grid-column: 1 / -1;
}

.msk-view-detail dt {
  margin: 0;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.msk-view-detail dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #0f172a;
  word-break: break-word;
}

.msk-view-rich-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.msk-view-rich-card {
  display: grid;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  line-height: 1.45;
}

.msk-view-rich-card > span {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.msk-modal-empty-state {
  margin: 0;
}

@media (max-width: 900px) {
  .msk-view-modal-card,
  .msk-form-modal-card {
    width: min(100%, 96vw);
    border-radius: 12px;
  }

  .msk-view-modal-card .modal-head,
  .msk-form-modal-card .modal-head,
  .msk-view-modal-card .modal-body,
  .msk-form-modal-card .modal-body,
  .msk-view-modal-card .modal-actions {
    padding-left: 8px;
    padding-right: 8px;
  }

  .msk-form-banner,
  .msk-form-section,
  .msk-progress-fieldset,
  .msk-view-summary-card,
  .msk-view-section {
    padding: 8px;
    border-radius: 10px;
  }

  .msk-form-section-head,
  .msk-form-banner {
    flex-direction: column;
  }

  .msk-form-banner-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .msk-form-section-grid,
  .msk-view-summary-grid,
  .msk-view-sections,
  .msk-view-details,
  .msk-view-rich-grid {
    grid-template-columns: 1fr;
  }
}

.file-text-editor {
  min-height: 240px;
  resize: vertical;
  font-family: "Courier New", Courier, monospace;
  line-height: 1.45;
}

.file-view-modal-card {
  width: min(860px, 94vw);
}

.file-view-body {
  display: grid;
  gap: 10px;
}

.file-view-text {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  padding: 12px;
  min-height: 220px;
  max-height: calc(var(--modal-max-height) - 140px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.file-view-image-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
  min-height: 220px;
  max-height: calc(var(--modal-max-height) - 120px);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-view-image {
  max-width: 100%;
  max-height: calc(var(--modal-max-height) - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.file-view-embed-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
}

.file-view-embed {
  width: 100%;
  min-height: calc(var(--modal-max-height) - 140px);
  border: 0;
  border-radius: 8px;
  background: #fff;
}

.modal.is-fullres .file-view-modal-card {
  width: min(1280px, 98vw);
  max-height: var(--modal-max-height);
  overflow: hidden;
}

.modal.is-fullres .file-view-image-wrap {
  max-height: calc(var(--modal-max-height) - 170px);
  min-height: 0;
  padding: 0;
  background: #fff;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal.is-fullres .file-view-image {
  max-width: 100%;
  max-height: calc(var(--modal-max-height) - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

.modal.is-fullres .file-view-embed {
  min-height: calc(var(--modal-max-height) - 80px);
}

.is-hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

body.sidebar-open {
  overflow: hidden;
}

.alert {
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
  animation: toast-in 0.25s ease-out;
  max-width: min(320px, calc(100vw - 48px));
}

.alert.is-closing {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert.danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert.success {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #166534;
  border: 1px solid #86efac;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  animation: rise 0.7s ease-out both;
}

.hero-copy h1 {
  font-size: clamp(28px, 3.5vw, 42px);
  margin: 6px 0 10px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 16px;
}

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

.hero-panel {
  background: linear-gradient(160deg, #ffffff, #f1f5f9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.panel-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.panel-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.panel-note.status-done {
  color: #166534;
}

.panel-note.status-upcoming {
  color: #a16207;
}

.panel-note.status-pending {
  color: #b91c1c;
}

.panel-divider {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin-top: 10px;
  padding-top: 2px;
}

.feature-section {
  margin-top: 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 190px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  animation: rise 0.7s ease-out both;
}

.feature-card:nth-child(2) {
  animation-delay: 0.08s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.16s;
}

.feature-card:nth-child(4) {
  animation-delay: 0.24s;
}

.feature-card.is-active {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 18px 28px rgba(15, 118, 110, 0.18);
}

.feature-card.is-disabled {
  opacity: 0.6;
  filter: grayscale(0.15);
  cursor: not-allowed;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e6f2ef;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  font-weight: 700;
  color: var(--primary);
}

.feature-icon.muted {
  background: #eef2f7;
  color: #6b7280;
}

.icon-ring {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid rgba(15, 118, 110, 0.18);
}

.feature-icon.muted .icon-ring {
  border-color: rgba(107, 114, 128, 0.25);
}

.icon-mark {
  position: relative;
  font-size: 12px;
  letter-spacing: 1px;
}

.feature-title {
  font-weight: 700;
  font-size: 16px;
}

.feature-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.feature-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  padding-top: 6px;
}

.feature-stat:first-child {
  border-top: none;
  padding-top: 0;
}

.feature-stat strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.feature-stat-sub {
  display: block;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feature-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
  background: #d1fae5;
  color: #065f46;
  font-weight: 600;
}

.badge.muted {
  border-color: #d1d5db;
  background: #e5e7eb;
  color: #6b7280;
}

.badge.success {
  border-color: #a7f3d0;
  background: #d1fae5;
  color: #065f46;
}

.badge.warning {
  border-color: #fde68a;
  background: #fef3c7;
  color: #92400e;
}

.badge.central-scope {
  border-color: rgba(99, 102, 241, 0.26);
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
  color: #4338ca;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.14);
}

.chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  font-weight: 600;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}

.chart-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.chart-card.span-2 {
  grid-column: 1 / -1;
}

.chart-stage {
  position: relative;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-bottom: 2px;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #8a8a8a #e5e7eb;
}

.chart-stage::-webkit-scrollbar {
  height: 12px;
}

.chart-stage::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 999px;
}

.chart-stage::-webkit-scrollbar-thumb {
  background: #8a8a8a;
  border-radius: 999px;
}

.chart-svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.chart-grid-line {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #64748b;
  font-size: 10px;
  font-family: "Manrope", "Noto Sans", sans-serif;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-line.attendance {
  stroke: #0f766e;
}

.chart-line.sunday-school {
  stroke: #f59e0b;
}

.chart-dot {
  stroke: #ffffff;
  stroke-width: 1.5;
}

.chart-dot[data-chart-tip],
.chart-bar[data-chart-tip] {
  cursor: pointer;
}

.chart-dot[data-chart-tip] {
  transition: stroke-width 0.14s ease, opacity 0.14s ease;
}

.chart-dot[data-chart-tip]:hover,
.chart-dot[data-chart-tip].is-active,
.chart-dot[data-chart-tip]:focus {
  stroke-width: 2.6;
  opacity: 1;
}

.chart-dot[data-chart-tip]:focus,
.chart-bar[data-chart-tip]:focus {
  outline: none;
}

.chart-dot.attendance {
  fill: #0f766e;
}

.chart-dot.sunday-school {
  fill: #f59e0b;
}

.chart-bar.offering {
  fill: #22c55e;
  opacity: 0.88;
}

.chart-bar.communion {
  fill: #3b82f6;
  opacity: 0.9;
}

.chart-bar[data-chart-tip] {
  transition: opacity 0.14s ease, filter 0.14s ease;
}

.chart-bar[data-chart-tip]:hover,
.chart-bar[data-chart-tip].is-active,
.chart-bar[data-chart-tip]:focus {
  opacity: 1;
  filter: brightness(0.94);
}

.chart-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #94a3b8;
}

.legend-dot.attendance {
  background: #0f766e;
}

.legend-dot.sunday-school {
  background: #f59e0b;
}

.legend-dot.success {
  background: #22c55e;
}

.legend-dot.muted {
  background: #94a3b8;
}

.chart-empty {
  text-align: center;
}

.chart-empty .btn {
  margin-top: 10px;
}

.chart-empty-inline {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  color: var(--muted);
}

.chart-tooltip {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: min(320px, calc(100% - 16px));
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 4;
}

.chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.member-pie-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.discipleship-progress-pie-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.discipleship-progress-overdue-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.discipleship-target-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.discipleship-target-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding-right: 0;
}

.discipleship-target-item {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
}

.discipleship-target-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.discipleship-target-top .name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
}

.discipleship-target-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 8px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.86);
}

.discipleship-target-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 1px;
}

.discipleship-target-value .current {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  color: #0f172a;
}

.discipleship-target-value .divider {
  color: #94a3b8;
  font-weight: 700;
}

.discipleship-target-value .target {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.discipleship-target-meta {
  font-size: 11px;
  color: #64748b;
  line-height: 1.2;
}

.discipleship-overdue-card {
  margin-bottom: 0;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
}

.discipleship-overdue-card.is-msk {
  background:
    radial-gradient(320px 160px at 0% 0%, rgba(2, 132, 199, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.discipleship-overdue-card.is-report {
  background:
    radial-gradient(320px 160px at 0% 0%, rgba(220, 38, 38, 0.07), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

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

.discipleship-overdue-head h2 {
  margin: 4px 0 6px;
}

.discipleship-overdue-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  max-width: 480px;
}

.discipleship-overdue-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.8);
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.discipleship-overdue-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.85);
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
}

.discipleship-overdue-list-wrap {
  margin-top: 4px;
}

.discipleship-overdue-list {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  padding-right: 6px;
}

.discipleship-overdue-item {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.discipleship-overdue-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.discipleship-overdue-top .name {
  font-weight: 700;
  color: #0f172a;
  flex: 1 1 auto;
  min-width: 0;
}

.discipleship-overdue-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.discipleship-overdue-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.discipleship-overdue-meta span {
  color: #64748b;
}

.discipleship-overdue-meta strong {
  color: #334155;
  font-weight: 700;
  text-align: right;
}

.discipleship-import-card {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  border-radius: 24px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background:
    radial-gradient(360px 180px at 0% 0%, rgba(20, 184, 166, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.discipleship-import-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-msk) 76%, white) 50%, var(--discipleship-dg1) 100%);
}

.discipleship-import-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.discipleship-import-copy {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.discipleship-import-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.discipleship-import-copy h2 {
  margin: 0;
}

.discipleship-import-copy p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.discipleship-import-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.discipleship-import-form {
  gap: 14px;
}

.discipleship-import-field {
  display: grid;
  gap: 8px;
  max-width: 680px;
}

.discipleship-import-field-label {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.discipleship-import-upload-wrap {
  display: block;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    radial-gradient(220px 80px at 0% 0%, rgba(20, 184, 166, 0.08), transparent 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.discipleship-import-upload {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 14px;
}

.discipleship-import-upload::file-selector-button {
  margin-right: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(14, 165, 233, 0.12));
  color: #0f766e;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.discipleship-import-upload::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
  filter: brightness(1.02);
}

.discipleship-import-field-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.discipleship-import-actions {
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.discipleship-import-actions .btn {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
}

.discipleship-import-actions .btn.ghost {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #334155;
}

.discipleship-import-actions .btn.ghost:hover {
  background: #fff;
}

.member-pie-card {
  margin-bottom: 0;
}

.member-pie-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.discipleship-progress-pie-grid > .member-pie-card:first-child {
  display: flex;
  flex-direction: column;
}

.discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-layout {
  grid-template-columns: minmax(272px, 1fr) minmax(122px, 170px);
  gap: 10px;
  align-items: center;
  flex: 1 1 auto;
}

.discipleship-progress-pie-grid > .member-pie-card:first-child .card-row h2 {
  margin-bottom: 2px;
}

.discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-stage,
.discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-svg {
  width: 278px;
  height: 278px;
}

.discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-legend {
  gap: 6px;
}

.discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-legend-item {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  padding: 5px 6px;
  font-size: 11px;
}

.discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-legend-item .count {
  font-size: 11px;
}

.member-pie-stage {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.member-pie-svg {
  width: 220px;
  height: 220px;
  display: block;
}

.member-pie-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 28;
}

.member-pie-segment {
  fill: none;
  stroke-width: 28;
  stroke-linecap: butt;
  opacity: 0.92;
  cursor: pointer;
  transition: opacity 0.16s ease, stroke-width 0.16s ease;
}

.member-pie-segment:hover,
.member-pie-segment.is-active,
.member-pie-segment:focus {
  opacity: 1;
  stroke-width: 31;
}

.member-pie-segment:focus {
  outline: none;
}

.member-pie-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.member-pie-center .value {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  color: #0f172a;
}

.member-pie-center .label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.member-pie-tooltip {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 4;
}

.member-pie-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.member-pie-legend {
  display: grid;
  gap: 8px;
}

.member-pie-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  font-size: 12px;
}

.member-pie-legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.member-pie-legend-item .text {
  color: #334155;
  font-weight: 600;
}

.member-pie-legend-item .count {
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Global UI polish */
.app-page {
  color-scheme: light;
}

.app-page .app-main {
  min-width: 0;
}

.container {
  max-width: 1360px;
}

.app-page .container > .card-row.discipleship-page-head {
  margin: 4px 0 10px;
  align-items: flex-end;
}

.app-page .container > .card-row.discipleship-page-head h1 {
  margin: 0;
  line-height: 1.08;
}

.app-page .container > .card-row.discipleship-page-head .actions {
  margin-left: auto;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.app-page .container > .card-row.discipleship-page-head .actions .search {
  width: min(100%, 320px);
  min-width: 220px;
}

.app-page.page-discipleship-groups-list .container > .card-row.discipleship-page-head .actions .search,
.app-page.page-discipleship-people-list .container > .card-row.discipleship-page-head .actions .search,
.app-page.page-spiritual_journey .container > .card-row.discipleship-page-head .actions .search,
.app-page.page-msk_classes .container > .card-row.discipleship-page-head .actions .search {
  width: min(100%, 220px);
  min-width: 160px;
  height: 36px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
}

.app-page .container > .card-row.discipleship-page-head .actions .btn.tiny.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  justify-content: center;
}

input,
select,
textarea {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: rgba(15, 118, 110, 0.56);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.search {
  width: min(100%, 300px);
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border-color: #c9d5e1;
  background: rgba(255, 255, 255, 0.9);
}

.btn {
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16), 0 8px 20px rgba(15, 118, 110, 0.22);
}

.card.table-card-plain .table-wrap {
  scrollbar-gutter: auto;
}

.card.table-card-plain .table td {
  vertical-align: middle;
}

.card.table-card-plain .table th,
.card.table-card-plain .table td {
  line-height: 1.35;
}

.card.table-card-plain .table th.actions-head,
.card.table-card-plain .table td.actions {
  width: 172px;
  min-width: 172px;
  white-space: nowrap;
}

.page-discipleship-groups-list .discipleship-list-card .table-wrap,
.page-discipleship-people-list .discipleship-list-card .table-wrap,
.page-discipleship-table-scroll .table-card-plain .table-wrap,
.page-dg_reports_recap .dg-recap-section-card > .table-wrap,
.page-member-completeness .member-completeness-main-table .table-wrap,
.page-member-families-scroll .member-families-main-table .table-wrap {
  min-height: 0;
}

.page-msk_classes .table-card-plain {
  flex: 0 0 auto;
}

.page-msk_classes .msk-hero-card {
  flex-shrink: 0;
}

.page-discipleship-people-list .discipleship-list-card {
  flex: 0 0 auto;
}

.page-discipleship-people-list .discipleship-list-card .table-wrap {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  max-height: none;
}

.page-discipleship-people-list .people-hero-card {
  flex-shrink: 0;
}

.page-discipleship-groups-list .discipleship-list-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-discipleship-groups-list .groups-hero-card {
  flex-shrink: 0;
}

.page-discipleship-groups-list .discipleship-list-card.table-card-plain .table-wrap,
.page-discipleship-people-list .discipleship-list-card.table-card-plain .table-wrap,
.page-discipleship-table-scroll .table-card-plain .table-wrap,
.page-msk_classes .table-card-plain .table-wrap,
.page-spiritual_journey .table-card-plain .table-wrap,
.page-dg_reports_recap .dg-recap-section-card > .table-wrap {
  height: auto;
  min-height: 480px;
  max-height: clamp(480px, calc(100dvh - 220px), 1140px);
  overflow: auto;
}

.page-spiritual_journey .table-card-plain {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-spiritual_journey .journey-hero-card {
  flex-shrink: 0;
}

.app-page.is-central-readonly.page-discipleship-groups-list .discipleship-list-card .table-wrap,
.app-page.is-central-readonly.page-discipleship-people-list .discipleship-list-card .table-wrap,
.app-page.is-central-readonly.page-discipleship-table-scroll .table-card-plain .table-wrap,
.app-page.is-central-readonly.page-dg_reports_recap .dg-recap-section-card > .table-wrap,
.app-page.is-central-readonly.page-member-table-scroll .members-main-table .table-wrap,
.app-page.is-central-readonly.page-member-table-scroll .member-completeness-main-table .table-wrap,
.app-page.is-central-readonly.page-member-families-scroll .member-families-main-table .table-wrap,
.app-page.is-central-readonly.page-msk_classes .table-card-plain .table-wrap,
.app-page.is-central-readonly.page-spiritual_journey .table-card-plain .table-wrap {
  max-height: clamp(450px, calc(100dvh - 300px), 1050px);
}

.app-page.is-central-readonly.page-members .members-main-table .table-wrap {
  max-height: none;
}

.app-page.is-central-readonly.page-member_completeness .member-completeness-main-table .table-wrap,
.app-page.is-central-readonly.page-member_families .member-families-main-table .table-wrap {
  max-height: none;
}

.page-dg-public {
  background-color: #f3f7f9;
  background-image:
    radial-gradient(900px 420px at 8% -12%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(780px 420px at 92% -8%, rgba(245, 158, 11, 0.16), transparent 58%),
    linear-gradient(180deg, #f7fbfc 0%, #f6f2ea 100%);
}

.page-dg-public .container {
  max-width: 1160px;
  margin: 34px auto 52px;
}

.page-public-menu-home .container {
  max-width: 1160px;
  min-height: 100svh;
  height: 100svh;
  max-height: 100svh;
  margin: 0 auto;
  padding-top: clamp(8px, 1.8vh, 20px);
  padding-bottom: clamp(8px, 1.8vh, 20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.page-public-menu-home .public-menu-card {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.3vh, 14px);
  margin-bottom: 0;
  padding: clamp(14px, 1.8vh, 22px);
}

.page-public-menu-home .public-social-wrap {
  margin-top: clamp(6px, 1vh, 12px);
}

.page-public-menu-home {
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
}

.page-public-menu-home .public-menu-shell {
  gap: clamp(8px, 1.2vh, 14px);
}

.page-public-menu-home .public-menu-head {
  margin-bottom: 0;
}

.page-public-menu-home .public-menu-brand {
  gap: clamp(4px, 0.8vh, 8px);
}

.page-public-menu-home .public-menu-brand img {
  width: clamp(52px, 8svh, 82px);
  height: clamp(52px, 8svh, 82px);
}

.page-public-menu-home .public-menu-tagline {
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.07em;
}

.page-public-menu-home .public-menu-grid {
  gap: clamp(8px, 1.2vh, 14px);
}

.page-public-menu-home .public-menu-tile {
  min-height: clamp(106px, 14svh, 138px);
  padding: clamp(12px, 1.4vh, 15px) clamp(12px, 1.1vw, 15px);
  gap: 5px;
  align-items: center;
  text-align: center;
}

.page-public-menu-home .public-menu-tile-eyebrow {
  margin-top: 0;
  font-size: 10px;
  letter-spacing: 1px;
}

.page-public-menu-home .public-menu-tile:not(.is-primary) .public-menu-tile-title {
  font-size: clamp(14px, 1.3vw, 20px);
  line-height: 1.04;
}

.page-public-menu-home .public-menu-tile.is-primary {
  min-height: clamp(120px, 16svh, 164px);
  padding: clamp(14px, 1.7vh, 18px) clamp(14px, 1.2vw, 18px);
}

.page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-title {
  font-size: clamp(19px, 1.95vw, 30px);
  line-height: 1.02;
}

.page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-title.is-long,
.page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-title.is-xlong {
  font-size: clamp(17px, 1.7vw, 25px);
  line-height: 1.02;
}

.page-public-menu-home .public-menu-tile-sub {
  font-size: clamp(11px, 0.95vw, 14px);
}

.page-public-menu-home .public-menu-tile-cta {
  font-size: clamp(11px, 0.95vw, 13px);
}

.page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-cta {
  font-size: clamp(12px, 1vw, 14px);
}

@media (min-width: 981px) {
  .page-public-menu-home .public-menu-tile.is-half {
    grid-column: span 2;
    min-height: clamp(106px, 14svh, 138px);
    padding: clamp(10px, 1.15vh, 12px) clamp(10px, 0.95vw, 12px);
    gap: 4px;
  }

  .page-public-menu-home .public-menu-tile.is-half .public-menu-tile-eyebrow {
    font-size: 9px;
    letter-spacing: 0.9px;
  }

  .page-public-menu-home .public-menu-tile.is-half .public-menu-tile-title,
  .page-public-menu-home .public-menu-tile.is-half .public-menu-tile-title.is-long,
  .page-public-menu-home .public-menu-tile.is-half .public-menu-tile-title.is-xlong {
    font-size: clamp(11px, 0.95vw, 15px);
    line-height: 1.02;
    width: 100%;
    text-align: center;
    margin-top: auto;
    margin-bottom: auto;
  }

  .page-public-menu-home .public-menu-tile.is-half .public-menu-tile-cta {
    font-size: clamp(10px, 0.82vw, 12px);
    gap: 4px;
    margin-top: 0;
  }

  .page-public-menu-home .public-menu-tile.is-half .public-menu-tile-cta svg {
    width: 12px;
    height: 12px;
  }
}

.page-public-menu-home .public-social-label {
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 1.15px;
}

.page-public-menu-home .public-social-row {
  gap: 6px;
}

.page-public-menu-home .public-social-link {
  font-size: 13px;
}

.page-public-dg-branch {
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
}

.page-public-dg-branch .container {
  max-width: 1160px;
  min-height: 100svh;
  height: 100svh;
  max-height: 100svh;
  margin: 0 auto;
  padding-top: clamp(10px, 2vh, 24px);
  padding-bottom: clamp(10px, 2vh, 24px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-public-dg-branch .public-branch-select-card {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vh, 16px);
  margin-bottom: 0;
  padding: clamp(16px, 2vh, 24px);
}

.page-public-dg-branch .public-branch-head {
  display: grid;
  gap: clamp(8px, 1.2vh, 12px);
}

.page-public-dg-branch .public-branch-title-row {
  margin-bottom: 0;
}

.page-public-dg-branch .public-branch-title-wrap h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.02;
}

.page-public-dg-branch .public-branch-subtitle {
  margin: 8px 0 0;
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.28;
}

.page-public-dg-branch .public-branch-fieldset {
  min-height: 0;
}

.page-public-dg-branch .public-branch-grid {
  gap: clamp(10px, 1.3vh, 16px);
}

.page-public-dg-branch .public-branch-link-card {
  min-height: clamp(96px, 15vh, 132px);
  padding: clamp(12px, 1.6vh, 16px) clamp(12px, 1.2vw, 16px);
  gap: 6px;
}

.page-public-dg-branch .public-branch-card-eyebrow {
  margin-top: 0;
}

.page-public-dg-branch .public-branch-card-title {
  font-size: clamp(18px, 2.5vw, 28px);
  line-height: 1;
}

.page-public-dg-branch .public-branch-card-cta {
  font-size: clamp(12px, 1.1vw, 14px);
}

.page-public-dg-branch .public-branch-actions {
  margin-top: clamp(6px, 1.2vh, 14px);
}

.page-dg-public .public-branch-select-card {
  padding: 26px;
  border-radius: 20px;
  background:
    radial-gradient(340px 180px at -5% -12%, rgba(20, 184, 166, 0.18), transparent 72%),
    radial-gradient(320px 170px at 105% -8%, rgba(251, 191, 36, 0.14), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.09);
}

.page-dg-public .public-branch-title-row {
  margin-bottom: 12px;
  align-items: flex-start;
}

.page-dg-public .public-branch-title-wrap h2 {
  font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1.08;
}

.page-dg-public .public-branch-subtitle {
  color: #334155;
}

.page-dg-public .public-branch-meta {
  gap: 10px;
}

.page-dg-public .public-branch-count {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.24);
}

.page-dg-public .public-branch-guide {
  color: #475569;
  font-weight: 600;
}

.page-dg-public .public-branch-grid {
  gap: 16px;
}

.page-dg-public .public-branch-link-card {
  border-color: rgba(148, 163, 184, 0.38);
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.95)),
    radial-gradient(170px 92px at 0% 100%, rgba(15, 118, 110, 0.1), transparent 74%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.page-dg-public .public-branch-link-card::before {
  background: linear-gradient(90deg, #0f766e, #14b8a6, #f59e0b);
}

.page-dg-public .public-branch-link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.46);
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.15);
}

.page-dg-public .public-branch-card-eyebrow {
  color: #0d9488;
}

.page-dg-public .public-branch-card-title {
  font-size: clamp(22px, 2.3vw, 32px);
  letter-spacing: 0.2px;
}

.page-dg-public .public-branch-card-cta {
  color: #0f766e;
}

.page-dg-public .public-branch-actions {
  margin-top: 22px;
}

.page-dg-public .public-branch-actions .btn.ghost {
  border-color: rgba(15, 118, 110, 0.36);
  color: #0f766e;
  background: rgba(240, 253, 250, 0.86);
}

.page-dg-public .public-branch-actions .btn.ghost:hover {
  border-color: rgba(15, 118, 110, 0.5);
  background: #ecfdf5;
}

@media (min-width: 900px) {
  .page-public-menu-home .container {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding-top: 14px;
    padding-bottom: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .page-public-menu-home .container {
    width: min(78vw, 1520px);
    max-width: none;
  }

  .page-public-menu-home .public-menu-card {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .app-page .container > .card-row.discipleship-page-head {
    align-items: flex-start;
    gap: 10px;
  }

  .app-page .container > .card-row.discipleship-page-head .actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .app-page .container > .card-row.discipleship-page-head .actions .search {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .app-page.page-discipleship-groups-list .container > .card-row.discipleship-page-head .actions .search,
  .app-page.page-discipleship-people-list .container > .card-row.discipleship-page-head .actions .search,
  .app-page.page-spiritual_journey .container > .card-row.discipleship-page-head .actions .search,
  .app-page.page-msk_classes .container > .card-row.discipleship-page-head .actions .search {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .page-dg-public .public-branch-select-card {
    padding: 20px;
    border-radius: 18px;
  }

  .page-dg-public .public-branch-title-row .badge {
    align-self: flex-start;
  }

  .page-dg-public .public-branch-link-card {
    min-height: 118px;
  }

  .page-public-dg-branch .container {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .page-public-dg-branch .public-branch-select-card {
    padding: 18px;
  }

  .page-public-dg-branch .public-branch-title-wrap h2 {
    font-size: clamp(22px, 4.5vw, 30px);
  }

  .page-public-dg-branch .public-branch-subtitle {
    font-size: clamp(13px, 2.4vw, 16px);
    line-height: 1.22;
  }

  .page-public-dg-branch .public-branch-link-card {
    min-height: clamp(92px, 13vh, 116px);
  }
}

@media (max-width: 640px) {
  .page-public-menu-home .container {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .page-public-dg-branch .container {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .page-dg-public .public-branch-select-card {
    padding: 16px;
  }

  .page-dg-public .public-branch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .page-dg-public .public-branch-meta {
    gap: 6px;
  }

  .page-dg-public .public-branch-count {
    min-height: 28px;
    padding: 3px 10px;
  }

  .page-dg-public .public-branch-guide {
    font-size: 12px;
  }

  .page-dg-public .public-branch-link-card {
    min-height: 124px;
    padding: 14px 12px;
  }

  .page-dg-public .public-branch-card-title {
    font-size: clamp(18px, 6vw, 24px);
    line-height: 1.06;
  }

  .page-public-dg-branch .public-branch-select-card {
    gap: 10px;
    padding: 12px;
  }

  .page-public-dg-branch .public-branch-title-row {
    gap: 8px;
  }

  .page-public-dg-branch .public-branch-title-wrap h2 {
    font-size: clamp(18px, 5vw, 23px);
    line-height: 1.04;
  }

  .page-public-dg-branch .public-branch-subtitle {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.2;
  }

  .page-public-dg-branch .public-branch-meta {
    gap: 4px;
  }

  .page-public-dg-branch .public-branch-count {
    min-height: 24px;
    padding: 2px 8px;
    font-size: 11px;
  }

  .page-public-dg-branch .public-branch-guide {
    font-size: 11px;
  }

  .page-public-dg-branch .public-branch-link-card {
    min-height: 90px;
    padding: 10px 10px;
    gap: 4px;
  }

  .page-public-dg-branch .public-branch-card-eyebrow {
    font-size: 10px;
    letter-spacing: 0.9px;
  }

  .page-public-dg-branch .public-branch-card-title {
    font-size: clamp(15px, 4.8vw, 20px);
    line-height: 1;
  }

  .page-public-dg-branch .public-branch-card-cta {
    font-size: 10px;
    gap: 4px;
  }

  .page-public-dg-branch .public-branch-card-cta svg {
    width: 11px;
    height: 11px;
  }

  .page-public-dg-branch .public-branch-actions {
    margin-top: 8px;
  }

  .page-public-dg-branch .public-branch-actions .btn.ghost {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .page-public-menu-home .public-menu-card {
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
  }

  .page-public-menu-home .public-menu-shell {
    gap: 8px;
  }

  .page-public-menu-home .public-menu-brand img {
    width: 48px;
    height: 48px;
  }

  .page-public-menu-home .public-menu-tagline {
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .page-public-menu-home .public-menu-grid {
    gap: 8px;
  }

  .page-public-menu-home .public-menu-tile {
    min-height: 82px;
    padding: 9px;
    gap: 3px;
  }

  .page-public-menu-home .public-menu-tile.is-primary {
    grid-column: span 2;
    min-height: 84px;
    padding: 10px 9px;
  }

  .page-public-menu-home .public-menu-tile-eyebrow {
    font-size: 9px;
    letter-spacing: 0.85px;
  }

  .page-public-menu-home .public-menu-tile:not(.is-primary) .public-menu-tile-title {
    font-size: clamp(12px, 3.55vw, 15px);
    line-height: 1.02;
  }

  .page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-title,
  .page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-title.is-long,
  .page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-title.is-xlong {
    font-size: clamp(13px, 3.9vw, 17px);
    line-height: 1;
  }

  .page-public-menu-home .public-menu-tile-sub {
    font-size: 10px;
    line-height: 1.08;
  }

  .page-public-menu-home .public-menu-tile-cta,
  .page-public-menu-home .public-menu-tile.is-primary .public-menu-tile-cta {
    font-size: 10px;
    gap: 4px;
  }

  .page-public-menu-home .public-menu-tile-cta svg {
    width: 11px;
    height: 11px;
  }

  .page-public-menu-home .public-social-wrap {
    margin-top: 6px;
  }

  .page-public-menu-home .public-social-label {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .page-public-menu-home .public-social-row {
    gap: 5px;
  }

  .page-public-menu-home .public-social-link {
    font-size: 11px;
  }

  .page-public-menu-home .public-login-fab {
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 1180px) {
  .container {
    padding: 0 20px;
    margin: 24px auto 44px;
  }
  .card {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .form-grid.worship-attendance-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  body {
    background-attachment: scroll;
  }
  .app-shell {
    position: relative;
    flex-direction: column;
    min-height: 100vh;
  }
  .sidebar-toggle {
    display: inline-flex;
    position: sticky;
    top: 12px;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin: 12px 0 0 12px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    z-index: 60;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 50;
    border: 0;
    padding: 0;
  }
  .app-shell.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    z-index: 65;
    padding: 16px;
    transform: translateX(calc(-100% - 14px));
    transition: transform 0.22s ease;
    box-shadow: 20px 0 36px rgba(15, 23, 42, 0.26);
    border-bottom: 0;
  }
  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .app-main {
    width: 100%;
  }
  .page-tree {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .page-tree .app-shell,
  .page-tree .app-main {
    height: auto;
    overflow: visible;
  }
  .page-discipleship-groups-list,
  .page-discipleship-people-list,
  .page-discipleship-table-scroll,
  .page-dg_reports_recap,
  .page-member-table-scroll,
  .page-member-families-scroll {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .page-discipleship-groups-list .app-shell,
  .page-discipleship-people-list .app-shell,
  .page-discipleship-table-scroll .app-shell,
  .page-dg_reports_recap .app-shell,
  .page-member-table-scroll .app-shell,
  .page-member-families-scroll .app-shell,
  .page-discipleship-groups-list .app-main,
  .page-discipleship-people-list .app-main,
  .page-discipleship-table-scroll .app-main,
  .page-dg_reports_recap .app-main,
  .page-member-table-scroll .app-main,
  .page-member-families-scroll .app-main {
    height: auto;
    overflow: visible;
  }
  .page-tree .container {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 16px;
  }
  .page-discipleship-dashboard .container,
  .page-discipleship-groups-list .container,
  .page-discipleship-people-list .container,
  .page-discipleship-table-scroll .container,
  .page-dg_reports_recap .container,
  .page-member-table-scroll .container,
  .page-member-families-scroll .container {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 16px;
    gap: 12px;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .page-discipleship-groups-list .discipleship-list-card,
  .page-discipleship-people-list .discipleship-list-card,
  .page-discipleship-table-scroll .table-card-plain,
  .page-dg_reports_recap .dg-recap-section-card,
  .page-msk_classes .table-card-plain,
  .page-spiritual_journey .table-card-plain {
    min-height: 0;
    flex: 0 0 auto;
  }
  .page-member-table-scroll .members-main-table,
  .page-member-table-scroll .member-completeness-main-table {
    min-height: 0;
  }
  .page-member-families-scroll .member-families-main-table {
    min-height: 0;
  }
  .page-discipleship-groups-list .discipleship-list-card .table-wrap,
  .page-discipleship-people-list .discipleship-list-card .table-wrap,
  .page-discipleship-table-scroll .table-card-plain .table-wrap,
  .page-dg_reports_recap .dg-recap-section-card > .table-wrap,
  .page-msk_classes .table-card-plain .table-wrap,
  .page-spiritual_journey .table-card-plain .table-wrap,
  .app-page.is-central-readonly.page-discipleship-groups-list .discipleship-list-card .table-wrap,
  .app-page.is-central-readonly.page-discipleship-people-list .discipleship-list-card .table-wrap,
  .app-page.is-central-readonly.page-discipleship-table-scroll .table-card-plain .table-wrap,
  .app-page.is-central-readonly.page-dg_reports_recap .dg-recap-section-card > .table-wrap,
  .app-page.is-central-readonly.page-msk_classes .table-card-plain .table-wrap,
  .app-page.is-central-readonly.page-spiritual_journey .table-card-plain .table-wrap,
  .page-member-table-scroll .members-main-table .table-wrap,
  .page-member-table-scroll .member-completeness-main-table .table-wrap,
  .page-member-families-scroll .member-families-main-table .table-wrap {
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }
  .page-spiritual_journey .table-card-plain {
    margin-bottom: 32px;
    padding: 0 8px 8px;
  }
  .page-spiritual_journey .container {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .page-tree .tree-scroll {
    max-height: min(68vh, 680px);
  }
  .page-tree-v2 .tree-v2-scroll {
    max-height: min(68vh, 680px);
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .stats.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .member-pie-grid {
    grid-template-columns: 1fr;
  }
  .discipleship-progress-pie-grid {
    grid-template-columns: 1fr;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .chart-card.span-2 {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .page-tree-v2 {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .page-tree-v2 .app-shell,
  .page-tree-v2 .app-main,
  .page-tree-v2 .container {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .page-tree-v2 .container {
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  .central-page-head h1,
  .discipleship-dashboard-hero-copy h2,
  .people-hero-copy h1,
  .groups-hero-copy h1,
  .journey-hero-copy h1,
  .msk-hero-copy h1,
  .dg-recap-hero-copy h1,
  .tree-hero-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  h1 {
    font-size: 24px;
    margin: 4px 0 14px;
  }
  .container {
    padding: 0 16px;
    margin: 20px auto 36px;
  }

  .central-rekap-quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .central-rekap-quick::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .stats .stat {
    min-height: 122px;
    padding: 14px;
  }
  .stats .stat-value {
    font-size: clamp(24px, 6.2vw, 34px);
  }
  .member-pie-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-layout {
    grid-template-columns: 1fr;
  }
  .member-pie-stage,
  .member-pie-svg {
    width: 200px;
    height: 200px;
  }
  .discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-stage,
  .discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-svg {
    width: 208px;
    height: 208px;
  }
  .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .chart-svg {
    min-width: 560px;
  }
  .tree-v2-card {
    padding: 12px;
  }

  .tree-v2-scroll {
    overflow: auto hidden;
    padding: 6px;
  }

  .tree-v2-graph {
    --tree-v2-node-width: 182px;
    --tree-v2-node-height: 86px;
    padding: 8px 12px 18px;
  }
  .tree-v2-children {
    --tree-v2-gap: 10px;
    gap: var(--tree-v2-gap);
  }
  .tree-v2-node {
    padding: 7px 9px;
  }
  .tree-v2-name {
    font-size: 12px;
  }
  .tree-v2-meta {
    font-size: 10px;
  }
  .dg-rating-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sidebar {
    width: min(300px, 88vw);
    padding: 14px 12px;
  }
  .sidebar-brand .brand {
    font-size: 16px;
  }
  .brand-sub {
    font-size: 10px;
    letter-spacing: 1.5px;
  }
  .nav {
    width: 100%;
  }
  .page-login .container {
    margin: 20px auto;
  }
  .page-public-links .container {
    margin: 20px auto;
  }
  .public-social-wrap {
    margin-top: 10px;
  }
  .public-social-label {
    font-size: 10px;
    letter-spacing: 1.2px;
  }
  .public-social-row {
    gap: 6px;
  }
  .container {
    padding: 0 12px;
    margin: 16px auto 30px;
  }
  .page-tree-v2 .container {
    padding: 12px;
    gap: 12px;
  }
  .app-page.is-central-readonly .container {
    margin: 12px auto 30px;
    padding-top: 16px;
  }
  .tree-v2-intro {
    padding: 10px 11px;
  }
  .tree-v2-graph {
    --tree-v2-node-width: 166px;
    --tree-v2-node-height: 80px;
  }
  .tree-v2-node {
    padding: 6px 8px;
  }
  .tree-v2-children {
    --tree-v2-gap: 8px;
    --tree-v2-connector: 14px;
    gap: var(--tree-v2-gap);
    margin-top: 12px;
    padding-top: var(--tree-v2-connector);
  }
  .card {
    padding: 14px;
    border-radius: 12px;
  }
  .form-grid,
  .modal-form {
    grid-template-columns: 1fr;
  }
  .form-grid.worship-attendance-form {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .card-row .actions {
    width: 100%;
  }
  .card-row .actions > * {
    flex: 1 1 100%;
    width: 100%;
  }
  .card-row .actions .search {
    max-width: 100%;
  }
  .page-member-families .member-family-tools {
    width: 100%;
  }
  .page-member-completeness .member-completeness-filter-form {
    width: 100%;
  }
  .page-member-completeness .member-completeness-filter-form label {
    width: 100%;
  }
  .member-completeness-filter-select {
    width: 100%;
    min-width: 0;
  }
  .page-member-families .member-family-tools > * {
    flex: 1 1 100%;
    width: 100%;
  }
  .member-family-member,
  .member-family-contact {
    width: 100%;
    border-radius: 10px;
  }
  .dg-recap-report-tools {
    flex-wrap: wrap;
  }
  .dg-recap-filter,
  .dg-recap-filter .search,
  .dg-recap-report-search {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
    margin-left: 0;
  }
  #dg-recap-report-list .dg-recap-report-tools {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  #dg-recap-report-list .dg-recap-filter,
  #dg-recap-report-list .dg-recap-filter .search,
  #dg-recap-report-list .dg-recap-report-search {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
    margin-left: 0;
  }
  .card-row .actions.table-tools > * {
    flex: 0 1 auto;
    width: auto;
  }
  .card-row .actions.msk-table-tools > * {
    flex: 0 1 auto;
    width: auto;
  }
  .card-row .actions.members-table-tools > * {
    flex: 0 1 auto;
    width: auto;
  }
  .card-row .actions.worship-table-tools > * {
    flex: 0 1 auto;
    width: auto;
  }
  .card-row .actions.msk-table-tools .msk-table-search {
    flex: 1 1 180px;
    min-width: 140px;
    width: auto;
    max-width: 240px;
  }
  .card-row .actions.members-table-tools .members-table-search {
    flex: 1 1 180px;
    min-width: 140px;
    width: auto;
    max-width: 240px;
  }
  .card-row .actions.worship-table-tools .worship-table-search {
    flex: 1 1 180px;
    min-width: 140px;
    width: auto;
    max-width: 240px;
  }
  .central-rekap-toolbar {
    padding: 12px;
  }
  .central-rekap-head {
    align-items: stretch;
  }
  .stats.compact {
    grid-template-columns: 1fr;
  }
  .table th,
  .table td {
    padding: 8px 6px;
    font-size: 13px;
  }
  .card.table-card-plain .table-wrap {
    border-radius: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .card.table-card-plain .table th,
  .card.table-card-plain .table td {
    padding: 9px 8px;
  }
  .chart-svg {
    min-width: 520px;
  }
  .dg-rating-scale {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .modal {
    padding: 12px;
  }
  .modal-card {
    width: min(560px, 100%);
    max-height: var(--modal-max-height);
    border-radius: 12px;
    padding: 0;
  }
  .modal-card.msk-form-modal-card {
    height: var(--modal-max-height);
    max-height: var(--modal-max-height);
  }
  .modal-head {
    padding: 14px;
  }
  .modal-body {
    padding: 10px 14px 14px;
  }
  .modal-actions {
    justify-content: stretch;
  }
  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .alert {
    top: 12px;
    right: 12px;
    max-width: calc(100vw - 24px);
  }
  .tree.horizontal .tree-row,
  .group-members .tree-row {
    --row-gap: 8px;
  }
  .tree.horizontal .tree-node {
    width: 170px;
  }
  .group-card {
    min-width: 160px;
  }

}

@media (max-width: 560px) {
  .sidebar {
    width: min(280px, 90vw);
    padding: 12px 10px;
  }
  .container {
    padding: 0 10px;
  }
  .hero {
    padding: 16px;
    gap: 14px;
  }
  .hero-copy h1 {
    font-size: clamp(22px, 8vw, 30px);
  }
  .lead {
    font-size: 14px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .feature-card {
    min-height: 0;
  }
  .member-pie-stage,
  .member-pie-svg {
    width: 184px;
    height: 184px;
  }
  .discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-stage,
  .discipleship-progress-pie-grid > .member-pie-card:first-child .member-pie-svg {
    width: 188px;
    height: 188px;
  }
  .member-pie-center .value {
    font-size: 26px;
  }
  .member-pie-legend-item {
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 8px;
  }
  .member-pie-legend-item .count {
    grid-column: 1 / -1;
    margin-left: 18px;
    white-space: normal;
  }
  .chart-svg {
    min-width: 460px;
  }
  .dg-rating-hint {
    flex-direction: column;
    align-items: flex-start;
  }
  .dg-rating-hint span:last-child {
    text-align: left;
  }

}

.page-login {
  background-color: #f3eee1;
  background-image:
    radial-gradient(760px 420px at 0% 0%, rgba(15, 118, 110, 0.2), transparent 64%),
    radial-gradient(620px 360px at 100% 0%, rgba(245, 158, 11, 0.18), transparent 60%),
    linear-gradient(135deg, #f8f4eb 0%, #eef7f4 48%, #fbf8f2 100%);
}

.page-login .container {
  max-width: 1120px;
  min-height: calc(100vh - 68px);
  margin: 28px auto 40px;
  display: flex;
  align-items: center;
}

.login-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 24px;
  align-items: stretch;
}

.login-brand-panel,
.login-card {
  animation: login-rise 0.55s ease-out both;
}

.login-card {
  animation-delay: 0.08s;
}

.login-brand-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 30px;
  border: 1px solid rgba(15, 79, 74, 0.14);
  background:
    radial-gradient(260px 180px at 4% 8%, rgba(255, 255, 255, 0.24), transparent 72%),
    linear-gradient(160deg, rgba(11, 79, 74, 0.98) 0%, rgba(15, 118, 110, 0.95) 46%, rgba(242, 236, 222, 0.98) 100%);
  box-shadow: 0 28px 56px rgba(15, 23, 42, 0.14);
  color: #f8fafc;
  isolation: isolate;
}

.login-brand-panel::before {
  content: "REC";
  position: absolute;
  right: 24px;
  bottom: 12px;
  font-family: "Fraunces", serif;
  font-size: clamp(84px, 12vw, 126px);
  line-height: 0.9;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 28px;
  width: 290px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 180px 180px 28px 28px;
  pointer-events: none;
}

.login-brand-top,
.login-brand-hero,
.login-brand-grid,
.login-brand-footer {
  position: relative;
  z-index: 1;
}

.login-brand-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.login-brand-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-brand-tag.is-soft {
  background: rgba(255, 255, 255, 0.08);
}

.login-brand-hero {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.login-brand-logo-wrap {
  padding: 20px;
  border-radius: 38px 38px 20px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 246, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 16px 30px rgba(8, 47, 73, 0.16);
}

.login-brand-logo-wrap img {
  display: block;
  width: 100%;
  max-width: 130px;
  margin: 0 auto;
}

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

.login-brand-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.login-brand-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.login-brand-copy p {
  margin: 0;
  max-width: 48ch;
  color: rgba(241, 245, 249, 0.86);
  font-size: 15px;
  line-height: 1.65;
}

.login-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.login-brand-pillar {
  padding: 16px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 24px rgba(8, 47, 73, 0.08);
  color: #0f172a;
}

.login-brand-pillar-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f766e;
}

.login-brand-pillar-title {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.2;
}

.login-brand-pillar p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.login-brand-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.login-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 79, 74, 0.2);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  padding: 34px;
  border-radius: 30px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #0f766e 0%, #14b8a6 42%, #f59e0b 100%);
}

.login-head {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-title {
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.login-sub {
  max-width: 34ch;
  color: #51606b;
  font-size: 16px;
  line-height: 1.7;
}

.login-form {
  grid-template-columns: 1fr;
  gap: 16px;
}

.login-field {
  gap: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.login-field input {
  height: 58px;
  padding: 14px 16px;
  border-radius: 18px;
  border-color: rgba(148, 163, 184, 0.46);
  background: linear-gradient(180deg, #fbfdfd, #f3f7f7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-field input::placeholder {
  color: #94a3b8;
}

.login-field input:focus {
  outline: none;
  border-color: #0f766e;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.login-actions {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 4px;
}

.login-actions .btn {
  min-width: 144px;
  min-height: 54px;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
}

.login-actions .btn.ghost {
  background: #eef2f7;
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.login-note {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 981px) {
  .page-login {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page-login .container {
    height: auto;
    min-height: 100vh;
    margin: 0 auto;
    padding-top: 18px;
    padding-bottom: 24px;
    align-items: flex-start;
  }

  .login-shell {
    height: auto;
    min-height: min(840px, calc(100vh - 42px));
    gap: 18px;
  }

  .login-brand-panel,
  .login-card {
    height: auto;
    min-height: 100%;
    padding: 28px;
  }

  .login-brand-panel {
    display: flex;
    flex-direction: column;
  }

  .login-brand-panel::before {
    font-size: clamp(72px, 10vw, 112px);
  }

  .login-brand-panel::after {
    width: 248px;
    height: 314px;
  }

  .login-brand-top {
    margin-bottom: 18px;
  }

  .login-brand-hero {
    grid-template-columns: 146px minmax(0, 1fr);
    gap: 18px;
  }

  .login-brand-logo-wrap {
    padding: 16px;
  }

  .login-brand-logo-wrap img {
    max-width: 112px;
  }

  .login-brand-copy {
    gap: 10px;
  }

  .login-brand-copy h1 {
    max-width: 9ch;
    font-size: clamp(31px, 3.35vw, 44px);
  }

  .login-brand-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .login-brand-grid {
    margin-top: 18px;
    gap: 12px;
  }

  .login-brand-pillar {
    padding: 14px 13px;
    border-radius: 18px;
  }

  .login-brand-pillar-title {
    font-size: 16px;
  }

  .login-brand-pillar p {
    font-size: 12px;
    line-height: 1.45;
  }

  .login-brand-footer {
    margin-top: 14px;
    gap: 8px;
  }

  .login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .login-head {
    margin-bottom: 18px;
    gap: 8px;
  }

  .login-title {
    font-size: clamp(34px, 3.7vw, 48px);
  }

  .login-sub {
    font-size: 15px;
    line-height: 1.55;
  }

  .login-form {
    gap: 14px;
  }

  .login-field {
    gap: 8px;
    font-size: 13px;
  }

  .login-field input {
    height: 52px;
  }

  .login-actions .btn {
    min-height: 50px;
    padding: 12px 18px;
  }

  .login-note {
    font-size: 12px;
    line-height: 1.5;
  }
}

@media (max-width: 980px) {
  .page-login .container {
    min-height: auto;
    align-items: stretch;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel::after {
    right: -12px;
  }

  .login-brand-copy h1,
  .login-sub {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .page-login .container {
    margin: 18px auto 28px;
  }

  .login-shell {
    gap: 16px;
  }

  .login-brand-panel,
  .login-card {
    padding: 24px;
    border-radius: 24px;
  }

  .login-brand-top {
    margin-bottom: 18px;
  }

  .login-brand-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .login-brand-logo-wrap {
    max-width: 170px;
  }

  .login-brand-grid {
    grid-template-columns: 1fr;
  }

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

  .login-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .login-brand-tag {
    width: 100%;
  }

  .login-brand-panel::before {
    right: 14px;
    bottom: 18px;
    font-size: 72px;
  }

  .login-brand-panel::after {
    width: 210px;
    height: 280px;
  }

  .login-title {
    font-size: clamp(32px, 11vw, 42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-brand-panel,
  .login-card {
    animation: none;
  }
}

#msk-table td {
  vertical-align: middle;
}

.msk-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(460px 200px at 0% 0%, rgba(20, 184, 166, 0.12), transparent 62%),
    radial-gradient(380px 180px at 100% 0%, rgba(245, 158, 11, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.msk-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-msk) 72%, white) 46%, var(--discipleship-dg1) 100%);
}

.members-hero-card::before {
  background: linear-gradient(90deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 60%, white) 44%, var(--accent) 100%);
}

.members-hero-card .msk-hero-kicker {
  background: color-mix(in srgb, var(--primary) 12%, white);
  color: var(--primary);
}

.dashboard-main-hero-card::before {
  background: linear-gradient(90deg, #0f766e 0%, color-mix(in srgb, #0ea5e9 52%, white) 44%, #f59e0b 100%);
}

.dashboard-main-hero-card .msk-hero-kicker {
  background: color-mix(in srgb, #0f766e 12%, white);
  color: #0f766e;
}

.dashboard-main-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 24px;
  align-items: start;
}

.dashboard-main-hero-primary {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dashboard-main-hero-actions {
  margin-top: 0;
}

.dashboard-main-hero-card .hero-panel {
  width: 100%;
  margin: 0;
}

.dashboard-main-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.dashboard-main-modules-card {
  padding: 24px;
}

.dashboard-main-section-head {
  margin-bottom: 18px;
}

.dashboard-account-access-card {
  min-height: 0;
}

.dashboard-account-access-card .feature-title {
  word-break: break-word;
}

.dashboard-account-access-card .feature-stat {
  align-items: flex-start;
}

.dashboard-account-access-card .feature-stat strong {
  max-width: 58%;
  white-space: normal;
  line-height: 1.35;
}

.dashboard-account-access-card .feature-meta {
  justify-content: center;
}

.worship-hero-card::before {
  background: linear-gradient(90deg, #d97706 0%, color-mix(in srgb, #0284c7 54%, white) 44%, #7c3aed 100%);
}

.worship-hero-card .msk-hero-kicker {
  background: color-mix(in srgb, #d97706 12%, white);
  color: #b45309;
}

.msk-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.msk-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 640px;
}

.msk-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-msk) 12%, white);
  color: var(--discipleship-msk);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.msk-hero-copy h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.msk-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.msk-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  width: min(100%, 420px);
}

.msk-hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 213, 225, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.msk-hero-stat-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.msk-hero-stat-value {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.msk-hero-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.msk-hero-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}

.msk-import-inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.msk-export-inline-form {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.msk-import-trigger {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.msk-import-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.msk-hero-search-wrap {
  width: min(100%, 440px);
  flex: 0 1 440px;
  min-width: 220px;
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

.msk-hero-tools .msk-table-search,
.msk-hero-tools .btn.tiny.icon-btn {
  margin: 0;
}

.msk-hero-tools .msk-batch-select {
  min-width: 220px;
}

.msk-hero-tools .msk-table-search {
  width: 100%;
  min-width: 220px;
}

.members-hero-tools .btn.tiny.icon-btn,
.members-hero-tools .members-table-search {
  margin: 0;
}

.members-hero-tools .members-table-search {
  width: 100%;
  min-width: 220px;
}

.member-family-hero-tools .member-family-search {
  width: 100%;
  min-width: 220px;
  margin: 0;
}

.member-family-hero-search-wrap {
  width: min(100%, 380px);
  flex: 0 1 380px;
}

.member-completeness-hero-controls {
  flex: 0 0 auto;
  width: auto;
}

.member-dashboard-hero-controls {
  flex-wrap: wrap;
}

.member-dashboard-hero-meta {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.member-completeness-hero-tools .member-completeness-filter-form {
  margin: 0;
}

.member-completeness-hero-tools .member-completeness-filter-select {
  min-width: 220px;
  height: 40px;
  border-radius: 14px;
  padding: 0 40px 0 14px;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(203, 213, 225, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.member-completeness-hero-search-wrap {
  width: min(100%, 380px);
  flex: 0 1 380px;
}

.member-birthday-hero-controls {
  flex: 0 0 auto;
  width: auto;
}

.member-birthday-hero-tools .member-birthday-month-form {
  margin: 0;
}

.member-birthday-hero-tools .member-birthday-month-form input[type="month"] {
  min-width: 220px;
  height: 40px;
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(203, 213, 225, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.worship-hero-tools .btn.tiny.icon-btn,
.worship-hero-tools .worship-table-search {
  margin: 0;
}

.worship-hero-tools .worship-table-search {
  width: 100%;
  min-width: 220px;
}

.worship-hero-meta {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.worship-hero-search-wrap {
  width: min(100%, 380px);
  flex: 0 1 380px;
}

.worship-steward-hero-controls {
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  flex: 1 1 auto;
}

.worship-steward-month-form {
  margin: 0;
  flex: 0 0 auto;
}

.worship-steward-month-form input[type="month"] {
  min-width: 220px;
  height: 40px;
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(203, 213, 225, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.worship-steward-hero-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  flex: 1 1 560px;
  width: min(100%, 720px);
}

.worship-steward-hero-field {
  display: grid;
  gap: 4px;
  font-size: 11px;
  line-height: 1.1;
  color: #64748b;
}

.worship-steward-hero-field input {
  width: 100%;
  min-width: 0;
}

.worship-steward-editor-card {
  padding: 24px;
}

.worship-steward-service-counts-card {
  padding: 16px 18px;
}

.worship-steward-service-counts-head {
  margin-bottom: 12px;
}

.worship-steward-service-counts-head h2 {
  margin: 0;
}

.worship-steward-service-counts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.worship-steward-service-count-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.92));
  border: 1px solid rgba(226, 232, 240, 0.96);
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.worship-steward-service-counts-empty {
  margin: 0;
  color: #64748b;
}

.worship-steward-section-head {
  margin-bottom: 16px;
}

.worship-steward-section-head .panel-note {
  margin: 6px 0 0;
}

.worship-steward-form {
  display: grid;
  gap: 18px;
}

.worship-steward-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.52), rgba(241, 245, 249, 0.28));
}

.worship-steward-planner-table {
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.36);
  border-top: 1px solid rgba(148, 163, 184, 0.26);
}

.worship-steward-planner-table thead th {
  white-space: nowrap;
  padding: 1px 3px;
  font-size: 10px;
  vertical-align: middle;
  border-right: 1px solid rgba(148, 163, 184, 0.38);
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.worship-steward-editor-card .worship-steward-planner-table tbody th {
  min-width: 124px;
  vertical-align: middle;
  background: rgba(229, 231, 235, 0.96);
  padding: 1px 3px;
  border-right: 1px solid rgba(148, 163, 184, 0.38);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.worship-steward-row-label {
  display: block;
  line-height: 1.05;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.worship-steward-editor-card .worship-steward-planner-table td {
  min-width: 78px;
  vertical-align: middle;
  padding: 0 5px !important;
  background: rgba(243, 244, 246, 0.94);
  border-right: 1px solid rgba(148, 163, 184, 0.38);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.worship-steward-editor-card .worship-steward-planner-table td > * {
  margin: 0;
}

.worship-steward-cell-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100%;
}

.worship-steward-cell {
  box-sizing: border-box;
  width: 100%;
  min-height: 24px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 3px 5px;
  background: rgba(255, 255, 255, 0.96);
  resize: none;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.15;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.worship-steward-cell.is-duo {
  min-height: 32px;
}

.worship-steward-duo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 2px 0;
  width: 100%;
}

.worship-steward-duo-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 24px;
  height: 24px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 12px;
  line-height: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.worship-steward-training-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 24px;
  height: 24px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  border-radius: 8px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.96);
  font-size: 12px;
  line-height: 24px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.worship-steward-training-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 2px 0;
  width: 100%;
}

.worship-steward-training-preview {
  display: block;
  min-height: 10px;
  font-size: 9px;
  line-height: 1.05;
  text-align: center;
  color: rgba(71, 85, 105, 0.92);
}

.worship-steward-duo-input:focus {
  border-color: color-mix(in srgb, #0f766e 34%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, #0f766e 12%, transparent);
  outline: none;
}

.worship-steward-training-input:focus {
  border-color: color-mix(in srgb, #0f766e 34%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, #0f766e 12%, transparent);
  outline: none;
}

.worship-steward-cell:focus {
  border-color: color-mix(in srgb, #0f766e 34%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, #0f766e 12%, transparent);
  outline: none;
}

.worship-steward-action-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.worship-steward-action-bar .btn {
  min-width: 190px;
  justify-content: center;
}

.worship-steward-danger-form {
  margin: 0;
}

.worship-steward-danger-form .btn {
  border: 1px solid rgba(239, 68, 68, 0.26);
  color: #b91c1c;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(254, 242, 242, 0.98));
}

.worship-steward-saved-title {
  display: grid;
  gap: 4px;
}

.worship-steward-saved-title strong {
  color: #0f172a;
}

.worship-steward-saved-title span {
  color: #64748b;
  font-size: 12px;
}

.page-worship_penatalayan .table-card-plain .table-wrap {
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

@media (max-width: 980px) {
  .dashboard-main-hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .worship-steward-hero-fields {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .worship-steward-action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .worship-steward-action-bar .btn,
  .worship-steward-danger-form {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-main-hero-stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

.msk-name-cell,
.msk-month-cell,
.msk-progress-cell {
  display: grid;
  gap: 5px;
}

.msk-name-main {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.msk-name-sub,
.msk-month-sub,
.msk-progress-meta,
.msk-wa-empty {
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.msk-month-main {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.msk-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.msk-status-badge.is-pending {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.24);
  color: #475569;
}

.msk-status-badge.is-progress {
  background: color-mix(in srgb, var(--discipleship-msk) 12%, white);
  border-color: color-mix(in srgb, var(--discipleship-msk) 22%, white);
  color: var(--discipleship-msk);
}

.msk-status-badge.is-complete {
  background: color-mix(in srgb, var(--discipleship-msk) 16%, white);
  border-color: color-mix(in srgb, var(--discipleship-msk) 28%, white);
  color: var(--discipleship-msk);
}

.msk-status-badge.is-inactive {
  background: rgba(203, 213, 225, 0.24);
  border-color: rgba(148, 163, 184, 0.34);
  color: #475569;
}

.msk-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.msk-progress-value {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.msk-progress-percent {
  font-size: 12px;
  font-weight: 800;
  color: var(--discipleship-msk);
}

.msk-progress-bar {
  position: relative;
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.92);
}

.msk-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--discipleship-msk) 70%, white) 0%, var(--discipleship-msk) 100%);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--discipleship-msk) 24%, transparent);
}

.msk-wa-link {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  font-weight: 700;
}

.msk-wa-link span {
  color: #0f172a;
  font-weight: 700;
}

.people-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(380px 180px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.people-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-dg1) 72%, white) 46%, var(--discipleship-dg2) 100%);
}

.people-hero-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.people-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 680px;
}

.people-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.people-hero-copy h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.people-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.people-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  width: min(100%, 420px);
}

.people-hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 213, 225, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.people-hero-stat-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.people-hero-stat-value {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.people-hero-tools {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.7);
}

.people-hero-filter-wrap {
  width: min(100%, 250px);
}

.people-hero-search-wrap {
  width: min(100%, 440px);
}

.people-status-filter,
.people-hero-tools .people-table-search {
  width: 100%;
}

.people-dashboard-table td {
  vertical-align: middle;
}

.people-name-cell,
.people-role-cell,
.people-contact-cell {
  display: grid;
  gap: 8px;
}

.people-name-main {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.people-name-sub,
.people-role-sub,
.people-contact-empty {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.people-role-badge,
.people-progress-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.people-role-badge.is-leader {
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
}

.people-role-badge.is-coach {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.people-role-badge.is-member {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.people-progress-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.people-progress-badge.is-dg1-active {
  background: var(--discipleship-dg1);
  color: #fff7ed;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--discipleship-dg1) 70%, #000);
}

.people-progress-badge.is-dg1-complete {
  background: color-mix(in srgb, var(--discipleship-dg1) 10%, white);
  color: var(--discipleship-dg1);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--discipleship-dg1) 26%, white);
}

.people-progress-badge.is-dg2-active {
  background: var(--discipleship-dg2);
  color: #f5f3ff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--discipleship-dg2) 70%, #000);
}

.people-progress-badge.is-dg2-complete {
  background: color-mix(in srgb, var(--discipleship-dg2) 10%, white);
  color: var(--discipleship-dg2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--discipleship-dg2) 26%, white);
}

.people-progress-badge.is-dg3-active {
  background: var(--discipleship-dg3);
  color: #fef2f2;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--discipleship-dg3) 70%, #000);
}

.people-progress-badge.is-dg3-complete {
  background: color-mix(in srgb, var(--discipleship-dg3) 10%, white);
  color: var(--discipleship-dg3);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--discipleship-dg3) 26%, white);
}

.people-progress-badge.is-neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.people-contact-link {
  color: var(--discipleship-kgap);
  font-weight: 700;
  text-decoration: none;
}

.people-contact-link:hover {
  text-decoration: underline;
}

.people-child-count {
  display: inline-grid;
  justify-items: center;
  gap: 3px;
  min-width: 74px;
  padding: 10px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--discipleship-kgap) 8%, white), color-mix(in srgb, var(--discipleship-kgap) 14%, white));
}

.people-child-count strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.people-child-count span {
  color: #64748b;
  font-size: 12px;
}

.groups-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(380px 180px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.groups-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-dg1) 72%, white) 46%, var(--discipleship-dg3) 100%);
}

.groups-hero-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.groups-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 680px;
}

.groups-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.groups-hero-copy h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.groups-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.groups-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  width: min(100%, 420px);
}

.groups-hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 213, 225, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.groups-hero-stat-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.groups-hero-stat-value {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.groups-hero-tools {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.7);
}

.groups-hero-filter-wrap {
  width: min(100%, 220px);
}

.groups-hero-search-wrap {
  width: min(100%, 440px);
}

.groups-status-filter,
.groups-hero-tools .groups-table-search {
  width: 100%;
}

.groups-dashboard-table td {
  vertical-align: middle;
}

.group-name-cell,
.group-progress-cell,
.group-members-cell {
  display: grid;
  gap: 8px;
}

.group-name-main,
.group-members-main {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.group-name-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.group-name-sub,
.group-progress-sub,
.group-members-sub {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.group-progress-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.group-progress-badge.is-dg1 {
  background: color-mix(in srgb, var(--discipleship-dg1) 12%, white);
  color: var(--discipleship-dg1);
}

.group-progress-badge.is-dg2 {
  background: color-mix(in srgb, var(--discipleship-dg2) 12%, white);
  color: var(--discipleship-dg2);
}

.group-progress-badge.is-dg3 {
  background: color-mix(in srgb, var(--discipleship-dg3) 14%, white);
  color: var(--discipleship-dg3);
}

.group-progress-badge.is-neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.group-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.group-status-cell {
  display: flex;
  align-items: center;
}

.group-status-badge.is-active {
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
}

.group-status-badge.is-inactive {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}

.groups-dashboard-table tr.is-group-inactive td {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(241, 245, 249, 0.92));
}

.groups-dashboard-table tr.is-group-inactive .group-name-main,
.groups-dashboard-table tr.is-group-inactive .group-members-main,
.groups-dashboard-table tr.is-group-inactive .group-count-card strong {
  color: #475569;
}

.groups-dashboard-table tr.is-group-inactive .group-count-card {
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.7), rgba(226, 232, 240, 0.95));
}

.group-count-card {
  display: inline-grid;
  justify-items: center;
  gap: 3px;
  min-width: 86px;
  padding: 10px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--discipleship-kgap) 8%, white), color-mix(in srgb, var(--discipleship-kgap) 14%, white));
}

.group-count-card strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.group-count-card span {
  color: #64748b;
  font-size: 12px;
}

.discipleship-dashboard-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(540px 230px at 0% 0%, rgba(20, 184, 166, 0.16), transparent 60%),
    radial-gradient(420px 220px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.discipleship-dashboard-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-msk) 72%, white) 44%, var(--discipleship-dg3) 100%);
}

.discipleship-dashboard-hero-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.discipleship-dashboard-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 700px;
}

.discipleship-dashboard-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.discipleship-dashboard-hero-copy h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.discipleship-dashboard-hero-branch {
  white-space: nowrap;
}

.discipleship-dashboard-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.68;
}

.discipleship-dashboard-hero-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 320px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 12px 28px rgba(15, 23, 42, 0.06);
}

.discipleship-dashboard-hero-summary-ring {
  --pct: 0;
  --ring-track: rgba(226, 232, 240, 0.95);
  --ring-fill: #0f766e;
  width: 132px;
  height: 132px;
  min-width: 132px;
  border-radius: 50%;
  background:
    conic-gradient(
      from -90deg,
      var(--ring-fill) 0%,
      color-mix(in srgb, var(--discipleship-msk) 72%, var(--ring-fill)) calc(var(--pct) * 0.45%),
      color-mix(in srgb, var(--discipleship-dg1) 68%, var(--discipleship-msk)) calc(var(--pct) * 0.75%),
      color-mix(in srgb, var(--discipleship-dg3) 64%, var(--discipleship-dg2)) calc(var(--pct) * 1%),
      var(--ring-track) 0
    );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.discipleship-dashboard-hero-summary-ring::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.discipleship-dashboard-hero-summary-ring span {
  position: relative;
  z-index: 1;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.discipleship-dashboard-hero-summary-copy {
  display: grid;
  gap: 6px;
}

.discipleship-dashboard-hero-summary-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.discipleship-dashboard-hero-summary-value {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.discipleship-dashboard-hero-summary-sub {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  max-width: 260px;
}

.discipleship-dashboard-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
  width: min(100%, 460px);
}

.discipleship-dashboard-hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 213, 225, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.discipleship-dashboard-hero-stat-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.discipleship-dashboard-hero-stat-value {
  display: block;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
}

.discipleship-dashboard-hero-stat-sub {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.discipleship-dashboard-progress-card {
  margin-bottom: 18px;
  padding: 22px 24px 24px;
  border-radius: 24px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(14, 165, 233, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.discipleship-dashboard-section-head {
  margin-bottom: 18px;
  align-items: center;
}

.discipleship-dashboard-section-head h2 {
  margin: 0;
}

.discipleship-dashboard-data-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.discipleship-dashboard-data-stat {
  --dash-accent: #0f766e;
  --dash-glow: rgba(15, 118, 110, 0.16);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: 30px 34px 1fr;
  align-items: start;
  gap: 4px;
  min-height: 110px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.discipleship-dashboard-data-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dash-accent), rgba(255, 255, 255, 0.9));
}

.discipleship-dashboard-data-stat::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -56px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--dash-glow) 0%, rgba(255, 255, 255, 0) 72%);
  pointer-events: none;
}

.discipleship-dashboard-data-stat.is-primary {
  --dash-accent: #0284c7;
  --dash-glow: rgba(2, 132, 199, 0.18);
}

.discipleship-dashboard-data-stat.is-emerald {
  --dash-accent: #0f766e;
  --dash-glow: rgba(15, 118, 110, 0.18);
}

.discipleship-dashboard-data-stat.is-amber,
.discipleship-dashboard-data-stat.is-dg1 {
  --dash-accent: #d97706;
  --dash-glow: rgba(217, 119, 6, 0.18);
}

.discipleship-dashboard-data-stat.is-sky {
  --dash-accent: #0ea5e9;
  --dash-glow: rgba(14, 165, 233, 0.16);
}

.discipleship-dashboard-data-stat.is-slate {
  --dash-accent: #64748b;
  --dash-glow: rgba(100, 116, 139, 0.16);
}

.discipleship-dashboard-data-stat.is-rose {
  --dash-accent: #dc2626;
  --dash-glow: rgba(220, 38, 38, 0.14);
}

.discipleship-dashboard-data-stat.is-dg2 {
  --dash-accent: #7c3aed;
  --dash-glow: rgba(124, 58, 237, 0.16);
}

.discipleship-dashboard-data-stat-label {
  position: relative;
  z-index: 1;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.discipleship-dashboard-data-stat-value {
  position: relative;
  z-index: 1;
  display: block;
  align-self: start;
  color: #0f172a;
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 0;
}

.discipleship-dashboard-data-stat-sub {
  position: relative;
  z-index: 1;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

.journey-hero-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 28px 30px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(380px 180px at 100% 0%, rgba(245, 158, 11, 0.12), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.journey-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-msk) 72%, white) 46%, var(--discipleship-dg2) 100%);
}

.journey-hero-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.journey-hero-copy {
  display: grid;
  gap: 10px;
  max-width: 680px;
}

.journey-hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.journey-hero-copy h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.journey-hero-copy p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.65;
}

.journey-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 620px);
}

.journey-hero-stat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 213, 225, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.journey-hero-stat-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.journey-hero-stat-value {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.journey-hero-stat-sub {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.journey-hero-tools {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(203, 213, 225, 0.7);
}

.journey-hero-search-wrap {
  width: min(100%, 440px);
}

.journey-hero-tools .journey-table-search {
  width: 100%;
}

.journey-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.journey-progress-grid-standalone {
  margin-top: 0;
  margin-bottom: 18px;
}

.journey-progress-chip {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 10px 24px rgba(15, 23, 42, 0.06);
}

.journey-progress-ring {
  --pct: 0;
  --ring-color: var(--discipleship-kgap);
  width: 72px;
  height: 72px;
  min-width: 72px;
  flex: 0 0 72px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(226, 232, 240, 0.9) 0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-weight: 800;
  font-size: 12px;
  position: relative;
}

.journey-progress-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.journey-progress-ring span {
  position: relative;
  z-index: 1;
}

.journey-progress-copy {
  display: grid;
  gap: 4px;
}

.journey-progress-label {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.journey-progress-value {
  font-size: 12px;
  color: #64748b;
}

.journey-dashboard-table td {
  vertical-align: middle;
}

.journey-name-cell,
.journey-msk-cell {
  display: grid;
  gap: 8px;
}

.journey-name-main {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.journey-name-sub {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.journey-progress-cell {
  min-width: 220px;
}

.journey-progress-meta-text {
  display: block;
}

.journey-track-cell,
.journey-inline-track {
  display: flex;
  align-items: center;
  gap: 8px;
}

.journey-inline-track {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  padding: 4px 2px;
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
}

.journey-track-bridge,
.journey-bridge-form {
  display: inline-flex;
  align-items: center;
}

.journey-bridge-form {
  margin: 0;
}

.journey-bridge-select {
  min-height: 32px;
  padding: 6px 20px 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.journey-bridge-select:disabled {
  opacity: 0.72;
  cursor: default;
}

.journey-bridge-select.is-bridge-rg {
  background: color-mix(in srgb, var(--discipleship-dg1) 18%, white);
  color: #b45309;
  border-color: color-mix(in srgb, var(--discipleship-dg1) 26%, #e2e8f0);
}

.journey-bridge-select.is-bridge-kgap {
  background: color-mix(in srgb, var(--discipleship-kgap) 18%, white);
  color: #0f5132;
  border-color: color-mix(in srgb, var(--discipleship-kgap) 26%, #e2e8f0);
}

.journey-track-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.journey-track-badge.is-muted {
  background: rgba(148, 163, 184, 0.16);
  color: #64748b;
}

.journey-track-badge.is-msk {
  background: color-mix(in srgb, var(--discipleship-msk) 12%, white);
  color: #0369a1;
}

.journey-track-badge.is-kgap {
  background: color-mix(in srgb, var(--discipleship-kgap) 16%, white);
  color: #0f766e;
}

.journey-track-badge.is-msk-done {
  background: color-mix(in srgb, var(--discipleship-msk) 22%, white);
  color: #0b5ed7;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--discipleship-msk) 18%, white);
}

.journey-track-badge.is-msk-progress {
  background: color-mix(in srgb, var(--discipleship-msk) 10%, white);
  color: #0369a1;
}

.journey-track-badge.is-dg1 {
  background: color-mix(in srgb, var(--discipleship-dg1) 12%, white);
  color: var(--discipleship-dg1);
}

.journey-track-badge.is-dg2 {
  background: color-mix(in srgb, var(--discipleship-dg2) 12%, white);
  color: var(--discipleship-dg2);
}

.journey-track-badge.is-dg3 {
  background: color-mix(in srgb, var(--discipleship-dg3) 14%, white);
  color: var(--discipleship-dg3);
}

.journey-history-trigger {
  width: fit-content;
}

.journey-history-view {
  display: grid;
  gap: 16px;
}

.journey-history-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.journey-history-summary-main {
  display: grid;
  gap: 4px;
}

.journey-history-summary-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.journey-history-summary-sub {
  color: #64748b;
  font-size: 13px;
}

.journey-history-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.journey-history-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.journey-history-fact {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.journey-history-fact-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.journey-history-fact strong {
  font-size: 14px;
  color: #0f172a;
}

.journey-history-section-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.journey-history-split-section {
  display: grid;
  gap: 12px;
}

.journey-history-split-header {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.journey-history-split-divider {
  height: 1px;
  margin: 4px 0 2px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.55), rgba(148, 163, 184, 0.15));
}

.journey-history-empty {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  color: #475569;
  line-height: 1.65;
}

.journey-history-timeline {
  display: grid;
  gap: 12px;
}

.journey-history-item {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
}

.journey-history-item-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.journey-history-item-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.journey-history-item-date {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.journey-history-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.journey-history-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.65);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.journey-history-chip.is-active {
  background: color-mix(in srgb, var(--discipleship-kgap) 18%, white);
  color: #0f766e;
}

.journey-history-item-note {
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
}

.journey-history-item-members {
  font-size: 12px;
  line-height: 1.55;
  color: #64748b;
}

.dg-member-picker {
  gap: 12px;
}

.dg-member-picker-list {
  gap: 10px;
}

.dg-member-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.dg-member-picker-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.dg-member-picker-remove {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 70px;
}

.dg-member-picker-append {
  align-self: flex-start;
}

@media (max-width: 1480px) {
  .discipleship-dashboard-data-stats {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}


@media (max-width: 1024px) {
  .discipleship-dashboard-data-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
  }

  .discipleship-dashboard-hero-head {
    flex-direction: column;
  }

  .discipleship-dashboard-hero-summary {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .discipleship-dashboard-hero-stats {
    width: 100%;
    max-width: none;
  }

  .msk-hero-head {
    flex-direction: column;
  }

  .msk-hero-stats {
    width: 100%;
    max-width: none;
  }

  .msk-hero-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .msk-hero-search-wrap {
    justify-content: stretch;
  }

  #msk-table .msk-progress-cell {
    min-width: 180px;
  }

  .journey-history-facts {
    grid-template-columns: 1fr;
  }

  .people-hero-head {
    flex-direction: column;
  }

  .people-hero-stats {
    width: 100%;
    max-width: none;
  }

  .groups-hero-head {
    flex-direction: column;
  }

  .groups-hero-stats {
    width: 100%;
    max-width: none;
  }

  .dg-member-picker-row {
    flex-direction: column;
    align-items: stretch;
  }

  .dg-member-picker-remove {
    margin-left: 0;
    width: 100%;
  }

  .tree-hero-head {
    flex-direction: column;
  }

  .tree-hero-tools {
    width: 100%;
    align-items: flex-start;
  }

  .journey-hero-head {
    flex-direction: column;
  }

  .journey-hero-stats {
    width: 100%;
    max-width: none;
  }

  .dg-recap-hero-head {
    flex-direction: column;
  }

  .dg-recap-hero-stats {
    width: 100%;
    max-width: none;
  }

  .dg-recap-hero-tools {
    justify-content: flex-end;
  }

  .dg-recap-hero-search-wrap {
    margin-left: auto;
  }
}

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

  .page-discipleship-groups-list .discipleship-list-card.table-card-plain .table-wrap,
  .page-discipleship-people-list .discipleship-list-card.table-card-plain .table-wrap,
  .app-page.is-central-readonly.page-discipleship-groups-list .discipleship-list-card.table-card-plain .table-wrap,
  .app-page.is-central-readonly.page-discipleship-people-list .discipleship-list-card.table-card-plain .table-wrap {
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }

  .discipleship-dashboard-hero-card,
  .discipleship-dashboard-progress-card {
    padding: 22px;
    border-radius: 22px;
  }

  .discipleship-dashboard-hero-copy h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .discipleship-dashboard-hero-summary {
    padding: 16px;
    gap: 14px;
    border-radius: 20px;
  }

  .discipleship-dashboard-hero-summary-ring {
    width: 104px;
    height: 104px;
    min-width: 104px;
  }

  .discipleship-dashboard-hero-summary-ring::after {
    inset: 11px;
  }

  .discipleship-dashboard-hero-summary-ring span {
    font-size: 20px;
  }

  .discipleship-dashboard-hero-summary-value {
    font-size: 24px;
  }

  .discipleship-dashboard-hero-summary-sub {
    font-size: 12px;
  }

  .discipleship-dashboard-hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .discipleship-dashboard-hero-stat,
  .discipleship-dashboard-data-stat {
    padding: 14px 16px;
    border-radius: 18px;
  }

  .discipleship-dashboard-data-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 10px;
  }

  .discipleship-dashboard-data-stat {
    grid-template-rows: 26px 30px 1fr;
    min-height: 96px;
    padding: 12px 12px 10px;
    gap: 3px;
    border-radius: 14px;
  }

  .discipleship-dashboard-data-stat-label {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .discipleship-dashboard-data-stat-value {
    font-size: clamp(20px, 6vw, 26px);
  }

  .discipleship-dashboard-data-stat-sub {
    font-size: 10px;
    line-height: 1.35;
  }

  .discipleship-dashboard-data-stats .discipleship-dashboard-data-stat:nth-child(5) {
    grid-column: 1 / -1;
  }

  .journey-progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
  }

  .journey-progress-grid .journey-progress-chip:first-child {
    grid-column: 1 / -1;
  }

  .journey-progress-chip {
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .journey-progress-ring {
    width: 58px;
    height: 58px;
    min-width: 58px;
    flex-basis: 58px;
    font-size: 11px;
  }

  .journey-progress-ring::after {
    inset: 7px;
  }

  .journey-progress-label {
    font-size: 12px;
    line-height: 1.35;
  }

  .journey-progress-value {
    font-size: 11px;
  }

  .discipleship-overdue-card {
    padding: 16px;
    border-radius: 18px;
  }

  .discipleship-overdue-head {
    flex-direction: column;
    gap: 10px;
  }

  .discipleship-overdue-head p {
    font-size: 12px;
  }

  .discipleship-overdue-count {
    min-width: 44px;
    min-height: 44px;
    font-size: 20px;
  }

  .discipleship-overdue-item {
    padding: 10px 12px;
  }

  .discipleship-overdue-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .discipleship-overdue-meta strong {
    text-align: left;
  }

  .discipleship-import-card {
    padding: 20px;
    border-radius: 20px;
  }

  .discipleship-import-head {
    flex-direction: column;
    gap: 12px;
  }

  .discipleship-import-upload-wrap {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .discipleship-import-upload {
    min-height: 46px;
    padding: 8px 0;
    font-size: 13px;
  }

  .discipleship-import-upload::file-selector-button {
    margin-right: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  .discipleship-import-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .discipleship-import-actions .btn {
    width: 100%;
  }

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

  .dg-checklist.msk-session-checklist label.check-label {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .msk-hero-card {
    padding: 20px;
    border-radius: 22px;
  }

  .msk-hero-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .msk-hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .msk-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .msk-hero-stat {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .msk-hero-stat-value {
    font-size: 16px;
  }

  .msk-hero-tools {
    margin-top: 16px;
    padding-top: 16px;
    gap: 12px;
  }

  .card-row .actions.msk-hero-tools > * {
    flex: 0 0 auto;
    width: 100%;
  }

  .msk-hero-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .msk-import-inline-form {
    flex-wrap: wrap;
  }

  .msk-export-inline-form {
    flex-wrap: wrap;
  }

  .msk-hero-search-wrap {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }

  .msk-hero-tools .msk-batch-select {
    width: 100%;
    min-width: 0;
  }

  .msk-hero-tools .msk-table-search {
    width: 100%;
  }

  .msk-name-main {
    font-size: 15px;
  }

  .msk-status-badge {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .msk-progress-value {
    font-size: 14px;
  }

  .people-hero-card {
    padding: 20px;
    border-radius: 22px;
  }

  .tree-hero-card {
    padding: 20px;
    border-radius: 22px;
  }

  .tree-hero-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .tree-hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .tree-hero-tools {
    gap: 10px;
  }

  .tree-hero-chip {
    display: none;
  }

  .tree-hero-zoom-controls {
    width: 100%;
    justify-content: center;
  }

  .tree-hero-zoom-controls {
    grid-template-columns: 40px minmax(56px, auto) 40px;
    padding: 10px 12px;
  }

  .tree-hero-zoom-controls .btn.tiny.ghost {
    min-width: 40px;
    width: 40px;
    height: 40px;
  }

  .people-hero-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .people-hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .people-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .people-hero-stat {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .people-hero-stat-value {
    font-size: 18px;
  }

  .people-hero-tools {
    margin-top: 16px;
    padding-top: 16px;
  }

  .people-hero-search-wrap {
    width: 100%;
  }

  .people-progress-cell {
    min-width: 160px;
  }

  .groups-hero-card {
    padding: 20px;
    border-radius: 22px;
  }

  .groups-hero-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .groups-hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .groups-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .groups-hero-stat {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .groups-hero-stat-value {
    font-size: 18px;
  }

  .groups-hero-tools {
    margin-top: 16px;
    padding-top: 16px;
  }

  .groups-hero-search-wrap {
    width: 100%;
  }

  .journey-hero-card {
    padding: 20px;
    border-radius: 22px;
  }

  .journey-hero-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .journey-hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .journey-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .journey-hero-stat {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .journey-hero-stat-value {
    font-size: 18px;
  }

  .journey-hero-tools {
    margin-top: 16px;
    padding-top: 16px;
  }

  .journey-hero-search-wrap {
    width: 100%;
  }

  .journey-track-cell {
    min-width: 160px;
  }

  .journey-bridge-select {
    width: 100%;
    min-width: 132px;
  }

  .dg-recap-hero-card {
    padding: 20px;
    border-radius: 22px;
  }

  .dg-recap-hero-copy h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .dg-recap-hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .dg-recap-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dg-recap-hero-stat {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .dg-recap-hero-stat-value {
    font-size: 18px;
  }

  .dg-recap-hero-tools {
    margin-top: 16px;
    padding-top: 16px;
    justify-content: stretch;
  }

  .dg-recap-hero-search-wrap {
    width: 100%;
    margin-left: 0;
  }

  .dg-recap-hero-tools .dg-recap-summary-search {
    width: 100%;
  }
}

.page-settings .settings-target-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(540px 220px at 0% 0%, rgba(20, 184, 166, 0.12), transparent 64%),
    radial-gradient(460px 220px at 100% 0%, rgba(245, 158, 11, 0.1), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.97));
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.08);
}

.page-settings .settings-target-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, color-mix(in srgb, var(--discipleship-msk) 72%, white) 48%, var(--discipleship-dg1) 100%);
}

.settings-target-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.settings-target-copy {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.settings-target-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-target-copy h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.settings-target-copy p {
  margin: 0;
  color: #5b6976;
  font-size: 15px;
  line-height: 1.7;
}

.page-settings .settings-account-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(15, 118, 110, 0.1), transparent 64%),
    radial-gradient(440px 220px at 100% 0%, rgba(124, 58, 237, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.97));
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.08);
  margin-bottom: 22px;
}

.page-settings .settings-account-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--discipleship-kgap) 0%, var(--discipleship-msk) 48%, var(--discipleship-dg2) 100%);
}

.settings-account-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.settings-account-copy {
  display: grid;
  gap: 8px;
  max-width: 680px;
}

.settings-account-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--discipleship-kgap) 12%, white);
  color: var(--discipleship-kgap);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-account-copy h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.settings-account-copy p {
  margin: 0;
  color: #5b6976;
  font-size: 15px;
  line-height: 1.65;
}

.settings-account-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 220px;
}

.settings-account-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.settings-account-badge.is-muted {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.96), rgba(229, 231, 235, 0.92));
  border-color: rgba(203, 213, 225, 0.9);
  color: #64748b;
}

.settings-account-badge.is-safe {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(52, 211, 153, 0.1));
  color: #0f766e;
  border-color: rgba(16, 185, 129, 0.24);
}

.settings-account-form {
  display: grid;
  gap: 16px;
}

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

.settings-account-field-card {
  --account-accent: var(--discipleship-kgap);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.settings-account-field-card.is-new {
  --account-accent: var(--discipleship-dg1);
}

.settings-account-field-card.is-confirm {
  --account-accent: var(--discipleship-dg2);
}

.settings-account-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-account-field-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--account-accent) 12%, white);
  color: var(--account-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-account-field-preview {
  font-size: 13px;
  font-weight: 800;
  color: var(--account-accent);
}

.settings-account-field-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.settings-account-field-hint {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  min-height: 40px;
}

.settings-account-field-card input {
  margin-top: auto;
  height: 54px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--account-accent) 22%, #cbd5e1);
  background: linear-gradient(180deg, #fbfdfd, #f3f8f8);
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.settings-account-field-card input:focus {
  outline: none;
  border-color: var(--account-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--account-accent) 18%, white);
  background: #fff;
}

.settings-account-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

@media (max-width: 1180px) {
  .settings-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .settings-account-hero {
    flex-direction: column;
  }

  .settings-account-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .page-settings .settings-account-card {
    padding: 22px;
    border-radius: 22px;
  }

  .settings-account-grid {
    grid-template-columns: 1fr;
  }

  .settings-account-field-card {
    padding: 16px;
    border-radius: 18px;
  }

  .settings-account-actions {
    flex-direction: column;
  }

  .settings-account-actions .btn {
    width: 100%;
  }
}

.settings-target-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 340px;
}

.settings-target-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.settings-target-badge.is-branch {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(20, 184, 166, 0.08));
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.24);
}

.settings-target-form {
  display: grid;
  gap: 18px;
}

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

.settings-target-field {
  --field-accent: #0f766e;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.settings-target-field.is-total {
  --field-accent: var(--discipleship-kgap);
}

.settings-target-field.is-msk {
  --field-accent: var(--discipleship-msk);
}

.settings-target-field.is-dg1 {
  --field-accent: var(--discipleship-dg1);
}

.settings-target-field.is-dg2 {
  --field-accent: var(--discipleship-dg2);
}

.settings-target-field.is-dg3 {
  --field-accent: var(--discipleship-dg3);
}

.settings-target-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.settings-target-field-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-accent) 12%, white);
  color: var(--field-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-target-field-preview {
  font-size: 13px;
  font-weight: 800;
  color: var(--field-accent);
}

.settings-target-field-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}

.settings-target-field-hint {
  min-height: 58px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.settings-target-field input {
  margin-top: auto;
  height: 56px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--field-accent) 22%, #cbd5e1);
  background: linear-gradient(180deg, #fbfdfd, #f3f8f8);
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.settings-target-field input:focus {
  outline: none;
  border-color: var(--field-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--field-accent) 18%, white);
  background: #fff;
}

.settings-target-actions {
  justify-content: flex-start;
}

.settings-target-actions .btn {
  min-width: 180px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
}

@media (max-width: 1380px) {
  .settings-target-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .settings-target-hero {
    flex-direction: column;
  }

  .settings-target-meta {
    justify-content: flex-start;
    max-width: none;
  }

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

@media (max-width: 720px) {
  .page-settings .settings-target-card {
    padding: 22px;
    border-radius: 22px;
  }

  .settings-target-copy h2 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .settings-target-grid {
    grid-template-columns: 1fr;
  }

  .settings-target-field {
    padding: 16px;
    border-radius: 18px;
  }

  .settings-target-field-hint {
    min-height: 0;
  }

  .settings-target-actions .btn {
    width: 100%;
    min-width: 0;
  }
}
