:root {
  --brand: #f59d0a;
  --brand-dark: #d77c00;
  --ink: #25262b;
  --muted: #777981;
  --surface: #fff;
  --bg: #f8f6f2;
  --sidebar: #27242e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 15% 20%, #ffe4aa 0, transparent 27%),
    radial-gradient(circle at 85% 80%, #e9d8ff 0, transparent 25%), #fbf8f2;
}
.login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #eee9e1;
  border-radius: 22px;
  padding: 38px;
  box-shadow: 0 25px 70px rgba(72, 53, 22, 0.12);
}
.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 25px;
  background: linear-gradient(145deg, #ffc13b, var(--brand-dark));
  box-shadow: 0 8px 20px #f59d0a55;
}
.brand-mark.small {
  width: 40px;
  height: 40px;
  font-size: 20px;
  border-radius: 12px;
  box-shadow: none;
}
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #24201a;
  font-weight: 650;
}
.btn-brand:hover,
.btn-brand:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.link-brand {
  color: var(--brand-dark);
}
.form-control,
.form-select,
.input-group-text {
  min-height: 44px;
  border-color: #e2dfda;
}
.form-control:focus,
.form-select:focus {
  border-color: #f2ad36;
  box-shadow: 0 0 0 0.2rem #f59d0a22;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: var(--sidebar);
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 1040;
}
.sidebar-brand {
  height: 82px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #ffffff12;
}
.sidebar-brand-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}
.sidebar-brand-link:hover,
.sidebar-brand-link:focus-visible {
  color: #fff;
}
.sidebar-brand-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
.sidebar-brand strong,
.sidebar-brand small,
.sidebar-user strong,
.sidebar-user small {
  display: block;
}
.sidebar-brand small,
.sidebar-user small {
  color: #aaa7b2;
  font-size: 12px;
}
.sidebar .nav {
  padding: 18px 12px;
}
.sidebar .nav-link {
  color: #c8c5ce;
  padding: 11px 13px;
  border-radius: 9px;
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.sidebar .nav-link i {
  font-size: 17px;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: #ffffff12;
  color: #fff;
}
.sidebar .nav-link.active {
  box-shadow: inset 3px 0 var(--brand);
}
.nav-caption {
  text-transform: uppercase;
  color: #77727e;
  font-size: 10px;
  letter-spacing: 1.3px;
  padding: 20px 13px 7px;
}
.sidebar-user {
  margin-top: auto;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ffffff12;
}
.sidebar-logout {
  display: flex;
  width: 100%;
  min-height: 44px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #dc3545;
  border: 1px solid #dc3545;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 5px 14px rgba(220, 53, 69, 0.2);
}
.sidebar-logout:hover {
  color: #fff;
  background: #bb2d3b;
  border-color: #b02a37;
}
.sidebar-logout:focus-visible {
  color: #fff;
  background: #bb2d3b;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff1ce;
  color: #9b5b00;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.main-content {
  margin-left: 260px;
  min-height: 100vh;
}
.topbar {
  height: 82px;
  background: #fff;
  border-bottom: 1px solid #ebe8e2;
  padding: 13px 28px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.topbar h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 700;
}
.topbar p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #f5f3ef;
}
.notification-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e64949;
  right: 9px;
  top: 8px;
}
.content-area {
  padding: 28px;
}
.stat-card,
.panel {
  background: #fff;
  border: 1px solid #ebe8e2;
  border-radius: 15px;
}
.stat-card {
  padding: 20px;
  height: 100%;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.stat-icon.orange {
  background: #fff0d3;
  color: #c57200;
}
.stat-icon.purple {
  background: #eee5ff;
  color: #7147b8;
}
.stat-icon.green {
  background: #ddf6e9;
  color: #278859;
}
.stat-icon.blue {
  background: #e0efff;
  color: #287ac1;
}
.stat-card h3 {
  font-size: 25px;
  font-weight: 750;
  margin: 15px 0 2px;
}
.stat-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid #eeeae4;
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-header h3 {
  font-size: 16px;
  margin: 0;
  font-weight: 700;
}
.panel-body {
  padding: 20px;
}
.table-responsive {
  border-radius: 0 0 15px 15px;
}
.table {
  margin: 0;
}
.table > :not(caption) > * > * {
  padding: 14px 18px;
  border-color: #efede9;
  vertical-align: middle;
}
.table thead th {
  color: #777981;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.7px;
  background: #fbfaf8;
  font-weight: 700;
}
.table tbody td {
  font-size: 13px;
}
.entity-title {
  font-weight: 650;
}
.badge-soft-success {
  background: #e5f6ed;
  color: #26764c;
}
.badge-soft-warning {
  background: #fff0d5;
  color: #9b6200;
}
.badge-soft-danger {
  background: #fde8e8;
  color: #a93434;
}
.badge-soft-info {
  background: #e6f1ff;
  color: #276ba8;
}
.action-btn {
  border: 0;
  background: transparent;
  color: #6d6d74;
  padding: 5px 7px;
}
.action-btn:hover {
  color: var(--brand-dark);
  background: #fff4df;
  border-radius: 7px;
}
.search-box {
  position: relative;
}
.search-box i {
  position: absolute;
  left: 13px;
  top: 11px;
  color: #999;
}
.search-box input {
  padding-left: 37px;
  min-width: 220px;
}
.empty-state {
  text-align: center;
  padding: 50px;
  color: var(--muted);
}
.empty-state i {
  display: block;
  font-size: 38px;
  color: #d4d0c9;
  margin-bottom: 10px;
}
.upload-zone {
  border: 2px dashed #ddd8d0;
  border-radius: 13px;
  padding: 26px;
  text-align: center;
  background: #fbfaf8;
  cursor: pointer;
}
.upload-zone:hover {
  border-color: var(--brand);
}
.upload-zone i {
  font-size: 30px;
  color: var(--brand-dark);
}
.quick-action {
  border: 1px solid #eee9e2;
  background: #fff;
  border-radius: 13px;
  padding: 17px;
  text-align: left;
  width: 100%;
  transition: 0.2s;
}
.quick-action:hover {
  transform: translateY(-2px);
  border-color: #f1bd61;
  box-shadow: 0 8px 20px #5b421116;
}
.quick-action i {
  color: var(--brand-dark);
  font-size: 20px;
}
.sidebar-backdrop {
  display: none;
}
.content-thumb {
  display: block;
  width: 56px;
  min-width: 56px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}
.image-preview-trigger {
  display: inline-grid;
  width: 56px;
  min-width: 56px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 8px;
  line-height: 0;
  place-items: stretch;
  vertical-align: middle;
}
.image-preview-trigger > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview-trigger:hover img,
.image-preview-trigger:focus-visible img {
  filter: brightness(0.92);
}
.image-preview-trigger:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.image-viewer-modal .modal-body {
  display: grid;
  min-height: 280px;
  padding: 16px;
  background: #171717;
  place-items: center;
}
.image-viewer-modal img {
  display: block;
  max-width: 100%;
  max-height: min(72vh, 760px);
  object-fit: contain;
}
body.image-viewer-active .modal.show:not(#imageViewerModal) {
  visibility: hidden;
}
body.image-viewer-active #imageViewerModal {
  z-index: 1075;
}
body.image-viewer-active .modal-backdrop.show {
  opacity: 0.78;
}
.progress {
  height: 7px;
  background: #eeeae4;
}
.progress-bar {
  background: var(--brand);
}
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.25s;
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    background: #0008;
    z-index: 1030;
  }
  .main-content {
    margin-left: 0;
  }
  .content-area {
    padding: 20px;
  }
  .topbar {
    padding: 12px 18px;
  }
}
@media (max-width: 575.98px) {
  .login-card {
    padding: 25px;
  }
  .content-area {
    padding: 15px;
  }
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }
  .panel-header .ms-auto {
    margin-left: 0 !important;
  }
  .search-box input {
    min-width: 100%;
    width: 100%;
  }
  .topbar {
    height: 72px;
  }
  .sidebar {
    width: 280px;
  }
  .table > :not(caption) > * > * {
    padding: 12px;
  }
}

/* Branded authentication experience */
.login-view {
  padding: 28px;
  background: #f7f5f0;
}
.login-card {
  width: min(980px, 100%);
  min-height: 610px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(169, 116, 0, 0.2);
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(64, 48, 18, 0.17),
    0 4px 14px rgba(64, 48, 18, 0.07);
}
.login-showcase {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  color: #382900;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.62) 0 18%, transparent 43%),
    linear-gradient(155deg, #fff4bb 0%, #ffd85a 57%, #f5aa00 100%);
}
.login-showcase::before,
.login-showcase::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.login-showcase::before {
  width: 340px;
  height: 340px;
  top: 42%;
  left: 50%;
  border-radius: 0;
  background: url('../images/brahmashree-logo.svg') center / contain no-repeat;
  opacity: 0.84;
  filter: drop-shadow(0 20px 30px rgba(105, 67, 0, 0.25));
  transform: translate(-50%, -50%);
}
.login-showcase::after {
  width: 280px;
  height: 280px;
  right: -135px;
  bottom: -145px;
  background: rgba(255, 248, 206, 0.38);
}
.login-showcase-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: 42px;
}
.login-brand-lockup,
.login-mobile-brand {
  display: flex;
  gap: 13px;
  align-items: center;
}
.login-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  padding: 3px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}
.login-brand-lockup span,
.login-brand-lockup small,
.login-mobile-brand strong,
.login-mobile-brand small {
  display: block;
}
.login-brand-lockup span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
}
.login-brand-lockup small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}
.login-welcome-copy {
  max-width: 310px;
  margin-top: auto;
  margin-bottom: 30px;
}
.welcome-line {
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 22px;
  background: #e59a00;
  border-radius: 5px;
}
.login-welcome-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 4vw, 3.25rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -2px;
}
.login-motto {
  margin: -7px 0 16px;
  color: #7f4d00;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}
.login-welcome-copy p {
  margin: 0;
  color: rgba(56, 41, 0, 0.66);
  font-size: 13px;
  line-height: 1.7;
}
.login-logo-mobile {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 9px 24px rgba(94, 61, 15, 0.15);
}
.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 76px;
  background: #fff;
  box-shadow: inset 1px 0 rgba(135, 91, 0, 0.08);
}
.login-mobile-identity {
  margin-bottom: 28px;
  text-align: center;
}
.login-mobile-identity img {
  width: 92px;
  height: 92px;
  margin-bottom: 12px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(167, 110, 0, 0.2));
}
.login-mobile-identity h2 {
  margin: 0 0 7px;
  font-size: 1.65rem;
  font-weight: 750;
}
.login-mobile-identity .login-motto {
  margin: 0;
  font-size: clamp(11px, 3.5vw, 14px);
}
.login-heading {
  margin-bottom: 34px;
}
.login-heading h1 {
  margin: 0 0 9px;
  font-size: 2.25rem;
  font-weight: 750;
  letter-spacing: -1px;
}
.login-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 22px;
  font-size: 12px;
}
.login-mode-link {
  padding: 0;
  color: #9a5c00;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-mode-link:hover {
  color: #653c00;
  background: transparent;
}
#otpLoginFields {
  margin-bottom: 16px;
  padding: 18px;
  background: linear-gradient(145deg, #fffdf7, #fff5d6);
  border: 1px solid #f2d98f;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(132, 87, 0, 0.08);
}
.otp-panel-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
}
.otp-panel-heading strong,
.otp-panel-heading small { display: block; }
.otp-panel-heading strong { font-size: 13px; }
.otp-panel-heading small {
  margin-top: 2px;
  color: #85765d;
  font-size: 10px;
}
#sendOtpBtn {
  min-height: 46px;
  color: #825000;
  background: #fff0bd;
  border-color: #eabb47;
  border-radius: 11px;
  font-weight: 700;
}
#sendOtpBtn:hover {
  color: #fff;
  background: #d98a00;
  border-color: #d98a00;
}
.login-country-code {
  width: auto !important;
  padding-inline: 12px;
  color: #6e665c;
}
.otp-input { letter-spacing: 0.25em; font-weight: 700; }
#otpHelp { color: #8a6a24; }
.login-form-panel .input-group-text {
  width: 48px;
  justify-content: center;
  background: #fbfaf8;
}
.login-form-panel .form-control {
  min-height: 52px;
  font-size: 14px;
  background: #fffdfa;
}
.login-form-panel .input-group {
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(72, 54, 20, 0.04);
}
.login-form-panel .btn-outline-secondary {
  min-width: 52px;
}
.login-form-panel .form-label {
  font-weight: 600;
  font-size: 13px;
}
.login-form-panel .btn-brand {
  background: linear-gradient(135deg, #ffb20d, #ed8e00);
  border: 0;
  box-shadow: 0 12px 26px rgba(222, 132, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.login-form-panel .btn-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(205, 119, 0, 0.34);
}
.login-mobile-brand {
  margin-bottom: 34px;
}
.login-mobile-brand strong {
  font-size: 16px;
}
.login-mobile-brand small {
  color: var(--muted);
  font-size: 10px;
}
.sidebar-logo {
  width: 43px;
  height: 43px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
  padding: 2px;
}
@media (max-width: 991.98px) {
  .login-card {
    width: min(540px, 100%);
    min-height: auto;
  }
  .login-form-panel {
    padding: 48px 44px;
  }
  .login-view {
    padding: 22px;
  }
}
@media (max-width: 575.98px) {
  .login-card {
    padding: 0;
  }
  .login-form-panel {
    padding: 32px 24px 38px;
  }
  .login-view {
    padding: 14px;
  }
  .login-heading {
    margin-bottom: 28px;
  }
  .login-heading h1 {
    font-size: 1.9rem;
  }
}

/* Friendly responsive dashboard */
.dashboard-hero {
  min-height: 235px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 38px 42px;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(120deg, #342638 0%, #6f4119 62%, #d77c00 130%);
  box-shadow: 0 18px 45px rgba(65, 43, 25, 0.16);
}
.dashboard-hero:before,
.dashboard-hero:after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.dashboard-hero:before {
  width: 260px;
  height: 260px;
  right: 80px;
  top: -135px;
}
.dashboard-hero:after {
  width: 180px;
  height: 180px;
  right: -45px;
  bottom: -95px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}
.hero-date {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
}
.dashboard-hero h1 {
  font-size: 34px;
  font-weight: 750;
  margin: 17px 0 8px;
}
.dashboard-hero p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
.hero-btn {
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 650;
}
.btn-hero-outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}
.btn-hero-outline:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}
.hero-logo {
  position: absolute;
  z-index: 1;
  right: 55px;
  width: 155px;
  height: 155px;
  object-fit: cover;
  border-radius: 32px;
  opacity: 0.92;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: rotate(3deg);
}
.stat-card-link {
  border: 1px solid #ebe8e2;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.stat-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(48, 39, 27, 0.09);
  border-color: #efd39f;
}
.stat-arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f7f5f1;
  color: #89847d;
}
.stat-card h3 {
  font-size: 27px;
}
.stat-card small {
  display: block;
  margin-top: 10px;
  color: #6f756f;
  font-size: 11px;
}
.stat-card small i {
  color: #3c9b68;
}
.stat-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.stat-metrics h3 {
  margin: 15px 0 2px;
}
.stat-today {
  text-align: right;
}
.stat-today h3 {
  color: var(--brand-dark);
}
.stat-today p {
  white-space: nowrap;
}
.dashboard-panel {
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(50, 40, 27, 0.035);
}
.btn-soft {
  background: #f7f4ee;
  color: #675f55;
  border-radius: 9px;
  padding: 7px 11px;
}
.btn-soft:hover {
  background: #fff0d5;
  color: #9b6200;
}
.member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #efede9;
}
.member-card {
  border: 0;
  background: #fff;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  min-width: 0;
}
.member-card:hover {
  background: #fffcf7;
}
.member-avatar {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 750;
}
.avatar-0 {
  background: #fff0d4;
  color: #a56400;
}
.avatar-1 {
  background: #e5efff;
  color: #3569ad;
}
.avatar-2 {
  background: #e7f6ed;
  color: #277b4e;
}
.avatar-3 {
  background: #f0e8fb;
  color: #7450a0;
}
.member-info {
  min-width: 0;
}
.member-info strong,
.member-info small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-info strong {
  font-size: 13px;
}
.member-info small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.member-card .badge {
  margin-left: auto;
  font-size: 9px;
}
.quick-action-list {
  display: grid;
  gap: 9px;
}
.quick-action-new {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 12px;
  gap: 11px;
}
.quick-action-new:hover {
  background: #fbf8f2;
  border-color: #eee6d8;
}
.quick-action-new strong,
.quick-action-new small {
  display: block;
}
.quick-action-new strong {
  font-size: 12px;
}
.quick-action-new small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.quick-action-new > .bi {
  color: #aaa;
}
.quick-action-icon {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff0d5;
  color: #b56a00;
  font-size: 16px;
}
.donation-list {
  display: flex;
  flex-direction: column;
}
.donation-row {
  border: 0;
  border-bottom: 1px solid #f0ede8;
  background: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
}
.donation-row:last-child {
  border-bottom: 0;
}
.donation-row:hover {
  background: #fffcf8;
}
.donation-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 39px;
  border-radius: 12px;
  background: #fce9ec;
  color: #d24b60;
}
.donation-info {
  min-width: 0;
}
.donation-info strong,
.donation-info small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donation-info strong {
  font-size: 12px;
}
.donation-info small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.donation-amount {
  margin-left: auto;
  font-size: 13px;
  font-weight: 750;
  color: #3f7458;
}
.content-progress {
  padding-top: 10px;
}
.progress-item {
  padding: 10px 0;
}
.progress-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff1d9;
  color: #ac6900;
}
.progress-value {
  font-size: 12px;
  font-weight: 750;
}
.progress-item small {
  font-size: 9px;
  color: var(--muted);
}
.progress-item .progress {
  height: 6px;
  margin-bottom: 5px;
}
.progress-item:nth-child(2) .progress-bar {
  background: #7256b5;
}
.progress-item:nth-child(3) .progress-bar {
  background: #3c9364;
}
.empty-mini {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}
@media (max-width: 1199.98px) {
  .hero-logo {
    right: 35px;
    width: 130px;
    height: 130px;
  }
  .hero-copy {
    max-width: 70%;
  }
}
@media (max-width: 767.98px) {
  .dashboard-hero {
    padding: 28px;
    min-height: 220px;
  }
  .hero-logo {
    right: -25px;
    bottom: -25px;
    width: 125px;
    height: 125px;
    opacity: 0.28;
  }
  .hero-copy {
    max-width: 100%;
  }
  .dashboard-hero h1 {
    font-size: 27px;
  }
  .member-grid {
    grid-template-columns: 1fr;
  }
}

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

.poster-attribute-card {
  position: relative;
  padding: 14px;
  border: 1px solid #e8e0d4;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #fcfaf6);
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease;
}

.poster-attribute-card:hover,
.poster-attribute-card:focus-within {
  border-color: #e3ba72;
  box-shadow: 0 8px 20px rgba(112, 75, 29, 0.08);
  transform: translateY(-1px);
}

.poster-editor-section {
  border-color: #eadfce;
  box-shadow: 0 10px 28px rgba(86, 60, 28, 0.055);
}

.poster-form .entity-form-section {
  overflow: hidden;
}

.poster-form .entity-form-section:first-child {
  border-top: 3px solid #e5a126;
}

.poster-form .poster-editor-section:nth-child(2) {
  border-top: 3px solid #d89120;
}

.poster-form .poster-editor-section:nth-child(3) {
  border-top: 3px solid #cb9955;
}

.poster-form .poster-editor-section:nth-child(4) {
  border-top: 3px solid #b67a4d;
}

.poster-form .entity-form-heading {
  margin: -2px 0 18px;
}

.poster-form .entity-form-heading h6 {
  color: #33291f;
  font-size: 15px;
}

.poster-section-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.poster-section-options-single {
  grid-template-columns: minmax(0, 1fr);
}

.poster-form .image-upload-field {
  align-items: stretch;
  flex-direction: column;
}

.poster-form .image-preview-wrap,
.poster-form .image-preview-wrap img,
.poster-form .image-preview-edit-trigger,
.poster-form .image-placeholder {
  width: 100%;
  height: 300px;
  flex-basis: 300px;
}

.poster-form .image-preview-wrap img {
  object-fit: contain;
  background-color: #f3f0eb;
  background-image:
    linear-gradient(45deg, #e8e3dc 25%, transparent 25%),
    linear-gradient(-45deg, #e8e3dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e3dc 75%),
    linear-gradient(-45deg, transparent 75%, #e8e3dc 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
}

.poster-switch-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #e8e0d5;
  border-radius: 12px;
  background: #fffdfa;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.poster-switch-row:hover,
.poster-switch-row:focus-within {
  border-color: #dfb36e;
  background: #fffaf0;
  box-shadow: 0 4px 12px rgba(114, 74, 22, 0.06);
}

.poster-switch-copy {
  display: grid;
  gap: 2px;
}

.poster-switch-copy strong {
  color: #3c332c;
  font-size: 12px;
}

.poster-switch-copy small {
  color: #84786e;
  font-size: 10px;
  line-height: 1.35;
}

.poster-switch-row .form-switch {
  flex: 0 0 auto;
  padding-left: 0;
}

.poster-switch-row .form-check-input {
  width: 2.55rem;
  height: 1.35rem;
  margin: 0;
  cursor: pointer;
}

.poster-switch-row .form-check-input:checked {
  border-color: #c57b0b;
  background-color: #c57b0b;
}

.poster-feature-body {
  padding-top: 2px;
}

.poster-subsection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #eee6db;
  border-radius: 12px;
  background: #fffdfa;
}

.poster-shape-options {
  display: flex;
  gap: 8px;
}

.poster-shape-option {
  position: relative;
  min-width: 92px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #e2d9cc;
  border-radius: 10px;
  color: #6f645b;
  background: #fbfaf8;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.poster-shape-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.poster-shape-option:has(input:checked) {
  border-color: #d99a39;
  color: #8f5705;
  background: #fff6e6;
  box-shadow: 0 0 0 2px rgba(217, 154, 57, 0.12);
}

.poster-shape-visual {
  width: 22px;
  height: 18px;
  display: block;
  border: 2px solid currentColor;
}

.poster-shape-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.poster-style-group {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #eee5d8;
  border-radius: 14px;
  background: linear-gradient(145deg, #fffdfa, #fffaf3);
}

.poster-style-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #eee6dc;
}

.poster-style-heading > div {
  display: grid;
  gap: 2px;
}

.poster-style-heading strong {
  color: #4a3d32;
  font-size: 12px;
}

.poster-style-heading small {
  color: #8a7d71;
  font-size: 10px;
}

.poster-style-heading i {
  color: #bd7509;
}

.poster-attribute-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #3c332c;
  font-size: 12px;
  font-weight: 700;
}

.poster-attribute-title span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: #975d08;
  background: #fff0d4;
  font-size: 12px;
}

.poster-attribute-card .form-label {
  margin-bottom: 4px;
  color: #766b62;
  font-size: 10px;
  font-weight: 650;
}

.poster-attribute-card .col-lg-3 {
  width: 50%;
}

.poster-form .form-control:focus,
.poster-form .form-select:focus {
  border-color: #d89a37;
  box-shadow: 0 0 0 0.22rem rgba(216, 154, 55, 0.14);
}

.poster-color-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
}

.poster-table-thumb {
  object-fit: cover;
}

.poster-generator-panel {
  margin-bottom: 20px;
  padding: 22px;
}

.poster-generator-heading {
  align-items: center;
  display: flex;
  gap: 13px;
  margin-bottom: 18px;
}

.poster-generator-heading h5 {
  font-size: 1rem;
  font-weight: 750;
  margin: 0 0 3px;
}

.poster-generator-heading p {
  color: #6c757d;
  font-size: 0.85rem;
  margin: 0;
}

.poster-generator-icon {
  align-items: center;
  background: #fff2d9;
  border-radius: 12px;
  color: #9a5b00;
  display: flex;
  flex: 0 0 42px;
  font-size: 1.1rem;
  height: 42px;
  justify-content: center;
}

.poster-generator-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.poster-generator-form .btn {
  min-height: 38px;
  white-space: nowrap;
}

.member-search-dropdown {
  width: 100%;
}

.member-search-toggle {
  align-items: center;
  color: #212529;
  display: flex;
  min-height: 38px;
}

.member-search-menu {
  border: 1px solid #e4d7c8;
  box-shadow: 0 18px 36px rgba(38, 30, 21, 0.14);
  max-height: 320px;
  overflow: hidden;
  padding: 8px;
  width: 100%;
}

.member-search-box {
  align-items: center;
  border: 1px solid #ded4c8;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 10px;
}

.member-search-box i {
  color: #8a8178;
  flex: 0 0 auto;
}

.member-search-box .form-control {
  border: 0;
  box-shadow: none;
  min-height: 42px;
  padding-left: 0;
}

.member-search-box:focus-within {
  border-color: #f59f00;
  box-shadow: 0 0 0 0.2rem rgba(245, 159, 0, 0.16);
}

.member-search-options {
  max-height: 236px;
  overflow-y: auto;
}

.member-dropdown-option {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #2f2a25;
  display: block;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.member-dropdown-option:hover,
.member-dropdown-option:focus {
  background: #fff4df;
  outline: 0;
}

.member-dropdown-option span,
.member-dropdown-option small {
  display: block;
}

.member-dropdown-option span {
  font-size: 0.88rem;
  font-weight: 650;
}

.member-dropdown-option small,
.member-search-empty {
  color: #776f67;
  font-size: 0.76rem;
}

.member-search-empty {
  padding: 10px;
  text-align: center;
}

.selected-template-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #ebe1d2;
  border-radius: 13px;
  background: #fffdf9;
}

.selected-template-preview img {
  width: 92px;
  height: 78px;
  flex: 0 0 92px;
  border: 1px solid #e3d7c6;
  border-radius: 9px;
  object-fit: contain;
  background: #f2eee7;
}
.selected-template-preview-button {
  flex: 0 0 92px;
  border-radius: 9px;
}
.selected-template-preview-button img {
  flex: 0 0 auto;
}

.selected-template-preview strong,
.selected-template-preview span {
  display: block;
}

.selected-template-preview strong {
  color: #44362a;
  font-size: 0.84rem;
}

.selected-template-preview span {
  margin-top: 3px;
  color: #756c62;
  font-size: 0.75rem;
}

.selected-template-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8c8175;
}

.selected-template-placeholder > i {
  display: grid;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  color: #a8792f;
  background: #fff2dc;
  font-size: 1.2rem;
  place-items: center;
}

.generated-poster-preview {
  background: #f8f5ef;
  border: 1px dashed #d7c6af;
  border-radius: 14px;
  margin-top: 18px;
  min-height: 180px;
  overflow: hidden;
}

.generated-poster-placeholder {
  align-items: center;
  color: #6c757d;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-height: 180px;
  padding: 24px;
  text-align: center;
}

.generated-poster-placeholder i {
  font-size: 2rem;
}

.generated-poster-result {
  background: #fff;
}

.generated-poster-result > img {
  display: block;
  margin: 0 auto;
  max-height: 620px;
  max-width: 100%;
  object-fit: contain;
}

.generated-poster-actions {
  align-items: center;
  border-top: 1px solid #eee5d9;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
}

.generated-poster-actions span {
  color: #6c757d;
  display: block;
  font-size: 0.78rem;
}

.generated-poster-actions-group {
  align-items: center;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.donation-amount-cell,
.donation-collected-cell {
  min-width: 130px;
  white-space: nowrap;
}

.donation-collected-cell {
  color: #218052;
}

.donation-progress-cell {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 135px;
}

.donation-progress-track {
  background: #ebe7e0;
  border-radius: 999px;
  flex: 1;
  height: 8px;
  overflow: hidden;
}

.donation-progress-track span {
  background: linear-gradient(90deg, #e8a21d, #42a06e);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.25s ease;
}

.donation-progress-cell small {
  color: #69645d;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  min-width: 34px;
  text-align: right;
}

@media (max-width: 991.98px) {
  .poster-attribute-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .poster-generator-form .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .poster-attribute-grid {
    grid-template-columns: 1fr;
  }

  .poster-section-options {
    grid-template-columns: 1fr;
  }

  .poster-subsection {
    align-items: flex-start;
    flex-direction: column;
  }

  .poster-shape-options {
    width: 100%;
  }

  .poster-shape-option {
    flex: 1;
  }

  .poster-style-group {
    padding: 11px;
  }

  .poster-form .image-preview-wrap,
  .poster-form .image-preview-wrap img,
  .poster-form .image-preview-edit-trigger,
  .poster-form .image-placeholder {
    height: 220px;
    flex-basis: 220px;
  }

  .poster-generator-panel {
    padding: 16px;
  }

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

  .poster-generator-form .btn {
    grid-column: auto;
  }

  .generated-poster-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .selected-template-preview {
    align-items: flex-start;
  }
}

/* Poster Maker has a generator above its table, so the complete page must scroll. */
.content-area.entity-page.poster-page {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding-bottom: 28px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.content-area.poster-page .poster-generator-panel,
.content-area.poster-page .entity-panel {
  flex: 0 0 auto;
}

.content-area.poster-page .entity-panel {
  height: min(70dvh, 720px);
  min-height: 520px;
}

.content-area.poster-page .poster-generator-form .form-select {
  min-width: 0;
  width: 100%;
}

@media (max-width: 767.98px) {
  .content-area.entity-page.poster-page {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .content-area.poster-page .entity-panel {
    height: 68dvh;
    min-height: 480px;
  }

  .poster-generator-heading {
    align-items: flex-start;
  }

  .poster-generator-heading p {
    line-height: 1.45;
  }

  .generated-poster-preview,
  .generated-poster-placeholder {
    min-height: 150px;
  }
}
@media (max-width: 575.98px) {
  .dashboard-hero {
    border-radius: 18px;
    padding: 24px 20px;
  }
  .dashboard-hero p {
    font-size: 13px;
    max-width: 90%;
  }
  .hero-btn {
    padding: 8px 12px;
  }
  .stat-card {
    padding: 17px;
  }
  .stat-card h3 {
    font-size: 23px;
  }
  .member-card {
    padding: 14px;
  }
  .donation-row {
    padding: 14px;
  }
  .donation-amount {
    font-size: 12px;
  }
}

/* Responsive entity search toolbar */
.content-area.entity-page {
  height: calc(100dvh - 82px);
  padding: 18px 28px;
  overflow: hidden;
}
.entity-page .entity-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.entity-toolbar {
  position: relative;
  flex: 0 0 auto;
  z-index: 15;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 20px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(50, 40, 27, 0.04);
}
.entity-toolbar .search-box {
  max-width: 520px;
  min-width: 260px;
}
.entity-toolbar .search-box input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 48px 0 46px;
  border: 1px solid #ddd8cf;
  border-radius: 12px;
  background: #fff;
  line-height: 46px;
  box-shadow: 0 1px 2px rgba(39, 34, 27, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.entity-toolbar .search-box input:focus {
  background: #fff;
  border-color: #e2a31f;
  box-shadow: 0 0 0 3px rgba(245, 157, 10, 0.12);
}
.search-leading-icon {
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #f4f2ee;
  color: #77736d;
  display: grid;
  place-items: center;
  z-index: 2;
}
.search-clear i {
  position: static;
  color: inherit;
  font-size: 15px;
  line-height: 1;
}
.search-clear:hover {
  background: #ebe7df;
  color: #25231f;
}
.toolbar-actions {
  margin-left: auto;
}
.toolbar-actions .btn {
  min-height: 44px;
  padding-left: 16px;
  padding-right: 16px;
  white-space: nowrap;
  border-radius: 10px;
}
.entity-panel .table-responsive .table {
  table-layout: auto;
  width: 100%;
  min-width: 840px;
}
.entity-panel .table > :not(caption) > * > * {
  padding: 11px 14px;
}
.entity-panel .table tbody td,
.entity-panel .table tbody .entity-title,
.entity-panel .table tbody .fw-semibold {
  font-weight: 400 !important;
}
.entity-panel .table-responsive thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  white-space: nowrap;
  background: #fbfaf8;
  box-shadow: inset 0 -1px #e8e4dd;
}
.entity-panel .table-responsive .action-column {
  width: 100px;
  min-width: 100px;
  white-space: nowrap;
}
.entity-panel .table-responsive .actions-at-start .action-column,
.entity-panel .table-responsive .members-table .action-column {
  position: sticky;
  left: 0;
  text-align: center !important;
  background: #fff;
  box-shadow: 8px 0 14px rgba(50, 40, 27, 0.04);
}
.entity-panel .table-responsive .actions-at-start th.action-column,
.entity-panel .table-responsive .members-table th.action-column {
  z-index: 5;
  background: #fbfaf8;
}
.entity-panel .table-hover.actions-at-start tbody tr:hover td.action-column,
.entity-panel .table-hover.members-table tbody tr:hover td.action-column {
  background: #fffcf7;
}
.entity-panel .members-table {
  min-width: 1450px;
}
.members-table .member-id {
  color: #6f6a62;
  font-variant-numeric: tabular-nums;
}
.members-table .member-details {
  min-width: 220px;
  max-width: 280px;
  white-space: normal;
}

.excel-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.excel-filter-trigger {
  width: 27px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #8b8379;
  background: transparent;
  font-size: 11px;
}

.excel-filter-trigger:hover,
.excel-filter-trigger[aria-expanded='true'] {
  color: #855100;
  background: #fff0d4;
}

.excel-filter-trigger.active {
  color: #fff;
  background: #d58a17;
}

.entity-panel .table-responsive thead th:has(.excel-filter-menu.show) {
  z-index: 20;
}

.excel-filter-menu {
  width: 270px;
  max-width: calc(100vw - 30px);
  max-height: min(420px, calc(100dvh - 30px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #ddd5ca;
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(49, 37, 22, 0.18);
  z-index: 1080;
}

.excel-filter-menu.show {
  display: flex;
  flex-direction: column;
}

.excel-filter-title {
  flex: 0 0 auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  color: #443a31;
  background: #fbfaf8;
  font-size: 12px;
  font-weight: 700;
}

.excel-filter-active-label {
  padding: 3px 7px;
  border-radius: 10px;
  color: #935b05;
  background: #ffedcf;
  font-size: 9px;
  text-transform: uppercase;
}

.excel-filter-search {
  position: relative;
  flex: 0 0 auto;
  margin: 10px;
}

.excel-filter-search i {
  position: absolute;
  top: 9px;
  left: 10px;
  color: #999086;
  font-size: 11px;
}

.excel-filter-search input {
  width: 100%;
  height: 34px;
  padding: 6px 9px 6px 29px;
  border: 1px solid #ddd7ce;
  border-radius: 8px;
  outline: 0;
  color: #4e4841;
  font-size: 11px;
}

.excel-filter-search input:focus {
  border-color: #dfa12c;
  box-shadow: 0 0 0 3px rgba(223, 161, 44, 0.12);
}

.excel-filter-values {
  flex: 1 1 auto;
  min-height: 70px;
  max-height: 190px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid #eee9e2;
  border-bottom: 1px solid #eee9e2;
  scrollbar-gutter: stable;
}

.excel-filter-option {
  min-height: 35px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  color: #574f47;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.excel-filter-option:hover {
  background: #fffaf1;
}

.excel-filter-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-filter-option small {
  color: #a0988e;
  font-size: 9px;
}

.excel-filter-option .form-check-input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.excel-filter-option .form-check-input:checked {
  border-color: #ce8415;
  background-color: #ce8415;
}

.excel-filter-select-all {
  flex: 0 0 auto;
  margin: 0 0 2px;
  border-top: 1px solid #f0ebe4;
  font-weight: 700;
}

.excel-filter-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 9px 10px;
  background: #fbfaf8;
}

.excel-filter-actions .btn {
  min-width: 62px;
  border-radius: 7px;
  font-size: 10px;
}

#tableResults {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#tableResults .table-responsive {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-radius: 0 0 15px 15px;
}
#tableResults .table-responsive::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
#tableResults .table-responsive::-webkit-scrollbar-thumb {
  background: #c8c2b8;
  border: 2px solid #f8f6f2;
  border-radius: 10px;
}
#tableResults .table-responsive::-webkit-scrollbar-track {
  background: #f8f6f2;
}
.table-pagination {
  flex: 0 0 auto;
  min-height: 54px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #ece8e1;
  background: #fff;
}
.pagination-summary {
  color: #777168;
  font-size: 13px;
  white-space: nowrap;
}
.pagination-summary strong {
  color: #332f29;
  font-weight: 650;
}
.pagination-controls,
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pagination-nav,
.page-number {
  min-width: 34px;
  height: 34px;
  border: 1px solid #e3ded5;
  border-radius: 8px;
  background: #fff;
  color: #534e47;
  font-size: 13px;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}
.pagination-nav {
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pagination-nav:hover:not(:disabled),
.page-number:hover:not(.active) {
  border-color: #e8ad2b;
  background: #fff9e9;
  color: #8a5900;
}
.page-number.active {
  border-color: #e39a00;
  background: #f2a000;
  color: #fff;
  font-weight: 700;
}
.pagination-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.page-jump {
  margin-left: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #777168;
  font-size: 12px;
  white-space: nowrap;
}
.page-jump input {
  width: 52px;
  height: 34px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid #e3ded5;
  border-radius: 8px;
  text-align: center;
}
.page-jump input:focus {
  border-color: #e8ad2b;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(245, 157, 10, 0.12);
}
@media (max-width: 767.98px) {
  .entity-toolbar {
    align-items: stretch;
  }
  .entity-toolbar .search-box {
    order: 1;
    max-width: none;
    width: 100%;
    min-width: 0;
  }
  .toolbar-actions {
    order: 2;
    width: 100%;
    margin-left: 0;
  }
  .toolbar-actions .btn {
    flex: 1;
  }
  .entity-panel .table-responsive {
    max-width: 100%;
  }
  .table-pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .pagination-summary {
    text-align: center;
  }
  .pagination-controls {
    justify-content: center;
    flex-wrap: wrap;
  }
}
@media (max-width: 399.98px) {
  .toolbar-actions .btn span {
    font-size: 11px;
  }
  .toolbar-actions .btn {
    padding-left: 8px;
    padding-right: 8px;
  }
  .search-box i {
    top: 13px;
  }
  .pagination-nav span {
    display: none;
  }
  .page-jump {
    margin-left: 0;
  }
}

/* Full responsive member registration/profile form */
.member-form {
  display: grid;
  gap: 18px;
}

/* Locally hosted Jodit editor used by Stories. */
.story-editor-field .jodit-container {
  --jd-color-background-selection: #f59d0a;
  --jd-color-border-selected: #f2ad36;
  border-color: #e2dfda;
  border-radius: 11px;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.story-editor-field .jodit-toolbar__box {
  border-radius: 11px 11px 0 0;
  background: #faf9f7;
}
.story-editor-field .jodit-wysiwyg {
  padding: 18px;
  font-size: 15px;
  line-height: 1.65;
}
.story-editor-field .jodit-container:not(.jodit_inline):focus-within {
  border-color: #f2ad36;
  box-shadow: 0 0 0 0.2rem #f59d0a22;
}
.story-editor-field .jodit-toolbar-button[aria-pressed='true'] {
  background: #fff0ce;
  color: #925b00;
}
.member-form-section {
  border: 1px solid #e9e5de;
  border-radius: 15px;
  padding: 20px;
  background: #fff;
}
.member-section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0ede8;
}
.member-section-heading > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 11px;
  background: #fff0d5;
  color: #a86400;
}
.member-section-heading h6 {
  font-size: 14px;
  font-weight: 750;
  margin: 0;
}
.member-form .form-label {
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 6px;
}
.member-form .form-control,
.member-form .form-select {
  min-height: 43px;
  font-size: 13px;
}
.member-form textarea.form-control {
  min-height: auto;
}
.modal-xl .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}
.modal-xl .modal-header {
  padding: 20px 24px;
  background: #fffcf7;
}
.modal-xl .modal-body {
  padding: 22px;
  background: #f8f6f2;
}
.modal-xl .modal-footer {
  padding: 14px 24px;
}
@media (max-width: 767.98px) {
  .member-form {
    gap: 12px;
  }
  .member-form-section {
    padding: 16px;
  }
  .modal-xl .modal-body {
    padding: 14px;
  }
  .modal-xl .modal-header {
    padding: 17px;
  }
  .modal-xl .modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
  }
  .modal-xl .modal-footer .btn {
    flex: 1;
  }
}
.area-results {
  position: absolute;
  z-index: 1080;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid #ddd8d0;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(42, 34, 25, 0.14);
}
.area-results button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1eee8;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
}
.area-results button:hover {
  background: #fff7e8;
}
.area-results span {
  display: block;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}
.lookup-loading {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.lookup-loading strong {
  font-size: 14px;
}
.lookup-loading small {
  color: var(--muted);
}

/* Shared responsive layout for Bhajan, Donation, Job, Tutorial and Story forms */
.entity-form-layout {
  display: grid;
  gap: 18px;
}

.entity-form-section {
  padding: 20px;
  background: #fff;
  border: 1px solid #e9e5de;
  border-radius: 15px;
}

.entity-form-heading {
  display: flex;
  gap: 11px;
  align-items: center;
  padding-bottom: 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0ede8;
}

.entity-form-heading > span {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  color: #a86400;
  background: #fff0d5;
  border-radius: 11px;
  place-items: center;
}

.entity-form-heading h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
}

.entity-form-layout .form-label {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 650;
}

.entity-form-layout .form-control,
.entity-form-layout .form-select {
  min-height: 43px;
  font-size: 13px;
}

.story-editor {
  min-height: 240px;
  line-height: 1.6;
}

.image-upload-field {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fbfaf8;
  border: 1px dashed #d8d1c7;
  border-radius: 13px;
}

.image-preview-wrap,
.image-preview-wrap img,
.image-preview-edit-trigger,
.image-placeholder {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  border-radius: 12px;
}

.image-preview-wrap img {
  object-fit: cover;
  background: #fff;
  border: 1px solid #e8e3db;
}

.image-placeholder {
  display: grid;
  color: #a59d92;
  font-size: 26px;
  background: #f0ede8;
  place-items: center;
}

@media (max-width: 575.98px) {
  .content-area.entity-page {
    height: calc(100dvh - 72px);
    padding: 10px;
  }
  .entity-toolbar {
    gap: 10px;
    padding: 12px;
  }
  #tableResults .table-responsive {
    max-height: none;
  }
  .image-upload-field {
    align-items: stretch;
    flex-direction: column;
  }

  .image-preview-wrap,
  .image-preview-wrap img,
  .image-placeholder {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 767.98px) {
  .entity-form-layout {
    gap: 12px;
  }

  .entity-form-section {
    padding: 16px;
  }
}
.delete-modal-content {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(38, 26, 20, 0.22);
}
.delete-warning-icon {
  width: 62px;
  height: 62px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fde8e8;
  color: #c83f3f;
  font-size: 25px;
}
.logout-warning-icon {
  color: #a86400;
  background: #fff0d5;
}
.delete-note {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff4df;
  color: #93600c;
  font-size: 10px;
}
.delete-modal-content .modal-footer {
  gap: 8px;
}
.delete-modal-content .btn {
  border-radius: 10px;
  min-height: 42px;
  font-size: 12px;
  font-weight: 650;
}
.delete-modal-content .btn-danger {
  background: #d84b4b;
  border-color: #d84b4b;
}

/* Keep long registration forms inside the viewport and independently scrollable */
#formModal .modal-dialog-scrollable {
  height: calc(100% - 1.5rem);
  max-height: none;
  margin: 0.75rem auto;
}
#formModal .modal-content {
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#formModal .modal-header {
  flex: 0 0 auto;
}
#entityForm {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
#formModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
#formModal .modal-footer {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid #e9e5de;
  z-index: 3;
}
@media (min-width: 576px) {
  #formModal .modal-dialog-scrollable {
    height: calc(100% - 3rem);
    margin: 1.5rem auto;
  }
}
@media (max-width: 575.98px) {
  #formModal .modal-dialog {
    width: 100%;
    height: 100%;
    margin: 0;
    max-width: none;
  }
  #formModal .modal-content {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  #formModal .modal-header {
    padding: 14px 16px;
  }
  #formModal .modal-title {
    font-size: 17px;
  }
  #formModal .modal-header small {
    display: block;
    font-size: 10px;
    line-height: 1.35;
    margin-top: 3px;
  }
  #formModal .modal-body {
    padding: 12px;
    background: #f8f6f2;
  }
  #formModal .modal-footer {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .member-form-section {
    padding: 14px;
    border-radius: 12px;
  }
  .member-section-heading {
    align-items: flex-start;
    margin-bottom: 13px;
    padding-bottom: 12px;
  }
  .member-section-heading > span {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .member-form .form-control,
  .member-form .form-select {
    font-size: 16px;
  }
  .area-results {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 76px;
    max-height: 40vh;
  }
}
