/* Fixed viewport layout for member portal */
html.member-portal-page,
html.member-portal-page body {
  height: 100%;
  overflow: hidden;
}

html.member-portal-page body {
  display: flex;
  flex-direction: column;
}

html.member-portal-page .member-portal-nav {
  flex-shrink: 0;
  margin-bottom: 0;
}

html.member-portal-page .content-wrap.container-fluid {
  flex: 1;
  overflow: hidden;
  padding-top: 0.5rem;
  padding-bottom: 0;
}

html.member-portal-page .site-footer {
  flex-shrink: 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
}

/* Tab layout fills available space */
html.member-portal-page .member-tab-layout {
  height: 100%;
  display: grid;
  align-items: stretch;
}

/* Sidebar stays at top */
html.member-portal-page .tab-sidebar {
  align-self: start;
}

/* Tab panels fill and scroll internally */
html.member-portal-page .tab-panels {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.member-portal-page .tab-panel {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html.member-portal-page .tab-panel.is-active {
  display: flex;
}

/* Cards inside panels - fixed header, scrollable content */
html.member-portal-page .commitment-card,
html.member-portal-page .messages-card,
html.member-portal-page .bible-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

html.member-portal-page .commitment-card .card-head,
html.member-portal-page .messages-card .card-head,
html.member-portal-page .bible-card .card-head {
  flex-shrink: 0;
}

html.member-portal-page .announcement-list,
html.member-portal-page .bible-content,
html.member-portal-page .messages-hub-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Scrollable tab layouts for commitment, tithe, pledges */
html.member-portal-page #tab-commitment {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.member-portal-page #tab-tithe {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.member-portal-page #tab-pledges {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.member-login-card {
  width: min(calc(100% - 2rem), 520px);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.member-login-card .headline {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.member-login-card .subtle {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.member-login-card .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.member-login-card label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.member-login-card .input-control {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 29, 0.8);
  padding: 0.95rem 1rem;
  font-size: 1rem;
  color: rgba(241, 245, 249, 0.95);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-login-card .input-control:focus {
  border-color: rgba(255, 215, 0, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  outline: none;
}

.member-login-card .input-control::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

.password-field .password-input {
  position: relative;
}

.password-field .password-input .input-control {
  width: 100%;
  padding-right: 3.25rem;
}

.toggle-visibility {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  cursor: pointer;
  color: rgba(226, 232, 240, 0.8);
  transition: color 0.2s ease, transform 0.2s ease;
}

.toggle-visibility:hover,
.toggle-visibility:focus-visible {
  color: #fde047;
  outline: none;
  transform: translateY(-50%) scale(1.05);
}

.toggle-visibility .icon-eye {
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
}

.toggle-visibility svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.toggle-visibility .eye-closed {
  display: none;
}

.toggle-visibility.is-visible .eye-open {
  display: none;
}

.toggle-visibility.is-visible .eye-closed {
  display: block;
}

.member-login-card .actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.btn-primary {
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #111827;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 1.6rem;
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 52px rgba(250, 204, 21, 0.32);
  outline: none;
}

.member-login-card .btn-primary {
  width: 100%;
  padding-inline: 0.95rem;
}

.member-login-card .btn-secondary {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: rgba(226, 232, 240, 0.85);
  font-weight: 600;
  padding: 0.9rem;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.member-login-card .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 244, 245, 0.94);
}

.alert-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translate3d(0, 0, 0);
}

.alert-banner.error {
  background: rgba(185, 28, 28, 0.2);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.alert-banner.success {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
  color: #bbf7d0;
}

.member-toast-stack {
  position: fixed;
  top: clamp(80px, 6vw + 36px, 132px);
  right: clamp(1rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
  pointer-events: none;
}

.member-toast-stack .toast-banner {
  width: min(320px, calc(100vw - 2.5rem));
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  font-size: 0.85rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
  pointer-events: auto;
}

@media (max-width: 640px) {
  .member-toast-stack {
    top: clamp(72px, 10vw + 24px, 112px);
    right: 1rem;
  }

  .member-toast-stack .toast-banner {
    width: min(280px, calc(100vw - 2rem));
  }
}

.alert-banner.is-dismissed {
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
}

.portal-note {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.7);
}

.member-reset-card {
  width: min(calc(100% - 2rem), 560px);
  background: rgba(13, 19, 33, 0.88);
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.18);
  box-shadow: 0 32px 72px rgba(12, 17, 29, 0.55);
  padding: 2.4rem 2.3rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.member-reset-card .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.member-reset-card label {
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(248, 250, 252, 0.92);
}

.member-reset-card .input-control {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 17, 29, 0.8);
  padding: 0.95rem 1rem;
  font-size: 1rem;
  color: rgba(241, 245, 249, 0.95);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-reset-card .input-control:focus {
  border-color: rgba(255, 215, 0, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  outline: none;
}

.member-reset-card .input-control::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

.member-reset-card .card-head .headline {
  margin-bottom: 0.8rem;
}

.reset-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.reset-form .btn-primary {
  width: fit-content;
  padding-inline: 1.8rem;
}

.alert-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.member-profile-wrap {
  width: min(calc(100% - 2rem), 980px);
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  overflow-y: auto;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.content-wrap.container-fluid {
  flex: 1;
  width: 100%;
  padding: 1rem clamp(1.2rem, 5vw, 3rem) 1rem;
  display: block;
}

.member-tab-layout {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 3fr 9fr; /* 3:9 ratio */
  gap: clamp(1.25rem, 2vw, 2rem);
  align-items: stretch;
  height: 100%;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.tab-icon-bar {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tab-icon-button {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  background: rgba(13, 19, 33, 0.82);
  color: rgba(253, 224, 113, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tab-icon-button:hover,
.tab-icon-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(13, 15, 25, 0.5);
  outline: none;
}

.tab-icon-button.is-active {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.45), rgba(250, 204, 21, 0.28));
  color: rgba(17, 24, 39, 0.92);
  box-shadow: 0 24px 52px rgba(253, 224, 113, 0.32);
}

.sidebar-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 0.75rem 1.1rem;
  background: rgba(13, 19, 33, 0.82);
  color: rgba(248, 250, 252, 0.85);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  grid-column: 1 / -1;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
.sidebar-toggle.is-active {
  background: rgba(13, 19, 33, 0.92);
  color: #fde68a;
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(13, 15, 25, 0.45);
  outline: none;
}

.sidebar-toggle .toggle-icon {
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
}

.sidebar-toggle .toggle-icon::before,
.sidebar-toggle .toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease;
}

.sidebar-toggle .toggle-icon::before {
  top: 35%;
}

.sidebar-toggle .toggle-icon::after {
  top: 65%;
}

.sidebar-toggle.is-active .toggle-icon::before {
  transform: translateY(4px) rotate(45deg);
}

.sidebar-toggle.is-active .toggle-icon::after {
  transform: translateY(-4px) rotate(-45deg);
}

.tab-sidebar {
  position: sticky;
  top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: start;
  max-width: 280px;
}

.tab-nav {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: rgba(13, 19, 33, 0.82);
  border-radius: 22px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  padding: 1.4rem 1rem;
  box-shadow: 0 24px 52px rgba(13, 15, 25, 0.55);
}

.tab-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 18px;
  padding: 0.95rem 1.15rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sidebar-action i {
  font-size: 1.05rem;
}

.sidebar-action.update {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.35), rgba(250, 204, 21, 0.25));
  color: rgba(17, 24, 39, 0.92);
  box-shadow: 0 22px 48px rgba(253, 224, 113, 0.35);
}

.sidebar-action.update:hover,
.sidebar-action.update:focus-visible {
  transform: translateX(4px);
  box-shadow: 0 28px 60px rgba(253, 224, 113, 0.45);
  outline: none;
}

.sidebar-action.reset {
  background: rgba(13, 19, 33, 0.82);
  color: rgba(226, 232, 240, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 20px 46px rgba(13, 15, 25, 0.5);
}

.sidebar-action.reset:hover,
.sidebar-action.reset:focus-visible {
  background: rgba(13, 19, 33, 0.92);
  color: #fde68a;
  transform: translateX(4px);
  outline: none;
}

.tab-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(226, 232, 240, 0.78);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tab-link i {
  font-size: 1.15rem;
}

.tab-link:hover,
.tab-link:focus-visible {
  border-color: rgba(253, 224, 113, 0.4);
  color: #fde68a;
  transform: translateX(4px);
  outline: none;
}

.tab-link.is-active {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.26), rgba(250, 204, 21, 0.18));
  color: #fde047;
  border-color: rgba(253, 224, 113, 0.32);
  box-shadow: inset 0 0 0 1px rgba(253, 224, 113, 0.24);
}

.tab-panels {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.tab-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.tab-panel.is-active {
  display: flex;
}

.tab-panel[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  /* Fixed viewport on mobile */
  html.member-portal-page,
  html.member-portal-page body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }
  
  /* stack layout for small screens - no tab icon bar needed */
  .member-tab-layout {
    grid-template-columns: 1fr;
    height: 100%;
    padding: 0;
    overflow: hidden;
  }

  .sidebar-toggle {
    display: none;
  }
  
  /* Navbar full width on mobile */
  .member-portal-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    margin: 0;
    border-radius: 0;
    z-index: 3000;
  }
  
  /* Content area fills between navbar and footer */
  html.member-portal-page .content-wrap.container-fluid {
    position: fixed;
    top: var(--nav-height, 56px);
    left: 0;
    right: 0;
    bottom: var(--footer-height, 30px);
    padding: 0 !important;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: auto;
  }
  
  /* Member tab layout fills entire content area */
  html.member-portal-page .member-tab-layout {
    height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  
  /* Tab panels fill all available space */
  html.member-portal-page .tab-panels {
    height: 100%;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  /* Tab panel fills entire content area */
  html.member-portal-page .tab-panel.is-active {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Cards fill height with fixed header */
  html.member-portal-page .commitment-card,
  html.member-portal-page .messages-card.messages-hub {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }
  
  /* Card headers stay fixed */
  html.member-portal-page .commitment-card .card-head {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
  }
  
  /* Only inner content scrolls */
  html.member-portal-page .announcement-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-sidebar {
    position: static;
    display: none;
    background: rgba(13, 19, 33, 0.88);
    border-radius: 20px;
    padding: 1.2rem 1rem;
    box-shadow: 0 22px 48px rgba(13, 15, 25, 0.55);
  }

  .tab-sidebar.is-open {
    display: flex;
  }

  .tab-sidebar.is-open + .tab-icon-bar {
    display: none;
  }

  /* HIDE the tab icon bar on mobile - use hamburger menu instead */
  .tab-icon-bar {
    display: none !important;
  }

  .tab-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-action {
    flex: 1 1 220px;
  }
  
  /* =============================================
     ALL TABS - Fill entire space on mobile
     ============================================= */
  
  /* All tab panels fill the viewport between navbar and footer */
  html.member-portal-page .tab-panel {
    padding: 0.5rem;
    margin: 0;
  }
  
  /* All cards inside tabs should fill available space */
  html.member-portal-page .tab-panel > .commitment-card,
  html.member-portal-page .tab-panel > .messages-card,
  html.member-portal-page .tab-panel > .card,
  html.member-portal-page .tab-panel > div > .card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
  }
  
  /* Card body scrolls */
  html.member-portal-page .tab-panel .card-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Tithe tab - allow scrolling to see chart */
  #tab-tithe.tab-panel.is-active {
    padding: 0.5rem;
    padding-bottom: 1rem;
  }
  
  #tab-tithe .tithe-layout {
    overflow: visible;
    height: auto;
  }
  
  #tab-tithe .tithe-chart-card {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  /* =============================================
     BIBLE TAB MOBILE LAYOUT - Professional Design
     ============================================= */
  
  /* Bible tab fills entire area - NO SCROLL on tab, only inner content */
  #tab-bible.tab-panel.is-active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0;
  }
  
  #tab-bible .bible-reader {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    padding: 0;
    margin: 0;
  }
  
  #tab-bible .bible-content-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Leave space for fixed bottom navigation */
    height: calc(100% - var(--biblebar-height, 50px));
    padding: 0;
    margin: 0;
  }
  
  #tab-bible .bible-content-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    height: 100%;
  }
  
  #tab-bible .bible-content-card .card-head {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    background: rgba(13, 19, 33, 0.95);
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  }
  
  #tab-bible .bible-content-card .card-head h2 {
    font-size: 1rem;
    margin: 0;
  }
  
  /* Bible content scrolls between header and bottom nav */
  #tab-bible .bible-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.25rem;
  }

  /* Bible navigation bar - fixed above footer, not overlapping */
  #tab-bible .bible-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--footer-height, 30px);
    width: 100%;
    max-width: 100%;
    margin: 0;
    z-index: 1200;
    background: rgba(13, 19, 33, 0.98);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  #tab-bible .bible-sidebar-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    box-shadow: none;
  }

  /* Compact inline navigation - no horizontal scroll needed */
  .bible-navigator .bible-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.6fr 0.6fr;
    gap: 0.4rem;
    align-items: center;
    padding: 0;
  }

  .bible-navigator .bible-form-grid .form-field {
    flex: none;
    min-width: 0;
    margin: 0;
  }

  .bible-navigator .bible-form-grid .form-field label {
    display: none;
  }

  .bible-navigator .bible-form-grid .form-field .input-control {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 8px;
    background: rgba(15, 15, 23, 0.9);
  }
  
  .bible-navigator .bible-form-grid .form-field select.input-control {
    padding-right: 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fde68a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  #tab-bible .bible-sidebar-card .bible-actions {
    display: none; /* Hide copy link button on mobile */
  }
  
  /* Bible tools in header - smaller on mobile */
  #tab-bible .bible-tools .icon-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

/* On wider screens keep the bible controls in a right sticky sidebar */
@media (min-width: 961px) {
  #tab-bible .bible-sidebar {
    position: sticky;
    top: 0.5rem;
    pointer-events: auto;
  }
}

/* Ensure right-column layout for Bible reader on desktop */
@media (min-width: 992px) {
  #tab-bible .bible-reader {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 6:3 ratio for Bible (sidebar already has space from tab-sidebar) */
    gap: 2rem;
    height: 100%;
  }
  
  /* Content column fills height */
  #tab-bible .bible-content-column {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }
  
  /* Sidebar stays at top */
  #tab-bible .bible-sidebar {
    align-self: start;
  }
  
  /* Bible content card fills height */
  #tab-bible .bible-content-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }
  
  #tab-bible .bible-content-card .card-head {
    flex-shrink: 0;
  }

  /* Internal scrolling for Bible content on desktop */
  #tab-bible .bible-content {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Internal scrolling for Messages thread across breakpoints */
/* Desktop */
@media (min-width: 992px) {
  #messages-chat .message-thread-log {
    max-height: calc(100vh - 16rem);
    overflow-y: auto;
    padding-right: 0.25rem;
  }

  #messages-chat .message-thread-log::-webkit-scrollbar {
    width: 6px;
  }

  #messages-chat .message-thread-log::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
  }
}

/* Mobile */
@media (max-width: 960px) {
  #messages-chat .message-thread-log {
    max-height: calc(100vh - var(--nav-height, 60px) - var(--tabbar-height, 72px) - 14rem);
    overflow-y: auto;
    /* stylelint-disable-next-line property-no-vendor-prefix */
    -webkit-overflow-scrolling: touch;
  }
}

/* Bible tools and verse share */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(13, 19, 33, 0.82);
  color: rgba(253, 224, 113, 0.92);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(13, 19, 33, 0.92);
  box-shadow: 0 12px 28px rgba(13, 15, 25, 0.45);
  outline: none;
}

.bible-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bible-verse-share {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.commitment-summary-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.announcements-card {
  gap: 1.5rem;
}

.announcement-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.announcement-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.announcement-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.announcement-item.is-upcoming .announcement-status {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.announcement-item.is-today .announcement-status {
  background: rgba(253, 224, 113, 0.32);
  color: #fde047;
}

.announcement-item.is-past .announcement-status {
  background: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.75);
}

.announcement-main h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: rgba(248, 250, 252, 0.95);
}

.announcement-schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  margin: 0;
  font-size: 0.95rem;
}

.announcement-schedule strong {
  font-weight: 600;
  color: rgba(253, 224, 113, 0.95);
}

.announcement-venue {
  margin: 0;
}

.announcement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  font-size: 0.95rem;
}

.announcement-status {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.announcement-committee {
  color: rgba(226, 232, 240, 0.75);
}

.announcement-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
}

.summary-tile {
  background: rgba(13, 19, 33, 0.88);
  border: 1px solid rgba(253, 224, 113, 0.2);
  border-radius: 20px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 26px 58px rgba(13, 15, 25, 0.5);
}

.summary-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.7);
}

.summary-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fde047;
}

.summary-subtext {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.65);
}

.profile-card {
  background: rgba(13, 19, 33, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.18);
  border-radius: 18px;
  padding: 2rem 2.25rem;
  box-shadow: 0 26px 58px rgba(13, 15, 25, 0.55);
}

.profile-card h2 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  color: #fde68a;
}

.profile-details {
  display: grid;
  gap: 0.75rem;
}

.profile-details dt {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-details dd {
  margin: 0;
  color: rgba(226, 232, 240, 0.85);
  font-size: 1.05rem;
}

.member-commitment-grid {
  width: 100%;
  margin: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  flex: 1;
}

.commitment-card {
  background: rgba(13, 19, 33, 0.88);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px;
  padding: 2.1rem 2.2rem;
  box-shadow: 0 28px 60px rgba(13, 15, 25, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  height: 100%;
  overflow: hidden;
}

.commitment-card .card-head {
  flex-shrink: 0;
}

.commitment-card .announcement-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.commitment-card .card-head h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #fde68a;
}

.commitment-card .card-head .subtle {
  margin: 0.35rem 0 0;
}

.commitment-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.2rem 1.4rem;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(253, 224, 113, 0.18);
  box-shadow: inset 0 0 0 1px rgba(253, 224, 113, 0.08);
}

.commitment-block h3 {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(253, 224, 113, 0.92);
}

.commitment-block .metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  font-size: 1rem;
}

.commitment-block .metric span {
  color: rgba(226, 232, 240, 0.72);
}

.commitment-block .metric strong {
  font-size: 1.35rem;
  color: #fde047;
}

.commitment-block .metric-amount {
  font-weight: 700;
  color: #fde047;
}

.commitment-block .btn-primary,
.commitment-block .btn-secondary {
  align-self: flex-start;
}

.commitment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.commitment-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.commitment-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.commitment-list strong {
  font-size: 1rem;
  color: rgba(248, 250, 252, 0.95);
  display: block;
}

.commitment-list span {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.65);
}

.pledge-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pledge-actions .btn-secondary {
  display: inline-flex;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.65);
  color: rgba(226, 232, 240, 0.92);
  padding: 0.45rem 1.05rem;
  font-weight: 600;
}

.pledge-actions .btn-secondary:hover,
.pledge-actions .btn-secondary:focus-visible {
  color: #fde68a;
  border-color: rgba(253, 224, 113, 0.45);
}

.tithe-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 320px;
}

.tithe-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.tithe-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 2fr 1fr; /* Form takes 2 parts, history takes 1 part */
  padding-bottom: 1rem;
}

@media (max-width: 1200px) {
  .tithe-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .tithe-layout {
    grid-template-columns: 1fr;
  }
}

.giving-form {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  align-items: start;
}

@media (max-width: 992px) {
  .giving-form {
    grid-template-columns: 1fr;
  }
}

.form-grid {
  display: grid;
  gap: 1.1rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label,
.form-field legend {
  font-weight: 600;
  color: rgba(226, 232, 240, 0.88);
  letter-spacing: 0.01em;
}

.input-control {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(253, 224, 113, 0.28);
  padding: 0.9rem 1rem;
  background: rgba(15, 15, 23, 0.78);
  color: rgba(248, 250, 252, 0.94);
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.input-control:focus {
  outline: none;
  border-color: rgba(253, 224, 113, 0.75);
  box-shadow: 0 0 0 0.18rem rgba(253, 224, 113, 0.22);
  background: rgba(10, 12, 22, 0.88);
}

.input-control::placeholder {
  color: rgba(226, 232, 240, 0.6);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.giving-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 1.75rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(253, 224, 113, 0.16);
  box-shadow: 0 30px 70px rgba(13, 15, 25, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  gap: 1.25rem;
}

.giving-card .form-grid {
  gap: 1.25rem 1.5rem;
}

.giving-line {
  position: relative;
  padding: 0 2.4rem 0 0;
}

.giving-line.is-hidden {
  display: none;
}

.giving-line label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.78);
}

.inline-currency .input-wrapper {
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

.member-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 26, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  z-index: 1400;
}

.member-modal-overlay.is-visible {
  display: flex;
}

.member-modal-card {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 20px;
  border: 1px solid rgba(253, 224, 113, 0.28);
  box-shadow: 0 32px 70px rgba(10, 12, 20, 0.65);
  max-width: 420px;
  width: 100%;
  padding: 2rem;
  position: relative;
  color: #e2e8f0;
}

.member-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.76);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.member-modal-close:hover,
.member-modal-close:focus {
  color: #facc15;
}

.member-modal-card h2 {
  font-size: 1.4rem;
  margin: 0 0 1rem;
  color: #fef9c3;
  line-height: 1.25;
}

.member-modal-card p {
  margin: 0 0 1rem;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.6;
}

.credentials-list {
  margin: 1rem 0 1.5rem;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.credentials-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(12, 19, 34, 0.78);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.credentials-row:last-child {
  border-bottom: none;
}

.credentials-row dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(248, 250, 252, 0.66);
}

.credentials-row dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fef3c7;
}

.modal-footnote {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.72);
}

.modal-footnote strong {
  color: #facc15;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.modal-actions .btn-primary {
  min-width: 8rem;
}

.modal-alert {
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.inline-currency .prefix {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  font-weight: 700;
  color: rgba(253, 224, 113, 0.92);
}

.inline-currency .input-control {
  padding-left: 2.5rem;
  font-weight: 600;
}

.line-remove {
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.55);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color 0.2s ease, transform 0.2s ease;
  position: absolute;
  top: 0.2rem;
  right: 0;
  padding: 0.3rem;
}

.line-remove:hover,
.line-remove:focus-visible {
  color: #fde68a;
  transform: scale(1.05);
  outline: none;
}

.giving-card .form-actions {
  margin-top: 0.5rem;
}

.giving-divider {
  height: 1px;
  width: 100%;
  background: rgba(148, 163, 184, 0.18);
}

.add-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  border: none;
  background: rgba(248, 250, 252, 0.75);
  color: rgba(30, 41, 59, 0.85);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-line:hover,
.add-line:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(148, 163, 184, 0.35);
  outline: none;
}

.add-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.giving-summary-card {
  background: rgba(248, 215, 55, 0.12);
  border-radius: 24px;
  padding: 1.75rem;
  border: 1px solid rgba(253, 224, 113, 0.35);
  box-shadow: 0 28px 64px rgba(253, 224, 113, 0.26);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.giving-summary-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(17, 24, 39, 0.88);
}

.frequency-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.4rem;
}

.frequency-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  color: rgba(17, 24, 39, 0.65);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.frequency-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.frequency-option.is-selected,
.frequency-option:hover {
  background: rgba(253, 224, 113, 0.9);
  color: rgba(17, 24, 39, 0.95);
  box-shadow: 0 10px 30px rgba(253, 224, 113, 0.35);
}

.giving-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 1.2rem;
}

.giving-total-label {
  color: rgba(17, 24, 39, 0.65);
  font-weight: 600;
}

.giving-total-value {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.92);
}

.giving-status {
  margin-top: -0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: rgba(17, 24, 39, 0.85);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  transition: opacity 0.25s ease;
}

.giving-status[hidden] {
  display: none;
}

.giving-status--info {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.32);
  color: #1d4ed8;
}

.giving-status--success {
  background: rgba(101, 163, 13, 0.18);
  border-color: rgba(132, 204, 22, 0.4);
  color: #3f6212;
}

.giving-status--error {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.48);
  color: #b91c1c;
}

.giving-disclaimer {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(55, 65, 81, 0.65);
}

.giving-history-card {
  background: rgba(13, 19, 33, 0.88);
  border-radius: 22px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  padding: 1.9rem 2rem;
  box-shadow: 0 26px 56px rgba(13, 15, 25, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: rgba(226, 232, 240, 0.85);
}

.history-list strong {
  font-weight: 700;
  color: #fde047;
}

.tithe-chart-card {
  margin-top: 2rem;
}

.pledge-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr; /* Two equal columns */
  padding-bottom: 1rem;
}

@media (max-width: 992px) {
  .pledge-layout {
    grid-template-columns: 1fr;
  }
}

.pledge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pledge-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.pledge-details h3 {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  color: rgba(248, 250, 252, 0.95);
}

.pledge-details p {
  margin: 0;
}

.pledge-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pledge-action-form {
  margin: 0;
}

.pledge-create-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.pledge-create-form .form-grid {
  gap: 1.2rem 1.6rem;
}

/* =============================================
   PROGRAM SCHEDULE TAB STYLES
   ============================================= */

.program-schedule-card {
  max-width: 100%;
}

.program-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}

.program-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(13, 19, 33, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.program-item:hover {
  background: rgba(13, 19, 33, 0.7);
  border-color: rgba(253, 224, 113, 0.25);
}

.program-item.is-today {
  background: rgba(253, 224, 113, 0.08);
  border-color: rgba(253, 224, 113, 0.35);
}

.program-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.2), rgba(250, 204, 21, 0.1));
  border: 1px solid rgba(253, 224, 113, 0.3);
  border-radius: 10px;
  flex-shrink: 0;
}

.program-item.is-today .program-date-badge {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.4), rgba(250, 204, 21, 0.25));
  border-color: rgba(253, 224, 113, 0.5);
}

.program-day {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fde047;
  line-height: 1;
}

.program-month {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(253, 224, 113, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.program-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.program-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.program-day-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.9);
}

.program-day-label.is-today {
  color: #fde047;
}

.program-full-date {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.75);
}

.program-activity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(248, 250, 252, 0.85);
}

.program-activity i {
  color: rgba(253, 224, 113, 0.7);
  font-size: 0.85rem;
}

.program-roles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.program-role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.program-role .role-label {
  color: rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 130px;
}

.program-role .role-label i {
  font-size: 0.75rem;
  color: rgba(253, 224, 113, 0.6);
  width: 14px;
  text-align: center;
}

.program-role .role-name {
  color: rgba(248, 250, 252, 0.9);
  font-weight: 500;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  gap: 1rem;
}

.empty-state i {
  color: rgba(148, 163, 184, 0.4);
}

.empty-state p {
  margin: 0;
  max-width: 280px;
}

@media (max-width: 640px) {
  .program-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
  }
  
  .program-date-badge {
    flex-direction: row;
    width: auto;
    height: auto;
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
  }
  
  .program-day {
    font-size: 1.1rem;
  }
  
  .program-month {
    font-size: 0.65rem;
  }
  
  .program-role {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }
  
  .program-role .role-label {
    min-width: auto;
    font-size: 0.75rem;
  }
  
  .program-role .role-name {
    font-size: 0.85rem;
    padding-left: 1.1rem;
  }
}

@media (max-width: 640px) {
  .giving-card .form-grid {
    grid-template-columns: 1fr;
  }

  .giving-card {
    gap: 1.5rem;
  }

  .giving-summary-card {
    padding: 1.4rem;
  }
}

@media (max-width: 768px) {
  .member-tab-layout {
    grid-template-columns: 1fr;
  }

  .tab-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 1rem;
    justify-content: center;
  }

  .tab-link {
    flex: 1 1 140px;
    justify-content: center;
  }

  .member-commitment-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .commitment-card {
    padding: 1.6rem 1.7rem;
  }

  .commitment-block {
    padding: 1rem 1.1rem;
  }

  .member-messages {
    display: grid;
    gap: 1.5rem;
  }

  .messages-card {
    background: rgba(13, 19, 33, 0.82);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 1.6rem 1.75rem;
    box-shadow: 0 28px 52px rgba(13, 15, 25, 0.55);
  }

  .bible-reader {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    height: 100%;
  }

  @media (min-width: 992px) {
    .bible-reader {
      grid-template-columns: 2fr 1fr; /* 6:3 ratio for content:sidebar */
      align-items: start;
      gap: 2rem;
    }
  }

  .bible-content-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .bible-sidebar {
    width: 100%;
  }

  .bible-sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    align-self: flex-start;
  }

  .tab-panel.is-active .bible-sidebar-card {
    position: sticky;
    top: 5.8rem;
  }

  .bible-card .card-head h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .bible-navigator {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .bible-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .bible-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .bible-status {
    background: rgba(15, 23, 42, 0.62);
    border-radius: 16px;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: rgba(226, 232, 240, 0.84);
    margin-top: 0.35rem;
  }

  .bible-status.is-error {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(254, 226, 226, 0.1);
    color: rgba(254, 226, 226, 0.94);
  }

  .bible-status.is-info {
    border-color: rgba(253, 224, 71, 0.35);
    background: rgba(253, 224, 113, 0.06);
    color: rgba(253, 224, 113, 0.9);
  }

  .bible-status.is-success {
    border-color: rgba(22, 163, 74, 0.4);
    background: rgba(16, 185, 129, 0.12);
    color: rgba(209, 250, 229, 0.95);
  }

  .bible-content {
    margin-top: 1.4rem;
    background: rgba(10, 16, 28, 0.75);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1.4rem 1.6rem;
    color: rgba(236, 239, 244, 0.95);
    font-size: 1.05rem;
    line-height: 1.75;
    position: relative;
  }

  .bible-content h3 {
    margin-top: 0;
    margin-bottom: 0.85rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.96);
  }

  .bible-content .bible-verse {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 5.5rem;
  }

  .bible-content .bible-verse-number {
    min-width: 2.1rem;
    padding: 0.05rem 0.55rem;
    border-radius: 999px;
    background: rgba(253, 224, 113, 0.18);
    color: #fde68a;
    font-weight: 700;
    text-align: center;
    font-size: 0.92rem;
  }

  .bible-content .bible-verse-text {
    flex: 1;
  }

  .bible-help-card .bible-help-list {
    display: grid;
    gap: 0.75rem;
    color: rgba(226, 232, 240, 0.82);
    line-height: 1.65;
  }

  .bible-help-card strong {
    color: rgba(248, 250, 252, 0.92);
  }

  @media (max-width: 720px) {
    .bible-content {
      padding: 1rem 1.05rem;
    }

    .bible-form-grid {
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
  }

  @media (max-width: 960px) {
    .bible-reader {
      grid-template-columns: minmax(0, 1fr);
    }

    .tab-panel.is-active .bible-sidebar-card {
      position: static;
    }
  }


  .messages-card .card-head {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
  }

  .messages-card .card-head h2 {
    margin: 0;
    font-size: 1.35rem;
    color: rgba(248, 250, 252, 0.95);
  }

  .messages-card .card-head .subtle {
    margin: 0;
  }

  .messages-compose-form .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .messages-compose-form textarea {
    min-height: 180px;
    resize: vertical;
  }

  .messages-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  .messages-folder-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
  }

  .messages-folder-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(253, 224, 113, 0.18);
    color: rgba(226, 232, 240, 0.85);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .messages-folder-link:hover,
  .messages-folder-link:focus-visible {
    background: rgba(253, 224, 113, 0.22);
    color: #fde68a;
    transform: translateY(-1px);
    outline: none;
  }

  .messages-folder-link.is-active {
    background: linear-gradient(135deg, rgba(253, 224, 113, 0.28), rgba(250, 204, 21, 0.24));
    color: #111827;
    border-color: rgba(253, 224, 113, 0.35);
    box-shadow: 0 18px 38px rgba(253, 224, 113, 0.28);
  }

  .messages-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(253, 224, 113, 0.18);
    color: #fde68a;
    font-size: 0.82rem;
    font-weight: 700;
  }

  .messages-folder-link.is-active .messages-count-pill {
    background: rgba(17, 24, 39, 0.18);
    color: rgba(17, 24, 39, 0.92);
  }

  .messages-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(148, 163, 184, 0.72);
    font-size: 0.95rem;
  }

  .messages-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .messages-list-item {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(10, 16, 28, 0.78);
    text-decoration: none;
    box-shadow: 0 18px 40px rgba(15, 15, 25, 0.42);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    color: rgba(236, 239, 244, 0.94);
  }

  .messages-list-item:hover,
  .messages-list-item:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(253, 224, 113, 0.32);
    box-shadow: 0 22px 46px rgba(15, 15, 25, 0.5);
    outline: none;
  }

  .messages-list-item.is-unread {
    border-color: rgba(253, 224, 113, 0.38);
    background: rgba(253, 224, 113, 0.08);
  }

  .messages-list-item.is-active {
    border-color: rgba(253, 224, 113, 0.42);
    box-shadow: 0 24px 48px rgba(15, 15, 25, 0.56);
  }

  .bible-verse.is-targeted {
    background: rgba(253, 224, 113, 0.08);
    border-radius: 14px;
    padding: 0.35rem 0.55rem;
    box-shadow: 0 0 0 1px rgba(253, 224, 113, 0.18);
  }

  .messages-list-primary {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
  }

  .messages-list-recipient {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(248, 250, 252, 0.88);
  }

  .messages-unread-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #fde047;
    box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.18);
  }

  .messages-list-subject {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.94);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .messages-list-preview {
    font-size: 0.95rem;
    color: rgba(203, 213, 225, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .messages-list-meta {
    font-size: 0.9rem;
    color: rgba(148, 163, 184, 0.72);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .messages-empty-state {
    padding: 1.4rem 1.2rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px dashed rgba(148, 163, 184, 0.25);
    color: rgba(226, 232, 240, 0.78);
    text-align: center;
  }

  .message-detail {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
  }

  .message-detail-header {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.1rem 1.2rem;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.22);
  }

  .message-detail-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(248, 250, 252, 0.95);
  }

  .message-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: rgba(203, 213, 225, 0.78);
    font-size: 0.95rem;
  }

  .message-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .message-detail-body {
    white-space: pre-line;
    color: rgba(226, 232, 240, 0.9);
    font-size: 1rem;
    line-height: 1.65;
    padding: 0 0.2rem;
  }

  .message-detail-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
  }

  .messages-backlink {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.85);
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .messages-backlink:hover,
  .messages-backlink:focus-visible {
    color: #fde68a;
    transform: translateY(-1px);
    outline: none;
  }

  .messages-secondary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 232, 240, 0.85);
    transition: background 0.2s ease, color 0.2s ease;
  }

  .messages-secondary-link:hover,
  .messages-secondary-link:focus-visible {
    background: rgba(253, 224, 113, 0.2);
    color: #fde68a;
    outline: none;
  }

  .messages-unread-count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.8);
  }

  .messages-unread-count .dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(253, 224, 113, 0.92);
    box-shadow: 0 0 0 4px rgba(253, 224, 113, 0.18);
  }

  .notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .notifications-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .notifications-item .messages-list-primary {
    gap: 0.35rem;
  }

  .notifications-item .messages-list-subject {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }

  .notifications-item .messages-list-preview {
    white-space: normal;
    line-height: 1.55;
  }

  .notifications-item:hover,
  .notifications-item:focus-visible {
    transform: translateY(-2px);
  }

  @media (max-width: 720px) {
    .messages-list-item {
      grid-template-columns: 1fr;
    }

    .messages-toolbar {
      align-items: flex-start;
    }
  }
}
.profile-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.profile-actions a {
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
}

.profile-actions .primary {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #111827;
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.24);
}

.profile-actions .ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(229, 231, 235, 0.9);
  background: transparent;
}

.member-portal-nav {
  position: sticky;
  top: 0;
  z-index: 3000;
  width: min(calc(100% - 2rem), 1140px); /* Container width */
  margin: 0.5rem auto 0;
  padding: 0.85rem 1.5rem;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(13, 19, 33, 0.82);
  border: 1px solid rgba(255, 215, 0, 0.24);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(13, 15, 25, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.member-portal-nav .nav-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.member-portal-nav .nav-home-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(253, 224, 113, 0.24);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.4);
  color: rgba(253, 224, 113, 0.92);
}

.member-portal-nav .nav-home-link.is-active,
.member-portal-nav .nav-home-link:hover,
.member-portal-nav .nav-home-link:focus-visible {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.32), rgba(250, 204, 21, 0.32));
  color: #111827;
  outline: none;
}

.member-portal-nav .nav-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.25), rgba(253, 224, 71, 0.6));
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(253, 224, 71, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.member-portal-nav .nav-avatar.gender-male {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.32), rgba(37, 99, 235, 0.42));
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.2);
}

.member-portal-nav .nav-avatar.gender-female {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.3), rgba(219, 39, 119, 0.42));
  box-shadow: inset 0 0 0 1px rgba(251, 207, 232, 0.24);
}

.member-portal-nav .nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-portal-nav .nav-avatar-fallback {
  width: 100%;
  height: 100%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(252, 231, 243, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  gap: 0.15rem;
}

.member-portal-nav .nav-avatar.gender-male .nav-avatar-fallback {
  color: rgba(191, 219, 254, 0.95);
}

.member-portal-nav .nav-avatar.gender-female .nav-avatar-fallback {
  color: rgba(251, 207, 232, 0.95);
}

.member-portal-nav .nav-avatar-fallback i {
  font-size: 1.35rem;
  line-height: 1;
}

.member-portal-nav .nav-avatar-initials {
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
}

.member-portal-nav .nav-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.member-portal-nav .nav-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fef3c7;
  line-height: 1.3;
}

.member-portal-nav .nav-subtitle {
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.72);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1.3;
}

.member-portal-nav .nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.member-portal-nav .nav-profile-menu-toggle {
  display: none;
}

.member-portal-nav .nav-profile-menu {
  position: relative;
  display: none;
}

.member-portal-nav .nav-profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 220px;
  background: rgba(14, 20, 36, 0.98);
  border: 1px solid rgba(253, 224, 113, 0.28);
  border-radius: 16px;
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.52);
  padding: 0.35rem 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 9999;
}

.member-portal-nav .nav-profile-menu-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.member-portal-nav .nav-profile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.member-portal-nav .nav-profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.88);
  text-align: left;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.member-portal-nav .nav-profile-menu-item i {
  width: 1.05rem;
  text-align: center;
}

.member-portal-nav .nav-profile-menu-item:hover,
.member-portal-nav .nav-profile-menu-item:focus-visible {
  background: rgba(253, 224, 113, 0.18);
  color: #fde68a;
  outline: none;
}

.member-portal-nav .nav-profile-menu-item.is-active {
  background: rgba(253, 224, 113, 0.24);
  color: #fde68a;
}

.member-portal-nav .nav-action-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(253, 224, 113, 0.18);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.36);
  color: rgba(226, 232, 240, 0.76);
}

.member-portal-nav .nav-action-pill:hover,
.member-portal-nav .nav-action-pill:focus-visible {
  color: #fde68a;
  border-color: rgba(253, 224, 113, 0.36);
  outline: none;
}

.member-portal-nav .nav-link,
.member-portal-nav .nav-button {
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-height: 2.75rem;
  gap: 0.35rem;
}

.member-portal-nav .nav-action-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
}

.member-portal-nav .nav-action-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.member-portal-nav .nav-icon-only {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
}

.member-portal-nav .nav-icon-only i {
  font-size: 1.05rem;
}

/* Unread badge on nav icons */
.member-portal-nav .nav-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #ef4444; /* red */
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.9), 0 8px 20px rgba(239, 68, 68, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Live Radio nav icon styles */
.member-portal-nav .nav-live-radio {
  position: relative;
}

.member-portal-nav .nav-live-radio.is-live i {
  color: #ef4444;
  animation: live-radio-pulse 1.5s ease-in-out infinite;
}

.member-portal-nav .nav-live-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.9);
  animation: live-dot-blink 1s ease-in-out infinite;
}

@keyframes live-radio-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes live-dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.member-portal-nav .nav-badge[hidden] {
  display: none !important;
}

.member-portal-nav .nav-link.nav-icon-only {
  position: relative;
}

.member-portal-nav .nav-action-text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.member-portal-nav .nav-link {
  color: rgba(226, 232, 240, 0.75);
  border: 1px solid transparent;
}

.member-portal-nav .nav-link.is-active,
.member-portal-nav .nav-link:hover,
.member-portal-nav .nav-link:focus-visible {
  color: #fde68a;
  border-color: rgba(253, 224, 113, 0.32);
  outline: none;
}

.member-portal-nav .nav-button.primary {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #111827;
  box-shadow: 0 18px 48px rgba(250, 204, 21, 0.28);
}

.member-portal-nav .nav-button.subtle {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(253, 224, 113, 0.92);
  border: 1px solid rgba(253, 224, 113, 0.32);
  box-shadow: 0 14px 32px rgba(253, 224, 113, 0.18);
}

.member-portal-nav .nav-button.subtle:hover,
.member-portal-nav .nav-button.subtle:focus-visible {
  background: rgba(253, 224, 113, 0.18);
  color: #fde68a;
  transform: translateY(-1px);
  outline: none;
}

.member-portal-nav .nav-button.subtle.is-active {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.32), rgba(250, 204, 21, 0.28));
  color: #111827;
  box-shadow: 0 18px 44px rgba(253, 224, 113, 0.28);
}

.member-portal-nav .nav-profile-dropdown {
  position: relative;
  display: inline-flex;
}

.member-portal-nav .nav-avatar-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-portal-nav .nav-avatar-button:focus-visible,
.member-portal-nav .nav-avatar-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(253, 224, 113, 0.32);
  outline: none;
}

.member-portal-nav .nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  min-width: 220px;
  background: rgba(14, 20, 36, 0.98);
  border: 1px solid rgba(253, 224, 113, 0.28);
  border-radius: 16px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.52);
  padding: 0.35rem 0;
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 9999;
  backdrop-filter: blur(12px);
}

.member-portal-nav .nav-profile-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.member-portal-nav .nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.15rem;
  color: rgba(226, 232, 240, 0.88);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.member-portal-nav .nav-dropdown-item i {
  width: 1.05rem;
  text-align: center;
}

.member-portal-nav .nav-dropdown-item:hover,
.member-portal-nav .nav-dropdown-item:focus-visible {
  background: rgba(253, 224, 113, 0.18);
  color: #fde68a;
  outline: none;
}

.member-portal-nav .nav-button.primary:hover,
.member-portal-nav .nav-button.primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 54px rgba(250, 204, 21, 0.32);
  outline: none;
}

.member-portal-nav .nav-button.primary.is-active {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 16px 44px rgba(250, 204, 21, 0.25);
}

.member-portal-nav .nav-button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(229, 231, 235, 0.9);
  background: transparent;
}

.member-portal-nav .nav-button.ghost:hover,
.member-portal-nav .nav-button.ghost:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.95);
  outline: none;
}

.member-portal-nav .nav-button.ghost:active {
  transform: translateY(1px);
}

@media (max-width: 600px) {
  .member-login-card {
    padding: 1.85rem 1.6rem;
  }

  .profile-card {
    padding: 1.75rem 1.6rem;
  }
}

@media (max-width: 960px) {
  .member-portal-nav .nav-profile-menu-toggle {
    display: inline-flex;
  }

  .member-portal-nav .nav-profile-menu {
    display: inline-flex;
  }
}

@media (max-width: 860px) {
  .member-portal-nav {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.2rem;
    width: 100%;
    gap: 1rem;
  }

  .member-portal-nav .nav-branding {
    gap: 0.75rem;
  }

  .member-portal-nav .nav-copy {
    display: none;
  }

  .member-portal-nav .nav-actions {
    justify-content: flex-end;
    gap: 0.6rem;
  }
}

.member-messages {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  height: 100%;
  overflow: hidden;
}

.messages-card {
  background: rgba(13, 19, 33, 0.82);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 1.75rem 1.9rem;
  box-shadow: 0 28px 52px rgba(13, 15, 25, 0.55);
  flex: 1;
  overflow: hidden;
}

.messages-hub {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.9rem 2rem;
  height: 100%;
  overflow: hidden;
}

.messages-hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.messages-hub-title {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.messages-hub-header h2 {
  margin: 0;
  font-size: 1.45rem;
  color: rgba(248, 250, 252, 0.95);
}

.messages-hub-header .subtle {
  margin: 0;
  color: rgba(203, 213, 225, 0.78);
}

.messages-compose-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.32), rgba(250, 204, 21, 0.2));
  color: #111827;
  border: 1px solid rgba(253, 224, 113, 0.38);
  box-shadow: 0 18px 36px rgba(253, 224, 113, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.messages-compose-cta:hover,
.messages-compose-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(253, 224, 113, 0.3);
  outline: none;
}

.messages-compose-cta i {
  font-size: 0.95rem;
}

.messages-hub-body {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: stretch;
  gap: 1.5rem;
  flex: 1;
  overflow: hidden;
}

.messages-panel {
  background: rgba(10, 16, 28, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 22px;
  padding: 1.4rem 1.55rem;
  box-shadow: 0 22px 48px rgba(13, 15, 25, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.messages-panel-thread {
  gap: 1.5rem;
}

.messages-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.messages-list-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(248, 250, 252, 0.92);
}

.messages-list-header .messages-unread-count {
  margin-left: auto;
}

.messages-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(253, 224, 113, 0.24);
  background: rgba(13, 19, 33, 0.82);
  color: rgba(253, 224, 113, 0.9);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.messages-search-toggle:hover,
.messages-search-toggle:focus-visible,
.messages-search-toggle[aria-expanded="true"] {
  transform: translateY(-1px);
  background: rgba(13, 19, 33, 0.92);
  box-shadow: 0 14px 32px rgba(13, 15, 25, 0.45);
  outline: none;
}

.messages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.messages-folder-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(253, 224, 113, 0.12);
}

.messages-folder-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.messages-folder-link:hover,
.messages-folder-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(253, 224, 113, 0.22);
  color: #fde68a;
  outline: none;
}

.messages-folder-link.is-active {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.28), rgba(250, 204, 21, 0.22));
  color: #111827;
  box-shadow: 0 18px 34px rgba(253, 224, 113, 0.28);
}

.messages-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(253, 224, 113, 0.18);
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 700;
}

.messages-unread-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.78);
}

.messages-unread-count .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(253, 224, 113, 0.9);
  box-shadow: 0 0 0 4px rgba(253, 224, 113, 0.18);
}

.messages-search {
  margin: 0.85rem 0 1rem;
}
.messages-search select {
  width: 100%;
}

.messages-search .select2-container {
  width: 100% !important;
}

.member-select2-selection {
  border-radius: 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  background: rgba(10, 16, 28, 0.82) !important;
  min-height: 48px;
  height: 48px;
  display: flex !important;
  align-items: center;
  padding: 0 0.95rem !important;
  box-shadow: 0 18px 40px rgba(15, 15, 25, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-select2-selection .select2-selection__rendered {
  padding: 0 !important;
  color: rgba(236, 239, 244, 0.92) !important;
  font-weight: 500;
}

.member-select2-selection .select2-selection__placeholder {
  color: rgba(148, 163, 184, 0.75) !important;
}

.member-select2-selection .select2-selection__arrow {
  height: 100% !important;
  margin-right: 0.35rem;
}

.member-select2-selection:hover,
.member-select2-selection:focus-within {
  border-color: rgba(253, 224, 113, 0.35) !important;
  box-shadow: 0 22px 48px rgba(15, 15, 25, 0.52);
}

.member-select2-dropdown {
  background: rgba(10, 16, 28, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px !important;
  box-shadow: 0 24px 52px rgba(15, 15, 25, 0.62);
  color: rgba(236, 239, 244, 0.9);
  overflow: hidden;
}

.member-select2-dropdown .select2-results__option {
  padding: 0.75rem 1rem;
  font-weight: 500;
}

.member-select2-dropdown .select2-results__option--highlighted[aria-selected] {
  background: rgba(253, 224, 113, 0.18);
  color: #fde68a;
}

.member-select2-dropdown .select2-results__option[aria-selected="true"] {
  background: rgba(253, 224, 113, 0.12);
  color: #fde68a;
}

.messages-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.messages-thread-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(10, 16, 28, 0.78);
  text-decoration: none;
  color: rgba(236, 239, 244, 0.95);
  box-shadow: 0 18px 40px rgba(15, 15, 25, 0.45);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
  width: 100%;
}

.messages-thread-item:hover,
.messages-thread-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(253, 224, 113, 0.32);
  box-shadow: 0 22px 46px rgba(15, 15, 25, 0.5);
  outline: none;
}

.messages-thread-item.is-unread,
.messages-thread-item.has-unread {
  border-color: rgba(253, 224, 113, 0.4);
  background: rgba(253, 224, 113, 0.12);
}

.messages-thread-item.is-active {
  border-color: rgba(253, 224, 113, 0.45);
  box-shadow: 0 26px 52px rgba(15, 15, 25, 0.56);
}

.messages-thread-avatar {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.22), rgba(250, 204, 21, 0.46));
  color: #111827;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(253, 224, 113, 0.25);
  flex-shrink: 0;
}

.messages-thread-content {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.messages-thread-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
}

.messages-thread-name {
  font-weight: 600;
  color: rgba(248, 250, 252, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-thread-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(148, 163, 184, 0.78);
  font-size: 0.82rem;
  white-space: nowrap;
}

.messages-thread-unread {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 0 4px rgba(253, 224, 71, 0.2);
}

.messages-thread-time {
  color: inherit;
}

.messages-thread-subject {
  font-size: 0.98rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-thread-preview {
  font-size: 0.92rem;
  color: rgba(203, 213, 225, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-notifications-card {
  background: rgba(13, 19, 33, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 18px 40px rgba(13, 15, 25, 0.45);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.messages-notifications-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.messages-notifications-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(248, 250, 252, 0.92);
}

.messages-notifications-head .subtle {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(203, 213, 225, 0.75);
}

.messages-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.messages-notification-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(10, 16, 28, 0.75);
  text-decoration: none;
  color: rgba(236, 239, 244, 0.92);
  box-shadow: 0 14px 32px rgba(10, 12, 22, 0.45);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.messages-notification-item:hover,
.messages-notification-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(253, 224, 113, 0.32);
  box-shadow: 0 20px 40px rgba(10, 12, 22, 0.52);
  outline: none;
}

.messages-notification-item.is-unread {
  border-color: rgba(253, 224, 113, 0.38);
  background: rgba(253, 224, 113, 0.1);
}

.messages-notification-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.9);
}

.messages-notification-body {
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.78);
  line-height: 1.55;
}

.messages-notification-meta {
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.72);
}

.message-thread-card {
  background: rgba(10, 16, 28, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 1.6rem 1.75rem;
  box-shadow: 0 24px 52px rgba(13, 15, 25, 0.52);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.message-thread-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.message-thread-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.messages-backlink {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.85);
  transition: color 0.18s ease, transform 0.18s ease;
}

.messages-backlink:hover,
.messages-backlink:focus-visible {
  color: #fde68a;
  transform: translateY(-1px);
  outline: none;
}

.messages-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.85);
  transition: background 0.18s ease, color 0.18s ease;
}

.messages-secondary-link:hover,
.messages-secondary-link:focus-visible {
  background: rgba(253, 224, 113, 0.2);
  color: #fde68a;
  outline: none;
}

.message-thread-context {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: rgba(203, 213, 225, 0.76);
}

.message-thread-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(253, 224, 113, 0.18);
  color: rgba(253, 224, 113, 0.95);
}

.message-thread-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
}

.message-thread-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.96);
  line-height: 1.3;
}

.message-thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  font-size: 0.95rem;
  color: rgba(203, 213, 225, 0.8);
}

.message-thread-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.message-thread-meta i {
  color: rgba(253, 224, 113, 0.82);
}

.message-thread-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-thread-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  /* Prevent horizontal scroll on long content; bubbles should wrap */
  overflow-x: hidden;
}

.message-thread-entry {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: min(100%, 560px);
}

.message-thread-entry.is-incoming {
  align-self: flex-start;
  align-items: flex-start;
}

.message-thread-entry.is-outgoing {
  align-self: flex-end;
  align-items: flex-end;
}

.message-thread-bubble {
  position: relative;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.55;
  box-shadow: 0 12px 28px rgba(10, 12, 22, 0.45);
  /* Wrap long words/URLs and constrain width so it grows vertically */
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  max-width: 100%;
}

/* Ensure links inside bubbles also wrap nicely */
.message-thread-bubble a {
  word-break: break-all;
}

.message-thread-bubble::before {
  content: "";
  position: absolute;
  top: -0.4rem;
  left: 1.8rem;
  width: 0.9rem;
  height: 0.9rem;
  background: inherit;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  transform: rotate(45deg);
}

.message-thread-bubble.is-incoming {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
}

.message-thread-entry.is-outgoing .message-thread-bubble,
.message-thread-bubble.is-outgoing {
  background: linear-gradient(135deg, rgba(253, 224, 113, 0.28), rgba(250, 204, 21, 0.2));
  border-color: rgba(253, 224, 113, 0.38);
  color: rgba(17, 24, 39, 0.9);
  box-shadow: 0 24px 48px rgba(253, 224, 113, 0.32);
}

.message-thread-entry.is-outgoing .message-thread-bubble::before,
.message-thread-bubble.is-outgoing::before {
  display: none;
}

.message-thread-entry.is-outgoing .message-thread-bubble::after,
.message-thread-bubble.is-outgoing::after {
  content: "";
  position: absolute;
  top: -0.4rem;
  right: 1.8rem;
  width: 0.9rem;
  height: 0.9rem;
  background: inherit;
  border-right: 1px solid rgba(253, 224, 113, 0.38);
  border-top: 1px solid rgba(253, 224, 113, 0.38);
  transform: rotate(45deg);
}

.message-thread-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.75);
}

.message-thread-entry.is-outgoing .message-thread-stamp {
  color: rgba(253, 224, 113, 0.82);
  justify-content: flex-end;
  align-self: flex-end;
}

.message-thread-status {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.message-thread-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2.4rem 1.4rem;
  border-radius: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.78);
  text-align: center;
}

.message-thread-placeholder i {
  font-size: 1.6rem;
  color: rgba(253, 224, 113, 0.8);
}

.message-thread-placeholder.is-empty-state {
  min-height: 260px;
}

.message-thread-reply {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.message-thread-reply textarea {
  min-height: 64px;
  resize: vertical;
}

.message-thread-reply .form-actions {
  justify-content: flex-end;
}

.messages-compose-card {
  background: rgba(14, 20, 36, 0.82);
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 22px 48px rgba(10, 12, 22, 0.52);
  padding: 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.messages-compose-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.messages-compose-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: rgba(248, 250, 252, 0.95);
}

.messages-compose-header .subtle {
  margin: 0;
  color: rgba(203, 213, 225, 0.78);
}

.messages-compose-card .form-actions {
  justify-content: flex-end;
}

.messages-empty-state {
  padding: 1.35rem 1.2rem;
  border-radius: 20px;
  background: rgba(14, 20, 36, 0.68);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.78);
  text-align: center;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

@media (min-width: 992px) {
  .messages-panel-list {
    position: sticky;
    top: 6rem;
  }

  .messages-thread-list {
    max-height: calc(100vh - 16rem);
    overflow-y: auto;
    padding-right: 0.25rem;
  }

  .messages-thread-list::-webkit-scrollbar {
    width: 6px;
  }

  .messages-thread-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
  }
}

@media (max-width: 1024px) {
  .messages-hub-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .messages-panel-list {
    position: static;
  }
}

@media (max-width: 720px) {
  .messages-card {
    padding: 1.5rem 1.55rem;
  }

  .messages-hub {
    padding: 1.6rem;
  }

  .messages-panel {
    padding: 1.15rem 1.2rem;
  }

  .messages-thread-item {
    align-items: center;
    gap: 0.75rem;
  }

  .messages-thread-avatar {
    width: 2.3rem;
    height: 2.3rem;
  }

  .message-thread-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .messages-compose-cta {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 960px) {
  #tab-bible {
    padding-bottom: 15rem;
  }

  #tab-bible .bible-sidebar {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    max-width: calc(100% - 2rem);
    margin: 0 auto;
    z-index: 120;
    pointer-events: none;
  }

  #tab-bible .bible-sidebar-card {
    pointer-events: auto;
    box-shadow: 0 24px 58px rgba(13, 15, 25, 0.68);
  }

  #tab-bible .bible-sidebar-card .bible-actions {
    justify-content: space-between;
  }
}
/* ============================================================
   Facebook Messenger Style - Messages Section
   ============================================================ */

/* Main container */
.messages-hub.fb-messenger-style {
  padding: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.messages-hub.fb-messenger-style .messages-hub-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1;
  overflow: hidden;
}

/* Single panel mode - show one panel at a time */
.messages-hub.fb-messenger-style .messages-hub-body.fb-single-panel {
  display: block;
  flex: 1;
  overflow: hidden;
}

.messages-hub.fb-messenger-style .fb-single-panel .messages-panel-list,
.messages-hub.fb-messenger-style .fb-single-panel .fb-thread-panel {
  display: none;
  height: 100%;
  overflow: hidden;
}

.messages-hub.fb-messenger-style .fb-single-panel .messages-panel-list.fb-panel-active,
.messages-hub.fb-messenger-style .fb-single-panel .fb-thread-panel.fb-panel-active {
  display: flex;
  flex-direction: column;
}

/* ---- Chat List Sidebar (Left Panel) ---- */
.messages-hub.fb-messenger-style .messages-panel-list {
  background: #fff;
  border-right: 1px solid #e4e6eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* In single panel mode, no border needed */
.messages-hub.fb-messenger-style .fb-single-panel .messages-panel-list {
  border-right: none;
}

/* Header with "Chats" title */
.fb-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px 16px;
}

.fb-chat-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #050505;
}

.fb-chat-actions {
  display: flex;
  gap: 8px;
}

.fb-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f2f5;
  color: #050505;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.fb-icon-btn:hover {
  background: #e4e6eb;
}

.fb-icon-btn i {
  font-size: 16px;
}

/* Search box */
.fb-search-container {
  padding: 8px 16px 12px 16px;
}

.fb-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #f0f2f5;
  border-radius: 20px;
  overflow: hidden;
}

.fb-search-icon {
  position: absolute;
  left: 12px;
  color: #65676b;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.fb-search-input {
  width: 100%;
  border: none !important;
  background: transparent !important;
  padding: 8px 12px 8px 38px !important;
  font-size: 15px;
  color: #050505;
}

.fb-search-input::placeholder {
  color: #65676b;
}

/* Select2 styling for search */
.fb-search-box .select2-container {
  width: 100% !important;
}

.fb-search-box .select2-container--default .select2-selection--single {
  background: transparent !important;
  border: none !important;
  height: 36px;
  padding-left: 28px;
}

.fb-search-box .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #050505;
  line-height: 36px;
  padding-left: 0;
  font-size: 15px;
}

.fb-search-box .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #65676b;
}

.fb-search-box .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}

/* Filter tabs (All / Unread) */
.fb-filter-tabs {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px 12px;
}

.fb-filter-tab {
  padding: 8px 12px;
  border-radius: 18px;
  border: none;
  background: transparent;
  color: #050505;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.fb-filter-tab:hover {
  background: #f0f2f5;
}

.fb-filter-tab.is-active {
  background: #e7f3ff;
  color: #0866ff;
}

.fb-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e41e3f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Chat list */
.fb-chat-list {
  list-style: none;
  margin: 0;
  padding: 0 8px;
  overflow-y: auto;
  flex: 1;
}

.fb-chat-list li {
  margin: 0;
}

/* Individual chat item */
.fb-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.fb-chat-item:hover {
  background: #f0f2f5;
}

.fb-chat-item.is-active {
  background: #e7f3ff;
}

.fb-chat-item.has-unread .fb-chat-name {
  font-weight: 700;
}

.fb-chat-item.has-unread .fb-chat-preview {
  color: #050505;
  font-weight: 600;
}

/* Avatar in chat list */
.fb-chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0866ff 0%, #00c6ff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}

.fb-chat-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fb-chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fb-chat-name {
  font-size: 15px;
  font-weight: 500;
  color: #050505;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-chat-time {
  font-size: 12px;
  color: #65676b;
  flex-shrink: 0;
}

.fb-chat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fb-chat-preview {
  font-size: 13px;
  color: #65676b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.fb-chat-unread-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0866ff;
  flex-shrink: 0;
}

/* Empty state */
.fb-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #65676b;
}

.fb-empty-icon {
  font-size: 48px;
  color: #bcc0c4;
  margin-bottom: 16px;
}

.fb-empty-state p {
  margin: 0 0 8px 0;
  font-size: 17px;
  font-weight: 500;
  color: #050505;
}

.fb-empty-hint {
  font-size: 14px;
  color: #65676b;
}

/* ---- Thread Panel (Right Panel) ---- */
.fb-thread-panel {
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Thread card */
.fb-thread-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  height: 100%;
}

.fb-thread-card.is-hidden {
  display: none;
}

/* Thread header */
.fb-thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e6eb;
  background: #fff;
}

/* Back button */
.fb-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0866ff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  margin-right: 8px;
  flex-shrink: 0;
}

.fb-back-btn:hover {
  background: #f0f2f5;
}

.fb-back-btn i {
  font-size: 18px;
}

.fb-thread-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fb-thread-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0866ff 0%, #00c6ff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.fb-thread-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.fb-thread-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #050505;
}

.fb-thread-status-text {
  font-size: 12px;
  color: #65676b;
}

.fb-thread-actions {
  display: flex;
  gap: 8px;
}

/* Empty thread state */
.fb-thread-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.fb-thread-empty[hidden] {
  display: none;
}

.fb-thread-empty-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0866ff 0%, #00c6ff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.fb-thread-empty-name {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: #050505;
}

.fb-thread-empty-hint {
  font-size: 14px;
  color: #65676b;
}

/* Messages log */
.fb-thread-log {
  list-style: none;
  margin: 0;
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fb-thread-log[hidden] {
  display: none;
}

.fb-thread-entry {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.fb-thread-entry.is-incoming {
  align-self: flex-start;
  align-items: flex-start;
}

.fb-thread-entry.is-outgoing {
  align-self: flex-end;
  align-items: flex-end;
}

/* Message bubbles */
.fb-thread-bubble {
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}

.fb-thread-bubble.is-incoming {
  background: #f0f0f0;
  color: #050505;
  border-bottom-left-radius: 4px;
}

.fb-thread-bubble.is-outgoing {
  background: #0866ff;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.fb-thread-stamp {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #65676b;
  margin-top: 2px;
  padding: 0 4px;
}

.fb-thread-read-status {
  color: #0866ff;
}

/* Reply form */
.fb-thread-reply {
  padding: 12px 16px;
  border-top: 1px solid #e4e6eb;
  background: #fff;
}

.fb-reply-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #f0f2f5;
  border-radius: 20px;
  padding: 4px 4px 4px 12px;
}

.fb-reply-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  resize: none;
  padding: 8px 0 !important;
  font-size: 15px;
  line-height: 1.4;
  min-height: 36px;
  max-height: 120px;
  color: #050505;
  outline: none;
}

.fb-reply-input::placeholder {
  color: #65676b;
}

.fb-reply-input:disabled {
  cursor: not-allowed;
}

.fb-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0866ff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.fb-send-btn:hover:not(:disabled) {
  background: rgba(8, 102, 255, 0.1);
}

.fb-send-btn:disabled {
  color: #bcc0c4;
  cursor: not-allowed;
}

.fb-send-btn i {
  font-size: 18px;
}

/* ---- Responsive Design ---- */
@media (max-width: 768px) {
  /* Messages hub fills available space on mobile */
  html.member-portal-page #tab-messages {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }
  
  html.member-portal-page #tab-messages .member-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  html.member-portal-page .messages-hub.fb-messenger-style {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100dvh - var(--nav-height, 70px) - var(--footer-height, 50px) - 2rem);
  }

  .messages-hub.fb-messenger-style .messages-hub-body {
    grid-template-columns: 1fr;
    min-height: auto;
    max-height: none;
    flex: 1;
    overflow: hidden;
  }
  
  .messages-hub.fb-messenger-style .fb-single-panel .messages-panel-list,
  .messages-hub.fb-messenger-style .fb-single-panel .fb-thread-panel {
    min-height: auto;
    max-height: 100%;
    height: 100%;
  }
  
  /* Chat list scrolls */
  .fb-chat-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Thread log scrolls */
  .fb-thread-log {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .fb-chat-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .fb-chat-name {
    font-size: 14px;
  }
  
  .fb-chat-preview {
    font-size: 12px;
  }
  
  .fb-thread-entry {
    max-width: 85%;
  }
}

/* Select2 styling for Facebook Messenger search */
.fb-search-container .select2-container {
  width: 100% !important;
}

.fb-search-container .select2-container--default .select2-selection--single {
  background: transparent !important;
  border: none !important;
  height: 36px;
  padding-left: 28px;
}

.fb-search-container .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #050505;
  line-height: 36px;
  padding-left: 0;
  font-size: 15px;
}

.fb-search-container .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #65676b;
}

.fb-search-container .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}

.fb-search-container .select2-container--default .select2-selection--single .select2-selection__clear {
  color: #65676b;
  font-size: 18px;
  margin-right: 4px;
}

/* Select2 dropdown styling */
.member-select2-dropdown {
  border: 1px solid #e4e6eb !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
  margin-top: 4px !important;
}

.member-select2-dropdown .select2-search--dropdown {
  padding: 8px !important;
}

.member-select2-dropdown .select2-search--dropdown .select2-search__field {
  border: 1px solid #e4e6eb !important;
  border-radius: 20px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
}

.member-select2-dropdown .select2-results__option {
  padding: 10px 16px !important;
  font-size: 14px !important;
  color: #050505 !important;
}

.member-select2-dropdown .select2-results__option--highlighted {
  background: #e7f3ff !important;
  color: #050505 !important;
}

.member-select2-dropdown .select2-results__option--selected {
  background: #f0f2f5 !important;
}

/* =====================================================
   LIVE RADIO MEMBER PORTAL STYLES
   ===================================================== */

/* Make Live Radio tab panel scrollable */
#tab-liveradio.tab-panel {
  overflow-y: auto;
  overflow-x: hidden;
}

#tab-liveradio.tab-panel.is-active {
  display: flex;
  flex-direction: column;
}

.live-radio-member-container {
  flex: 1;
  padding: 1rem;
  padding-bottom: 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.live-radio-card {
  background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
  border-radius: 16px;
  padding: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.live-radio-card .card-head h2 {
  color: #FFD700;
  margin: 0 0 8px 0;
  font-size: 1.5rem;
}

.live-radio-card .card-head h2 i {
  margin-right: 10px;
}

.live-radio-card .card-head .subtle {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-size: 0.9rem;
}

.live-radio-player {
  margin-top: 24px;
}

.radio-status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.radio-icon-wrap {
  width: 60px;
  height: 60px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-icon {
  font-size: 28px;
  color: #FFD700;
  animation: icon-pulse 2s ease-in-out infinite;
}

.radio-icon.live {
  color: #dc3545;
  animation: icon-live-pulse 1s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes icon-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.radio-info h3 {
  color: #fff;
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.radio-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.offline {
  background: rgba(108, 117, 125, 0.3);
  color: #adb5bd;
}

.status-badge.live {
  background: rgba(220, 53, 69, 0.3);
  color: #ff6b6b;
  animation: status-glow 1.5s ease-in-out infinite;
}

@keyframes status-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.broadcast-details {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.detail-label i {
  margin-right: 6px;
  color: #FFD700;
}

.detail-value {
  color: #fff;
  font-weight: 600;
}

.visualizer-container {
  height: 50px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  margin: 20px 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.visualizer-bar {
  width: 5px;
  background: linear-gradient(to top, #FFD700, #ffae42);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.radio-controls {
  margin-top: 20px;
  text-align: center;
}

.offline-message {
  padding: 30px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.offline-message i {
  font-size: 3rem;
  margin-bottom: 12px;
  color: #FFD700;
  opacity: 0.5;
}

.offline-message p {
  margin: 0 0 8px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.offline-message small {
  font-size: 0.85rem;
}

.btn-listen-member {
  background: linear-gradient(135deg, #28a745, #218838);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-listen-member:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-listen-member:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.player-active-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-stop-member {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-stop-member:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.volume-control-member {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.volume-slider-member {
  width: 100px;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.volume-slider-member::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFD700;
  cursor: pointer;
}

.public-radio-link {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.btn-public-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #FFD700;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 16px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.btn-public-radio:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: #FFD700;
  color: #FFD700;
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .live-radio-card {
    padding: 16px;
  }
  
  .radio-status-card {
    flex-direction: column;
    text-align: center;
  }
  
  .player-active-controls {
    flex-direction: column;
    gap: 12px;
  }
  
  /* Ensure Live Radio tab scrolls on mobile */
  #tab-liveradio.tab-panel {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  
  .live-radio-member-container {
    min-height: auto;
    padding-bottom: 100px;
  }
}

/* Private Past Broadcasts */
.private-past-broadcasts {
  margin-top: 16px;
  max-height: calc(100vh - 350px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 5px;
}

/* Custom scrollbar for private broadcasts */
.private-past-broadcasts::-webkit-scrollbar {
  width: 6px;
}

.private-past-broadcasts::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.private-past-broadcasts::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.3);
  border-radius: 3px;
}

.private-past-broadcasts::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.5);
}

.private-past-broadcasts .loading-broadcasts {
  text-align: center;
  padding: 30px;
  color: rgba(255, 255, 255, 0.5);
}

.private-past-broadcasts .loading-broadcasts i {
  font-size: 2rem;
  color: #FFD700;
  margin-bottom: 10px;
}

.private-past-broadcasts .loading-broadcasts p {
  margin: 0;
}

.private-past-broadcasts .no-broadcasts {
  text-align: center;
  padding: 30px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.private-past-broadcasts .no-broadcasts i {
  font-size: 2.5rem;
  color: #FFD700;
  opacity: 0.5;
  margin-bottom: 12px;
}

.private-past-broadcasts .no-broadcasts p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

.private-broadcast-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  transition: all 0.2s ease;
}

.private-broadcast-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 215, 0, 0.25);
}

.private-broadcast-item:last-child {
  margin-bottom: 0;
}

.private-broadcast-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.private-broadcast-title {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}

.private-broadcast-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.private-broadcast-meta i {
  color: #FFD700;
  margin-right: 5px;
}

.private-broadcast-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn-private-play {
  background: linear-gradient(135deg, #FFD700, #f4c430);
  color: #1a1a2e;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-private-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-private-play.playing {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
}

.btn-private-download {
  background: transparent;
  border: 1px solid #17a2b8;
  color: #17a2b8;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-private-download:hover {
  background: #17a2b8;
  color: #fff;
  transform: translateY(-2px);
}

.btn-private-download:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-private-share {
  background: transparent;
  border: 1px solid #28a745;
  color: #28a745;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-private-share:hover {
  background: #28a745;
  color: #fff;
  transform: translateY(-2px);
}

.btn-private-delete {
  background: transparent;
  border: 1px solid #dc3545;
  color: #dc3545;
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-private-delete:hover {
  background: #dc3545;
  color: #fff;
  transform: translateY(-2px);
}

.private-broadcast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.private-player-progress {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.private-progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.private-progress-fill {
  height: 100%;
  background: #FFD700;
  width: 0%;
  transition: width 0.1s linear;
}

.private-time-display {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 5px;
}

