/* Church Portal High-Fidelity UI Styling System (style.css) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Dynamic Sky Blue / Teal Palette */
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-light: rgba(var(--primary-rgb), 0.08);
  --primary-light-alpha: rgba(var(--primary-rgb), 0.08);
  --primary-rgb: 14, 165, 233;
  --accent-color: #fb7185; /* Rose Gold */
  
  --bg-color: #f8fafc; /* Slate canvas */
  --bg-card: rgba(255, 255, 255, 0.72); /* Glassmorphic card */
  --bg-card-solid: #ffffff;
  --border-color: rgba(226, 232, 240, 0.8);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --sidebar-bg: rgba(255, 255, 255, 0.65);
  --sidebar-text: #334155;
  --sidebar-hover: rgba(var(--primary-rgb), 0.04);
  --sidebar-active-bg: var(--primary-gradient);
  --sidebar-active-text: #ffffff;
  
  --success-color: #10b981; /* Neon Emerald */
  --danger-color: #f43f5e;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;

  --shadow-sm: 0 2px 8px rgba(var(--primary-rgb), 0.02);
  --shadow-md: 0 8px 32px 0 rgba(31, 38, 135, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 16px 40px rgba(var(--primary-rgb), 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);

  --font-arabic: 'Cairo', sans-serif;
  --font-english: 'Outfit', sans-serif;
  
  --border-radius-sm: 8px;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  
  --backdrop-blur: blur(20px);
  --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  --primary-glow: 0 0 15px rgba(var(--primary-rgb), 0.25);
  
  /* Member Profile Modal Theme Custom Colors */
  --profile-modal-bg: #ffffff;
  --profile-modal-header-bg: #ffffff;
  --profile-modal-tabs-bg: #ffffff;
  --profile-modal-footer-bg: #ffffff;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-color: #080c14; /* Canvas background space grey */
  --bg-card: rgba(21, 28, 44, 0.62); /* Floating glass card dark */
  --bg-card-solid: #151c2c;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --sidebar-bg: rgba(21, 28, 44, 0.55);
  --sidebar-text: #cbd5e1;
  --sidebar-hover: rgba(255, 255, 255, 0.03);
  --sidebar-active-bg: var(--primary-gradient);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.4), 0 0 40px rgba(var(--primary-rgb), 0.04);

  /* Member Profile Modal Theme Overrides for Dark Mode */
  --profile-modal-bg: var(--bg-card);
  --profile-modal-header-bg: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--primary-rgb), 0.01) 100%);
  --profile-modal-tabs-bg: var(--sidebar-hover);
  --profile-modal-footer-bg: var(--sidebar-hover);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(251, 113, 133, 0.04) 0px, transparent 50%);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] body {
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(251, 113, 133, 0.05) 0px, transparent 50%);
}

body.rtl {
  direction: rtl;
  font-family: var(--font-arabic);
}

body.ltr {
  direction: ltr;
  font-family: var(--font-english);
}

/* ------------------ LAYOUT WRAPPERS ------------------ */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-color);
  padding: 16px;
  gap: 16px;
}

/* ------------------ SIDEBAR STYLES ------------------ */
.ch-sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.3s ease, width 0.3s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.ltr .ch-sidebar {
  border: 1px solid var(--border-color);
}
body.rtl .ch-sidebar {
  border: 1px solid var(--border-color);
}

/* Sidebar Branding Header */
.sidebar-brand {
  height: 60px;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-weight: 800;
  font-size: 1.35rem;
  gap: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
}

.sidebar-brand i {
  font-size: 1.5rem;
}

/* User profile header inside sidebar */
.sidebar-profile {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(0,0,0,0.01);
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-color);
}

.profile-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.profile-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Active Group dropdown container */
.sidebar-group-select {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
}

.group-dropdown-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.group-dropdown-wrap i.prefix-icon {
  position: absolute;
  left: 10px;
  color: var(--primary-color);
  font-size: 1.1rem;
}
body.rtl .group-dropdown-wrap i.prefix-icon {
  left: auto;
  right: 10px;
}

.group-select-el {
  width: 100%;
  padding: 10px 10px 10px 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  appearance: none;
}
body.rtl .group-select-el {
  padding: 10px 32px 10px 10px;
}

.group-dropdown-wrap::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-secondary);
}
body.rtl .group-dropdown-wrap::after {
  right: auto;
  left: 10px;
}

/* Scrollable sidebar menus list */
.sidebar-menu-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px 8px;
}

.menu-category-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 12px 12px 6px;
  letter-spacing: 0.5px;
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: start;
}
body.rtl .menu-item {
  text-align: right;
}

.menu-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  color: var(--text-secondary);
}

.menu-item:hover {
  background-color: var(--sidebar-hover);
  color: var(--text-primary);
}

.menu-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
}

.menu-item.active i {
  color: #ffffff;
}

/* ------------------ HEADER CONTROL BAR ------------------ */
.main-viewport {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ch-header {
  height: 60px;
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-toggle-btn {
  display: none;
  font-size: 1.3rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.header-search-wrap {
  position: relative;
  width: 280px;
}

.header-search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
body.rtl .header-search-wrap i {
  left: auto;
  right: 12px;
}

.header-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease;
}
body.rtl .header-search-input {
  padding: 8px 36px 8px 12px;
}

.header-search-input:focus {
  border-color: var(--primary-color);
  background-color: var(--bg-card);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Role Selector View switcher dropdown */
.role-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-select-dropdown {
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.role-select-dropdown:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* ------------------ MAIN CONTENT AREA ------------------ */
.ch-content {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  background-color: transparent;
}

/* Section Title block */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title-area h2 {
  font-size: 1.4rem;
  font-weight: 800;
}

.section-title-area p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ------------------ KPI TILES GRID ------------------ */
.kpi-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.kpi-tile-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  text-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

body.rtl .kpi-tile-card {
  text-align: right;
}
body.ltr .kpi-tile-card {
  text-align: left;
}

.kpi-tile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.2);
}

.kpi-tile-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  transition: height 0.3s ease;
}

.kpi-tile-card:nth-child(1)::after { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.kpi-tile-card:nth-child(2)::after { background: linear-gradient(90deg, #8b5cf6, #d946ef); }
.kpi-tile-card:nth-child(3)::after { background: linear-gradient(90deg, #10b981, #059669); }
.kpi-tile-card:nth-child(4)::after { background: linear-gradient(90deg, #fb7185, #f43f5e); }
.kpi-tile-card:nth-child(5)::after { background: linear-gradient(90deg, #f43f5e, #be123c); }
.kpi-tile-card:nth-child(6)::after { background: linear-gradient(90deg, #f59e0b, #d97706); }
.kpi-tile-card:nth-child(7)::after { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.kpi-tile-card:nth-child(8)::after { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.kpi-tile-card:nth-child(9)::after { background: linear-gradient(90deg, #f43f5e, #8b5cf6); }
.kpi-tile-card:nth-child(10)::after { background: linear-gradient(90deg, #06b6d4, #0891b2); }
.kpi-tile-card:nth-child(11)::after { background: linear-gradient(90deg, #14b8a6, #0f766e); }
.kpi-tile-card:nth-child(12)::after { background: linear-gradient(90deg, #a855f7, #7e22ce); }

.kpi-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

.kpi-icon {
  font-size: 1.25rem;
  padding: 8px;
  border-radius: 10px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.kpi-tile-card:nth-child(1) .kpi-icon { background-color: rgba(99, 102, 241, 0.1); color: #6366f1; }
.kpi-tile-card:nth-child(2) .kpi-icon { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.kpi-tile-card:nth-child(3) .kpi-icon { background-color: rgba(16, 185, 129, 0.1); color: #10b981; }
.kpi-tile-card:nth-child(4) .kpi-icon { background-color: rgba(251, 113, 133, 0.1); color: #fb7185; }
.kpi-tile-card:nth-child(5) .kpi-icon { background-color: rgba(244, 63, 94, 0.1); color: #f43f5e; }
.kpi-tile-card:nth-child(6) .kpi-icon { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.kpi-tile-card:nth-child(7) .kpi-icon { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.kpi-tile-card:nth-child(8) .kpi-icon { background-color: rgba(236, 72, 153, 0.1); color: #ec4899; }
.kpi-tile-card:nth-child(9) .kpi-icon { background-color: rgba(244, 63, 94, 0.1); color: #f43f5e; }
.kpi-tile-card:nth-child(10) .kpi-icon { background-color: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.kpi-tile-card:nth-child(11) .kpi-icon { background-color: rgba(20, 184, 166, 0.1); color: #14b8a6; }
.kpi-tile-card:nth-child(12) .kpi-icon { background-color: rgba(168, 85, 247, 0.1); color: #a855f7; }

.kpi-tile-card:hover .kpi-icon {
  transform: scale(1.1);
}

.kpi-tile-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-tile-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 6px 0;
}

.kpi-tile-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ------------------ DASHBOARD SPLIT GRID ------------------ */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 1025px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

@media (max-width: 1024px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
}

.widget-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.widget-title {
  font-size: 1rem;
  font-weight: 800;
}

.widget-title i {
  color: var(--primary-color);
  margin-inline-end: 8px;
}

/* Today's Events Timeline list */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 18px;
  border-radius: var(--border-radius-lg);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-inline-start: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover {
  transform: translateX(-6px) translateY(-2px);
  box-shadow: var(--shadow-md);
  border-inline-start-color: var(--accent-color);
}

body.rtl .timeline-item:hover {
  transform: translateX(6px) translateY(-2px);
}

.timeline-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.timeline-body-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-footer-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin-top: 4px;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
}

.checkin-action-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  border: 1px solid var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.checkin-action-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* Activity grid for attendance past 30 days */
.activity-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.activity-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.activity-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-title {
  font-weight: 700;
  font-size: 0.88rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.activity-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.activity-stats span.count {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-color);
}

.activity-checkin-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.activity-checkin-indicator:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* ------------------ CHAT PANEL INTERFACE ------------------ */
.chat-window {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.chat-header-bar {
  padding: 14px 20px;
  background-color: var(--sidebar-hover);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-bar h3 {
  font-size: 1rem;
  font-weight: 800;
}

.chat-messages-box {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  position: relative;
}

.chat-bubble.received {
  background-color: var(--bg-color);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-bubble.sent {
  background-color: var(--primary-color);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-sender-name {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.chat-bubble.sent .chat-sender-name {
  color: rgba(255,255,255,0.8);
}

.chat-time-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: end;
  margin-top: 4px;
}

.chat-bubble.sent .chat-time-tag {
  color: rgba(255,255,255,0.7);
}

.chat-input-bar {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.chat-input-el {
  flex-grow: 1;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-primary);
  outline: none;
  font-size: 0.9rem;
}

.chat-input-el:focus {
  border-color: var(--primary-color);
  background-color: var(--bg-card);
}

/* ------------------ ACCOUNTING MODULE ------------------ */
.accounting-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.accounting-kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.accounting-kpi-card.income {
  border-inline-start: 4px solid var(--success-color);
}

.accounting-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.accounting-kpi-card.income .accounting-kpi-icon {
  background-color: rgba(72,187,120,0.1);
  color: var(--success-color);
}

/* ------------------ MOBILE RESPONSIVENESS ------------------ */
/* ------------------ MOBILE RESPONSIVENESS ------------------ */
@media (max-width: 768px) {
  .menu-toggle-btn {
    display: block;
  }
  
  .ch-sidebar {
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 16px;
    height: calc(100% - 32px);
    transform: translateX(-280px);
    box-shadow: var(--shadow-lg);
    z-index: 9999 !important;
  }
  
  body.rtl .ch-sidebar {
    left: auto;
    right: 16px;
    transform: translateX(280px);
  }

  body.rtl .ch-sidebar.mobile-open,
  body.ltr .ch-sidebar.mobile-open,
  .ch-sidebar.mobile-open {
    transform: translateX(0) !important;
  }
  
  .header-search-wrap {
    display: none;
  }
  
  .ch-content {
    padding: 16px;
  }

  /* Stack section titles and actions on mobile */
  .section-header-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
  }
  
  .section-title-area {
    width: 100% !important;
    text-align: start !important;
  }

  .header-action-buttons {
    flex-wrap: wrap !important;
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  /* Make action buttons scale or fit nicely */
  .header-action-buttons .btn-action {
    flex: 1 1 auto !important;
    justify-content: center !important;
  }

  .people-actions-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .bulk-actions-group {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .bulk-actions-group .btn-action {
    flex: 1 1 auto !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }

  .search-input-wrap {
    width: 100% !important;
  }

  /* Force exactly 2 cards per row on mobile */
  .kpi-widgets-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .people-card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .member-profile-card {
    padding: 16px 10px !important;
    min-height: auto !important;
  }

  .events-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .lodging-rooms-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Header spacing and sizing polish */
  .ch-header {
    padding: 0 12px !important;
    gap: 10px !important;
  }

  .header-right {
    gap: 8px !important;
  }

  .coptic-date-badge {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
    gap: 4px !important;
  }

  .role-select-dropdown {
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }

  .btn-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 576px) {
  .kpi-tile-card {
    padding: 12px 10px !important;
  }

  .kpi-tile-title {
    font-size: 0.75rem !important;
  }

  .kpi-tile-value {
    font-size: 1.4rem !important;
  }

  .kpi-tile-footer {
    font-size: 0.65rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .coptic-date-badge {
    display: none !important;
  }
}

/* Tab View Switcher Visibility */
.view-section {
  display: none;
}
.view-section.active {
  display: block;
}

/* ------------------ WELCOME BANNER CARD ------------------ */
.welcome-banner-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d717a 100%);
  color: #ffffff;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(19, 158, 171, 0.15);
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .welcome-banner-card {
  background: linear-gradient(135deg, #145960 0%, #092e32 100%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.welcome-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.welcome-text-area h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.welcome-text-area p {
  font-size: 0.92rem;
  opacity: 0.9;
  max-width: 600px;
  margin-bottom: 12px;
}

.welcome-date-string {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

.welcome-icon-area {
  font-size: 4rem;
  opacity: 0.15;
  transform: rotate(-15deg);
  transition: transform 0.5s ease;
}

.welcome-banner-card:hover .welcome-icon-area {
  transform: rotate(0deg) scale(1.1);
}

.welcome-banner-card::before, .welcome-banner-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.welcome-banner-card::before {
  width: 200px;
  height: 200px;
  top: -80px;
  right: -50px;
}

.welcome-banner-card::after {
  width: 120px;
  height: 120px;
  bottom: -40px;
  right: 150px;
}

/* ------------------ ADDITIONAL HIGH-FIDELITY CLASSES ------------------ */
.section-title-icon {
  margin-inline-end: 10px;
  color: var(--primary-color);
  filter: drop-shadow(0 2px 8px rgba(var(--primary-rgb), 0.3));
}

.coptic-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.06);
  color: var(--primary-color);
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid rgba(99, 102, 241, 0.18);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}
.coptic-date-badge:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--sidebar-hover);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-icon:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-color: rgba(99, 102, 241, 0.3);
  transform: scale(1.08) translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-action {
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  background-color: var(--sidebar-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

/* Responsive Table Styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}
body.rtl .custom-table { text-align: right; }
body.ltr .custom-table { text-align: left; }

.custom-table th, .custom-table td {
  padding: 14px 18px;
}
.custom-table th {
  background-color: var(--sidebar-hover);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}
.custom-table td {
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: background-color 0.15s ease;
}
.custom-table tbody tr:last-child td {
  border-bottom: none;
}
.custom-table tbody tr:hover td {
  background-color: rgba(var(--primary-rgb), 0.02);
}

/* Forms & Dialog Inputs */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-card-solid);
  color: var(--text-primary);
  outline: none;
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: var(--primary-glow);
  background-color: var(--bg-card-solid);
}

/* Global Custom Checkbox overrides */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--bg-card-solid);
  position: relative;
}
input[type="checkbox"]:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}
input[type="checkbox"]:checked {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: var(--primary-glow);
}
input[type="checkbox"]:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: white;
  font-size: 0.6rem;
  display: block;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Event Creation Dialog Custom Form Layouts */
.event-title-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}
@media (max-width: 768px) {
  .event-title-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.event-datetime-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}
.event-datetime-grid.multi-day {
  grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
}
@media (max-width: 768px) {
  .event-datetime-grid,
  .event-datetime-grid.multi-day {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.collapsible-toggle-row {
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
  transition: all 0.2s ease;
}
.collapsible-toggle-row:hover {
  border-color: rgba(var(--primary-rgb), 0.25);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.03);
}
.collapsible-toggle-row.expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
  border-color: rgba(var(--primary-rgb), 0.2);
}
.collapsible-toggle-row .row-label-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.collapsible-toggle-row .row-label-area i {
  color: var(--primary-color);
  font-size: 1.1rem;
}
.collapsible-toggle-row .row-action-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.collapsible-toggle-row .chevron-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  font-size: 0.85rem;
  display: none; /* Hide redundant arrow when switch is active */
}
.collapsible-toggle-row.expanded .chevron-arrow {
  transform: rotate(180deg);
}

.collapsible-toggle-content {
  display: none;
  border: 1px solid var(--border-color);
  border-top: none;
  background-color: var(--bg-card-solid);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.2s ease-out;
}
.collapsible-toggle-content.expanded {
  display: block;
  border-color: rgba(var(--primary-rgb), 0.2);
}

/* Color dot styling inside selects */
.calendar-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.calendar-select-wrapper select {
  padding-left: 32px !important;
}
body.rtl .calendar-select-wrapper select {
  padding-left: 14px !important;
  padding-right: 32px !important;
}
.calendar-color-dot {
  position: absolute;
  left: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  z-index: 5;
  pointer-events: none;
  transition: background-color 0.25s ease;
}
body.rtl .calendar-color-dot {
  left: auto;
  right: 12px;
}

/* Church Card Components */
.church-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

/* Bookings widgets grid */
.booking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.booking-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}
.booking-item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), 0.2);
}
.booking-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.booking-header h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}
.booking-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-danger {
  background-color: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.2);
}
.badge-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Modals & Dialog overlays */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease-out;
}
.dialog-overlay.active {
  display: flex;
}
.dialog-box {
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 650px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  margin: auto;
}
.dialog-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-card-solid);
}
.dialog-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.dialog-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
.dialog-close:hover {
  color: var(--danger-color);
}
.dialog-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}
.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-card-solid);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ------------------ WIDGETS MANAGER POPUP ------------------ */
.manage-widgets-wrap {
  position: relative;
  display: inline-block;
}

.widgets-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 500;
  display: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slideUp 0.2s ease-out;
}
body.rtl .widgets-dropdown-menu {
  right: auto;
  left: 0;
}

.widgets-dropdown-menu.active {
  display: block;
}

.widgets-menu-header {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.widgets-checkboxes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.widget-checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--text-primary);
  user-select: none;
  text-align: start;
}
body.rtl .widget-checkbox-item {
  text-align: right;
  flex-direction: row-reverse;
}

.widget-checkbox-item input {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

/* ==================== PEOPLE TAB DOUBLE-PANE LAYOUT ==================== */
.people-viewport-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  position: relative;
  width: 100%;
}

.people-table-pane {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.people-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bulk-actions-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  width: 320px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

body.rtl .search-input-wrap .search-icon {
  left: auto;
  right: 12px;
}

.search-input-wrap input.people-keyword-search {
  padding-left: 36px;
}

body.rtl .search-input-wrap input.people-keyword-search {
  padding-left: 12px;
  padding-right: 36px;
}

/* Custom check box styling via appearance: none */
input[type="checkbox"].row-select-checkbox,
#people-select-all-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--bg-card-solid);
  position: relative;
}

input[type="checkbox"].row-select-checkbox:hover,
#people-select-all-checkbox:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input[type="checkbox"].row-select-checkbox:checked,
#people-select-all-checkbox:checked {
  background: var(--primary-gradient);
  border-color: transparent;
  box-shadow: var(--primary-glow);
}

input[type="checkbox"].row-select-checkbox:checked::after,
#people-select-all-checkbox:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: white;
  font-size: 0.65rem;
  display: block;
}

/* Premium pill gradients for action buttons */
.btn-sms-gradient {
  background: rgba(244, 63, 94, 0.05);
  border: 1px solid rgba(244, 63, 94, 0.15);
  color: var(--danger-color);
  border-radius: 30px !important;
}

.btn-sms-gradient:hover {
  background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  color: white !important;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
  transform: translateY(-2px);
}

.btn-email-gradient {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--primary-color);
  border-radius: 30px !important;
}

.btn-email-gradient:hover {
  background: var(--primary-gradient);
  color: white !important;
  box-shadow: var(--primary-glow);
  transform: translateY(-2px);
}

.btn-push-gradient {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: var(--success-color);
  border-radius: 30px !important;
}

.btn-push-gradient:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

.btn-export-gradient {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.15);
  color: var(--warning-color);
  border-radius: 30px !important;
}

.btn-export-gradient:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transform: translateY(-2px);
}

.btn-more-gradient {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 30px !important;
}

.btn-more-gradient:hover {
  background: var(--text-secondary);
  color: white !important;
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.btn-adv-search-gradient {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--primary-color);
  border-radius: 30px !important;
}

.btn-adv-search-gradient:hover {
  background: var(--primary-gradient);
  color: white !important;
  box-shadow: var(--primary-glow);
  transform: translateY(-2px);
}

/* Dropdown styling for bulk actions */
.dropdown-action-wrap {
  position: relative;
  display: inline-block;
}

.more-actions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
  width: 620px;
  max-width: 90vw;
  padding: 22px;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  
  /* Grid layout for 6 categories */
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
}

body.rtl .more-actions-dropdown {
  right: auto;
  left: 0;
}

.more-actions-dropdown.active {
  display: grid;
}

/* Category column */
.actions-dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Category header */
.actions-dropdown-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.actions-dropdown-header i {
  color: var(--primary-color);
  font-size: 0.9rem;
}

body.rtl .actions-dropdown-header {
  flex-direction: row-reverse;
}

.actions-dropdown-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Action button items */
.more-actions-dropdown button.dropdown-item {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: rgba(var(--primary-rgb), 0.03);
  border-radius: var(--border-radius-sm);
  text-align: start;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.more-actions-dropdown button.dropdown-item i {
  color: var(--primary-color);
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
  transition: transform 0.2s;
}

.more-actions-dropdown button.dropdown-item.text-danger i {
  color: var(--danger-color);
}

body.rtl .more-actions-dropdown button.dropdown-item {
  text-align: right;
  flex-direction: row-reverse;
}

.more-actions-dropdown button.dropdown-item:hover {
  background-color: var(--primary-light);
  border-color: rgba(var(--primary-rgb), 0.15);
  transform: translateX(4px);
}

.more-actions-dropdown button.dropdown-item:hover i {
  transform: scale(1.15);
}

body.rtl .more-actions-dropdown button.dropdown-item:hover {
  transform: translateX(-4px);
}

/* Responsive configurations */
@media (max-width: 992px) {
  .more-actions-dropdown {
    width: 420px;
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
    gap: 16px 20px;
  }
}

@media (max-width: 576px) {
  .more-actions-dropdown {
    width: 260px;
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 12px;
  }
}

/* Pagination Footer */
.people-pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-size-select {
  width: auto;
  padding: 4px 8px;
  height: 32px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-card-solid);
  color: var(--text-primary);
}

.btn-pagination-nav {
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card-solid);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pagination-nav:hover:not(:disabled) {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-pagination-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* People photo custom table styling */
.people-photo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.people-photo-cell img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-color);
}

.people-photo-cell .avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Advanced Search Top Panel Styles */
.advanced-search-top-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 800px;
  opacity: 1;
  overflow: visible;
}

.advanced-search-top-panel.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0 !important;
  border-top: 0;
  border-bottom: 0;
  overflow: hidden;
}

.top-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 16px;
}

@media (max-width: 992px) {
  .top-panel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .top-panel-grid {
    grid-template-columns: 1fr;
  }
}

.top-panel-col {
  display: flex;
  flex-direction: column;
}

.filter-group-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.top-panel-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

/* View Mode Toggle Pill */
.view-toggle-wrap {
  display: inline-flex;
  background-color: var(--sidebar-hover);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}

.btn-toggle-view {
  border: none;
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  font-size: 0.9rem;
}

.btn-toggle-view:hover {
  color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.05);
}

.btn-toggle-view.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* Glassmorphic Cards View Directory */
.people-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.member-profile-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  min-height: 280px;
}

.member-profile-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.member-profile-card.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-md);
  background-color: rgba(var(--primary-rgb), 0.02);
}

.member-profile-card .card-select-checkbox {
  position: absolute;
  top: 15px;
  right: 15px;
  margin: 0;
  z-index: 10;
}

body.rtl .member-profile-card .card-select-checkbox {
  right: auto;
  left: 15px;
}

.card-avatar-wrap {
  position: relative;
  margin-bottom: 16px;
}

.card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.member-profile-card:hover .card-avatar {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.card-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.member-profile-card:hover .card-avatar-placeholder {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.gender-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  border: 2px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
}

body.rtl .gender-badge {
  right: auto;
  left: 0;
}

.gender-badge.male {
  background-color: #3b82f6;
}

.gender-badge.female {
  background-color: #ec4899;
}

.card-member-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-member-name-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-deacon-badge {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  display: inline-block;
}

.card-member-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.info-item i {
  color: var(--text-muted);
  width: 14px;
}

.card-groups-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 16px;
  width: 100%;
}

.card-group-tag {
  background-color: var(--sidebar-hover);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.card-actions {
  margin-top: auto;
  width: 100%;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.card-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--sidebar-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.card-action-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-color: rgba(99, 102, 241, 0.3);
  transform: scale(1.1);
}

.card-action-btn.btn-call:hover {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.card-action-btn.btn-whatsapp:hover {
  background-color: rgba(37, 211, 102, 0.1);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.3);
}


.saved-search-selector-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.saved-search-selector-wrap select {
  flex-grow: 1;
}

.btn-delete-saved {
  background: none;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-delete-saved:hover {
  background-color: var(--danger-color);
  color: white;
}

/* Accordion controls with custom visual enhancements */
.search-accordions-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.015);
  transition: all 0.25s;
}

.accordion-item:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.02);
}

.accordion-header {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--sidebar-hover);
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: start;
  font-family: inherit;
  transition: background-color 0.2s;
}

body.rtl .accordion-header {
  text-align: right;
  flex-direction: row-reverse;
}

.accordion-header:hover {
  background-color: rgba(99, 102, 241, 0.05);
}

.accordion-header .arrow-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.accordion-header.active .arrow-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 12px;
  display: none;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.accordion-panel.open {
  display: block;
}

/* Radio buttons gender group */
.gender-radio-group {
  display: flex;
  gap: 16px;
  padding: 4px 0;
}

.gender-radio-group .radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-primary);
  user-select: none;
}

.gender-radio-group .radio-label input {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Sidebar action footer */
.sidebar-action-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.sidebar-action-footer .btn-action {
  width: 100%;
  justify-content: center;
}

/* Custom elegant scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Responsive side view */
@media (max-width: 992px) {
  .people-viewport-layout {
    flex-direction: column;
  }
  .advanced-search-pane {
    width: 100%;
    position: static;
    max-height: none;
  }
}

/* ==================== CHURCH PORTAL COMPETITIONS STYLING ==================== */

.competitions-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  margin-top: 10px;
}

@media (max-width: 992px) {
  .competitions-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Question Creator Type Sections */
.question-type-section {
  background-color: var(--bg-color);
  padding: 15px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-bottom: 15px;
}

/* Leaderboard Trophies & Medallions */
.badge-gold {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #fff;
  border: none;
  font-weight: bold;
}
.badge-silver {
  background: linear-gradient(135deg, #c0c0c0, #a9a9a9);
  color: #fff;
  border: none;
  font-weight: bold;
}
.badge-bronze {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
  color: #fff;
  border: none;
  font-weight: bold;
}

.leaderboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

.leaderboard-rank.rank-1 {
  background: rgba(255, 215, 0, 0.15);
  color: #d4af37;
  border: 1.5px solid #d4af37;
}

.leaderboard-rank.rank-2 {
  background: rgba(192, 192, 192, 0.15);
  color: #8a9597;
  border: 1.5px solid #8a9597;
}

.leaderboard-rank.rank-3 {
  background: rgba(205, 127, 50, 0.15);
  color: #b87333;
  border: 1.5px solid #b87333;
}

/* Progress items for stats */
.stats-progress-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stats-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Member Side: Quiz Card & Elements */
.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.quiz-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.quiz-question-day {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-color);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.quiz-question-text {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* MCQ Options Interaction List */
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-option-btn {
  background: var(--bg-color);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: start;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.03);
  transform: translateY(-1px);
}

.quiz-option-btn.selected {
  border-color: var(--primary-color);
  background-color: rgba(var(--primary-rgb), 0.08);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.quiz-option-btn.correct {
  border-color: var(--success-color);
  background-color: rgba(16, 185, 129, 0.08);
}

.quiz-option-btn.incorrect {
  border-color: var(--danger-color);
  background-color: rgba(244, 63, 94, 0.08);
}

.option-letter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 800;
}

.quiz-option-btn.selected .option-letter-badge {
  background: var(--primary-color);
  color: #fff;
}
.quiz-option-btn.correct .option-letter-badge {
  background: var(--success-color);
  color: #fff;
}
.quiz-option-btn.incorrect .option-letter-badge {
  background: var(--danger-color);
  color: #fff;
}

/* Matching UI Layout Style */
.matching-pair-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.matching-pair-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--bg-color);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  border: 1.5px solid var(--border-color);
  transition: all 0.2s ease;
}

.matching-pair-row.correct {
  border-color: var(--success-color);
  background-color: rgba(16, 185, 129, 0.04);
}

.matching-pair-row.incorrect {
  border-color: var(--danger-color);
  background-color: rgba(244, 63, 94, 0.04);
}

.matching-left-item {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.matching-left-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
}

.matching-right-select {
  min-width: 180px;
  max-width: 250px;
}

.matching-pair-row.correct .matching-right-select {
  border-color: var(--success-color);
  color: var(--success-color);
  font-weight: bold;
}

.matching-pair-row.incorrect .matching-right-select {
  border-color: var(--danger-color);
  color: var(--danger-color);
  font-weight: bold;
}

/* Locked Days states styling */
.locked-quiz-card {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.locked-quiz-icon {
  font-size: 2.2rem;
  color: var(--text-muted);
  opacity: 0.6;
  animation: pulse-lock 2s infinite ease-in-out;
}

@keyframes pulse-lock {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 0.9; }
  100% { transform: scale(1); opacity: 0.6; }
}

/* Score display tag */
.quiz-feedback-score {
  font-size: 1rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quiz-feedback-score.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.quiz-feedback-score.fail {
  background: rgba(244, 63, 94, 0.1);
  color: var(--danger-color);
}

/* Sub-tab navigation buttons in Competitions Detail */
.comp-tabs-nav {
  margin-bottom: 20px;
}
.btn-tab-nav {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-tab-nav:hover {
  color: var(--primary-color);
}
.btn-tab-nav.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

body.rtl .rtl-rotate {
  transform: rotate(180deg);
  display: inline-block;
}

/* ==================== COLLAPSIBLE SIDEBAR MINISTRIES ==================== */
.sidebar-ministries-section {
  padding: 15px 12px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.02);
}
.ministries-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--border-radius);
  transition: background-color 0.2s;
  user-select: none;
}
.ministries-header:hover {
  background-color: var(--sidebar-hover);
}
.ministry-avatar-sm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}
.ministries-header-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ministry-header-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: start;
}
body.rtl .ministry-header-name {
  text-align: right;
}
.church-progress-bar {
  width: 90%;
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}
.church-progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 2px;
}
.toggle-arrow {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}
.toggle-arrow.collapsed {
  transform: rotate(-180deg);
}
body.rtl .toggle-arrow.collapsed {
  transform: rotate(180deg);
}
.sidebar-ministries-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
.sidebar-ministries-list.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
}
.sidebar-ministry-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: start;
}
body.rtl .sidebar-ministry-item {
  text-align: right;
}
.sidebar-ministry-item:hover {
  background-color: var(--sidebar-hover);
  color: var(--primary-color);
}
.sidebar-ministry-item.active {
  background-color: rgba(19, 158, 171, 0.1);
  color: var(--primary-color);
}
.sidebar-open-all-link {
  margin-top: 6px;
  display: flex;
  justify-content: flex-start;
}
body.rtl .sidebar-open-all-link {
  justify-content: flex-end;
}
.open-all-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
}
.open-all-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ==================== MINISTRIES MANAGEMENT PAGE ==================== */
.ministries-tree-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.ministries-tree-table th {
  background-color: var(--sidebar-hover);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  text-align: start;
}
body.rtl .ministries-tree-table th {
  text-align: right;
}
.ministries-tree-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-primary);
  vertical-align: middle;
}
.ministries-tree-table tr:last-child td {
  border-bottom: none;
}
.ministries-tree-table tr:hover {
  background-color: rgba(0, 0, 0, 0.01);
}
.ministry-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.indent-1 { padding-inline-start: 24px !important; }
.indent-2 { padding-inline-start: 48px !important; }
.indent-3 { padding-inline-start: 72px !important; }

/* Avatar selector layout */
.avatar-selector-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.avatar-preview-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-md);
}
.avatar-presets-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.avatar-preset-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.15s, border-color 0.15s;
}
.avatar-preset-img:hover {
  transform: scale(1.15);
  border-color: var(--primary-color);
}

/* Add Ministry Modal Overhaul Styles */
.ministry-avatar-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.ministry-avatar-circle {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: var(--sidebar-hover);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible; /* to allow badge to stand out */
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}
.ministry-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.ministry-avatar-circle .ministry-avatar-icon {
  font-size: 3.5rem;
  color: var(--text-muted);
}
.avatar-edit-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--bg-card);
  transition: transform 0.15s;
}
.avatar-edit-badge:hover {
  transform: scale(1.1);
}

/* Visibility Callout Alert Box */
.visibility-info-box {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  background-color: rgba(14, 165, 233, 0.08);
  border-inline-start: 4px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 0.85rem;
  line-height: 1.4;
  display: none; /* toggled via JS */
  gap: 10px;
  align-items: flex-start;
  text-align: start;
}
.visibility-info-box.active {
  display: flex;
}
.visibility-info-box i {
  margin-top: 2px;
  font-size: 1rem;
}

/* Feature Toggle Card */
.features-toggle-row {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  width: 100%;
}
.feature-toggle-card {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-toggle-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}
.feature-toggle-card .feature-label-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: start;
}

/* Switch Toggle Element */
.switch-container {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.switch-input:checked + .switch-slider {
  background-color: var(--primary-color);
}
.switch-input:checked + .switch-slider:before {
  transform: translateX(20px);
}
body.rtl .switch-slider:before {
  left: auto;
  right: 3px;
}
body.rtl .switch-input:checked + .switch-slider:before {
  transform: translateX(-20px);
}

/* Collapsible nested group items styling in sidebar */
.sidebar-group-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar-group-item:hover {
  background-color: var(--sidebar-hover);
  color: var(--primary-color) !important;
}
.sidebar-group-item.active {
  background-color: var(--sidebar-hover);
  color: var(--primary-color) !important;
  font-weight: 700;
}

/* ==================== MEMBER PROFILE MODAL STYLES ==================== */
.member-profile-dialog {
  max-width: 900px !important;
  width: 95%;
  background: var(--profile-modal-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 0 !important;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.profile-modal-header {
  padding: 20px 24px;
  background: var(--profile-modal-header-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.profile-header-title-area h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-meta-row {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-close-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}
.profile-close-btn:hover {
  color: var(--danger-color);
}

.profile-modal-tabs {
  display: flex;
  background-color: var(--profile-modal-tabs-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  overflow-x: auto;
  gap: 8px;
}

.profile-tab-btn {
  padding: 14px 18px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.profile-tab-btn:hover {
  color: var(--primary-color);
}

.profile-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.profile-modal-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 400px;
}

@media (max-width: 768px) {
  .profile-modal-body {
    grid-template-columns: 1fr;
  }
  .profile-body-left {
    border-inline-end: none !important;
    border-bottom: 1px solid var(--border-color);
  }
}

.profile-body-left {
  padding: 24px;
  border-inline-end: 1px solid var(--border-color);
  background-color: var(--bg-card-solid);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  background-color: var(--sidebar-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

.profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
}

.profile-card-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}
.profile-detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-detail-item strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.profile-body-right {
  padding: 24px;
  overflow-y: auto;
  max-height: 480px;
}

.profile-pane {
  display: none;
}
.profile-pane.active {
  display: block;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-box {
  background-color: var(--bg-card-solid);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}
.detail-box:hover {
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: var(--shadow-sm);
}

.box-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.detail-box strong {
  font-size: 0.92rem;
  color: var(--text-primary);
  word-break: break-all;
}

.profile-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-note-item {
  background-color: var(--sidebar-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  position: relative;
}

.note-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.note-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.btn-delete-note {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}
.btn-delete-note:hover {
  color: var(--danger-color);
}

.profile-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background-color: var(--profile-modal-footer-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cursor-pointer {
  cursor: pointer;
}
.cursor-pointer:hover {
  color: var(--primary-color) !important;
}

/* Communication Actions & Badges styles */
.profile-quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: center;
  width: 100%;
}
.action-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 0.95rem;
  transition: transform 0.2s, filter 0.2s;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.action-circle-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}
.action-circle-btn.call {
  background-color: var(--primary-color);
}
.action-circle-btn.whatsapp {
  background-color: #25D366;
}
.action-circle-btn.sms {
  background-color: #3b82f6;
}
.action-circle-btn.email {
  background-color: #f59e0b;
}

.profile-detail-link {
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.profile-detail-link:hover {
  color: var(--primary-color);
}

.profile-inline-action {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 0.75rem;
  transition: transform 0.15s, filter 0.15s;
}
.profile-inline-action:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
}
.profile-inline-action.whatsapp {
  background-color: #25D366;
}
.profile-inline-action.sms {
  background-color: #3b82f6;
}

.profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-meta-link {
  color: var(--primary-color);
  font-weight: 600;
}
.profile-meta-divider {
  color: var(--border-color);
  margin: 0 8px;
}

.profile-badge {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 12px;
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.profile-badge.deacon {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
.profile-badge.role {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

/* Avatar edit button overlay */
.profile-avatar-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, background-color 0.2s;
  z-index: 10;
}
.profile-avatar-edit-btn:hover {
  transform: scale(1.1);
  background-color: var(--sidebar-hover);
}

/* Group Selector UI Enhancements */
.group-selector-container {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 6px;
  max-height: 180px;
  overflow-y: auto;
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.group-selector-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.group-selector-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.group-selector-item:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-color);
}
.group-selector-item:has(input:checked) {
  background-color: rgba(3, 136, 172, 0.08);
  border-color: rgba(3, 136, 172, 0.3);
}

.group-selector-item input[type="checkbox"] {
  flex-shrink: 0;
}

.group-selector-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  flex-grow: 1;
}

.group-selector-item .group-item-icon {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}
.group-selector-item:has(input:checked) .group-item-icon {
  color: var(--primary-color);
}

/* Custom Multiselect Dropdown */
.custom-multiselect {
  position: relative;
  width: 100%;
  text-align: start;
}

.multiselect-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 38px;
  padding: 5px 12px;
  padding-inline-start: 34px; /* Space for magnifying glass */
  padding-inline-end: 30px;  /* Space for chevron */
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-card);
  cursor: text;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.multiselect-trigger:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.multiselect-trigger .search-icon {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.multiselect-trigger .arrow-icon {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
  transition: transform 0.2s ease;
}
.custom-multiselect.open-dropdown .multiselect-trigger .arrow-icon {
  transform: translateY(-50%) rotate(180deg);
}

.selected-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light-alpha);
  border: 1px solid rgba(3, 136, 172, 0.2);
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  user-select: none;
  animation: scaleIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.group-chip .chip-remove-btn {
  cursor: pointer;
  color: var(--primary-color);
  opacity: 0.7;
  transition: opacity 0.2s ease;
  font-size: 0.7rem;
}
.group-chip .chip-remove-btn:hover {
  opacity: 1;
}

.multiselect-search-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 24px !important;
  flex-grow: 1;
  min-width: 60px;
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: none !important;
}

/* Floating Dropdown overlay */
.multiselect-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideDown {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.custom-multiselect.open-dropdown .multiselect-dropdown {
  display: flex;
}

.multiselect-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.multiselect-dropdown-header .dropdown-header-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.multiselect-dropdown-header .dropdown-actions {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
}
.multiselect-dropdown-header .dropdown-actions .link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
  outline: none;
}
.multiselect-dropdown-header .dropdown-actions .link-btn:hover {
  text-decoration: underline;
}
.multiselect-dropdown-header .dropdown-actions .divider {
  color: var(--border-color);
}

/* ==================== PROFILE FIELDS & SWITCH CUSTOM BUILDER STYLES ==================== */

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1; /* slate-300 unchecked */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
input:checked + .slider {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}
input:checked + .slider:before {
  transform: translateX(22px);
}
body.rtl input:checked + .slider:before {
  transform: translateX(-22px);
}

.fields-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 15px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 4px;
}
.fields-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.field-toggle-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.field-toggle-card:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
}
.field-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.field-toggle-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
}
.field-toggle-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.fields-builder-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-top: 15px;
}
@media (max-width: 900px) {
  .fields-builder-grid {
    grid-template-columns: 1fr;
  }
}
.builder-sidebar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 15px;
  box-shadow: var(--shadow-sm);
  align-self: start;
}
.builder-preview {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.builder-search-wrap {
  position: relative;
  margin-bottom: 15px;
}
.builder-search-wrap i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
body.rtl .builder-search-wrap i {
  left: auto;
  right: 10px;
}
.builder-search-wrap input {
  padding-left: 32px;
}
body.rtl .builder-search-wrap input {
  padding-left: 12px;
  padding-right: 32px;
}

.builder-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.builder-palette-item:hover {
  background-color: var(--sidebar-hover);
  border-color: rgba(var(--primary-rgb), 0.3);
}
.builder-palette-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}
.builder-palette-item-info i {
  color: var(--primary-color);
  width: 16px;
  text-align: center;
}
.builder-palette-drag-handle {
  color: var(--text-muted);
}

.custom-fields-preview-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 25px;
}
@media (max-width: 600px) {
  .custom-fields-preview-list {
    grid-template-columns: 1fr;
  }
}
.custom-field-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 15px;
  position: relative;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary-color);
  transition: border-color 0.2s;
}
.custom-field-card:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
}
.custom-field-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}
.custom-field-card-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-field-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-field-card-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 4px;
  transition: color 0.2s;
}
.custom-field-card-btn.delete:hover {
  color: var(--danger-color);
}
.custom-field-card-btn.toggle:hover {
  color: var(--primary-color);
}
.custom-field-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.custom-field-prop-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.custom-field-prop-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}
.custom-fields-search-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 10px;
}
@media (max-width: 992px) {
  .custom-fields-search-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .custom-fields-search-grid {
    grid-template-columns: 1fr;
  }
}
.options-chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.option-chip {
  background-color: var(--sidebar-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 2px 8px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.option-chip i {
  cursor: pointer;
  color: var(--text-muted);
}
.option-chip i:hover {
  color: var(--danger-color);
}

/* ==========================================================================
   ENHANCED EVENTS MODULE STYLES
   ========================================================================== */

/* 1. Events Dashboard Filter Bar */
.events-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  background-color: var(--card-bg, #ffffff);
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 25px;
  border: 1px solid var(--border-color, #eef2f6);
}

.events-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-search-box {
  position: relative;
}

.filter-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #8898aa);
  font-size: 0.9rem;
}

.filter-search-box input {
  padding-left: 35px;
  width: 220px;
  height: 38px;
  border-radius: 8px;
}

.calendars-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-light, #f8f9fe);
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #eef2f6);
}

.calendars-filter-wrapper .filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted, #8898aa);
}

.calendar-dots-bar {
  display: flex;
  gap: 6px;
}

.cal-dot-filter {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}

.cal-dot-filter:hover {
  transform: scale(1.25);
}

.cal-dot-filter.active {
  border-color: #000000;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  transform: scale(1.15);
}

.date-range-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-input-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted, #8898aa);
}

.date-input-group input.date-picker-el {
  height: 38px;
  border-radius: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border-color, #eef2f6);
  font-size: 0.85rem;
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.events-header-right {
  display: flex;
  gap: 10px;
}

/* 2. Events Card Grid */
.events-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.event-premium-card {
  background-color: var(--card-bg, #ffffff);
  border-radius: 12px;
  border: 1px solid var(--border-color, #eef2f6);
  border-left: 5px solid var(--primary-color, #139eab);
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  height: 270px;
}

.event-premium-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.event-visibility-icon {
  color: var(--text-muted, #8898aa);
  font-size: 0.9rem;
}

.event-calendar-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 30px;
}

.event-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-color, #32325d);
  line-height: 1.4;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3.2rem;
}

.event-card-details-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.event-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary, #525f7f);
}

.event-detail-item i {
  color: var(--primary-color, #139eab);
  width: 16px;
  text-align: center;
}

.event-card-footer {
  border-top: 1px solid var(--border-color, #eef2f6);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.event-footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 60%;
}

.event-capacity-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted, #8898aa);
  display: flex;
  justify-content: space-between;
}

.event-capacity-bar-bg {
  height: 6px;
  background-color: var(--bg-light, #f8f9fe);
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
}

.event-capacity-bar-fill {
  height: 100%;
  background-color: var(--primary-color, #139eab);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.event-attended-badge {
  background-color: rgba(19, 158, 171, 0.1);
  color: var(--primary-color, #139eab);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 3. Event Detail & Management Workspace */
.event-detail-wrapper {
  animation: fadeIn 0.4s ease-out;
}

.event-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 25px;
  align-items: start;
}

@media (max-width: 992px) {
  .event-detail-grid {
    grid-template-columns: 1fr;
  }
}

.event-summary-info-card {
  padding: 20px;
  border-left: 5px solid var(--calendar-color, var(--primary-color));
}

.event-detail-banner-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.event-detail-image-placeholder {
  width: 100%;
  height: 150px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-color, #139eab), #3f51b5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.event-info-title-h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-color, #32325d);
  margin-bottom: 12px;
  line-height: 1.4;
}

.event-info-desc {
  font-size: 0.85rem;
  color: var(--text-secondary, #525f7f);
  line-height: 1.6;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color, #eef2f6);
  padding-bottom: 15px;
}

.event-detail-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Detail tabs bar */
.detail-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border-color, #eef2f6);
  margin-bottom: 20px;
  gap: 15px;
  overflow-x: auto;
}

.detail-tab-btn {
  background: none;
  border: none;
  padding: 10px 15px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted, #8898aa);
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-tab-btn:hover {
  color: var(--primary-color, #139eab);
}

.detail-tab-btn.active {
  color: var(--primary-color, #139eab);
}

.detail-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color, #139eab);
  border-radius: 10px;
}

.detail-tab-pane {
  display: none;
}

.detail-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* Analytics subview dashboard */
.event-analytics-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.analytics-metric-widget {
  background-color: var(--bg-light, #f8f9fe);
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #eef2f6);
  text-align: center;
}

.analytics-metric-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color, #139eab);
  margin-bottom: 4px;
}

.analytics-metric-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted, #8898aa);
}

/* Attendance sheet tab elements */
.attendance-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.attendance-member-search {
  width: 250px;
}

.attendance-filters-tabs {
  display: flex;
  background-color: var(--bg-light, #f8f9fe);
  border-radius: 30px;
  padding: 4px;
  border: 1px solid var(--border-color, #eef2f6);
}

.btn-subtab {
  background: none;
  border: none;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary, #525f7f);
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.2s ease;
}

.btn-subtab.active {
  background-color: #ffffff;
  color: var(--primary-color, #139eab);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-attendance-action {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
}

.btn-attendance-action.check-in {
  background-color: rgba(45, 206, 137, 0.1);
  color: #2dce89;
}

.btn-attendance-action.check-in:hover {
  background-color: #2dce89;
  color: #ffffff;
}

.btn-attendance-action.check-out {
  background-color: rgba(245, 54, 92, 0.1);
  color: #f5365c;
}

.btn-attendance-action.check-out:hover {
  background-color: #f5365c;
  color: #ffffff;
}

.btn-attendance-action.active-state {
  background-color: #2dce89;
  color: #ffffff;
}

.btn-attendance-action.check-out.active-state {
  background-color: #f5365c;
  color: #ffffff;
}

.attendance-time-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, #8898aa);
  margin-top: 2px;
}

/* 4. Theater Seating Map Layout Grid */
.seating-view-split {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 25px;
}

@media (max-width: 992px) {
  .seating-view-split {
    grid-template-columns: 1fr;
  }
}

.theater-map-section {
  background-color: var(--bg-light, #f8f9fe);
  border-radius: 8px;
  border: 1px solid var(--border-color, #eef2f6);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.theater-stage-line {
  background-color: #525f7f;
  color: #ffffff;
  width: 80%;
  text-align: center;
  padding: 8px;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 30px;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  letter-spacing: 2px;
}

.theater-seating-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 25px;
  width: 100%;
  overflow-x: auto;
  align-items: center;
  padding: 10px;
}

.seat-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.seat-row-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary, #525f7f);
  width: 25px;
  text-align: center;
}

.seat-chair {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.seat-chair.available {
  background-color: #e0e0e0;
  color: #525f7f;
  border: 1px solid #d0d0d0;
}

.seat-chair.available:hover {
  background-color: var(--primary-color, #139eab);
  color: #ffffff;
  transform: scale(1.15);
}

.seat-chair.booked {
  background-color: #f5365c;
  color: #ffffff;
  cursor: not-allowed;
}

.seat-chair.selected {
  background-color: #2dce89;
  color: #ffffff;
  transform: scale(1.1);
  animation: pulse 1.5s infinite;
}

.seating-legend {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary, #525f7f);
}

.legend-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
}

.legend-box.available { background-color: #e0e0e0; border: 1px solid #d0d0d0; }
.legend-box.booked { background-color: #f5365c; }
.legend-box.selected { background-color: #2dce89; }

/* Tickets registry cards list */
.tickets-list-scrollable {
  max-height: 450px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-booking-card {
  border: 1px solid var(--border-color, #eef2f6);
  border-radius: 8px;
  padding: 15px;
  background-color: var(--card-bg, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.ticket-booking-card:hover {
  border-color: var(--primary-color, #139eab);
}

.ticket-booking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color, #eef2f6);
  padding-bottom: 6px;
}

.ticket-booking-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-color, #32325d);
}

.ticket-booking-date {
  font-size: 0.75rem;
  color: var(--text-muted, #8898aa);
}

.ticket-booking-body {
  font-size: 0.85rem;
  color: var(--text-secondary, #525f7f);
  line-height: 1.5;
}

.ticket-booking-seats {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.seat-code-pill {
  background-color: var(--bg-light, #f8f9fe);
  border: 1px solid var(--border-color, #eef2f6);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color, #139eab);
}

/* 5. Virtual Premium Digital Ticket Pass */
.digital-ticket-pass {
  background: linear-gradient(135deg, #111e25 0%, #1c323f 100%);
  color: #ffffff;
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  position: relative;
  margin: 0 auto;
  font-family: inherit;
  overflow: hidden;
}

/* Side cutouts to look like a ticket */
.digital-ticket-pass::before,
.digital-ticket-pass::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: #313c46; /* Overlay match background */
  border-radius: 50%;
  top: 65%;
  transform: translateY(-50%);
  z-index: 5;
}

.digital-ticket-pass::before {
  left: -10px;
}

.digital-ticket-pass::after {
  right: -10px;
}

.ticket-brand-header {
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;
  margin-bottom: 15px;
}

.ticket-brand-logo {
  font-size: 1.5rem;
  color: var(--primary-color, #139eab);
  margin-bottom: 4px;
}

.ticket-brand-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.7);
}

.ticket-event-title-h4 {
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 15px;
  color: #ffffff;
  line-height: 1.4;
}

.ticket-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.ticket-info-block label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 3px;
  letter-spacing: 0.5px;
}

.ticket-info-block span {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

/* Dotted separator line */
.ticket-dotted-divider {
  border-top: 2px dotted rgba(255, 255, 255, 0.25);
  margin: 15px 0 25px 0;
  position: relative;
}

.ticket-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.canvas-qr-code {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  margin-bottom: 12px;
}

.ticket-serial-num {
  font-family: monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

/* 6. WhatsApp Broadcast layout styles */
.broadcaster-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

@media (max-width: 768px) {
  .broadcaster-config-grid {
    grid-template-columns: 1fr;
  }
}

.broadcast-members-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.broadcast-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.broadcast-member-row:hover {
  background-color: var(--bg-light, #f8f9fe);
}

.broadcast-member-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.broadcast-member-info {
  display: flex;
  flex-direction: column;
}

.broadcast-member-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-color, #32325d);
}

.broadcast-member-phone {
  font-size: 0.75rem;
  color: var(--text-muted, #8898aa);
}

.dispatch-link-btn {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #eef2f6);
  padding: 10px 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none !important;
  color: var(--text-color, #32325d) !important;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}

.dispatch-link-btn:hover {
  border-color: #25d366; /* WhatsApp color */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.dispatch-link-btn.sent {
  opacity: 0.65;
  background-color: var(--bg-light, #f8f9fe);
}

.wa-btn-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wa-btn-status.pending {
  background-color: rgba(37, 211, 102, 0.15);
  color: #25d366;
}

.wa-btn-status.completed {
  background-color: var(--bg-light, #f8f9fe);
  color: var(--text-muted, #8898aa);
  border: 1px solid var(--border-color, #eef2f6);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 206, 137, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(45, 206, 137, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 206, 137, 0); }
}

/* ==================== TOUR BUS SEATING STYLES ==================== */
.bus-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--border-color, #e4e7eb);
  padding-bottom: 8px;
}

.bus-tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary, #525f7f);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.bus-tab-btn:hover {
  background-color: var(--bg-light, #f8f9fa);
  color: var(--primary-color, #139eab);
}

.bus-tab-btn.active {
  background-color: var(--primary-color, #139eab);
  color: #ffffff;
}

.bus-layout-wrapper {
  background-color: var(--bg-card-solid, #ffffff);
  border: 1px solid var(--border-color, #e4e7eb);
  border-radius: 12px;
  padding: 20px;
  max-width: 320px;
  margin: 0 auto 20px auto;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.bus-front-cabin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed #94a3b8;
  padding-bottom: 12px;
  margin-bottom: 15px;
  color: var(--text-secondary, #525f7f);
}

.bus-driver-seat {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #cbd5e1;
  color: #475569;
  border-radius: 6px;
  font-size: 1.1rem;
}

.bus-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bus-row {
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 12px;
  justify-content: center;
  align-items: center;
}

/* Middle column (col 3) is the aisle gap, except for the back row */
.bus-aisle-gap {
  width: 34px;
  height: 34px;
}

.bus-seat-chair {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}

.bus-seat-chair.available {
  background-color: #f1f5f9;
  color: #334155;
}

.bus-seat-chair.available:hover {
  background-color: var(--primary-color, #139eab);
  color: #ffffff;
  border-color: var(--primary-color, #139eab);
  transform: scale(1.1);
}

.bus-seat-chair.booked {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  cursor: not-allowed;
}

.bus-seat-chair.booked:hover {
  transform: none;
}

.bus-seat-chair.selected {
  background-color: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: scale(1.05);
}

.bus-seat-chair.blocked-admin {
  background-color: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
  cursor: not-allowed;
}

/* Category inputs */
.category-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

/* instapay details block */
.instapay-details-box {
  background: linear-gradient(135deg, rgba(3, 136, 172, 0.08) 0%, rgba(3, 136, 172, 0.02) 100%);
  border: 1px solid var(--border-color, #e4e7eb);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

/* Collapsed Sidebar CSS */
.sidebar-collapsed .ch-sidebar {
  width: 70px;
}
.sidebar-collapsed .ch-sidebar .sidebar-brand span,
.sidebar-collapsed .ch-sidebar .sidebar-profile .profile-info,
.sidebar-collapsed .ch-sidebar .sidebar-ministries-section .ministries-header-info,
.sidebar-collapsed .ch-sidebar .sidebar-ministries-section .toggle-arrow,
.sidebar-collapsed .ch-sidebar .sidebar-ministries-section .sidebar-open-all-link,
.sidebar-collapsed .ch-sidebar .menu-category-title,
.sidebar-collapsed .ch-sidebar .menu-item span {
  display: none !important;
}

/* Let the ministries list hide when collapsed */
.sidebar-collapsed .ch-sidebar .sidebar-ministries-list {
  display: none !important;
}

.sidebar-collapsed .ch-sidebar .sidebar-brand {
  justify-content: center;
  padding: 0;
}
.sidebar-collapsed .ch-sidebar .sidebar-brand i {
  font-size: 1.5rem;
}

.sidebar-collapsed .ch-sidebar .sidebar-profile {
  padding: 12px 0;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-collapsed .ch-sidebar .sidebar-profile img {
  margin: 0;
}

.sidebar-collapsed .ch-sidebar .sidebar-ministries-section {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-collapsed .ch-sidebar .sidebar-ministries-section .ministries-header {
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.sidebar-collapsed .ch-sidebar .sidebar-ministries-section .ministries-header img {
  margin: 0;
  width: 42px;
  height: 42px;
}

.sidebar-collapsed .ch-sidebar .menu-item {
  justify-content: center;
  padding: 12px 0;
}
.sidebar-collapsed .ch-sidebar .menu-item i {
  font-size: 1.25rem;
  margin: 0;
}

.desktop-sidebar-toggle-btn {
  display: block;
  font-size: 1.3rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
}
.desktop-sidebar-toggle-btn:hover {
  background-color: var(--bg-hover);
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .desktop-sidebar-toggle-btn {
    display: none !important;
  }
}

/* Header Notification Button and Badge */
.header-notification-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.2s, color 0.2s;
  margin-inline-end: 8px;
}
.header-notification-btn:hover {
  background-color: var(--bg-hover);
  color: var(--primary-color);
}
.header-notification-btn .notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bg-card);
}
body.rtl .header-notification-btn .notification-badge {
  right: auto;
  left: 4px;
}

/* Dropdown Container */
.header-notification-dropdown {
  display: none;
  position: absolute;
  top: 48px;
  right: 0;
  width: 380px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 150;
  overflow: hidden;
  animation: slideDownFade 0.2s ease-out;
}
body.rtl .header-notification-dropdown {
  right: auto;
  left: 0;
}

.header-notification-dropdown.active {
  display: block;
}

/* Header */
.notif-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary-color);
  background-color: var(--bg-light);
}
.notif-dropdown-header i {
  font-size: 1.1rem;
}

/* Body */
.notif-dropdown-body {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Desktop Push Notifications Card */
.push-notif-card {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
}
.push-notif-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-color);
}
.push-notif-title i {
  color: var(--accent-color);
}
.push-notif-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 8px 0 12px 0;
  line-height: 1.4;
}
.push-notif-btn {
  width: 100%;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  background-color: #f59e0b !important;
  color: #ffffff !important;
  border-radius: 6px !important;
  border: none !important;
  cursor: pointer;
  transition: opacity 0.2s;
}
.push-notif-btn:hover {
  opacity: 0.9;
}

/* Notification Items List */
.notif-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notif-item-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: background-color 0.2s;
}
.notif-item-card:hover {
  background-color: var(--bg-light);
}

.notif-item-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.notif-item-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-item-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
  line-height: 1.4;
}
.notif-item-text {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.notif-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== TRIP MANAGEMENT FULL-WIDTH UI ==================== */
.trip-mgmt-layout .event-detail-info-panel {
  display: none !important;
}

.trip-mgmt-layout .event-detail-grid {
  display: block !important;
}

.trip-mgmt-layout .event-detail-tabs-container {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 15px;
}

/* Outlined buttons */
.btn-outline-danger {
  border: 2px solid #ef4444 !important;
  color: #ef4444 !important;
  background: transparent !important;
  transition: all 0.2s ease;
}
.btn-outline-danger:hover {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}

.btn-outline-primary {
  border: 2px solid #139eab !important;
  color: #139eab !important;
  background: transparent !important;
  transition: all 0.2s ease;
}
.btn-outline-primary:hover {
  background-color: #139eab !important;
  color: #ffffff !important;
}

.btn-outline-warning {
  border: 2px solid #f59e0b !important;
  color: #f59e0b !important;
  background: transparent !important;
  transition: all 0.2s ease;
}
.btn-outline-warning:hover {
  background-color: #f59e0b !important;
  color: #ffffff !important;
}

.btn-outline-success {
  border: 2px solid #2dce89 !important;
  color: #2dce89 !important;
  background: transparent !important;
  transition: all 0.2s ease;
}
.btn-outline-success:hover {
  background-color: #2dce89 !important;
  color: #ffffff !important;
}

.btn-outline-secondary {
  border: 1px solid var(--border-color, #e4e7eb) !important;
  color: var(--text-color, #32325d) !important;
  background: transparent !important;
  transition: all 0.2s ease;
}
.btn-outline-secondary:hover {
  background-color: var(--bg-hover, #f8f9fa) !important;
}

.btn-outline-indigo {
  border: 2px solid #5551ff !important;
  color: #5551ff !important;
  background: transparent !important;
  transition: all 0.2s ease;
}
.btn-outline-indigo:hover {
  background-color: #5551ff !important;
  color: #ffffff !important;
}

.btn-outline-blue {
  border: 2px solid #3b82f6 !important;
  color: #3b82f6 !important;
  background: transparent !important;
  transition: all 0.2s ease;
}
.btn-outline-blue:hover {
  background-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* ==================== EVENT LODGING ROOM STYLES ==================== */
.lodging-floor-section {
  background-color: var(--bg-card-solid, #ffffff);
  border: 1px solid var(--border-color, #e4e7eb);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.lodging-floor-header {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-secondary, #525f7f);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.lodging-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.room-card {
  background-color: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e4e7eb);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.room-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #e4e7eb);
  padding-bottom: 6px;
}

.room-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary, #32325d);
}

.room-occupancy-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #10b981;
  background-color: #ecfdf5;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #d1fae5;
}

.room-occupancy-badge.full {
  color: #ef4444;
  background-color: #fef2f2;
  border-color: #fee2e2;
}

.room-capacity-input {
  width: 40px;
  height: 20px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  background-color: var(--bg-card-solid);
  color: var(--text-primary);
  outline: none;
  padding: 0;
  margin-left: 2px;
}

.room-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-slot-pill {
  height: 36px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  user-select: none;
}

.room-slot-pill.vacant {
  border: 1px dashed #cbd5e1;
  background-color: #fafafa;
  color: var(--text-muted, #8898aa);
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.room-slot-pill.vacant:hover {
  background-color: var(--bg-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.room-slot-pill.occupied {
  border: 1px solid var(--border-color);
  background-color: var(--bg-card-solid);
  color: var(--text-primary);
  justify-content: space-between;
  padding: 0 10px;
}

.room-slot-remove-btn {
  color: #ef4444;
  border: none;
  background: none;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 50%;
  transition: background-color 0.2s;
  width: 20px;
  height: 20px;
}

.room-slot-remove-btn:hover {
  background-color: #fee2e2;
}

.unassigned-member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.unassigned-member-row:hover {
  background-color: var(--bg-light);
}

/* Expandable Member Profile Cards Styling */
.expandable-profile-card {
  grid-column: 1 / -1;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--bg-card);
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.expandable-profile-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  background-color: var(--bg-card-solid);
}

.expandable-profile-card .card-header {
  padding: 14px 20px;
  background-color: var(--bg-card-solid);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.3s, background-color 0.3s;
  cursor: pointer;
  user-select: none;
}

.expandable-profile-card:hover .card-header,
.expandable-profile-card.expanded .card-header {
  border-bottom-color: var(--border-color);
  background-color: var(--sidebar-hover);
}

.expandable-profile-card .card-header-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.expandable-profile-card .card-expand-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.expandable-profile-card:hover .card-expand-icon,
.expandable-profile-card.expanded .card-expand-icon {
  transform: rotate(180deg);
  color: var(--primary-color);
}

.expandable-profile-card .card-content-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.expandable-profile-card:hover .card-content-wrapper,
.expandable-profile-card.expanded .card-content-wrapper {
  max-height: 650px;
}

.expandable-profile-card .card-content-inner {
  padding: 20px;
}

/* Premium Information Table Styles */
.profile-info-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-info-table tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.profile-info-table tr:hover {
  background-color: var(--sidebar-hover);
}

.profile-info-table tr:last-child {
  border-bottom: none;
}

.profile-info-table td {
  padding: 10px 14px;
  vertical-align: middle;
  font-size: 0.9rem;
}

.profile-info-table td.info-label {
  width: 35%;
  font-weight: 600;
  color: var(--text-secondary);
}

.profile-info-table td.info-label i {
  width: 18px;
  color: var(--primary-color);
  opacity: 0.85;
  margin-inline-end: 8px;
}

.profile-info-table td.info-value {
  font-weight: 700;
  color: var(--text-primary);
}/* RTL Adjustments */
[dir="rtl"] .profile-info-table td.info-label i {
  margin-inline-end: 0;
  margin-inline-start: 8px;
}

/* ==================== MEMBER ID CARD STYLING ==================== */
.id-card-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1100;
  justify-content: center;
  align-items: center;
}

.id-card-dialog-box {
  background: var(--bg-card, #ffffff);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  width: auto;
  max-width: 90%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Base ID Card Design matching Portrait Wallet dimensions */
.member-id-card-canvas {
  width: 250px;
  height: 380px;
  background: #ffffff;
  border: 1px solid #e2e8f0; /* border-slate-200 */
  border-radius: 20px; /* rounded-2xl */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  direction: ltr; /* Always LTR for standard ID layout formatting */
}

/* Background Blur Circles */
.id-card-blur-1 {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(255,255,255,0) 70%);
  top: -60px;
  left: -60px;
  pointer-events: none;
}

.id-card-blur-2 {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, rgba(255,255,255,0) 70%);
  bottom: -40px;
  right: -40px;
  pointer-events: none;
}

/* Brand Header */
.id-card-header-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b; /* slate-500 */
  margin-bottom: 4px;
}

.id-card-brand-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.id-card-header-brand span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Profile Section (Portrait centered) */
.id-card-profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: 100%;
}

.id-card-avatar-container-portrait {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.id-card-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f1f5f9;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  background-color: #e2e8f0;
}

.id-card-avatar-placeholder {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background-color: var(--primary-color, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  border: 3px solid #f1f5f9;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.id-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b; /* slate-800 */
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

.id-card-role-pill {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}

.id-card-role-admin {
  background-color: #fee2e2;
  color: #ef4444;
}

.id-card-role-servant {
  background-color: #dbeafe;
  color: #3b82f6;
}

.id-card-role-member {
  background-color: #f0fdf4;
  color: #22c55e;
}

/* Divider (Horizontal) */
.id-card-divider-horizontal {
  width: 100%;
  height: 0;
  border-top: 1px dashed #e2e8f0;
  margin: 4px 0;
}

/* QR Code Section */
.id-card-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.id-card-qr-wrapper {
  background: #ffffff;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
}

.id-card-qr-image {
  width: 78px;
  height: 78px;
}

.id-card-nid-text {
  font-family: monospace;
  font-size: 0.65rem;
  color: #64748b; /* slate-500 */
  font-weight: 600;
}

/* Print CSS override */
@media print {
  body * {
    visibility: hidden !important;
  }
  
  #printable-member-id-card-element,
  #printable-member-id-card-element * {
    visibility: visible !important;
  }
  
  #printable-member-id-card-element {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
}
