:root {
  /* === Church CMS — Soft Dark + Elegant Gold (warm neutral, low eye strain) === */
  --bg-page: #f3efe8;
  --surface-warm: #faf7f2;
  --surface-card: #fffdf9;
  --sidebar-bg: #1f1f1f;
  --sidebar-bg-deep: #252525;
  --gold: #c89b4b;
  --gold-hover: #b98a37;
  --gold-soft: rgba(200, 155, 75, 0.12);
  --gold-soft-mid: rgba(200, 155, 75, 0.22);
  --text-primary: #2e2a26;
  --text-secondary: #7b736b;
  --sidebar-text: #e7e2da;
  --sidebar-text-muted: rgba(231, 226, 218, 0.62);
  --border-warm: #e5ddd2;
  --input-bg: #fffdf9;
  --input-border: #ddd2c3;

  /* Semantic aliases (existing names — used across components) */
  --bg: var(--bg-page);
  --surface: var(--surface-warm);
  --surface-elevated: var(--surface-card);
  --surface-muted: #f0ebe3;
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --border: var(--border-warm);
  --border-subtle: #e8e0d6;
  --primary: var(--gold);
  --primary-600: var(--gold-hover);
  --accent: #a89472;
  --link: #7a5f22;
  --link-hover: #5c4718;
  --btn-primary-fg: #2e2a26;
  --danger: #b42318;
  --danger-hover: #991b1b;
  --focus: var(--gold);
  --focus-ring: rgba(200, 155, 75, 0.38);
  --shadow: 0 10px 32px rgba(46, 42, 38, 0.07);
  --shadow-soft: 0 4px 18px rgba(46, 42, 38, 0.05);
  --shadow-primary: 0 10px 26px rgba(200, 155, 75, 0.22);
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Cinzel", Georgia, "Times New Roman", serif;

  --success-bg: #ecf4ed;
  --success-border: #c5d8c8;
  --success-text: #1e4a2d;
  --error-bg: #fbefee;
  --error-border: #e5ccc8;
  --error-text: #8b2a22;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(1400px 720px at 0% 0%, var(--gold-soft) 0%, transparent 58%);
  min-height: 100%;
}

body {
  position: relative;
}

h1, h2, h3, h4,
.section-title,
.topbar h2,
.ui-overlay__title,
.dash-brand__title,
.home-birthday-card__title {
  font-family: var(--font-heading, var(--font));
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: transparent;
  transition: grid-template-columns 0.22s ease;
}

.app-shell--sidebar-collapsed {
  grid-template-columns: 72px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
  color: var(--sidebar-text);
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: padding 0.22s ease;
}

.sidebar--collapsed {
  padding: 24px 12px;
}

.sidebar__top {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
}

.sidebar--collapsed .sidebar__top {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

.sidebar-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 2px 0 0;
  padding: 0;
  border: 1px solid rgba(231, 226, 218, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar-toggle:hover {
  background: var(--gold-soft);
  border-color: rgba(200, 155, 75, 0.4);
  color: #fff;
}

.sidebar-toggle__icon {
  display: flex;
  transition: transform 0.22s ease;
}

.sidebar--collapsed .sidebar-toggle__icon {
  transform: rotate(180deg);
}

.sidebar--collapsed .sidebar-toggle {
  margin-top: 0;
}

.brand {
  display: flex;
  flex: 1;
  gap: 12px;
  align-items: center;
  min-width: 0;
  margin-bottom: 0;
}

.sidebar--collapsed .brand {
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.sidebar--collapsed .brand__text {
  display: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #d4b06a 0%, var(--gold) 48%, #8f6f38 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-mark--custom {
  background: transparent;
  box-shadow: none;
  border: none;
}

.brand-mark__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sidebar--collapsed .brand-mark {
  width: 32px;
  height: 40px;
  border-radius: 8px;
}

.brand__text h1 {
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand__text span {
  display: block;
  font-size: 12px;
  color: var(--sidebar-text-muted);
  font-weight: 500;
}

.sidebar--collapsed .nav {
  display: none;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.nav__primary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav__pengaturan {
  margin-top: auto;
}

.nav a {
  color: var(--sidebar-text-muted);
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sidebar-text);
}

.nav a.active {
  background: var(--gold-soft-mid);
  color: var(--sidebar-text);
  border: 1px solid rgba(200, 155, 75, 0.38);
}

.main {
  padding: 28px 32px 48px;
  min-width: 0;
}

@media (max-width: 640px) {
  .main {
    padding: 20px 16px 36px;
  }
}

/* Beranda index.php: konten terpusat + lebar terbatas seperti dashboard produksi */
.home-layout {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
}

.home-layout > .home-quick-actions,
.home-layout > .home-quick-actions-hub {
  margin-top: 0;
}

/* Beranda tamu: blok aksi cepat vertikal & terpusat di area konten */
.home-layout--guest-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  min-height: 0;
  padding-block: clamp(0.35rem, 2vh, 1.25rem);
  min-width: 0;
}

.home-layout--guest-center .home-quick-actions {
  width: 100%;
  max-width: none;
  margin-top: 0;
  text-align: center;
}

.home-layout--guest-center .home-quick-actions__title {
  text-align: center;
}

.home-action-grid--guest-stack {
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  max-width: none;
  margin-inline: auto;
}

.home-quick-actions__title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Beranda: dua kartu ulang tahun bersebelahan */
.home-birthday-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

.home-birthday-cards .card + .card {
  margin-top: 0;
}

.home-birthday-cards .home-birthday-card {
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .home-birthday-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.home-birthday-card__title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}

.home-birthday-card__empty {
  margin: 0;
  font-size: 14px;
}

/* ±8 baris (nama + chip umur/Cool) terlihat, sisanya di-scroll */
.home-birthday-list-wrap {
  max-height: min(calc(8 * 5.15rem), 56vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.home-birthday-list-wrap:focus {
  outline: none;
}

.home-birthday-list-wrap:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

.home-birthday-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.home-birthday-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.home-birthday-row__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-birthday-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.home-birthday-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.home-birthday-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  max-width: 100%;
  padding: 0.18rem 0.52rem 0.18rem 0.38rem;
  border-radius: 999px;
  background: rgba(46, 42, 38, 0.055);
  color: #6f6a64;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.home-birthday-chip__ico {
  display: inline-flex;
  flex-shrink: 0;
  color: #8a847c;
}

.home-birthday-chip__ico .ui-ico-svg,
.home-birthday-chip__ico .ui-btn-ico {
  width: 0.82rem;
  height: 0.82rem;
}

.home-birthday-chip__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-birthday-chip--empty {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(46, 42, 38, 0.1);
  color: #8a847c;
  font-weight: 550;
}

.home-birthday-row__name {
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}

a.home-birthday-row__name:hover {
  text-decoration: underline;
}

.home-birthday-row__bday {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.home-birthday-row__contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.member-detail-contact__actions--icons-only {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-layout > .home-dashboard-shell {
  margin-top: 20px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card + .card {
  margin-top: 16px;
}

/* Beranda: kartu aksi cepat statis (bukan <details> / accordion). Pola .card.ui-details tetap untuk komponen lain. */
.card.ui-details {
  padding: 0;
  overflow: hidden;
}

.card.ui-details > summary {
  padding: 18px 22px;
}

.card.ui-details .ui-details__body {
  padding: 0 22px 22px;
}

/* Beranda: Community Dashboard (premium shell) */
.home-dashboard-shell {
  margin-top: 20px;
  padding: 28px 28px 24px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.home-dashboard-shell__head {
  margin-bottom: 22px;
}

.home-dashboard-shell__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.home-dashboard-shell__subtitle {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.home-dashboard-shell__foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.home-dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.home-dash-kpi {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

a.home-dash-kpi {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.home-dash-kpi:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.home-dash-kpi:hover {
  border-color: var(--input-border);
  box-shadow: 0 8px 24px rgba(46, 42, 38, 0.08);
}

.home-dash-kpi__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.home-dash-kpi__icon--blue {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

.home-dash-kpi__icon--green {
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
}

.home-dash-kpi__icon--gold {
  background: linear-gradient(135deg, #fcd34d 0%, #eab308 45%, #ca8a04 100%);
}

.home-dash-kpi__icon--amber {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

.home-dash-kpi__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-dash-kpi__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.home-dash-kpi__value {
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.home-dash-attendance-stack {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-dash-attendance-stack[data-attendance-demo="1"] {
  padding-top: 2px;
}

.home-dash-attendance-stack__intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 4px 2px 0;
}

.home-dash-attendance-stack__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.home-dash-attendance-stack__subtitle {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.home-dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid #e5ddd2;
  background: var(--surface-muted);
  color: var(--muted);
}

.home-dash-badge--preview .home-dash-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.home-dash-worship-panel {
  padding: 24px 24px 22px;
  background: var(--surface-card);
}

.home-dash-worship-panel-details.ui-details {
  margin-bottom: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  box-shadow: 0 4px 18px rgba(46, 42, 38, 0.05);
}

.home-dash-worship-panel-details.ui-details > summary.home-dash-worship-panel-details__summary {
  padding: 18px 22px;
  font-weight: 400;
  border-bottom: 1px solid transparent;
}

.home-dash-worship-panel-details.ui-details[open] > summary.home-dash-worship-panel-details__summary {
  border-bottom-color: var(--border);
}

.home-dash-worship-panel-details .ui-details__body {
  padding: 0;
}

.home-dash-worship-panel-details .home-dash-panel.home-dash-worship-panel {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.home-dash-worship-panel-details__name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.home-dash-worship-panel-details__meta {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
}

.home-dash-worship-panel__empty {
  margin: 0;
  padding: 8px 24px 24px;
}

.home-dash-worship-panel__hero {
  margin-bottom: 20px;
}

.home-dash-worship-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.home-dash-worship-panel__subtitle {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.home-dash-worship-panel__meta {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #9a9188;
}

.home-dash-worship-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.home-dash-worship-kpi__card {
  position: relative;
  padding: 16px 16px 14px 48px;
  border-radius: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-dash-worship-kpi__card:hover {
  border-color: #dbe4ee;
  box-shadow: 0 6px 20px rgba(46, 42, 38, 0.06);
}

.home-dash-worship-kpi__icon {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #fff;
}

.home-dash-worship-kpi__icon--green {
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
}

.home-dash-worship-kpi__icon--gold {
  background: linear-gradient(135deg, #fcd34d 0%, #eab308 50%, #ca8a04 100%);
}

.home-dash-worship-kpi__icon--blue {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

.home-dash-worship-kpi__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.home-dash-worship-kpi__value {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.home-dash-worship-kpi__value--money {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.home-dash-worship-kpi__unit {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.home-dash-worship-kpi__sub {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.home-dash-worship-chart-card {
  margin-bottom: 22px;
  padding: 18px 18px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-card) 0%, #fafbfc 100%);
  overflow: hidden;
}

.home-dash-worship-chart-card__head {
  margin-bottom: 12px;
}

.home-dash-worship-chart-card__head--a11y {
  margin: 0;
  height: 0;
  overflow: hidden;
}

.home-dash-worship-chart-card__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.home-dash-worship-chart-card__lede {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.home-dash-worship-chart-card__scope {
  margin: 4px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #9a9188;
}

.home-dash-worship-chart-drill {
  flex-shrink: 0;
  margin: 0;
}

.home-dash-worship-chart-drill__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #e5ddd2;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4a4540;
  cursor: pointer;
  line-height: 1.3;
}

.home-dash-worship-chart-drill__btn:hover {
  border-color: #ddd2c3;
  background: var(--surface-muted);
}

.home-dash-worship-chart-drill__icon {
  display: inline-flex;
  color: var(--muted);
}

.home-dash-panel__chart--worship {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 300px;
  min-height: 300px;
  max-height: 300px;
  box-sizing: border-box;
}

.home-dash-panel__chart-canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.home-dash-panel__chart-canvas-wrap canvas {
  display: block;
  max-width: 100%;
}

.home-dash-worship-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px 24px;
  align-items: stretch;
}

.home-dash-worship-bottom__col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.home-dash-worship-bottom__heading {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.home-dash-table-wrap--worship {
  margin-top: 0;
}

/* Detail pelaksanaan: cegah «Rp» dan nominal turun baris (kolom terlalu sempit) */
.home-dash-table--worship {
  width: 100%;
  table-layout: auto;
}

.home-dash-table--worship th.home-dash-table__pel,
.home-dash-table--worship td.home-dash-table__pel {
  min-width: 10rem;
  width: auto;
  max-width: 42%;
}

.home-dash-table--worship th.home-dash-table__col-jiwa,
.home-dash-table--worship td.home-dash-table__col-jiwa {
  min-width: 4.25rem;
  white-space: nowrap;
}

.home-dash-table--worship th.home-dash-table__col-offering,
.home-dash-table--worship td.home-dash-table__col-offering {
  min-width: 13rem;
  white-space: nowrap;
}

.home-dash-table--worship tbody tr:nth-child(even) {
  background: rgba(248, 249, 251, 0.85);
}

.home-dash-table--worship tbody tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}

.home-dash-table__num--growth {
  font-weight: 700;
}

.home-dash-growth--up {
  color: #16a34a;
}

.home-dash-growth--down {
  color: #ea580c;
}

.home-dash-growth--flat {
  color: var(--muted);
}

.home-dash-worship-insights {
  flex: 1 1 auto;
  min-height: 0;
}

.home-dash-worship-insights__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-dash-worship-insights__chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  min-width: 0;
}

.home-dash-worship-insights__chip--target {
  grid-column: 1 / -1;
  background: var(--surface-muted);
}

.home-dash-worship-insights__chip-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-dash-worship-insights__chip-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.home-dash-worship-insights__chip-detail {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--muted);
}

.home-dash-worship-insights__chip--up {
  border-left: 3px solid #16a34a;
}

.home-dash-worship-insights__chip--down {
  border-left: 3px solid #ea580c;
}

.home-dash-worship-insights__chip--money {
  border-left: 3px solid #eab308;
}

.home-dash-worship-insights__chip--spread {
  border-left: 3px solid #0284c7;
}

.home-dash-worship-insights__chip--target {
  border-left: 3px solid #9333ea;
}

@media (max-width: 560px) {
  .home-dash-worship-insights__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .home-dash-worship-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dash-worship-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-dash-worship-kpi {
    grid-template-columns: 1fr;
  }
}

.home-dashboard.home-dashboard--premium {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
}

.home-dash-premium-pair--growth-worship {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  grid-column: 1 / -1;
  align-items: stretch;
  min-width: 0;
}

.home-dash-premium-pair--growth-worship > .home-dash-panel {
  min-width: 0;
}

.home-dash-premium-pair--growth-worship .home-dash-panel--growth,
.home-dash-premium-pair--growth-worship .home-dash-panel--worship-dist {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-dash-premium-pair--growth-worship .home-dash-panel__chart--growth {
  flex: 1 1 auto;
  min-height: 200px;
}

.home-dash-premium-pair--growth-worship .home-dash-worship-dist__body {
  flex: 1 1 auto;
}

.home-dash-panel {
  padding: 22px 24px 20px;
  border-radius: 18px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(46, 42, 38, 0.05);
}

.home-dash-panel--wide {
  grid-column: 1 / -1;
}

.home-dash-panel__head {
  margin-bottom: 16px;
}

.home-dash-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.home-dash-panel__desc {
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.home-dash-panel__chart {
  position: relative;
  max-width: 100%;
}

.home-dash-panel__chart--hbar {
  height: 200px;
}

.home-dash-panel__chart--donut {
  height: 240px;
}

.home-dash-panel__chart--wide {
  height: 280px;
}


.home-dash-panel__chart--growth {
  height: 220px;
}

.home-dash-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.home-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.home-dash-table th,
.home-dash-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.home-dash-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-muted);
}

.home-dash-table tbody tr:last-child td {
  border-bottom: none;
}

.home-dash-table tbody tr:hover td {
  background: rgba(200, 155, 75, 0.08);
}

.home-dash-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text);
  width: 5rem;
}

a.home-dash-table__link {
  font-weight: 700;
  color: var(--link);
  text-decoration: none;
}

a.home-dash-table__link:hover {
  text-decoration: underline;
}

.home-dash-donut-wrap {
  position: relative;
  height: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.home-dash-donut-wrap canvas {
  position: relative;
  z-index: 1;
}

.home-dash-donut-center {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  pointer-events: none;
}

.home-dash-worship-dist__demo-badge {
  margin: 0 0 10px;
}

.home-dash-worship-dist__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 28px 36px;
  margin-top: 6px;
}

.home-dash-worship-dist__chart-col {
  flex: 0 0 auto;
}

.home-dash-worship-dist__legend-col {
  flex: 1 1 260px;
  min-width: 0;
}

.home-dash-donut-center--worship-dist {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  top: 44%;
}

.home-dash-donut-center--worship-dist .home-dash-donut-center__top {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}

.home-dash-donut-center--worship-dist .home-dash-donut-center__num {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.home-dash-donut-center--worship-dist .home-dash-donut-center__sub {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}

.home-dash-donut-wrap--worship-dist {
  max-width: 300px;
  margin: 0 auto;
}

.home-dash-panel__chart--worship-dist {
  margin-top: 0;
  height: 260px;
}

.home-dash-worship-dist-legend {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--text);
}

.home-dash-worship-dist-legend td {
  padding: 10px 8px;
  vertical-align: middle;
  border-bottom: 1px solid #eef1f6;
}

.home-dash-worship-dist-legend tr:last-child td {
  border-bottom: none;
}

.home-dash-worship-dist-legend__swatch {
  width: 2rem;
  padding-left: 0;
}

.home-dash-worship-dist-legend__swatch-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.home-dash-worship-dist-legend__label {
  font-weight: 500;
  padding-right: 12px;
}

.home-dash-worship-dist-legend__pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  width: 4.5rem;
}

.home-dash-worship-dist-legend__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  width: 4rem;
}

.home-dash-worship-dist-legend__foot {
  margin: 14px 0 0;
  font-size: 0.75rem;
  color: #9a9188;
}

@media (max-width: 640px) {
  .home-dash-worship-dist__body {
    flex-direction: column;
    align-items: stretch;
  }

  .home-dash-worship-dist__chart-col {
    width: 100%;
  }
}

.home-dash-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
}

.home-dash-mini > div {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.home-dash-mini dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 4px;
}

.home-dash-mini dd {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.home-dash-panel__empty {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--muted);
}

.home-dash-panel__avg-wrap {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-dash-panel__avg {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.home-dash-panel__avg-def {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #9a9188;
}

.home-dash-panel__avg-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.home-dash-panel__avg--offering {
  margin-top: 4px;
}

.home-dash-table-wrap--attendance-offer {
  margin-top: 12px;
}

.home-dash-table--compact {
  font-size: 0.8125rem;
}

.home-dash-table--compact th,
.home-dash-table--compact td {
  padding: 8px 10px;
}

.home-dash-panel--demo {
  border-color: #dbeafe;
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.06);
}

.home-dash-demo-banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
}

/* Pendataan Cool — tanggal absensi + tombol satu baris */
.cool-absensi-date-form {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cool-absensi-date-form__label label {
  display: inline-block;
  margin-bottom: 2px;
}

.cool-absensi-date-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.cool-absensi-date-form__input {
  flex: 1 1 220px;
  min-width: 0;
}

.cool-absensi-date-form__input input[type='date'],
.cool-absensi-date-form__input input.app-flatpickr-alt-input {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.cool-absensi-date-form__submit {
  flex: 0 0 auto;
}

.cool-absensi-form__moneyrow {
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-top: 4px;
}

.cool-absensi-form__moneycol {
  min-width: 200px;
}

.cool-absensi-form__moneycol--grow {
  flex: 1 1 240px;
  min-width: 240px;
}

.cool-absensi-history-table .cool-absensi-history__roster {
  margin: 0;
  max-width: 420px;
}

.cool-absensi-history-table .cool-absensi-history__photos-fold {
  margin: 0;
  max-width: 180px;
}

.cool-absensi-history-table .cool-absensi-history__roster > summary,
.cool-absensi-history-table .cool-absensi-history__photos-fold > summary {
  padding: 8px 10px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.cool-absensi-history-table .cool-absensi-history__roster .ui-details__body,
.cool-absensi-history-table .cool-absensi-history__photos-fold .ui-details__body {
  padding: 0 8px 10px;
}

.cool-absensi-history__split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.cool-absensi-history__group {
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
}

.cool-absensi-history__group-title {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text, #1c1917);
}

.cool-absensi-history__empty {
  margin: 0;
}

.cool-absensi-history__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cool-absensi-history__person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border, #eeeae3);
}

.cool-absensi-history__person:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cool-absensi-history__person-name {
  font-weight: 650;
  font-size: 0.875rem;
}

.cool-absensi-history__person-no {
  font-size: 0.75rem;
  color: var(--muted);
}

.cool-absensi-history__photos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cool-absensi-history__photo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.cool-absensi-history__photo-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cool-absensi-history__wa svg {
  color: #128c7e;
}

.cool-absensi-history__photo-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  max-width: 160px;
}

.cool-absensi-history__photo-link img {
  display: block;
  width: 160px;
  height: 120px;
  object-fit: cover;
}

.cool-absensi-kind {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.cool-absensi-kind--anggota {
  background: #e8f1ff;
  color: #1d4ed8;
}

.cool-absensi-kind--tamu {
  background: #f3e8ff;
  color: #7c3aed;
}

.cool-absensi-subhead {
  margin: 18px 0 8px;
  font-size: 1.05rem;
}

.cool-absensi-form > .table-wrap {
  margin-bottom: 8px;
}

.cool-absensi-guests-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border, #e7dfd3);
}

.cool-absensi-guest-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 28px;
  margin: 0 0 12px;
}

.cool-absensi-guest-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}

.cool-absensi-guest-choice .cool-absensi-guest-choice__title {
  margin: 0;
  padding: 0;
  float: none;
}

.cool-absensi-guest-choice__opts {
  margin: 0;
}

.cool-absensi-guest-details[hidden],
.cool-absensi-guest-count[hidden] {
  display: none;
}

.cool-absensi-guest-count {
  flex: 0 1 220px;
  min-width: 160px;
  max-width: 280px;
  margin: 0;
}

.cool-absensi-guest-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.cool-absensi-guest-field label,
.cool-absensi-photo-upload label,
.cool-absensi-guest-count label {
  display: block;
  margin-bottom: 4px;
}

.cool-absensi-guest-readonly {
  margin: 0;
  padding-left: 1.1rem;
}

.cool-absensi-guest-readonly > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cool-absensi-photos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cool-absensi-photos__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.cool-absensi-photos__thumb {
  display: block;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
}

.cool-absensi-photos__thumb img,
.cool-absensi-photo-preview img {
  display: block;
  width: 160px;
  max-width: 100%;
  height: 120px;
  object-fit: cover;
}

.cool-absensi-photos__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cool-absensi-photos__delete {
  display: inline;
  margin: 0;
}

.cool-absensi-photo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 20px;
}

.cool-absensi-photo-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cool-absensi-photo-webcam__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.cool-absensi-photo-current[hidden] {
  display: none;
}

.cool-absensi-photo-preview {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  max-width: 160px;
}

.cool-absensi-photo-preview[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .home-dash-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .home-dash-premium-pair--growth-worship {
    grid-template-columns: 1fr;
  }

  .home-dashboard-shell {
    padding: 20px 16px 18px;
  }
}

@media (max-width: 520px) {
  .home-dash-kpi-row {
    grid-template-columns: 1fr;
  }
}

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

/* Beranda: tiga aksi cepat sejajar satu baris (desktop); Daftar di kolom ketiga */
.home-action-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

/* Beranda: empat aksi cepat (termasuk Laporan hari ini) */
.home-action-grid--quad {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 1100px) {
  .home-action-grid--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .home-action-grid--quad {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .home-action-grid {
    grid-template-columns: 1fr;
  }
}

/* Beranda: lima aksi cepat (Pendataan Cool + Laporan hari ini) */
.home-action-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 1280px) {
  .home-action-grid--five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .home-action-grid--five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Beranda: enam aksi cepat (COOL + Laporan + Penugasan) */
.home-action-grid--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 1400px) {
  .home-action-grid--six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .home-action-grid--six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

/* Beranda: tujuh aksi cepat (dua pintasan laporan + COOL + Penugasan) */
.home-action-grid--seven {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: stretch;
}

@media (max-width: 1500px) {
  .home-action-grid--seven {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .home-action-grid--seven {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.home-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-card) 0%, var(--surface) 100%);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-action-card:hover {
  text-decoration: none;
  border-color: rgba(200, 155, 75, 0.45);
  box-shadow: 0 8px 24px rgba(46, 42, 38, 0.1);
}

.home-action-card:hover .home-action-label__title {
  color: var(--primary-600);
}

.home-action-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.home-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--primary-600);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.home-action-icon .ui-ico-svg {
  width: 1.75rem;
  height: 1.75rem;
  display: block;
}

.home-action-card:hover .home-action-icon {
  color: var(--primary-600);
}

.home-action-label {
  margin-top: 12px;
  width: 100%;
  max-width: 260px;
}

.home-action-label__title {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.3;
  transition: color 0.15s ease;
}

.home-action-label__desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 5px;
}

/* Pilihan laporan: kartu utama vs sekunder */
.home-action-card.home-action-card--report-primary {
  border-color: rgba(200, 155, 75, 0.45);
  background: linear-gradient(180deg, rgba(200, 155, 75, 0.14) 0%, var(--surface-card) 60%);
  box-shadow: 0 4px 16px rgba(46, 42, 38, 0.08);
}

.home-action-card.home-action-card--report-primary .home-action-icon {
  background: var(--gold-soft-mid);
}

.home-action-card.home-action-card--report-secondary {
  background: var(--surface);
}

.home-action-card.home-action-card--report-secondary:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 14px;
}

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

/* Satu baris: gender | tanggal lahir | pendidikan — tiga kolom sama lebar */
.grid.identity-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.grid.identity-row .identity-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.grid.identity-row .identity-field select,
.grid.identity-row .identity-field input[type="date"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.grid.identity-row .identity-field input.app-flatpickr-alt-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Status sosial: 2×2 — perkawinan | hubungan; checkbox KK | pekerjaan */
.grid.two.social-status-grid {
  align-items: start;
}

.grid.two.social-status-grid .social-field select {
  width: 100%;
  min-width: 0;
}

.grid.two.social-status-grid .social-field--head {
  align-self: end;
  padding-bottom: 2px;
}

.grid.two.social-status-grid .social-field--head .check {
  margin-bottom: 0;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app-shell:not(#app-shell.admin-dash) {
    grid-template-columns: 1fr;
  }
  .app-shell:not(#app-shell.admin-dash) .sidebar {
    height: auto;
    position: relative;
  }
  .grid.two {
    grid-template-columns: 1fr;
  }

  .grid.two.social-status-grid .social-field--head .check {
    white-space: normal;
  }

}

@media (max-width: 720px) {
  .grid.identity-row {
    grid-template-columns: 1fr;
  }
}

label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Tanpa atribut type = text (HTML); [type="text"] saja tidak mencakupnya. */
input:not([type]),
input[type="text"],
input[type="search"],
input[type="url"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  font: inherit;
  outline: none;
  line-height: 1.35;
}

/* Tinggi bidang seperti form laporan (bukan angka/tanggal agar grid rapat). */
input:is(:not([type]), [type="text"], [type="search"], [type="url"], [type="password"], [type="email"], [type="tel"]) {
  min-height: 2.625rem;
}

select:not([multiple]) {
  min-height: 2.625rem;
}

/* Samakan tampilan search dengan text (tanpa kontrol native yang mempersempit field). */
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

input[type="search"]::-ms-clear,
input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

select.cool-member-pick {
  max-width: 640px;
  min-height: 220px;
  padding: 8px;
  line-height: 1.35;
}

/* Daftar anggota — filter satu baris (cari + filter + urut; kirim otomatis + reset) */
.members-filter-form {
  margin: 0;
}

.members-filter-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px 12px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  .members-filter-grid {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* Kolom cari: tidak memenuhi sisa baris; ~70% dari lebar “grow” tipikal (~300px) */
.members-filter-field--grow {
  flex: 0 1 210px;
  min-width: min(100%, 140px);
  width: 210px;
  max-width: 210px;
}

.members-filter-field--grow input[type="text"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .members-filter-field--grow {
    flex: 1 1 200px;
    width: auto;
    max-width: none;
    min-width: min(100%, 160px);
  }
}

.members-filter-field--cool {
  flex: 0 0 158px;
  min-width: 158px;
  max-width: 158px;
  width: 158px;
}

.members-filter-field:not(.members-filter-field--grow):not(.members-filter-actions):not(.members-filter-field--sort):not(.members-filter-field--cool) {
  flex: 0 0 142px;
  min-width: 142px;
  max-width: 142px;
  width: 142px;
}

.members-filter-field--sort {
  flex: 0 0 172px;
  min-width: 172px;
  max-width: 180px;
  width: 172px;
}

.members-filter-field label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.members-filter-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.members-filter-actions .btn {
  white-space: nowrap;
}

.cool-batch-pick-wrap {
  margin-top: 4px;
}

/* Saringan di atas, daftar di bawah — lebar sama (22rem), rata kiri */
.cool-batch-pick-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.cool-batch-pick-row > input[type="text"] {
  width: 100%;
  max-width: 22rem;
  box-sizing: border-box;
}

.cool-batch-pick-wrap .cool-batch-select {
  max-width: 100%;
  min-height: 180px;
  padding: 8px;
  line-height: 1.35;
}

.cool-batch-pick-row .cool-batch-select {
  width: 100%;
  max-width: 22rem;
  min-width: 0;
  margin-top: 0;
  box-sizing: border-box;
}

/* Member form: kelompok Cool & bidang pelayanan — <dialog> */
.member-field-dialog {
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(85vh, 40rem);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.member-field-dialog::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.member-field-dialog--wide {
  width: min(44rem, calc(100vw - 2rem));
}

.member-field-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.member-field-dialog__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.member-field-dialog__body {
  padding: 14px 16px 16px;
  overflow: auto;
  max-height: min(60vh, 28rem);
}

.member-field-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

.cool-batch-launch-row__label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.svc-section.svc-section--with-modal {
  margin-top: 0;
}

.grid.two > div > .cool-batch-launch-row--under-field,
.grid.two > div > .svc-section--under-field {
  min-width: 0;
}

.cool-batch-pick-wrap--in-dialog {
  margin-top: 0;
}

.cool-batch-launch-row__edit,
.svc-section-launch__edit {
  flex-shrink: 0;
}

kbd {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 600;
  color: var(--text);
}

.cool-ketua-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #1e3a5f;
  background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 100%);
  border: 1px solid #7dd3fc;
}

.cool-member-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.cool-member-actions__form {
  display: inline-flex;
  margin: 0;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.check input {
  width: auto;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 650;
  cursor: pointer;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(165deg, #d4b06a 0%, var(--primary) 48%, var(--primary-600) 100%);
  color: var(--btn-primary-fg);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

/* CTA gaya SaaS: radius lebih besar, bayangan halus, sedikit angkat saat hover */
.btn--saas {
  border-radius: 12px;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  box-shadow:
    0 1px 2px rgba(46, 42, 38, 0.06),
    0 8px 24px -6px rgba(200, 155, 75, 0.35);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.btn--saas:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(46, 42, 38, 0.08),
    0 12px 32px -6px rgba(200, 155, 75, 0.42);
}

.btn--saas:active {
  transform: translateY(0);
}

.btn-primary.btn--saas {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(165deg, #dcc07a 0%, var(--primary) 50%, var(--primary-600) 100%);
}

.btn--saas-block {
  width: 100%;
  justify-content: center;
}

.btn-danger.btn--saas {
  box-shadow:
    0 1px 2px rgba(46, 42, 38, 0.06),
    0 8px 22px -6px rgba(180, 35, 24, 0.35);
}

.btn-danger.btn--saas:hover {
  box-shadow:
    0 2px 4px rgba(46, 42, 38, 0.08),
    0 12px 28px -6px rgba(180, 35, 24, 0.45);
}

.btn--saas-sm {
  min-height: 2rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(46, 42, 38, 0.08);
}

.btn--saas-sm:hover {
  transform: none;
}

.btn--saas-sm.btn-primary {
  box-shadow:
    0 1px 2px rgba(46, 42, 38, 0.06),
    0 6px 18px -4px rgba(200, 155, 75, 0.38);
}

.btn--saas-sm.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(46, 42, 38, 0.08),
    0 10px 24px -4px rgba(200, 155, 75, 0.45);
}

.btn--saas-muted {
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(46, 42, 38, 0.05);
}

.btn--saas-muted:hover {
  background: var(--border-subtle);
  border-color: var(--input-border);
  filter: none;
}

.btn-danger {
  background: var(--danger);
  color: #fffdf9;
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.22);
}

.btn-danger:hover {
  filter: brightness(1.04);
}

.btn-ghost {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(46, 42, 38, 0.05);
}

.btn-secondary:hover {
  background: var(--surface-muted);
  filter: none;
}

/* Tombol / tautan aksi: ikon + teks (standar aplikasi) */
.ui-btn-ico {
  display: inline-flex;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.ui-btn-ico .ui-ico-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.btn.btn--iconrow,
a.btn.btn--iconrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  vertical-align: middle;
}

a.btn.btn--iconrow:hover {
  text-decoration: none;
}

.btn.btn--iconrow .ui-btn-lbl,
a.btn.btn--iconrow .ui-btn-lbl {
  line-height: 1.25;
}

/* Pill modern: semua tombol/tautan ber-ikon + teks (navigasi & toolbar) */
a.btn.btn--iconrow:not(.btn-icononly),
button.btn.btn--iconrow:not(.btn-icononly) {
  border-radius: 9999px;
  min-height: 2.75rem;
  padding: 0.55rem 1.35rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  box-sizing: border-box;
  transition:
    transform 0.16s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    filter 0.18s ease;
}

a.btn.btn--iconrow:not(.btn-icononly):hover,
button.btn.btn--iconrow:not(.btn-icononly):hover {
  transform: translateY(-1px);
}

a.btn.btn--iconrow:not(.btn-icononly):active,
button.btn.btn--iconrow:not(.btn-icononly):active {
  transform: translateY(0);
}

a.btn.btn--iconrow:not(.btn-icononly):focus-visible,
button.btn.btn--iconrow:not(.btn-icononly):focus-visible {
  outline: 2px solid #c4a574;
  outline-offset: 3px;
}

.btn.btn--iconrow.btn-secondary,
.btn.btn--iconrow.btn-ghost {
  background: linear-gradient(180deg, #fff 0%, #faf8f4 100%);
  color: #292524;
  border: 1px solid rgba(231, 223, 211, 0.95);
  box-shadow:
    0 1px 2px rgba(28, 25, 23, 0.05),
    0 4px 14px rgba(28, 25, 23, 0.06);
}

.btn.btn--iconrow.btn-secondary:hover,
.btn.btn--iconrow.btn-ghost:hover {
  filter: none;
  background: linear-gradient(180deg, #fff 0%, #f5f0e8 100%);
  border-color: #dcd3c4;
  box-shadow:
    0 4px 12px rgba(28, 25, 23, 0.08),
    0 12px 28px rgba(28, 25, 23, 0.07);
}

a.btn.btn--iconrow:not(.btn-icononly):not(.btn-primary):not(.btn-danger):not(.btn-secondary):not(.btn-ghost):not(.btn-pill-dark),
button.btn.btn--iconrow:not(.btn-icononly):not(.btn-primary):not(.btn-danger):not(.btn-secondary):not(.btn-ghost):not(.btn-pill-dark) {
  background: linear-gradient(180deg, #fff 0%, #faf8f4 100%);
  color: #292524;
  border: 1px solid rgba(231, 223, 211, 0.95);
  box-shadow:
    0 1px 2px rgba(28, 25, 23, 0.05),
    0 4px 14px rgba(28, 25, 23, 0.06);
}

a.btn.btn--iconrow:not(.btn-icononly):not(.btn-primary):not(.btn-danger):not(.btn-secondary):not(.btn-ghost):not(.btn-pill-dark):hover,
button.btn.btn--iconrow:not(.btn-icononly):not(.btn-primary):not(.btn-danger):not(.btn-secondary):not(.btn-ghost):not(.btn-pill-dark):hover {
  filter: none;
  border-color: #dcd3c4;
  box-shadow:
    0 4px 12px rgba(28, 25, 23, 0.08),
    0 12px 28px rgba(28, 25, 23, 0.07);
}

.btn.btn--iconrow.btn-primary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 2px 6px rgba(46, 42, 38, 0.1),
    0 10px 28px -8px rgba(200, 155, 75, 0.45);
}

.btn.btn--iconrow.btn-primary .ui-btn-ico {
  color: rgba(255, 253, 249, 0.95);
}

.btn.btn--iconrow.btn-danger {
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 2px 6px rgba(28, 25, 23, 0.08),
    0 10px 24px -6px rgba(180, 35, 24, 0.35);
}

/* CTA gelap (mis. hub Laporan → Insight) — tetap selaras nuansa dashboard */
.btn.btn--iconrow.btn-pill-dark {
  background: linear-gradient(180deg, #292524 0%, #1c1917 100%);
  color: #fafaf9;
  border-color: rgba(28, 25, 23, 0.35);
  box-shadow:
    0 2px 6px rgba(28, 25, 23, 0.12),
    0 8px 22px rgba(28, 25, 23, 0.14);
}

.btn.btn--iconrow.btn-pill-dark:hover {
  filter: none;
  background: linear-gradient(180deg, #44403c 0%, #292524 100%);
  box-shadow:
    0 6px 18px rgba(28, 25, 23, 0.16),
    0 14px 36px rgba(28, 25, 23, 0.12);
}

.btn.btn--iconrow.btn-pill-dark .ui-btn-ico {
  color: #fde68a;
}

.btn.btn--iconrow.btn--saas-sm {
  min-height: 2rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
}

/* Aksi ringkas di tabel */
.btn-icononly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  min-width: 2.35rem;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-card);
  color: var(--link);
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  font: inherit;
}

.btn-icononly:hover {
  background: var(--surface-muted);
  text-decoration: none;
}

.btn-icononly--danger {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
}

.btn-icononly .ui-btn-ico {
  width: 1.15rem;
  height: 1.15rem;
}

/* Sandi: tombol tampilkan/sembunyikan di ujung kanan dalam kolom input */
.field-password {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.field-password input[type='password'],
.field-password input[type='text'] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 2.75rem;
}

.field-password__toggle.field-password__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  margin: 0;
}

.field-password__eye[hidden],
.field-password__eyeoff[hidden] {
  display: none !important;
}

.table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Antrean persetujuan pendaftaran mandiri: satu baris; tolak lalu alasan (alasan paling kanan) */
td.reg-queue-actions {
  vertical-align: middle;
}

.reg-queue-actions {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.reg-queue-actions .reg-queue-actions__approve,
.reg-queue-actions .reg-queue-actions__reject {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.reg-queue-actions .reg-queue-actions__reject {
  flex: 0 1 auto;
  min-width: 0;
}

.reg-queue-actions .reg-queue-reject-reason {
  max-width: min(14rem, 42vw);
  min-width: 8rem;
  width: auto;
  flex: 1 1 10rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

.reg-queue-actions .reg-queue-reject-reason[hidden] {
  display: none !important;
}

.reg-queue-actions .btn-primary.btn-icononly {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.reg-queue-actions .btn-primary.btn-icononly:hover {
  filter: brightness(0.95);
}

/* Ukuran ikon aksi antrean pendaftaran — selaras dengan teks isi tabel (~0,875rem) */
.reg-queue-actions .btn-icononly,
.reg-queue-actions a.btn-icononly {
  width: 1.85rem;
  height: 1.85rem;
  min-width: 1.85rem;
  border-radius: 8px;
}

.reg-queue-actions .btn-icononly .ui-btn-ico,
.reg-queue-actions a.btn-icononly .ui-btn-ico {
  width: 0.95rem;
  height: 0.95rem;
}

.registration-request-summary-dl {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 8px 16px;
  margin: 0;
}

.registration-request-summary-dl dt {
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}

.registration-request-summary-dl dd {
  margin: 0;
  word-break: break-word;
}

@media (max-width: 640px) {
  .registration-request-summary-dl {
    grid-template-columns: 1fr;
  }

  .registration-request-summary-dl dt {
    border-top: 1px solid var(--border, #e5ddd2);
    padding-top: 8px;
  }

  .registration-request-summary-dl dt:first-of-type {
    border-top: 0;
    padding-top: 0;
  }

  .registration-request-summary-dl--status-only {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }

  .registration-request-summary-dl--status-only dt {
    border-top: 0;
    padding-top: 0;
  }
}

/* Detail pengajuan: Ringkasan + Lampiran foto satu baris (memenuhi lebar layar) */
.registration-request-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
  align-items: start;
}

.registration-request-top-grid__summary,
.registration-request-top-grid__photos {
  min-width: 0;
}

.registration-request-summary-dl--status-only {
  margin-bottom: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.registration-request-top-grid__summary .registration-request-status-highlight {
  color: #c2410c;
  font-weight: 600;
}

/* Judul penuh lebar; siluet/foto diposisikan di pojok kanan kartu (bukan sebaris dengan judul) */
.registration-request-payload-block__head {
  margin-bottom: 4px;
}

.registration-request-payload-block__head-title {
  margin-bottom: 0;
}

.registration-request-payload-block--has-primary-photo-corner {
  position: relative;
  padding-right: 142px;
}

.registration-request-payload-block--has-primary-photo-corner .registration-request-primary-photo-corner {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 104px;
  z-index: 1;
}

.registration-request-primary-photo-corner {
  flex-shrink: 0;
  width: 104px;
}

.registration-request-primary-photo-corner__frame {
  border-radius: 10px;
  overflow: hidden;
  background: #f0ebe3;
  aspect-ratio: 3 / 4;
  max-height: 132px;
}

.registration-request-primary-photo-corner__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.registration-request-primary-photo-corner__placeholder {
  min-height: 112px;
  border-radius: 10px;
  border: 1px dashed #ddd2c3;
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  color: var(--muted);
  text-align: center;
  box-sizing: border-box;
}

.registration-request-primary-photo-corner__placeholder .member-profile-placeholder-icon {
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .registration-request-payload-block--has-primary-photo-corner {
    padding-right: 22px;
  }

  .registration-request-payload-block--has-primary-photo-corner .registration-request-primary-photo-corner {
    position: static;
    width: 100%;
    max-width: 140px;
    margin-left: auto;
    margin-bottom: 10px;
    z-index: auto;
  }
}

.registration-request-payload-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* Aksi setujui/tolak di pojok kanan bawah kartu «Calon anggota utama» (detail pengajuan) */
.registration-request-payload-block--has-footer-actions {
  display: flex;
  flex-direction: column;
}

.registration-request-payload-block__footer-actions {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e5ddd2);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.registration-request-sub {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--muted);
}

ul.registration-request-list {
  margin: 0;
  padding-left: 1.25rem;
}

.member-detail-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.member-detail-contact__num {
  flex: 1 1 auto;
  min-width: 0;
}
.member-detail-contact__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.member-detail-contact--table {
  width: 100%;
  align-items: flex-start;
  gap: 6px 8px;
}
.member-detail-phone-cell {
  vertical-align: top;
}

.table-actions__sep {
  color: var(--muted);
  user-select: none;
}

.alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

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

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

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

.pill.ok {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}

.pill.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.pill.upcoming {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.pill.err {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

/* Laporan kegiatan: struktur ketentuan A / B */
.report-kegiatan-spec {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.55;
  color: #4a4540;
}

.report-kegiatan-block {
  margin-top: 20px;
}

.report-kegiatan-block > .section-title {
  margin-bottom: 8px;
}

.report-kegiatan-roman {
  margin: 0 0 16px 1.1rem;
  padding: 0;
  list-style: lower-roman;
}

.report-kegiatan-roman > li {
  margin: 12px 0 0;
  padding-left: 4px;
}

.report-kegiatan-roman > li::marker {
  font-weight: 700;
  color: var(--muted);
}

.report-kegiatan-roman .roman-item-title {
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--text);
}

.report-kegiatan-subgrid {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .report-kegiatan-summary {
    grid-template-columns: 1fr !important;
  }
}

.section-title {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: #4a4540;
  margin: 8px 0 12px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.photo-upload {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .photo-upload {
    grid-template-columns: 1fr;
  }
}

.photo-upload__preview {
  width: 120px;
  height: 150px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-upload__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-upload__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 10px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Ikon siluet abu-abu untuk profil tanpa foto */
.member-profile-placeholder-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9188;
}

.member-profile-placeholder-icon .ui-ico-svg {
  width: 100%;
  height: 100%;
}

.member-profile-placeholder-icon--sm {
  width: 48px;
  height: 48px;
}

.member-profile-placeholder-icon--md {
  width: 72px;
  height: 72px;
}

.member-profile-placeholder-icon--lg {
  width: 104px;
  height: 104px;
}

.photo-upload__file {
  position: absolute;
  width: 0.01px;
  height: 0.01px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.photo-upload__actions .row {
  gap: 8px;
}

/* Foto per blok anggota keluarga: tombol vertikal (Kamera di atas), teks bantuan di bawah */
.photo-upload__actions.photo-upload__actions--col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.photo-upload__actions.photo-upload__actions--col .photo-upload__help {
  margin-top: 0;
  max-width: 100%;
}

/* Tombol aksi akhir form anggota (tanpa kartu primary): satu baris, tidak meregang penuh */
.member-form-submit-actions {
  width: 100%;
  justify-content: flex-start;
}

.member-form-submit-actions .btn,
.member-form-submit-actions a.btn {
  width: auto;
  flex: 0 0 auto;
}

.photo-webcam {
  position: fixed;
  inset: 0;
  background: rgba(46, 42, 38, 0.55);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-webcam[hidden] {
  display: none !important;
}

.photo-webcam__panel {
  max-width: 720px;
  width: 100%;
}

.photo-webcam__video {
  width: 100%;
  max-height: 56vh;
  border-radius: 12px;
  background: #000;
}

.address-map-modal__panel {
  max-width: 880px;
}

.address-map-modal__search {
  gap: 8px;
  align-items: stretch;
}

.address-map-modal__search-input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #ddd2c3);
  font: inherit;
}

.address-map-modal__map {
  height: min(45vh, 420px);
  min-height: 260px;
  width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, #ddd2c3);
  background: #e5ddd2;
}

.address-map-modal__map .leaflet-container {
  font: inherit;
  border-radius: 12px;
}

.address-map-modal__results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 160px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #ddd2c3);
}

.address-map-modal__results li {
  border-bottom: 1px solid var(--border-subtle, #ddd2c3);
}

.address-map-modal__results li:last-child {
  border-bottom: none;
}

.address-map-modal__result-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: var(--surface-elevated, #fff);
  font: inherit;
  cursor: pointer;
}

.address-map-modal__result-btn:hover,
.address-map-modal__result-btn:focus-visible {
  background: var(--surface-muted, #f0ebe3);
}

.address-map-modal__preview {
  margin-top: 12px;
}

.address-map-modal__preview-text {
  margin: 6px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.address-map-modal__attr {
  margin-top: 8px;
  margin-bottom: 0;
}

.member-card-photo img {
  display: block;
}

/* --- Aksesibilitas: teks hanya untuk pembaca layar --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Insight: judul + bulet poin (daftar nama/angka harus terbaca) */
.ui-insight-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.ui-insight-stack__lead,
.ui-insight-stack__after {
  margin: 0;
}

.ui-insight-stack__points {
  margin: 0.1rem 0 0;
  padding-left: 1.2rem;
  list-style: disc;
}

.ui-insight-stack__points > li {
  margin: 0.22rem 0;
  padding-left: 0.15rem;
  line-height: 1.45;
}

.ui-insight-stack__points > li::marker {
  color: currentColor;
}

/* --- Collapsible: ikon tampilkan / sembunyikan (standar proyek) --- */
.ui-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.ui-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--text);
  user-select: none;
}

.ui-details > summary::-webkit-details-marker {
  display: none;
}

.ui-details > summary::marker {
  content: "";
}

.ui-details__icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background-color: var(--muted);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  transition: transform 0.15s ease;
}

.ui-details[open] > summary .ui-details__icon {
  transform: rotate(90deg);
}

.ui-details__title {
  flex: 1 1 auto;
  min-width: 0;
}

.ui-details__body {
  padding: 0 16px 16px;
}

.ui-details__body > .card {
  margin: 0;
  border: 1px solid var(--border);
}

/* Laporan: jarak antar blok accordion */
.laporan-accordion {
  margin-top: 28px;
}

.laporan-accordion + .laporan-accordion {
  margin-top: 16px;
}

/* Halaman daftar prioritas (home_priority_list): KPI + insight */
.home-priority-kpi {
  margin-bottom: 20px;
}

.home-priority-kpi__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .home-priority-kpi__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.home-priority-kpi__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-width: 0;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.home-priority-kpi__card:hover {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.home-priority-kpi__card--current {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.home-priority-kpi__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text);
}

.home-priority-kpi__ico .ui-ico-svg {
  width: 1.25rem;
  height: 1.25rem;
}

.home-priority-kpi__short {
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.3;
}

.home-priority-kpi__num {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.home-priority-kpi__hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.home-priority-insight {
  margin-bottom: 20px;
}

.home-priority-insight__acc {
  margin-top: 0.5rem;
}

.home-priority-insight__acc + .home-priority-insight__acc {
  margin-top: 0.5rem;
}

.home-priority-insight__acc {
  margin-top: 12px;
}

.home-priority-insight__acc:first-of-type {
  margin-top: 0;
}

/* --- Jadwal: pengulangan (premium repeat card) + sticky actions --- */
.schedule-form-shell {
  position: relative;
  padding-bottom: 96px;
}

.schedule-form-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 8;
  margin-top: 12px;
  margin-left: -6px;
  margin-right: -6px;
  padding: 16px 8px 20px;
  background: linear-gradient(180deg, rgba(244, 246, 251, 0) 0%, rgba(255, 255, 255, 0.97) 22%, #fff 100%);
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 -16px 40px rgba(46, 42, 38, 0.07);
}

.schedule-form-actions--split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-form-actions--split .btn-primary {
  min-width: 148px;
}

.schedule-form-actions__batal {
  text-decoration: none;
}

.schedule-form-actions__batal:hover {
  text-decoration: none;
  border-color: #c7d2fe;
  color: var(--text);
}

.schedule-recurrence-outer {
  width: 100%;
}

.schedule-recurrence-footnote {
  margin: 14px 0 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.schedule-recurrence-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 8px;
}

.schedule-recurrence-card {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 14px 40px rgba(46, 42, 38, 0.06),
    0 2px 6px rgba(46, 42, 38, 0.04);
  padding: 22px 22px 24px;
}

.schedule-recurrence-card__intro {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8e0d6;
}

.schedule-recurrence-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.schedule-recurrence-card .repeat-builder {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Kiri: label + tanggal + waktu | Kanan: ulangi + berakhir (lebar kolom sama) */
.repeat-builder__body-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 22px;
}

@media (min-width: 960px) {
  .repeat-builder__body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 22px;
    align-items: start;
  }
}

.repeat-builder__body-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.repeat-builder__body-col--left .repeat-builder__section {
  margin-bottom: 0;
}

.repeat-builder__field-card {
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(46, 42, 38, 0.05);
}

.repeat-builder__body-col--left .schedule-time-block {
  width: 100%;
  max-width: none;
  margin: 0;
}

.repeat-builder__body-card {
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(46, 42, 38, 0.05);
}

.repeat-builder__body-card--repeat .repeat-builder__section {
  margin-bottom: 0;
}

.repeat-builder__required-tag {
  display: inline-block;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
  color: var(--muted);
  background: #f0ebe3;
  padding: 3px 8px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 8px;
}

.schedule-time-card__required {
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: lowercase;
}

.repeat-builder__body-grid + .repeat-builder__preview-notes-row {
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid #e8e0d6;
}

.repeat-builder__preview-notes-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 22px;
  align-items: stretch;
  min-width: 0;
}

.repeat-builder__preview-notes-row .repeat-builder__preview {
  min-width: 0;
}

.repeat-builder__preview-notes-row .repeat-builder__notes-aside {
  min-width: 0;
}

.repeat-builder__preview-notes-row .repeat-builder__notes-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.repeat-builder__preview-notes-row .repeat-builder__notes-card .schedule-dash-card__field {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.repeat-builder__preview-notes-row .repeat-builder__notes-card textarea {
  flex: 1;
  min-height: 120px;
}

@media (max-width: 900px) {
  .repeat-builder__preview-notes-row {
    grid-template-columns: 1fr;
  }
}

.repeat-builder__section {
  margin-bottom: 22px;
}

.repeat-builder__section:last-of-type {
  margin-bottom: 0;
}

.repeat-builder__section--end {
  padding-top: 4px;
  margin-bottom: 20px;
}

.repeat-builder__body-card--end.repeat-builder__section--end {
  padding: 18px 18px 16px;
  margin-bottom: 0;
}

.repeat-builder__section-title {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.repeat-builder__section-lead {
  margin: 0 0 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.repeat-builder__date-field {
  position: relative;
  max-width: 100%;
}

.repeat-builder__date-input {
  width: 100%;
  max-width: 100%;
  padding: 12px 44px 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.repeat-builder__date-input:hover {
  border-color: #c7d2fe;
  background: #fff;
}

.repeat-builder__date-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.repeat-builder__date-icon {
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 6px;
  background: linear-gradient(135deg, #faf6ed, #f2ecdc);
  opacity: 0.95;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.12);
}

.repeat-builder__date-icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid var(--primary-600);
  border-radius: 3px;
  opacity: 0.55;
}

.repeat-builder__field {
  display: block;
  margin-bottom: 12px;
}

.repeat-builder__field--flush {
  margin-bottom: 0;
}

.repeat-builder__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.repeat-builder__select-wrap {
  position: relative;
}

.repeat-builder__select-wrap--lg .repeat-builder__select--lg {
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 1rem;
}

.repeat-builder__select {
  width: 100%;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 12px 42px 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(46, 42, 38, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.repeat-builder__select:hover {
  border-color: #c7d2fe;
}

.repeat-builder__select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.repeat-builder__select-chev {
  pointer-events: none;
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.65;
}

.repeat-builder__input {
  width: 100%;
  max-width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.repeat-builder__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

/* Baris frekuensi custom: override width:100% dari .repeat-builder__input */
.repeat-builder__freq .repeat-builder__input.repeat-builder__freq-n {
  width: 5.5rem;
  max-width: min(100%, 7rem);
  flex: 0 0 5.5rem;
  min-width: 3.5rem;
  box-sizing: border-box;
}

.repeat-builder__freq .repeat-builder__freq-unit {
  flex: 1 1 0;
  min-width: 6.5rem;
  max-width: 100%;
}

.repeat-builder__input--inline {
  width: 4.25rem;
  display: inline-block;
  vertical-align: middle;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.repeat-builder__inline-kicker {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 6px;
  vertical-align: middle;
}

.repeat-builder__inline-kicker:first-child {
  margin-left: 0;
}

.repeat-builder__empty {
  margin: 12px 0 0;
}

.repeat-builder__empty[hidden] {
  display: none !important;
}

.repeat-builder__empty-card {
  text-align: center;
  padding: 20px 16px;
  border-radius: 12px;
  border: 1px dashed #ddd2c3;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.repeat-builder__empty-title {
  margin: 0 0 6px;
  font-weight: 650;
  color: var(--text);
}

.repeat-builder__empty-sub {
  margin: 0;
  font-size: 0.82rem;
}

.repeat-builder__empty-icon {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #faf6ed, #f0ebe3);
}

.repeat-builder__panel {
  margin-top: 14px;
  padding: 14px 14px 16px;
  border-radius: 12px;
  background: var(--surface-muted);
  border: 1px solid #e8e0d6;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.repeat-builder__panel[hidden] {
  display: none !important;
}

.repeat-builder__panel--end-freq {
  margin-top: 10px;
}

.repeat-builder__end-modes {
  margin-top: 14px;
}

.repeat-builder__panel-kicker {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--text);
}

.repeat-builder__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.repeat-builder__chip {
  cursor: pointer;
  user-select: none;
}

.repeat-builder__chip-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.repeat-builder__chip-ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.65rem;
  padding: 9px 10px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: #fff;
  border: 1px solid #e5ddd2;
  border-radius: 999px;
  transition: transform 0.14s ease, border-color 0.14s ease, color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.repeat-builder__chip:hover .repeat-builder__chip-ui {
  border-color: #c7d2fe;
  color: var(--text);
}

.repeat-builder__chip-input:focus-visible + .repeat-builder__chip-ui {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.repeat-builder__chip-input:checked + .repeat-builder__chip-ui {
  color: var(--btn-primary-fg);
  background: linear-gradient(165deg, #dcc07a 0%, var(--primary) 50%, var(--primary-600) 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(200, 155, 75, 0.28);
  transform: translateY(-1px);
}

.repeat-builder__fieldset {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.repeat-builder__radio-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
}

.repeat-builder__radio-row input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.repeat-builder__subpanel {
  margin-bottom: 12px;
}

.repeat-builder__subpanel[hidden] {
  display: none !important;
}

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

.repeat-builder__freq {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

/* Opsi berakhir: radio bulat + teks sejajar */
.repeat-builder__end-mode-row {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0 14px;
  align-items: start;
  margin-bottom: 14px;
}

.repeat-builder__end-mode-row:last-child {
  margin-bottom: 0;
}

.repeat-builder__end-mode-radio {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.28rem 0 0;
  justify-self: center;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.repeat-builder__end-mode-content {
  min-width: 0;
}

.repeat-builder__end-mode-text {
  display: block;
  cursor: pointer;
  padding: 2px 0 0;
}

.repeat-builder__end-mode-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
}

.repeat-builder__end-mode-caption {
  display: block;
  margin-top: 3px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.repeat-builder__end-mode-reveal {
  margin-top: 10px;
}

.repeat-builder__end-mode-radio:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.45);
  outline-offset: 2px;
}

.repeat-builder__choice-reveal {
  margin-top: 12px;
  padding-top: 2px;
  transition: opacity 0.18s ease;
}

.repeat-builder__choice-reveal[hidden] {
  display: none !important;
}

.repeat-builder__choice-reveal--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}

/* Pratinjau */
.repeat-builder__preview {
  margin-top: 0;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdf9 0%, #f5ecdc 40%, #faf7f2 100%);
  border: 1px solid rgba(200, 155, 75, 0.22);
  box-shadow: 0 10px 32px rgba(79, 70, 229, 0.1);
}

.repeat-builder__preview[hidden] {
  display: none !important;
}

.repeat-builder__preview-eyebrow {
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-600);
  margin-bottom: 8px;
}

.repeat-builder__preview-lead {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #2e2a26;
}

.repeat-builder__preview-next-label {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.repeat-builder__preview-body {
  min-height: 3.5rem;
}

.repeat-builder__preview-empty {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed #c7d2fe;
}

.repeat-builder__preview-empty[hidden] {
  display: none !important;
}

.repeat-builder__preview-empty p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

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

.repeat-builder__preview-list li {
  padding: 9px 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  border-bottom: 1px solid rgba(46, 42, 38, 0.12);
}

.repeat-builder__preview-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

@media (max-width: 720px) {
  .schedule-recurrence-card {
    padding: 18px 16px 20px;
    border-radius: 14px;
  }

  .repeat-builder__row2 {
    grid-template-columns: 1fr;
  }

  .repeat-builder__freq {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .repeat-builder__freq .repeat-builder__input.repeat-builder__freq-n {
    width: 4.75rem;
    max-width: min(100%, 6rem);
    flex: 0 0 4.75rem;
    min-width: 3.25rem;
  }

  .schedule-form-actions--split {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .schedule-form-actions--split .btn-primary {
    width: 100%;
  }
}

/* --- Form jadwal: waktu mulai & selesai (premium) --- */
body.schedule-time-modal-open {
  overflow: hidden;
}

.schedule-time-block {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.schedule-time-block__inner {
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 10px 28px rgba(46, 42, 38, 0.05);
}

.schedule-time-block__header {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0ebe3;
}

.schedule-time-block__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
}

.schedule-time-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Baris 1: label mulai | label selesai; baris 2: trigger mulai | ikon tanpa selesai | trigger selesai */
.schedule-time-cards-stack--inline-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 8px;
  align-items: center;
  position: relative;
}

.schedule-time-cards-stack--inline-mid > .schedule-time-card {
  display: contents;
}

.schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="start"] > .schedule-time-card__label {
  grid-column: 1;
  grid-row: 1;
}

.schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="start"] > .schedule-time-card__trigger {
  grid-column: 1;
  grid-row: 2;
}

.schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="start"] > .schedule-time-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

.schedule-time-cards-stack--inline-mid > .schedule-time-noend--between {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="end"] > .schedule-time-card__label {
  grid-column: 3;
  grid-row: 1;
}

.schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="end"] > .schedule-time-card__trigger {
  grid-column: 3;
  grid-row: 2;
}

.schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="end"] > .schedule-time-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  clip-path: inset(50%);
}

@media (max-width: 520px) {
  .schedule-time-cards-stack--inline-mid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }

  .schedule-time-cards-stack--inline-mid > .schedule-time-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="start"] > .schedule-time-sr,
  .schedule-time-cards-stack--inline-mid > .schedule-time-card[data-field="end"] > .schedule-time-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    clip-path: inset(50%);
  }

  .schedule-time-cards-stack--inline-mid > .schedule-time-noend--between {
    align-self: center;
  }
}

.schedule-time-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.schedule-time-card__label {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.schedule-time-card__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 0 14px 0 16px;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 14px;
  border: 1px solid #e5ddd2;
  background: #fafbfc;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(46, 42, 38, 0.04);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.schedule-time-card__trigger:hover {
  border-color: #c7d2fe;
  background: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
}

.schedule-time-card__trigger:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.schedule-time-card__trigger:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.schedule-time-card__value {
  font-size: 1.05rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.schedule-time-card__clock {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #faf6ed, #f2ecdc);
  border: 1px solid rgba(99, 102, 241, 0.25);
  position: relative;
}

.schedule-time-card__clock::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid var(--primary-600);
  border-radius: 50%;
  opacity: 0.45;
}

.schedule-time-card__clock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  background: var(--primary-600);
  border-radius: 1px;
  opacity: 0.55;
  transform-origin: bottom center;
  transform: rotate(45deg);
}

.schedule-time-card--end.is-disabled .schedule-time-card__trigger {
  background: #f0ebe3;
}

.schedule-time-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.schedule-time-duration {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 6px 0 12px;
}

/* Durasi / «Tanpa selesai» di bawah baris mulai–selesai (bukan di tengah grid) */
.schedule-time-block__inner > .schedule-time-duration {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0ebe3;
}

.schedule-time-duration--pick {
  justify-content: flex-start;
}

.schedule-time-duration__label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.schedule-time-duration__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
}

/* Kolom sama lebar: override width tetap / width:100% global .repeat-builder__input */
.schedule-time-duration__controls .schedule-time-duration__amount.repeat-builder__input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.schedule-time-duration__unit-wrap {
  min-width: 0;
  max-width: 100%;
}

.schedule-time-duration__unit {
  width: 100%;
  min-width: 0;
}

.schedule-time-duration.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.schedule-time-noend {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0ebe3;
}

/* Ikon «tanpa waktu selesai» di antara mulai & selesai */
.schedule-time-noend--between {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2px;
}

.schedule-time-noend__icon-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid #e5ddd2;
  background: #fafbfc;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(46, 42, 38, 0.04);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.schedule-time-noend__icon-label:hover {
  border-color: #c7d2fe;
  background: #fff;
  color: var(--muted);
}

.schedule-time-noend__icon-label:has(.schedule-time-noend__cb:checked) {
  border-color: rgba(79, 70, 229, 0.55);
  background: linear-gradient(180deg, #faf6ed 0%, #f2ecdc 100%);
  color: var(--primary-600);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.2);
}

.schedule-time-noend__icon-label:has(.schedule-time-noend__cb:focus-visible) {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.schedule-time-noend__icon-surface {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.schedule-time-noend__svg {
  display: block;
}

.schedule-time-noend__cb {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.schedule-time-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.schedule-time-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.schedule-time-modal[hidden] {
  display: none !important;
}

.schedule-time-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 42, 38, 0.45);
  backdrop-filter: blur(2px);
  animation: scheduleTimeFadeIn 0.18s ease;
}

.schedule-time-modal__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 20px 20px 18px;
  border-radius: 16px 16px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(46, 42, 38, 0.18);
  border: 1px solid #e8ecf4;
  animation: scheduleTimeSlideUp 0.22s ease;
}

@media (min-width: 480px) {
  .schedule-time-modal {
    align-items: center;
  }

  .schedule-time-modal__panel {
    border-radius: 16px;
  }
}

@keyframes scheduleTimeFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scheduleTimeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.schedule-time-modal__title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.schedule-time-modal__pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.schedule-time-modal__field span {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 6px;
}

.schedule-time-modal__select {
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
}

.schedule-time-modal__select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.schedule-time-modal__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.schedule-time-modal__chip {
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #e5ddd2;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.schedule-time-modal__chip:hover {
  border-color: #c7d2fe;
  background: rgba(200, 155, 75, 0.12);
}

.schedule-time-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- Form jadwal ibadah: grid satu kolom (satu baris per blok) --- */
.schedule-form-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 12px;
  align-items: start;
}

.schedule-form-dashboard .schedule-recurrence-shell,
.schedule-form-dashboard .schedule-time-block {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.schedule-dash-card {
  background: #fff;
  border: 1px solid #e8ecf4;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 8px 22px rgba(46, 42, 38, 0.05);
}

.schedule-dash-card__field {
  display: block;
  margin: 0;
}

.schedule-dash-card__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.schedule-dash-card__input,
.schedule-dash-card textarea,
.schedule-dash-card__textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.schedule-dash-card__input:focus,
.schedule-dash-card textarea:focus,
.schedule-dash-card__textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.schedule-dash-card textarea,
.schedule-dash-card__textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.45;
}

.schedule-dash__meta {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.schedule-form-dashboard .schedule-dash__recurrence,
.schedule-form-dashboard .schedule-dash__actions {
  grid-column: 1;
  grid-row: auto;
}

/* --- Modal pilihan hapus: satu tanggal vs seluruh slot jadwal --- */
body.schedule-delete-choice-modal-open {
  overflow: hidden;
}

.schedule-delete-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.schedule-delete-choice-modal[hidden] {
  display: none !important;
}

.schedule-delete-choice-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 42, 38, 0.45);
  backdrop-filter: blur(2px);
}

.schedule-delete-choice-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 22px 22px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8ecf4;
  box-shadow: 0 20px 50px rgba(46, 42, 38, 0.2);
}

.schedule-delete-choice-modal__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.schedule-delete-choice-modal__lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.schedule-delete-choice-modal__stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.schedule-delete-choice-modal__stack .btn {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.schedule-delete-choice-modal__stack form {
  margin: 0;
}

/* --- Modal konfirmasi hapus katalog (jadwal + laporan) --- */
.catalog-delete-confirm-modal .schedule-delete-choice-modal__panel {
  max-width: 480px;
}

.catalog-delete-modal__list {
  margin: 12px 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.catalog-delete-modal__list li {
  margin-bottom: 6px;
}

.catalog-delete-modal__warn {
  margin: 14px 0 0;
  font-size: 0.875rem;
  font-weight: 650;
  color: #b91c1c;
}

.repeat-builder__input--block {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  box-sizing: border-box;
}

/* Penugasan: pemisah grup bulan pada tabel pelaksanaan */
.table tr.penugasan-month-head th {
  background: #f0ebe3;
  font-weight: 600;
  text-align: left;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #e5ddd2);
}

.table--penugasan-by-month tr.penugasan-month-head th.penugasan-month-head__month {
  width: 12rem;
  max-width: 38%;
  vertical-align: middle;
}

.table--penugasan-by-month tr.penugasan-month-head th.penugasan-month-head__actions {
  width: 6rem;
  text-align: right;
}

.sd-table tr.penugasan-month-head th {
  background: #f0ebe3;
  font-weight: 600;
  text-align: left;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border, #e5ddd2);
}

/* Subgrup label (Laporan — pelaksanaan terkini) di bawah judul bulan */
.sd-table tr.lrp-label-group__head-row th {
  background: var(--surface-muted);
  font-weight: 500;
  text-align: left;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 12px;
  border-bottom: 1px solid #e8e0d6;
}

.lrp-label-group__toggle .month-group__label {
  color: var(--muted);
  font-size: 0.92em;
}

.lrp-label-mobile-stack {
  margin-bottom: 10px;
}

.lrp-label-mobile-stack:last-child {
  margin-bottom: 0;
}

button.lrp-label-mobile-stack__toggle.month-group__toggle--mobile {
  margin: 8px 0 6px;
  padding: 6px 10px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--surface-muted);
}

/* Grup bulanan: tombol bentangkan / ciutkan (standar semua halaman) */
.month-group__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.month-group__toggle:focus-visible {
  outline: 2px solid var(--focus, var(--primary));
  outline-offset: 2px;
}

.month-group__toggle--table {
  padding: 2px 0;
}

.month-group__chev {
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  flex-shrink: 0;
  margin-top: 0.12em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease, margin 0.15s ease;
}

/* Tertutup: chevron ke kanan (>); terbuka: ke bawah */
.month-group__toggle[aria-expanded="true"] .month-group__chev {
  transform: rotate(45deg);
  margin-top: 0.08em;
}

.month-group__label {
  flex: 1;
  min-width: 0;
}

.lrp-recent button.month-group__toggle--mobile.sd-mobile-month-head {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  margin: 12px 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f0ebe3;
  font-weight: 600;
  border-bottom: 1px solid var(--border, #e5ddd2);
}

tbody.month-group.is-collapsed > tr:not(.month-group__head-row) {
  display: none;
}

.table tr.penugasan-activity-mode-head td.penugasan-activity-mode-head__cell {
  background: #e8eef6;
  font-size: 0.9rem;
  font-weight: 600;
  padding-top: 8px;
  padding-bottom: 8px;
  border-top: 1px solid var(--border, #e5ddd2);
  color: var(--text, #2e2a26);
}

/* Form anggota: pratinjau kelompok umur (master) */
.member-age-group-preview {
  margin-top: 6px;
  margin-bottom: 0;
}

.member-age-group-preview__k {
  color: var(--muted);
  margin-right: 6px;
}

/* Input persembahan (format Rupiah Indonesia) */
.js-offering-idr {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Laporan IR: ringkasan — lebar kolom proporsional; angka satu garis dasar */
.ir-report-totals-card__heading {
  margin-bottom: 12px;
}

.ir-report-totals-card__grid {
  display: grid;
  gap: 10px 12px;
  align-items: stretch;
}

/* fr relatif: kehadiran lebih sempit; nominal persembahan seimbang; gabungan sedikit lebih lebar */
.ir-report-totals-card__grid--cols-4 {
  grid-template-columns:
    minmax(5.5rem, 0.72fr)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(6.5rem, 1.08fr);
}

.ir-report-totals-card__grid--cols-5 {
  grid-template-columns:
    minmax(5.5rem, 0.68fr)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(6.75rem, 1.1fr);
}

.ir-report-totals-card__cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ir-report-totals-card__help-top {
  margin-top: 0;
  margin-bottom: 0;
  min-height: 2.75em;
  line-height: 1.35;
  flex-shrink: 0;
}

.ir-report-totals-card__figure {
  margin-top: auto;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.ir-report-totals-card__figure strong {
  font-weight: 800;
}

/* Gabungan persembahan: teks kolom terakhir rata kanan */
.ir-report-totals-card__cell--grand {
  text-align: right;
}

@media (max-width: 900px) {
  .ir-report-totals-card__grid--cols-4,
  .ir-report-totals-card__grid--cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ir-report-totals-card__cell--grand {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .ir-report-totals-card__grid--cols-4,
  .ir-report-totals-card__grid--cols-5 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ir-report-totals-card__cell--grand {
    grid-column: auto;
  }
}

/* Detail anggota: kolom kanan (foto + kartu) */
.member-detail-aside-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
  position: sticky;
  top: 16px;
  min-width: 0;
}

/* Kartu anggota — potret ISO 7810 ID-1 (53,98 × 85,6 mm), gaya ATM */
.member-namecard-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 0 24px;
}

.member-namecard-page--embed {
  padding: 0;
}

.member-namecard--atm-portrait {
  /* Teks terang di atas latar gelap (--mc-navy = warna teks utama) */
  --mc-navy: #e8ebf2;
  --mc-gold: #d4b87a;
  --mc-muted: #9a9188;
  --mc-bg-start: #243352;
  --mc-bg-end: #121a2c;
  --mc-font-title: Cinzel, Georgia, "Times New Roman", serif;
  --mc-font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mc-motif-opacity: 0.3;
  /*
   * Kotak putih QR: sisi luar tetap (px); isi gambar memakai max-width/max-height agar tidak terpotong atau ter-stretch.
   * Pastikan zoom peramban 100% saat menangkap (html2canvas).
   */
  /* ~30% lebih kecil dari 200px / 8px */
  --mc-qr-box-size: 140px;
  --mc-qr-box-padding: 6px;
  position: relative;
  /* ID-1 portrait: lebar sisi pendek, tinggi sisi panjang */
  width: 53.98mm;
  height: 85.6mm;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 2.6mm;
  font-family: var(--mc-font-body);
  color: var(--mc-navy);
  background: linear-gradient(165deg, var(--mc-bg-start), var(--mc-bg-end));
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Halaman kartu anggota: kartu (kiri) | foto (tengah) | nama (kanan) */
.member-card-standalone {
  overflow: visible;
}

.member-card-standalone__row {
  display: grid;
  grid-template-columns: auto minmax(160px, 220px) minmax(0, 1fr);
  gap: 28px 32px;
  align-items: center;
  justify-content: start;
}

.member-card-standalone__col--card {
  flex: 0 0 auto;
}

.member-card-standalone__card-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.member-card-standalone__col--photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.member-card-standalone__photo-frame {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #f0ebe3;
  aspect-ratio: 3 / 4;
  box-shadow: 0 8px 28px rgba(46, 42, 38, 0.1);
}

.member-card-standalone__photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card-standalone__photo-placeholder {
  width: 100%;
  max-width: 220px;
  min-height: 260px;
  border-radius: 14px;
  border: 1px dashed #ddd2c3;
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 14px;
}

.member-card-standalone__photo-placeholder .member-profile-placeholder-icon {
  margin-bottom: 4px;
}

.member-card-standalone__col--name {
  min-width: 0;
  align-self: center;
}

.member-card-standalone__name-block {
  padding: 8px 0;
}

.member-card-standalone__name-label {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.member-card-standalone__full-name {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text, #2e2a26);
  word-break: break-word;
}

.member-card-standalone__nickname {
  margin: 0;
  font-size: 1rem;
  color: var(--text, #4a4540);
  line-height: 1.45;
}

.member-card-standalone__nickname-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

@media (max-width: 960px) {
  .member-card-standalone__row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .member-card-standalone__col--name {
    max-width: 36rem;
  }

  .member-card-standalone__name-block {
    text-align: center;
  }

  .member-card-standalone__nickname-label {
    margin-bottom: 6px;
  }
}

/* Logo watermark: 70% transparan (opacity 0.3) di belakang header + QR */
.member-namecard__watermark {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 52%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.member-namecard__watermark[hidden] {
  display: none !important;
}

.member-namecard__logo-watermark {
  width: 78%;
  max-width: 42mm;
  height: auto;
  max-height: 95%;
  object-fit: contain;
  object-position: center center;
  opacity: var(--mc-motif-opacity, 0.3);
}

.member-namecard__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 0 2.8mm 1mm;
  /* Sedikit lebih gelap dari tepi kartu agar area konten terbaca jelas */
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0%, rgba(0, 0, 0, 0.22) 100%);
}

.member-namecard__header {
  flex: 0 0 auto;
  text-align: center;
  /* Turunkan judul 1 baris (tinggi baris sebelum +10% ukuran) */
  margin-top: calc(1.15 * 5.6pt * 1.2 * 1.3);
}

.member-namecard__title {
  margin: 0;
  font-family: var(--mc-font-title);
  /* Dasar 5.6pt ×1.2 ×1.3 ×1.1 lalu +20% */
  font-size: calc(5.6pt * 1.2 * 1.3 * 1.1 * 1.2);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--mc-gold);
  line-height: 1.15;
}

/* QR di tengah (horizontal + vertikal) di ruang antara header dan blok info */
.member-namecard__qr-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.member-namecard__qr-box {
  box-sizing: border-box;
  flex-shrink: 0;
  width: min(var(--mc-qr-box-size), 100%);
  max-width: 100%;
  aspect-ratio: 1;
  padding: var(--mc-qr-box-padding);
  background: rgba(244, 246, 250, 0.92);
  border-radius: 2mm;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  /* Turunkan QR ~1 baris setinggi judul (ukuran judul terkini) */
  margin-top: calc(1.15 * 5.6pt * 1.2 * 1.3 * 1.1 * 1.2);
}

/* Tanpa cover/stretch: gambar mengikuti rasio asli, muat penuh di dalam kotak */
.member-namecard__qr-img {
  display: block;
  flex: 0 1 auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
  border: 0;
}

.member-namecard__qr-box--empty {
  /* Ukuran sama .member-namecard__qr-box; hanya state placeholder */
  background: rgba(244, 246, 250, 0.92);
}

.member-namecard__qr-empty {
  font-size: calc(8pt * 1.1 * 1.3);
  font-weight: 700;
  color: rgba(31, 42, 68, 0.35);
}

.member-namecard__info {
  flex: 0 0 auto;
  text-align: center;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.8mm;
}

.member-namecard__ministry {
  font-weight: 600;
  font-size: calc(6.5pt * 1.2);
  color: var(--mc-navy);
  line-height: 1.2;
}

.member-namecard__tagline {
  font-size: calc(5.2pt * 1.2);
  color: var(--mc-muted);
  margin-top: 0.4mm;
  line-height: 1.2;
}

.member-namecard__divider {
  width: 70%;
  max-width: 36mm;
  height: 0.35mm;
  background: var(--mc-gold);
  margin: 1.2mm 0;
  opacity: 0.55;
}

/* KODE ANGGOTA + nomor: ×0,75 lalu +20% */
.member-namecard__code-label {
  font-size: calc(5pt * 0.75 * 1.2);
  color: var(--mc-gold);
  letter-spacing: 0.1em;
}

.member-namecard__code {
  font-size: calc(6.5pt * 0.75 * 1.2);
  font-weight: 600;
  color: var(--mc-navy);
  border-bottom: 0.3mm solid var(--mc-gold);
  display: inline-block;
  padding-bottom: 0.45mm;
  margin-top: 0.35mm;
  max-width: 100%;
  word-break: break-all;
  line-height: 1.15;
}

.member-namecard__footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  text-align: center;
  font-size: 4.2pt;
  color: rgba(232, 235, 242, 0.5);
  letter-spacing: 0.08em;
  line-height: 1.25;
  padding: 0.8mm 2.5mm 2mm;
}

.member-namecard-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.member-namecard-actions .btn.btn-icononly {
  flex: 0 0 auto;
}

/* Tombol ikon-saja: pastikan gaya primary/ghost tidak ditimpa .btn-icononly generik */
.member-namecard-actions .btn-primary.btn-icononly {
  background: linear-gradient(165deg, #dcc07a 0%, var(--primary) 50%, var(--primary-600) 100%);
  color: var(--btn-primary-fg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-primary);
}

.member-namecard-actions .btn-primary.btn-icononly:hover {
  filter: brightness(1.03);
}

.member-namecard-actions .btn-ghost.btn-icononly {
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.member-namecard-actions .btn-ghost.btn-icononly:hover {
  background: var(--surface-muted);
}

.member-namecard-actions .btn-icononly:disabled,
#member_card_overlay_whatsapp:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media screen and (max-width: 260px) {
  .member-namecard--atm-portrait {
    width: 100%;
    height: auto;
    aspect-ratio: 5398 / 8560;
  }
}

@media (max-width: 900px) {
  .member-detail-aside-col {
    position: static;
    max-width: 420px;
  }
}

/* Demografi jemaat (halaman ringkasan) */
.member-demo-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.member-demo-summary__card {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 2px 10px rgba(46, 42, 38, 0.04);
}

.member-demo-summary__card--ok {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.member-demo-summary__card--muted {
  border-color: rgba(46, 42, 38, 0.14);
  background: var(--surface-muted);
}

.member-demo-summary__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.member-demo-summary__value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #2e2a26;
  letter-spacing: -0.02em;
}

.member-demo-summary__pct {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.member-demo-note {
  margin: 0 0 16px;
}

.member-demo-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-demo-section .member-demo-section__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-demo-section .member-demo-section__summary::-webkit-details-marker {
  display: none;
}

.member-demo-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 5rem;
}

.member-demo-table__bar {
  min-width: 120px;
  vertical-align: middle;
}

.member-demo-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.member-demo-bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-600) 100%);
  min-width: 2px;
}

@media (max-width: 720px) {
  .member-demo-summary {
    grid-template-columns: 1fr;
  }

  .member-demo-table__bar {
    min-width: 80px;
  }
}

/* =============================================================================
   Shell admin (#app-shell.admin-dash) — form tim, penugasan, tabel, kartu
   ============================================================================= */
@media (max-width: 900px) {
  #app-shell.admin-dash .admin-main .penugasan-matrix-print-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #app-shell.admin-dash .admin-main .penugasan-matrix-print-toolbar .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  #app-shell.admin-dash .admin-main .card {
    padding: 14px 12px;
    border-radius: 10px;
  }

  #app-shell.admin-dash .admin-main .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }

  #app-shell.admin-dash .admin-main .topbar h2 {
    font-size: 1.15rem;
    line-height: 1.3;
  }

  #app-shell.admin-dash .admin-main .topbar .row {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  #app-shell.admin-dash .admin-main .topbar .row .btn:not(.btn-icononly) {
    width: auto;
    max-width: 100%;
    justify-content: center;
  }

  #app-shell.admin-dash .admin-main .topbar .row .btn-icononly {
    width: 2.35rem;
    min-width: 2.35rem;
    flex: 0 0 2.35rem;
  }

  /* Form: baris alat + input tim (penugasan, laporan, dll.) → satu kolom */
  #app-shell.admin-dash .admin-main form.row,
  #app-shell.admin-dash .admin-main form .row:not(.members-filter-grid) {
    flex-direction: column;
    align-items: stretch !important;
  }

  #app-shell.admin-dash .admin-main form.row > *,
  #app-shell.admin-dash .admin-main form .row:not(.members-filter-grid) > * {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100%;
  }

  #app-shell.admin-dash .admin-main form.row > .btn,
  #app-shell.admin-dash .admin-main form.row button[type='submit'],
  #app-shell.admin-dash .admin-main form .row:not(.members-filter-grid) > .btn,
  #app-shell.admin-dash .admin-main form .row:not(.members-filter-grid) button[type='submit'] {
    width: 100%;
    justify-content: center;
  }

  #app-shell.admin-dash .admin-main .penugasan-sync-prep {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  #app-shell.admin-dash .admin-main .penugasan-sync-prep .help {
    margin-right: 0 !important;
  }

  #app-shell.admin-dash .admin-main .penugasan-sync-prep .btn {
    width: 100%;
    justify-content: center;
  }

  /* Input & select utama di area konten: tidak meluber */
  #app-shell.admin-dash .admin-main input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']),
  #app-shell.admin-dash .admin-main select,
  #app-shell.admin-dash .admin-main textarea {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Tabel lebar: geser horizontal di dalam kartu */
  #app-shell.admin-dash .admin-main .card:has(table.table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  #app-shell.admin-dash .admin-main .card:has(table.table) table.table {
    min-width: 520px;
  }

  /* Kartu berisi hanya scroll matriks penugasan */
  #app-shell.admin-dash .admin-main .penugasan-matrix-scroll {
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  /* Cool absensi: nominal + field sejajar → vertikal */
  #app-shell.admin-dash .admin-main .cool-absensi-form__moneyrow.row {
    flex-direction: column;
    align-items: stretch;
  }

  #app-shell.admin-dash .admin-main .cool-absensi-form__moneycol,
  #app-shell.admin-dash .admin-main .cool-absensi-form__moneycol--grow {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  #app-shell.admin-dash .admin-main .cool-absensi-date-form__row {
    flex-direction: column;
    align-items: stretch;
  }

  #app-shell.admin-dash .admin-main .cool-absensi-date-form__submit .btn {
    width: 100%;
    justify-content: center;
  }

  /* Filter anggota: bungkus ke baris berikutnya, kurangi scroll horizontal */
  #app-shell.admin-dash .admin-main .members-filter-grid {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  #app-shell.admin-dash .admin-main .members-filter-field:not(.members-filter-field--grow):not(.members-filter-actions):not(.members-filter-field--sort):not(.members-filter-field--cool) {
    flex: 1 1 calc(50% - 6px);
    min-width: min(100%, 140px);
    max-width: none;
    width: auto;
  }

  #app-shell.admin-dash .admin-main .members-filter-field--cool {
    flex: 1 1 calc(50% - 6px);
    min-width: min(100%, 158px);
    max-width: none;
    width: auto;
  }

  #app-shell.admin-dash .admin-main .members-filter-field--sort {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

/* Form anggota: kartu anggota keluarga terpisah dari kartu data utama */
.member-form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Draft pendaftaran mandiri (halaman pilih jenis form) */
.msr-draft-resume {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(200, 155, 75, 0.45);
  background: rgba(200, 155, 75, 0.08);
}

.msr-draft-resume[hidden] {
  display: none !important;
}

.msr-draft-resume__text {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #57534e;
}

.msr-draft-resume__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.msr-draft-resume__actions > .btn,
.msr-draft-resume__actions > a.btn {
  flex: 1 1 12rem;
  justify-content: center;
  min-width: 0;
}

.msr-draft-resume__actions > .btn[hidden],
.msr-draft-resume__actions > a.btn[hidden] {
  display: none !important;
}

/* Pemilih jenis pendataan anggota — dua kartu (Lajang / Keluarga) */
.member-create-unit-form {
  margin-top: 8px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.member-create-unit-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.member-create-unit-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.member-create-unit-options > .card + .card {
  margin-top: 0;
}

.member-create-unit-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 0;
  min-height: 10.75rem;
  padding: 1.45rem 1.15rem 1.35rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.member-create-unit-option__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.member-create-unit-option__icon,
.member-create-unit-option__title {
  pointer-events: none;
}

.member-create-unit-option:hover {
  border-color: rgba(200, 155, 75, 0.65);
  box-shadow: 0 8px 22px rgba(46, 42, 38, 0.08);
}

.member-create-unit-option:has(.member-create-unit-option__input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(200, 155, 75, 0.35);
}

.member-create-unit-option:has(.member-create-unit-option__input:checked) {
  border-color: #c89b4b;
  background: rgba(200, 155, 75, 0.1);
  box-shadow: 0 0 0 1px rgba(200, 155, 75, 0.4);
}

.member-create-unit-option__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: rgba(200, 155, 75, 0.14);
  color: #92400e;
}

.member-create-unit-option__icon .ui-ico-svg {
  width: 2.35rem;
  height: 2.35rem;
}

.member-create-unit-option__title {
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.3;
}

@media (max-width: 520px) {
  .member-create-unit-options {
    grid-template-columns: 1fr;
  }

  .member-create-unit-option {
    min-height: 8.5rem;
  }

  .msr-draft-resume__actions {
    flex-direction: column;
  }

  .msr-draft-resume__actions > .btn,
  .msr-draft-resume__actions > a.btn {
    flex: 1 1 auto;
    width: 100%;
  }

  .member-public-page {
    padding: 0.9rem 0 1.5rem;
  }

  .member-public-page > .topbar h2 {
    font-size: 1.2rem;
  }
}

.member-form-family-wrap .fam-members-blocks--multi {
  gap: 20px;
}

/* Keluarga (create multi): kartu slot jumlah orang terpisah dari kartu anggota; input slot sempit */
.member-form-family-wrap #family_married_only.family-married-only {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fam-member-slot-card .fam-member-slot-card__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.fam-member-slot-stepper {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.fam-member-slot-stepper__btn {
  border-radius: 0;
  border: 0;
  flex-shrink: 0;
}

.fam-member-slot-stepper__btn:first-child {
  border-right: 1px solid var(--border);
}

.fam-member-slot-stepper__btn:last-child {
  border-left: 1px solid var(--border);
}

.fam-member-slot-stepper__input[type="number"] {
  width: 3.25rem;
  min-width: 3rem;
  max-width: 4rem;
  margin: 0;
  border: 0;
  border-radius: 0;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  -moz-appearance: textfield;
}

.fam-member-slot-stepper__input[type="number"]::-webkit-outer-spin-button,
.fam-member-slot-stepper__input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fam-member-slot-stepper__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Bilangan bulut (laporan kehadiran, dsb.): input + tombol ± bertumpuk di kanan */
.ui-count-stepper.ui-count-stepper--rail-right {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.ui-count-stepper__input[type="number"] {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 9px 10px;
  font: inherit;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.ui-count-stepper__input[type="number"]::-webkit-outer-spin-button,
.ui-count-stepper__input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ui-count-stepper__rail {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  min-width: 2.5rem;
}

.ui-count-stepper__rail .btn-icononly {
  flex: 1 1 50%;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 2.25rem;
  border: 0;
  border-radius: 0;
  margin: 0;
  background: transparent;
}

.ui-count-stepper__rail .btn-icononly:hover {
  background: var(--surface-muted);
}

.ui-count-stepper__rail .btn-icononly + .btn-icononly {
  border-top: 1px solid var(--border);
}

.ui-count-stepper__rail .btn-icononly:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- Member admin form: section cards + sticky save --- */
.member-form-page {
  padding-bottom: 5.5rem;
}

/* Pendaftaran mandiri / konversi kartu kunjungan (publik) — konten terpusat seperti first_visit */
.member-public-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 1.25rem 0 2.5rem;
}

.member-public-page > .topbar {
  margin-bottom: 1.25rem;
}

.member-public-page > .topbar h2 {
  font-size: 1.35rem;
  line-height: 1.3;
}

.member-public-page > .alert {
  width: 100%;
}

.member-public-page .member-form-stack,
.member-public-page .member-form-family-wrap,
.member-public-page .member-form-section-card,
.member-public-page .member-form-family-wrap .card {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#app-shell.admin-dash.app-shell--guest .admin-content__inner:has(.member-public-page) {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.member-form-section-card {
  margin-bottom: 16px;
}
.member-form-family-wrap {
  margin-bottom: 16px;
}
.family-full-fieldset {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fam-member-block--in-card > .fam-member-block__legend {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text, #1c1917);
  box-sizing: border-box;
}

.member-public-page .fam-member-block--in-card > .fam-member-block__legend {
  font-size: 1.25rem;
}

.member-field-radios {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.member-field-radios__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #7b736b);
  margin: 0 0 8px;
  padding: 0;
}

.member-field-radios__group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-field-radios__option {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.member-field-radios__option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.member-field-radios__text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  background: var(--surface);
  color: var(--text, #1c1917);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.member-field-radios__option:hover .member-field-radios__text {
  border-color: #c4bcb3;
}

.member-field-radios__option input:checked + .member-field-radios__text {
  border-color: var(--accent, #c89b4b);
  background: rgba(200, 155, 75, 0.14);
}

.member-field-radios__option input:focus-visible + .member-field-radios__text {
  outline: 2px solid var(--accent, #c89b4b);
  outline-offset: 2px;
}

.member-field-radios__option input:disabled + .member-field-radios__text {
  opacity: 0.45;
  cursor: not-allowed;
}

.member-form-spiritual-grid .member-field-radios__group {
  gap: 6px;
}

.member-form-spiritual-grid .member-field-radios__text {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.member-gender-radios__text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  padding-right: 14px;
}

.member-gender-radios__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-gender-radios__ico .ui-ico-svg {
  width: 1.15rem;
  height: 1.15rem;
}

.member-select-modal-field {
  position: relative;
}

.member-select-modal-field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #7b736b);
  margin: 0 0 8px;
}

.member-select-modal-field__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.member-select-modal-launch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.member-select-modal-launch__summary {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text, #1c1917);
}

.member-select-modal-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-select-modal-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

.member-select-modal-option:hover:not(:disabled) {
  border-color: #c4bcb3;
  background: #fafaf9;
}

.member-select-modal-option.is-selected {
  border-color: var(--accent, #c89b4b);
  background: rgba(200, 155, 75, 0.12);
}

.member-select-modal-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.member-form-sticky-submit {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: 8px;
  padding-top: 8px;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0));
  background: linear-gradient(to top, rgba(250, 250, 249, 0.98), rgba(250, 250, 249, 0));
}
.member-form-sticky-submit__inner {
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
}

/* --- IR report: main + rail --- */
.ir-report-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ir-report-layout__rail {
  order: -1;
}
@media (min-width: 1024px) {
  .ir-report-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 20px;
    align-items: start;
  }
  .ir-report-layout__main {
    grid-column: 1;
    grid-row: 1;
  }
  .ir-report-layout__rail {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    position: sticky;
    top: 12px;
    align-self: start;
  }
}
.ir-report-fold .ui-details__body {
  padding-top: 4px;
}

.ir-exp-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.ir-exp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.ir-exp-table th,
.ir-exp-table td {
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
  text-align: left;
  border-bottom: 1px solid var(--border-warm, #e5ddd2);
}

.ir-exp-table thead th {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-secondary, #7b736b);
}

.ir-exp-table th[scope="row"] {
  font-weight: 600;
  white-space: nowrap;
  width: 28%;
}

.ir-exp-table th[scope="row"] label {
  margin: 0;
}

.ir-exp-table input[type="text"] {
  width: 100%;
  min-width: 8rem;
}

@media (max-width: 900px) {
  .ir-exp-table th[scope="row"] {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .ir-exp-table,
  .ir-exp-table thead,
  .ir-exp-table tbody,
  .ir-exp-table tr,
  .ir-exp-table th,
  .ir-exp-table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .ir-exp-table thead {
    display: none;
  }
  .ir-exp-table tr {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border-warm, #e5ddd2);
  }
  .ir-exp-table th[scope="row"],
  .ir-exp-table td {
    padding: 0.25rem 0;
    border-bottom: 0;
  }
}
.ir-report-totals-card--rail .ir-report-totals-card__grid {
  gap: 8px;
}

.ir-report-rail-prev__dl {
  margin: 10px 0 0;
}
.ir-report-rail-prev__dl dt {
  font-size: 0.78rem;
  color: var(--muted, #7b736b);
  font-weight: 650;
  margin: 10px 0 2px;
}
.ir-report-rail-prev__dl dt:first-child {
  margin-top: 0;
}
.ir-report-rail-prev__val {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}
.ir-report-rail-prev__val--notes {
  white-space: pre-wrap;
  max-height: 9rem;
  overflow: auto;
  font-size: 0.85rem;
}

/* Pagination daftar (20 / 50 / 100) */
.list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.list-pager__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted, #7b736b);
}

.list-pager__size {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted, #7b736b);
}

.list-pager__select {
  min-width: 4.25rem;
  padding: 0.28rem 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid #e7dfd3;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
}

.list-pager__nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.list-pager__btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.list-pager__num {
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
  color: #3f3a35;
  background: #fff;
  border: 1px solid #e7dfd3;
}

.list-pager__num.is-current {
  background: #1c1917;
  border-color: #1c1917;
  color: #fff;
}

.list-pager__ellipsis {
  padding: 0 0.2rem;
  color: #9a938b;
}

.page-export-print {
  display: none;
}

.page-export-print h1 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.page-export-print__meta {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted, #7b736b);
}

.page-export-print table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.page-export-print th,
.page-export-print td {
  border: 1px solid #d6cbb8;
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
}

@media print {
  .page-export-hide-print {
    display: none !important;
  }
  .page-export-print:not([hidden]) {
    display: block !important;
  }
  body:has(.page-export-print:not([hidden])) .topbar,
  body:has(.page-export-print:not([hidden])) .card,
  body:has(.page-export-print:not([hidden])) .alert,
  body:has(.page-export-print:not([hidden])) .oper-page,
  body:has(.page-export-print:not([hidden])) .laporan-dash-scope {
    display: none !important;
  }
}

