/* /connect/admin/admin-views.css — Bible Connect Admin View Styles v1
 *
 * Module-specific CSS for every admin view. Requires:
 *   - /shared/tokens.css
 *   - /connect/connect-tokens.css
 *   - /connect/admin/admin-shell.css  (layout + base components)
 * ─────────────────────────────────────────────────────────────────── */

/* ================================================================
   LAYOUT UTILITY CLASSES
   Used in JS-generated HTML strings to avoid inline styles.
================================================================ */
.adm-flex-row     { display: flex; align-items: center; gap: var(--bcc-s2); }
.adm-flex-row-md  { display: flex; align-items: center; gap: var(--bcc-s3); }
.adm-flex-row-lg  { display: flex; align-items: center; gap: var(--bcc-s4); }
.adm-flex-between { display: flex; align-items: center; justify-content: space-between; }
.adm-flex-col     { display: flex; flex-direction: column; gap: var(--bcc-s5); }
.adm-flex-col-sm  { display: flex; flex-direction: column; gap: var(--bcc-s2); }
.adm-flex-wrap    { display: flex; flex-wrap: wrap; gap: var(--bcc-s2); align-items: center; }
.adm-grid-2       { display: grid; grid-template-columns: 1fr 1fr; gap: var(--bcc-s6); }
/* Two-column utility/forms collapse to one column on phones; grid children
   get min-width:0 so long content cannot force horizontal overflow. */
.adm-grid-2 > * { min-width: 0; }
@media (max-width: 767px) {
  .adm-grid-2 { grid-template-columns: 1fr; gap: var(--bcc-s4); }
}
.adm-mt-xs        { margin-top: var(--bcc-s1); }
.adm-mt-sm        { margin-top: var(--bcc-s2); }
.adm-mt-md        { margin-top: var(--bcc-s3); }
.adm-mt-lg        { margin-top: var(--bcc-s6); }
.adm-mb-sm        { margin-bottom: var(--bcc-s2); }
.adm-mb-md        { margin-bottom: var(--bcc-s3); }
.adm-danger-color { color: var(--bcc-danger) !important; }
.adm-section-gap  { margin-top: var(--bcc-s8); }
.adm-card-section {
  padding:       var(--bcc-s5) var(--bcc-s6);
  border-radius: var(--bcc-r-lg);
  background:    var(--bcc-surface-2);
  border:        1px solid var(--bcc-border);
  margin-bottom: var(--bcc-s4);
}

/* ================================================================
   SHARED ADMIN VIEW LAYOUT
================================================================ */
.adm-view-page {
  max-width: 1200px;
  margin:    0 auto;
  padding:   var(--bcc-s6) var(--bcc-s8);
}

/* adm-view-header is in admin-shell.css — extended below */
.adm-header-actions {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s3);
  flex-shrink: 0;
}

.adm-toolbar {
  display:       flex;
  align-items:   center;
  gap:           var(--bcc-s3);
  flex-wrap:     wrap;
  padding:       var(--bcc-s3) var(--bcc-s4);
  margin-bottom: var(--bcc-s4);
}

.adm-pagination {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--bcc-s3) var(--bcc-s4);
  gap:             var(--bcc-s2);
  border-top:      1px solid var(--bcc-border);
  font-size:       var(--bcc-t-sm);
  color:           var(--bcc-ink-3);
}

/* ================================================================
   PEOPLE MODULE
================================================================ */
.ppl-person-cell {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s3);
}

.ppl-person-name {
  font-weight: 500;
  color:       var(--bcc-ink);
  font-size:   var(--bcc-t-sm);
  overflow-wrap: anywhere;
}

.ppl-person-email {
  font-size: var(--bcc-t-xs);
  color:     var(--bcc-ink-3);
  margin-top: 1px;
  overflow-wrap: anywhere;
}

.ppl-filter-row {
  display:   flex;
  gap:       var(--bcc-s3);
  flex-wrap: wrap;
  padding:   var(--bcc-s2) 0;
}

.ppl-bulk-bar {
  display:       flex;
  align-items:   center;
  gap:           var(--bcc-s2);
  padding:       var(--bcc-s2) var(--bcc-s3);
  background:    var(--bcc-primary-soft);
  border-radius: var(--bcc-r-sm);
  border:        1px solid var(--bcc-primary);
  margin-bottom: var(--bcc-s3);
  font-size:     var(--bcc-t-sm);
}

.ppl-bulk-bar-label {
  font-weight: 600;
  color:       var(--bcc-primary);
  flex:        1;
}

.ppl-table-card {
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-lg);
  overflow:      hidden;
}

/* Drawer: person profile side panel */
.ppl-drawer-hero {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s4);
  padding:     var(--bcc-s6);
  border-bottom: 1px solid var(--bcc-border);
}

.ppl-drawer-hero-info { flex: 1; min-width: 0; }

.ppl-drawer-hero-name {
  font-size:   var(--bcc-t-xl);
  font-weight: 700;
  color:       var(--bcc-ink);
  margin:      0 0 4px;
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
}

.ppl-info-grid {
  display:               grid;
  grid-template-columns: auto 1fr;
  gap:                   var(--bcc-s2) var(--bcc-s4);
  padding:               var(--bcc-s4) var(--bcc-s6);
  align-items:           baseline;
}

.ppl-info-label {
  font-size:  var(--bcc-t-xs);
  color:      var(--bcc-ink-3);
  font-weight:600;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space:    nowrap;
}

.ppl-info-value {
  font-size: var(--bcc-t-sm);
  color:     var(--bcc-ink);
  overflow-wrap: anywhere;
}

.ppl-info-row {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s3);
  padding:     var(--bcc-s2) 0;
}

.ppl-info-row-label {
  width:      120px;
  font-size:  var(--bcc-t-xs);
  color:      var(--bcc-ink-3);
  font-weight:600;
  text-transform: uppercase;
  flex-shrink:0;
}

.ppl-info-row-val {
  font-size: var(--bcc-t-sm);
  color:     var(--bcc-primary);
  flex:      1;
}

/* Engagement score badge */
.ppl-engagement-score {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           32px;
  height:          32px;
  border-radius:   50%;
  font-size:       var(--bcc-t-xs);
  font-weight:     700;
  flex-shrink:     0;
}
.ppl-engagement-score.score-high   { background: var(--bcc-success-soft); color: var(--bcc-success); }
.ppl-engagement-score.score-med    { background: var(--bcc-warning-soft); color: var(--bcc-warning); }
.ppl-engagement-score.score-low    { background: var(--bcc-danger-soft);  color: var(--bcc-danger);  }
.ppl-engagement-score.score-none   { background: var(--bcc-surface-3);    color: var(--bcc-ink-3);   }

/* ================================================================
   GIVING MODULE (admin)
================================================================ */
.gvadm-overview,
.gvadm-chart,
.gvadm-donations,
.gvadm-funds,
.gvadm-pledges,
.gvadm-stripe {
  margin-bottom: var(--bcc-s6);
}

.gvadm-fund-card {
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-lg);
  padding:       var(--bcc-s5);
  margin-bottom: var(--bcc-s2);
  box-shadow:    none;
  transition:    border-color var(--bcc-dur-2) var(--bcc-ease),
                 box-shadow   var(--bcc-dur-2) var(--bcc-ease);
}

.gvadm-fund-card:hover {
  border-color: var(--bcc-border-soft);
  box-shadow:   var(--bcc-shadow-1);
}

.gvadm-fund-head {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  margin-bottom:   var(--bcc-s2);
}

.gvadm-fund-name {
  font-size:   var(--bcc-t-md);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0;
}

.gvadm-fund-total {
  font-size:   var(--bcc-t-lg);
  font-weight: 700;
  color:       var(--bcc-primary);
}

.gvadm-webhook-url {
  display:       flex;
  align-items:   center;
  gap:           var(--bcc-s2);
  background:    var(--bcc-surface-2);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-sm);
  padding:       var(--bcc-s2) var(--bcc-s3);
  font-family:   ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:     var(--bcc-t-xs);
  color:         var(--bcc-ink-2);
  overflow-x:    auto;
}

.gvadm-webhook-url code {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
}

/* ================================================================
   EVENTS MODULE (admin)
================================================================ */
.evadm-event-card {
  display:       flex;
  align-items:   flex-start;
  gap:           var(--bcc-s4);
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-lg);
  padding:       var(--bcc-s4) var(--bcc-s5);
  margin-bottom: var(--bcc-s2);
  box-shadow:    none;
  transition:    border-color var(--bcc-dur-2) var(--bcc-ease),
                 box-shadow   var(--bcc-dur-2) var(--bcc-ease);
}
.evadm-event-card:hover {
  border-color: var(--bcc-border-soft);
  box-shadow:   var(--bcc-shadow-1);
}

.evadm-card-date {
  width:          48px;
  flex-shrink:    0;
  text-align:     center;
  background:     var(--bcc-primary-soft);
  border-radius:  var(--bcc-r-sm);
  padding:        var(--bcc-s2) 0;
  line-height:    1;
}

.evadm-card-date-month {
  font-size:      var(--bcc-t-xs);
  font-weight:    700;
  color:          var(--bcc-primary);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.evadm-card-date-day {
  font-size:   var(--bcc-t-xl);
  font-weight: 700;
  color:       var(--bcc-primary);
  margin-top:  2px;
}

.evadm-card-info {
  flex:      1;
  min-width: 0;
}

.evadm-card-title {
  font-size:     var(--bcc-t-md);
  font-weight:   600;
  color:         var(--bcc-ink);
  margin:        0 0 4px;
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.evadm-card-meta {
  font-size: var(--bcc-t-xs);
  color:     var(--bcc-ink-3);
}

.evadm-card-actions {
  display:     flex;
  gap:         var(--bcc-s2);
  flex-shrink: 0;
  align-items: flex-start;
}

/* Calendar views */
.evadm-cal-nav {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  margin-bottom:   var(--bcc-s4);
}

.evadm-cal-label {
  font-size:   var(--bcc-t-xl);
  font-weight: 600;
  color:       var(--bcc-ink);
}

.evadm-cal-grid {
  display:               grid;
  grid-template-columns: repeat(7, 1fr);
  gap:                   var(--bcc-s1);
}

.evadm-cal-header {
  font-size:      var(--bcc-t-xs);
  font-weight:    600;
  text-align:     center;
  color:          var(--bcc-ink-3);
  text-transform: uppercase;
  padding-bottom: var(--bcc-s2);
}

.evadm-cal-day {
  aspect-ratio:  1;
  padding:       4px;
  background:    var(--bcc-surface-2);
  border-radius: var(--bcc-r-sm);
  cursor:        pointer;
  border:        1px solid transparent;
  transition:    background var(--bcc-dur-1), border-color var(--bcc-dur-1);
  overflow:      hidden;
  position:      relative;
}
.evadm-cal-day:hover { background: var(--bcc-surface-3); }
.evadm-cal-day.today { border-color: var(--bcc-primary); }
.evadm-cal-day.has-events { background: var(--bcc-surface-3); }
.evadm-cal-day.other-month { opacity: .35; }

.evadm-cal-day-num {
  font-size:   var(--bcc-t-xs);
  font-weight: 600;
  color:       var(--bcc-ink-2);
  line-height: 1;
}

.evadm-cal-event-chip {
  display:       block;
  font-size:     10px;
  line-height:   1;
  padding:       2px 4px;
  border-radius: 3px;
  background:    var(--bcc-primary);
  color:         #fff;
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
  margin-top:    2px;
}

/* Event card: let the action buttons drop to a wrapped row on phones so
   the date + info + actions line cannot overflow narrow viewports. */
@media (max-width: 600px) {
  .evadm-event-card { flex-wrap: wrap; }
  .evadm-card-actions { margin-left: auto; }
}

/* ================================================================
   SERVICES MODULE (admin)
================================================================ */
.svcadm-layout {
  display: flex;
  height:  calc(100dvh - 64px); /* subtract topbar */
  overflow: hidden;
}

.svcadm-list-panel {
  width:        240px;
  flex-shrink:  0;
  border-right: 1px solid var(--bcc-border);
  overflow-y:   auto;
  display:      flex;
  flex-direction: column;
}

.svcadm-list-head {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         var(--bcc-s3) var(--bcc-s4);
  border-bottom:   1px solid var(--bcc-border);
  flex-shrink:     0;
}

.svcadm-list-title {
  font-size:   var(--bcc-t-sm);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0;
}

.svcadm-editor-panel {
  flex:       1;
  overflow-y: auto;
  padding:    var(--bcc-s6);
}

.svcadm-plan-item {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s3);
  padding:     var(--bcc-s3) var(--bcc-s4);
  cursor:     pointer;
  font-size:  var(--bcc-t-sm);
  color:      var(--bcc-ink-2);
  border-left:3px solid transparent;
  transition: background var(--bcc-dur-1), color var(--bcc-dur-1);
}
.svcadm-plan-item:hover { background: var(--bcc-surface-2); color: var(--bcc-ink); }
.svcadm-plan-item.active {
  background:   var(--bcc-primary-soft);
  color:        var(--bcc-primary);
  border-color: var(--bcc-primary);
  font-weight:  600;
}

.svcadm-plan-date {
  font-size:  var(--bcc-t-xs);
  color:      var(--bcc-ink-3);
  margin-left:auto;
  flex-shrink:0;
}

.svcadm-editor-head {
  padding-bottom: var(--bcc-s4);
  margin-bottom:  var(--bcc-s4);
  border-bottom:  1px solid var(--bcc-border);
  display:        flex;
  align-items:    flex-start;
  justify-content:space-between;
  gap:            var(--bcc-s4);
}

.svc-items-list {
  display:        flex;
  flex-direction: column;
  gap:            var(--bcc-s1);
}

.svc-item {
  display:       flex;
  align-items:   center;
  gap:           var(--bcc-s3);
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  padding:       var(--bcc-s3) var(--bcc-s4);
  cursor:        default;
  transition:    border-color var(--bcc-dur-1);
}
.svc-item:hover   { border-color: var(--bcc-border-soft); }
.svc-item.dragging { opacity: .5; border: 1px dashed var(--bcc-primary); }

.svc-item-drag {
  cursor: grab;
  color:  var(--bcc-ink-3);
  font-size: 1rem;
  flex-shrink: 0;
}
.svc-item-drag:active { cursor: grabbing; }

.svc-item-body  { flex: 1; min-width: 0; }
.svc-item-title {
  font-size:   var(--bcc-t-sm);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0 0 2px;
}
.svc-item-notes {
  font-size: var(--bcc-t-xs);
  color:     var(--bcc-ink-3);
}

.svc-item-type-badge {
  font-size:     var(--bcc-t-xs);
  font-weight:   600;
  padding:       2px var(--bcc-s2);
  border-radius: var(--bcc-r-pill);
  text-transform: uppercase;
  letter-spacing: .05em;
  flex-shrink:   0;
}
.svc-item-type-badge.type-worship      { background: var(--bcc-accent-soft);   color: var(--bcc-accent);   }
.svc-item-type-badge.type-message      { background: var(--bcc-success-soft);  color: var(--bcc-success);  }
.svc-item-type-badge.type-prayer       { background: var(--bcc-warning-soft);  color: var(--bcc-warning);  }
.svc-item-type-badge.type-offering     { background: var(--bcc-primary-soft);  color: var(--bcc-primary);  }
.svc-item-type-badge.type-announcement { background: var(--bcc-info-soft);     color: var(--bcc-info);     }
.svc-item-type-badge.type-other        { background: var(--bcc-surface-3);     color: var(--bcc-ink-2);    }

.svcadm-total-time {
  text-align: right;
  font-size:  var(--bcc-t-sm);
  color:      var(--bcc-ink-3);
  padding:    var(--bcc-s2) 0;
  border-top: 1px solid var(--bcc-border);
  margin-top: var(--bcc-s1);
}

.svcadm-volunteers-section {
  margin-top:  var(--bcc-s6);
  padding-top: var(--bcc-s6);
  border-top:  1px solid var(--bcc-border);
}

/* ================================================================
   ATTENDANCE MODULE (admin)
================================================================ */
.atadm-sessions-table {
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-lg);
  overflow:      hidden;
}

.atadm-recon-grid {
  display:        flex;
  flex-direction: column;
  gap:            0;
}

.atadm-recon-row {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s3);
  padding:     var(--bcc-s3) var(--bcc-s4);
  border-bottom: 1px solid var(--bcc-border);
  transition:  background var(--bcc-dur-1);
}
.atadm-recon-row:last-child { border-bottom: none; }
.atadm-recon-row:hover  { background: var(--bcc-surface-2); }
.atadm-recon-row.present { background: var(--bcc-success-soft); }

.atadm-recon-name {
  flex:        1;
  font-size:   var(--bcc-t-sm);
  font-weight: 500;
  color:       var(--bcc-ink);
}

.atadm-toggle-btn {
  font-size:     var(--bcc-t-xs);
  font-weight:   600;
  padding:       var(--bcc-s1) var(--bcc-s3);
  border-radius: var(--bcc-r-pill);
  cursor:        pointer;
  border:        1px solid var(--bcc-border);
  background:    var(--bcc-surface-3);
  color:         var(--bcc-ink-2);
  transition:    background var(--bcc-dur-1), color var(--bcc-dur-1), border-color var(--bcc-dur-1);
}
.atadm-toggle-btn:hover      { background: var(--bcc-surface-3); border-color: var(--bcc-primary); color: var(--bcc-primary); }
.atadm-toggle-btn.is-present { background: var(--bcc-success-soft); border-color: var(--bcc-success); color: var(--bcc-success); }

/* ================================================================
   PASTORAL MODULE (admin)
================================================================ */
.pst-followup-card {
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-lg);
  padding:       var(--bcc-s4) var(--bcc-s5);
  margin-bottom: var(--bcc-s2);
  border-left:   4px solid transparent;
  box-shadow:    none;
  transition:    border-color var(--bcc-dur-2) var(--bcc-ease),
                 box-shadow   var(--bcc-dur-2) var(--bcc-ease);
}
.pst-followup-card:hover {
  border-color: var(--bcc-border-soft);
  box-shadow:   var(--bcc-shadow-1);
}
.pst-followup-card.priority-urgent   { border-left-color: var(--bcc-danger); }
.pst-followup-card.priority-high     { border-left-color: var(--bcc-warning); }
.pst-followup-card.priority-normal   { border-left-color: var(--bcc-primary); }
.pst-followup-card.priority-low      { border-left-color: var(--bcc-ink-3); }

.pst-followup-head {
  display:       flex;
  align-items:   center;
  gap:           var(--bcc-s2);
  margin-bottom: var(--bcc-s2);
}

.pst-followup-name {
  font-size:   var(--bcc-t-md);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0;
  flex:        1;
}

.pst-followup-body {
  font-size:   var(--bcc-t-sm);
  color:       var(--bcc-ink-2);
  line-height: 1.5;
  margin:      0 0 var(--bcc-s3);
}

.pst-followup-foot {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  margin-top:      var(--bcc-s3);
}

.pst-followup-meta {
  font-size: var(--bcc-t-xs);
  color:     var(--bcc-ink-3);
}

/* Visit log / timeline */
.pst-visit-log {
  display:        flex;
  flex-direction: column;
  gap:            0;
}

.pst-visit-item {
  display:  flex;
  gap:      var(--bcc-s4);
  padding:  var(--bcc-s3) 0;
  border-bottom: 1px solid var(--bcc-border);
}
.pst-visit-item:last-child { border-bottom: none; }

.pst-visit-date {
  width:      80px;
  flex-shrink:0;
  font-size:  var(--bcc-t-xs);
  color:      var(--bcc-ink-3);
  padding-top:2px;
}

.pst-visit-body { flex: 1; min-width: 0; }

.pst-visit-note {
  font-size:   var(--bcc-t-sm);
  color:       var(--bcc-ink-2);
  line-height: 1.5;
  margin:      0;
}

.pst-visit-author {
  font-size:  var(--bcc-t-xs);
  color:      var(--bcc-ink-3);
  margin-top: var(--bcc-s1);
}

/* AI pastoral tool */
.pst-ai-tool {
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-left:   4px solid var(--bcc-primary);
  border-radius: var(--bcc-r-lg);
  padding:       var(--bcc-s4);
}

.pst-ai-tool-head {
  font-size:     var(--bcc-t-sm);
  font-weight:   600;
  color:         var(--bcc-ink);
  margin-bottom: var(--bcc-s3);
}

.pst-ai-output {
  white-space:   pre-wrap;
  background:    var(--bcc-surface-2);
  border-radius: var(--bcc-r-sm);
  border:        1px solid var(--bcc-border);
  padding:       var(--bcc-s3);
  min-height:    80px;
  font-size:     var(--bcc-t-sm);
  color:         var(--bcc-ink-2);
  line-height:   1.6;
}

/* ================================================================
   COMMUNICATIONS MODULE (admin)
================================================================ */
.comadm-bulletin {
  display: flex;
  gap:     var(--bcc-s6);
}

.com-bulletin-editor-panel {
  flex:           1;
  display:        flex;
  flex-direction: column;
  min-width:      0;
}

.com-bulletin-preview-panel {
  width:    320px;
  flex-shrink: 0;
  position: sticky;
  top:      80px;
  align-self: flex-start;
}

.com-bulletin-toolbar {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding-bottom:  var(--bcc-s3);
  border-bottom:   1px solid var(--bcc-border);
  margin-bottom:   var(--bcc-s3);
  flex-wrap:       wrap;
  gap:             var(--bcc-s2);
}

.com-block-inserters {
  display:       flex;
  gap:           var(--bcc-s2);
  flex-wrap:     wrap;
  padding:       var(--bcc-s3);
  background:    var(--bcc-surface-2);
  border-radius: var(--bcc-r-sm);
  margin-bottom: var(--bcc-s3);
}

.com-block-btn {
  display:       inline-flex;
  align-items:   center;
  gap:           var(--bcc-s2);
  padding:       var(--bcc-s2) var(--bcc-s3);
  border-radius: var(--bcc-r-pill);
  border:        1px solid var(--bcc-border);
  background:    var(--bcc-surface-1);
  font-size:     var(--bcc-t-xs);
  font-weight:   500;
  color:         var(--bcc-ink-2);
  cursor:        pointer;
  transition:    background var(--bcc-dur-1), color var(--bcc-dur-1), border-color var(--bcc-dur-1);
}
.com-block-btn:hover {
  background:   var(--bcc-primary-soft);
  border-color: var(--bcc-primary);
  color:        var(--bcc-primary);
}

/* Dark-mode-safe bulletin editor — replaces the inline styles in communications.js */
.com-editor-area {
  min-height:    360px;
  padding:       var(--bcc-s4);
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  font-size:     var(--bcc-t-sm);
  color:         var(--bcc-ink);
  line-height:   1.7;
  outline:       none;
  overflow-y:    auto;
  max-height:    600px;
}

.com-bulletin-editor {
  min-height:    400px;
  padding:       var(--bcc-s4);
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  font-size:     var(--bcc-t-sm);
  color:         var(--bcc-ink);
  line-height:   1.7;
  outline:       none;
  cursor:        text;
  transition:    border-color var(--bcc-dur-1);
}
.com-bulletin-editor:focus { border-color: var(--bcc-primary); }
.com-bulletin-editor:empty::before {
  content:      attr(data-placeholder);
  color:        var(--bcc-ink-3);
  pointer-events:none;
}

.com-preview-label {
  font-size:      var(--bcc-t-xs);
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color:          var(--bcc-ink-3);
  margin-bottom:  var(--bcc-s2);
}

.com-bulletin-preview {
  background:    var(--bcc-surface-2);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  padding:       var(--bcc-s3);
  min-height:    200px;
  font-size:     var(--bcc-t-xs);
  color:         var(--bcc-ink-2);
  line-height:   1.6;
  overflow:      hidden;
}

/* Dark-mode-safe bulletin block base — used by JS-injected HTML */
.bul-block {
  padding:       var(--bcc-s3) var(--bcc-s4);
  margin:        var(--bcc-s3) 0;
  border-left:   4px solid var(--bcc-border);
  border-radius: 0 var(--bcc-r-sm) var(--bcc-r-sm) 0;
  background:    var(--bcc-surface-2);
}
.bul-block h4 {
  margin:        0 0 var(--bcc-s2);
  font-size:     var(--bcc-t-sm);
  font-weight:   600;
}
.bul-block.bul-scripture  { border-left-color: var(--bcc-primary);  }
.bul-block.bul-scripture h4  { color: var(--bcc-primary);  }
.bul-block.bul-announcement { border-left-color: var(--bcc-warning); }
.bul-block.bul-announcement h4 { color: var(--bcc-warning); }
.bul-block.bul-prayer     { border-left-color: var(--bcc-success);  }
.bul-block.bul-prayer h4     { color: var(--bcc-success);  }
.bul-block.bul-giving     { border-left-color: var(--bcc-info);     }
.bul-block.bul-giving h4     { color: var(--bcc-info);     }
.bul-block.bul-events     { border-left-color: var(--bcc-accent);   }
.bul-block.bul-events h4     { color: var(--bcc-accent);   }
.bul-separator            { border: none; border-top: 1px solid var(--bcc-border); margin: var(--bcc-s4) 0; }

/* Pre-formatted audit/code blocks */
.adm-pre-block {
  background:    var(--bcc-surface-2);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-sm);
  padding:       var(--bcc-s3);
  font-size:     var(--bcc-t-xs);
  overflow:      auto;
  max-height:    260px;
  white-space:   pre-wrap;
}

.com-bulletins-history {
  display:        flex;
  flex-direction: column;
  gap:            4px;
}

.com-ann-card {
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-lg);
  padding:       var(--bcc-s4);
  margin-bottom: var(--bcc-s2);
  box-shadow:    none;
  transition:    border-color var(--bcc-dur-2) var(--bcc-ease),
                 box-shadow   var(--bcc-dur-2) var(--bcc-ease);
}
.com-ann-card:hover {
  border-color: var(--bcc-border-soft);
  box-shadow:   var(--bcc-shadow-1);
}

.com-ann-head {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  margin-bottom:   var(--bcc-s2);
  gap:             var(--bcc-s3);
}

.com-ann-title {
  font-size:   var(--bcc-t-md);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0;
}

.com-ann-body {
  font-size:   var(--bcc-t-sm);
  color:       var(--bcc-ink-2);
  line-height: 1.5;
  margin:      0;
}

/* ================================================================
   AI ASSISTANT MODULE (admin)
================================================================ */
.adm-ai-layout {
  display:  flex;
  height:   100%;
  overflow: hidden;
}

.adm-ai-threads-panel {
  width:           240px;
  flex-shrink:     0;
  border-right:    1px solid var(--bcc-border);
  display:         flex;
  flex-direction:  column;
  overflow:        hidden;
}

.adm-ai-threads-head {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         var(--bcc-s3) var(--bcc-s4);
  border-bottom:   1px solid var(--bcc-border);
  flex-shrink:     0;
}

.adm-ai-threads-head-title {
  font-size:   var(--bcc-t-sm);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0;
}

.adm-ai-threads-list {
  flex:       1;
  overflow-y: auto;
  padding:    var(--bcc-s2);
}

.adm-ai-thread-item {
  padding:       var(--bcc-s3) var(--bcc-s4);
  border-radius: var(--bcc-r-sm);
  cursor:        pointer;
  font-size:     var(--bcc-t-sm);
  color:         var(--bcc-ink-2);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
  transition:    background var(--bcc-dur-1), color var(--bcc-dur-1);
}
.adm-ai-thread-item:hover  { background: var(--bcc-surface-2); color: var(--bcc-ink); }
.adm-ai-thread-item.active { background: var(--bcc-primary-soft); color: var(--bcc-primary); font-weight: 600; }

.adm-ai-chat-panel {
  flex:           1;
  display:        flex;
  flex-direction: column;
  overflow:       hidden;
  min-width:      0;
}

.adm-ai-chat-head {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         var(--bcc-s4) var(--bcc-s5);
  border-bottom:   1px solid var(--bcc-border);
  flex-shrink:     0;
}

.adm-ai-chat-head-title {
  font-size:   var(--bcc-t-md);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0;
}

.adm-ai-messages {
  flex:           1;
  overflow-y:     auto;
  padding:        var(--bcc-s4) var(--bcc-s5);
  display:        flex;
  flex-direction: column;
  gap:            var(--bcc-s4);
}

/* Pre-chat preset grid */
.adm-ai-presets {
  padding:        var(--bcc-s6);
  text-align:     center;
  flex:           1;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  justify-content:center;
  gap:            var(--bcc-s4);
}

.adm-ai-presets-label {
  font-size:   var(--bcc-t-md);
  font-weight: 600;
  color:       var(--bcc-ink);
  margin:      0 0 4px;
}

.adm-ai-presets-sub {
  font-size:    var(--bcc-t-sm);
  color:        var(--bcc-ink-3);
  margin-bottom:8px;
}

.adm-ai-preset-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  gap:                   var(--bcc-s3);
  width:                 100%;
  max-width:             480px;
}

.adm-ai-preset-btn {
  text-align:    left;
  background:    var(--bcc-surface-2);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  padding:       var(--bcc-s3) var(--bcc-s4);
  cursor:        pointer;
  font-size:     var(--bcc-t-sm);
  color:         var(--bcc-ink-2);
  transition:    background var(--bcc-dur-1), border-color var(--bcc-dur-1), color var(--bcc-dur-1);
  line-height:   1.4;
}
.adm-ai-preset-btn:hover {
  background:   var(--bcc-surface-3);
  border-color: var(--bcc-primary);
  color:        var(--bcc-ink);
}

/* Message input area */
.adm-ai-input-area {
  display:      flex;
  gap:          var(--bcc-s2);
  padding:      var(--bcc-s3) var(--bcc-s4);
  border-top:   1px solid var(--bcc-border);
  flex-shrink:  0;
  align-items:  flex-end;
}

.adm-ai-input {
  flex:          1;
  resize:        none;
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  padding:       var(--bcc-s3);
  font:          inherit;
  font-size:     var(--bcc-t-sm);
  background:    var(--bcc-surface-1);
  color:         var(--bcc-ink);
  min-height:    38px;
  max-height:    160px;
  line-height:   1.5;
  transition:    border-color var(--bcc-dur-1);
  overflow-y:    auto;
}
.adm-ai-input:focus {
  outline:      none;
  border-color: var(--bcc-primary);
}

/* Chat messages */
.adm-ai-msg {
  display: flex;
  gap:     var(--bcc-s3);
}

.adm-ai-msg-user {
  flex-direction: row-reverse;
  align-items:    flex-end;
}

.adm-ai-msg-assistant {
  flex-direction: row;
  align-items:    flex-start;
}

.adm-ai-msg-avatar {
  width:           28px;
  height:          28px;
  border-radius:   50%;
  background:      var(--bcc-primary);
  color:           #fff;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       var(--bcc-t-xs);
  font-weight:     700;
  flex-shrink:     0;
}

.adm-ai-msg-bubble {
  display:        flex;
  flex-direction: column;
  max-width:      80%;
  gap:            var(--bcc-s1);
  padding:        var(--bcc-s3) var(--bcc-s4);
  border-radius:  var(--bcc-r-lg);
}

.adm-ai-msg-content {
  background:    var(--bcc-surface-2);
  padding:       var(--bcc-s3) var(--bcc-s4);
  border-radius: var(--bcc-r-md);
  font-size:     var(--bcc-t-sm);
  color:         var(--bcc-ink);
  line-height:   1.6;
  white-space:   pre-wrap;
  word-break:    break-word;
}

.adm-ai-msg-user .adm-ai-msg-content {
  background:    var(--bcc-primary-soft);
  color:         var(--bcc-ink);
}

.adm-ai-msg-time {
  font-size: var(--bcc-t-xs);
  color:     var(--bcc-ink-3);
  align-self: flex-end;
}

.adm-ai-msg-user .adm-ai-msg-time { align-self: flex-end; }

/* Streaming indicator */
.adm-ai-typing {
  display:       flex;
  gap:           var(--bcc-s1);
  align-items:   center;
  padding:       var(--bcc-s3) var(--bcc-s4);
  background:    var(--bcc-surface-2);
  border-radius: var(--bcc-r-md);
}
.adm-ai-typing span {
  width:     6px;
  height:    6px;
  border-radius: 50%;
  background: var(--bcc-ink-3);
  animation: adm-typing-bounce 1.2s ease-in-out infinite;
}
.adm-ai-typing span:nth-child(2) { animation-delay: .15s; }
.adm-ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes adm-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

/* ================================================================
   SETTINGS MODULE (admin)
================================================================ */
.set-logo-upload {
  display:        flex;
  flex-direction: column;
  gap:            var(--bcc-s3);
}

.set-logo-row {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s4);
}

.set-logo-preview {
  width:         80px;
  height:        80px;
  border-radius: 50%;
  overflow:      hidden;
  border:        2px solid var(--bcc-border);
  display:       inline-flex;
  align-items:   center;
  justify-content:center;
  flex-shrink:   0;
  background:    var(--bcc-surface-2);
  font-size:     1.5rem;
}

.set-logo-preview img {
  width:        100%;
  height:       100%;
  object-fit:   cover;
  border-radius:inherit;
}

.set-color-row {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s3);
}

.set-color-label {
  font-size:   var(--bcc-t-sm);
  font-weight: 500;
  color:       var(--bcc-ink);
  width:       100px;
}

.set-color-picker {
  width:         44px;
  height:        44px;
  border-radius: var(--bcc-r-sm);
  border:        1px solid var(--bcc-border);
  cursor:        pointer;
  padding:       2px;
  background:    var(--bcc-surface-1);
}

.set-color-hex {
  font-family: ui-monospace, monospace;
  font-size:   var(--bcc-t-sm);
  color:       var(--bcc-ink-2);
  width:       80px;
}

.set-color-presets {
  display:    flex;
  gap:        var(--bcc-s2);
  flex-wrap:  wrap;
  margin-top: var(--bcc-s3);
}

.set-color-swatch {
  width:         28px;
  height:        28px;
  border-radius: 50%;
  cursor:        pointer;
  border:        none;
  outline:       3px solid transparent;
  outline-offset:2px;
  transition:    transform var(--bcc-dur-1), outline-color var(--bcc-dur-1);
  flex-shrink:   0;
}
.set-color-swatch:hover                { transform: scale(1.15); }
.set-color-swatch.set-color-swatch-active { outline-color: var(--bcc-ink); }

/* Toggle switch */
.set-toggle {
  display:     inline-flex;
  align-items: center;
  cursor:      pointer;
  gap:         var(--bcc-s3);
}

.set-toggle input {
  position:  absolute;
  width:     1px;
  height:    1px;
  padding:   0;
  margin:    -1px;
  overflow:  hidden;
  clip:      rect(0,0,0,0);
  border:    0;
}

.set-toggle-track {
  position:      relative;
  width:         40px;
  height:        22px;
  border-radius: var(--bcc-r-pill);
  background:    var(--bcc-surface-3);
  border:        1px solid var(--bcc-border);
  transition:    background var(--bcc-dur-1), border-color var(--bcc-dur-1);
  flex-shrink:   0;
}

.set-toggle-track::after {
  content:       '';
  position:      absolute;
  top:           50%;
  left:          2px;
  transform:     translateY(-50%);
  width:         18px;
  height:        18px;
  border-radius: 50%;
  background:    var(--bcc-ink-3);
  transition:    left var(--bcc-dur-1), background var(--bcc-dur-1);
}

.set-toggle input:checked + .set-toggle-track {
  background:   var(--bcc-primary);
  border-color: var(--bcc-primary);
}

.set-toggle input:checked + .set-toggle-track::after {
  left:       calc(100% - 20px);
  background: #fff;
}

.set-toggle-label {
  font-size:  var(--bcc-t-sm);
  color:      var(--bcc-ink);
  user-select:none;
}

/* Notification row */
.set-notif-row {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         var(--bcc-s3) 0;
  border-bottom:   1px solid var(--bcc-border);
  gap:             var(--bcc-s4);
}
.set-notif-row:last-child { border-bottom: none; }

.set-notif-info { flex: 1; min-width: 0; }

.set-notif-name {
  font-size:   var(--bcc-t-sm);
  font-weight: 500;
  color:       var(--bcc-ink);
  margin:      0 0 2px;
}

.set-notif-desc {
  font-size: var(--bcc-t-xs);
  color:     var(--bcc-ink-3);
  margin:    0;
}

/* Danger zone */
.set-danger-card {
  background:    var(--bcc-surface-1);
  border:        1px solid var(--bcc-danger);
  border-radius: var(--bcc-r-lg);
  padding:       var(--bcc-s4);
}

.set-danger-card-title {
  font-size:   var(--bcc-t-md);
  font-weight: 600;
  color:       var(--bcc-danger);
  margin:      0 0 var(--bcc-s3);
}

.set-danger-item {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         var(--bcc-s4) 0;
  border-bottom:   1px solid var(--bcc-border);
  gap:             var(--bcc-s4);
}
.set-danger-item:last-child { border-bottom: none; }

.set-danger-item-info { flex: 1; min-width: 0; }

.set-danger-item-name {
  font-size:   var(--bcc-t-sm);
  font-weight: 500;
  color:       var(--bcc-ink);
  margin:      0 0 2px;
}

.set-danger-item-desc {
  font-size: var(--bcc-t-xs);
  color:     var(--bcc-ink-3);
  margin:    0;
}

/* ================================================================
   ROLES ADMIN UTILITIES
================================================================ */
.rladm-result-item {
  padding:       var(--bcc-s3) var(--bcc-s4);
  cursor:        pointer;
  border-radius: var(--bcc-r-sm);
  transition:    background var(--bcc-dur-1);
}
.rladm-result-item:hover { background: var(--bcc-surface-2); }

.rladm-add-results {
  margin-top:   var(--bcc-s2);
  max-height:   180px;
  overflow-y:   auto;
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
================================================================ */

/* ── 860px: hide preview panels, collapse service layout ──────── */
@media (max-width: 860px) {
  .svcadm-layout {
    flex-direction: column;
    height:         auto;
  }

  .svcadm-list-panel {
    width:        100%;
    border-right: none;
    border-bottom:1px solid var(--bcc-border);
    max-height:   200px;
    flex-direction:row;
    overflow-x:   auto;
    overflow-y:   hidden;
  }

  .svcadm-plan-item {
    flex-direction: column;
    align-items:    flex-start;
    padding:        var(--bcc-s3);
    min-width:      140px;
    border-left:    none;
    border-bottom:  3px solid transparent;
  }
  .svcadm-plan-item.active { border-bottom-color: var(--bcc-primary); border-left: none; }

  .svcadm-plan-date { margin-left: 0; }

  .com-bulletin-preview-panel { display: none; }

  .adm-ai-threads-panel { display: none; }
  .adm-ai-layout.threads-open .adm-ai-threads-panel { display: flex; }
}

/* ── 600px: stack headers, wrap actions ───────────────────────── */
@media (max-width: 600px) {
  .adm-view-page {
    padding: var(--bcc-s4) var(--bcc-s4);
  }

  .adm-view-header {
    flex-direction: column;
    align-items:    flex-start;
    gap:            var(--bcc-s3);
  }

  .adm-header-actions {
    flex-wrap: wrap;
    width:     100%;
  }

  .adm-pagination {
    flex-direction: column;
    align-items:    flex-start;
    gap:            var(--bcc-s2);
  }

  .adm-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .adm-dash-3col {
    grid-template-columns: 1fr;
  }

  .ppl-drawer-hero {
    flex-wrap: wrap;
    gap:       var(--bcc-s3);
  }

  .ppl-info-grid {
    grid-template-columns: 1fr;
    gap:                   var(--bcc-s1) 0;
  }

  .ppl-info-label {
    margin-top: var(--bcc-s2);
  }

  .evadm-cal-grid {
    gap: 2px;
  }

  .evadm-cal-day {
    min-height: 36px;
  }

  .adm-ai-preset-grid {
    grid-template-columns: 1fr;
  }

  .gvadm-webhook-url {
    flex-direction: column;
    align-items:    flex-start;
  }

  /* hide less important table columns on mobile */
  .bcc-table th.hide-sm,
  .bcc-table td.hide-sm {
    display: none;
  }
}

/* ================================================================
   GROUPS ADMIN — TABLE POLISH
================================================================ */

.grpadm-table-card {
  padding: 0 !important;
  overflow: hidden;
}

.grpadm-table-card .bcc-table-wrap {
  border-radius: var(--bcc-r-md);
  overflow: hidden;
}

.grpadm-actions-cell {
  display: flex;
  align-items: center;
  gap: var(--bcc-s1);
  white-space: nowrap;
}

/* ================================================================
   GROUPS ADMIN — DRAWER POSTS TAB
================================================================ */

.grpadm-posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--bcc-s3);
  padding: var(--bcc-s2) 0;
}

.grpadm-post-card {
  background:    var(--bcc-surface-2);
  border:        1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  padding:       var(--bcc-s4);
}

.grpadm-post-head {
  display:     flex;
  align-items: center;
  gap:         var(--bcc-s2);
  margin-bottom: var(--bcc-s2);
  flex-wrap:   wrap;
}

.grpadm-post-time {
  margin-left: auto;
}

.grpadm-post-body {
  color:       var(--bcc-ink);
  line-height: 1.55;
  margin:      0 0 var(--bcc-s3);
  white-space: pre-wrap;
  word-break:  break-word;
}

.grpadm-post-actions {
  border-top:  1px solid var(--bcc-border);
  padding-top: var(--bcc-s3);
  margin-top:  var(--bcc-s1);
}

/* ================================================================
   GROUPS ADMIN — DRAWER SETTINGS TAB
================================================================ */

.grpadm-check-row {
  display:        flex !important;
  flex-direction: row !important;
  align-items:    center !important;
  gap:            var(--bcc-s2) !important;
}

.grpadm-check-row .bcc-label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.grpadm-check-row input[type="checkbox"] {
  width:  16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--bcc-primary);
  flex-shrink: 0;
}

/* ================================================================
   GROUPS ADMIN — DANGER ZONE
================================================================ */

.grpadm-danger-zone {
  border:         1px solid var(--bcc-danger-soft);
  border-radius:  var(--bcc-r-md);
  padding:        var(--bcc-s5);
  background:     rgba(239,68,68,.05);
  display:        flex;
  flex-direction: column;
  gap:            var(--bcc-s3);
  margin-top:     var(--bcc-s6);
}

.grpadm-danger-zone p {
  margin: 0;
}

/* ================================================================
   GROUPS ADMIN — SETTINGS FORM SPACING
================================================================ */

.grpadm-settings-tab .grpadm-form {
  display:        flex;
  flex-direction: column;
  gap:            var(--bcc-s4);
}

.grpadm-settings-tab .bcc-field {
  margin-bottom: 0;
}

/* ================================================================
   ROLE BOARD (services.js — Sub-Task 4)
================================================================ */
.svc-role-board {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--bcc-s4);
  align-items: start;
}
@media (max-width: 700px) {
  .svc-role-board { grid-template-columns: 1fr; }
}
.svc-role-slots {
  display: flex;
  flex-direction: column;
  gap: var(--bcc-s3);
}
.svc-role-slot {
  background: var(--bcc-surface-2);
  border: 1.5px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  padding: var(--bcc-s3) var(--bcc-s4);
  cursor: pointer;
  transition: border-color 0.15s;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bcc-s2);
}
.svc-role-slot:hover { border-color: var(--bcc-accent); }
.svc-role-slot--active { border-color: var(--bcc-accent); box-shadow: 0 0 0 2px var(--bcc-accent-soft); }
.svc-role-slot--declined { opacity: 0.75; }
.svc-slot-role-name { font-size: var(--bcc-t-sm); font-weight: 600; color: var(--bcc-ink); flex: 1; min-width: 100%; }
.svc-slot-person { font-size: var(--bcc-t-sm); color: var(--bcc-ink-2); flex: 1; }
.svc-slot-empty { color: var(--bcc-ink-3); font-style: italic; }
.svc-slot-actions { display: flex; gap: var(--bcc-s2); margin-left: auto; }
.svc-people-panel {
  background: var(--bcc-surface-2);
  border: 1px solid var(--bcc-border);
  border-radius: var(--bcc-r-md);
  overflow: hidden;
  position: sticky;
  top: var(--bcc-s4);
}
.svc-people-panel-head {
  padding: var(--bcc-s3);
  border-bottom: 1px solid var(--bcc-border);
  background: var(--bcc-surface-3);
}
.svc-people-panel-list {
  max-height: 420px;
  overflow-y: auto;
}
.svc-people-panel-item {
  display: flex;
  align-items: center;
  gap: var(--bcc-s2);
  padding: var(--bcc-s2) var(--bcc-s3);
  cursor: pointer;
  font-size: var(--bcc-t-sm);
  transition: background 0.1s;
}
.svc-people-panel-item:hover { background: var(--bcc-surface-3); }
.svc-people-panel-empty { padding: var(--bcc-s4); color: var(--bcc-ink-3); font-size: var(--bcc-t-sm); text-align: center; }

/* ── Availability dots (role board people panel) ─────── */
.svc-avail-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.svc-avail-green { background: #10b981; }
.svc-avail-red   { background: #ef4444; }
.svc-avail-grey  { background: var(--bcc-border); }

/* ================================================================
   THEME PICKER (Settings → Branding)
================================================================ */
.set-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--bcc-s4);
  margin-top: var(--bcc-s2);
}

.set-theme-card {
  display: flex;
  flex-direction: column;
  gap: var(--bcc-s3);
  padding: var(--bcc-s4);
  background: var(--bcc-surface-2);
  border: 2px solid var(--bcc-border);
  border-radius: var(--bcc-r-lg);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--bcc-dur-2), background var(--bcc-dur-2), transform var(--bcc-dur-1);
  width: 100%;
}

.set-theme-card:hover {
  border-color: var(--bcc-primary);
  background: var(--bcc-surface-3);
  transform: translateY(-1px);
}

.set-theme-card-active {
  border-color: var(--bcc-primary) !important;
  background: var(--bcc-primary-soft) !important;
  box-shadow: 0 0 0 1px var(--bcc-primary);
}

.set-theme-card-active .set-theme-name {
  color: var(--bcc-ink);
}

.set-theme-card-active .set-theme-desc {
  color: var(--bcc-ink-2);
}

.set-theme-preview {
  display: flex;
  gap: var(--bcc-s1);
  align-items: center;
  padding: var(--bcc-s2) 0;
}

.set-theme-name {
  font-size: var(--bcc-t-sm);
  font-weight: 600;
  color: var(--bcc-ink);
  line-height: 1.3;
}

.set-theme-desc {
  font-size: var(--bcc-t-xs);
  color: var(--bcc-ink-3);
  line-height: 1.45;
}

/* Color swatch active ring */
.set-color-swatch-active {
  outline: 3px solid var(--bcc-ink);
  outline-offset: 2px;
}

body.theme-light .set-color-swatch-active,
.bcc-app.bcc-light .set-color-swatch-active {
  outline-color: #333;
}

@media (max-width: 600px) {
  .set-theme-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   PEOPLE ADMIN — PERSON FORM GRID (people.js personFormHTML)
=============================================================== */
.ppl-form-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  gap:                   var(--bcc-s4);
}

.ppl-form-row {
  display:        flex;
  flex-direction: column;
  gap:            var(--bcc-s1);
  min-width:      0;
}

.ppl-form-row--full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .ppl-form-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   EVENTS ADMIN — EVENT FORM GRID (events.js eventFormHTML)
   Fields already carry an inline margin-bottom, so only the column
   gap is applied here to avoid doubling vertical spacing.
=============================================================== */
.evadm-form-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap:            var(--bcc-s4);
  row-gap:               0;
}

@media (max-width: 640px) {
  .evadm-form-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   EVENTS ADMIN — LIST/CALENDAR TOGGLE ACTIVE STATE
=============================================================== */
.ev-toggle.active {
  background:   var(--bcc-primary-soft);
  color:        var(--bcc-primary);
  border-color: var(--bcc-primary);
}

/* ================================================================
   COARSE-POINTER (TOUCH) TARGETS — settings controls.
   Preset color swatches (28px) keep their visual size; a transparent
   ::after grows the tap area to 44px. The toggle row (its label is
   the clickable element) gets a 44px min-height while the 40x22
   track keeps its size.
   ================================================================ */
@media (pointer: coarse) {
  .set-color-swatch { position: relative; }
  .set-color-swatch::after {
    content:  '';
    position: absolute;
    inset:    -8px;
  }
  .set-toggle { min-height: 44px; }
}

