/**
 * Rotary ERP reusable component styles (cards, forms, buttons, tables, badges,
 * alerts, pagination, skeleton/overlay loading, filter bar). Same component
 * vocabulary as the sibling ERP projects (BakeryERP, medikcare, holidayClassPro,
 * eduklassERP-v4) so every module built in later phases reuses the exact same
 * markup patterns (.card, .filter-bar, .dtable, .badge, .empty-state, .section-header).
 */

/* ── Toastr (CDN default is a fixed 300px box anchored 12px from the right,
   which overflows a narrow phone viewport once its close button's own
   overflow is accounted for) ──────────────────────────────────────────── */
@media (max-width: 420px) {
  #toast-container { width: calc(100vw - 24px); right: 12px !important; left: 12px !important; }
  #toast-container > div { width: 100% !important; box-sizing: border-box; }
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 6px rgba(0,0,0,.06); border: 1px solid #e2e8f0; }
.stat-card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.05); border: 1px solid #e2e8f0; }
a.card:hover, .card-link:hover { box-shadow: 0 6px 24px rgba(0,0,0,.09); transform: translateY(-2px); }
a.card, .card-link { transition: box-shadow .15s, transform .15s; text-decoration: none; }
html.dark .card, html.dark .stat-card { background: #1e293b; border-color: #334155; color: #cbd5e1; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-label { display: block; font-size: .8125rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-control { display: block; width: 100%; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 9px 12px; font-size: .875rem; font-family: inherit; color: #1e293b; background: #fff; transition: border-color .12s; }
.form-control:focus { outline: none; border-color: var(--pr); }
select.form-control { appearance: auto; }
.form-hint { font-size: .75rem; color: #94a3b8; margin-top: 4px; }
.form-error { font-size: .75rem; color: #dc2626; margin-top: 4px; }
.form-control.is-invalid { border-color: #dc2626; }
textarea.form-control { resize: vertical; min-height: 90px; }
html.dark .form-control { background: #0f172a; border-color: #475569; color: #e2e8f0; }
html.dark .form-control:focus { border-color: #3b82f6; }
html.dark .form-label { color: #94a3b8; }

.password-field { position: relative; }
.password-field .form-control { padding-right: 40px; }
.password-toggle-btn { position: absolute; top: 0; right: 0; height: 100%; width: 40px; display: flex; align-items: center; justify-content: center; background: none; border: none; color: #94a3b8; cursor: pointer; padding: 0; }
.password-toggle-btn:hover { color: var(--pr); }
html.dark .password-toggle-btn:hover { color: #93c5fd; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; cursor: pointer; background: #cbd5e1; transition: background .18s; border-radius: 999px; }
.switch-slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; transition: transform .18s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .switch-slider { background: #059669; }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--or); outline-offset: 2px; }
.switch input:disabled + .switch-slider { opacity: .5; cursor: not-allowed; }
.switch-sm { width: 34px; height: 20px; }
.switch-sm .switch-slider::before { height: 14px; width: 14px; left: 3px; bottom: 3px; }
.switch-sm input:checked + .switch-slider::before { transform: translateX(14px); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: .8125rem; font-weight: 600; cursor: pointer; border: none; transition: all .12s; text-decoration: none; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; filter: none; }
.btn-sm { padding: 6px 12px; font-size: .75rem; border-radius: 6px; }
.btn-xs { padding: 4px 10px; font-size: .7rem; border-radius: 6px; gap: 4px; }
.btn-lg { padding: 13px 24px; font-size: .9375rem; border-radius: 10px; }
.btn-primary { background: var(--pr); color: #fff; }
.btn-primary:hover { filter: brightness(.9); color: #fff; }
.btn-outline { background: #fff; color: #374151; border: 1.5px solid #e2e8f0; }
.btn-outline:hover { border-color: var(--pr); color: var(--pr); background: #f0f7f8; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; color: #fff; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }
html.dark .btn-outline { background: #1e293b; color: #94a3b8; border-color: #475569; }
html.dark .btn-outline:hover { background: #334155; color: #93c5fd; border-color: #3b82f6; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.dtable { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.dtable th { padding: 10px 12px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; border-bottom: 2px solid #e2e8f0; white-space: nowrap; background: #f8fafc; }
.dtable td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: #374151; }
.dtable tr:hover td { background: #fafbff; }
.dtable tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.dtable th:last-child, .dtable td:last-child { padding-right: 16px; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
html.dark .dtable th { background: #253347; color: #94a3b8; border-color: #334155; }
html.dark .dtable td { border-color: #334155; color: #cbd5e1; }
html.dark .dtable tr:hover td { background: #253347; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: .7rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-navy { background: #e0e7ff; color: #1e3a8a; }
html.dark .badge-gray { background: #334155; color: #94a3b8; }
html.dark .badge-info { background: #1e3a5f; color: #93c5fd; }
html.dark .badge-success { background: #14532d; color: #86efac; }
html.dark .badge-danger { background: #450a0a; color: #fca5a5; }
html.dark .badge-warning { background: #422006; color: #fde68a; }
html.dark .badge-orange { background: #431407; color: #fdba74; }
html.dark .badge-navy { background: #1e3a5f; color: #93c5fd; }

/* ── Balance/status row (payment balance due/paid-in-full) ───────────────── */
.payment-balance-row { font-size: .9rem; font-weight: 700; padding: 4px 8px; border-radius: 6px; margin-top: 4px; }
.payment-balance-row.due { background: #fee2e2; color: #991b1b; }
.payment-balance-row.change { background: #dcfce7; color: #166534; }
.payment-balance-row.exact { background: #f1f5f9; color: #475569; }
html.dark .payment-balance-row.exact { background: #334155; color: #cbd5e1; }

@media print {
  .sidebar, .topbar, .filter-bar, .no-print, .sidebar-overlay { display: none !important; }
  .main-wrap { margin-left: 0 !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: none !important; padding: 0 !important; }
}

/* ── Alerts / flash messages ───────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: .875rem; font-weight: 500; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; border-left: 4px solid transparent; position: relative; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; border-left-color: #059669; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; border-left-color: #dc2626; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; border-left-color: #f59e0b; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; border-left-color: #3b82f6; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagi { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.pagi a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 6px; font-size: .8125rem; font-weight: 500; color: #64748b; border: 1.5px solid #e2e8f0; text-decoration: none; transition: all .12s; }
.pagi a:hover { border-color: var(--pr); color: var(--pr); background: #eff6ff; }
.pagi a.current { background: var(--pr); color: #fff; border-color: var(--pr); font-weight: 700; pointer-events: none; }

/* ── Empty state ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state .icon { font-size: 2.5rem; color: #e2e8f0; display: block; margin-bottom: .75rem; }
.empty-state .title { font-weight: 700; color: #cbd5e1; font-size: 1rem; margin-bottom: .3rem; }
.empty-state p { color: #94a3b8; font-size: .875rem; margin: 0; }

/* ── Section header ─────────────────────────────────────────────────────── */
.section-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; gap: 12px; }
.section-header h2 { font-size: 1rem; font-weight: 700; color: #1e293b; }
.section-header p { font-size: .8125rem; color: #94a3b8; margin-top: 2px; }
html.dark .section-header h2, html.dark .section-header h3 { color: #e2e8f0; }
@media (max-width: 640px) {
  .section-header { flex-direction: column; align-items: stretch; }
  .section-header > *:last-child:not(:first-child) { display: flex; flex-wrap: wrap; gap: 8px; }
}

/* ── Notification dropdown ─────────────────────────────────────────────── */
.notif-dropdown { position: absolute; right: 0; top: 48px; width: 340px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.12); z-index: 100; display: none; }
.notif-dropdown.show { display: block; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .1s; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #eff6ff; }
.notif-item:last-child { border-bottom: 0; }
html.dark .notif-dropdown { background: #1e293b; border-color: #334155; }

/* ── Skeleton shimmer ───────────────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: rcg-shimmer 1.4s infinite; border-radius: 6px; display: block; }
html.dark .skeleton { background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%); background-size: 200% 100%; }
@keyframes rcg-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Full-page overlay loader ───────────────────────────────────────────── */
#page-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.35); opacity: 0; visibility: hidden; transition: opacity .15s ease; }
#page-overlay.active { opacity: 1; visibility: visible; }
#page-overlay .spinner-ring { width: 52px; height: 52px; border: 4px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: rcg-spin .7s linear infinite; }
@keyframes rcg-spin { to { transform: rotate(360deg); } }

/* ── Search box ─────────────────────────────────────────────────────────── */
.search-box { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 7px 12px; display: flex; align-items: center; gap: 8px; transition: border-color .12s, box-shadow .12s; }
.search-box:focus-within { border-color: var(--pr); background: #fff; box-shadow: 0 0 0 3px rgba(23,69,143,.08); }
.search-box input { background: transparent; border: none; outline: none; font-size: .8125rem; color: #374151; width: 148px; font-family: inherit; }
html.dark .search-box { background: #0f172a; border-color: #475569; }
html.dark .search-box input { background: transparent; color: #e2e8f0; }

/* ── Sub-nav (settings) ────────────────────────────────────────────────── */
.subnav { display: flex; flex-direction: column; gap: 2px; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 8px; font-size: .8125rem; font-weight: 600; color: #475569; text-decoration: none; transition: all .12s; }
.subnav a:hover { background: #f1f5f9; color: var(--pr); }
.subnav a.active { background: #eff6ff; color: var(--pr); }
.subnav a i { width: 16px; text-align: center; font-size: .8rem; color: #94a3b8; }
.subnav a:hover i, .subnav a.active i { color: var(--pr); }
html.dark .subnav a { color: #94a3b8; }
html.dark .subnav a:hover { background: #334155; color: #93c5fd; }
html.dark .subnav a.active { background: #1e3a5f; color: #93c5fd; }

.subnav-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; background: none; border: none; padding: 8px 10px; font-size: .875rem; font-weight: 700; color: #1e293b; cursor: pointer; }
.subnav-toggle-chevron { font-size: .7rem; color: #94a3b8; transition: transform .15s; }
html.dark .subnav-toggle { color: #e2e8f0; }
@media (max-width: 991px) {
  .subnav-toggle { display: flex; }
  .subnav { max-height: 0; overflow: hidden; }
  .card.subnav-open .subnav { max-height: 600px; overflow-y: auto; margin-top: 8px; }
  .card.subnav-open .subnav-toggle-chevron { transform: rotate(180deg); }
}

/* ── Filter bar (list-page search + dropdown filters) ─────────────────────
   Markup: <div class="filter-bar"><form method="get" class="filter-bar-row">
   ...fields..., a trailing <button class="btn btn-primary btn-sm"><i class="fa-solid
   fa-filter"></i> Filter</button>, and when any filter is active a
   <a class="filter-clear">Clear <n> filter(s)</a>. */
.filter-bar { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 6px rgba(0,0,0,.06); border: 1px solid #e2e8f0; margin-bottom: 16px; }
html.dark .filter-bar { background: #1e293b; border-color: #334155; }
.filter-bar-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.filter-field { flex: 1 1 160px; min-width: 140px; }
.filter-field.filter-field-search { flex: 2 1 220px; }
.filter-field label { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; margin-bottom: 4px; }
.filter-bar .search-box { width: 100%; }
.filter-bar .search-box input { width: 100%; }
.filter-clear { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; color: #94a3b8; text-decoration: none; padding: 8px 4px; white-space: nowrap; transition: color .12s; }
.filter-clear:hover { color: #dc2626; }
.filter-clear i { font-size: .7rem; }
.filter-count { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: .7rem; font-weight: 700; background: var(--pr); color: #fff; margin-left: 6px; }
.results-meta { font-size: .8125rem; color: #94a3b8; margin: 0 0 10px 2px; }
@media (max-width: 640px) {
  .filter-field { flex: 1 1 100%; }
}

/* ── Stat cards (dashboard) ─────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-card .stat-value { font-size: 1.375rem; font-weight: 800; color: #1e293b; line-height: 1.15; }
.stat-card .stat-label { font-size: .75rem; color: #94a3b8; font-weight: 600; margin-top: 2px; }
html.dark .stat-card .stat-value { color: #e2e8f0; }
.stat-icon.icon-teal { background: #e6ecf6; color: var(--pr); }
.stat-icon.icon-coral { background: #fdf1dc; color: var(--or); }
.stat-icon.icon-green { background: #dcfce7; color: #166534; }
.stat-icon.icon-red { background: #fee2e2; color: #991b1b; }
.stat-icon.icon-blue { background: #dbeafe; color: #1e40af; }
.stat-icon.icon-amber { background: #fef9c3; color: #854d0e; }
html.dark .stat-icon.icon-teal { background: #1c3868; }
html.dark .stat-icon.icon-coral { background: #4a3a1a; }
html.dark .stat-icon.icon-green { background: #14532d; }
html.dark .stat-icon.icon-red { background: #450a0a; }
html.dark .stat-icon.icon-blue { background: #1e3a5f; }
html.dark .stat-icon.icon-amber { background: #422006; }

/* ── Quick action buttons (dashboard) ──────────────────────────────────── */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { flex: 1 1 160px; justify-content: center; }

/* ── Attendance status pills (meeting register / kiosk check-in) ───────────
   Markup: a radio input with class "visually-hidden" immediately followed by
   a <label for="..."> styled as the actual tap target — a plain native radio
   is a poor touch target on a tablet, so the label is the ~36px button and
   the input itself is only there for form semantics/keyboard access. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.rcg-status-pill { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid #e2e8f0; background: #fff; color: #cbd5e1; cursor: pointer; transition: all .12s; font-size: .8rem; }
.rcg-status-pill:hover { border-color: #cbd5e1; color: #94a3b8; }
.rcg-status-radio:focus-visible + .rcg-status-pill { outline: 2px solid var(--pr); outline-offset: 2px; }
.rcg-status-radio:checked + .rcg-status-pill-present { background: #dcfce7; border-color: #059669; color: #166534; }
.rcg-status-radio:checked + .rcg-status-pill-absent { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
html.dark .rcg-status-pill { background: #0f172a; border-color: #475569; color: #475569; }
@media (max-width: 640px) {
  .rcg-status-pill { width: 40px; height: 40px; } /* larger tap target on phones/tablets at the door */
}

/* ── Sticky save bar (attendance register) — the member list can run past a
   screen's height, so the Save button stays reachable without scrolling
   back to the top. ─────────────────────────────────────────────────────── */
.rcg-attendance-savebar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e2e8f0; margin: 16px -20px -20px; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 0 0 12px 12px; }
html.dark .rcg-attendance-savebar { background: #1e293b; border-color: #334155; }
@media (max-width: 640px) {
  .rcg-attendance-savebar { flex-direction: column; align-items: stretch; }
}

/* ── Form section header (icon + title) — used by any multi-section create/edit
   form (Members, Guests, …) to visually group related fields. ──────────────── */
.form-section-title { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; color: #1e293b; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.form-section-title i { width: 30px; height: 30px; border-radius: 9px; background: var(--pr); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.form-section-title .fst-sub { font-weight: 500; color: #94a3b8; font-size: .75rem; margin-top: 1px; }
html.dark .form-section-title { color: #e2e8f0; border-color: #334155; }

/* ── Avatar upload (photo picker with live preview + edit-pencil overlay) ──── */
.avatar-upload { position: relative; width: 148px; height: 148px; margin: 0 auto; }
.avatar-upload .avatar-preview { width: 148px; height: 148px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; outline: 3px solid var(--pr); background: #eef2f9; display: flex; align-items: center; justify-content: center; font-size: 2.75rem; font-weight: 700; color: #fff; }
.avatar-upload .avatar-edit-btn { position: absolute; bottom: 4px; right: 4px; width: 38px; height: 38px; border-radius: 50%; background: var(--or); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); font-size: .85rem; transition: transform .12s; }
.avatar-upload .avatar-edit-btn:hover { transform: scale(1.08); }
.avatar-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
html.dark .avatar-upload .avatar-preview { border-color: #1e293b; }

/* ── Member search typeahead (Invited By, and any other "find a member by
   name" field) — window.initMemberSearch() in app.js wires the behaviour;
   markup is a .member-search-wrap containing the text <input>, a hidden
   <input> holding the resolved member id, and a .member-search-results
   dropdown sibling. ─────────────────────────────────────────────────────── */
.member-search-wrap { position: relative; }
.member-search-wrap input[type="text"] { padding-right: 34px; }
.member-search-wrap .member-search-icon { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #94a3b8; font-size: .8rem; pointer-events: none; }
.member-search-wrap.has-selection .member-search-icon { color: #059669; }
.member-search-results { position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 30px rgba(15,23,42,.14); max-height: 260px; overflow-y: auto; z-index: 90; display: none; }
.member-search-results.show { display: block; }
.member-search-item { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8125rem; border-bottom: 1px solid #f8fafc; }
.member-search-item:last-child { border-bottom: 0; }
.member-search-item:hover, .member-search-item.active { background: #f1f5f9; }
.member-search-name { font-weight: 600; color: #1e293b; }
.member-search-meta { font-size: .72rem; color: #94a3b8; white-space: nowrap; }
.member-search-empty { padding: 14px; text-align: center; font-size: .78rem; color: #94a3b8; }
html.dark .member-search-results { background: #1e293b; border-color: #334155; }
html.dark .member-search-item { border-color: #253347; }
html.dark .member-search-item:hover, html.dark .member-search-item.active { background: #334155; }
html.dark .member-search-name { color: #e2e8f0; }

/* ── Rendered rich-text content (meeting agenda/minutes saved via the Quill
   editor) — Quill emits semantic HTML (h2/h3, p, ul/ol, strong/em/u,
   blockquote, a); this gives it readable typography wherever it's echoed
   back out (meeting show page, minutes page). ────────────────────────────── */
.rte-content { font-size: .875rem; line-height: 1.7; color: #1e293b; }
.rte-content p { margin: 0 0 .75em; }
.rte-content p:last-child { margin-bottom: 0; }
.rte-content h2 { font-size: 1.15rem; font-weight: 700; margin: 1em 0 .5em; }
.rte-content h3 { font-size: 1rem; font-weight: 700; margin: 1em 0 .4em; }
.rte-content h2:first-child, .rte-content h3:first-child { margin-top: 0; }
.rte-content ul, .rte-content ol { margin: 0 0 .75em; padding-left: 1.4em; }
.rte-content li { margin-bottom: .3em; }
.rte-content blockquote { margin: 0 0 .75em; padding: 8px 14px; border-left: 3px solid var(--or); background: #f8fafc; color: #475569; font-style: italic; }
.rte-content a { color: var(--pr); }
html.dark .rte-content { color: #cbd5e1; }
html.dark .rte-content blockquote { background: rgba(255,255,255,.04); color: #94a3b8; }

/* ── Trend charts (inline SVG, app/Helpers/charts.php) ───────────────────── */
:root { --chart-surface: #ffffff; }
html.dark { --chart-surface: #1e293b; }
.chart-wrap { width: 100%; }
.trend-chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: #e2e8f0; stroke-width: 1; }
html.dark .chart-grid { stroke: #334155; }
.chart-axis-label { font-size: 9px; fill: #94a3b8; font-family: inherit; }
.chart-end-label { font-size: 11px; font-weight: 700; fill: #1e293b; font-family: inherit; }
html.dark .chart-end-label { fill: #f1f5f9; }
.chart-dot { cursor: pointer; transition: r .12s; }
.chart-dot:hover, .chart-dot:focus { r: 6.5; outline: none; }
.chart-empty { display: flex; align-items: center; justify-content: center; gap: 8px; height: 120px; color: #94a3b8; font-size: .8125rem; }

/* ── Dashboard stat tiles with trend ──────────────────────────────────────── */
.dash-chart-card { padding: 18px 20px; }
.dash-chart-title { font-size: .85rem; font-weight: 700; color: #1e293b; margin-bottom: 2px; }
html.dark .dash-chart-title { color: #f1f5f9; }
.dash-chart-sub { font-size: .75rem; color: #94a3b8; margin-bottom: 12px; }
