/* --- Start of styles.css --- */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&display=swap');

/* --- GLOBAL LEXEND FONT --- */
body,
h1,
h2,
h3,
h4,
h5,
h6,
.lexend,
.modal-close,
button,
input,
select {
  font-family: 'Lexend', sans-serif !important;
}

/* --- KPI DASHBOARD (GLOWING GLASS AMORPHISM MASTERPIECE) --- */
#kpiModalBackdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.24), transparent 26%),
    radial-gradient(circle at 86% 16%, rgba(168, 85, 247, 0.22), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(34, 197, 94, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.76), rgba(15, 23, 42, 0.66));
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

#kpiModalBackdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1), transparent 18%),
    radial-gradient(circle at 80% 24%, rgba(255, 255, 255, 0.08), transparent 16%),
    radial-gradient(circle at 55% 78%, rgba(255, 255, 255, 0.05), transparent 20%);
  pointer-events: none;
  mix-blend-mode: screen;
}

#kpiModalBackdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.kpi-modal-card {
  position: relative;
  width: 90vw;
  height: 90vh;
  max-width: 1075px;
  max-height: 1200px;
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 48px 120px rgba(3, 7, 18, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -28px 56px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(28px) saturate(175%);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
}

.kpi-modal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 22%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.16), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%);
}

.kpi-modal-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.9;
}

#kpiModalBackdrop.visible .kpi-modal-card {
  transform: translateY(0) scale(1);
}

.kpi-header {
  position: relative;
  z-index: 1;
  padding: 28px 32px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(15, 23, 42, 0.12);
}

.kpi-header-copy {
  min-width: 0;
  flex: 1 1 auto;
  padding-top: 2px;
}

.kpi-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  font-family: 'Lexend', sans-serif !important;
  color: #f8fbff;
  letter-spacing: -0.035em;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.16),
    0 0 36px rgba(56, 189, 248, 0.12);
}

.kpi-subtitle {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.82);
  margin-top: 7px;
  line-height: 1.6;
  font-family: 'Lexend', sans-serif !important;
}

.kpi-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  padding-left: 12px;
}

.kpi-filter-shell {
  position: relative;
  width: 100%;
}

.kpi-filter-select {
  width: 100%;
  height: 48px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 48px 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  color: #f8fafc;
  font-family: 'Lexend', sans-serif !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow:
    0 10px 30px rgba(2, 6, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 24px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  cursor: pointer;
  outline: none;
  transition: all 0.24s ease;
}

.kpi-filter-select:hover,
.kpi-filter-select:focus {
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow:
    0 14px 34px rgba(2, 6, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 0 4px rgba(56, 189, 248, 0.1),
    0 0 28px rgba(168, 85, 247, 0.12);
  transform: translateY(-1px);
}

.kpi-filter-select option {
  color: #0f172a;
  background: #f8fafc;
}

.kpi-filter-chevron {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(186, 230, 253, 0.9);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-filter-chevron svg {
  width: 16px;
  height: 16px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

.kpi-close-btn {
  position: static;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  margin-left: 2px;
  box-shadow:
    0 10px 26px rgba(2, 6, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 24px rgba(168, 85, 247, 0.1);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  transition: all 0.24s ease;
}

.kpi-close-btn:hover {
  transform: translateY(-1px) scale(1.04);
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.44);
  box-shadow:
    0 14px 30px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 4px rgba(168, 85, 247, 0.1),
    0 0 24px rgba(56, 189, 248, 0.14);
}

.kpi-close-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.kpi-body {
  position: relative;
  z-index: 1;
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); /* Force equal height rows */
  gap: 24px; /* Unify main gap */
  grid-template-areas:
    'stats bar doughnut'
    'stats age gender';
  background:
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.1), transparent 22%),
    radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

@media (max-width: 900px) {
  .kpi-header {
    flex-direction: column;
    align-items: stretch;
    padding: 22px 20px 18px;
    gap: 16px;
  }

  .kpi-toolbar {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    padding-left: 0;
  }

  .kpi-filter-shell {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .kpi-close-btn {
    flex: 0 0 46px;
    margin-left: 0;
  }

  /* --- KPI Mobile Stacking Fix --- */
  .kpi-body {
    display: flex !important;
    flex-direction: column !important;
    padding: 16px !important;
    gap: 20px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Override aspect-ratios and enforce a rigid container height for Chart.js */
  .kpi-bar-area,
  .kpi-doughnut-area,
  .kpi-age-area,
  .kpi-location-area {
    aspect-ratio: auto !important;
    min-height: 320px !important;
    flex: 0 0 auto !important;
  }

  .kpi-stat-card {
    aspect-ratio: auto !important;
    min-height: 120px !important;
  }
}

@media (max-width: 640px) {
  .kpi-stat-area {
    grid-template-columns: 1fr;
  }

  .kpi-stat-card {
    min-height: 136px;
  }

  .kpi-title {
    font-size: 24px;
  }
}

/* Glass slabs */
.kpi-panel-glass {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(125, 211, 252, 0.15);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.35) 100%);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  box-shadow:
    0 18px 44px rgba(2, 6, 23, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -12px 28px rgba(0, 0, 0, 0.2),
    0 0 30px rgba(56, 189, 248, 0.02);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.kpi-panel-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.1), transparent 22%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 46%);
}

.kpi-panel-glass:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 211, 252, 0.3);
  box-shadow:
    0 24px 52px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -12px 28px rgba(0, 0, 0, 0.3),
    0 0 34px rgba(168, 85, 247, 0.15);
}

.kpi-panel-title {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 800;
  color: rgba(248, 250, 252, 0.92);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.liquid-border-stat-total::after,
.liquid-border-stat-bookings::after,
.liquid-border-stat-fill::after,
.liquid-border-stat-wait::after,
.liquid-border-bar::after,
.liquid-border-doughnut::after,
.liquid-border-age::after,
.liquid-border-location::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 1;
}

.liquid-border-stat-total::after {
  background-image: linear-gradient(180deg, rgba(56, 189, 248, 0.85), rgba(59, 130, 246, 0.16));
}
.liquid-border-stat-bookings::after {
  background-image: linear-gradient(180deg, rgba(192, 132, 252, 0.88), rgba(168, 85, 247, 0.16));
}
.liquid-border-stat-fill::after {
  background-image: linear-gradient(180deg, rgba(74, 222, 128, 0.86), rgba(34, 197, 94, 0.16));
}
.liquid-border-stat-wait::after {
  background-image: linear-gradient(180deg, rgba(251, 146, 60, 0.88), rgba(249, 115, 22, 0.16));
}
.liquid-border-bar::after {
  background-image: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.82),
    rgba(168, 85, 247, 0.78),
    rgba(251, 146, 60, 0.76)
  );
}
.liquid-border-doughnut::after {
  background-image: linear-gradient(180deg, rgba(192, 132, 252, 0.86), rgba(56, 189, 248, 0.8));
}
.liquid-border-age::after {
  background-image: linear-gradient(
    90deg,
    rgba(192, 132, 252, 0.84),
    rgba(74, 222, 128, 0.8),
    rgba(251, 146, 60, 0.78)
  );
}
.liquid-border-location::after {
  background-image: linear-gradient(
    90deg,
    rgba(56, 189, 248, 0.82),
    rgba(168, 85, 247, 0.76),
    rgba(251, 146, 60, 0.76),
    rgba(74, 222, 128, 0.72)
  );
}

.kpi-stat-area {
  grid-area: stats;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

@media (max-width: 900px) {
  .kpi-stat-area {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
}

.kpi-stat-card {
  border-radius: 22px;
  padding: 18px 16px;
  position: relative; /* Removed aspect-ratio so it can stretch fluidly */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.25) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 30px rgba(2, 6, 23, 0.3);
}

.kpi-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 46%);
  pointer-events: none;
}

.kpi-stat-label {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 800;
  color: rgba(203, 213, 225, 0.84);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 8px;
}

.kpi-stat-value {
  position: relative;
  z-index: 1;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.1),
    0 0 32px rgba(56, 189, 248, 0.08);
}

.kpi-stat-subtext {
  position: relative;
  z-index: 1;
  font-size: 10px;
  color: rgba(203, 213, 225, 0.72);
  font-weight: 600;
}

.kpi-bar-area {
  grid-area: bar;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.kpi-doughnut-area {
  grid-area: doughnut;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.kpi-age-area {
  grid-area: age;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.kpi-location-area {
  grid-area: gender;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.kpi-chart-wrapper {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

.kpi-chart-wrapper canvas {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 14px 28px rgba(2, 6, 23, 0.2))
    drop-shadow(0 0 20px rgba(56, 189, 248, 0.05));
}

.kpi-chart-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
  line-height: 1.65;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.kpi-chart-empty.visible {
  display: flex;
}

.kpi-chart-wrapper canvas.is-hidden {
  display: none !important;
}

#kpiTimeframeFilter {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(125, 211, 252, 0.25) !important;
  color: #ffffff !important;
  font-family: 'Lexend', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.3s ease !important;
}

#kpiTimeframeFilter:hover,
#kpiTimeframeFilter:focus {
  background: rgba(15, 23, 42, 0.75) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow:
    0 14px 34px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 20px rgba(56, 189, 248, 0.15) !important;
}

#kpiCloseBtn {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.08) 100%
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #e2e8f0 !important;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 24px rgba(168, 85, 247, 0.08) !important;
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
}

#kpiCloseBtn:hover {
  transform: translateY(-1px);
  color: #ffffff !important;
}

#kpiTimeframeFilter {
  background: rgba(15, 23, 42, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

#kpiCloseBtn {
  background: rgba(15, 23, 42, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
  box-shadow:
    0 10px 24px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

#kpiCloseBtn:hover {
  transform: translateY(-1px) scale(1.04);
  background: rgba(15, 23, 42, 0.6) !important;
  color: #ffffff !important;
  border-color: rgba(125, 211, 252, 0.4) !important;
}

.kpi-chart-wrapper canvas.is-hidden {
  display: none !important;
}

/* Custom Quill Editor Styles */
.ql-toolbar.ql-snow {
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
  font-family: 'Lexend', sans-serif;
  position: relative; /* Fixed: Prevents the toolbar from detaching and floating over the modal */
  z-index: 1;
}

/* FIX: Isolate the Quill toolbar from aggressive global app styles */
.ql-toolbar.ql-snow * {
  box-sizing: content-box;
}

.ql-toolbar.ql-snow button {
  min-height: unset !important;
  height: 24px !important;
}

.ql-container.ql-snow {
  border: 1px solid #cbd5e1;
  border-radius: 0 0 8px 8px;
  background: #fff;
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  min-height: 260px;
  max-height: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ql-editor {
  min-height: 260px;
  max-height: 420px;
  overflow-y: auto;
  padding: 14px 16px;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.ql-editor:focus {
  box-shadow: inset 0 0 0 3px rgba(20, 119, 201, 0.15);
  border-color: var(--lr-blue);
  outline: none;
}

#evDescriptionEditor {
  min-height: 260px;
}

/* FIX: Allow the Consent Editor to stretch fully and override Quill's default 420px max-height */
#adminConsentTermsEditorModal {
  min-height: 260px;
  max-height: none !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}

#adminConsentTermsEditorModal .ql-container.ql-snow {
  max-height: none !important;
  flex: 1 1 auto !important;
}

#adminConsentTermsEditorModal .ql-editor {
  max-height: none !important;
  flex: 1 1 auto !important;
}

:root {
  --lr-blue: #1477c9;
  --lr-blue-dark: #0f5ea0;
  --lr-blue-soft: #e6f2ff;
  --bg: #f3f4f6;
  --text-main: #102a43;
  --text-muted: #64748b;
  --border-subtle: #e2e8f0;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);

  /* Header / viewport offsets */
  --app-header-height: 76px;
  --app-header-offset: calc(var(--app-header-height) + env(safe-area-inset-top, 0px));
  --app-shell-gap: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0 !important;
  padding: 0 !important;
}

html {
  scrollbar-width: none; /* Firefox */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Lexend', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -ms-overflow-style: none; /* IE and Legacy Edge */
  overscroll-behavior-y: auto;
  overflow-x: clip; /* Safely stops horizontal scrolling without breaking sticky headers */
  -webkit-user-select: none;
  user-select: none;
}

/* Scale down the entire app by 10% on laptop/desktop screens to fit more content */
@media (min-width: 901px) {
  html {
    zoom: 0.9;
  }
}

input,
textarea,
select,
option,
[contenteditable='true'],
.ql-editor,
.ql-editor *,
.ql-toolbar,
.ql-toolbar * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

a,
button,
[role='button'],
.hero-card,
.program-card,
.session-card,
.custom-select-trigger,
.custom-option,
.back-btn,
.btn-book-glass,
.modal-close,
.kpi-close-btn,
.session-option,
label {
  touch-action: manipulation;
}

button,
button.primary,
button.secondary,
.back-btn,
.btn-book-glass,
.custom-select-trigger,
.custom-option,
.session-option {
  min-height: 44px;
}

/* Fix for oval close buttons: override global button min-height */
button.modal-close,
button.kpi-close-btn {
  min-height: unset;
}

.modal-scroll-area,
.admin-results-scroll,
.admin-session-scroll,
.custom-select-options,
.kpi-body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* --- HIDE DEFAULT SCROLLBARS GLOBALLY --- */
/* Hides the clunky OS scrollbar track but keeps scrolling functional */
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  background: transparent;
}

/* HEADER */
.lr-site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 300;
  background: linear-gradient(180deg, rgba(20, 119, 201, 0.98) 0%, rgba(15, 94, 160, 0.96) 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  padding-top: env(safe-area-inset-top, 0px);
  isolation: isolate;
}

.lr-header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
  position: relative;
  min-height: 56px;
}

.lr-logo {
  height: 48px;
  max-width: min(320px, 100%);
  width: auto;
  display: block;
  position: relative;
  z-index: 2;
  object-fit: contain;
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
}

.dept-selector-wrap {
  position: relative;
}
.dept-selector {
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  font-family: 'Lexend';
  padding: 10px 40px 10px 16px;
  min-width: 260px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.dept-selector option {
  background: #fff;
  color: var(--text-main);
}
.dept-selector-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
}

/* LAYOUT */
.portal-main {
  padding: 16px 0 80px; /* Reduced top gap */
}

.shell {
  width: min(1200px, calc(100% - 32px));
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

#dashboardView {
  position: relative;
}

#dashboardView .portal-hero {
  position: sticky;
  top: calc(var(--app-header-offset) + 14px);
  z-index: 40;
  margin: 0 0 28px 0;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.74) 0%,
    rgba(248, 251, 255, 0.52) 52%,
    rgba(230, 242, 255, 0.34) 100%
  );
  box-shadow:
    0 22px 48px -20px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  overflow: hidden;
  isolation: isolate;
}

#dashboardView .portal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.72), transparent 26%),
    radial-gradient(circle at 86% 0%, rgba(20, 119, 201, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 46%);
}

#dashboardView .portal-hero::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

#dashboardView .portal-eyebrow,
#dashboardView .portal-heading-group,
#dashboardView .portal-title,
#dashboardView .portal-subtitle,
#dashboardView .portal-separator {
  position: relative;
  z-index: 1;
}

#dashboardView .portal-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 119, 201, 0.18);
  background: linear-gradient(180deg, rgba(235, 245, 255, 0.96) 0%, rgba(210, 231, 255, 0.82) 100%);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(20, 119, 201, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: var(--lr-blue-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

#dashboardView .portal-heading-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#dashboardView .portal-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  color: var(--lr-blue-dark);
  letter-spacing: -0.04em;
  line-height: 1.02;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.62);
  text-wrap: balance;
}

#dashboardView .portal-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(420px, 100%);
}

#dashboardView .portal-separator::before,
#dashboardView .portal-separator::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(20, 119, 201, 0),
    rgba(20, 119, 201, 0.26),
    rgba(20, 119, 201, 0)
  );
}

#dashboardView .portal-separator span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(20, 119, 201, 1), rgba(96, 165, 250, 0.7));
  box-shadow:
    0 0 0 5px rgba(20, 119, 201, 0.1),
    0 0 18px rgba(20, 119, 201, 0.18);
}

#dashboardView .portal-subtitle {
  max-width: 56ch;
  font-size: 15px;
  font-weight: 600;
  color: #4b5f75;
  margin: 0;
  line-height: 1.5;
}

#dashboardView #dashboardGrid {
  position: relative;
  z-index: 1;
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 24px;
  margin-top: 24px;
  justify-content: center;
}

.hero-card,
.program-card {
  position: relative;
  content-visibility: auto; /* Skip rendering until scrolled into view */
  contain-intrinsic-size: 380px; /* Rough estimate of card height to prevent scrollbar jumping */
  background: rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  max-width: none;
  margin: 0 auto;
  width: 100%;
  height: 100%;
}

.hero-card:hover,
.program-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 119, 201, 0.18);
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* Elevated Admin Card Glassmorphism - Solid, Sleek, Left-Aligned */
.dashboard-grid .admin-program-card {
  --card-theme: #38bdf8;
  --card-theme-soft: rgba(56, 189, 248, 0.08);
  --card-theme-glow: rgba(56, 189, 248, 0.2);
  --card-theme-border: rgba(125, 211, 252, 0.25);

  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, var(--card-theme-soft), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, rgba(9, 14, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 30px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.dashboard-grid .admin-program-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-theme-border);
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.7),
    0 8px 24px var(--card-theme-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.admin-program-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  height: 100%;
}

.admin-program-cap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--card-theme) 0%,
    rgba(255, 255, 255, 0.8) 20%,
    var(--card-theme) 40%,
    transparent 100%
  );
  opacity: 0.6;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  transform-origin: left center;
}

.dashboard-grid .admin-program-card:hover .admin-program-cap {
  opacity: 1;
  transform: scaleX(1.05);
}

.admin-program-header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 16px;
}

.admin-program-thumb {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.admin-program-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-program-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #f8fafc;
}

.admin-program-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 56px;
  gap: 0;
  flex: 1;
}

.admin-program-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 10px;
  min-height: 24px;
  margin: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-program-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-theme);
  box-shadow: 0 0 8px var(--card-theme-glow);
}

/* Custom isolated class - completely decoupled from .hero-title */
.admin-program-title {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2; /* <--- Just add this line */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

.admin-program-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  margin-top: auto;
}

.admin-program-meta-row {
  margin-top: 0;
  display: flex;
}

/* Contextual sizing for the universal pill component within the admin card */
.admin-program-meta-row .pill-capacity {
  width: 100%;
  justify-content: center;
  padding: 4px 10px;
  font-size: 10px;
  min-height: 24px;
}

.admin-program-actions {
  display: block;
  margin-top: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-manage-btn {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.admin-manage-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--card-theme-border);
  color: #ffffff;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-delete-cohort {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

.btn-delete-cohort:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.4);
  color: #f43f5e;
}

.btn-delete-cohort svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

@media (max-width: 640px) {
  .admin-program-header {
    gap: 14px;
  }

  .admin-program-thumb {
    border-radius: 18px;
  }

  .hero-title.admin-program-title {
    font-size: 17px;
    line-height: 1.35;
    max-width: none;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* <--- Just add this line */
    margin: 0;
  }

  .admin-program-kicker {
    font-size: 10px;
  }

  .admin-program-actions {
    display: block;
  }
}

@media (hover: none) {
  .hero-card:hover,
  .program-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow:
      0 18px 40px rgba(15, 23, 42, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.65);
  }

  .hero-card:active,
  .program-card:active {
    transform: scale(0.99);
  }
}

/* Dashboard card media */
.hero-image-wrap {
  width: 100%;
  height: 168px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    var(--lr-blue-soft);
  border-radius: 24px 24px 0 0;
}

.hero-title {
  margin: 0 auto;
  max-width: 94%;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: #0f172a;
  text-align: center;
  min-height: calc(1.16em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2; /* <--- Add this standard property */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}

.hero-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 45%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lr-blue);
  font-weight: 800;
  font-size: 32px;
  opacity: 0.5;
}

.hero-date-container {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 75%;
}

.hero-date-badge {
  background: rgba(255, 255, 255, 0.82);
  padding: 6px 10px;
  border-radius: 12px;
  text-align: center;
  line-height: 1.1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  color: var(--text-main);
  font-weight: 700;
  font-size: 16px;
  min-width: 42px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.hero-date-badge span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--lr-blue);
  margin-bottom: 2px;
}

.hero-date-badge.more-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 8px;
  min-width: auto;
  font-weight: 800;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 16px;
  text-align: center;
  flex: 1;
}

.hero-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3; /* <--- Just add this line */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

.hero-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-session-pill {
  min-width: 0;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 119, 201, 0.1);
  color: var(--lr-blue-dark);
  border: 1px solid rgba(20, 119, 201, 0.12);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-cta {
  flex-shrink: 0;
  min-width: 132px;
  font-size: 12px;
  padding: 8px 18px;
  white-space: nowrap;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(20, 119, 201, 0.22);
}

.primary.hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(20, 119, 201, 0.26);
}

/* --- SKELETON LOADING & ANIMATIONS --- */
.skeleton-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0 auto;
  min-height: 380px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.skeleton-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: #e2e8f0;
  position: relative;
  overflow: hidden;
}
.skeleton-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  align-items: center;
}
.skeleton-line {
  height: 14px;
  background: #e2e8f0;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.skeleton-line.title {
  height: 24px;
  width: 70%;
  margin-bottom: 8px;
  border-radius: 8px;
}
.skeleton-line.short {
  width: 50%;
}
.skeleton-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.5) 20%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.stagger-in {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* BUTTONS */
button.primary {
  background: linear-gradient(135deg, var(--lr-blue), var(--lr-blue-dark));
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 119, 201, 0.25);
  transition: transform 0.1s;
}
button.primary:hover {
  transform: translateY(-1px);
}
button.secondary {
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
button.secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Admin Exit button glass glow */
.admin-exit-glass {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.58) 100%);
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  color: #334155 !important;
  border-radius: 999px;
  padding: 6px 16px;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 22px rgba(56, 189, 248, 0.1);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.admin-exit-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.52), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 52%);
}

.admin-exit-glass:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(239, 246, 255, 0.78) 100%);
  border-color: rgba(125, 211, 252, 0.92) !important;
  color: #0f5ea0 !important;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(56, 189, 248, 0.1),
    0 0 28px rgba(168, 85, 247, 0.12);
}

.admin-exit-glass:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.95) !important;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(56, 189, 248, 0.16),
    0 0 28px rgba(168, 85, 247, 0.14);
}
.btn-book-glass {
  background: linear-gradient(135deg, var(--lr-blue), var(--lr-blue-dark));
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 119, 201, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.btn-book-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(20, 119, 201, 0.4);
  filter: brightness(1.1);
}

/* DETAIL VIEW */
.view-container {
  animation: fadeIn 0.4s ease;
}
.view-container.hidden {
  display: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.back-btn {
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  transition: all 0.2s;
  width: fit-content;
  max-width: fit-content;
  flex-shrink: 0;
  margin: 0;
}
.detail-header-bar .back-btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1;
}
.back-btn:hover {
  background: #f1f5f9;
  transform: translateX(-2px);
}

/* Admin-only glass back button */
.back-btn-glass {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.46) 100%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: var(--lr-blue-dark);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.back-btn-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 48%);
}

.back-btn-glass:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(239, 246, 255, 0.68) 100%);
  border-color: rgba(147, 197, 253, 0.95);
  color: var(--lr-blue);
  transform: translateX(-2px) translateY(-1px);
  box-shadow:
    0 14px 28px rgba(20, 119, 201, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 4px rgba(20, 119, 201, 0.08);
}

.detail-wrapper {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.94) 100%);
  border-radius: 24px;
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(191, 219, 254, 0.72);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--app-header-offset) - 32px);
  min-height: 680px;
  position: relative;
}

.detail-header-bar {
  position: absolute;
  top: 14px;
  right: 14px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 160;
  pointer-events: none;
}

.detail-close-btn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  min-height: unset;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.84);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.6) 100%);
  color: #0f5ea0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px) saturate(175%);
  -webkit-backdrop-filter: blur(18px) saturate(175%);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.detail-close-btn:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(125, 211, 252, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.82) 100%);
  color: var(--lr-blue);
  box-shadow:
    0 16px 30px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(56, 189, 248, 0.1);
}

.detail-close-btn:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.95);
  box-shadow:
    0 16px 30px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(56, 189, 248, 0.14);
}

.detail-close-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 16px;
}

.detail-content {
  padding: 14px 20px 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

#sessionDetail {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.detail-top-stack {
  flex: 0 0 auto;
  background: transparent;
  padding-top: 0;
  padding-bottom: 14px;
  position: sticky;
  top: 0;
  z-index: 150;
}

.detail-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 112px 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.detail-scroll-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 88px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
  background: linear-gradient(
    180deg,
    rgba(248, 251, 255, 0) 0%,
    rgba(248, 251, 255, 0.08) 44%,
    rgba(248, 251, 255, 0.32) 74%,
    rgba(248, 251, 255, 0.82) 100%
  );
}

.detail-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 0;
  margin-top: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease,
    transform 0.24s ease;
}

.detail-scroll-cue::before {
  display: none;
}

.detail-scroll-cue span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(219, 234, 254, 0.54) 100%);
  color: var(--lr-blue-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  white-space: nowrap;
}

.detail-scroll-cue svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  animation: detailScrollCueBob 1.6s ease-in-out infinite;
}

#sessionDetail.detail-has-overflow .detail-scroll-fade {
  opacity: 1;
  transform: translateY(0);
}

#sessionDetail.detail-has-overflow .detail-scroll-cue {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

#sessionDetail.detail-is-at-end .detail-scroll-fade {
  opacity: 0;
  transform: translateY(8px);
}

#sessionDetail.detail-is-at-end .detail-scroll-cue {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
}

/* Dashboard Scroll Overrides */
body.dash-has-overflow #dashScrollFade {
  opacity: 1;
  transform: translateY(0);
}
body.dash-has-overflow #dashScrollCue {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
body.dash-is-at-end #dashScrollFade {
  opacity: 0;
  transform: translateY(8px);
}
body.dash-is-at-end #dashScrollCue {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
}

/* Modal Sticky Scroll Cues */
.sticky-scroll-wrap {
  position: sticky;
  bottom: 0;
  height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 90;
  pointer-events: none;
  margin: 0;
  padding: 0;
}
.sticky-scroll-fade {
  position: absolute;
  left: -40px;
  right: -40px;
  bottom: 0;
  height: 80px;
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0) 0%,
    rgba(248, 250, 252, 0.9) 60%,
    rgba(248, 250, 252, 1) 100%
  );
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}
.sticky-scroll-cue {
  position: relative;
  margin-bottom: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease,
    transform 0.24s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(219, 234, 254, 0.54) 100%);
  color: var(--lr-blue-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
}

#modalBackdrop .sticky-scroll-cue {
  margin-bottom: 10px;
}

#consentModalBackdrop .sticky-scroll-cue {
  margin-bottom: 18px;
}

#consentModalBackdrop .consent-modal-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

#consentModalBackdrop .consent-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 !important;
  background: #f8fafc !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Build a physical runway at the end of the content so it can scroll all the way down */
#consentModalBackdrop .consent-modal-scroll::after {
  content: '';
  display: block;
  height: 90px;
  flex-shrink: 0;
}

#consentModalBackdrop .sticky-scroll-wrap {
  z-index: 120 !important;
  bottom: 76px !important;
  margin-bottom: 0 !important;
}

#consentModalBackdrop .sticky-scroll-fade {
  bottom: -76px !important;
  height: 160px !important;
}

#consentModalBackdrop .sticky-scroll-cue {
  width: auto;
  max-width: max-content;
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
  z-index: 2;
}

#consentModalBackdrop .consent-modal-actions {
  position: absolute !important;
  bottom: 0 !important;
  left: auto !important;
  right: auto !important;
  z-index: 130 !important;
  flex: 0 0 auto !important;
  width: 100%;
  margin: 0 !important;
  padding: 12px 32px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  border-radius: 0 0 20px 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.95) !important;
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.78) 0%,
    rgba(255, 255, 255, 0.96) 34%,
    rgba(255, 255, 255, 0.99) 100%
  ) !important;
  box-shadow:
    0 -10px 24px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  transform: none !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  flex-direction: row !important;
  flex-wrap: wrap;
}

#consentModalBackdrop .consent-modal-actions::before {
  display: none !important;
  content: none !important;
}

#consentModalBackdrop .consent-modal-actions .secondary,
#consentModalBackdrop .consent-modal-actions .primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  position: relative;
  z-index: 1;
  width: auto;
}

@media (max-width: 768px) {
  #consentModalBackdrop .consent-modal-actions {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    margin: 0 !important;
    /* Tighter padding to slim the footer down while locking flush to the bottom */
    padding: 12px 20px 16px !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.05) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 0 !important; /* Removes phantom flex gap from the hidden cancel button */
  }

  #consentModalBackdrop .consent-modal-actions .secondary {
    display: none !important;
  }

  #consentModalBackdrop .consent-modal-actions .primary {
    width: 100% !important;
    flex: 1 1 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
  }

  /* Dock the scroll pill securely above the new absolute footer */
  #consentModalBackdrop .sticky-scroll-wrap {
    bottom: 76px !important;
    margin-bottom: 0 !important;
  }

  /* Drop the cue lower so it sits cleanly */
  #consentModalBackdrop .sticky-scroll-cue {
    margin-bottom: 6px !important;
  }

  /* Expand the fade height to transition cleanly above the absolute footer */
  #consentModalBackdrop .sticky-scroll-fade {
    bottom: -76px !important;
    height: 120px !important;
  }

  /* Restore the invisible scrolling runway so content clears the absolute footer */
  #consentModalBackdrop .consent-modal-scroll::after {
    display: block !important;
    height: 80px !important;
  }
}

.sticky-scroll-cue svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  animation: detailScrollCueBob 1.6s ease-in-out infinite;
}
.modal-scroll-area.has-overflow .sticky-scroll-fade {
  opacity: 1;
  transform: translateY(0);
}
.modal-scroll-area.has-overflow .sticky-scroll-cue {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.modal-scroll-area.is-at-end .sticky-scroll-fade {
  opacity: 0;
  transform: translateY(8px);
}
.modal-scroll-area.is-at-end .sticky-scroll-cue {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

@keyframes detailScrollCueBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.detail-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 156px;
  padding: 18px 72px 18px 18px;
  border-radius: 24px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(239, 246, 255, 0.72) 100%);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  overflow: hidden;
}

.detail-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.56), transparent 34%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 26%),
    linear-gradient(135deg, rgba(20, 119, 201, 0.08), transparent 58%);
}

.detail-hero-card.no-image {
  grid-template-columns: 1fr;
  padding-left: 22px;
}

.detail-hero-media,
.detail-hero-copy {
  position: relative;
  z-index: 1;
}

.detail-hero-media {
  width: 124px;
  height: 124px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.3s ease;
}

.detail-hero-media:hover .detail-hero-img {
  transform: scale(1.02);
}

.detail-hero-copy {
  min-width: 0;
}

.detail-main-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  color: var(--lr-blue-dark);
  text-align: left;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
  text-wrap: balance;
}

/* --- ADMIN SESSION ROWS --- */
.admin-session-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.admin-session-actions-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.admin-session-main {
  min-width: 0;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.admin-session-inline-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.admin-session-datetime-inline {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.admin-session-location {
  min-width: 0;
  max-width: 280px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}

.admin-session-location span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-session-actions-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.admin-session-row .btn-admin-copy,
.admin-session-row .btn-view-attendees,
.admin-session-row .pill-capacity {
  max-width: 100%;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .admin-session-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-session-actions-left,
  .admin-session-main,
  .admin-session-actions-right {
    justify-content: flex-start;
  }

  .admin-session-inline-meta,
  .admin-session-actions-right {
    flex-wrap: wrap;
  }

  .admin-session-row .btn-admin-copy,
  .admin-session-row .btn-view-attendees,
  .admin-session-row .pill-capacity {
    width: 100%;
    justify-content: center;
  }
}

.session-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 251, 255, 0.85) 100%);
  border: 1px solid rgba(191, 219, 254, 0.6);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 8px 24px -4px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  z-index: 1;
}

.session-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top right, rgba(147, 197, 253, 0.15), transparent 40%);
  pointer-events: none;
  z-index: 0;
}
.session-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px -4px rgba(20, 119, 201, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  border-color: rgba(147, 197, 253, 0.8);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.9) 100%);
  z-index: 2;
}

.sess-date-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 3;
  overflow: visible;
}

.sess-date-wrap:hover,
.sess-date-wrap:focus-within {
  z-index: 140;
}

.sess-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  border-radius: 18px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(239, 246, 255, 0.76) 100%);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(191, 219, 254, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  cursor: help;
  outline: none;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.sess-date-wrap:hover .sess-date-block,
.sess-date-wrap:focus-within .sess-date-block {
  transform: translateY(-1px);
  border-color: rgba(147, 197, 253, 0.92);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(147, 197, 253, 0.34),
    0 0 0 6px rgba(20, 119, 201, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.sess-date-block::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.58), transparent 38%),
    linear-gradient(135deg, rgba(20, 119, 201, 0.08), transparent 55%);
  pointer-events: none;
}

.session-card.has-open-date-popover {
  transform: none !important;
  z-index: 80 !important;
  overflow: visible !important;
}

.sess-date-popover {
  position: fixed;
  left: 0;
  top: 0;
  width: 248px;
  padding: 12px 14px 10px;
  border-radius: 20px;
  border: 1px solid rgba(191, 219, 254, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(239, 246, 255, 0.88) 100%);
  box-shadow:
    0 26px 44px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px) saturate(175%);
  -webkit-backdrop-filter: blur(18px) saturate(175%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1200;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.sess-date-popover.is-visible {
  opacity: 1;
  visibility: visible;
}

.sess-date-popover.opens-up {
  transform: translateY(8px) scale(0.985);
  transform-origin: bottom center;
}

.sess-date-popover.opens-down {
  transform: translateY(-8px) scale(0.985);
  transform-origin: top center;
}

.sess-date-popover.is-visible.opens-up,
.sess-date-popover.is-visible.opens-down {
  transform: translateY(0) scale(1);
}

.sess-date-popover::before,
.sess-date-popover::after {
  z-index: 0;
}

.sess-date-popover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.58), transparent 36%),
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.24), transparent 26%),
    linear-gradient(135deg, rgba(20, 119, 201, 0.08), transparent 58%);
  pointer-events: none;
}

.sess-date-popover.opens-up::after {
  content: '';
  position: absolute;
  left: var(--sess-popover-arrow-left, 50%);
  top: 100%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%) translateY(-9px) rotate(45deg);
  border-right: 1px solid rgba(191, 219, 254, 0.42);
  border-bottom: 1px solid rgba(191, 219, 254, 0.42);
  background: rgba(239, 246, 255, 0.9);
  box-shadow: 10px 10px 24px rgba(15, 23, 42, 0.04);
  pointer-events: none;
}

.sess-date-popover.opens-down::after {
  content: '';
  position: absolute;
  left: var(--sess-popover-arrow-left, 50%);
  bottom: 100%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%) translateY(9px) rotate(45deg);
  border-left: 1px solid rgba(191, 219, 254, 0.42);
  border-top: 1px solid rgba(191, 219, 254, 0.42);
  background: rgba(239, 246, 255, 0.9);
  box-shadow: -10px -10px 24px rgba(15, 23, 42, 0.04);
  pointer-events: none;
}

.sess-date-popover-header,
.sess-mini-cal-weekdays,
.sess-mini-cal-grid,
.sess-date-popover-footer {
  position: relative;
  z-index: 1;
}

.sess-date-popover-header {
  margin-bottom: 10px;
}

.sess-date-popover-date {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sess-mini-cal-weekdays,
.sess-mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.sess-mini-cal-weekdays {
  margin-bottom: 8px;
}

.sess-mini-cal-weekdays span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.sess-mini-cal-grid {
  gap: 6px 0;
}

.sess-mini-cal-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.sess-mini-cal-day.is-empty {
  opacity: 0;
}

.sess-mini-cal-day.is-today {
  background: rgba(255, 255, 255, 0.55);
  color: #0f5ea0;
  box-shadow: inset 0 0 0 1.5px rgba(20, 119, 201, 0.35);
}

.sess-mini-cal-day.is-session {
  background: linear-gradient(180deg, var(--lr-blue), var(--lr-blue-dark));
  color: #ffffff;
  box-shadow:
    0 10px 18px rgba(20, 119, 201, 0.26),
    0 0 0 4px rgba(20, 119, 201, 0.1);
}

.sess-mini-cal-day.is-session.is-today {
  box-shadow:
    0 10px 18px rgba(20, 119, 201, 0.26),
    0 0 0 4px rgba(20, 119, 201, 0.1),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.72);
}

.sess-date-popover-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(191, 219, 254, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.sess-date-popover-legend-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sess-date-popover-legend {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lr-blue), var(--lr-blue-dark));
  box-shadow: 0 0 0 4px rgba(20, 119, 201, 0.1);
  flex-shrink: 0;
}

.sess-date-popover-distance {
  flex-shrink: 0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.sess-date-popover-distance {
  flex-shrink: 0;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.sess-month {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--lr-blue);
  margin-bottom: 3px;
  letter-spacing: 0.08em;
}

.sess-day {
  position: relative;
  z-index: 1;
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.03em;
}

.sess-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.sess-time-glass {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(239, 246, 255, 0.68) 100%);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
}

.sess-time-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.48), transparent 34%),
    linear-gradient(135deg, rgba(20, 119, 201, 0.06), transparent 48%);
  pointer-events: none;
}

.sess-time-type-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.sess-time {
  min-width: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--lr-blue-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}

.sess-type-row {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #526277;
  font-weight: 700;
  min-width: 0;
}

.sess-type-row svg {
  flex-shrink: 0;
}

.sess-type-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sess-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #64748b;
}

.sess-action {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: auto;
  margin-left: auto;
  position: relative;
  z-index: 2;
}

.sess-action .btn-book-glass {
  min-width: 204px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}

/* --- UNIFIED CAPACITY PILLS (x/y Booked) --- */
.pill-capacity {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px) saturate(175%);
  -webkit-backdrop-filter: blur(16px) saturate(175%);
  transition: all 0.22s ease;
}

.pill-capacity::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 56%);
}

.pill-capacity svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.pill-capacity > * {
  position: relative;
  z-index: 1;
}

.sess-spots-pill.pill-capacity {
  min-height: 32px;
  padding: 8px 12px;
  align-self: center;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.cap-open {
  color: #0369a1;
  border-color: rgba(186, 230, 253, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(224, 242, 254, 0.72) 100%);
} /* No limit */

.cap-low {
  color: #166534;
  border-color: rgba(187, 247, 208, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(220, 252, 231, 0.72) 100%);
} /* 0-49% */

.cap-med {
  color: #b45309;
  border-color: rgba(253, 230, 138, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(254, 243, 199, 0.76) 100%);
} /* 50-79% */

.cap-high {
  color: #c2410c;
  border-color: rgba(253, 186, 116, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 237, 213, 0.78) 100%);
} /* 80-99% */

.cap-full {
  color: #991b1b;
  border-color: rgba(252, 165, 165, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(254, 226, 226, 0.8) 100%);
} /* 100%+ */

.handout-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.handout-pill:hover {
  background: #fff;
  border-color: var(--lr-blue);
  color: var(--lr-blue);
}

/* --- CUSTOM NOTES TOOLTIP --- */
.note-tooltip-wrapper {
  position: relative;
  display: inline-flex;
  cursor: help;
  margin-top: 4px;
}
.note-tooltip-glass {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: max-content;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  color: #334155;
  text-align: left;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.note-tooltip-glass::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}
.note-tooltip-wrapper:hover .note-tooltip-glass {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Shared behavior for Icon Buttons */
.icon-tooltip-wrapper {
  position: relative;
  display: inline-flex;
}
.icon-tooltip-wrapper:hover .note-tooltip-glass {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- FORMS --- */

.program-consultation-section {
  position: relative;
  margin-top: 20px;
  margin-bottom: 4px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.68);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(239, 246, 255, 0.68) 100%);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
}

.program-consultation-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.52), transparent 34%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(20, 119, 201, 0.08), transparent 52%);
}

.program-consultation-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
}

.program-consultation-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lr-blue);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(219, 234, 254, 0.92) 100%);
  border: 1px solid rgba(191, 219, 254, 0.9);
  box-shadow:
    0 12px 24px rgba(20, 119, 201, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.program-consultation-copy {
  min-width: 0;
}

.program-consultation-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 6px;
}

.program-consultation-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: 4px;
}

.program-consultation-subtext {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.program-consultation-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(219, 234, 254, 0.92) 100%);
  color: var(--lr-blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow:
    0 10px 20px rgba(20, 119, 201, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  white-space: nowrap;
}

.program-description-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #e2e8f0;
}
.desc-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.program-desc-block {
  line-height: 1.7;
  color: #334155;
  font-size: 15px;
}

@media (max-width: 600px) {
  .program-consultation-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .program-consultation-icon {
    width: 50px;
    height: 50px;
  }

  .program-consultation-title {
    font-size: 18px;
  }

  .program-consultation-pill {
    justify-self: flex-start;
  }
}

/* MODAL */
#modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 2000;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  overscroll-behavior: none;
}
#modalBackdrop.hidden {
  display: none;
}

body.booking-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.modal {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: min(720px, calc(100vw - 48px));
  max-width: 720px;
  height: 90vh;
  height: 90dvh;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin: 0 auto;
  min-height: 0;
}

@media (max-width: 768px) {
  #modalBackdrop {
    top: var(--app-header-offset);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    align-items: stretch;
    flex-direction: column;
  }

  .modal {
    width: 100%;
    max-width: 680px;
    height: 100%;
    max-height: none;
    margin: 0 auto;
    flex: 1 1 auto;
  }
}

.modal-header {
  position: relative;
  height: 160px;
  display: flex;
  align-items: flex-end;
  padding: 24px 32px;
  background-color: var(--lr-blue);
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  overflow: hidden;
  color: white;
}
.modal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.85));
  backdrop-filter: blur(3px);
  z-index: 1;
}
.modal-title {
  position: relative;
  z-index: 2;
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin: 0;
  line-height: 1.2;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

.modal-scroll-area {
  padding: 32px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  background: linear-gradient(to bottom, #f8fafc, #eef2ff);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

#modalBackdrop .modal-scroll-area {
  padding: 32px 32px 0 32px;
}

.modal-scroll-area > form {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 32px;
}

/* Form Cards */
.form-section-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(191, 219, 254, 0.7);
  border-top: 4px solid var(--lr-blue);
}

.form-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--lr-blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.form-grid-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 18px;
}

.form-row {
  min-width: 0;
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-row input,
.form-row select,
.form-row textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  color: #0f172a;
  line-height: 1.45;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-row textarea {
  min-height: 132px;
  resize: vertical;
}

.form-row select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231477c9' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #94a3b8;
}

.form-row input:hover,
.form-row select:hover,
.form-row textarea:hover {
  border-color: #93c5fd;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.03),
    0 0 0 3px rgba(20, 119, 201, 0.04);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--lr-blue);
  background: #ffffff;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.03),
    0 0 0 4px rgba(20, 119, 201, 0.12);
  transform: none;
}

.form-row input.invalid,
.form-row select.invalid,
.form-row textarea.invalid {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.validation-msg {
  font-size: 11px;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}
.form-row input.invalid + .validation-msg {
  display: block;
}
.helper-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}
.session-select-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.session-option:hover {
  background: #f8fbff;
  border-color: var(--lr-blue-soft);
}

.session-option.selected {
  background: #eff6ff;
  border-color: var(--lr-blue);
}

.session-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--lr-blue);
}
.session-date {
  font-weight: 700;
  color: #1e293b;
  font-size: 14px;
}

.session-spots {
  font-size: 12px;
  color: #64748b;
}

.session-spots.booking-session-spots-pill {
  margin-left: auto;
  min-height: 32px;
  padding: 8px 12px;
  font-size: 11.5px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  border-width: 1px;
  border-style: solid;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px) saturate(175%);
  -webkit-backdrop-filter: blur(16px) saturate(175%);
  transition: all 0.22s ease;
}

/* Force colors to override the generic gray text */
.session-spots.booking-session-spots-pill.cap-open {
  color: #0369a1 !important;
  border-color: rgba(186, 230, 253, 0.95) !important;
}
.session-spots.booking-session-spots-pill.cap-low {
  color: #166534 !important;
  border-color: rgba(187, 247, 208, 0.95) !important;
}
.session-spots.booking-session-spots-pill.cap-med {
  color: #b45309 !important;
  border-color: rgba(253, 230, 138, 0.95) !important;
}
.session-spots.booking-session-spots-pill.cap-high {
  color: #c2410c !important;
  border-color: rgba(253, 186, 116, 0.95) !important;
}
.session-spots.booking-session-spots-pill.cap-full {
  color: #991b1b !important;
  border-color: rgba(252, 165, 165, 0.95) !important;
}

.session-spots.booking-session-spots-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 56%);
}

.session-details-text {
  flex: 1;
  min-width: 0;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
}

.checkbox-label {
  font-size: 12px;
  color: #334155;
  line-height: 1.6;
  cursor: pointer;
}

.consent-action-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.consent-action-copy {
  min-width: 0;
}

.consent-action-label {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.consent-action-subtext {
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
}

.consent-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
}

.consent-status-pill.complete {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.consent-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.95;
  flex-shrink: 0;
}

.consent-sheet {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.1);
}

.consent-version-badge {
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.consent-sheet-body {
  padding: 24px 24px 20px;
}

/* Improved Typography for Legal Terms */
.consent-terms-list {
  padding-left: 18px;
  margin: 14px 0 16px;
}

.consent-terms-list li {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
  padding-left: 6px;
}

.consent-terms-list li::marker {
  font-weight: 700;
  color: #94a3b8;
}

.consent-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.consent-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.consent-summary-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 4px;
}

.consent-summary-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.32;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* --- SIGNATURE AREA OPTIMIZATIONS --- */
.consent-signature-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr); /* Hard lock the left sidebar, let the canvas flex infinitely */
  gap: 24px;
  align-items: stretch;
}

.consent-signature-panel {
  min-width: 0; /* Prevents internal flex blowouts */
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px; /* Slightly more premium breathing room */
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
}

.consent-signature-panel:first-child {
  justify-content: flex-start;
}

.consent-signature-panel:first-child .form-row:last-child {
  margin-bottom: 0;
}

.consent-signature-panel:last-child > div:first-child {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px !important;
}

#consentClearBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  min-height: unset;
  padding: 0 !important;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#consentClearBtn:hover,
#consentClearBtn:focus {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
  outline: none;
}

/* Magically reveal the button only when ink is detected! */
.consent-signature-canvas-wrap.has-ink #consentClearBtn {
  opacity: 1;
  visibility: visible;
}

.consent-signature-panel:last-child .form-row {
  min-width: 0;
}

.consent-signature-canvas-wrap {
  background: linear-gradient(180deg, #fcfdff 0%, #f8fbff 100%);
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  margin-top: 0;
  min-height: 260px;
  box-shadow: inset 0 2px 6px rgba(15, 23, 42, 0.06);
  touch-action: none;
}

.consent-signature-canvas-wrap:hover,
.consent-signature-canvas-wrap:focus-within {
  border-color: var(--lr-blue);
  background: #ffffff;
  box-shadow:
    inset 0 2px 8px rgba(20, 119, 201, 0.08),
    0 0 0 4px rgba(20, 119, 201, 0.06);
}

.consent-signature-canvas-wrap::before {
  content: 'Draw signature here';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Lexend', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #cbd5e1;
  pointer-events: none;
  z-index: 0;
  letter-spacing: 0.04em;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.consent-signature-canvas-wrap::after {
  content: '';
  position: absolute;
  bottom: 28px;
  left: 8%;
  right: 8%;
  border-bottom: 2px solid #cbd5e1;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease;
}

.consent-signature-canvas-wrap.has-ink::before,
.consent-signature-canvas-wrap.has-ink::after {
  opacity: 0;
}

.consent-signature-canvas-wrap canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 260px;
  background: transparent;
  cursor: crosshair;
  touch-action: none;
  position: relative;
  z-index: 1;
}

.consent-signature-panel:last-child .helper-text {
  text-align: center;
  margin-top: 10px !important;
  font-size: 12px;
}

.consent-signature-panel:last-child .checkbox-row {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
  background: #fff !important;
  border-color: #cbd5e1 !important;
}

@media (max-width: 900px) {
  .consent-signature-grid {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 32px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.78) 0%,
    rgba(255, 255, 255, 0.96) 34%,
    rgba(255, 255, 255, 0.99) 100%
  );
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  box-shadow:
    0 -10px 24px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  flex-wrap: wrap;
}

.form-actions::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  height: 20px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0) 0%, rgba(238, 242, 255, 0.92) 100%);
}

/* FIX: Hide the white scroll fade specifically on the dark consent config modal */
#consentConfigModalCard .form-actions::before {
  display: none !important;
}

.form-actions .secondary,
.form-actions .primary {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .modal-scroll-area {
    padding: 20px 20px 0 20px;
  }

  #modalBackdrop .modal-scroll-area {
    padding: 20px 20px 0 20px;
  }

  .modal-scroll-area > form {
    padding-bottom: 20px;
  }

  .form-actions {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .form-actions .secondary {
    display: none !important;
  }

  .form-actions .primary {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }
}

/* --- BRAND ASSETS / GLASS PANEL --- */
.brand-assets-card {
  position: relative;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-top: 4px solid var(--lr-blue);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 251, 255, 0.9) 100%);
  box-shadow:
    0 16px 32px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.brand-assets-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(20, 119, 201, 0.09), transparent 34%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.09), transparent 26%);
  pointer-events: none;
}

.brand-assets-card.expanded {
  padding-bottom: 18px;
}

.collapsible-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
  margin-bottom: 0;
}

.collapsible-card-title {
  min-width: 0;
  flex: 1;
}

.collapsible-card-title .form-section-title {
  margin: 0;
  padding: 0;
  border-bottom: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--lr-blue-dark);
}

.brand-assets-subtle-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 119, 201, 0.08);
  border: 1px solid rgba(20, 119, 201, 0.12);
  color: #33658a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.collapsible-chevron-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(186, 230, 253, 0.9);
  background: rgba(255, 255, 255, 0.7);
  color: var(--lr-blue-dark);
  cursor: pointer;
  transition: all 0.22s ease;
  flex-shrink: 0;
  padding: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 6px 14px rgba(20, 119, 201, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.collapsible-chevron-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  border-color: #93c5fd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 18px rgba(20, 119, 201, 0.14);
}

.collapsible-chevron-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  line-height: 1;
  color: currentColor;
  transform-origin: 50% 50%;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-chevron-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
}

.collapsible-chevron-btn[aria-expanded='false'] .collapsible-chevron-icon {
  transform: rotate(-90deg);
}

.collapsible-chevron-btn[aria-expanded='true'] .collapsible-chevron-icon {
  transform: rotate(0deg);
}

.collapsible-card-body {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  max-height: 1200px;
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  visibility: visible;
  transition:
    max-height 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.22s ease,
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s;
  will-change: max-height, opacity, transform;
}

.collapsible-card-body.hidden {
  display: block;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transform: translateY(-8px);
  visibility: hidden;
  pointer-events: none;
  transition:
    max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.18s ease,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .collapsible-card-body,
  .collapsible-card-body.hidden {
    transition: none !important;
    transform: none !important;
  }
}

/* Expanded Brand Assets polish */
.brand-assets-intro {
  margin: 0 0 18px;
  color: #5b7086;
  font-size: 13px;
  line-height: 1.7;
}

.brand-assets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.brand-asset-panel {
  position: relative;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(191, 219, 254, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(239, 246, 255, 0.6) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 28px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-asset-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.55), transparent 38%);
  pointer-events: none;
  border-radius: inherit;
}

.brand-asset-panel > * {
  position: relative;
  z-index: 1;
}

.brand-asset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.brand-asset-title-wrap {
  min-width: 0;
}

.brand-asset-label {
  display: block;
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  text-transform: none;
}

.brand-asset-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
}

.brand-asset-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 119, 201, 0.09);
  color: var(--lr-blue-dark);
  border: 1px solid rgba(20, 119, 201, 0.12);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.brand-assets-card .dropzone {
  min-height: 168px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(233, 243, 255, 0.72) 100%);
  border: 1.5px dashed rgba(147, 197, 253, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 22px rgba(20, 119, 201, 0.06);
}

.brand-assets-card .dropzone::before {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 26%),
    radial-gradient(circle at bottom right, rgba(20, 119, 201, 0.1), transparent 34%);
}

.brand-assets-card .dropzone:hover,
.brand-assets-card .dropzone.dragover {
  transform: translateY(-3px);
  border-color: rgba(20, 119, 201, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(224, 242, 254, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 16px 28px rgba(20, 119, 201, 0.13);
}

.brand-assets-card .dropzone.has-file {
  border-style: solid;
  border-color: rgba(125, 211, 252, 0.9);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.96) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 16px 30px rgba(20, 119, 201, 0.1);
}

.brand-assets-card .dropzone-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 18px rgba(20, 119, 201, 0.08);
}

.brand-assets-card .dropzone-title {
  font-size: 17px;
  line-height: 1.25;
}

.brand-assets-card .dropzone-copy {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.65;
}

.brand-assets-card .dropzone-helper {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.brand-assets-card .file-preview {
  margin-top: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(191, 219, 254, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 10px 18px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand-assets-actions {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.brand-assets-actions .primary {
  min-width: 190px;
  box-shadow: 0 10px 24px rgba(20, 119, 201, 0.22);
}

@media (max-width: 768px) {
  .brand-assets-grid {
    grid-template-columns: 1fr;
  }

  .brand-asset-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-assets-actions .primary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .consent-action-card,
  .consent-summary-grid,
  .consent-signature-grid {
    grid-template-columns: 1fr;
  }
}

.loading-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0f2fe;
  border-top-color: var(--lr-blue);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 16px;
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
.empty-state {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  font-size: 14px;
}

/* --- ADMIN PORTAL STREAMLINED MARINE COMMAND DECK --- */
.admin-view-shell {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto -80px; /* Eats the 80px bottom padding of the wrapper to permanently lock the page scroll */
  height: calc(
    100dvh - var(--app-header-offset) - 16px
  ); /* Perfect height filling the remaining space below the natural top gap */
  min-height: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  animation: none;
}

/* Deep navy submarine glass background for the main admin portal */
.admin-view-shell::before {
  content: '';
  position: fixed;
  top: 0; /* Slide to 0 so it securely underlaps the solid header, fixing browser zoom rendering gaps */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.15), transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(167, 139, 250, 0.1), transparent 50%),
    linear-gradient(135deg, #090e17 0%, #0f172a 40%, #020617 100%);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
}

.admin-view-frame {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
  height: 100%;
  overflow: hidden;
  padding-right: 0;
}

.admin-view-fixed {
  position: relative;
  z-index: 150;
  flex: 0 0 auto;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.admin-results-scroll,
#adminResultsArea {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  padding: 8px 16px 60px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#adminResultsArea .dashboard-grid {
  margin-top: 8px;
  align-content: start;
}

.admin-command-deck {
  position: relative;
  margin: 0 16px 8px 16px; /* Tightened bottom margin */
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at top left, rgba(125, 211, 252, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(167, 139, 250, 0.12), transparent 28%),
    linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.92) 0%,
      rgba(26, 39, 63, 0.88) 46%,
      rgba(31, 45, 72, 0.84) 100%
    );
  box-shadow:
    0 24px 44px rgba(15, 23, 42, 0.18),
    0 10px 24px rgba(30, 41, 59, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -20px 40px rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  overflow: hidden;
  isolation: isolate;
}

.admin-command-deck::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.02) 26%,
      rgba(255, 255, 255, 0) 100%
    ),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.16), transparent 24%),
    radial-gradient(circle at 82% 100%, rgba(56, 189, 248, 0.1), transparent 26%);
}

.admin-command-deck::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-command-deck-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 0;
}

.admin-command-deck-body {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-command-copy {
  flex: 0 0 auto;
  min-width: 260px;
  max-width: 320px;
}

.admin-command-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(186, 230, 253, 0.1);
  border: 1px solid rgba(186, 230, 253, 0.18);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-command-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fbff;
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(125, 211, 252, 0.12);
}

.admin-command-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.84);
}

.admin-command-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex: 1 1 auto;
  width: 100%;
}

.admin-glass-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 84px;
  padding: 12px 8px;
  border-radius: 20px;
  font-family: 'Lexend', sans-serif;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 10px 30px rgba(2, 6, 23, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.admin-glass-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  pointer-events: none;
}

.admin-glass-btn:hover {
  transform: translateY(-4px);
}

.admin-glass-btn:hover::before {
  opacity: 1;
}

.admin-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.admin-btn-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 2px;
}

.admin-btn-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.btn-glow-cyan {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}
.btn-glow-cyan:hover {
  border-color: rgba(56, 189, 248, 0.8);
  color: #ffffff;
  box-shadow:
    0 14px 34px rgba(14, 165, 233, 0.3),
    0 0 20px rgba(56, 189, 248, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-glow-emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}
.btn-glow-emerald:hover {
  border-color: rgba(52, 211, 153, 0.8);
  color: #ffffff;
  box-shadow:
    0 14px 34px rgba(16, 185, 129, 0.3),
    0 0 20px rgba(52, 211, 153, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-glow-purple {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(192, 132, 252, 0.4);
  color: #e9d5ff;
}
.btn-glow-purple:hover {
  border-color: rgba(192, 132, 252, 0.8);
  color: #ffffff;
  box-shadow:
    0 14px 34px rgba(168, 85, 247, 0.3),
    0 0 20px rgba(192, 132, 252, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-glow-rose {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(251, 113, 133, 0.4);
  color: #fecdd3;
}
.btn-glow-rose:hover {
  border-color: rgba(251, 113, 133, 0.8);
  color: #ffffff;
  box-shadow:
    0 14px 34px rgba(244, 63, 94, 0.3),
    0 0 20px rgba(251, 113, 133, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.admin-command-toolbar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(500px, 1fr);
  gap: 14px;
  align-items: end;
}

.admin-search-shell,
.admin-toolbar-field,
.admin-toolbar-action {
  min-width: 0;
}

.admin-toolbar-action {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.admin-command-label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfe7fb;
}

.admin-command-label-ghost {
  opacity: 0.72;
}

.admin-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(191, 219, 254, 0.92);
  pointer-events: none;
  z-index: 1;
}

.admin-search-input-wrap input,
.admin-command-filters select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.1) 100%
  ) !important;
  color: #f8fbff !important;
  font-family: 'Lexend', sans-serif !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 22px rgba(2, 6, 23, 0.14) !important;
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.admin-search-input-wrap input {
  padding: 0 44px 0 44px !important;
}

.admin-search-input-wrap input::placeholder {
  color: rgba(226, 232, 240, 0.58) !important;
}

.admin-search-input-wrap .search-clear-btn {
  position: absolute;
  right: 12px;
  width: 24px;
  height: 24px;
  min-height: unset;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 6, 23, 0.14);
  transition: all 0.2s ease;
  z-index: 2;
}

.admin-search-input-wrap .search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: scale(1.08);
}

.admin-search-input-wrap .search-clear-btn.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.8);
}

.admin-command-filters select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 40px 0 14px !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cfe7fb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-position:
    right 14px center,
    0 0 !important;
  background-size:
    16px 16px,
    100% 100% !important;
  cursor: pointer;
}

.admin-search-input-wrap input:hover,
.admin-search-input-wrap input:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.58) !important;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.12) 100%
  ) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 26px rgba(2, 6, 23, 0.18),
    0 0 0 4px rgba(56, 189, 248, 0.08) !important;
}

.admin-command-filters select:hover,
.admin-command-filters select:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.58) !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23cfe7fb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.12) 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 26px rgba(2, 6, 23, 0.18),
    0 0 0 4px rgba(56, 189, 248, 0.08) !important;
}

.admin-command-filters select option {
  background: #0f172a !important;
  color: #f8fafc !important;
}

.admin-command-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: end;
}

.admin-sync-btn {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.1) 100%);
  color: rgba(191, 219, 254, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 22px rgba(2, 6, 23, 0.14);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  transition: all 0.22s ease;
  cursor: pointer;
}

.admin-sync-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  line-height: 1;
}

.admin-sync-btn-icon svg {
  width: 100%;
  height: 100%;
}

.admin-sync-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.12) 100%);
  border-color: rgba(125, 211, 252, 0.58);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 26px rgba(2, 6, 23, 0.18),
    0 0 0 4px rgba(56, 189, 248, 0.08);
}

@media (max-width: 980px) {
  .admin-command-deck-head {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 20px;
  }

  .admin-command-copy {
    max-width: none;
  }

  .admin-command-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-command-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
  }
}

@media (max-width: 768px) {
  /* Hide secondary filters, keep only the search bar */
  .admin-command-filters {
    display: none !important;
  }

  .admin-view-fixed {
    top: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .admin-command-deck {
    padding: 16px;
    border-radius: 20px;
  }

  /* Force Header into a single row on mobile */
  .admin-command-deck-head {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
    gap: 12px !important;
  }

  .admin-command-copy {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  /* Hide text elements to save vertical space */
  .admin-command-title,
  .admin-command-subtitle {
    display: none !important;
  }

  .admin-command-kicker {
    margin-bottom: 0 !important;
  }

  /* Convert buttons to a row of squircle icons */
  .admin-command-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: auto !important;
  }

  .admin-glass-btn {
    min-height: unset !important;
    height: 40px !important;
    width: 40px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .admin-btn-text {
    display: none !important;
  }

  .admin-btn-icon {
    margin-bottom: 0 !important;
    display: flex !important;
  }

  .admin-btn-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Tighten inner spacing above the search bar */
  .admin-command-deck-body {
    margin-top: 12px !important;
    padding-top: 12px !important;
  }

  .admin-results-scroll {
    max-height: none;
    overflow: visible;
    padding-top: 0;
  }
}

.admin-results-area {
  padding-bottom: 24px;
}

/* --- ADMIN FILTER DARK GLASS --- */
.admin-filter-glass {
  position: relative;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: linear-gradient(180deg, rgba(16, 46, 74, 0.75) 0%, rgba(11, 28, 48, 0.6) 100%);
  box-shadow:
    0 16px 40px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 20px rgba(20, 119, 201, 0.1);
  backdrop-filter: blur(24px) saturate(175%);
  -webkit-backdrop-filter: blur(24px) saturate(175%);
  overflow: hidden;
  margin-bottom: 20px;
}

.admin-filter-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), transparent 40%),
    radial-gradient(circle at bottom right, rgba(20, 119, 201, 0.15), transparent 40%);
}

.admin-filter-glass .form-section-title {
  color: #e0f2fe;
  border-bottom: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.06em;
}

.admin-filter-glass label {
  color: #bae6fd;
  font-family: 'Lexend', sans-serif !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- SEARCH INPUT WRAPPER & CLEAR BUTTON --- */
.admin-filter-glass .search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-filter-glass .search-input-wrapper input {
  padding-right: 42px; /* Make room for the clear button */
}

.admin-filter-glass .search-clear-btn {
  position: absolute;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e0f2fe;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  opacity: 1;
  visibility: visible;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-filter-glass .search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  transform: scale(1.1);
}

.admin-filter-glass .search-clear-btn.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.8);
}

/* Fixed contrast on inputs */
.admin-filter-glass input,
.admin-filter-glass select {
  font-family: 'Lexend', sans-serif !important;
  background-color: rgba(11, 28, 48, 0.5); /* Marine base */
  border: 1px solid rgba(56, 189, 248, 0.3); /* Sky blue border */
  color: #f0f9ff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Custom Chevron implementation for selects */
.admin-filter-glass select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237dd3fc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.admin-filter-glass input:focus,
.admin-filter-glass select:focus {
  background-color: rgba(16, 46, 74, 0.85);
  border-color: #38bdf8;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.25),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  outline: none;
}

.admin-filter-glass select option {
  background: #0f172a;
  color: #f8fafc;
}

.admin-filter-glass input::placeholder {
  color: #7dd3fc;
  opacity: 0.7;
  font-family: 'Lexend', sans-serif !important;
}

.admin-filter-glass .collapsible-chevron-btn {
  background: rgba(11, 28, 48, 0.5);
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.admin-filter-glass .collapsible-chevron-btn:hover {
  background: rgba(16, 46, 74, 0.7);
  border-color: #38bdf8;
  color: #ffffff;
}

.admin-filter-glass .secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.admin-filter-glass .secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 800px) {
  .lr-header-inner {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .custom-select-wrap {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
  }

  .custom-select-trigger {
    width: 100%;
    max-width: 280px;
    min-height: 44px;
  }

  .custom-select-options {
    max-height: min(280px, 50dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 768px) {
  .admin-view-shell {
    margin-top: -12px; /* Negate the smaller mobile global padding */
    height: calc(100dvh - var(--app-header-offset));
  }

  .admin-view-fixed {
    top: 0;
    padding-top: 8px;
    padding-bottom: 0px;
  }

  .admin-command-deck {
    margin: 0 12px 8px 12px; /* Tighter bottom gap */
    padding: 16px;
    border-radius: 22px;
  }

  .admin-view-topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .admin-view-topbar > div:last-child {
    flex-wrap: wrap;
  }

  .admin-results-scroll {
    max-height: none;
    overflow: visible;
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --app-header-height: 64px; /* Dramatically sleeker */
    --app-header-offset: calc(var(--app-header-height) + env(safe-area-inset-top, 0px));
  }

  .lr-site-header {
    top: 0;
  }

  .lr-header-inner {
    width: min(100% - 24px, 1200px);
    min-height: 0;
    padding: 10px 0;
    flex-direction: row; /* Forces side-by-side alignment */
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .header-left {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .lr-logo {
    height: 32px; /* Scaled down slightly to fit row */
    margin: 0;
    max-width: 140px;
    object-fit: contain;
  }

  .header-left,
  .dept-selector-wrap,
  .dept-selector,
  .custom-select-wrap {
    min-width: 0;
  }

  .custom-select-wrap {
    width: auto;
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
  }

  .custom-select-trigger,
  .custom-select-options {
    width: 100%;
    min-width: 0;
  }

  .custom-select-trigger {
    max-width: 205px;
    min-height: 38px;
    padding: 8px 28px 8px 12px;
    font-size: 13px;
    border-radius: 999px;
  }

  .custom-option {
    min-height: 42px;
    padding: 10px 14px;
  }

  .custom-select-options {
    width: max-content;
    max-width: calc(100vw - 24px); /* Prevents running off the screen */
    right: 0;
    left: auto;
    max-height: min(320px, 50dvh);
    overflow-y: auto;
  }

  .portal-main {
    padding: 12px 0 48px;
  }

  .shell {
    width: min(100% - 24px, 1200px);
  }

  #dashboardView .portal-hero {
    top: calc(var(--app-header-offset) + 10px);
    margin: 0 0 18px;
    padding: 14px 14px 16px;
    border-radius: 22px;
    gap: 10px;
  }

  #dashboardView .portal-eyebrow {
    min-height: 30px;
    padding: 7px 12px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  #dashboardView .portal-title {
    font-size: clamp(24px, 7vw, 30px);
    margin: 0;
  }

  #dashboardView .portal-separator {
    width: min(240px, 100%);
    gap: 10px;
  }

  #dashboardView .portal-subtitle {
    font-size: 13px;
    max-width: 32ch;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-content {
    padding: 16px;
  }

  .hero-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-session-pill,
  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  .detail-wrapper {
    border-radius: 18px;
    /* Fix GPU bleeding and scroll tearing */
    isolation: isolate;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .detail-header-bar {
    top: 12px;
    right: 12px;
  }

  .detail-content,
  .modal-scroll-area {
    padding: 8px 12px 20px;
    /* Fix GPU bleeding and scroll tearing */
    isolation: isolate;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .detail-close-btn {
    width: 48px;
    height: 48px;
  }

  .detail-close-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }

  .detail-top-stack {
    padding-bottom: 16px;
  }

  .detail-hero-card {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    padding: 18px 64px 18px 18px;
    border-radius: 20px;
  }

  .detail-hero-card.no-image {
    grid-template-columns: 1fr;
    padding-left: 18px;
  }

  .detail-hero-media {
    width: 84px;
    height: 84px;
    border-radius: 24px;
  }

  .detail-main-title {
    font-size: 22px;
    text-align: center;
  }

  .detail-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .detail-title-row.has-image {
    padding-bottom: 0;
  }

  .detail-title-media {
    width: 100%;
    height: 160px;
    flex: none;
    border-radius: 20px;
  }

  .detail-title-copy {
    display: block;
  }

  .session-card {
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    /* Mobile GPU Performance Fix - Remove blurs on scroll */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06) !important;
    transform: translateZ(0);
  }

  .sess-date-wrap {
    align-self: start;
  }

  .sess-date-block {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .sess-month {
    font-size: 9px;
    margin-bottom: 1px;
  }

  .sess-day {
    font-size: 22px;
  }

  .sess-date-popover {
    display: none;
  }

  .sess-info {
    gap: 8px;
  }

  .sess-time-glass {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    align-items: start;
  }

  .sess-time-type-stack {
    gap: 6px;
  }

  .sess-time {
    font-size: 15px;
    line-height: 1.3;
    white-space: normal;
  }

  .sess-spots-pill {
    font-size: 10px;
    padding: 6px 10px;
    align-self: flex-start;
    height: 28px;
  }

  .sess-type-row {
    font-size: 13px;
    line-height: 1.35;
  }

  .sess-type-row span {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .sess-action {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
  }

  .sess-action .btn-book-glass {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .form-grid-row,
  .consent-action-card,
  .consent-summary-grid,
  .consent-signature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #modalBackdrop,
  #consentModalBackdrop,
  #kpiModalBackdrop,
  #consentConfigModalBackdrop {
    top: 0 !important; /* Lock to top of screen to avoid keyboard recalculations */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 0 !important;
    align-items: flex-start !important; /* Fix invalid 'stretch' layout */
    justify-content: flex-start !important;
    z-index: 9999 !important; /* Display above sticky header */
    backdrop-filter: none !important; /* Fix Android display bleeding */
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.95) !important;
  }

  .modal,
  .kpi-modal-card {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important; /* Rely on container bounds instead of fragile DVH */
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important; /* Full bleed layout on mobile */
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    inset: 0 !important;
    background: #ffffff !important;
    transform: none !important;
  }

  /* --- Settings Modal Mobile Fixes --- */
  /* Override bounds to mathematically lock to screen edges */
  #consentConfigModalBackdrop {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
  }

  #consentConfigModalCard {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Tighten header */
  #consentConfigModalCard .kpi-header {
    padding: 16px !important;
    flex-direction: row !important;
    align-items: center !important;
    flex: 0 0 auto !important;
  }

  #consentConfigModalCard .kpi-title {
    font-size: 20px !important;
  }

  #consentConfigModalCard .kpi-subtitle {
    display: none !important;
  }

  /* Make sidebar horizontal and compact */
  .settings-layout-split {
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
  }

  .settings-sidebar {
    flex: 0 0 auto !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 12px 16px !important;
    gap: 10px !important;
    background: #f8fafc !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    -webkit-overflow-scrolling: touch;
  }

  .settings-nav-btn {
    width: auto !important;
    flex: 0 0 auto !important;
    padding: 8px 14px !important;
    min-height: 40px !important;
    white-space: nowrap !important;
  }

  /* Content area flex configuration */
  .settings-content-shell {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .settings-main-pane {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .settings-panel {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: none !important;
  }

  .settings-panel.active-panel {
    display: flex !important;
    flex-direction: column !important;
  }

  /* CRITICAL FIX: Unlock the scroll container itself on mobile! */
  .settings-panel-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px !important;
    display: block !important; /* Override desktop flex constraints */
  }

  #consentSettingsCard .settings-panel-scroll {
    display: block !important;
    overflow-y: auto !important;
    padding: 16px !important;
  }

  #consentSettingsBody {
    display: block !important;
  }

  .consent-editor-shell {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border: none !important; /* Remove outer border to avoid double lines */
    box-shadow: none !important;
  }

  .consent-editor-shell .settings-field-label {
    padding: 0 0 8px 0 !important;
  }

  /* Flatten the Quill editor so it grows natively instead of trapping scroll */
  #adminConsentTermsEditorModal,
  #adminConsentTermsEditorModal .ql-container.ql-snow,
  #adminConsentTermsEditorModal .ql-editor {
    display: block !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    overflow-y: visible !important;
  }

  /* Ensure the editor has a minimum height so it's not a tiny box */
  #adminConsentTermsEditorModal .ql-editor {
    min-height: 250px !important;
    padding: 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 0 12px 12px !important;
    background: #ffffff !important;
  }

  /* Make the Quill toolbar sticky on mobile */
  #consentSettingsCard .ql-toolbar.ql-snow {
    position: sticky !important;
    top: 0 !important; /* Stick cleanly to the top of the scrolling modal */
    z-index: 90 !important;
    background: #f8fafc !important;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.05) !important;
    border: 1px solid #cbd5e1 !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
    margin-top: 4px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 8px 12px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #consentSettingsCard .ql-toolbar.ql-snow::-webkit-scrollbar {
    display: none;
  }

  #consentSettingsCard .ql-toolbar.ql-snow .ql-formats {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;
    margin-right: 12px !important;
  }

  /* iOS MAGNIFICATION FIX: Prevent Safari from auto-zooming the page */
  .settings-input,
  .sq-time-select,
  #adminUserEmailInput,
  #staffEmailInput {
    font-size: 16px !important;
  }

  .settings-field-panel {
    padding: 16px !important;
    margin-bottom: 16px !important;
    flex: 0 0 auto !important;
  }

  .settings-global-footer {
    flex: 0 0 auto !important;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -10px 20px rgba(15, 23, 42, 0.04) !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    min-height: unset !important;
  }

  .settings-global-footer-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .settings-global-footer-summary {
    display: none !important;
  }

  .settings-global-footer-actions {
    display: flex !important;
    width: auto !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    gap: 10px !important;
  }

  .settings-global-footer-actions button {
    width: auto !important;
    padding: 0 16px !important;
    justify-content: center !important;
    margin: 0 !important;
    min-height: 40px !important;
  }

  /* Hide the redundant cancel button on mobile */
  #settingsGlobalCancelBtn {
    display: none !important;
  }

  /* Fix Brand Assets Panel for Mobile */
  .brand-assets-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .brand-asset-panel {
    padding: 16px !important;
  }

  .brand-asset-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .dropzone {
    min-height: 140px !important;
    padding: 16px 12px !important;
  }

  .admin-users-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-users-input-wrap .settings-primary-btn {
    width: 100%;
  }

  #statusBackdrop {
    z-index: 999999 !important; /* Force status modal to always appear on top of everything */
  }

  /* Override inline styles on the consent modal for mobile */
  #consentModalBackdrop .modal {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    inset: 0 !important;
    background: #f8fafc !important;
    transform: none !important;
  }

  #consentModalHeader {
    padding: 16px !important;
    border-radius: 0 !important;
    align-items: flex-start !important;
    flex-shrink: 0;
  }

  #consentModalHeader > div:first-child {
    gap: 14px !important;
    align-items: flex-start !important;
  }

  #consentModalHeader img {
    max-height: 40px !important;
    max-width: 130px !important;
  }

  #consentModalHeader > div:first-child > div:last-child {
    border-left: 0 !important;
    padding-left: 0 !important;
    min-height: 0 !important;
  }

  #consentModalHeader h3 {
    font-size: 16px !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
  }

  .modal-header {
    height: auto;
    min-height: 80px;
    padding: 16px 16px 14px;
    flex-shrink: 0;
  }

  .modal-title {
    padding-right: 52px;
    font-size: 20px;
    line-height: 1.15;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    top: 10px;
    right: 10px;
  }

  .modal-scroll-area {
    padding: 14px 14px 0 !important;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-scroll-area::after {
    content: '';
    display: block !important;
    height: 160px !important; /* Scrolling runway for the absolute footer */
    flex-shrink: 0;
  }

  /* Ensure scroll fade and cue respect the absolute footer */
  #modalBackdrop .sticky-scroll-wrap {
    bottom: 76px !important;
  }

  #modalBackdrop .sticky-scroll-fade {
    bottom: -76px !important;
    height: 120px !important;
  }

  #modalBackdrop .sticky-scroll-cue {
    margin-bottom: 6px !important;
  }

  .consent-status-pill {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 16px !important;
  }

  .session-option {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 14px;
    min-height: 72px;
    padding: 14px;
    border-radius: 16px;
  }

  .session-spots.booking-session-spots-pill {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 4px;
  }

  .session-checkbox {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin-top: 2px;
  }

  .consent-signature-canvas-wrap {
    min-height: 180px;
  }

  .consent-signature-canvas-wrap canvas {
    height: 180px;
  }

  .form-actions {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    margin: 0 !important;
    padding: 12px 20px 16px !important;
    border-top: 1px solid rgba(226, 232, 240, 0.9) !important;
    background: #ffffff !important;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.05) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .form-actions > * {
    width: 100%;
  }

  .btn-book-glass,
  .back-btn,
  button.primary,
  button.secondary {
    min-height: 48px;
  }
}

/* --- CUSTOM GLASS DROPDOWN --- */
.custom-select-wrap {
  position: relative;
  width: max-content;
  min-width: 120px; /* Reduced from 260px to neatly wrap shorter text */
  max-width: 100%;
  margin-left: auto;
  font-family: 'Lexend', sans-serif;
  user-select: none;
  z-index: 240;
}

/* The Button (Trigger) */
.custom-select-trigger {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px; /* Pill shape */
  color: #fff;
  padding: 0 42px 0 42px; /* Symmetrical padding so text is perfectly centered */
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center; /* Centers the text horizontally */
  text-align: center;
  transition: all 0.22s ease;
  font-size: 14px;
  font-weight: 700;
  line-height: 1; /* Normalize line height for perfect mathematical centering */
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Safely truncate text to prevent overflow */
.custom-select-trigger span:first-child {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
  transform: translateY(1px); /* Optical adjustment for the Lexend font baseline */
}

.custom-select-trigger:hover,
.custom-select-wrap.active .custom-select-trigger {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 4px rgba(255, 255, 255, 0.08);
}

/* Custom Arrow */
.custom-select-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
  transition: transform 0.2s;
}

.custom-select-wrap.active .custom-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* The Options Dropdown (High Contrast White) */
.custom-select-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  width: max-content;
  max-height: min(320px, 60dvh);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  box-shadow:
    0 16px 40px -8px rgba(15, 23, 42, 0.25),
    0 4px 12px rgba(15, 23, 42, 0.1);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.custom-select-wrap.active .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Individual Options */
.custom-option {
  min-height: 42px;
  padding: 10px 14px;
  color: #334155;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  transition: all 0.15s ease;
}

.custom-option:hover {
  background: #f8fafc;
  color: #0f172a;
}

.custom-option.selected {
  background: #eff6ff;
  color: var(--lr-blue-dark);
  font-weight: 700;
}

/* Separator Line */
.custom-separator {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 8px;
}

/* --- STATUS MODAL (System Messages) --- */
#statusBackdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.12), transparent 28%),
    rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  z-index: 999999 !important; /* CRITICAL FIX: Must sit above ALL modals including adminCreateEventView (99999) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

#statusBackdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.status-card {
  position: relative;
  width: min(400px, calc(100vw - 40px));
  min-height: 312px;
  margin: 0;
  padding: 34px 30px 30px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.96) 100%);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow:
    0 28px 70px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
}

.status-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 34%),
    radial-gradient(circle at bottom right, rgba(20, 119, 201, 0.1), transparent 34%);
}

.status-card > * {
  position: relative;
  z-index: 1;
}

#statusBackdrop.visible .status-card {
  transform: translateY(0) scale(1);
}

.status-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 22px rgba(15, 23, 42, 0.1);
}

/* Status States */
.status-icon.loading {
  background: var(--lr-blue-soft);
  color: var(--lr-blue);
}

.status-icon.success {
  background: #dcfce7;
  color: #166534;
}

.status-icon.error,
.status-icon.warning {
  background: #fee2e2;
  color: #991b1b;
}

/* Spinner Animation */
.status-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid transparent;
  border-top-color: currentColor;
  border-right-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
}

.status-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.status-message {
  width: 100%;
  max-width: 320px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 22px;
  font-weight: 500;
}

.status-actions {
  width: 100%;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.status-actions .secondary,
.status-actions .primary {
  min-width: 92px;
  min-height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-close-glass {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  flex: 0 0 52px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.76) 100%);
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px) saturate(175%);
  -webkit-backdrop-filter: blur(18px) saturate(175%);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.status-close-glass:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 246, 255, 0.84) 100%);
  border-color: rgba(125, 211, 252, 0.95);
  color: var(--lr-blue);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(56, 189, 248, 0.1);
}

.status-close-glass:focus-visible {
  outline: none;
  border-color: rgba(56, 189, 248, 0.95);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(56, 189, 248, 0.16);
}

.status-close-glass svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 22px;
  pointer-events: none;
}

.status-close-glass:not(:has(svg))::before {
  content: '×';
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: currentColor;
}

.hidden-elem {
  display: none !important;
}

/* --- ADMIN TABLE STYLES --- */
.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  background: rgba(255, 255, 255, 0.95); /* Higher opacity for contrast */
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 1050px;
  table-layout: fixed;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f1f5f9; /* Solid light gray for better header definition */
  color: var(--lr-blue-dark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 16px;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
  box-shadow: inset 0 -2px 0 #cbd5e1;
}

/* Center specific headers */
.admin-table th.col-contact,
.admin-table th.col-status {
  text-align: center;
}

.admin-table td {
  padding: 8px 16px; /* Slightly tighter vertical padding */
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  height: 60px; /* Fixed height for consistency */
}

/* Flex Helper for Cells */
.cell-content {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
}

/* Center Content for Contact and Status columns */
.col-contact .cell-content,
.col-status .cell-content {
  justify-content: center;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

/* --- COLUMN WIDTHS --- */
.col-delete {
  width: 5%;
  text-align: center;
} /* Dedicated column for deletion */
.col-parent {
  width: 18%;
}
.col-child {
  width: 16%;
}
.col-contact {
  width: 16%;
}
.col-status {
  width: 14%;
}
.col-actions {
  width: 26%;
  text-align: right;
} /* Reverted to standard 2-button width */

.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

/* --- VIBRANT ICON BUTTONS --- */
.btn-icon-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; /* Larger hit area */
  height: 36px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-icon-glass svg {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
}

/* Email - Blue */
.btn-email {
  background: #eff6ff;
  color: #0284c7;
  border-color: #bae6fd;
}
.btn-email:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* Phone - Green */
.btn-phone {
  background: #f0fdf4;
  color: #059669;
  border-color: #bbf7d0;
}
.btn-phone:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* Info - Amber/Orange */
.btn-info {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}
.btn-info:hover {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

/* Hide the mobile collapse button on desktop entirely */
.mobile-only-toggle {
  display: none !important;
}

/* --- ACTION BUTTONS --- */
.btn-action-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 75px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.btn-action-glass:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-verify {
  color: #059669;
  border-color: #d1fae5;
  background: #ecfdf5;
}
.btn-verify:hover {
  background: #059669;
  color: white;
  border-color: #059669;
}

.btn-cancel {
  color: #dc2626;
  border-color: #fee2e2;
  background: #fef2f2;
}
.btn-cancel:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

/* --- DANGER GLASS BUTTONS (TRASH/DELETE) --- */
.btn-danger-glass {
  background: rgba(254, 242, 242, 0.6);
  color: #dc2626;
  border: 1px solid rgba(254, 202, 202, 0.7);
  backdrop-filter: blur(4px);
}
.btn-danger-glass:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.btn-danger-solid {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
}
.btn-danger-solid:hover {
  filter: brightness(1.1);
}

/* --- EDIT GLASS BUTTON (CYAN) --- */
.btn-edit-glass {
  background: rgba(224, 242, 254, 0.6);
  color: #0284c7;
  border: 1px solid rgba(186, 230, 253, 0.7);
  backdrop-filter: blur(4px);
}
.btn-edit-glass:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

/* --- STATUS PILLS --- */
.status-pill-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-badge {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 7px 14px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px) saturate(175%);
  -webkit-backdrop-filter: blur(14px) saturate(175%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.status-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 56%);
}

.status-pill-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  z-index: 120;
  min-width: max-content;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
  box-shadow:
    0 18px 30px rgba(2, 6, 23, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px) saturate(165%);
  -webkit-backdrop-filter: blur(12px) saturate(165%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

.status-pill-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.94) transparent transparent transparent;
}

.status-pill-tooltip-wrap:hover .status-pill-tooltip,
.status-pill-tooltip-wrap:focus-within .status-pill-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.st-Attended {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(220, 252, 231, 0.78) 100%);
  color: #15803d;
  border-color: rgba(187, 247, 208, 0.95);
  box-shadow:
    0 10px 22px rgba(34, 197, 94, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.st-Cancelled {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(254, 226, 226, 0.8) 100%);
  color: #b91c1c;
  border-color: rgba(252, 165, 165, 0.95);
  box-shadow:
    0 10px 22px rgba(239, 68, 68, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.st-Registered {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(224, 242, 254, 0.82) 100%);
  color: #0369a1;
  border-color: rgba(125, 211, 252, 0.95);
  box-shadow:
    0 10px 22px rgba(14, 165, 233, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.st-Waitlist {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 237, 213, 0.82) 100%);
  color: #c2410c;
  border-color: rgba(253, 186, 116, 0.95);
  box-shadow:
    0 10px 22px rgba(249, 115, 22, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.st-No-Show {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(241, 245, 249, 0.84) 100%);
  color: #475569;
  border-color: rgba(203, 213, 225, 0.95);
  box-shadow:
    0 10px 22px rgba(100, 116, 139, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

@media (hover: none), (pointer: coarse) {
  .status-pill-tooltip {
    display: none !important;
  }
}

/* --- TRAFFIC LIGHT SYNC --- */
.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.3s ease;
  display: inline-block;
  flex-shrink: 0;
  border: none;
  /* Glossy inset lighting + soft drop shadow */
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

.sync-pending {
  background: #f59e0b;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 0 8px rgba(245, 158, 11, 0.8);
}
.sync-success {
  background: #10b981;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 0 8px rgba(16, 185, 129, 0.8);
}
.sync-error {
  background: #ef4444;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 0 8px rgba(239, 68, 68, 0.8);
}

/* --- INFO MODAL STYLES --- */
#infoModalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px); /* Stronger blur for focus */
  z-index: 1000; /* Highest priority */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#infoModalBackdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.info-modal-card {
  background: rgba(255, 255, 255, 0.95);
  width: 90%;
  max-width: 600px;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

#infoModalBackdrop.visible .info-modal-card {
  transform: scale(1);
}

/* Header */
.info-modal-header {
  background: #f8fafc;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--lr-blue-dark);
  margin: 0;
}

/* Body (Scrollable) */
.info-modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Data Groups */
.info-group {
  margin-bottom: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.info-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

/* Data Grid */
.info-row {
  display: grid;
  grid-template-columns: 120px 1fr auto; /* Label | Value | CopyBtn */
  gap: 12px;
  align-items: start; /* Align to top for long text */
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dotted #f1f5f9;
}

.info-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.info-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  padding-top: 6px; /* Align with text */
}

.info-value {
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  padding-top: 5px;
  word-break: break-word;
  line-height: 1.5;
}

.info-value.notes-text {
  background: #fffbeb;
  color: #92400e;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid #fde68a;
}

/* Copy Button */
.btn-copy-mini {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-mini:hover {
  border-color: var(--lr-blue);
  color: var(--lr-blue);
  background: #f0f9ff;
}

.btn-copy-mini.copied {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

/* Footer */
.info-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  text-align: right;
}

/* --- ALAYACARE COLUMN STYLES --- */
.col-alayacare {
  width: 10%;
  text-align: center;
}
.col-alayacare .cell-content {
  justify-content: center;
}

/* Base Button Style */
.btn-ac {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-ac:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Empty State (No Link) - Updated to be clickable */
.btn-ac.ac-empty {
  background: transparent;
  border: 1px dashed #cbd5e1;
  color: #cbd5e1;
  cursor: pointer; /* Changed to pointer */
  box-shadow: none;
  font-size: 20px;
}

.btn-ac.ac-empty:hover {
  transform: translateY(-2px);
  border-color: var(--lr-blue); /* Brand blue on hover */
  color: var(--lr-blue);
  background: #f0f9ff;
}

/* Status Variants (Has Link) */
/* Active = Green (Default requested color) */
.btn-ac.ac-active {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
/* Discharged = Red */
.btn-ac.ac-discharged {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
/* On Hold = Purple/Gray */
.btn-ac.ac-on_hold {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}
/* Pending = Amber */
.btn-ac.ac-pending {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}
/* Waiting List = Blue */
.btn-ac.ac-waiting_list {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}
/* Fallback/Unknown Status but has link = Default Green */
.btn-ac.ac-default {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

/* --- EMAIL COLUMN STYLES --- */
.col-email {
  width: 10%;
  text-align: center;
}
.col-email .cell-content {
  justify-content: center;
}

.btn-email-status {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-email-status:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* State 1: Empty / No Email */
.email-state-empty {
  background: #f1f5f9;
  color: #94a3b8; /* Gray Envelope */
  border-color: #e2e8f0;
}
.email-state-empty:hover {
  color: var(--lr-blue);
  border-color: var(--lr-blue);
  background: #fff;
}

/* State 2: Confirmed (Green Check) */
.email-state-confirmed {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

/* State 3: Reminder Sent (Bell) */
.email-state-reminder {
  background: #ffedd5; /* Light Orange/Amber */
  color: #c2410c;
  border-color: #fdba74;
}

/* --- CONFIRMATION & PASSCODE MODALS --- */
#confirmModalBackdrop,
#passcodeModalBackdrop,
#deletePasscodeModalBackdrop,
#cancelDeepLinkBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100100; /* Must be above adminCreateEventView (99999) */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 24px;
}
#confirmModalBackdrop.visible,
#passcodeModalBackdrop.visible,
#deletePasscodeModalBackdrop.visible,
#cancelDeepLinkBackdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.confirm-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  width: 90%;
  max-width: 400px;
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s;
}
#confirmModalBackdrop.visible .confirm-card,
#passcodeModalBackdrop.visible .confirm-card,
#deletePasscodeModalBackdrop.visible .confirm-card,
#cancelDeepLinkBackdrop.visible .confirm-card {
  transform: scale(1);
}

.confirm-icon-wrap {
  width: 60px;
  height: 60px;
  background: #eff6ff;
  color: var(--lr-blue);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.confirm-actions-row button {
  flex: 1 1 150px;
  min-width: 0 !important;
  white-space: normal;
  text-align: center;
}

@media (max-width: 520px) {
  #confirmModalBackdrop {
    align-items: flex-end;
    padding: 16px;
  }

  #confirmModalBackdrop .confirm-card {
    width: 100%;
    max-width: none;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px;
  }

  .confirm-actions-row {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .confirm-actions-row button {
    width: 100%;
    flex: 0 0 auto;
    min-height: 48px;
  }
}

/* --- ADMIN SESSION ROWS --- */
.admin-session-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.admin-session-actions-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.admin-session-main {
  min-width: 0;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.admin-session-inline-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.admin-session-datetime-inline {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.admin-session-location {
  min-width: 0;
  max-width: 280px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}

.admin-session-location span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-session-actions-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.admin-session-row .btn-admin-copy,
.admin-session-row .btn-view-attendees,
.admin-session-row .pill-capacity {
  max-width: 100%;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .admin-session-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-session-actions-left,
  .admin-session-main,
  .admin-session-actions-right {
    justify-content: flex-start;
  }

  .admin-session-inline-meta,
  .admin-session-actions-right {
    flex-wrap: wrap;
  }

  .admin-session-row .btn-admin-copy,
  .admin-session-row .btn-view-attendees,
  .admin-session-row .pill-capacity {
    width: 100%;
    justify-content: center;
  }
}

/* --- ALIGNMENT FIXES --- */

/* 1. Strict Centering for Email */
.col-email {
  text-align: center;
  vertical-align: middle;
}
.col-email .cell-content {
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

/* 2. Actions "Two-Slot" System */
.col-actions {
  text-align: center;
  vertical-align: middle;
}

.actions-slot-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Fixed gap between the two "columns" */
}

.action-slot {
  flex: 0 0 70px; /* Locks each button area to exactly 70px width */
  display: flex;
  justify-content: center; /* Centers the button inside its own slot */
}

/* Ensure buttons fill their slot nicely but don't overflow */
.btn-action-glass {
  width: 100%;
  justify-content: center;
  padding: 6px 4px; /* Tighter padding to fit fixed width */
}

/* --- EVENT CREATOR EXPERIENCE --- */
#adminCreateEventView.hidden {
  display: none !important;
}

.event-creator-shell {
  width: 100%;
  max-width: 980px !important;
  height: 90vh;
  height: 90dvh;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(20, 119, 201, 0.14) !important;
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.4),
    0 8px 28px rgba(20, 119, 201, 0.1) !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  overflow: hidden;
  border-radius: 20px;
}

.event-hero {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, var(--lr-blue-dark), var(--lr-blue));
  color: #ffffff;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-shrink: 0;
}

.event-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 14px;
}

.event-hero-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.event-hero-subtitle {
  margin: 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.6;
}

.event-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.event-hero-actions .secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.event-hero-actions .secondary:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.4);
}

.event-creator-scroll {
  background: linear-gradient(180deg, #f7fbff 0%, #f8fafc 100%);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.event-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.event-summary-chip {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(191, 219, 254, 0.7);
  border-top: 4px solid var(--lr-blue);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.event-summary-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.event-summary-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

.event-form-note {
  margin-top: -6px;
  margin-bottom: 18px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

.event-form-note strong {
  color: var(--lr-blue-dark);
}

.event-drop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dropzone {
  border: 1.5px dashed #bfd4eb;
  border-radius: 18px;
  padding: 20px 18px;
  min-height: 176px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(20, 119, 201, 0.1), transparent 36%);
  pointer-events: none;
}

.dropzone:hover,
.dropzone.dragover {
  transform: translateY(-2px);
  border-color: var(--lr-blue);
  background: linear-gradient(180deg, #f4f9ff 0%, #e5f0ff 100%);
  box-shadow: 0 14px 28px rgba(20, 119, 201, 0.12);
  color: var(--lr-blue-dark);
}

.dropzone.has-file {
  border-style: solid;
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 12px 24px rgba(20, 119, 201, 0.1);
}

.dropzone-icon {
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lr-blue);
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(20, 119, 201, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropzone-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2px;
  transition: transform 0.3s ease;
}

/* Dynamic States */
.dropzone:hover .dropzone-icon,
.dropzone.dragover .dropzone-icon {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 16px rgba(20, 119, 201, 0.15);
  background: var(--lr-blue);
  color: #ffffff;
}

.dropzone.dragover .dropzone-icon svg {
  transform: scale(1.15);
}

.dropzone.has-file .dropzone-icon {
  background: #dcfce7;
  color: #166534;
  box-shadow: 0 4px 10px rgba(22, 101, 52, 0.1);
}

.dropzone-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.dropzone-copy {
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
  position: relative;
  z-index: 1;
}

.dropzone-helper {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  position: relative;
  z-index: 1;
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  margin-top: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.file-preview.hidden {
  display: none !important;
}

.file-preview-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-preview-main .text-truncate {
  font-weight: 700;
  color: #0f172a;
}

.file-preview-meta {
  font-size: 11px;
  color: #64748b;
}

.remove-file-btn {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-file-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  transform: translateY(-1px);
}

.event-footer-note {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .event-hero {
    padding: 24px 22px;
    flex-direction: column;
    align-items: flex-start;
  }

  .event-hero-actions {
    width: 100%;
  }

  .event-hero-actions .secondary {
    width: 100%;
    justify-content: center;
  }

  .event-drop-grid {
    grid-template-columns: 1fr;
  }
}

/* Master Folder Button */
.btn-folder-glass {
  background: rgba(239, 246, 255, 0.8);
  color: var(--lr-blue-dark);
  border: 1px solid #bfdbfe;
  backdrop-filter: blur(4px);
  padding: 8px 16px;
  border-radius: 999px; /* FIXED: Updated to match pill shape of other nav buttons */
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(20, 119, 201, 0.08);
}
.btn-folder-glass:hover {
  background: #e0f2fe;
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(20, 119, 201, 0.15);
}

/* Individual Consent PDF Button */
.btn-consent {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}
.btn-consent:hover {
  background: #ffffff;
  color: var(--lr-blue);
  border-color: var(--lr-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 119, 201, 0.15);
}

/* Update Column Widths to fit the 4th button in the Contact column */
.col-parent {
  width: 16%;
}
.col-child {
  width: 14%;
}
.col-contact {
  width: 19%;
}

/* --- MOBILE FORM SIMPLIFICATION & TAPPABLE TARGETS --- */
@media (max-width: 900px) {
  .form-grid-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .form-section-card {
    padding: 16px 14px;
    border-radius: 16px;
    margin-bottom: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .form-row {
    margin-bottom: 16px;
  }

  .form-row label {
    font-size: 13px;
    margin-bottom: 7px;
  }

  .form-row input,
  .form-row select,
  .form-row textarea {
    font-size: 16px !important;
    min-height: 50px;
    padding: 13px 14px;
    border-radius: 14px;
    box-shadow: none;
    transform: none !important;
  }

  .form-row textarea {
    min-height: 120px;
  }

  .form-row input:focus,
  .form-row select:focus,
  .form-row textarea:focus {
    box-shadow: 0 0 0 3px rgba(20, 119, 201, 0.14);
  }

  .session-details-text {
    min-width: 0;
    flex: 1 1 auto;
  }

  .session-date {
    font-size: 15px;
    line-height: 1.35;
  }

  .session-spots {
    font-size: 12px;
    line-height: 1.45;
  }

  .checkbox-row,
  .session-option {
    margin-bottom: 12px;
  }

  .consent-sheet-body {
    padding: 16px 16px 12px;
  }

  .consent-summary-card,
  .consent-signature-panel {
    padding: 16px;
  }
}

/* ==========================================================================
   MOBILE PERFORMANCE OVERRIDES: STRIPPING HEAVY "GLASS" LAYERS
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Remove backdrop filters on all overlay backdrops and make them solid/opaque */
  #modalBackdrop,
  #consentModalBackdrop,
  #confirmModalBackdrop,
  #passcodeModalBackdrop,
  #deletePasscodeModalBackdrop,
  #kpiModalBackdrop,
  #infoModalBackdrop,
  #adminCreateEventView {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.98) !important; /* Near-solid dark background */
  }

  #statusBackdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.62) !important;
  }

  /* 2. Flatten modals and cards to solid colors to prevent text bleeding/blur tearing */
  .modal,
  .confirm-card,
  .status-card,
  .info-modal-card,
  .event-creator-shell,
  .consent-sheet {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #ffffff !important; /* Solid white fallback */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #cbd5e1 !important;
  }

  /* Keep KPI and Consent Config modals dark to match their text/theme */
  .kpi-modal-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #0f172a !important; /* Solid dark marine */
    border: 1px solid #1e293b !important;
  }

  /* Also darken the individual KPI chart panels so they pop against the background */
  .kpi-panel-glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
  }

  /* Specific fix for the consent modal's internal background */
  #consentModalBackdrop .modal {
    background: #f8fafc !important;
  }

  /* 3. Hide all the heavy pseudo-element gradients and masks that melt mobile GPUs */
  .modal::before,
  .modal::after,
  .kpi-modal-card::before,
  .kpi-modal-card::after,
  .program-consultation-section::before,
  .program-consultation-section::after,
  .brand-assets-card::before,
  .brand-assets-card::after,
  .admin-filter-glass::before,
  .admin-filter-glass::after,
  .admin-command-deck::before,
  .admin-command-deck::after,
  .sess-date-block::before,
  .sess-date-block::after,
  .sess-time-glass::before,
  .sess-time-glass::after {
    display: none !important;
    background: none !important;
  }

  /* 4. Strip blurs from smaller nested glass elements (buttons, inputs, pills) */
  .sess-time-glass,
  .program-consultation-section,
  .brand-assets-card,
  .admin-filter-glass,
  .admin-command-deck,
  .btn-action-glass,
  .btn-book-glass,
  .btn-icon-glass,
  .custom-select-trigger,
  .pill-capacity,
  .admin-sync-btn,
  .admin-search-input-wrap input,
  .admin-command-filters select {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Give the admin glass areas a solid fallback color so they don't turn invisible */
  .admin-filter-glass,
  .admin-command-deck {
    background: #0f172a !important;
  }

  /* --- Session Card Mobile Layout (Edit/Delete + Date on same row) --- */
  .admin-session-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    align-items: center !important;
    margin: 0 14px 24px 14px !important; /* Pull sides in to prevent glow clipping */
    padding: 20px 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 24px !important;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(255, 255, 255, 0.15) 100%
    ) !important;
    box-shadow:
      0 16px 32px rgba(15, 23, 42, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    overflow: visible !important;
  }

  /* --- Status Glows for Admin Session Cards (Based on Capacity) --- */
  .admin-session-row:has(.cap-open) {
    border-color: rgba(186, 230, 253, 0.6) !important;
    border-top: 4px solid #0ea5e9 !important;
    box-shadow:
      0 12px 32px rgba(3, 105, 161, 0.08),
      0 0 20px rgba(186, 230, 253, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-session-row:has(.cap-low) {
    border-color: rgba(134, 239, 172, 0.6) !important;
    border-top: 4px solid #10b981 !important;
    box-shadow:
      0 12px 32px rgba(22, 101, 52, 0.08),
      0 0 20px rgba(134, 239, 172, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-session-row:has(.cap-med) {
    border-color: rgba(253, 230, 138, 0.6) !important;
    border-top: 4px solid #f59e0b !important;
    box-shadow:
      0 12px 32px rgba(180, 83, 9, 0.08),
      0 0 20px rgba(253, 230, 138, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-session-row:has(.cap-high) {
    border-color: rgba(253, 186, 116, 0.6) !important;
    border-top: 4px solid #f97316 !important;
    box-shadow:
      0 12px 32px rgba(194, 65, 12, 0.08),
      0 0 20px rgba(253, 186, 116, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-session-row:has(.cap-full) {
    border-color: rgba(254, 202, 202, 0.6) !important;
    border-top: 4px solid #ef4444 !important;
    box-shadow:
      0 12px 32px rgba(153, 27, 27, 0.08),
      0 0 20px rgba(254, 202, 202, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }

  .admin-session-actions-left {
    grid-column: 1 / -1 !important;
    margin: 0 !important;
  }

  .admin-session-main {
    /* Break out the inner elements to become direct grid items */
    display: contents !important;
  }

  /* Allow date/time text to wrap cleanly instead of forcing a single line */
  .admin-session-actions-left > div:last-child > div {
    white-space: normal !important;
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
  }

  /* Location Wrapper */
  .admin-session-location {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  /* Meet Link (Copy Button) Wrapper */
  .admin-session-copy-wrap {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  /* Force location/copy buttons to expand fully */
  .admin-session-main .btn-admin-copy,
  .admin-session-location {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Actions Right */
  .admin-session-actions-right {
    display: contents !important;
  }

  /* Expand waitlist pill and buttons to full width */
  .admin-session-waitlist-wrap,
  .btn-view-attendees {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
  }

  /* Capacity Pill sits next to Copy Button automatically */
  .pill-capacity {
    width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
  }

  /* --- Full Width Back Buttons on Mobile --- */
  .back-btn {
    width: 100% !important;
    max-width: none !important;
    justify-content: center !important;
  }

  /* --- Admin Session Header Mobile Optimization --- */
  #adminSessionHeader {
    padding-bottom: 0 !important;
    margin-bottom: 12px !important;
  }

  #adminSessionHeader > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  #adminSessionHeader .admin-session-title-block {
    min-width: 0 !important;
  }

  #adminSessionHeader .admin-session-title-block h2 {
    font-size: 18px !important;
  }

  /* Target the container holding the action items - Change to Flex Row */
  #adminSessionHeader > div > div:last-child {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Hide the Consents Folder button to save space on mobile */
  #adminSessionHeader .btn-folder-glass {
    display: none !important;
  }

  /* Enlarge sync indicator for touch targets on mobile */
  #globalSyncIndicator {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important; /* Fixed width */
  }

  /* Force the Capacity pill to hug its content */
  #sessionCapacityPill {
    width: auto !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 12px !important;
    justify-content: center !important;
    height: 44px !important;
    font-size: 12px !important; /* Scale down slightly for tiny screens */
  }

  /* Back button stretches to fill the remaining horizontal space */
  #adminSessionHeader .back-btn {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 44px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 8px !important;
    font-size: 13px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Keep the filter bar elements side-by-side to save vertical space */
  #attendeeFilterBar {
    flex-direction: row !important;
    padding: 10px !important;
    border-radius: 16px !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    flex-wrap: nowrap !important;
  }

  #attendeeFilterBar > .filter-input-col {
    flex: 1 1 auto !important;
    width: auto !important;
    height: 44px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Transform the Mark All button into a compact circle on mobile */
  #attendeeFilterBar > .filter-btn-col {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
  }

  #markAllAttendedBtn {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  #markAllAttendedBtn .mark-all-text {
    display: none !important; /* Hide text */
  }

  #markAllAttendedBtn svg {
    margin-left: 0 !important;
    width: 20px !important;
    height: 20px !important;
  }

  /* --- Attendee Table to Mobile Card Transformation --- */
  .admin-table-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* Break the table display properties */
  .admin-table,
  .admin-table tbody {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important; /* CRITICAL: Override desktop min-width: 1050px */
    box-sizing: border-box !important;
  }

  /* Hide standard table headers */
  .admin-table thead {
    display: none !important;
  }

  /* Turn each row into a flexbox card for perfect stacking */
  .admin-table tr {
    position: relative !important;
    margin: 0 14px 16px 14px !important; /* Tighter gap between cards */
    padding: 16px !important; /* Slicker internal spacing */
    border: 1px solid rgba(255, 255, 255, 0.35) !important; /* Softer border to blend cleanly */
    border-radius: 24px !important;
    /* Drop opacity drastically to let the frosted glass blur pull the background color through */
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(255, 255, 255, 0.15) 100%
    ) !important;
    box-shadow:
      0 16px 32px rgba(15, 23, 42, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    box-sizing: border-box !important;
    overflow: visible !important; /* Ensure glows and borders can safely render outside the box */
  }

  /* Fix hover artifacts breaking the glass effect */
  .admin-table tr:hover td {
    background: transparent !important;
  }

  /* Reset cell padding/borders universally inside the mobile card */
  .admin-table td {
    display: block !important;
    flex: 1 1 100% !important; /* Allow growing/shrinking naturally */
    width: auto !important; /* Prevent blowout beyond padding */
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: none !important;
    margin-bottom: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }

  .admin-table td:last-child {
    margin-bottom: 0 !important;
  }

  /* 0. Card Hover/Active Effects */
  .admin-table tr {
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      background 0.25s ease !important;
  }
  .admin-table tr:hover,
  .admin-table tr:active {
    transform: translateY(-2px) !important;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(240, 247, 255, 0.85) 100%
    ) !important;
    box-shadow:
      0 18px 40px rgba(20, 119, 201, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }

  /* 1. Parent Name (Header Text) - Top Half of Light Blue Glass Panel */
  .admin-table td:nth-child(2) {
    order: 1 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 112px 4px 16px !important; /* Extended right padding protects the new side-by-side buttons */
    background: linear-gradient(
      180deg,
      rgba(219, 234, 254, 0.95) 0%,
      rgba(191, 219, 254, 0.6) 100%
    ) !important;
    border: 1px solid rgba(147, 197, 253, 0.85) !important;
    border-bottom: none !important;
    border-radius: 16px 16px 0 0 !important;
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #0f5ea0 !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 0 !important;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.95) !important;
    transition: background 0.25s ease !important;
  }

  /* 2. Delete Button & Toggle (Side-by-side inside the blue glass panel) */
  .admin-table td.col-delete {
    order: 2 !important;
    position: absolute !important;
    top: 32px !important; /* Centers in the blue block */
    right: 24px !important;
    width: auto !important;
    height: 36px !important;
    max-height: 36px !important;
    margin: 0 !important;
    z-index: 10 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
  }

  .admin-table td.col-delete .cell-content {
    flex-direction: row !important; /* Align horizontally to stay inside the blue block */
    gap: 10px !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
  }

  .admin-table td.col-delete .btn-danger-glass {
    flex: 0 0 36px !important; /* Match squircle dimensions */
    width: 36px !important;
    height: 36px !important;
    max-height: 36px !important;
    min-height: 36px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .admin-table td.col-delete .btn-danger-glass svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* The Toggle Button Itself - Premium Integrated Glass Squircle */
  .mobile-only-toggle {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important; /* Override global button min-height */
    max-width: 36px !important;
    max-height: 36px !important;
    flex: 0 0 36px !important; /* Strictly prevent flex squashing */
    box-sizing: border-box !important;
    border-radius: 12px !important; /* Squircle shape */
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(219, 234, 254, 0.6) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    color: #0f5ea0 !important;
    box-shadow:
      0 4px 12px rgba(15, 23, 42, 0.08),
      inset 0 2px 4px rgba(255, 255, 255, 1) !important;
    backdrop-filter: blur(16px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
  }

  .mobile-only-toggle svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.5px !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important; /* Bouncy spring rotation */
  }

  /* Expanded State UI Shift - Deepens slightly into the glass */
  .admin-table tr:not(.collapsed-card) .mobile-only-toggle {
    background: linear-gradient(
      135deg,
      rgba(219, 234, 254, 0.8) 0%,
      rgba(191, 219, 254, 0.3) 100%
    ) !important;
    border-color: rgba(147, 197, 253, 0.8) !important;
    color: #1d4ed8 !important;
    box-shadow:
      0 2px 6px rgba(15, 23, 42, 0.06),
      inset 0 2px 6px rgba(255, 255, 255, 0.6) !important;
  }

  .admin-table tr:not(.collapsed-card) .mobile-only-toggle svg {
    transform: rotate(180deg);
  }

  /* CRITICAL FIX: Hide the body rows when collapsed, EXCEPT the status pill */
  .admin-table tr.collapsed-card td.col-alayacare,
  .admin-table tr.collapsed-card td.col-contact,
  .admin-table tr.collapsed-card td.col-email,
  .admin-table tr.collapsed-card td.col-actions {
    display: none !important;
  }

  /* Adjust bottom margin on blue block when collapsed, to let status pill sit tight beneath it */
  .admin-table tr.collapsed-card td:nth-child(3) {
    margin-bottom: 0 !important;
  }

  /* Minor spacing tweak so status pill looks integrated when collapsed */
  .admin-table tr.collapsed-card td.col-status {
    margin-top: 10px !important;
  }

  /* 3. Child Name (Subtitle Text) - Bottom Half of Light Blue Glass Panel */
  .admin-table td:nth-child(3) {
    order: 3 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 2px 112px 14px 16px !important; /* Extended right padding protects the new side-by-side buttons */
    background: linear-gradient(
      180deg,
      rgba(191, 219, 254, 0.6) 0%,
      rgba(219, 234, 254, 0.85) 100%
    ) !important;
    border: 1px solid rgba(147, 197, 253, 0.85) !important;
    border-top: none !important;
    border-radius: 0 0 16px 16px !important;
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1d4ed8 !important;
    margin-top: -1px !important; /* Pulls up slightly to eliminate mobile sub-pixel rendering gaps */
    margin-bottom: 18px !important;
    box-shadow:
      inset 0 -2px 6px rgba(255, 255, 255, 0.7),
      0 4px 12px rgba(147, 197, 253, 0.1) !important; /* Outer shadow moved here so whole block casts it */
    transition:
      background 0.25s ease,
      margin-bottom 0.25s ease !important;
  }
  .admin-table td:nth-child(3)::before {
    content: 'CLIENT: ';
    font-weight: 800;
    color: #3b82f6;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    margin-right: 6px;
  }

  /* Shift the glass opacity slightly when the whole card is hovered */
  .admin-table tr:hover td:nth-child(2),
  .admin-table tr:active td:nth-child(2) {
    background: linear-gradient(
      180deg,
      rgba(239, 246, 255, 0.95) 0%,
      rgba(219, 234, 254, 0.7) 100%
    ) !important;
  }
  .admin-table tr:hover td:nth-child(3),
  .admin-table tr:active td:nth-child(3) {
    background: linear-gradient(
      180deg,
      rgba(219, 234, 254, 0.7) 0%,
      rgba(239, 246, 255, 0.95) 100%
    ) !important;
  }

  /* 4. Reorder Icons to sit together on their own continuous line, spanning full width proportionally */
  .admin-table td.col-alayacare {
    order: 4 !important;
    flex: 1 1 0% !important;
    width: auto !important;
    margin-right: 6px !important;
  }
  .admin-table td.col-contact {
    order: 5 !important;
    flex: 4 1 0% !important;
    width: auto !important;
    margin-right: 6px !important;
  }
  .admin-table td.col-email {
    order: 6 !important;
    flex: 1 1 0% !important;
    width: auto !important;
    margin-right: 0 !important;
  }

  /* Ensure inner cell contents align properly and stretch */
  .admin-table td .cell-content {
    justify-content: flex-start !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Force icon columns to fill horizontally */
  .admin-table td.col-alayacare .cell-content,
  .admin-table td.col-contact .cell-content,
  .admin-table td.col-email .cell-content {
    flex-wrap: nowrap !important;
    width: 100% !important;
  }

  /* Even gaps */
  .admin-table td.col-contact .cell-content {
    gap: 6px !important;
  }

  /* Ensure tooltip wrappers share space equally so they don't shrink-wrap */
  .admin-table td .icon-tooltip-wrapper {
    flex: 1 1 0% !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Make buttons scale to fill their flex containers completely */
  .admin-table td:not(.col-delete) .btn-icon-glass,
  .admin-table td:not(.col-delete) .btn-ac,
  .admin-table td:not(.col-delete) .btn-email-status {
    width: 100% !important;
    height: 38px !important; /* Restore tappable height */
    min-width: 0 !important;
    flex: 1 1 0% !important; /* Crucial for equal width distribution */
  }

  .admin-table td:not(.col-delete) .btn-icon-glass svg,
  .admin-table td:not(.col-delete) .btn-email-status svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* --- Status Glows for Mobile Cards --- */
  .admin-table tr:has(.st-Attended) {
    border-color: rgba(134, 239, 172, 0.6) !important;
    border-top: 4px solid #10b981 !important;
    box-shadow:
      0 12px 32px rgba(22, 101, 52, 0.08),
      0 0 20px rgba(134, 239, 172, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-table tr:has(.st-Cancelled) {
    border-color: rgba(254, 202, 202, 0.6) !important;
    border-top: 4px solid #ef4444 !important;
    box-shadow:
      0 12px 32px rgba(153, 27, 27, 0.08),
      0 0 20px rgba(254, 202, 202, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-table tr:has(.st-Registered) {
    border-color: rgba(186, 230, 253, 0.6) !important;
    border-top: 4px solid #0ea5e9 !important;
    box-shadow:
      0 12px 32px rgba(3, 105, 161, 0.08),
      0 0 20px rgba(186, 230, 253, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-table tr:has(.st-Waitlist) {
    border-color: rgba(253, 186, 116, 0.6) !important;
    border-top: 4px solid #f97316 !important;
    box-shadow:
      0 12px 32px rgba(194, 65, 12, 0.08),
      0 0 20px rgba(253, 186, 116, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }
  .admin-table tr:has(.st-No-Show) {
    border-color: rgba(148, 163, 184, 0.6) !important;
    border-top: 4px solid #64748b !important;
    box-shadow:
      0 12px 32px rgba(15, 23, 42, 0.08),
      0 0 20px rgba(148, 163, 184, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }

  /* Isolate the spinner and hide the text when loading attendees on mobile */
  #adminAttendeeList .loading-container div:not(.spinner) {
    display: none !important;
  }

  #adminAttendeeList .loading-container .spinner {
    margin-bottom: 0 !important; /* Perfect vertical centering without the text */
  }

  /* Strip the white box container and heavy padding on mobile so cards float on the true background */
  #adminSessionView {
    padding: 0 !important;
    background: var(--bg) !important; /* Matches global app background */
  }

  #adminSessionView .shell {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 16px 0 0 0 !important;
    border-radius: 0 !important;
  }

  /* Re-apply side padding to the header elements since we removed it from the parent shell */
  #adminSessionHeader {
    padding-left: 16px !important;
    padding-right: 16px !important;
    border-bottom: none !important;
  }

  /* Neutralize negative inline margins on the list container to prevent side-scrolling */
  #adminAttendeeList {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 5. Status Badge (Full Width below icons) */
  .admin-table td.col-status {
    order: 7 !important;
    flex: 1 1 100% !important;
    width: auto !important;
    max-width: 100% !important; /* Strict Bound */
    min-width: 0 !important;
    margin-top: 14px !important;
  }
  .admin-table td.col-status .cell-content {
    justify-content: center !important;
    padding: 0 !important;
    gap: 0 !important; /* CRITICAL: Remove residual 8px gap pushing pill out of bounds */
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .admin-table td.col-status .status-pill-tooltip-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .admin-table td.col-status .status-badge {
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0 16px !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 12px !important;
    letter-spacing: 0.08em !important;
    border-width: 1px !important;
    border-radius: 999px !important;
    box-shadow:
      0 12px 24px rgba(15, 23, 42, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 0 0 1px rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(14px) saturate(175%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(175%) !important;
  }

  .admin-table td.col-status .status-pill-tooltip {
    display: none !important;
  }

  /* 6. Verify / Cancel Actions (Equal Width Buttons, Locked Bounds) */
  .admin-table td.col-actions {
    order: 8 !important;
    flex: 1 1 100% !important;
    width: auto !important;
    max-width: 100% !important; /* Strict Bound */
    min-width: 0 !important;
    display: block !important;
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid #e2e8f0 !important;
    box-sizing: border-box !important;
  }

  .admin-table td.col-actions .actions-slot-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Break out the action slots */
  .admin-table td.col-actions .action-slot {
    display: flex !important;
    flex: 1 1 0% !important;
    width: 50% !important;
    max-width: calc(
      50% - 6px
    ) !important; /* Safari fallback: Hard math to account for the 12px gap safely */
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Make buttons naturally fill their grid slots with premium styling */
  .admin-table td.col-actions .btn-action-glass {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 44px !important; /* Larger, more comfortable tap target */
    padding: 0 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.05),
      inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
  }

  /* Specific rich color gradients for mobile action buttons */
  .admin-table td.col-actions .btn-verify {
    background: linear-gradient(
      180deg,
      rgba(236, 253, 245, 0.95) 0%,
      rgba(209, 250, 229, 0.85) 100%
    ) !important;
    border: 1px solid rgba(167, 243, 208, 0.9) !important;
    color: #059669 !important;
  }
  .admin-table td.col-actions .btn-cancel {
    background: linear-gradient(
      180deg,
      rgba(254, 242, 242, 0.95) 0%,
      rgba(254, 226, 226, 0.85) 100%
    ) !important;
    border: 1px solid rgba(254, 202, 202, 0.9) !important;
    color: #dc2626 !important;
  }
  .admin-table td.col-actions .btn-restore {
    background: linear-gradient(
      180deg,
      rgba(239, 246, 255, 0.95) 0%,
      rgba(219, 234, 254, 0.85) 100%
    ) !important;
    border: 1px solid rgba(191, 219, 254, 0.9) !important;
    color: #2563eb !important;
  }
}

/* --- IMAGE EXPAND OVERLAY (REFINED GLASS) --- */
#imageExpandBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75); /* Deeper, cleaner contrast */
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
  padding: 24px;
  user-select: none; /* Prevents text caret glitches */
  -webkit-user-select: none;
}

#imageExpandBackdrop.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.image-expand-card {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 24px;
  padding: 8px; /* Tighter inner padding */
  /* Pure glassmorphism */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: scale(0.96) translateY(16px);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Strictly clips any rendering artifacts at the edge */
  outline: none;
}

#imageExpandBackdrop.visible .image-expand-card {
  transform: scale(1) translateY(0);
}

.image-expand-card img {
  max-width: 100%;
  max-height: calc(90vh - 16px);
  object-fit: contain;
  border-radius: 16px;
  display: block;
  background: transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  /* Removed problematic hardware acceleration hacks that caused the ghost artifacts */
}

.image-expand-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  min-height: unset; /* Overrides global button min-height causing collapses */
  min-width: unset;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  outline: none;
  padding: 0;
}

.image-expand-close:hover {
  background: rgba(20, 119, 201, 0.9);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.08);
}

.image-expand-close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.expandable-thumb {
  cursor: zoom-in;
}
/* --- TIMELINE STATES FOR ADMIN SESSIONS --- */
.session-card.session-past {
  background: linear-gradient(
    180deg,
    rgba(241, 245, 249, 0.45) 0%,
    rgba(226, 232, 240, 0.25) 100%
  ) !important;
  border-color: rgba(203, 213, 225, 0.4) !important;
  opacity: 0.55 !important; /* Push it into the background */
  filter: grayscale(50%);
}

.session-card.session-past:hover {
  opacity: 0.95 !important; /* Bring it back into focus when hovered */
  filter: grayscale(0%);
  background: linear-gradient(
    180deg,
    rgba(248, 250, 252, 0.8) 0%,
    rgba(241, 245, 249, 0.6) 100%
  ) !important;
}

.session-card.session-current {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(236, 253, 245, 0.85) 100%
  ) !important;
  border-color: rgba(52, 211, 153, 0.8) !important;
  box-shadow:
    0 8px 32px rgba(16, 185, 129, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

/* Add a soft, breathing "Live" emerald glow to the current session */
.session-card.session-current::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid rgba(52, 211, 153, 0.4);
  animation: livePulse 2.5s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes livePulse {
  0% {
    opacity: 0.3;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.006);
    box-shadow: 0 0 16px rgba(52, 211, 153, 0.3);
  }
}

/* --- CANCELLATION DEEP LINK MODAL --- */
#cancelDeepLinkBackdrop {
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(10px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(130%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}

.cancel-modal-card {
  width: min(380px, calc(100vw - 32px)) !important;
  max-width: 380px !important;
  padding: 32px 28px 28px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-top: 4px solid #ef4444 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.cancel-icon-wrap {
  width: 56px !important;
  height: 56px !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  margin: 0 auto 16px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 4px 10px rgba(220, 38, 38, 0.1) !important;
}

.cancel-modal-title {
  margin: 0 0 8px 0 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
}

.cancel-modal-msg {
  margin: 0 0 24px !important;
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  font-weight: 500 !important;
  max-width: 32ch !important;
}

.cancel-details-box {
  background-color: #f8fafc !important;
  border-left: 3px solid #ef4444 !important;
  padding: 14px 16px !important;
  margin: 0 0 24px !important;
  border-radius: 0 12px 12px 0 !important;
  text-align: left !important;
  width: 100% !important;
  border-top: 1px solid #f1f5f9 !important;
  border-right: 1px solid #f1f5f9 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  box-sizing: border-box !important;
}

.cancel-details-box p {
  margin: 0 0 6px !important;
  color: #334155 !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
}

.cancel-details-box p:last-child {
  margin: 0 !important;
}

.cancel-details-box strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.cancel-actions-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 100% !important;
}

#btnClientCancelConfirm,
#btnClientCancelKeep {
  width: 100% !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

#btnClientCancelKeep {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04) !important;
}

#btnClientCancelKeep:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Mobile Overrides */
@media (max-width: 768px) {
  #cancelDeepLinkBackdrop {
    padding: 16px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.8) !important; /* Solid fallback for mobile performance */
  }
  .cancel-modal-card {
    width: 100% !important;
    padding: 28px 24px 24px !important;
    background: #ffffff !important; /* Strips gradient to prevent tearing */
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2) !important;
  }
  .cancel-icon-wrap {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 12px !important;
  }
  .cancel-icon-wrap svg {
    width: 20px !important;
    height: 20px !important;
  }
  .cancel-modal-title {
    font-size: 20px !important;
  }
  .cancel-modal-msg {
    margin-bottom: 20px !important;
  }
  .cancel-details-box {
    padding: 12px 14px !important;
    margin-bottom: 20px !important;
  }
  #btnClientCancelConfirm,
  #btnClientCancelKeep {
    min-height: 44px !important;
  }
}

/* Let the editor card's own bottom margin define the footer gap.
   This keeps the bottom spacing visually matched to the top spacing. */
#consentConfigModalCard .consent-config-body {
  padding-bottom: 0 !important;
  scroll-padding-bottom: 72px !important;
}

/* Keep the expanded Brand Assets card cleanly above the editor. */
#consentConfigModalCard #brandAssetsCard.expanded,
#consentConfigModalCard #brandAssetsCard:has(#brandAssetsBody:not(.hidden)) {
  margin-bottom: 28px !important;
}

/* 8. Footer stays visible and separated from the scrollable body */
#consentConfigModalCard > .consent-config-actions {
  position: relative !important;
  z-index: 100 !important;
  margin: 0 !important;
  padding: 20px 32px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.3) !important;
}

/* 9. Mobile tightening */
@media (max-width: 768px) {
  #brandAssetsCard {
    margin: 20px 20px 12px 20px !important;
  }

  #consentConfigModalCard .consent-config-body {
    padding-bottom: 0 !important;
    scroll-padding-bottom: 72px !important;
  }

  #consentConfigModalCard .consent-config-editor-card {
    margin: 12px 20px 20px 20px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #consentConfigModalCard #brandAssetsCard.expanded ~ .consent-config-editor-card,
  #consentConfigModalCard
    #brandAssetsCard:has(#brandAssetsBody:not(.hidden))
    ~ .consent-config-editor-card {
    height: clamp(340px, 50vh, 480px) !important;
  }

  #adminConsentTermsEditorModal {
    min-height: 0 !important;
  }

  #consentConfigModalCard > .consent-config-actions {
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 640px) {
  #childDobGroup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) !important;
  }

  #childDobPreview {
    grid-column: 1 / -1;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
  }
}

.attendee-glass-input::placeholder {
  color: rgba(59, 130, 246, 0.55) !important;
  font-weight: 500;
}

/* --- NEW SETTINGS LAYOUT (SIDEBAR & PANELS) --- */
#consentConfigModalCard {
  isolation: isolate;
}

#consentConfigModalCard > .kpi-header {
  flex: 0 0 auto;
  position: relative;
  z-index: 30;
}

.settings-layout-split {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  min-height: 0;
  background: #ffffff;
  overflow: hidden;
}

.settings-sidebar {
  flex: 0 0 240px;
  min-width: 240px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(241, 245, 249, 0.72));
  border-right: 1px solid #e2e8f0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 5;
}

.settings-nav-btn {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  font-family: 'Lexend', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-nav-btn svg,
.settings-nav-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-nav-label {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-nav-btn:hover {
  background: rgba(226, 232, 240, 0.6);
  color: #0f172a;
  border-color: rgba(203, 213, 225, 0.75);
}

.settings-nav-btn.active {
  background: #ffffff;
  color: #1477c9;
  border-color: rgba(191, 219, 254, 0.9);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.settings-content-shell {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
}

.settings-main-pane {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.settings-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.settings-panel.active-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  animation: panelFade 0.3s ease;
}

.settings-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 40px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.settings-global-footer {
  flex: 0 0 auto;
  min-height: 72px;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), #ffffff);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.04);
  z-index: 20;
}

.settings-global-footer-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-global-footer-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-global-footer-summary {
  font-size: 12px;
  font-weight: 650;
  color: #64748b;
  line-height: 1.35;
}

.settings-global-footer-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.settings-directory-panel {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.brand-assets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start; /* CRITICAL FIX: prevents the dropzones from stretching vertically out of bounds */
}

.brand-asset-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}
.brand-asset-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.brand-asset-title-wrap {
  flex: 1;
  padding-right: 12px;
}
.brand-asset-label {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.brand-asset-description {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}
.brand-asset-badge {
  background: #f0f9ff;
  color: #0ea5e9;
  border: 1px solid #bae6fd;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.settings-primary-btn:disabled {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  cursor: default !important;
  transform: none !important;
}

.settings-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 40px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#consentSettingsCard .settings-panel-scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px 40px 18px;
}

.settings-panel-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 14px 40px;
  min-height: 72px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.02);
  z-index: 10;
}

#brandAssetsCard {
  min-height: 0;
  max-height: 100%;
}

#brandAssetsCard .settings-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 40px 18px;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#brandAssetsCard .panel-header,
#adminUsersSettingsCard .panel-header,
#consultationStaffSettingsCard .panel-header {
  max-width: 760px;
  width: 100%;
  margin: 0 auto 16px;
  padding-bottom: 14px;
}

#brandAssetsBody {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  min-height: 0;
}

#brandAssetsCard .brand-assets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

#brandAssetsCard .brand-asset-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  padding: 16px 18px 18px;
}

#brandAssetsCard .brand-asset-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

#brandAssetsCard .brand-asset-title-wrap {
  min-width: 0;
}

#brandAssetsCard .brand-asset-label {
  font-size: 12px;
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#brandAssetsCard .brand-asset-description {
  font-size: 12.5px;
  line-height: 1.35;
  margin: 0;
}

#brandAssetsCard .brand-asset-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1;
}

#brandAssetsCard .dropzone {
  flex: 0 0 auto;
  height: auto !important;
  min-height: 168px !important;
  padding: 18px 14px !important;
  border-radius: 14px;
}

#brandAssetsCard .dropzone-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  font-size: 20px;
}

#brandAssetsCard .dropzone-title {
  font-size: 13.5px;
  line-height: 1.2;
  margin-bottom: 6px;
}

#brandAssetsCard .dropzone-copy {
  max-width: 180px;
  font-size: 12px;
  line-height: 1.35;
}

#brandAssetsCard .dropzone-helper {
  margin-top: 12px;
  font-size: 10.5px;
  line-height: 1.2;
}

#brandAssetsCard .file-preview.hidden {
  display: none !important;
}

#brandAssetsCard .file-preview {
  min-height: 0 !important;
  padding: 10px 12px !important;
  margin-top: 10px !important;
  gap: 10px !important;
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  overflow: hidden;
}

#brandAssetsCard .brand-file-preview-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#brandAssetsCard .brand-logo-preview-frame {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #f8fafc;
}

#brandAssetsCard .brand-logo-preview-frame.main-header-preview {
  background: linear-gradient(135deg, rgba(20, 119, 201, 0.98), rgba(15, 94, 160, 0.98));
  border-color: rgba(147, 197, 253, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 18px rgba(20, 119, 201, 0.14);
}

#brandAssetsCard .brand-logo-preview-frame.consent-preview {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: #dbeafe;
}

#brandAssetsCard .brand-logo-preview-frame img {
  display: none;
  width: 100% !important;
  height: 100% !important;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
  border: none !important;
  border-radius: 6px !important;
  background: transparent !important;
  cursor: zoom-in;
}

#brandAssetsCard .brand-logo-preview-frame.main-header-preview img {
  filter: drop-shadow(0 1px 2px rgba(2, 6, 23, 0.18));
}

#brandAssetsCard .file-preview-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px !important;
}

/* Per-panel settings footers were removed.
     The persistent .settings-global-footer now owns all settings save actions. */

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

#consentSettingsCard .panel-header {
  flex: 0 0 auto;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.panel-header h3 {
  margin: 0 0 6px 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.panel-header p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

#consentSettingsBody {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.settings-field-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

#consentSettingsCard .settings-field-panel {
  flex: 0 0 auto;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.settings-field-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.settings-input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  transition: all 0.2s ease;
}

.settings-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.settings-helper-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 7px;
}

.consent-editor-shell {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.consent-editor-shell .settings-field-label {
  flex: 0 0 auto;
  padding: 14px 18px 0;
  margin-bottom: 10px;
}

#adminConsentTermsEditorModal {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.ql-toolbar.ql-snow {
  border: none !important;
  border-top: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  padding: 12px 20px !important;
}

.ql-container.ql-snow {
  border: none !important;
}

.ql-editor {
  padding: 20px !important;
  font-size: 14px;
  line-height: 1.7;
  min-height: 340px;
}

.consent-editor-shell .ql-toolbar.ql-snow {
  flex: 0 0 auto;
  padding: 8px 14px !important;
}

.consent-editor-shell .ql-toolbar.ql-snow .ql-formats {
  margin-right: 8px;
}

.consent-editor-shell .ql-container.ql-snow {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.consent-editor-shell .ql-editor {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding: 18px 20px !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-height: 760px) {
  #consentSettingsCard .settings-panel-scroll {
    padding: 16px 28px 14px;
  }

  #consentSettingsCard .panel-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  #consentSettingsCard .panel-header h3 {
    font-size: 18px;
  }

  #consentSettingsCard .panel-header p {
    font-size: 12.5px;
  }

  #consentSettingsCard .settings-field-panel {
    padding: 12px 14px;
    margin-bottom: 10px;
  }

  .consent-editor-shell .settings-field-label {
    padding: 12px 14px 0;
    margin-bottom: 8px;
  }

  .consent-editor-shell .ql-toolbar.ql-snow {
    padding: 6px 10px !important;
  }

  .settings-panel-footer {
    padding: 12px 28px;
  }
}

@media (max-width: 720px) {
  .settings-layout-split {
    flex-direction: column;
  }

  .settings-sidebar {
    flex: 0 0 auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .settings-nav-btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    padding: 10px 12px;
  }

  #consentSettingsCard .settings-panel-scroll {
    padding: 14px;
  }

  .settings-panel-footer {
    padding: 12px 14px;
  }
}

.admin-users-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.admin-users-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 10px;
}
.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}
.admin-users-list .admin-users-status {
  font-size: 13.5px;
  color: #64748b;
  text-align: center;
  padding: 24px 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  margin: 12px 0;
}
#adminUsersStatusText,
#staffStatusText {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.admin-user-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0284c7;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}

.admin-user-email {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.admin-user-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
  box-sizing: border-box;
}

.admin-user-main,
.admin-user-row > div:not(.admin-user-avatar):not(.admin-user-actions) {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-user-actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.consultation-staff-directory-panel {
  width: min(100%, 900px) !important;
  max-width: 900px !important;
  margin: 0 auto;
  box-sizing: border-box;
}

.staff-panel-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.staff-panel-intro-card {
  min-width: 0;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.85);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, rgba(239, 246, 255, 0.86), rgba(248, 250, 252, 0.72));
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.staff-panel-intro-card strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.staff-panel-intro-card span {
  display: block;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
}

.consultation-staff-toolbar {
  align-items: stretch;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(56, 189, 248, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.76));
  border: 1px solid rgba(226, 232, 240, 0.9);
  margin-bottom: 14px;
}

.consultation-staff-add-row {
  min-width: 0;
}

.consultation-staff-add-row .settings-input {
  min-width: 0;
}

.staff-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 2px 10px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.consultation-staff-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-height: min(62vh, 720px);
  min-height: 0;
  padding: 2px 4px 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-padding: 10px;
}

.staff-empty-state {
  padding: 26px 18px;
  text-align: center;
  border-radius: 20px;
  border: 1px dashed rgba(147, 197, 253, 0.9);
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.9));
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.staff-empty-state strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 6px;
}

.staff-glass-card {
  position: relative;
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 4px 24px -6px rgba(15, 23, 42, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.staff-glass-card.editing {
  border-color: rgba(56, 189, 248, 0.7);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(239, 246, 255, 0.7) 100%);
  box-shadow:
    0 12px 32px -5px rgba(14, 165, 233, 0.12),
    0 0 0 4px rgba(56, 189, 248, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.staff-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.staff-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.staff-card-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.staff-card-email {
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Squircles & Unified Time Picker */
.staff-card-config {
  display: flex;
  align-items: stretch;
  background: rgba(248, 250, 252, 0.6);
  border-radius: 16px;
  padding: 12px 18px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  gap: 20px;
}

.config-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.config-col-right {
  flex: 1;
  align-items: center;
}

.config-divider {
  width: 1px;
  background: rgba(203, 213, 225, 0.6);
  margin: 0;
}

.config-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sq-day-group {
  display: flex;
  gap: 6px;
}

.sq-day-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.6);
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
  font-family: 'Lexend', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
}

.sq-day-btn:hover {
  background: #ffffff;
  color: #0ea5e9;
  border-color: #bae6fd;
  transform: translateY(-1px);
}

.sq-day-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow:
    0 4px 10px rgba(14, 165, 233, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.sq-time-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.6);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.02);
  width: 100%;
  max-width: 270px;
}

.time-to {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  padding: 0 4px;
  text-transform: uppercase;
}

.sq-time-select {
  appearance: none;
  background: transparent;
  border: none;
  font-family: 'Lexend', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  padding: 6px 22px 6px 12px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  border-radius: 8px;
  transition: all 0.2s;
  flex: 1;
  text-align: center;
  text-align-last: center;
}

.sq-time-select:hover,
.sq-time-select:focus {
  background-color: rgba(241, 245, 249, 0.8);
}

@media (max-width: 780px) {
  .staff-panel-intro {
    grid-template-columns: 1fr;
  }

  .consultation-staff-toolbar,
  .consultation-staff-add-row {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-card-top {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .staff-card-main {
    flex: 1 1 auto;
  }

  .staff-card-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 6px;
    gap: 10px;
  }

  .staff-card-actions .admin-mini-btn {
    flex: 1 1 50%;
    justify-content: center;
    height: 40px;
  }

  .staff-card-config {
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 14px;
    gap: 16px;
    border-radius: 14px;
  }

  .config-col-right {
    align-items: stretch;
  }

  .config-divider {
    display: none; /* Hide the divider on mobile for a cleaner stacked look */
  }

  .sq-day-btn {
    flex: 1; /* Stretch squircles evenly on mobile */
    height: 44px; /* Larger touch targets */
    border-radius: 10px;
  }

  .sq-time-group {
    max-width: none;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
    padding: 6px;
    border-radius: 12px;
  }

  .sq-time-select {
    flex: 1;
    text-align: center;
    height: 40px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  }

  .staff-list-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.admin-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.admin-mini-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.admin-mini-btn.danger {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}
.admin-mini-btn.danger:hover {
  background: #fee2e2;
  border-color: #f87171;
}

.settings-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #1477c9, #0ea5e9);
  color: #fff;
  border: none;
  padding: 0 24px;
  border-radius: 10px;
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 119, 201, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.settings-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 119, 201, 0.35);
}
.settings-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 0 24px;
  border-radius: 10px;
  font-family: 'Lexend', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.settings-secondary-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Only stack directory user cards on truly narrow screens */
@media (max-width: 560px) {
  .admin-user-row {
    flex-wrap: wrap;
    padding: 14px;
    gap: 12px;
  }

  .admin-user-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 4px;
    gap: 10px;
  }

  .admin-user-actions .admin-mini-btn {
    flex: 1 1 50%;
    justify-content: center;
    height: 40px;
  }
}

/* ==========================================
   CONSULTATION BOOKING GLASS PORTAL
   ========================================== */

.consultation-portal {
  position: fixed;
  inset: calc(var(--app-header-offset) - 8px) 0 0 0;
  z-index: 1350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 16% 18%, rgba(56, 189, 248, 0.28), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(168, 85, 247, 0.22), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(34, 197, 94, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.72));
  backdrop-filter: blur(30px) saturate(175%);
  -webkit-backdrop-filter: blur(30px) saturate(175%);
}

.consultation-portal.hidden {
  display: none !important;
}

.consult-orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(4px);
  opacity: 0.72;
}

.consult-orb-one {
  width: 260px;
  height: 260px;
  left: 8%;
  top: 10%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.34), transparent 68%);
}

.consult-orb-two {
  width: 320px;
  height: 320px;
  right: 4%;
  bottom: 4%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28), transparent 68%);
}

.consult-modal-shell {
  position: relative;
  width: min(1120px, 96vw);
  max-height: calc(100dvh - var(--app-header-offset) - 42px);
  overflow: auto;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1)),
    rgba(15, 23, 42, 0.42);
  box-shadow:
    0 48px 120px rgba(3, 7, 18, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  padding: 30px;
}

.consult-close-btn {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  min-height: unset !important;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.36);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
}

.consult-close-btn svg {
  width: 20px;
  height: 20px;
}

.consult-hero {
  padding: 8px 58px 24px 4px;
}

.consult-kicker {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(186, 230, 253, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.24);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.consult-hero h2 {
  color: #f8fafc;
  margin: 16px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.consult-hero p {
  color: rgba(226, 232, 240, 0.82);
  max-width: 68ch;
  margin: 0;
  line-height: 1.6;
  font-weight: 600;
}

.consult-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 22px;
  align-items: stretch;
}

.consult-prefill-card,
.consult-calendar-card,
.consult-submit-card {
  position: relative;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.34));
  box-shadow:
    0 20px 48px rgba(2, 6, 23, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
}

.consult-prefill-card {
  grid-column: 1;
  grid-row: 1;
  padding: 24px;
}

.consult-calendar-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 24px;
  min-width: 0;
}

.consult-submit-card {
  grid-column: 1;
  grid-row: 2;
  padding: 24px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.consult-card-title {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.consult-summary-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 22px;
}

.consult-summary-list div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.consult-summary-list span {
  display: block;
  color: rgba(203, 213, 225, 0.76);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.consult-summary-list strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.consult-label {
  display: block;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 8px;
}

#consultNotesInput {
  width: 100%;
  border: 1px solid rgba(191, 219, 254, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-radius: 16px;
  padding: 14px;
  resize: vertical;
  outline: none;
}

#consultNotesInput::placeholder {
  color: rgba(226, 232, 240, 0.48);
}

.consult-primary-btn {
  width: 100%;
  margin-top: 18px;
  border: none;
  border-radius: 16px;
  min-height: 52px;
  background: linear-gradient(135deg, #1477c9, #38bdf8);
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(20, 119, 201, 0.28);
}

.consult-primary-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.consult-secondary-btn {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(203, 213, 225, 0.38);
  background: rgba(15, 23, 42, 0.28);
  color: rgba(248, 250, 252, 0.92);
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.consult-secondary-btn:hover {
  background: rgba(15, 23, 42, 0.42);
  border-color: rgba(226, 232, 240, 0.52);
}

.consult-mobile-cancel-btn {
  display: none;
}

.consult-submit-card {
  grid-column: 1 / -1;
  border-radius: 24px;
  padding: 22px;
  border: 1px solid rgba(191, 219, 254, 0.18);
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 44px rgba(2, 6, 23, 0.18);
}

.consult-footnote {
  margin-top: 14px;
  color: rgba(203, 213, 225, 0.72);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.consult-secure-link-copy {
  text-align: left;
  margin-top: 16px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.84);
}

.consult-secure-link-copy p {
  margin: 0;
}

.consult-mobile-title,
.consult-mobile-flow {
  display: none;
}

.consult-secure-desktop-copy {
  line-height: 1.65;
}

.consult-secure-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.consult-secure-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(191, 219, 254, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

.consult-secure-steps span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.32);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 900;
}

.consult-secure-steps strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.25;
}

.consult-secure-steps small {
  display: block;
  margin-top: 4px;
  color: rgba(203, 213, 225, 0.76);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
}

@media (min-width: 901px) {
  .consult-prefill-card {
    min-height: 0;
  }

  .consult-submit-card {
    min-height: 0;
  }
}

.consult-submit-card .consult-card-title {
  margin-bottom: 16px;
}

.consult-submit-card #consultNotesInput {
  min-height: 132px;
  flex: 0 0 auto;
}

.consult-submit-card .consult-primary-btn {
  margin-top: 18px;
}

.consult-submit-card .consult-footnote {
  margin-top: 14px;
}

.consult-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.consult-month-label {
  color: rgba(226, 232, 240, 0.78);
  font-weight: 700;
  margin-top: 4px;
}

.consult-nav-btn {
  width: 44px;
  height: 44px;
  min-height: unset !important;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.consult-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.consult-weekday {
  color: rgba(186, 230, 253, 0.76);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 0;
}

.consult-day {
  min-height: 78px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.consult-day.is-blank {
  opacity: 0;
  pointer-events: none;
}

.consult-day:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.consult-day.has-slots {
  background: linear-gradient(180deg, rgba(20, 119, 201, 0.22), rgba(56, 189, 248, 0.1));
  border-color: rgba(125, 211, 252, 0.34);
}

.consult-day.has-slots:hover,
.consult-day.selected {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.72);
  background: linear-gradient(180deg, rgba(20, 119, 201, 0.34), rgba(56, 189, 248, 0.16));
}

.consult-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.46);
}

.consult-day-num {
  font-size: 15px;
  font-weight: 800;
}

.consult-day-dot {
  font-size: 10px;
  color: #bae6fd;
  font-weight: 800;
}

.consult-slots-panel {
  margin-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  scroll-margin-top: 16px;
}

.consult-submit-card {
  scroll-margin-top: 16px;
}

.consult-slots-title {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.consult-slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.consult-slot-btn {
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: #f8fafc;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.consult-slot-btn strong {
  display: block;
  font-size: 14px;
}

.consult-slot-btn small {
  display: block;
  color: rgba(203, 213, 225, 0.78);
  margin-top: 3px;
  font-weight: 700;
}

.consult-slot-btn em {
  color: #bae6fd;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.consult-slot-btn:hover,
.consult-slot-btn.selected {
  border-color: rgba(56, 189, 248, 0.72);
  background: rgba(56, 189, 248, 0.16);
}

.consult-empty,
.consult-loading {
  grid-column: 1 / -1;
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: rgba(226, 232, 240, 0.76);
  text-align: center;
  font-weight: 700;
}

@media (max-width: 900px) {
  .consultation-portal {
    align-items: flex-start;
    padding: 14px;
  }

  .consult-modal-shell {
    padding: 22px;
    border-radius: 26px;
  }

  .consult-hero {
    display: none;
  }

  .consult-mobile-title {
    display: block;
    margin-bottom: 18px;
  }

  .consult-mobile-title h2 {
    color: #f8fafc;
    margin: 14px 0 0;
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.05em;
  }

  .consult-secure-desktop-copy {
    display: none;
  }

  .consult-mobile-flow {
    display: block;
  }

  .consult-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .consult-prefill-card {
    grid-column: 1;
    grid-row: auto;
    order: 1;
  }

  .consult-calendar-card {
    grid-column: 1;
    grid-row: auto;
    order: 2;
  }

  .consult-submit-card {
    grid-column: 1;
    grid-row: auto;
    order: 3;
    padding: 24px;
  }

  .consult-calendar-grid {
    gap: 7px;
  }

  .consult-day {
    min-height: 64px;
    padding: 9px;
  }
}

@media (min-width: 901px) {
  .consult-hero {
    display: block;
  }

  .consult-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
  }

  .consult-prefill-card {
    grid-column: 1 !important;
    grid-row: 1 !important;
    order: 0 !important;
    min-height: 0;
  }

  .consult-submit-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
    order: 0 !important;
    align-self: stretch;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .consult-calendar-card {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    order: 0 !important;
    min-width: 0;
    z-index: 1;
  }

  .consult-submit-card #consultNotesInput {
    min-height: 132px;
    flex: 0 0 auto;
  }

  .consult-submit-card .consult-primary-btn {
    margin-top: 18px;
  }

  .consult-submit-card .consult-footnote {
    margin-top: 14px;
  }
}

@media (max-width: 560px) {
  .consult-modal-shell {
    width: 100%;
    padding: 18px;
  }

  .consult-layout {
    padding-top: 46px;
  }

  .consult-calendar-grid {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
  }

  .consult-day-dot {
    display: none;
  }

  .consult-slot-list {
    grid-template-columns: 1fr;
  }
}

/* --- Transfer Offer Modal --- */
.transfer-offer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.24), transparent 28%),
    radial-gradient(circle at 85% 90%, rgba(168, 85, 247, 0.18), transparent 30%),
    rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.transfer-offer-backdrop.visible {
  display: flex !important;
}

.transfer-offer-card {
  width: min(720px, calc(100vw - 32px));
  max-height: min(780px, calc(100dvh - 48px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background:
    radial-gradient(circle at 12% 0%, rgba(219, 234, 254, 0.72), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
  box-shadow:
    0 34px 86px rgba(15, 23, 42, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.transfer-offer-header {
  padding: 26px 28px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.5));
}

.transfer-offer-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lr-blue);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(147, 197, 253, 0.55);
  box-shadow:
    0 12px 24px rgba(20, 119, 201, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.transfer-offer-icon svg {
  width: 25px;
  height: 25px;
}

.transfer-offer-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.transfer-offer-kicker {
  margin: 0 0 5px;
  color: var(--lr-blue-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.transfer-offer-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 4.8vw, 28px);
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.transfer-offer-intro {
  margin: 0;
  color: #52657a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.transfer-offer-list {
  padding: 18px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 119, 201, 0.06), transparent 32%), #f8fafc;
  -webkit-overflow-scrolling: touch;
}

.transfer-option-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.transfer-option-card:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 119, 201, 0.34);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.08),
    0 0 0 4px rgba(20, 119, 201, 0.07);
}

.transfer-option-card.selected {
  border-color: rgba(20, 119, 201, 0.62);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  box-shadow:
    0 16px 34px rgba(20, 119, 201, 0.13),
    0 0 0 4px rgba(20, 119, 201, 0.1);
}

.transfer-option-radio {
  margin: 6px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--lr-blue);
}

.transfer-option-main {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.transfer-option-date-row {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.transfer-option-calendar-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lr-blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.transfer-option-calendar-icon svg {
  width: 18px;
  height: 18px;
}

.transfer-option-date-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.transfer-option-date {
  display: block;
  min-width: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.transfer-option-time {
  display: block;
  color: var(--lr-blue-dark);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
}

.transfer-option-subcopy {
  color: #64748b;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.45;
}

.transfer-option-badge {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 150px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.045em;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.transfer-option-badge.is-open {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.transfer-option-badge.is-waitlist {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fed7aa;
}

.transfer-offer-actions {
  flex: 0 0 auto;
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.86);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.78), rgba(255, 255, 255, 0.96));
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.045);
}

@media (max-width: 640px) {
  .transfer-offer-backdrop {
    padding: 14px;
  }

  .transfer-offer-card {
    width: 100%;
    max-height: calc(100dvh - 28px);
    border-radius: 24px;
  }

  .transfer-offer-header {
    padding: 22px 18px 18px;
    flex-direction: column;
    gap: 12px;
  }

  .transfer-offer-list {
    padding: 14px;
  }

  .transfer-option-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .transfer-option-badge {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }

  .transfer-offer-actions {
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .transfer-offer-actions button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #transferOfferBackdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.86) !important;
  }

  .transfer-offer-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #ffffff !important;
  }
}

/* --- INTEGRATED GOOGLE MEET CAPSULE ENGINE --- */
.admin-meet-pill-shell {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0 !important;
  min-width: 0;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  box-shadow:
    0 6px 16px rgba(20, 119, 201, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-meet-pill-shell:hover {
  border-color: rgba(20, 119, 201, 0.45);
  box-shadow:
    0 8px 22px rgba(20, 119, 201, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Master Copy Button Custom Layout Structuring */
.admin-meet-pill-shell .btn-admin-copy {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 12px 0 14px !important;
  border-radius: 0 !important;
  border-right: 1px solid rgba(191, 219, 254, 0.65) !important;
  flex: 1 1 auto;
}

.admin-meet-pill-shell .btn-admin-copy:hover {
  background: rgba(219, 234, 254, 0.3) !important;
  transform: none !important;
}

/* Integrated Edit Trigger Button Sizing and Masking */
.admin-meet-pill-shell .btn-edit-meet-code {
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  flex: 0 0 36px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-meet-pill-shell .btn-edit-meet-code:hover {
  background: rgba(20, 119, 201, 0.08) !important;
  color: #1477c9 !important;
  transform: none !important;
}

.admin-meet-pill-shell .btn-edit-meet-code svg {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2.3px !important;
}

/* --- PREMIUM AMORPHIC GLASS OVERRIDE MODAL --- */
.meet-code-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.22), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(168, 85, 247, 0.2), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(20, 119, 201, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.74));
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.meet-code-modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.meet-code-modal-card {
  position: relative;
  width: min(480px, 100%);
  overflow: hidden;
  border-radius: 28px;
  padding: 34px 32px 30px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.11); /* Subtly thinned perimeter glare */
  /* FIX: Deepen the glass core using heavy obsidian opacity masks to strip away paleness completely */
  background: linear-gradient(180deg, rgba(10, 17, 30, 0.91) 0%, rgba(3, 7, 14, 0.86) 100%);
  box-shadow:
    0 36px 90px rgba(2, 6, 23, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    /* Balanced top rim glare for rich background integration */ inset 0 -20px 40px
      rgba(0, 0, 0, 0.45); /* Enhanced base ambient occlusion to ground the card weight */
  backdrop-filter: blur(30px) saturate(165%);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
}

.meet-code-modal-backdrop.visible .meet-code-modal-card {
  transform: translateY(0) scale(1);
}

/* Light Core Sheen Border for True Depth Integration */
.meet-code-modal-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
}

.meet-code-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  min-height: 38px !important;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(241, 245, 249, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.meet-code-modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: scale(1.05);
}

.meet-code-modal-close svg {
  width: 16px;
  height: 16px;
}

.meet-code-modal-orb {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow:
    0 10px 24px rgba(14, 165, 233, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  margin-bottom: 20px;
}

.meet-code-modal-orb svg {
  width: 24px;
  height: 24px;
}

.meet-code-modal-kicker {
  font-size: 10.5px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.meet-code-modal-copy h3 {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.meet-code-modal-copy p {
  margin: 8px 0 24px;
  color: rgba(226, 232, 240, 0.85);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.meet-code-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meet-code-modal-form label {
  font-size: 11px;
  font-weight: 800;
  color: rgba(186, 230, 253, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

/* Hard Refined Monospace Matrix Input Core */
#meetCodeOverrideInput {
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(15, 23, 42, 0.45) !important;
  color: #ffffff !important;
  padding: 0 20px !important;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  text-align: center;
  outline: none;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.2),
    0 10px 24px rgba(2, 6, 23, 0.15) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#meetCodeOverrideInput:focus {
  background: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.15),
    0 12px 28px rgba(14, 165, 233, 0.18),
    inset 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

#meetCodeOverrideInput.invalid {
  border-color: rgba(239, 68, 68, 0.6) !important;
  background: rgba(254, 226, 226, 0.12) !important;
  color: #fca5a5 !important;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.15),
    0 12px 28px rgba(239, 68, 68, 0.12),
    inset 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

#meetCodeOverrideInput::placeholder {
  color: rgba(255, 255, 255, 0.22) !important;
  font-weight: 400;
}

.meet-code-current-line {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.7);
  font-weight: 600;
  text-align: left;
  margin-top: 2px;
}

.meet-code-current-line strong {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace !important;
  color: #38bdf8;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.meet-code-hint {
  color: rgba(226, 232, 240, 0.55);
  font-size: 11.5px;
  line-height: 1.5;
  font-weight: 500;
  text-align: left;
  margin-top: 4px;
}

.meet-code-error {
  min-height: 16px;
  color: #fb7185;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  margin-top: 2px;
}

.meet-code-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.meet-code-btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.meet-code-btn:disabled {
  opacity: 0.32 !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.meet-code-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(241, 245, 249, 0.9);
}

.meet-code-btn.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.meet-code-btn.primary {
  background: linear-gradient(180deg, #1477c9 0%, #0f5ea0 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 24px rgba(20, 119, 201, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.meet-code-btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #1d8be6 0%, #126ebc 100%);
  box-shadow:
    0 12px 28px rgba(20, 119, 201, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  #meetCodeOverrideBackdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(9, 14, 23, 0.96) !important;
  }

  .meet-code-modal-card {
    padding: 26px 24px;
    border-radius: 24px;
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
  }

  .meet-code-modal-actions {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 8px;
  }

  .meet-code-btn {
    width: 100%;
    min-height: 46px;
  }
}

@media (max-width: 768px) {
  #meetCodeOverrideBackdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(15, 23, 42, 0.94) !important;
  }

  .meet-code-modal-card {
    padding: 24px;
    border-radius: 24px;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .meet-code-modal-actions {
    flex-direction: column-reverse;
  }

  .meet-code-btn {
    width: 100%;
  }
}

/* --- End of: styles.css --- */
