/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        #f8f9fb;
  --surface:   #ffffff;
  --border:    #e2e6ea;
  --text:      #1a1d23;
  --text-muted:#6c757d;
  --primary:   #2563eb;
  --primary-d: #1d4ed8;
  --danger:    #dc2626;
  --success:   #16a34a;
  --warning:   #ca8a04;
  --radius:    8px;
  --shadow:    0 1px 4px rgba(0,0,0,.08);
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }

/* ─── Utilities ─────────────────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.w-full   { width: 100%; }
.container{ max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-muted { color: var(--text-muted); font-size: .875rem; }
.loading  { padding: 2rem; text-align: center; color: var(--text-muted); }
.empty    { padding: 2rem; text-align: center; color: var(--text-muted); }
.section-subtitle { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .5rem 1rem; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-ghost    { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }
.btn-lg { padding: .7rem 1.5rem; font-size: 1rem; }
.link-btn { background: none; border: none; color: var(--primary); font-size: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .15rem .5rem;
  border-radius: 99px; font-size: .75rem; font-weight: 600;
}
.badge-live      { background: #fee2e2; color: #991b1b; }
.badge-scheduled { background: #dbeafe; color: #1e40af; }
.badge-ended     { background: #f3f4f6; color: #6b7280; }
.badge-paid      { background: #fef9c3; color: #92400e; }
.badge-free      { background: #dcfce7; color: #166534; }
.badge-private   { background: #f3f4f6; color: #374151; }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], input[type="datetime-local"],
textarea, select {
  padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); transition: border-color .15s;
  width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; }
.form-error { color: var(--danger); font-size: .85rem; padding: .4rem; background: #fee2e2; border-radius: var(--radius); }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }
.checkbox-label { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }
.checkbox-label input[type="checkbox"] { width: auto; }
.inline-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.inline-form input { flex: 1; }

/* ─── Modals ────────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none !important; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-box {
  position: relative; background: var(--surface); border-radius: calc(var(--radius) * 1.5);
  padding: 2rem; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  display: flex; flex-direction: column; gap: 1rem;
}
.modal-lg  { max-width: 600px; }
.modal-xl  { max-width: 760px; }
.modal-box h2 { font-size: 1.25rem; font-weight: 700; }
.modal-footer { text-align: center; font-size: .875rem; color: var(--text-muted); }

/* ─── Toast ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  padding: .75rem 1.25rem; border-radius: var(--radius); color: #fff;
  font-size: .9rem; animation: fadein .2s ease;
  max-width: 320px;
}
.toast-info  { background: #1d4ed8; }
.toast-error { background: var(--danger); }
@keyframes fadein { from { opacity:0; transform: translateY(10px); } to { opacity:1; } }

/* ─── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50; height: 60px;
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.logo-sm { font-size: 1rem; font-weight: 800; color: var(--primary); }
.nav-auth { display: flex; align-items: center; gap: .5rem; }
.nav-name { font-weight: 600; margin-right: .25rem; }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero { padding: 4rem 0 3rem; text-align: center; }
.hero h1 { font-size: 2.8rem; font-weight: 800; letter-spacing: -.5px; }
.hero-sub { color: var(--text-muted); font-size: 1.15rem; margin: .75rem 0 2rem; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.join-input { max-width: 220px; text-transform: uppercase; letter-spacing: 2px; }

/* ─── Sections ──────────────────────────────────────────────────────────────── */
.section { padding: 2rem 0 3rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.section-header h2 { font-size: 1.5rem; font-weight: 700; }
.filter-row { display: flex; gap: .4rem; }
.filter-btn { padding: .3rem .8rem; border-radius: 99px; font-size: .8rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Meeting cards ─────────────────────────────────────────────────────────── */
.meetings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.meeting-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem;
  box-shadow: var(--shadow); transition: box-shadow .15s;
}
.meeting-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.meeting-card-top { display: flex; align-items: center; gap: .4rem; }
.meeting-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.meeting-status-dot.live { background: #ef4444; animation: pulse 1.5s infinite; }
.meeting-status-dot.scheduled { background: #3b82f6; }
.meeting-status-dot.ended { background: #9ca3af; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity: .4; } }
.meeting-status-label { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.meeting-card-title { font-size: 1.05rem; font-weight: 700; }
.meeting-card-desc { font-size: .875rem; color: var(--text-muted); flex: 1; }
.meeting-card-meta { font-size: .8rem; color: var(--text-muted); display: flex; gap: .75rem; flex-wrap: wrap; }
.meeting-card-actions { margin-top: auto; padding-top: .5rem; }

/* ─── Meeting page ───────────────────────────────────────────────────────────── */
.meeting-page { background: #0f1117; color: #e8eaed; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.meeting-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem 1rem; background: #1a1d23; border-bottom: 1px solid #2d3139;
  height: 52px; flex-shrink: 0;
}
.meeting-header-left { display: flex; align-items: center; gap: .75rem; overflow: hidden; }
.meeting-title-text { font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-header-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.participant-count { font-size: .8rem; color: #9ca3af; }

.meeting-layout {
  flex: 1; display: grid;
  grid-template-columns: 1fr 340px;
  overflow: hidden;
}
.meeting-main { display: flex; flex-direction: column; overflow: hidden; }

/* Stream */
.stream-panel { background: #000; flex-shrink: 0; }
.stream-panel video { width: 100%; max-height: 45vh; display: block; }

/* Content panel */
.content-panel { flex: 1; overflow-y: auto; padding: 1.5rem; }
.content-placeholder { text-align: center; color: #6b7280; padding: 2rem; }
.content-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; }
.content-body { font-size: 1rem; line-height: 1.8; white-space: pre-wrap; }

/* Hands panel */
.hands-panel { padding: .75rem 1rem; background: #1a1d23; border-top: 1px solid #2d3139; }
.hands-panel h4 { font-size: .85rem; color: #9ca3af; margin-bottom: .4rem; }
.hands-panel ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.hands-panel li { font-size: .85rem; background: #2d3139; padding: .2rem .5rem; border-radius: 99px; }

/* Sidebar */
.meeting-sidebar {
  border-left: 1px solid #2d3139; background: #141519;
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-tabs { display: flex; border-bottom: 1px solid #2d3139; flex-shrink: 0; }
.sidebar-tabs .tab-btn {
  flex: 1; padding: .65rem; font-size: .85rem; color: #9ca3af;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.sidebar-tabs .tab-btn.active { color: #fff; border-bottom-color: var(--primary); }
.tab-content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

/* Chat */
.chat-messages { flex: 1; overflow-y: auto; padding: .75rem; display: flex; flex-direction: column; gap: .35rem; }
.chat-msg { display: flex; flex-direction: column; font-size: .85rem; padding: .4rem .6rem; border-radius: 6px; max-width: 100%; word-break: break-word; }
.chat-msg.self { background: #1e3a5f; align-self: flex-end; }
.chat-msg.system { color: #6b7280; font-size: .78rem; text-align: center; background: none; }
.chat-msg.removed .msg-text { color: #6b7280; font-style: italic; }
.msg-user { font-weight: 600; font-size: .78rem; color: #93c5fd; }
.msg-text { color: #e8eaed; }
.msg-time { font-size: .72rem; color: #6b7280; align-self: flex-end; }
.msg-remove-btn, .msg-flag-btn { align-self: flex-end; font-size: .72rem; color: #6b7280; opacity: 0; transition: opacity .15s; }
.chat-msg:hover .msg-remove-btn,
.chat-msg:hover .msg-flag-btn { opacity: 1; }
.msg-remove-btn:hover { color: var(--danger); }
.msg-flag-btn:hover { color: var(--warning); }
.chat-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid #2d3139; flex-shrink: 0; }
.chat-form input { flex: 1; background: #2d3139; border: 1px solid #3d4149; color: #e8eaed; border-radius: var(--radius); padding: .4rem .7rem; }
.chat-form input::placeholder { color: #6b7280; }
.notice { background: #44390f; color: #fde68a; padding: .5rem .75rem; font-size: .82rem; text-align: center; }

/* People list */
.people-list { padding: .5rem; display: flex; flex-direction: column; gap: .25rem; }
.person-item { display: flex; align-items: center; gap: .4rem; padding: .4rem .5rem; border-radius: var(--radius); font-size: .85rem; }
.person-item:hover { background: #2d3139; }
.person-item.muted { opacity: .6; }
.person-role-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.role-owner { background: #f59e0b; }
.role-moderator { background: #10b981; }
.role-speaker { background: #8b5cf6; }
.role-group_leader { background: #3b82f6; }
.role-participant { background: #6b7280; }
.role-guest { background: #4b5563; }
.person-name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-role { font-size: .75rem; color: #6b7280; }
.hand-icon, .mute-icon { font-size: .85rem; }
.person-actions-btn { font-size: .9rem; color: #6b7280; padding: .1rem .3rem; }
.person-actions-btn:hover { color: #e8eaed; }

/* Donations feed */
.tab-content .donate-cta { padding: 1rem; border-bottom: 1px solid #2d3139; }
.donations-feed { padding: .5rem; display: flex; flex-direction: column; gap: .4rem; }
.donation-item { background: #1f2937; border-radius: var(--radius); padding: .6rem .75rem; font-size: .85rem; animation: fadein .3s ease; }
.donation-amount { color: #34d399; font-weight: 700; }
.donation-msg { color: #9ca3af; font-size: .8rem; margin-top: .2rem; }

/* Action bar */
.action-bar {
  display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem;
  background: #1a1d23; border-top: 1px solid #2d3139; flex-shrink: 0;
}
.action-btn { padding: .4rem .9rem; background: #2d3139; color: #e8eaed; border-radius: var(--radius); font-size: .85rem; }
.action-btn:hover { background: #3d4149; }
.action-btn.active { background: var(--primary); }
.react-group { display: flex; gap: .25rem; }
.react-btn { font-size: 1.2rem; padding: .1rem .3rem; border-radius: 4px; transition: background .15s; }
.react-btn:hover { background: #2d3139; }

/* Moderator bar */
.mod-bar {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .5rem 1rem; background: #1a2740; border-top: 1px solid #2d3a50;
  font-size: .85rem; color: #93c5fd; flex-shrink: 0;
}
.mod-bar .btn { color: #93c5fd; border-color: #2d3a50; }
.mod-bar .btn:hover { background: rgba(147,197,253,.1); color: #bfdbfe; }
.mod-bar strong { color: #bfdbfe; }

/* Reactions overlay */
.reaction-overlay { position: fixed; bottom: 80px; right: 360px; width: 200px; height: 300px; pointer-events: none; z-index: 30; }
.reaction-bubble {
  position: absolute; bottom: 0; animation: float-up 3s ease forwards;
  background: rgba(0,0,0,.6); color: #fff; padding: .3rem .7rem;
  border-radius: 99px; font-size: .85rem; white-space: nowrap;
}
@keyframes float-up { 0% { opacity:1; transform:translateY(0); } 100% { opacity:0; transform:translateY(-250px); } }

/* Payment gate */
.payment-gate { display: flex; align-items: center; justify-content: center; height: calc(100vh - 52px); }
.payment-box { background: var(--surface); padding: 2rem; border-radius: calc(var(--radius)*2); max-width: 440px; width: 100%; text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,.3); }
.payment-box h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.payment-box p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Context menu */
.context-menu {
  position: fixed; z-index: 100; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.15); overflow: hidden;
}
.context-menu button {
  display: block; width: 100%; padding: .6rem 1rem; text-align: left;
  font-size: .9rem; color: var(--text);
}
.context-menu button:hover { background: var(--bg); }

/* ─── Dashboard ──────────────────────────────────────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; padding-top: 2rem; padding-bottom: 2rem; min-height: calc(100vh - 60px); }
.dash-nav { display: flex; flex-direction: column; gap: .25rem; padding-top: .5rem; }
.dash-nav-btn { text-align: left; padding: .6rem .9rem; border-radius: var(--radius); font-size: .9rem; color: var(--text-muted); transition: background .15s, color .15s; }
.dash-nav-btn:hover { background: var(--bg); color: var(--text); }
.dash-nav-btn.active { background: #eff6ff; color: var(--primary); font-weight: 600; }
.dash-content { min-width: 0; }
.dash-panel { }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.panel-header h2 { font-size: 1.35rem; font-weight: 700; }
.dash-meetings-list { display: flex; flex-direction: column; gap: .75rem; }
.dash-meeting-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.dash-meeting-info { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.dash-meeting-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.manage-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.manage-tabs .tab-btn { padding: .6rem 1rem; font-size: .9rem; color: var(--text-muted); border-bottom: 2px solid transparent; }
.manage-tabs .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.manage-list { display: flex; flex-direction: column; gap: .5rem; }
.manage-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--bg); border-radius: var(--radius); padding: .75rem 1rem;
  flex-wrap: wrap;
}
.role-select { width: auto; padding: .3rem .5rem; }
.content-add-form { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.flags-list { display: flex; flex-direction: column; gap: .75rem; }
.flag-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.flag-info { flex: 1; font-size: .875rem; line-height: 1.6; }
.flag-actions { display: flex; flex-direction: column; gap: .4rem; }
.banned-list { display: flex; flex-direction: column; gap: .4rem; }
.blocklist-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.blocklist-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  background: #fee2e2; color: #991b1b;
  padding: .25rem .6rem; border-radius: 99px; font-size: .82rem;
}
.blocklist-tag button { color: #991b1b; font-size: .75rem; }
.recordings-list { display: flex; flex-direction: column; gap: .5rem; }
/* ─── WhatsApp button ────────────────────────────────────────────────────────── */
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5d; }

/* ─── QR code — dashboard manage modal ──────────────────────────────────────── */
.join-share-card {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: var(--bg); border-radius: var(--radius); padding: 1rem; flex-wrap: wrap;
}
.join-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: .3rem; flex-shrink: 0; }
.meeting-qr { width: 140px; height: 140px; border: 1px solid var(--border); border-radius: var(--radius); }
.join-qr-hint { font-size: .72rem; color: var(--text-muted); }
.join-share-info { flex: 1; min-width: 180px; }
.join-share-label { font-weight: 600; font-size: .875rem; margin-bottom: .5rem; }

/* ─── QR overlay — inside meeting room ──────────────────────────────────────── */
.qr-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  z-index: 200; display: flex; align-items: center; justify-content: center;
}
.qr-popup {
  background: var(--surface); border-radius: calc(var(--radius)*2);
  padding: 1.75rem; text-align: center; max-width: 300px; width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.qr-popup-title { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.room-qr { width: 220px; height: 220px; border: 1px solid var(--border); border-radius: var(--radius); }

/* ─── Materials dashboard rows ───────────────────────────────────────────────── */
.materials-dash-list { display: flex; flex-direction: column; gap: .5rem; }
.mat-row {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .7rem 1rem; flex-wrap: wrap;
}
.mat-row-icon { font-size: 1.5rem; flex-shrink: 0; }
.mat-row-info { flex: 1; min-width: 0; }
.mat-row-actions { display: flex; gap: .4rem; flex-shrink: 0; }

/* Material add modal source tabs */
.mat-source-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: .5rem; }
.mat-src-btn { padding: .5rem 1rem; font-size: .875rem; color: var(--text-muted); border-bottom: 2px solid transparent; }
.mat-src-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ─── Library page ───────────────────────────────────────────────────────────── */
.lib-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.lib-header h1 { font-size: 1.75rem; font-weight: 800; }
.lib-filters { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.lib-filters .input { flex: 1; min-width: 200px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.lib-card {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  transition: box-shadow .15s, border-color .15s;
}
.lib-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.lib-card-icon { font-size: 2rem; line-height: 1; }
.lib-card-top { margin-bottom: .25rem; }
.lib-card-title { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.lib-card-author { font-size: .82rem; color: var(--text-muted); font-style: italic; }
.lib-card-desc { font-size: .8rem; color: var(--text-muted); line-height: 1.4; }
.lib-card-meta { font-size: .75rem; color: var(--text-muted); margin-top: auto; padding-top: .25rem; }
.lib-card-actions { margin-top: .25rem; }

/* Library picker inside meeting room tools */
.lib-picker { display: flex; flex-direction: column; gap: .25rem; max-height: 180px; overflow-y: auto; }
.lib-pick-btn {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .6rem; border-radius: var(--radius);
  background: transparent; text-align: left;
  border: 1px solid #2d3139; color: #e8eaed; font-size: .8rem;
  cursor: pointer; transition: background .1s;
}
.lib-pick-btn:hover { background: #2d3139; }
.lib-pick-icon { flex-shrink: 0; }
.lib-pick-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Channel cards (home page) ──────────────────────────────────────────────── */
.section-dark { background: #f0f4f8; }
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.ch-card {
  display: flex; gap: .85rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; text-decoration: none; color: inherit;
  transition: box-shadow .15s, border-color .15s;
}
.ch-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: var(--primary); text-decoration: none; }
.ch-card-logo { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; }
.ch-card-logo-img { width: 100%; height: 100%; object-fit: cover; }
.ch-card-initials {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 1.1rem; font-weight: 700;
}
.ch-card-body { min-width: 0; }
.ch-card-name { font-size: .95rem; font-weight: 700; margin-bottom: .15rem; }
.ch-card-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: .25rem; }
.ch-card-desc { font-size: .8rem; color: var(--text-muted); line-height: 1.4; margin-bottom: .35rem; }

/* ─── Channel profile page ───────────────────────────────────────────────────── */
.channel-banner {
  height: 200px; background: linear-gradient(135deg,#1e40af,#7c3aed);
  background-size: cover; background-position: center;
}
.channel-profile-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.channel-profile-inner { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.channel-logo-wrap { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; border: 3px solid var(--surface); flex-shrink: 0; }
.channel-logo-img { width: 100%; height: 100%; object-fit: cover; }
.channel-initials {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 1.6rem; font-weight: 700;
}
.channel-profile-info h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .25rem; }
.channel-meta { color: var(--text-muted); font-size: .875rem; margin-bottom: .5rem; }
.channel-social { display: flex; flex-wrap: wrap; gap: .5rem; }
.social-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .82rem; padding: .3rem .7rem; border: 1px solid var(--border);
  border-radius: 99px; color: var(--text); text-decoration: none;
}
.social-link:hover { background: var(--bg); text-decoration: none; }
.channel-body { padding: 2rem 0; display: flex; flex-direction: column; gap: 2rem; }
.channel-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; }
.channel-description { line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.channel-website-link { display: inline-block; margin-top: .5rem; font-size: .875rem; }

/* Logo upload / preview in dashboard */
.logo-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); margin-top: .5rem; }

.stream-creds { display: flex; flex-direction: column; gap: .6rem; }
.cred-row { display: flex; align-items: center; gap: .75rem; background: var(--bg); padding: .6rem .9rem; border-radius: var(--radius); flex-wrap: wrap; }
.cred-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); min-width: 90px; }
.cred-value { font-family: monospace; font-size: .875rem; flex: 1; word-break: break-all; }

/* ─── Ministry Score / Assessment ───────────────────────────────────────────── */
.ch-score-row  { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; }
.ch-score-badge{ font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; background:#ede9fe;color:#5b21b6; white-space: nowrap; }
.ch-score-num  { font-size: .72rem; color: var(--text-muted); }
.ch-card-top   { border: 2px solid #f59e0b !important; background: linear-gradient(135deg,#fffbeb,var(--surface)); }
.ch-rank-top   { font-size: .7rem; font-weight: 700; color: #92400e; background: #fef9c3; padding: .1rem .4rem; border-radius: 99px; }
.ch-rank-2,.ch-rank-3 { font-size: .8rem; }
.channel-score { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }

/* Dashboard assessment panel */
.assess-total {
  display: flex; align-items: flex-start; gap: 1.25rem; flex-wrap: wrap;
  background: var(--bg); border-radius: var(--radius); padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.assess-score-circle {
  width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}
.assess-score-num { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.assess-score-max { font-size: .7rem; opacity: .8; }
.assess-tier { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.assess-progress-bar { height: 8px; background: var(--border); border-radius: 99px; width: 100%; max-width: 300px; }
.assess-progress-fill { height: 100%; border-radius: 99px; background: var(--primary); transition: width .5s; }

.assess-pillars { display: flex; flex-direction: column; gap: .85rem; }
.assess-pillar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem 1rem; }
.assess-pillar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.assess-pillar-score { font-weight: 700; font-size: .875rem; }
.assess-bar { height: 6px; background: var(--border); border-radius: 99px; margin-bottom: .4rem; }
.assess-bar-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.assess-done { font-size: .75rem; color: #166534; margin-top: .25rem; }
.assess-todo { font-size: .75rem; color: #92400e; margin-top: .15rem; }

/* ─── Testimonies ────────────────────────────────────────────────────────────── */
.testimony-list { display: flex; flex-direction: column; gap: 1rem; }
.testimony-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: calc(var(--radius)*1.5); padding: 1.1rem;
}
.testimony-featured-card {
  border-color: #f59e0b; border-width: 2px;
  background: linear-gradient(135deg, #fffbeb 0%, var(--surface) 40%);
}
.testimony-card-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.testimony-cat { padding: .2rem .6rem; border-radius: 99px; font-size: .72rem; font-weight: 700; }
.testimony-title  { font-size: 1rem; font-weight: 700; margin-bottom: .2rem; line-height: 1.4; }
.testimony-member { font-size: .82rem; color: var(--text-muted); font-style: italic; margin-bottom: .5rem; }
.testimony-body   { font-size: .9rem; line-height: 1.8; white-space: pre-wrap; margin-bottom: .5rem; color: var(--text); }
.testimony-date   { font-size: .75rem; margin-top: .4rem; }

.testimony-video-wrap { position: relative; padding-top: 56.25%; margin: .5rem 0; border-radius: var(--radius); overflow: hidden; }
.testimony-iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.testimony-video-native { width: 100%; border-radius: var(--radius); margin: .5rem 0; }

/* Video mode tabs in modal */
.test-video-options { background: var(--bg); border-radius: var(--radius); padding: .75rem; }
.test-video-tabs { display: flex; gap: .4rem; margin-bottom: .5rem; flex-wrap: wrap; }
.test-vid-btn { padding: .35rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .8rem; cursor: pointer; background: var(--surface); }
.test-vid-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.testimony-live-box { background: #fee2e2; border-radius: var(--radius); padding: .75rem; font-size: .85rem; }

/* Dashboard */
.testimonies-dash-list { display: flex; flex-direction: column; gap: .75rem; }
.testimony-dash-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.test-dash-pending   { border-left-color: #f59e0b; }
.test-dash-approved  { border-left-color: #22c55e; }
.test-dash-featured  { border-left-color: #f59e0b; background: #fffbeb; }
.test-dash-rejected  { border-left-color: #ef4444; opacity: .65; }

/* ─── Church Store ───────────────────────────────────────────────────────────── */
.store-notice {
  background: #fef9c3; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: .6rem .9rem;
  font-size: .82rem; color: #92400e; line-height: 1.5;
}
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: .85rem; margin-top: .75rem; }
.store-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.store-card-oos { opacity: .6; }
.store-card-img { width: 100%; height: 160px; object-fit: cover; display: block; }
.store-card-img-placeholder {
  width: 100%; height: 160px; background: var(--bg);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.store-card-body { padding: .75rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.store-card-top  { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.store-cat-badge { background: #dbeafe; color: #1e40af; padding: .1rem .4rem; border-radius: 99px; font-size: .7rem; font-weight: 600; }
.store-avail-yes { color: #166534; font-size: .72rem; font-weight: 600; }
.store-avail-low { color: #92400e; font-size: .72rem; font-weight: 600; }
.store-avail-no  { color: #dc2626; font-size: .72rem; font-weight: 600; }
.store-card-name { font-size: .9rem; font-weight: 700; }
.store-card-desc { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.store-card-variants { font-size: .75rem; color: var(--text-muted); }
.store-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .4rem; flex-wrap: wrap; gap: .35rem; }
.store-price { font-size: .9rem; font-weight: 700; color: var(--text); }

/* Dashboard store list */
.store-dash-list { display: flex; flex-direction: column; gap: .5rem; }
.store-dash-row {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .65rem .85rem; flex-wrap: wrap;
}
.store-dash-img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.store-dash-img-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 1.4rem; }
.store-dash-info { flex: 1; min-width: 0; font-size: .875rem; }

/* ─── Book Club ──────────────────────────────────────────────────────────────── */
.bookclub-featured { margin-bottom: 1rem; }
.bookclub-featured-badge { font-size:.78rem; font-weight:700; color:var(--primary); margin-bottom:.5rem; }

.bookclub-list, .bookclub-dash-list { display: flex; flex-direction: column; gap: .75rem; }

.bookclub-item {
  display: flex; gap: .85rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: .85rem;
}
.bookclub-item-featured { border-color: var(--primary); border-width: 2px; }
.bookclub-cover { width: 72px; height: 96px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.bookclub-cover-placeholder {
  width: 72px; height: 96px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
}
.bookclub-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.bookclub-type-badge { background: #fef9c3; color: #92400e; padding: .1rem .45rem; border-radius: 99px; font-size: .72rem; font-weight: 600; display: inline-block; }
.bookclub-title  { font-size: .95rem; font-weight: 700; }
.bookclub-author { font-size: .8rem; color: var(--text-muted); font-style: italic; }
.bookclub-desc   { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.bookclub-note   { font-size: .8rem; color: var(--primary); }
.bookclub-actions{ display: flex; gap: .4rem; margin-top: .35rem; flex-wrap: wrap; }

/* Dashboard */
.bookclub-dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.bookclub-dash-current { border-color: var(--primary); border-width: 2px; }
.bookclub-card-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .4rem; }

/* Discussion modal */
.discuss-thread { display: flex; flex-direction: column; gap: .6rem; max-height: 340px; overflow-y: auto; padding-right: .25rem; }
.discuss-comment { background: var(--bg); border-radius: var(--radius); padding: .6rem .8rem; }
.discuss-comment-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.discuss-name { font-weight: 700; font-size: .85rem; }
.discuss-text { font-size: .875rem; line-height: 1.6; white-space: pre-wrap; }

/* ─── Community Learning ─────────────────────────────────────────────────────── */
.learning-notice {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: .65rem .9rem;
  font-size: .82rem; color: #92400e; line-height: 1.5; margin-bottom: .25rem;
}
.learning-public-list { display: flex; flex-direction: column; gap: .85rem; }
.learning-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--border); border-radius: var(--radius); padding: 1rem;
}
.learning-scheduled { border-left-color: #22c55e; }
.learning-approved  { border-left-color: #3b82f6; }
.learning-completed { border-left-color: #6b7280; }

.learning-card-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .4rem; }
.learning-cat    { background: #ede9fe; color: #5b21b6; padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.learning-format { background: var(--bg); border: 1px solid var(--border); padding: .1rem .45rem; border-radius: 99px; font-size: .7rem; color: var(--text-muted); }
.learning-title  { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; }
.learning-speaker{ font-size: .82rem; margin-bottom: .35rem; }
.learning-desc   { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: .35rem; }
.learning-date   { font-size: .8rem; color: var(--text-muted); }
.learning-actions{ margin-top: .5rem; }

/* Dashboard */
.learning-dash-list { display: flex; flex-direction: column; gap: .75rem; }
.learning-dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--border); border-radius: var(--radius); padding: 1rem;
}
.learning-dash-proposed  { border-left-color: #f59e0b; }
.learning-dash-approved  { border-left-color: #3b82f6; }
.learning-dash-scheduled { border-left-color: #22c55e; }
.learning-dash-completed { border-left-color: #6b7280; }
.learning-dash-rejected  { border-left-color: #ef4444; opacity: .7; }
.learning-status-pill { padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); }
.learning-scripture-box {
  background: #f0fdf4; border-left: 3px solid #86efac;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .5rem .75rem; font-size: .82rem; line-height: 1.5;
  margin: .4rem 0; color: #166534;
}
.learning-rejection { font-size: .82rem; color: #dc2626; font-style: italic; margin-top: .25rem; }

/* ─── Community Outreach ─────────────────────────────────────────────────────── */

/* Public profile cards */
.outreach-public-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: .85rem; }
.outreach-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; border-top: 3px solid var(--border);
}
.outreach-active  { border-top-color: #22c55e; }
.outreach-planned { border-top-color: #f59e0b; }
.outreach-done    { border-top-color: #3b82f6; }
.outreach-paused  { border-top-color: #d1d5db; }

.outreach-card-top { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .4rem; }
.outreach-cat  { background: #eff6ff; color: #1e40af; padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.outreach-freq { background: var(--bg); border: 1px solid var(--border); padding: .1rem .45rem; border-radius: 99px; font-size: .7rem; color: var(--text-muted); }
.outreach-status-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.outreach-dot-planned  { background: #f59e0b; }
.outreach-dot-active   { background: #22c55e; }
.outreach-dot-completed,.outreach-dot-done { background: #3b82f6; }
.outreach-dot-paused   { background: #d1d5db; }

.outreach-title  { font-size: .9rem; font-weight: 700; margin-bottom: .35rem; }
.outreach-desc   { font-size: .82rem; color: var(--text-muted); margin-bottom: .35rem; line-height: 1.5; }
.outreach-target,.outreach-date { font-size: .8rem; color: var(--text-muted); margin-bottom: .2rem; }
.outreach-impact { background: #f0fdf4; border-radius: var(--radius); padding: .5rem .75rem; margin-top: .4rem; font-size: .82rem; display: flex; flex-direction: column; gap: .2rem; }
.outreach-impact-notes { font-size: .82rem; color: var(--text-muted); font-style: italic; margin-top: .25rem; line-height: 1.5; }

/* Dashboard */
.outreach-dash-list { display: flex; flex-direction: column; gap: .75rem; }
.outreach-dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--border); border-radius: var(--radius); padding: 1rem;
}
.outreach-dash-card.outreach-dot-active   { border-left-color: #22c55e; }
.outreach-dash-card.outreach-dot-planned  { border-left-color: #f59e0b; }
.outreach-dash-card.outreach-dot-completed{ border-left-color: #3b82f6; }
.outreach-dash-card.outreach-dot-paused   { border-left-color: #d1d5db; }
.outreach-status-pill { padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); }
.outreach-meta-row { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-muted); margin: .35rem 0; }

/* ─── Daily Declarations ─────────────────────────────────────────────────────── */
.daily-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .75rem; }
.daily-date   { font-size: .82rem; color: var(--text-muted); margin-top: .15rem; }
.daily-nav    { display: flex; gap: .25rem; }
.daily-nav-btn { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); width: 32px; height: 32px; font-size: 1.1rem; cursor: pointer; }
.daily-nav-btn:hover { background: var(--surface); }

.daily-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.daily-tab  { padding: .5rem .85rem; font-size: .82rem; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.daily-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.daily-card {
  border: 2px solid; border-radius: calc(var(--radius)*1.5);
  padding: 1.25rem; background: var(--surface);
}
.daily-prompt { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }
.daily-title  { font-size: 1rem; font-weight: 700; margin-bottom: .6rem; }
.daily-body   { font-size: 1rem; line-height: 1.9; white-space: pre-wrap; margin-bottom: .6rem; }
.daily-ref    { font-size: .82rem; color: var(--text-muted); font-style: italic; margin-bottom: 1rem; }
.daily-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.daily-speak-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem 1rem; background: var(--text); color: #fff;
  border-radius: var(--radius); font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: opacity .15s;
}
.daily-speak-btn:hover { opacity: .85; }
.daily-declare-btn {
  padding: .45rem 1rem; background: #dcfce7; color: #166534;
  border: 1px solid #86efac; border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; cursor: pointer;
}
.daily-empty    { color: var(--text-muted); font-size: .875rem; padding: 1rem 0; }
.declared-msg   { color: #166534; font-size: .875rem; font-weight: 600; margin-top: .5rem; }

/* Dashboard daily list */
.daily-dash-list   { display: flex; flex-direction: column; gap: .75rem; }
.daily-dash-day    { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.daily-dash-date   { background: var(--primary); color: #fff; padding: .4rem .85rem; font-size: .82rem; font-weight: 600; }
.daily-dash-items  { padding: .5rem; display: flex; flex-direction: column; gap: .3rem; }
.daily-dash-item   { display: flex; align-items: center; justify-content: space-between; padding: .35rem .5rem; background: var(--bg); border-radius: 4px; font-size: .82rem; }

/* ─── Visitation ─────────────────────────────────────────────────────────────── */
.visits-list { display: flex; flex-direction: column; gap: .75rem; }
.visit-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.visit-requested  { border-left: 3px solid #f59e0b; }
.visit-confirmed  { border-left: 3px solid #3b82f6; }
.visit-completed  { border-left: 3px solid #22c55e; }
.visit-cancelled  { border-left: 3px solid #d1d5db; opacity: .65; }

.visit-card-header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.visit-type-badge  { background: #e0f2fe; color: #0369a1; padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.visit-status-badge { padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); }

.visit-card-body { margin-bottom: .4rem; }
.visit-member  { font-size: .9rem; margin-bottom: .25rem; }
.visit-purpose { font-size: .85rem; color: var(--text-muted); margin-bottom: .35rem; line-height: 1.5; }
.visit-meta    { font-size: .82rem; margin-bottom: .2rem; }
.visit-witness    { color: #166534; }
.visit-no-witness { color: #b45309; }
.visit-log { background: var(--bg); border-radius: var(--radius); padding: .6rem .85rem; margin-top: .4rem; font-size: .82rem; }
.visit-log p { line-height: 1.6; white-space: pre-wrap; margin-top: .2rem; }

/* ─── Q&A ────────────────────────────────────────────────────────────────────── */

/* Anonymous notice badge */
.qna-anon-notice {
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: .6rem .9rem;
  font-size: .82rem; color: #1e40af; line-height: 1.5;
}

/* Category badge */
.qna-cat-badge {
  background: #ede9fe; color: #5b21b6;
  padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600;
}

/* Church profile — Q&A published cards */
.qna-list { display: flex; flex-direction: column; gap: .85rem; }
.qna-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.qna-card-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; flex-wrap: wrap; }
.qna-question { font-size: .9rem; font-weight: 600; margin-bottom: .5rem; line-height: 1.5; }
.qna-answer { background: var(--bg); border-radius: var(--radius); padding: .65rem .85rem; }
.qna-answer-label { font-size: .78rem; font-weight: 700; color: var(--primary); display: block; margin-bottom: .25rem; }
.qna-answer p { font-size: .875rem; line-height: 1.7; white-space: pre-wrap; }

/* Dashboard inbox */
.qna-inbox-list { display: flex; flex-direction: column; gap: .75rem; }
.qna-inbox-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.qna-inbox-pending  { border-left: 3px solid #f59e0b; }
.qna-inbox-answered { border-left: 3px solid #22c55e; }
.qna-inbox-dismissed{ border-left: 3px solid #d1d5db; opacity: .7; }
.qna-inbox-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.qna-inbox-q { font-size: .9rem; margin-bottom: .4rem; line-height: 1.5; }
.qna-inbox-a { background: #f0fdf4; border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .4rem; font-size: .85rem; line-height: 1.6; }

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

/* Church profile — prayer wall */
.prayer-wall-list { display: flex; flex-direction: column; gap: .6rem; }
.prayer-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid #7c3aed; border-radius: var(--radius); padding: .75rem 1rem;
}
.prayer-card-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.prayer-card-name   { font-weight: 600; font-size: .875rem; }
.prayer-card-title  { font-size: .9rem; margin-bottom: .25rem; }
.prayer-card-body   { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.prayer-card-date   { font-size: .75rem; margin-top: .4rem; }

/* Status badges */
.prayer-status          { padding: .15rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.prayer-status-pending  { background: #fef9c3; color: #92400e; }
.prayer-status-prayed   { background: #dbeafe; color: #1e40af; }
.prayer-status-answered { background: #dcfce7; color: #166534; }

/* Dashboard — prayer request cards */
.prayer-requests-list { display: flex; flex-direction: column; gap: .75rem; }
.prayer-dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.prayer-dash-pending  { border-left: 3px solid #f59e0b; }
.prayer-dash-prayed   { border-left: 3px solid #3b82f6; }
.prayer-dash-answered { border-left: 3px solid #22c55e; }
.prayer-dash-header { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.prayer-dash-name   { font-weight: 700; }
.prayer-dash-title  { font-size: .9rem; margin-bottom: .3rem; }
.prayer-dash-body   { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: .4rem; }
.prayer-dash-note   { font-size: .82rem; color: var(--primary); font-style: italic; margin-bottom: .4rem; }
.prayer-dash-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }

/* ─── Membership ─────────────────────────────────────────────────────────────── */
.channel-membership { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; flex-wrap: wrap; }
.member-count { font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.btn-member-active {
  background: #dcfce7; color: #166534;
  border: 1px solid #86efac; font-weight: 600;
}
.btn-member-active:hover { background: #bbf7d0; }

/* Members list in dashboard */
.members-list { display: flex; flex-direction: column; gap: .5rem; }
.member-row {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .65rem 1rem;
}
.member-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}
.member-info { display: flex; flex-direction: column; flex: 1; font-size: .875rem; }

/* ─── Giving — compact, at the bottom ───────────────────────────────────────── */
.giving-quiet {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem; margin-top: 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.giving-quiet-text {
  font-size: .9rem; color: var(--text);
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.giving-quiet-btn {
  background: var(--primary); color: #fff;
  border: none; font-size: .85rem; font-weight: 600;
  padding: .4rem 1rem; border-radius: var(--radius);
  cursor: pointer; transition: background .15s;
  white-space: nowrap;
}
.giving-quiet-btn:hover { background: var(--primary-d); }

.recent-supporters { margin-top: .6rem; }
.supporter-row {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .35rem 0; border-bottom: 1px solid var(--border); font-size: .82rem;
  color: var(--text-muted);
}
.supporter-name  { font-weight: 600; color: var(--text); }
.supporter-type  { flex: 1; font-style: italic; }
.supporter-amount { color: var(--text-muted); margin-left: auto; }

/* Give receipt */
.give-receipt { text-align: center; padding: 1rem 0; }
.give-receipt h2 { font-size: 1.4rem; margin: .5rem 0; }

/* Spinner while waiting for USSD */
.give-spinner {
  width: 36px; height: 36px; margin: 1rem auto;
  border: 4px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Giving records table */
.giving-records-list { overflow-x: auto; }
.giving-totals { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.giving-total-badge { background: #dbeafe; color: #1e40af; padding: .3rem .8rem; border-radius: 99px; font-weight: 700; }
.giving-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.giving-table th { background: var(--bg); padding: .5rem .75rem; text-align: left; font-weight: 600; font-size: .8rem; white-space: nowrap; }
.giving-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
.giving-table tr:hover td { background: var(--bg); }
.status-badge { padding: .15rem .5rem; border-radius: 99px; font-size: .75rem; font-weight: 600; }
.status-completed { background: #dcfce7; color: #166534; }
.status-initiated  { background: #fef9c3; color: #92400e; }
.status-failed     { background: #fee2e2; color: #991b1b; }

/* ─── Church department groups (channel profile page) ───────────────────────── */
.dept-group { margin-bottom: 2rem; }
.dept-group-title {
  font-size: 1rem; font-weight: 700; margin-bottom: .75rem;
  display: flex; align-items: center; gap: .4rem;
  color: var(--text); border-bottom: 2px solid var(--border); padding-bottom: .4rem;
}
.dept-group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: .75rem; }

/* ─── Category badge ─────────────────────────────────────────────────────────── */
.badge-category { background: #ede9fe; color: #5b21b6; }
.category-filter-row { margin-top: .5rem; flex-wrap: wrap; gap: .35rem; }
.meeting-owner-link { color: var(--primary); text-decoration: none; }
.meeting-owner-link:hover { text-decoration: underline; }

/* ─── Meeting room tools panel ───────────────────────────────────────────────── */
.tool-section {
  border-bottom: 1px solid #2d3139; padding: .85rem .75rem;
  display: flex; flex-direction: column; gap: .45rem;
}
.tool-heading { font-size: .8rem; font-weight: 700; color: #93c5fd; text-transform: uppercase; letter-spacing: .05em; }
.tool-row { display: flex; gap: .4rem; align-items: center; }
.tool-input {
  width: 100%; padding: .4rem .6rem; background: #2d3139; border: 1px solid #3d4149;
  color: #e8eaed; border-radius: var(--radius); font-size: .82rem; font-family: inherit;
  resize: vertical;
}
.tool-input::placeholder { color: #6b7280; }
.tool-input:focus { outline: none; border-color: var(--primary); }
.tool-select { padding: .35rem .5rem; background: #2d3139; border: 1px solid #3d4149; color: #e8eaed; border-radius: var(--radius); font-size: .8rem; }
.tool-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.tool-preview {
  background: #1a1d23; border-left: 3px solid var(--primary);
  padding: .5rem .7rem; font-size: .8rem; color: #d1d5db;
  white-space: pre-wrap; line-height: 1.6; border-radius: 0 var(--radius) var(--radius) 0;
  max-height: 180px; overflow-y: auto;
}

/* ─── Content panel: pre-wrap for Bible verses and lyrics ────────────────────── */
.content-body { white-space: pre-wrap; line-height: 1.8; font-size: .95rem; }

/* ─── Role choice (signup) ───────────────────────────────────────────────────── */
.role-choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: 1.1rem .75rem; border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s;
  text-align: center;
}
.role-card:hover { border-color: var(--primary); background: #eff6ff; }
.role-card-icon { font-size: 2rem; line-height: 1; }
.role-card strong { font-size: .95rem; }
.role-card p { font-size: .78rem; color: var(--text-muted); margin: 0; line-height: 1.4; }
.role-badge {
  font-size: .82rem; font-weight: 600; padding: .3rem .7rem;
  border-radius: 99px; margin-bottom: .25rem; display: inline-block;
}
.role-badge-owner     { background: #dbeafe; color: #1e40af; }
.role-badge-participant { background: #dcfce7; color: #166534; }

/* ─── Hero signup CTA ────────────────────────────────────────────────────────── */
.hero-signup-cta {
  display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap;
}
.hero-cta-label { font-size: .9rem; color: rgba(255,255,255,.75); }

/* ─── Live camera grid ───────────────────────────────────────────────────────── */
.cameras-grid {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .5rem; background: #0d0f11; flex-shrink: 0;
}
.cam-tile {
  position: relative; width: 160px; height: 120px;
  border-radius: var(--radius); overflow: hidden; background: #1a1d23;
  flex-shrink: 0;
}
.cam-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-label {
  position: absolute; bottom: .3rem; left: .4rem;
  color: #fff; font-size: .7rem; font-weight: 600;
  background: rgba(0,0,0,.6); padding: .1rem .4rem; border-radius: 4px;
  pointer-events: none;
}

/* ─── Self-view webcam ───────────────────────────────────────────────────────── */
.self-view {
  position: fixed; bottom: 5.5rem; right: 1.5rem;
  width: 180px; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.5); z-index: 60;
  background: #000; border: 2px solid var(--primary);
}
.self-view video { width: 100%; display: block; transform: scaleX(-1); }
.self-view-close {
  position: absolute; top: .3rem; right: .3rem;
  background: rgba(0,0,0,.6); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.self-view-close:hover { background: rgba(220,38,38,.85); }

/* ─── Gratitude Wall ─────────────────────────────────────────────────────────── */
.gratitude-page { background: var(--bg); }

.gratitude-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 3.5rem 1rem;
  text-align: center;
}
.gratitude-hero h1 { font-size: 2.4rem; margin-bottom: .75rem; }
.gratitude-hero .hero-sub { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }

.gratitude-toolbar {
  display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem;
}

.gratitude-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}
.gratitude-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.gratitude-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.gratitude-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }

.gratitude-card-image { width: 100%; max-height: 180px; overflow: hidden; }
.gratitude-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gratitude-card-body { padding: .9rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }

.gratitude-category {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  background: rgba(99,102,241,.15); color: #a5b4fc;
  border-radius: 20px; padding: .15rem .55rem;
  width: fit-content;
}

.gratitude-text {
  font-size: .9rem; line-height: 1.6; color: var(--text);
  flex: 1;
}

.gratitude-scripture {
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--primary);
  padding: .5rem .65rem;
  border-radius: 0 6px 6px 0;
  margin-top: .25rem;
}
.scripture-ref  { display: block; font-size: .7rem; font-weight: 700; color: var(--primary); margin-bottom: .2rem; }
.scripture-text { font-size: .78rem; color: var(--text-muted); line-height: 1.55; font-style: italic; }

.gratitude-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--text-muted);
  margin-top: auto; padding-top: .35rem;
}
.gratitude-author { font-weight: 600; }
.gratitude-time   { font-size: .68rem; }

.gratitude-reactions {
  display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .25rem;
}
.gratitude-reactions .reaction-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .55rem;
  font-size: .78rem;
  cursor: pointer; color: var(--text);
  transition: background .15s, border-color .15s;
  display: flex; align-items: center; gap: .2rem;
}
.gratitude-reactions .reaction-btn:hover { background: rgba(99,102,241,.2); border-color: var(--primary); }
.gratitude-reactions .flag-btn { margin-left: auto; color: var(--text-muted); font-size: .72rem; }
.react-count { font-size: .72rem; }

.gratitude-dash-list { display: flex; flex-direction: column; gap: .75rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .meeting-layout { grid-template-columns: 1fr; grid-template-rows: 1fr 350px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .hero h1 { font-size: 2rem; }
  .reaction-overlay { right: 10px; }
}
