/* ─── Reset & Base ─────────────────────────────────────────────────────────── */

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

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #111111;
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; font-size: 14px; }
input, textarea, select { font-family: inherit; font-size: 14px; color: #111; }
textarea { resize: vertical; }

/* ─── Utility ──────────────────────────────────────────────────────────────── */

.hidden { display: none !important; }

/* ─── Login Screen ─────────────────────────────────────────────────────────── */

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #fafafa;
}

.login-card {
  width: 360px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 40px;
}

.login-logo {
  font-size: 22px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 32px;
}

/* ─── App Layout ───────────────────────────────────────────────────────────── */

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */

.sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.sidebar-brand {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  padding: 24px 20px 20px;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.sidebar-nav {
  list-style: none;
  padding: 8px 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav li { margin: 0; }

.nav-link {
  display: block;
  padding: 8px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: #6b7280;
  border-radius: 0;
  transition: background 0.1s, color 0.1s;
}

.nav-link:hover { background: #f3f4f6; color: #111; }
.nav-link.active { color: #2563eb; background: #eff6ff; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}

/* ─── Content Area ─────────────────────────────────────────────────────────── */

.content-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.view-padded {
  padding: 32px 36px;
  overflow-y: auto;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-shrink: 0;
}

.view-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: #111;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn-primary:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }

.btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) { background: #f9fafb; }

.btn-danger {
  background: #fff;
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-danger:hover:not(:disabled) { background: #fef2f2; }

.btn-full { width: 100%; }

.btn-ghost-small {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
  transition: color 0.1s;
}

.btn-ghost-small:hover { color: #111; }

/* ─── Forms ────────────────────────────────────────────────────────────────── */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111;
  transition: border-color 0.12s, box-shadow 0.12s;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.field input::placeholder,
.field textarea::placeholder { color: #9ca3af; }

.field-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.field-row-header label { margin-bottom: 0; }

.error-msg {
  color: #dc2626;
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
}

.saved-msg {
  font-size: 13px;
  color: #16a34a;
  font-weight: 500;
}

.status-msg {
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
}

.status-msg.success {
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.status-msg.error {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.status-inline {
  font-size: 13px;
  font-weight: 500;
}

.status-inline.ok { color: #16a34a; }
.status-inline.fail { color: #dc2626; }

/* ─── Search ───────────────────────────────────────────────────────────────── */

.search-wrap {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 8px 30px 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  font-size: 13.5px;
  color: #111;
  transition: border-color 0.12s;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #2563eb;
}

.search-input::placeholder { color: #9ca3af; }

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}
.search-clear:hover { color: #374151; }

/* ─── Dashboard ────────────────────────────────────────────────────────────── */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px 24px;
}

.stat-card-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 600;
  color: #111;
  line-height: 1;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.panel {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.panel-header {
  padding: 14px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
  border-bottom: 1px solid #e5e5e5;
}

.panel-body {
  padding: 4px 0;
  max-height: 340px;
  overflow-y: auto;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13.5px;
}

.panel-row:last-child { border-bottom: none; }

.panel-row-name {
  font-weight: 500;
  color: #2563eb;
  cursor: pointer;
}

.panel-row-name:hover { text-decoration: underline; }

.panel-row-meta { color: #6b7280; font-size: 13px; }

.panel-empty {
  padding: 24px 20px;
  color: #9ca3af;
  font-size: 13.5px;
}

/* ─── People View ──────────────────────────────────────────────────────────── */

.people-view {
  flex-direction: row;
  overflow: hidden;
}

/* Contact List Column */
.contact-list-col {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid #e5e5e5;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-header {
  padding: 16px 16px 0;
  flex-shrink: 0;
}

.filter-chips {
  display: flex;
  gap: 6px;
  padding: 10px 0 12px;
  flex-wrap: wrap;
}

.chip {
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.1s;
}

.chip:hover { border-color: #2563eb; color: #2563eb; }
.chip.active { background: #2563eb; border-color: #2563eb; color: #fff; }

.contact-list {
  flex: 1;
  overflow-y: auto;
}

.contact-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}

.contact-item:hover { background: #f9fafb; }
.contact-item.selected { background: #eff6ff; border-left: 2px solid #2563eb; }

.contact-item-name {
  font-weight: 500;
  font-size: 13.5px;
  color: #111;
  margin-bottom: 3px;
}

.contact-item-sub {
  font-size: 12.5px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contact-item-label { flex: 1; }

.contact-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-amber { background: #f59e0b; }
.dot-red   { background: #ef4444; }
.dot-green { background: #22c55e; }

/* Contact Detail Column */
.contact-detail-col {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

.detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 14px;
}

.contact-detail {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Detail Header */
.detail-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.detail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.detail-header-info { flex: 1; }

.detail-header-name {
  font-size: 17px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}

.detail-header-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.detail-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.dnc-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.toggle-switch {
  position: relative;
  width: 34px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider { background: #dc2626; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(14px); }

/* Detail Body */
.detail-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.detail-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tab-bar {
  display: flex;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  padding: 0 20px;
  flex-shrink: 0;
}

.tab-btn {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.1s, border-color 0.1s;
}

.tab-btn:hover { color: #111; }
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; }

.tab-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

/* Message Tab */
.dnc-banner {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.tone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tone-pill {
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  transition: all 0.1s;
}

.tone-pill:hover { border-color: #2563eb; color: #2563eb; }
.tone-pill.active { background: #2563eb; border-color: #2563eb; color: #fff; }

.char-count {
  font-size: 12.5px;
  color: #9ca3af;
  font-weight: 400;
}

.message-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.message-actions-left, .message-actions-right {
  display: flex;
  gap: 8px;
}

/* History Tab */
.tab-toolbar {
  margin-bottom: 16px;
}

.interaction-item {
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}

.interaction-item:last-child { border-bottom: none; }

.interaction-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.interaction-type-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f3f4f6;
}

.interaction-type-label.text  { color: #2563eb; background: #eff6ff; }
.interaction-type-label.call  { color: #16a34a; background: #f0fdf4; }
.interaction-type-label.note  { color: #7c3aed; background: #f5f3ff; }

.interaction-date {
  font-size: 12.5px;
  color: #9ca3af;
}

.interaction-content {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.55;
}

.no-items {
  color: #9ca3af;
  font-size: 13.5px;
  padding: 8px 0;
}

/* Prayer Tab */
.prayer-item {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  border-left: 3px solid transparent;
  margin-bottom: 2px;
}

.prayer-item.active { border-left-color: #2563eb; }
.prayer-item.answered { opacity: 0.5; }

.prayer-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.prayer-item-date { font-size: 12.5px; color: #9ca3af; }

.prayer-item-text {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.55;
}

.prayer-answered-label {
  font-size: 12px;
  font-weight: 500;
  color: #16a34a;
  margin-top: 4px;
}

/* Notes Tab */
.notes-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* Detail Sidebar */
.detail-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-left: 1px solid #e5e5e5;
  background: #fff;
  overflow-y: auto;
  padding: 20px 18px;
}

.sidebar-section {
  margin-bottom: 22px;
}

.sidebar-section-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 10px;
}

.sidebar-row {
  margin-bottom: 8px;
}

.sidebar-row-label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 1px;
}

.sidebar-row-value {
  font-size: 13.5px;
  color: #111;
  font-weight: 500;
  word-break: break-word;
}

.sidebar-notes-preview {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.5;
  background: #f9fafb;
  border-radius: 6px;
  padding: 8px 10px;
  border: 1px solid #f3f4f6;
}

/* ─── Message Queue ─────────────────────────────────────────────────────────── */

.queue-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.queue-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queue-item-name {
  font-weight: 600;
  font-size: 14px;
  color: #111;
}

.queue-item-phone {
  font-size: 13px;
  color: #6b7280;
}

.queue-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: uppercase;
}

.status-badge.draft    { background: #f3f4f6;  color: #6b7280; }
.status-badge.sending  { background: #fefce8;  color: #854d0e; }
.status-badge.sent     { background: #f0fdf4;  color: #15803d; }
.status-badge.error    { background: #fef2f2;  color: #dc2626; }

.queue-item-message {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.55;
  background: #f9fafb;
  border-radius: 6px;
  padding: 10px 12px;
}

.queue-item-actions {
  display: flex;
  gap: 8px;
}

.queue-item-edit-area {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #2563eb;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  color: #111;
  line-height: 1.55;
  resize: vertical;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.queue-item-edit-area:focus {
  outline: none;
}

/* ─── Prayer Requests View ─────────────────────────────────────────────────── */

.prayer-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 10px;
}

.prayer-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.prayer-card-header .prayer-card-date {
  margin-left: auto;
}

.prayer-card-name {
  font-weight: 600;
  font-size: 14px;
  color: #2563eb;
  cursor: pointer;
}

.prayer-card-name:hover { text-decoration: underline; }

.prayer-card-date { font-size: 12.5px; color: #9ca3af; }

.prayer-card-text {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.55;
}

/* ─── Follow-up View ────────────────────────────────────────────────────────── */

.followup-table {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.followup-header {
  display: grid;
  grid-template-columns: 1fr 130px 140px 130px 120px;
  padding: 10px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e5e5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.followup-row {
  display: grid;
  grid-template-columns: 1fr 130px 140px 130px 120px;
  padding: 13px 20px;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
  font-size: 13.5px;
}

.followup-row:last-child { border-bottom: none; }
.followup-row:hover { background: #f9fafb; }

.followup-name { font-weight: 500; color: #111; }
.followup-meta { color: #6b7280; }
.followup-days { color: #dc2626; font-weight: 500; }
.followup-days.never { color: #9ca3af; }

.followup-actions { display: flex; gap: 6px; }

/* Visitor table — wider actions column to fit two buttons */
.visitor-table .followup-header,
.visitor-table .followup-row {
  grid-template-columns: 1fr 120px 1fr 130px 210px;
}

/* ─── Settings ──────────────────────────────────────────────────────────────── */

.settings-group {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.settings-group-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 20px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.settings-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ─── Modals ────────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: #fff;
  border-radius: 10px;
  width: 480px;
  max-width: 90vw;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.modal-close {
  background: none;
  border: none;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.1s;
}

.modal-close:hover { background: #f3f4f6; color: #111; }

.modal-body {
  padding: 20px 24px;
}

.modal-note {
  font-size: 13.5px;
  color: #6b7280;
  margin-bottom: 16px;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── Settings note ─────────────────────────────────────────────────────────── */

.settings-note {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 12px;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

/* ─── Life Events Tab ────────────────────────────────────────────────────────── */

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.event-item:last-child { border-bottom: none; }

.event-date-col {
  flex-shrink: 0;
  min-width: 90px;
}

.event-date {
  font-size: 12.5px;
  color: #6b7280;
  font-weight: 500;
}

.event-content { flex: 1; }

.event-type-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
  margin-bottom: 3px;
}

.event-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.event-delete-btn {
  flex-shrink: 0;
  align-self: center;
}

/* ─── Scheduled Messages View ────────────────────────────────────────────────── */

.status-badge.pending  { background: #eff6ff;  color: #1d4ed8; }
.status-badge.cancelled { background: #f3f4f6; color: #6b7280; }

/* ─── Broadcast View ─────────────────────────────────────────────────────────── */

.broadcast-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  height: calc(100vh - 120px);
  overflow: hidden;
}

.broadcast-selector {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
}

.broadcast-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.broadcast-selector-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
}

.broadcast-selector-meta {
  font-size: 12.5px;
  color: #2563eb;
  font-weight: 600;
}

.broadcast-contact-list {
  flex: 1;
  overflow-y: auto;
  margin: 8px 0;
}

.broadcast-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13.5px;
  transition: background 0.1s;
}

.broadcast-contact-row:hover { background: #f9fafb; }
.broadcast-contact-row.selected { background: #eff6ff; }
.broadcast-contact-row input { flex-shrink: 0; accent-color: #2563eb; }

.broadcast-contact-name {
  flex: 1;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.broadcast-contact-meta {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
  flex-shrink: 0;
}

.broadcast-select-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.broadcast-compose {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 16px;
}

.broadcast-compose-top {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  flex-shrink: 0;
}

.broadcast-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.broadcast-drafts {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.broadcast-draft-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px 18px;
}

.broadcast-draft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.broadcast-draft-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
}

.broadcast-draft-phone {
  font-size: 12.5px;
  color: #6b7280;
}

.broadcast-draft-text {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13.5px;
  color: #111;
  line-height: 1.5;
  resize: vertical;
  background: #fafafa;
}

.broadcast-draft-text:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
}

.broadcast-queue-bar {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #374151;
}

/* ─── Reports View ────────────────────────────────────────────────────────────── */

.report-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  max-width: 700px;
}

.report-header {
  padding: 28px 32px 24px;
  border-bottom: 1px solid #e5e5e5;
  background: #f9fafb;
}

.report-church {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.report-title {
  font-size: 20px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
}

.report-date {
  font-size: 13.5px;
  color: #6b7280;
}

.report-section {
  padding: 20px 32px;
  border-bottom: 1px solid #f3f4f6;
}

.report-section:last-child { border-bottom: none; }

.report-section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 14px;
}

.report-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
}

.report-stat {
  min-width: 100px;
}

.report-stat-value {
  font-size: 28px;
  font-weight: 600;
  color: #111;
  line-height: 1;
  margin-bottom: 4px;
}

.report-stat-label {
  font-size: 12.5px;
  color: #6b7280;
  font-weight: 500;
}

.report-text {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.6;
}

/* ─── Contact detail extras ──────────────────────────────────────────────────── */

.badge-intake {
  display: inline-block;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 8px;
  letter-spacing: 0.03em;
}

/* ─── Scrollbar Styling ─────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
