:root {
  color-scheme: light;
  --font-sans: Inter, Manrope, "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  --surface-page: #f8f7f3;
  --surface-soft: #f2f5f1;
  --surface-muted: #f6f8fa;
  --surface-card: #ffffff;
  --ink: #1f2933;
  --ink-strong: #111827;
  --ink-muted: #667085;
  --primary: #1f4d3a;
  --primary-2: #243b53;
  --primary-soft: #e8f1ec;
  --gold: #c8a45d;
  --gold-2: #d8bd7a;
  --line-soft: #e5e7eb;
  --line-strong: #d0d5dd;
  --ok: #1f7a52;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 26px 80px rgba(17, 24, 39, 0.20);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --navy: var(--primary-2);
  --navy-2: #31506d;
  --ice: var(--surface-page);
  --line: var(--line-soft);
  --text: var(--ink);
  --muted: var(--ink-muted);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(200, 164, 93, 0.13), transparent 32rem),
    linear-gradient(135deg, #fbfaf7 0%, var(--surface-page) 42%, #eef4f0 100%);
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.simple-page {
  align-items: center;
  display: flex;
  min-height: 100vh;
  padding: 24px;
}

.simple-page-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 560px;
  padding: 36px;
}

.simple-page-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 12px;
}

.simple-page-link {
  align-items: center;
  background: var(--primary);
  border-radius: var(--radius-sm);
  color: var(--white);
  display: inline-flex;
  font-weight: 800;
  margin-top: 20px;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.simple-page-link:hover {
  background: var(--primary-2);
}

.root-landing-page {
  background:
    radial-gradient(circle at 12% 0%, rgba(200, 164, 93, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 14%, rgba(31, 77, 58, 0.12), transparent 28rem),
    linear-gradient(135deg, #fbfaf7 0%, #f8f7f3 50%, #eef4ef 100%);
  color: var(--ink);
  min-height: 100vh;
}

.root-header,
.root-hero,
.root-section,
.root-footer {
  margin: 0 auto;
  max-width: 1180px;
  width: min(1180px, calc(100% - 36px));
}

.root-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 22px 0;
}

.root-brand,
.root-nav {
  align-items: center;
  display: flex;
}

.root-brand {
  color: var(--ink-strong);
  font-weight: 900;
  gap: 10px;
  text-decoration: none;
}

.root-brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 12px;
  color: #fff;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.root-nav {
  gap: 8px;
}

.root-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 800;
  min-height: 38px;
  padding: 9px 13px;
  text-decoration: none;
}

.root-nav a:hover {
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line-soft);
  color: var(--primary);
}

.root-hero {
  align-items: end;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  padding: clamp(42px, 7vw, 92px) 0 38px;
}

.root-hero-copy {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 54px);
}

.root-hero-copy h1 {
  color: var(--ink-strong);
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.94;
  margin: 12px 0 20px;
}

.root-hero-copy > p:not(.eyebrow) {
  color: var(--ink-muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
  max-width: 720px;
}

.root-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.root-hero-actions a {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
}

.root-hero-actions a:hover {
  background: var(--primary-2);
}

.root-hero-actions span {
  color: var(--ink-muted);
  line-height: 1.5;
}

.root-hero-panel,
.root-feature-card,
.root-security-band {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.root-hero-panel {
  border-radius: 24px;
  display: grid;
  gap: 12px;
  padding: 24px;
}

.root-hero-panel span,
.root-hero-panel small {
  color: var(--ink-muted);
}

.root-hero-panel strong {
  color: var(--primary);
  font-size: 1.55rem;
  line-height: 1.24;
}

.root-section {
  padding: 34px 0;
}

.root-section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  max-width: 760px;
}

.root-section-heading h2 {
  color: var(--ink-strong);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
  margin: 0;
}

.root-section-heading p:not(.eyebrow) {
  color: var(--ink-muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0;
}

.root-feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.root-feature-card {
  border-radius: 20px;
  display: grid;
  gap: 12px;
  padding: 22px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.root-feature-card:hover {
  border-color: #d6e0da;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.root-feature-card span {
  color: var(--gold);
  font-weight: 900;
}

.root-feature-card h3 {
  color: var(--ink-strong);
  font-size: 1.1rem;
  margin: 0;
}

.root-feature-card p {
  color: var(--ink-muted);
  line-height: 1.65;
  margin: 0;
}

.root-security-band {
  align-items: center;
  border-radius: 24px;
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
  min-height: 150px;
  padding: 28px;
  text-align: center;
}

.root-security-band h2 {
  color: var(--primary);
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.12;
  margin: 0;
}

.root-security-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.root-security-list span {
  background: var(--primary-soft);
  border: 1px solid rgba(31, 77, 58, 0.16);
  border-radius: 999px;
  color: var(--primary);
  font-weight: 850;
  padding: 9px 12px;
}

.root-footer {
  border-top: 1px solid rgba(208, 213, 221, 0.7);
  color: var(--ink-muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 22px 0 32px;
}

.root-footer span {
  color: var(--ink-strong);
  font-weight: 900;
}

@media (max-width: 860px) {
  .root-header,
  .root-hero,
  .root-footer {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .root-header,
  .root-footer {
    flex-direction: column;
  }

  .root-nav {
    flex-wrap: wrap;
  }

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

@media (max-width: 560px) {
  .root-feature-grid {
    grid-template-columns: 1fr;
  }

  .root-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .root-hero-actions a {
    justify-content: center;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #173f30);
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

button:hover {
  background: linear-gradient(135deg, #173f30, var(--primary-2));
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

button.secondary {
  background: var(--white);
  color: var(--primary-2);
  border: 1px solid var(--line);
}

button.secondary:hover {
  background: var(--primary-soft);
  border-color: #c8d8cf;
  color: var(--primary);
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: #941b12;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(31, 77, 58, 0.98), rgba(17, 24, 39, 0.98));
  color: var(--white);
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border-radius: var(--radius);
  color: var(--ink-strong);
  display: grid;
  font-weight: 800;
  height: 44px;
  width: 44px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #c7d5e5;
  font-size: 13px;
  margin-top: 2px;
}

.tabs {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: #e8eef7;
  justify-content: flex-start;
  text-align: left;
}

.tab.is-active,
.tab:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(216, 189, 122, 0.55);
  color: #ffffff;
}

.content {
  min-width: 0;
  padding: 32px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: var(--ink-strong);
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  color: var(--ink-strong);
  font-size: 18px;
}

.login-form {
  align-items: center;
  display: flex;
  gap: 8px;
}

.login-title {
  color: var(--navy);
  font-weight: 800;
}

.login-help {
  color: var(--gold);
  font-weight: 700;
}

.login-form input {
  width: 190px;
}

.auth-status {
  align-items: center;
  display: flex;
  gap: 10px;
}

.auth-status span {
  color: var(--navy);
  font-weight: 700;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.summary-card,
.panel,
.event-item,
.slot-item,
.appointment-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 150px;
  padding: 18px;
}

.summary-card span,
.summary-card small,
.muted {
  color: var(--muted);
}

.summary-card strong {
  color: var(--navy);
  display: block;
  font-size: 23px;
  line-height: 1.15;
  margin: 18px 0 10px;
}

.summary-card.accent {
  background: var(--gold);
  border-color: var(--gold);
}

.summary-card.accent span,
.summary-card.accent strong,
.summary-card.accent small {
  color: var(--navy);
}

.split-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.appointments-admin-grid {
  margin-top: 18px;
}

.settings-tabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.settings-tab {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  min-height: 40px;
}

.settings-tab.is-active,
.settings-tab:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.settings-tab-panel[hidden] {
  display: none;
}

.settings-tab-panel.is-active {
  animation: settings-panel-in 180ms ease;
}

@keyframes settings-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.liturgy-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  margin-bottom: 18px;
}

.google-panel {
  margin-bottom: 18px;
}

.backup-panel {
  margin-bottom: 18px;
}

.event-types-panel {
  margin-bottom: 18px;
}

.churches-panel {
  margin-bottom: 18px;
}

.admin-users-panel,
.access-profiles-panel,
.user-accounts-panel,
.pastor-profile-panel {
  margin-bottom: 18px;
}

.account-management-layout,
.pastor-profile-layout,
.churches-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.account-password-form,
.password-reset-form,
.account-management-form,
.pastor-profile-form,
.church-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.account-password-form,
.account-management-form,
.password-reset-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.access-profiles-panel .account-management-layout {
  grid-template-columns: 1fr;
}

.access-profile-form {
  max-width: none;
  width: 100%;
}

.permission-section-header {
  display: grid;
  gap: 4px;
}

.permission-section-header strong {
  color: var(--ink-strong);
}

.permission-matrix {
  display: grid;
  gap: 10px;
  max-width: 100%;
}

.permission-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.permission-card-title {
  color: var(--navy);
  display: flex;
  justify-content: space-between;
}

.permission-check {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  font-size: 13px;
  gap: 7px;
  line-height: 1.25;
  min-height: 0;
  padding: 6px 8px;
}

.permission-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.permission-check input {
  flex: 0 0 auto;
  height: 15px;
  width: 15px;
}

.url-preview {
  color: var(--muted);
  display: block;
  overflow-wrap: anywhere;
}

.church-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.church-delete-blocker {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
}

.church-delete-blocker-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.church-linked-users {
  display: grid;
  gap: 10px;
}

.church-linked-user-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) auto minmax(260px, 1.4fr);
  padding: 12px;
}

.church-linked-user-card dl {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.church-linked-user-card div {
  min-width: 0;
}

.church-linked-user-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.church-linked-user-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.church-transfer-box {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) auto;
}

.event-date-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-date-options .checkbox-line {
  align-items: center;
  background: #f9fafb;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px 6px 8px;
  width: auto;
}

.event-date-options .checkbox-line input[type="checkbox"] {
  appearance: none;
  background: #d0d5dd;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  height: 18px;
  margin: 0;
  min-height: auto;
  padding: 0;
  position: relative;
  transition: background 160ms ease, box-shadow 160ms ease;
  width: 34px;
}

.event-date-options .checkbox-line input[type="checkbox"]::after {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.18);
  content: "";
  height: 14px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 160ms ease;
  width: 14px;
}

.event-date-options .checkbox-line input[type="checkbox"]:checked {
  background: var(--primary);
}

.event-date-options .checkbox-line input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}

.event-date-options .checkbox-line input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(200, 164, 93, 0.45);
  outline-offset: 2px;
}

.event-date-options .checkbox-line span {
  color: var(--ink-strong);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

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

.recurrence-box {
  background: #f9fafb;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.recurrence-custom {
  display: grid;
  gap: 12px;
}

.recurrence-custom[hidden] {
  display: none !important;
}

.recurrence-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recurrence-weekdays label {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
}

.recurrence-weekdays input {
  accent-color: var(--primary);
  height: 14px;
  margin: 0;
  width: 14px;
}

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

.event-type-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.event-type-card-new {
  background: #f8fafc;
  border-style: dashed;
}

.event-type-preview {
  align-items: center;
  display: flex;
  gap: 10px;
}

.event-type-icon,
.event-type-dot {
  border-radius: 6px;
  flex: 0 0 auto;
  height: 32px;
  width: 32px;
}

.event-type-icon {
  border: 1px solid var(--line);
  object-fit: cover;
}

.event-type-dot {
  background: var(--event-color, var(--gold));
}

.event-type-upload {
  align-items: center;
  display: flex;
  gap: 8px;
}

.event-type-upload input[type="checkbox"] {
  min-height: auto;
  width: 18px;
}

.event-type-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-type-actions button {
  flex: 1 1 120px;
}

.google-actions {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(160px, 220px) auto auto auto;
}

.backup-actions {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) minmax(160px, 220px) auto auto;
}

.google-sync-field,
.backup-name-field,
.backup-select-field,
.backup-mode-field {
  margin-bottom: 0;
}

.backup-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 10px;
}

.backup-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.backup-row strong {
  color: var(--navy);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-row small {
  color: var(--muted);
}

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

.backup-row-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.calendar-checklist {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1px;
  margin: 14px 0 10px;
  max-height: 320px;
  overflow: auto;
}

.calendar-choice {
  align-items: center;
  background: var(--white);
  display: grid;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 10px 12px;
}

.calendar-choice + .calendar-choice {
  border-top: 1px solid var(--line);
}

.calendar-choice input {
  min-height: auto;
  width: 18px;
}

.calendar-choice strong {
  color: var(--navy);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-choice small {
  color: var(--muted);
}

.google-push-changes {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 12px 0 10px;
  padding: 12px;
}

.google-push-changes[hidden] {
  display: none;
}

.google-push-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.google-push-list {
  display: grid;
  gap: 1px;
  max-height: 260px;
  overflow: auto;
}

.google-push-choice {
  align-items: center;
  background: var(--white);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 10px 0;
}

.google-push-choice:first-child {
  border-top: 0;
}

.google-push-choice input {
  min-height: auto;
  width: 18px;
}

.google-push-choice strong {
  color: var(--navy);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-push-choice small {
  color: var(--muted);
}

.google-push-modal {
  max-width: 680px;
  width: min(680px, 100%);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.panel {
  padding: 18px;
}

.panel-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stack {
  display: grid;
  gap: 10px;
}

.event-item,
.slot-item,
.appointment-item {
  box-shadow: none;
  display: grid;
  gap: 7px;
  padding: 14px;
}

.item-line {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.item-line strong {
  color: var(--navy);
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 26px;
  padding: 5px 10px;
  white-space: nowrap;
}

.pill.gold {
  background: #fff4d8;
  border-color: #f0d28a;
  color: #6d4a08;
}

.pill.green {
  background: #e8f6ef;
  border-color: #bde4cd;
  color: var(--ok);
}

.pill.red {
  background: #fff0ee;
  border-color: #ffd0cb;
  color: var(--danger);
}

.event-type-pill {
  align-items: center;
  background: color-mix(in srgb, var(--event-color, var(--gold)) 18%, white);
  border-color: color-mix(in srgb, var(--event-color, var(--gold)) 45%, white);
  color: var(--navy);
  gap: 6px;
}

.event-type-pill .event-type-icon,
.event-type-pill .event-type-dot {
  height: 18px;
  width: 18px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field.compact {
  margin-bottom: 0;
}

.field.compact span {
  color: #c7d5e5;
}

.field.compact small {
  color: #9fb0c3;
  font-size: 11px;
}

input,
select,
textarea {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

input[type="date"],
input[type="time"] {
  color-scheme: light;
  font-weight: 700;
}

textarea {
  resize: vertical;
}

.sidebar select {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.sidebar option {
  color: var(--text);
}

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

.field-group {
  display: grid;
  gap: 8px;
}

.slot-recurring-fields {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
}

.toggle-field {
  align-items: center;
  column-gap: 10px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  margin-bottom: 12px;
}

.toggle-field input[type="checkbox"] {
  height: 18px;
  margin: 0;
  min-height: auto;
  width: 18px;
}

.toggle-field span {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.field-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: -2px 0 12px;
}

.weekday-picker {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 10px;
}

.weekday-option {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.weekday-option input[type="checkbox"] {
  min-height: auto;
  width: 18px;
}

.weekday-option span {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.slot-form-summary {
  background: var(--primary-soft);
  border: 1px solid #c8d8cf;
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  margin: 4px 0 14px;
  padding: 12px;
}

.liturgy-editor-panel {
  align-content: start;
}

.liturgy-items-shell {
  padding: 14px;
}

.liturgy-items {
  display: grid;
  gap: 14px;
}

.liturgy-card,
.liturgy-item-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.liturgy-card {
  display: grid;
  gap: 8px;
}

.liturgy-card.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 65%, white);
}

.liturgy-card-head,
.liturgy-item-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.liturgy-card-head strong,
.liturgy-item-head strong {
  color: var(--navy);
}

.liturgy-item-editor {
  background: #fcfdff;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.liturgy-item-editor.is-current {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 60%, white);
}

.liturgy-item-editor.is-live {
  background: #f5fbf7;
  border-color: #bde4cd;
}

.liturgy-item-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(140px, 0.8fr));
}

.liturgy-time-mode {
  align-self: end;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 44px;
  overflow: hidden;
}

.liturgy-item-editor:not(.is-expanded) > .liturgy-item-summary-grid .liturgy-time-mode {
  display: none;
}

.liturgy-time-mode-option {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  padding: 0 10px;
  position: relative;
  text-align: center;
}

.liturgy-time-mode-option + .liturgy-time-mode-option {
  border-left: 1px solid var(--line);
}

.liturgy-time-mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.liturgy-time-mode-option.is-selected,
.liturgy-time-mode-option:has(input:checked) {
  background: var(--white);
  color: var(--navy);
}

.liturgy-item-details {
  display: grid;
  gap: 12px;
}

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

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

.liturgy-item-preview,
.liturgy-item-runtime {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liturgy-item-attachments {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
}

.liturgy-attachment-preview {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liturgy-attachment-preview a {
  color: var(--navy-2);
  font-weight: 700;
  text-decoration: none;
}

.liturgy-attachment-preview a:hover {
  text-decoration: underline;
}

.liturgy-inline-note {
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.event-actions button {
  min-height: 34px;
  padding: 0 12px;
}

.month-grid {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: visible;
}

.month-cell,
.month-head {
  background: var(--white);
  min-height: 104px;
  padding: 10px;
}

.month-head {
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  min-height: auto;
  text-align: center;
}

.month-cell {
  border-top: 1px solid var(--line);
  position: relative;
}

.month-cell.is-muted {
  background: #f8fafc;
  color: var(--muted);
}

.month-event {
  align-items: center;
  background: color-mix(in srgb, var(--event-color, var(--navy)) 14%, white);
  border: 0;
  border-left: 4px solid var(--event-color, var(--navy));
  border-radius: 6px;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  gap: 6px;
  font-size: 12px;
  margin-top: 6px;
  min-height: auto;
  padding: 5px;
  text-align: left;
  width: 100%;
}

.month-event:hover {
  background: color-mix(in srgb, var(--event-color, var(--navy)) 22%, white);
}

.month-event.is-more {
  background: transparent;
  border-left-color: transparent;
  color: var(--muted);
  font-weight: 700;
}

.month-event .event-type-icon,
.month-event .event-type-dot {
  height: 16px;
  width: 16px;
}

.month-event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-event-popover {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  left: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  position: absolute;
  right: 10px;
  top: 70px;
  z-index: 10;
}

.day-event-popover > strong {
  color: var(--navy);
  font-size: 13px;
}

.day-event-popover-item {
  align-items: center;
  background: color-mix(in srgb, var(--event-color, var(--navy)) 12%, white);
  border: 0;
  border-left: 4px solid var(--event-color, var(--navy));
  border-radius: 6px;
  color: var(--text);
  display: grid;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr);
  justify-content: start;
  min-height: auto;
  padding: 8px;
  text-align: left;
}

.day-event-popover-item .event-type-icon,
.day-event-popover-item .event-type-dot {
  height: 18px;
  width: 18px;
}

.day-event-popover-item strong,
.day-event-popover-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-event-popover-item small {
  color: var(--muted);
}

.form-panel {
  align-content: start;
}

.event-detail-view {
  display: grid;
  gap: 16px;
}

.event-detail-title {
  display: grid;
  gap: 10px;
}

.event-detail-title > strong {
  color: var(--navy);
  font-size: 22px;
  line-height: 1.25;
}

.event-detail-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.event-detail-list div {
  display: grid;
  gap: 4px;
}

.event-detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-detail-list dd {
  color: var(--text);
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.event-modal-actions {
  gap: 8px;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td select {
  min-width: 150px;
}

.empty {
  color: var(--muted);
  padding: 18px 0;
}

.modal-backdrop {
  align-items: center;
  background: rgba(11, 31, 58, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 20;
}

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

.modal-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(11, 31, 58, 0.28);
  max-height: min(760px, calc(100vh - 40px));
  max-width: 560px;
  overflow: auto;
  padding: 18px;
  width: min(560px, 100%);
}

body.modal-open {
  overflow: hidden;
}

.toast {
  background: var(--navy);
  border-radius: 8px;
  bottom: 20px;
  box-shadow: var(--shadow);
  color: var(--white);
  left: 50%;
  max-width: min(520px, calc(100vw - 32px));
  opacity: 0;
  padding: 13px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

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

  .tab {
    justify-content: center;
    text-align: center;
  }

  .topbar,
  .login-form {
    align-items: stretch;
    flex-direction: column;
  }

  .login-form input {
    width: 100%;
  }

  .summary-grid,
  .split-grid,
    .admin-grid,
    .liturgy-layout,
    .option-grid,
    .account-management-layout,
    .pastor-profile-layout,
    .churches-layout,
  .google-actions,
  .backup-actions,
  .backup-row,
  .google-push-choice {
    grid-template-columns: 1fr;
  }

  .liturgy-item-summary-grid,
  .liturgy-item-grid,
  .liturgy-item-attachments {
    grid-template-columns: 1fr;
  }

  .church-linked-user-card,
  .church-linked-user-card dl,
  .church-transfer-box,
  .event-date-grid {
    grid-template-columns: 1fr;
  }

  .google-push-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .backup-row-actions {
    justify-content: stretch;
  }

  .backup-row-actions button {
    flex: 1 1 120px;
  }
}

@media (max-width: 620px) {
  .content,
  .sidebar {
    padding: 18px;
  }

  h1 {
    font-size: 26px;
  }

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

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

  .settings-tab {
    padding: 0 10px;
  }

  .summary-card {
    min-height: 128px;
  }

  .month-grid {
    display: grid;
    font-size: 12px;
    overflow-x: auto;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .toolbar-actions {
    justify-content: stretch;
  }

  .toolbar-actions button {
    flex: 1 1 140px;
  }

  .modal-backdrop {
    align-items: flex-start;
    padding: 12px;
  }
}

/* Visual refresh: tokens and component polish without changing behavior. */
a {
  color: var(--primary);
  text-underline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(200, 164, 93, 0.45);
  outline-offset: 2px;
}

button[disabled],
input[disabled],
select[disabled],
textarea[disabled] {
  cursor: not-allowed;
  opacity: 0.68;
}

.app-shell {
  background: rgba(255, 255, 255, 0.18);
}

.content {
  max-width: 1440px;
  width: 100%;
}

.topbar {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}

.login-form {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px;
}

.login-title {
  color: var(--primary);
  white-space: nowrap;
}

.auth-status {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 8px 10px;
}

.auth-status span {
  color: var(--ink);
}

input,
select,
textarea {
  border-color: var(--line-soft);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 77, 58, 0.52);
  box-shadow: 0 0 0 4px rgba(31, 77, 58, 0.10);
}

.summary-card,
.panel,
.event-item,
.slot-item,
.appointment-item {
  border-color: rgba(229, 231, 235, 0.94);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.appointment-admin-list {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.appointment-actions {
  margin-top: 10px;
}

.summary-card,
.panel {
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.summary-card:hover,
.panel:hover {
  border-color: #d8ded7;
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 136px;
  overflow: hidden;
  position: relative;
}

.summary-card::after {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  height: 6px;
  left: 18px;
  opacity: 0.85;
  position: absolute;
  top: 18px;
  width: 34px;
}

.summary-card span {
  display: block;
  font-weight: 800;
  margin-top: 18px;
}

.summary-card strong {
  color: var(--ink-strong);
  font-size: clamp(20px, 2.2vw, 28px);
}

.summary-card.accent {
  background: linear-gradient(135deg, #fff8e8, #ffffff);
  border-color: #ead9aa;
}

.summary-card.accent::after {
  background: var(--primary);
}

.panel {
  padding: 20px;
}

.panel-header {
  gap: 12px;
}

.panel-header h2 {
  letter-spacing: 0;
}

.event-item,
.slot-item,
.appointment-item,
.liturgy-card,
.liturgy-item-editor,
.event-type-card,
.backup-row,
.weekday-option,
.permission-matrix,
.account-password-form,
.password-reset-form,
.account-management-form,
.pastor-profile-form,
.church-form {
  border-radius: var(--radius);
}

.event-item,
.slot-item,
.appointment-item {
  background: linear-gradient(180deg, #ffffff, #fcfcfb);
  border-left: 4px solid rgba(31, 77, 58, 0.22);
  padding: 15px;
}

.item-line {
  gap: 14px;
}

.pill {
  background: #f9fafb;
  border-color: var(--line-soft);
  color: var(--primary-2);
}

.pill.gold {
  background: #fff8e8;
  border-color: #ead9aa;
  color: #7a5614;
}

.pill.green {
  background: #eaf6ef;
  border-color: #bfe2cc;
}

.pill.red {
  background: var(--danger-soft);
}

.settings-tabs {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 8px;
}

.settings-tab {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.settings-tab.is-active,
.settings-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

table {
  min-width: 680px;
}

th {
  background: #f9fafb;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

td {
  color: var(--ink);
}

.empty {
  background: #f9fafb;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
  padding: 18px;
}

.toolbar {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 12px;
}

.month-grid {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.month-head {
  background: var(--primary-2);
  letter-spacing: 0.04em;
}

.month-cell {
  min-height: 118px;
  transition: background 160ms ease;
}

.month-cell:hover {
  background: #fcfbf7;
}

.month-cell > strong {
  align-items: center;
  border-radius: 999px;
  color: var(--ink-strong);
  display: inline-flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 8px;
}

.month-cell.is-muted > strong {
  color: var(--ink-muted);
}

.month-event {
  border-radius: var(--radius-sm);
  font-weight: 750;
  padding: 7px 8px;
}

.month-event.is-more {
  border: 1px dashed var(--line-strong);
  justify-content: center;
}

.day-event-popover {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.event-detail-title > strong {
  color: var(--ink-strong);
}

.event-detail-list {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.modal-backdrop {
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(4px);
}

.modal-panel {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

.modal-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.toast {
  background: var(--ink-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.liturgy-layout,
.split-grid,
.admin-grid,
.account-management-layout,
.pastor-profile-layout,
.churches-layout {
  gap: 20px;
}

.liturgy-item-editor {
  background: linear-gradient(180deg, #ffffff, #fbfcfb);
}

.liturgy-item-editor.is-expanded {
  border-color: #c8d8cf;
  box-shadow: 0 0 0 4px rgba(31, 77, 58, 0.07);
}

.liturgy-item-details {
  animation: details-in 160ms ease;
}

@keyframes details-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.liturgy-time-mode {
  background: var(--surface-muted);
}

.weekday-option {
  background: var(--surface-muted);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.weekday-option:hover {
  background: var(--primary-soft);
  border-color: #c8d8cf;
}

.public-hero {
  display: none;
}

body.is-public-view.is-tenant-mode .public-hero {
  background:
    linear-gradient(135deg, rgba(31, 77, 58, 0.97), rgba(36, 59, 83, 0.96)),
    linear-gradient(135deg, #1f4d3a, #243b53);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  margin-bottom: 22px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  position: relative;
}

body.is-public-view.is-tenant-mode .public-hero::after {
  background: linear-gradient(180deg, var(--gold), rgba(200, 164, 93, 0));
  content: "";
  inset: 0 auto 0 0;
  opacity: 0.9;
  position: absolute;
  width: 6px;
}

.public-hero-copy,
.public-hero-panel {
  position: relative;
  z-index: 1;
}

.public-hero h2 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  margin: 10px 0 16px;
  max-width: 760px;
}

.public-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.65;
  max-width: 640px;
}

.public-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.public-hero-actions button {
  min-height: 46px;
}

.public-hero-actions .secondary {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.public-hero-panel {
  align-self: end;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 10px;
  padding: 20px;
}

.public-hero-panel span,
.public-hero-panel small {
  color: rgba(255, 255, 255, 0.72);
}

.public-hero-panel strong {
  color: #ffffff;
  font-size: 24px;
}

body.is-public-view.is-tenant-mode .app-shell {
  display: block;
}

body.is-public-view.is-tenant-mode .sidebar {
  align-items: center;
  display: flex;
  gap: 24px;
  height: auto;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 42px);
  position: sticky;
  top: 0;
  z-index: 12;
}

body.is-public-view.is-tenant-mode .brand {
  margin-bottom: 0;
}

body.is-public-view.is-tenant-mode #profileSelectWrap {
  display: none;
}

body.is-public-view.is-tenant-mode .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

body.is-public-view.is-tenant-mode .tab {
  min-height: 38px;
  padding: 0 14px;
}

body.is-public-view.is-tenant-mode .content {
  margin: 0 auto;
  max-width: 1200px;
  padding: clamp(18px, 4vw, 42px);
}

body.is-public-view.is-tenant-mode .topbar {
  background: transparent;
  border: 0;
  box-shadow: none;
  justify-content: flex-end;
  margin-bottom: 18px;
  padding: 0;
}

body.is-public-view.is-tenant-mode .topbar > div:first-child {
  display: none;
}

body.is-public-view.is-tenant-mode .login-form {
  border-radius: 999px;
}

body.is-public-view.is-tenant-mode .login-title {
  color: var(--primary-2);
}

body.is-public-view.is-tenant-mode .summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.is-public-view.is-tenant-mode .panel,
body.is-public-view.is-tenant-mode .summary-card {
  box-shadow: var(--shadow-sm);
}

body.is-authenticated .public-hero {
  display: none;
}

@media (max-width: 760px) {
  .permission-matrix {
    background: transparent;
    border: 0;
    display: grid;
    gap: 10px;
    overflow: visible;
  }

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

  .permission-check {
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .permission-actions {
    grid-template-columns: 1fr;
  }

  .permission-check {
    padding: 7px 8px;
  }
}

@media (max-width: 1100px) {
  body.is-public-view.is-tenant-mode .summary-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-grid,
  .admin-grid,
  .liturgy-layout,
  .account-management-layout,
  .pastor-profile-layout,
  .churches-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .content,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .login-form,
  .auth-status {
    align-items: stretch;
    flex-direction: column;
  }

  .login-form {
    border-radius: var(--radius-lg);
  }

  body.is-public-view.is-tenant-mode .sidebar {
    align-items: stretch;
    flex-direction: column;
  }

  body.is-public-view.is-tenant-mode .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-public-view.is-tenant-mode .public-hero {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }

  body.is-public-view.is-tenant-mode .summary-grid,
  .summary-grid,
  .option-grid,
  .calendar-filters,
  .google-actions,
  .backup-actions,
  .liturgy-item-summary-grid,
  .liturgy-item-grid,
  .liturgy-item-attachments {
    grid-template-columns: 1fr;
  }

  .month-grid {
    grid-template-columns: repeat(7, minmax(118px, 1fr));
    overflow-x: auto;
  }

  .month-cell {
    min-height: 116px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Visual refresh: layout, hierarchy and responsive experience */
:root {
  --page-gradient:
    radial-gradient(circle at 12% 0%, rgba(200, 164, 93, 0.14), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(31, 77, 58, 0.10), transparent 26rem),
    linear-gradient(135deg, #fbfaf7 0%, #f8f7f3 50%, #edf4ef 100%);
  --card-border: rgba(229, 231, 235, 0.92);
  --control-height: 44px;
}

body {
  background: var(--page-gradient);
}

button {
  min-height: var(--control-height);
}

button.secondary {
  background: rgba(255, 255, 255, 0.92);
}

button.danger {
  background: linear-gradient(135deg, #b42318, #8f1d14);
}

.public-login-button {
  display: none;
}

.app-shell {
  background: transparent;
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(31, 77, 58, 0.98), rgba(36, 59, 83, 0.98) 62%, rgba(17, 24, 39, 0.99)),
    var(--primary);
  box-shadow: 18px 0 60px rgba(17, 24, 39, 0.12);
}

.brand {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 12px;
}

.brand-mark {
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.tabs {
  gap: 10px;
}

.tab {
  border-radius: 14px;
  font-weight: 850;
  min-height: 46px;
  padding: 0 14px;
}

.tab.is-active {
  box-shadow: inset 4px 0 0 var(--gold);
}

.content {
  max-width: none;
  padding: clamp(22px, 3.2vw, 42px);
}

.topbar {
  backdrop-filter: blur(14px);
  margin-bottom: 26px;
}

.topbar h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.login-form {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(170px, 220px) minmax(150px, 190px) auto;
}

.login-form input {
  width: 100%;
}

.auth-status {
  align-items: center;
}

.summary-grid {
  gap: 18px;
  margin-bottom: 22px;
}

.summary-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.90));
  border-color: var(--card-border);
  min-height: 154px;
  padding: 22px;
}

.summary-card::after {
  height: 5px;
  left: 22px;
  top: 20px;
  width: 40px;
}

.summary-card span {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.summary-card strong {
  margin-top: 24px;
}

.split-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--card-border);
  overflow: hidden;
  padding: 22px;
}

.panel-header {
  align-items: flex-start;
  border-bottom: 1px solid rgba(229, 231, 235, 0.65);
  margin: -4px -2px 18px;
  padding-bottom: 14px;
}

.panel-header h2 {
  font-size: 1.18rem;
}

.stack {
  display: grid;
  gap: 12px;
}

.event-item,
.slot-item,
.appointment-item,
.liturgy-card,
.event-type-card,
.backup-row {
  border-color: rgba(229, 231, 235, 0.94);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
}

.event-item,
.slot-item,
.appointment-item {
  border-left-width: 5px;
  display: grid;
  gap: 8px;
}

.event-item:hover,
.slot-item:hover,
.appointment-item:hover,
.liturgy-card:hover {
  border-color: #d6e0da;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.item-line {
  align-items: flex-start;
}

.item-line strong {
  color: var(--ink-strong);
  font-size: 1rem;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.toggle-field span,
.checkbox-line span {
  color: var(--ink-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line-soft);
  min-height: var(--control-height);
  padding: 10px 12px;
}

textarea {
  min-height: 92px;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  color: var(--ink-strong);
}

.toggle-field,
.checkbox-line {
  background: #f9fafb;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px;
}

.toolbar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-toolbar {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 247, 243, 0.92));
  padding: 16px;
}

.calendar-toolbar-title h2 {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  text-transform: capitalize;
}

.calendar-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-filters {
  align-items: end;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  margin: 0 0 14px;
  padding: 12px;
}

.calendar-filter-field {
  margin-bottom: 0;
}

.calendar-filter-field select {
  min-height: 38px;
  padding-bottom: 8px;
  padding-top: 8px;
}

.month-grid {
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  gap: 0;
}

.month-head {
  background: #243b53;
  color: #fff;
  min-height: 44px;
  padding: 14px 8px;
}

.month-cell {
  background: rgba(255, 255, 255, 0.94);
  min-height: 136px;
  padding: 12px;
}

.month-cell.is-muted {
  background: rgba(248, 250, 252, 0.74);
}

.month-cell.is-today {
  background: #fffaf0;
  box-shadow: inset 0 0 0 2px rgba(200, 164, 93, 0.55);
}

.month-cell.is-today > strong {
  background: var(--gold);
  color: var(--ink-strong);
}

.month-event {
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--event-color, var(--primary-2)) 24%, white);
  border-left-width: 4px;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
  min-height: 31px;
}

.day-event-popover {
  max-height: 310px;
  top: 54px;
}

.event-detail-view {
  background: linear-gradient(180deg, #ffffff, #fbfcfb);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 18px;
}

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

.event-detail-list div {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.event-detail-list div:nth-child(4),
.event-detail-list div:last-child {
  grid-column: 1 / -1;
}

.appointments-admin-grid {
  align-items: start;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.slot-form-summary {
  background: #fff8e8;
  border: 1px solid #ead9aa;
  color: #7a5614;
  font-weight: 800;
}

.slot-item {
  border-left-color: var(--ok);
}

.appointment-item {
  border-left-color: var(--gold);
}

.appointment-actions button {
  min-height: 38px;
}

.settings-tabs {
  gap: 6px;
  margin-bottom: 22px;
}

.settings-tab {
  min-height: 44px;
  padding: 0 16px;
}

.settings-tab-panel {
  display: block;
}

.account-management-layout,
.pastor-profile-layout,
.churches-layout {
  align-items: start;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.account-password-form,
.password-reset-form,
.account-management-form,
.pastor-profile-form,
.church-form {
  background: #fff;
  border-color: var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.02);
  padding: 16px;
}

.permission-matrix {
  border-radius: 14px;
}

.liturgy-layout {
  align-items: start;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.liturgy-editor-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 252, 251, 0.96));
}

.liturgy-card {
  cursor: default;
  padding: 16px;
}

.liturgy-card.is-active {
  box-shadow: 0 0 0 4px rgba(31, 77, 58, 0.08);
}

.liturgy-item-editor {
  padding: 16px;
}

.liturgy-item-head {
  align-items: center;
}

.liturgy-toggle-details {
  min-width: 92px;
}

.table-wrap {
  border-radius: 16px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
}

td,
th {
  padding: 14px 12px;
}

tbody tr:hover {
  background: #fcfbf7;
}

.empty {
  min-height: 72px;
}

.modal-backdrop {
  padding: clamp(14px, 3vw, 28px);
}

.modal-panel {
  max-width: min(680px, 100%);
}

#calendarEventForm.is-detail {
  max-width: min(720px, 100%);
}

.toast {
  font-weight: 800;
}

.public-footer {
  display: none;
}

body.is-public-view.is-tenant-mode {
  background:
    radial-gradient(circle at 8% 0%, rgba(200, 164, 93, 0.18), transparent 30rem),
    linear-gradient(180deg, #f8f7f3 0%, #f3f5f1 100%);
}

body.is-public-view.is-tenant-mode .sidebar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.94);
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.08);
  color: var(--ink);
  padding-inline: clamp(16px, 4vw, 54px);
}

body.is-public-view.is-tenant-mode .brand {
  background: transparent;
  border: 0;
  padding: 0;
}

body.is-public-view.is-tenant-mode .brand span {
  color: var(--ink-muted);
}

body.is-public-view.is-tenant-mode .tabs {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px;
}

body.is-public-view.is-tenant-mode .tab {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--primary-2);
  min-height: 38px;
}

body.is-public-view.is-tenant-mode .tab.is-active,
body.is-public-view.is-tenant-mode .tab:hover {
  background: var(--primary);
  box-shadow: none;
  color: #fff;
}

body.is-public-view.is-tenant-mode .public-login-button {
  display: inline-flex;
  border-radius: 999px;
}

body.is-public-view.is-tenant-mode.is-authenticated .public-login-button {
  display: none;
}

body.is-public-view.is-tenant-mode .topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

body.is-public-view.is-tenant-mode .login-form {
  border-radius: 18px;
  grid-template-columns: auto minmax(190px, 240px) minmax(160px, 210px) auto;
  max-width: 760px;
}

body.is-public-view.is-tenant-mode .public-hero {
  background:
    linear-gradient(120deg, rgba(31, 77, 58, 0.97) 0%, rgba(36, 59, 83, 0.96) 62%, rgba(17, 24, 39, 0.96) 100%);
  border-radius: 30px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  min-height: 420px;
  padding: clamp(34px, 6vw, 74px);
}

body.is-public-view.is-tenant-mode .public-hero h2 {
  max-width: 860px;
}

body.is-public-view.is-tenant-mode .public-hero-panel {
  backdrop-filter: blur(10px);
}

body.is-public-view.is-tenant-mode .summary-card {
  min-height: 170px;
}

body.is-public-view.is-tenant-mode #calendar,
body.is-public-view.is-tenant-mode #appointments {
  scroll-margin-top: 96px;
}

body.is-public-view.is-tenant-mode .public-footer {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-muted);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 34px;
  padding: 22px 0 4px;
}

body.is-public-view.is-tenant-mode .public-footer strong {
  color: var(--primary-2);
}

body:not(.is-public-view) .public-footer {
  display: none;
}

@media (max-width: 1120px) {
  .login-form,
  body.is-public-view.is-tenant-mode .login-form {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-navigation,
  .toolbar-actions {
    justify-content: flex-start;
  }

  body.is-public-view.is-tenant-mode .public-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .content {
    padding: 18px;
  }

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

  .split-grid,
  .appointments-admin-grid,
  .admin-grid,
  .account-management-layout,
  .pastor-profile-layout,
  .churches-layout,
  .liturgy-layout {
    grid-template-columns: 1fr;
  }

  .event-detail-list {
    grid-template-columns: 1fr;
  }

  body.is-public-view.is-tenant-mode .sidebar {
    align-items: stretch;
  }

  body.is-public-view.is-tenant-mode .tabs {
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .summary-grid,
  body.is-public-view.is-tenant-mode .summary-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .summary-card {
    border-radius: 16px;
    padding: 18px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .month-grid {
    border-radius: 16px;
    grid-template-columns: repeat(7, minmax(126px, 1fr));
    overflow-x: auto;
  }

  .month-head,
  .month-cell {
    min-width: 126px;
  }

  .modal-actions button,
  .event-actions button,
  .calendar-navigation button,
  .toolbar-actions button {
    flex: 1 1 auto;
  }

  body.is-public-view.is-tenant-mode .public-hero {
    border-radius: 22px;
    min-height: 0;
    padding: 28px 22px;
  }

  body.is-public-view.is-tenant-mode .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.dashboard-pastor-card {
  align-items: center;
  display: none;
  gap: 18px;
  margin-bottom: 18px;
}

body.is-authenticated.has-tenant-context .dashboard-pastor-card {
  display: flex;
}

body.is-public-view .dashboard-pastor-card {
  display: none;
}

.dashboard-pastor-card h2 {
  color: var(--ink-strong);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  margin: 4px 0;
}

.pastor-photo-frame,
.public-hero-photo {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(31, 77, 58, 0.92), rgba(36, 59, 83, 0.92)),
    var(--primary);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 82px;
  justify-content: center;
  overflow: hidden;
  width: 82px;
}

.pastor-photo-frame.is-large {
  height: 128px;
  width: 128px;
}

.pastor-photo-frame img,
.public-hero-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.public-hero-panel .public-hero-photo {
  height: 112px;
  margin-bottom: 8px;
  width: 112px;
}

.pastor-photo-settings {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: auto minmax(0, 1fr);
}

.login-popover-close {
  display: none;
}

body.is-public-view.is-tenant-mode .topbar {
  position: relative;
}

body.is-public-view.is-tenant-mode .login-form {
  align-items: stretch;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: none;
  gap: 10px;
  grid-template-columns: 1fr;
  max-width: none;
  padding: 16px;
  position: fixed;
  left: var(--login-popover-left, 14px);
  right: auto;
  top: var(--login-popover-top, 76px);
  width: var(--login-popover-width, min(360px, calc(100vw - 28px)));
  z-index: 2000;
}

body.is-public-view.is-tenant-mode.is-login-popover-open .login-form:not([hidden]) {
  display: grid;
}

body.is-public-view.is-tenant-mode .login-title {
  color: var(--ink-strong);
  font-size: 0.95rem;
  padding-right: 68px;
}

body.is-public-view.is-tenant-mode .login-popover-close {
  display: inline-flex;
  min-height: 30px;
  padding: 0 9px;
  position: absolute;
  right: 10px;
  top: 10px;
}

body.is-public-view.is-tenant-mode .login-form input,
body.is-public-view.is-tenant-mode .login-form button[type="submit"] {
  width: 100%;
}

@media (max-width: 860px) {
  body.is-public-view.is-tenant-mode .sidebar {
    align-items: center;
    display: grid;
    gap: 10px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 14px;
    position: static;
  }

  body.is-public-view.is-tenant-mode .brand {
    min-width: 0;
  }

  body.is-public-view.is-tenant-mode .brand-mark {
    height: 38px;
    width: 38px;
  }

  body.is-public-view.is-tenant-mode .brand strong,
  body.is-public-view.is-tenant-mode .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.is-public-view.is-tenant-mode .public-login-button {
    min-height: 38px;
    padding: 0 14px;
  }

  body.is-public-view.is-tenant-mode .tabs {
    border-radius: 999px;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    grid-column: 1 / -1;
    margin-top: 0;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
  }

  body.is-public-view.is-tenant-mode .tab {
    flex: 0 0 auto;
    font-size: 0.88rem;
    min-height: 34px;
    padding: 0 12px;
  }

  body.is-public-view.is-tenant-mode .login-form {
    max-height: calc(100vh - var(--login-popover-top, 76px) - 14px);
    overflow: auto;
  }
}

@media (max-width: 620px) {
  body.is-public-view.is-tenant-mode .sidebar {
    padding: 10px 12px;
  }

  body.is-public-view.is-tenant-mode .brand {
    gap: 8px;
  }

  body.is-public-view.is-tenant-mode .brand span {
    display: none;
  }

  body.is-public-view.is-tenant-mode .login-form {
    max-height: calc(100vh - var(--login-popover-top, 76px) - 14px);
    overflow: auto;
    padding: 14px;
  }
}

.pastor-photo-settings .form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.danger-zone {
  background: var(--danger-soft);
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: var(--radius);
  color: var(--danger);
  display: grid;
  gap: 8px;
  padding: 14px;
}

.danger-zone p {
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 620px) {
  .dashboard-pastor-card,
  .pastor-photo-settings {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .dashboard-pastor-card {
    flex-direction: column;
  }
}
