﻿:root {
  --white: #ffffff;
  --black: #101418;
  --green: #0f9d58;
  --dark-blue: #102a43;
  --muted: #66788a;
  --border: #dce4ea;
  --surface: #f7fafc;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 18px 35px rgba(16, 42, 67, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--black);
  background: radial-gradient(circle at top right, rgba(15, 157, 88, 0.12), transparent 35%),
    linear-gradient(135deg, #f8fbfd 0%, #eef5fa 100%);
  min-height: 100vh;
}

h1,
h2,
h3 {
  margin: 0 0 8px;
  color: var(--dark-blue);
}

p {
  margin: 0;
}

a {
  color: var(--dark-blue);
  text-decoration: none;
}

.auth-shell,
.page-shell {
  width: min(1120px, 95vw);
  margin: 30px auto;
}

.auth-shell {
  min-height: 90vh;
  display: grid;
  place-items: center;
}

.auth-card,
.panel,
.stat-card,
.mini-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(520px, 100%);
  padding: 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-brand .church-logo {
  width: clamp(82px, 13vw, 116px);
  height: clamp(82px, 13vw, 116px);
}

.auth-brand h1 {
  margin-bottom: 6px;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.2;
}

.auth-brand .location-line {
  margin-bottom: 4px;
  color: var(--dark-blue);
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-brand .subtitle {
  margin-bottom: 0;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 16px;
}

.stack-form,
.grid-form {
  display: grid;
  gap: 12px;
}

.grid-form.four-col {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.full-row {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: inline-block;
  color: var(--dark-blue);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--black);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  outline: 2px solid rgba(15, 157, 88, 0.2);
}

textarea {
  resize: vertical;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), #0d7c47);
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--dark-blue);
}

.btn-light {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.topbar {
  width: min(1120px, 95vw);
  margin: 24px auto 0;
  background: linear-gradient(125deg, var(--dark-blue), #1f3c63);
  color: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.church-logo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: var(--white);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-actions form {
  margin: 0;
}

.topbar h1,
.topbar p {
  color: var(--white);
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.two-col-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card,
.mini-stat-card {
  padding: 18px;
}

.stat-card p,
.mini-stat-card p {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap-y {
  max-height: 560px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.table-wrap-y table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--dark-blue);
  background: #f4f9fc;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f9fbfd;
  padding: 4px 10px;
  font-size: 0.8rem;
  text-transform: capitalize;
}

.pill-active {
  background: #e9f8ef;
  border-color: #9edcb9;
  color: #0a6f3d;
}

.pill-inactive {
  background: #fdecec;
  border-color: #f4b1b1;
  color: #9b1b1b;
}

.pill-default {
  border-color: rgba(15, 157, 88, 0.5);
  background: rgba(15, 157, 88, 0.1);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-form,
.inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-filter {
  margin-bottom: 14px;
}

.inline-edit-form input[type="number"] {
  width: 140px;
  min-width: 120px;
}

.inline-form select {
  width: auto;
  min-width: 130px;
}

.icon-edit-form {
  gap: 6px;
  max-width: 100%;
}

.icon-edit-input {
  min-width: 14ch;
  max-width: none;
  width: auto;
  flex: 0 0 auto;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1.4;
}

.icon-edit-input[readonly] {
  cursor: default;
}

.icon-edit-form.is-editing .icon-edit-input {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--dark-blue);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 0;
}

.icon-btn:hover {
  background: #eef5fa;
}

.icon-btn-success {
  border-color: rgba(15, 157, 88, 0.45);
  background: rgba(15, 157, 88, 0.1);
  color: #0a6f3d;
}

.compact-role-select {
  min-width: 90px;
  max-width: 102px;
  padding: 7px 8px;
}

.compact-department-select {
  min-width: 120px;
  max-width: 150px;
  padding: 7px 8px;
}

.compact-action-row {
  gap: 6px;
}

.compact-firstfruit-form {
  display: inline-grid;
  grid-template-columns: minmax(126px, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 198px;
  min-width: 198px;
  max-width: 198px;
  flex: 0 0 198px;
}

.compact-firstfruit-form .icon-btn {
  height: 36px;
  min-width: 36px;
  font-size: 14px;
  line-height: 1;
  opacity: 1;
  visibility: visible;
}

.compact-number-input {
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(15, 157, 88, 0.45);
  background: linear-gradient(135deg, #f9fdfb, #eef9f3);
  padding: 6px 12px;
  text-align: right;
  font-weight: 700;
}

.compact-firstfruit-save {
  min-width: 44px !important;
  width: auto !important;
  padding: 0 10px !important;
  border-color: #0d7c47;
  background: linear-gradient(135deg, var(--green), #0d7c47);
  color: #fff;
  font-size: 18px !important;
}

/* Keep account-management table fitted without horizontal scrollbar */
[data-panel-section="accounts"] .table-wrap {
  max-height: 68vh;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
}

[data-panel-section="accounts"] table {
  width: 100%;
  table-layout: fixed;
}

[data-panel-section="accounts"] thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

[data-panel-section="accounts"] th:nth-child(1),
[data-panel-section="accounts"] td:nth-child(1) {
  width: 16%;
}

[data-panel-section="accounts"] th:nth-child(2),
[data-panel-section="accounts"] td:nth-child(2) {
  width: 14%;
}

[data-panel-section="accounts"] th:nth-child(3),
[data-panel-section="accounts"] td:nth-child(3) {
  width: 14%;
}

[data-panel-section="accounts"] th:nth-child(4),
[data-panel-section="accounts"] td:nth-child(4) {
  width: 12%;
}

[data-panel-section="accounts"] th:nth-child(5),
[data-panel-section="accounts"] td:nth-child(5) {
  width: 9%;
}

[data-panel-section="accounts"] th:nth-child(6),
[data-panel-section="accounts"] td:nth-child(6) {
  width: 12%;
}

[data-panel-section="accounts"] th:nth-child(7),
[data-panel-section="accounts"] td:nth-child(7) {
  width: 10%;
}

[data-panel-section="accounts"] th:nth-child(8),
[data-panel-section="accounts"] td:nth-child(8) {
  width: 13%;
}

[data-panel-section="accounts"] th,
[data-panel-section="accounts"] td {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  padding: 8px 9px;
}

[data-panel-section="accounts"] .icon-edit-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

[data-panel-section="accounts"] .icon-edit-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: 0.92rem;
}

[data-panel-section="accounts"] .icon-edit-form .icon-btn {
  justify-self: end;
  width: 26px;
  height: 26px;
  min-width: 26px;
  font-size: 12px;
}

[data-panel-section="accounts"] .compact-role-form {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 6px !important;
}

[data-panel-section="accounts"] .compact-role-select,
[data-panel-section="accounts"] .compact-department-select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 34px;
  padding: 6px 8px;
}

[data-panel-section="accounts"] .compact-role-form .icon-btn {
  justify-self: end;
  width: 30px;
  height: 30px;
  min-width: 30px;
  font-size: 13px;
}

[data-panel-section="accounts"] .compact-firstfruit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  align-items: stretch;
}

[data-panel-section="accounts"] .compact-number-input {
  min-width: 0;
}

[data-panel-section="accounts"] .compact-firstfruit-form .compact-firstfruit-save {
  justify-self: start;
}

[data-panel-section="accounts"] td:nth-child(5),
[data-panel-section="accounts"] th:nth-child(5) {
  text-align: center;
}

[data-panel-section="accounts"] td:nth-child(6),
[data-panel-section="accounts"] th:nth-child(6),
[data-panel-section="accounts"] td:nth-child(7),
[data-panel-section="accounts"] th:nth-child(7) {
  text-align: right;
}

[data-panel-section="accounts"] td:nth-child(6) .note-text {
  text-align: right;
}

.searchable-select-wrap {
  display: grid;
  gap: 6px;
  width: 100%;
}

.inline-form .searchable-select-wrap,
.inline-filter .searchable-select-wrap {
  width: auto;
  min-width: 220px;
}

.select-search-input {
  min-height: 38px;
}

.alert {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-weight: 600;
}

.alert-success {
  background: #e9f8ef;
  border: 1px solid #9edcb9;
  color: #0a6f3d;
}

.alert-error {
  background: #fdecec;
  border: 1px solid #f1b6b6;
  color: #8b1818;
}

.role-note {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  background: #f4f9fc;
  border: 1px solid var(--border);
}

.role-note ul {
  padding-left: 18px;
  margin: 10px 0 0;
}

.item-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 5px;
}

.item-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.note-text {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.commitment-status-open {
  color: #b26a00 !important;
}

.commitment-status-paid {
  color: #0a6f3d !important;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.center-shell {
  min-height: 90vh;
  display: grid;
  place-items: center;
}

.narrow-panel {
  width: min(500px, 100%);
}

.muted {
  color: var(--muted);
}

.print-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.print-logo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
}

@media print {
  body.print-body {
    background: #fff;
  }

  .print-hide {
    display: none;
  }

  .print-shell {
    width: 100%;
    margin: 0;
  }

  .print-panel {
    box-shadow: none;
    border-color: #ccc;
  }
}

@media (max-width: 900px) {
  .two-col-panel {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-brand {
    align-items: flex-start;
  }

  .auth-brand {
    align-items: flex-start;
  }

  .church-logo {
    width: 60px;
    height: 60px;
  }
}



.report-card {
  margin-top: 14px;
}

.report-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 220px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdff;
}

.report-bar-item {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.report-bar-track {
  width: 22px;
  height: 170px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #eef5fa;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.report-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #21b66a, #0f9d58);
}

.report-bar-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.report-line-chart {
  width: 100%;
  max-height: 240px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdff;
}

summary.btn {
  list-style: none;
}

summary.btn::-webkit-details-marker {
  display: none;
}

/* Smooth form and panel transitions */
.panel,
.auth-card,
.stat-card,
.mini-stat-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.2s ease;
}

.panel {
  animation: panel-fade-in 0.25s ease;
}

@keyframes panel-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

input,
select,
textarea,
.btn,
.burger-link,
.burger-btn {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.16s ease;
}

.btn:hover,
.burger-btn:hover {
  transform: translateY(-1px);
}

/* Three-dot action menu */
.action-menu {
  position: relative;
  display: inline-block;
}

.action-menu[open] {
  z-index: 10;
}

.action-menu-trigger {
  list-style: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--dark-blue);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.action-menu-trigger::-webkit-details-marker {
  display: none;
}

.action-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(16, 42, 67, 0.18);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.action-menu-list .stack-form {
  gap: 6px;
}

.commitment-action-menu-list {
  min-width: 340px;
  max-width: min(92vw, 420px);
}

.dept-visibility-form {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed rgba(16, 42, 67, 0.2);
}

.dept-visibility-dropdown {
  border: 1px solid rgba(16, 42, 67, 0.16);
  border-radius: 10px;
  background: #f7fafc;
  overflow: hidden;
}

.dept-visibility-dropdown summary {
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark-blue);
}

.dept-visibility-dropdown summary::-webkit-details-marker {
  display: none;
}

.dept-visibility-dropdown[open] summary {
  background: #eef5fa;
}

.dept-visibility-options {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
}

.dept-visibility-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--black);
}

.dept-visibility-option input[type="checkbox"] {
  margin: 2px 0 0;
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.dept-visibility-save {
  display: flex;
  justify-content: flex-end;
}

.btn-dept-apply {
  width: 38px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  margin-top: 0;
}

@media (max-width: 680px) {
  .commitment-action-menu-list {
    min-width: 290px;
  }
}

/* Center modal notifications and confirmations */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 42, 67, 0.35);
  display: grid;
  place-items: center;
  padding: 16px;
  pointer-events: auto;
}

.modal-box {
  width: min(420px, 92vw);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(16, 42, 67, 0.25);
  padding: 18px;
}

.modal-title {
  margin: 0 0 8px;
  color: var(--dark-blue);
}

.modal-message {
  margin: 0;
  color: var(--black);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* Flash alerts are rendered as centered modal by JS */
.alert[data-flash-alert] {
  display: none;
}


/* Modern motion polish (palette preserved) */
html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.5;
}

.panel,
.auth-card,
.stat-card,
.mini-stat-card {
  border-color: rgba(16, 42, 67, 0.1);
  box-shadow: 0 14px 30px rgba(16, 42, 67, 0.09);
  transition: transform 0.28s cubic-bezier(0.2, 0.65, 0.2, 1), box-shadow 0.28s cubic-bezier(0.2, 0.65, 0.2, 1), border-color 0.22s ease;
}

.panel:hover,
.auth-card:hover,
.stat-card:hover,
.mini-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(16, 42, 67, 0.14);
  border-color: rgba(15, 157, 88, 0.28);
}

[data-panel-section]:not([hidden]) {
  animation: section-slide-in 0.28s ease;
}

@keyframes section-slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

input,
select,
textarea {
  box-shadow: inset 0 1px 2px rgba(16, 42, 67, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(16, 42, 67, 0.25);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.15), inset 0 1px 2px rgba(16, 42, 67, 0.05);
}

.btn,
.burger-btn,
.burger-link,
.action-menu-trigger {
  transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover,
.burger-btn:hover,
.burger-link:hover,
.action-menu-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(16, 42, 67, 0.12);
}

.btn:active,
.burger-btn:active,
.burger-link:active,
.action-menu-trigger:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(16, 42, 67, 0.1);
}

.btn-primary:hover {
  box-shadow: 0 10px 20px rgba(15, 157, 88, 0.28);
}

.btn-ghost:hover {
  border-color: rgba(16, 42, 67, 0.25);
  background: #eef5fa;
}

table tbody tr[data-table-row="data"] {
  transition: background-color 0.18s ease;
}

table tbody tr[data-table-row="data"]:hover {
  background: rgba(15, 157, 88, 0.07);
}

.report-bar-fill {
  transition: height 0.45s cubic-bezier(0.2, 0.65, 0.2, 1);
}

.report-line-chart polyline {
  transition: stroke 0.2s ease;
}

.modal-overlay {
  animation: modal-fade-in 0.16s ease;
}

.modal-box {
  animation: modal-pop-in 0.2s ease;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.password-toggle-wrap {
  position: relative;
  display: block;
}

.password-toggle-wrap input {
  padding-right: 52px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 1px solid #d4dbe3;
  border-radius: 999px;
  background: #fff;
  color: #102a43;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(16, 42, 67, 0.1);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.password-toggle-btn[hidden] {
  display: none !important;
}

.password-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.password-toggle-btn:hover {
  border-color: rgba(15, 157, 88, 0.55);
  color: var(--green);
  box-shadow: 0 4px 10px rgba(16, 42, 67, 0.16);
}

.password-toggle-btn:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.16);
}

.prayer-panel {
  background: linear-gradient(160deg, #ffffff 0%, #f4fbf7 100%);
}

.prayer-form {
  margin-bottom: 14px;
}

.prayer-hint-card {
  margin-bottom: 14px;
  border: 1px dashed rgba(15, 157, 88, 0.55);
  border-radius: 12px;
  background: rgba(15, 157, 88, 0.08);
  color: #0f5132;
  padding: 10px 12px;
}

.prayer-hint-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.prayer-items {
  display: grid;
  gap: 8px;
}

.prayer-item-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.prayer-item-index {
  min-width: 28px;
  font-weight: 700;
  color: #0f6844;
}

.prayer-item-row input {
  width: 100%;
}

.prayer-remove-item-btn {
  white-space: nowrap;
}

.prayer-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.prayer-group-label {
  grid-column: 1 / -1;
  margin: 2px 0 -4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #486581;
}

.prayer-card {
  border: 1px solid rgba(16, 42, 67, 0.12);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(16, 42, 67, 0.09);
}

.prayer-stat-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.prayer-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(15, 157, 88, 0.95), rgba(6, 95, 70, 0.88));
}

.prayer-stat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.prayer-owner {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.prayer-owner-name {
  color: #102a43;
}

.prayer-owner-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #627d98;
}

.prayer-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 157, 88, 0.14);
  color: #0f6844;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.prayer-owner-department {
  font-weight: 600;
}

.prayer-time {
  font-size: 0.76rem;
  color: #829ab1;
  white-space: nowrap;
}

.prayer-inline-form {
  margin-top: 2px;
}

.prayer-actions {
  justify-content: flex-start;
}

.prayer-delete-form {
  margin-top: -2px;
}

.prayer-text {
  margin: 0;
  font-size: 0.96rem;
  color: #243b53;
  line-height: 1.55;
}

.prayer-title {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: #486581;
  text-transform: uppercase;
}

.prayer-list {
  margin: 0;
  padding-left: 20px;
  color: #243b53;
  line-height: 1.5;
}

.prayer-list li + li {
  margin-top: 4px;
}

.prayer-meta {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #627d98;
}

.global-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(248, 251, 253, 0.64);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.global-loading-overlay[hidden] {
  display: none;
}

.global-loading-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

.global-loader-panel {
  width: min(220px, 78vw);
  min-height: 168px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  border: 1px solid rgba(220, 228, 234, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(16, 42, 67, 0.2);
}

.global-loader-ring {
  width: 68px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 52%, transparent 54%),
    conic-gradient(from 0deg, #0f9d58, #102a43, #25c28a, #0f9d58);
  animation: global-loader-spin 900ms linear infinite;
}

.global-loader-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.global-loader-dots span {
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  animation: global-loader-pulse 900ms ease-in-out infinite;
}

.global-loader-dots span:nth-child(2) {
  animation-delay: 120ms;
  background: #102a43;
}

.global-loader-dots span:nth-child(3) {
  animation-delay: 240ms;
  background: #25c28a;
}

.global-loader-panel p {
  color: var(--dark-blue);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

@keyframes global-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes global-loader-pulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .prayer-feed {
    grid-template-columns: 1fr;
  }

  .prayer-stat-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .prayer-item-row {
    grid-template-columns: 1fr;
  }

  .prayer-item-index {
    min-width: 0;
  }

  .prayer-time {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .global-loader-ring {
    background:
      radial-gradient(circle at center, #fff 0 52%, transparent 54%),
      conic-gradient(#0f9d58, #102a43, #25c28a, #0f9d58);
  }
}
