/* Portal page dark mode — pairs with scoped light-only page styles in router.js */

html[data-theme="dark"] .page-title {
    color: #d4e6d4 !important;
}

html[data-theme="dark"] .page-sub,
html[data-theme="dark"] .kb-meta {
    color: var(--camp-text-muted) !important;
}

/* ── Shared surfaces (white cards → dark surfaces) ─────────────────────── */
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .quick-action,
html[data-theme="dark"] .group-card,
html[data-theme="dark"] .register-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .stat-pill,
html[data-theme="dark"] .composer,
html[data-theme="dark"] .ann-card,
html[data-theme="dark"] .my-task-card,
html[data-theme="dark"] .my-task-empty,
html[data-theme="dark"] .task-panel,
html[data-theme="dark"] .task-card,
html[data-theme="dark"] .yg-card,
html[data-theme="dark"] .yg-stat,
html[data-theme="dark"] .yg-att-card,
html[data-theme="dark"] .yg-sched-item,
html[data-theme="dark"] .widget-picker-item,
html[data-theme="dark"] .url-box,
html[data-theme="dark"] .leader-picker,
html[data-theme="dark"] .leader-pick-row,
html[data-theme="dark"] .search-result-card,
html[data-theme="dark"] .audit-row,
html[data-theme="dark"] .con-card,
html[data-theme="dark"] .ag-card,
html[data-theme="dark"] .sched-card,
html[data-theme="dark"] .permit-card,
html[data-theme="dark"] .visitor-card,
html[data-theme="dark"] .minibus-card,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .qr-scan-card {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .info-card-header,
html[data-theme="dark"] .yg-card-header,
html[data-theme="dark"] .child-row,
html[data-theme="dark"] .summary-stat,
html[data-theme="dark"] .log-row {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .info-card-header {
    background: var(--camp-surface-raised);
    color: var(--camp-text);
}

/* ── Dashboard ─────────────────────────────────────────────────────────── */
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .stat-sub,
html[data-theme="dark"] .stat-detail,
html[data-theme="dark"] .dashboard-layout-hint,
html[data-theme="dark"] .quick-actions-toolbar p,
html[data-theme="dark"] .yg-toolbar-hint {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .stat-num {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .qa-label,
html[data-theme="dark"] .log-action,
html[data-theme="dark"] .widget-picker-body h6 {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .qa-sub,
html[data-theme="dark"] .log-meta,
html[data-theme="dark"] .widget-picker-body p {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .quick-action:hover {
    background: var(--camp-surface-raised) !important;
    border-color: rgba(106, 179, 86, 0.45) !important;
}

html[data-theme="dark"] .quick-action .bi-chevron-right {
    color: rgba(255, 255, 255, 0.35);
}

html[data-theme="dark"] .session-pill,
html[data-theme="dark"] .mini-bar,
html[data-theme="dark"] .yg-mini-bar,
html[data-theme="dark"] .att-progress,
html[data-theme="dark"] .summary-progress,
html[data-theme="dark"] .coverage-bar {
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .btn-customize-dash,
html[data-theme="dark"] .btn-customize-qa,
html[data-theme="dark"] .btn-yg-custom,
html[data-theme="dark"] .widget-picker-toggle,
html[data-theme="dark"] .widget-move-btn {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5d4c5 !important;
}

html[data-theme="dark"] .btn-customize-dash:hover,
html[data-theme="dark"] .btn-customize-qa:hover,
html[data-theme="dark"] .btn-yg-custom:hover,
html[data-theme="dark"] .widget-move-btn:hover:not(:disabled) {
    background: rgba(106, 179, 86, 0.12) !important;
    color: #d4e6d4 !important;
}

html[data-theme="dark"] .widget-picker-item {
    background: var(--camp-surface) !important;
}

html[data-theme="dark"] .widget-picker-item.is-visible {
    background: rgba(106, 179, 86, 0.1) !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .widget-picker-icon {
    background: rgba(106, 179, 86, 0.15) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .widget-hide-btn,
html[data-theme="dark"] .widget-drag-handle,
html[data-theme="dark"] .yg-drag-handle {
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .widget-hide-btn:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
}

html[data-theme="dark"] .camp-search-widget input {
    background: var(--camp-input-bg);
    border-color: var(--camp-input-border);
    color: var(--camp-text);
}

html[data-theme="dark"] .dash-task-notice {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.35);
    color: #bfdbfe;
}

html[data-theme="dark"] .dash-task-notice:hover {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
}

html[data-theme="dark"] .dash-offline-notice,
html[data-theme="dark"] .task-alert,
html[data-theme="dark"] .att-offline-badge,
html[data-theme="dark"] .activity-req-banner {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .alert-card.alert-danger-soft {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

html[data-theme="dark"] .alert-card.alert-amber-soft {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

html[data-theme="dark"] .alert-card.alert-success-soft {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
}

html[data-theme="dark"] .alert-card h6,
html[data-theme="dark"] .alert-card p {
    color: inherit;
}

/* Icon chips — keep hue, soften bg */
html[data-theme="dark"] .ic-green  { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
html[data-theme="dark"] .ic-blue   { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
html[data-theme="dark"] .ic-amber  { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
html[data-theme="dark"] .ic-red    { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
html[data-theme="dark"] .ic-slate  { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
html[data-theme="dark"] .ic-purple { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }

/* ── Tab bars (manage children, consolidation, etc.) ───────────────────── */
html[data-theme="dark"] .type-tabs,
html[data-theme="dark"] .section-tabs-wrap {
    background: var(--camp-surface) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .type-tab {
    color: var(--camp-text-muted) !important;
    background: transparent !important;
}

html[data-theme="dark"] .type-tab:hover {
    background: rgba(106, 179, 86, 0.08) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .type-tab.active {
    color: #a3d98a !important;
    border-bottom-color: #6ab356 !important;
    background: rgba(106, 179, 86, 0.1) !important;
}

html[data-theme="dark"] .section-tab {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .section-tab:hover {
    background: rgba(106, 179, 86, 0.1) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .section-tab.active {
    background: #437037 !important;
    border-color: #437037 !important;
    color: #fff !important;
}

/* ── Tables ────────────────────────────────────────────────────────────── */
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .section-divider td,
html[data-theme="dark"] .group-divider {
    background: var(--camp-surface-raised) !important;
    color: #c5e6b8 !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .table tbody tr {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .table tbody tr:hover {
    background: rgba(106, 179, 86, 0.06) !important;
}

html[data-theme="dark"] .sd-label {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .sd-count,
html[data-theme="dark"] .bulk-lbl {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .bulk-chip {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5d4c5 !important;
}

html[data-theme="dark"] .bulk-chip:hover:not(.active) {
    border-color: rgba(106, 179, 86, 0.45) !important;
    color: #d4e6d4 !important;
}

html[data-theme="dark"] .bulk-chip.active {
    background: #437037 !important;
    border-color: #437037 !important;
    color: #fff !important;
}

html[data-theme="dark"] .bulk-chip.chip-all:not(.active) {
    background: rgba(106, 179, 86, 0.12) !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .bulk-chip.chip-none:not(.active) {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .bulk-sep {
    background: var(--camp-border);
}

html[data-theme="dark"] .search-wrap input,
html[data-theme="dark"] .offsite-input,
html[data-theme="dark"] .camp-status-select,
html[data-theme="dark"] .yg-search,
html[data-theme="dark"] .composer textarea {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .search-wrap input:focus,
html[data-theme="dark"] .composer textarea:focus {
    background: #252e25 !important;
    border-color: rgba(106, 179, 86, 0.55) !important;
}

html[data-theme="dark"] .search-wrap .bi-search {
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .attendance-chip {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5d4c5 !important;
}

/* ── Attendance hub ────────────────────────────────────────────────────── */
html[data-theme="dark"] .att-card-title,
html[data-theme="dark"] .child-name,
html[data-theme="dark"] .yg-person-name,
html[data-theme="dark"] .yg-sched-act,
html[data-theme="dark"] .yg-att-title {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .att-card-sub,
html[data-theme="dark"] .att-count .total-num,
html[data-theme="dark"] .att-count .count-label,
html[data-theme="dark"] .slot-label,
html[data-theme="dark"] .att-sync-banner,
html[data-theme="dark"] .yg-person-sub,
html[data-theme="dark"] .yg-att-time,
html[data-theme="dark"] .yg-sched-count,
html[data-theme="dark"] .med-note,
html[data-theme="dark"] .med-legend {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .att-count .present-num {
    color: #a3d98a !important;
}

html[data-theme="dark"] .att-card-leader,
html[data-theme="dark"] .yg-att-day,
html[data-theme="dark"] .yg-sched-time,
html[data-theme="dark"] .yg-sched-day {
    color: #8bc77a !important;
}

html[data-theme="dark"] .att-card.complete {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(52, 211, 153, 0.35) !important;
}

html[data-theme="dark"] .present-label,
html[data-theme="dark"] .btn-view,
html[data-theme="dark"] .btn-mark-none {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .btn-mark-all {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(52, 211, 153, 0.45) !important;
    color: #6ee7b7 !important;
}

html[data-theme="dark"] .att-sync-status {
    background: var(--camp-surface-raised);
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .att-sync-ok { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
html[data-theme="dark"] .att-sync-syncing { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
html[data-theme="dark"] .att-sync-offline,
html[data-theme="dark"] .att-sync-pending { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
html[data-theme="dark"] .att-sync-error { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
html[data-theme="dark"] .att-sync-cache { background: var(--camp-surface-raised); color: var(--camp-text-muted); }

/* ── Your Group ───────────────────────────────────────────────────────── */
html[data-theme="dark"] .yg-section-toggle,
html[data-theme="dark"] .yg-section-filter,
html[data-theme="dark"] .yg-jump-btn,
html[data-theme="dark"] .yg-quick-link {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border);
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .yg-section-toggle:hover,
html[data-theme="dark"] .yg-jump-btn:hover,
html[data-theme="dark"] .yg-quick-link:hover {
    background: rgba(106, 179, 86, 0.1);
    color: #c5e6b8;
}

html[data-theme="dark"] .yg-person {
    border-color: var(--camp-border);
}

html[data-theme="dark"] .yg-person:hover {
    background: rgba(106, 179, 86, 0.06);
}

html[data-theme="dark"] .yg-empty {
    color: var(--camp-text-muted);
}

/* ── Announcements ───────────────────────────────────────────────────── */
html[data-theme="dark"] .composer h6 {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .ann-card {
    border-left-color: transparent;
}

html[data-theme="dark"] .ann-card.is-pinned {
    border-left-color: #6ab356 !important;
    background: rgba(106, 179, 86, 0.08) !important;
}

html[data-theme="dark"] .ann-body {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .ann-meta,
html[data-theme="dark"] .char-count,
html[data-theme="dark"] .pin-toggle {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .ann-empty {
    color: var(--camp-text-muted);
}

/* ── My Tasks / Task Assigner ─────────────────────────────────────────── */
html[data-theme="dark"] .my-task-title,
html[data-theme="dark"] .task-card-title {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .my-task-desc,
html[data-theme="dark"] .task-card-desc,
html[data-theme="dark"] .my-task-meta,
html[data-theme="dark"] .task-meta {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .my-task-card.st-pending {
    background: rgba(245, 158, 11, 0.08) !important;
}

html[data-theme="dark"] .coworker-chip,
html[data-theme="dark"] .assignee-chip {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .btn-task-muted,
html[data-theme="dark"] .leader-picker-btn {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .leader-pick-name {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .leader-pick-meta,
html[data-theme="dark"] .leader-picker-stats,
html[data-theme="dark"] .task-empty {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .leader-selected-bar,
html[data-theme="dark"] .leader-selected-chip {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border);
    color: var(--camp-text);
}

html[data-theme="dark"] .leader-group-head {
    background: var(--camp-surface-raised);
    color: #c5e6b8;
}

/* ── Manage URLs & misc admin ─────────────────────────────────────────── */
html[data-theme="dark"] .leader-zone {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
}

html[data-theme="dark"] .section-zone,
html[data-theme="dark"] .field-card,
html[data-theme="dark"] .url-box-missing {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .url-btn-copy {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border);
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .url-btn-copy:hover {
    border-color: rgba(106, 179, 86, 0.45);
    color: #a3d98a;
}

/* ── Login (right panel) ───────────────────────────────────────────────── */
html[data-theme="dark"] .login-right {
    background: var(--camp-bg-muted) !important;
}

html[data-theme="dark"] .login-form-heading h2 {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .login-form-heading p,
html[data-theme="dark"] .login-field label,
html[data-theme="dark"] .login-back,
html[data-theme="dark"] .login-already-card p {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .login-field .form-control,
html[data-theme="dark"] .login-already-card,
html[data-theme="dark"] .otp-input {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .login-step.inactive .step-label {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .login-step.active .step-label {
    color: #a3d98a !important;
}

html[data-theme="dark"] .login-step.done .step-num {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
}

html[data-theme="dark"] .login-step.inactive .step-num {
    background: var(--camp-surface-raised) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .login-step-connector {
    background: var(--camp-border) !important;
}

html[data-theme="dark"] .tfa-hint {
    background: rgba(106, 179, 86, 0.1);
    color: #c5d4c5;
}

/* ── Status / permission badges (keep readable hues) ───────────────────── */
html[data-theme="dark"] .perm-photo-yes,
html[data-theme="dark"] .status-on_camp,
html[data-theme="dark"] .camp-on_camp,
html[data-theme="dark"] .permit-ok { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
html[data-theme="dark"] .perm-photo-no,
html[data-theme="dark"] .status-departed,
html[data-theme="dark"] .status-off_site,
html[data-theme="dark"] .camp-departed,
html[data-theme="dark"] .permit-no { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
html[data-theme="dark"] .perm-shoot-yes,
html[data-theme="dark"] .permit-warn,
html[data-theme="dark"] .slot-chip--section { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
html[data-theme="dark"] .perm-shoot-no,
html[data-theme="dark"] .status-not_arrived,
html[data-theme="dark"] .camp-not_arrived { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
html[data-theme="dark"] .badge-group,
html[data-theme="dark"] .slot-chip--all { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
html[data-theme="dark"] .badge-activity { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }

/* ── Bootstrap nav tabs (if used) ──────────────────────────────────────── */
html[data-theme="dark"] .nav-tabs {
    border-color: var(--camp-border);
}

html[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--camp-text-muted);
    border-color: transparent;
}

html[data-theme="dark"] .nav-tabs .nav-link:hover {
    color: var(--camp-text);
    border-color: var(--camp-border);
}

html[data-theme="dark"] .nav-tabs .nav-link.active {
    background: var(--camp-surface);
    color: var(--camp-text);
    border-color: var(--camp-border) var(--camp-border) var(--camp-surface);
}

html[data-theme="dark"] .tab-content {
    color: var(--camp-text);
}

/* ── Accordion ─────────────────────────────────────────────────────────── */
html[data-theme="dark"] .accordion-item {
    background: var(--camp-surface);
    border-color: var(--camp-border);
    color: var(--camp-text);
}

html[data-theme="dark"] .accordion-button {
    background: var(--camp-surface-raised);
    color: var(--camp-text);
}

html[data-theme="dark"] .accordion-button:not(.collapsed) {
    background: rgba(106, 179, 86, 0.12);
    color: #d4e6d4;
}

html[data-theme="dark"] .accordion-body {
    background: var(--camp-surface);
    color: var(--camp-text-muted);
}

/* ── View QR / search empty states ─────────────────────────────────────── */
html[data-theme="dark"] .scan-empty,
html[data-theme="dark"] .no-results,
html[data-theme="dark"] .empty-state {
    color: var(--camp-text-muted);
}

/* ── Page tab bar (active link contrast) ───────────────────────────────── */
html[data-theme="dark"] .page-tab__link:hover,
html[data-theme="dark"] .page-tab__link:focus,
html[data-theme="dark"] .page-tab--active .page-tab__link {
    color: #e8ece8 !important;
}

html[data-theme="dark"] .page-tab--active {
    background: var(--camp-surface-raised) !important;
}

/* ── Offsite / danger bars ─────────────────────────────────────────────── */
html[data-theme="dark"] .offsite-bar {
    background: rgba(239, 68, 68, 0.1) !important;
}

html[data-theme="dark"] .offsite-detail,
html[data-theme="dark"] .offsite-since {
    color: #fca5a5 !important;
}

/* ── Registration form (public) ──────────────────────────────────────── */
html[data-theme="dark"] .reg-container {
    background: var(--camp-surface) !important;
}

html[data-theme="dark"] .section-header,
html[data-theme="dark"] .consent-box,
html[data-theme="dark"] .swim-check-card,
html[data-theme="dark"] .medical-toggle-card {
    background: var(--camp-surface-raised) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .section-header {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .consent-box {
    color: var(--camp-text-muted) !important;
}

/* ── Camp Search ───────────────────────────────────────────────────────── */
html[data-theme="dark"] .results-meta-bar,
html[data-theme="dark"] .type-filter-chip {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .result-card,
html[data-theme="dark"] .log-card {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .result-title,
html[data-theme="dark"] .log-time,
html[data-theme="dark"] .entry-name,
html[data-theme="dark"] .match-name,
html[data-theme="dark"] .reg-option-name {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .result-sub,
html[data-theme="dark"] .log-date,
html[data-theme="dark"] .entry-norm,
html[data-theme="dark"] .entry-num,
html[data-theme="dark"] .match-id,
html[data-theme="dark"] .reg-option-id,
html[data-theme="dark"] .meta-dot {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .btn-result.btn-view,
html[data-theme="dark"] .btn-result.btn-edit,
html[data-theme="dark"] .btn-result.btn-lanyard {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .search-input-field {
    background: var(--camp-input-bg);
    border-color: var(--camp-input-border);
    color: var(--camp-text);
}

html[data-theme="dark"] .section-label {
    color: var(--camp-text-muted);
}

/* ── QR Scanner ────────────────────────────────────────────────────────── */
html[data-theme="dark"] .scanner-card,
html[data-theme="dark"] .qr-side-card {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-page-header {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-side-header {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .qr-tip,
html[data-theme="dark"] .recent-link-title {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .recent-link-sub,
html[data-theme="dark"] .recent-empty,
html[data-theme="dark"] .session-tag {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .recent-link {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border);
}

html[data-theme="dark"] .recent-link:hover {
    background: rgba(106, 179, 86, 0.1);
}

html[data-theme="dark"] .status-idle {
    background: var(--camp-surface-raised);
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .status-scanning { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
html[data-theme="dark"] .status-error { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
html[data-theme="dark"] .status-success { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
html[data-theme="dark"] .status-warning { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }

html[data-theme="dark"] .btn-scout-outline {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

/* ── Consolidation ─────────────────────────────────────────────────────── */
html[data-theme="dark"] .group-tabs-wrap,
html[data-theme="dark"] .add-panel,
html[data-theme="dark"] .entries-card,
html[data-theme="dark"] .nil-panel {
    background: var(--camp-surface) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .group-tab {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .group-tab.active {
    background: #437037 !important;
    border-color: #437037 !important;
    color: #fff !important;
}

html[data-theme="dark"] .entries-card-header {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .entry-row,
html[data-theme="dark"] .nil-row {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .entry-row:hover {
    background: rgba(106, 179, 86, 0.06);
}

html[data-theme="dark"] .stat-lbl,
html[data-theme="dark"] .stat-val,
html[data-theme="dark"] .add-panel-hint {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .stat-val {
    color: #a3d98a !important;
}

html[data-theme="dark"] .reg-search {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .reg-option:hover {
    background: rgba(106, 179, 86, 0.1);
}

html[data-theme="dark"] .nil-header {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: #fcd34d !important;
}

/* ── Activity Groups ───────────────────────────────────────────────────── */
html[data-theme="dark"] .activity-card,
html[data-theme="dark"] .master-panel,
html[data-theme="dark"] .mg-col,
html[data-theme="dark"] .mg-name-field,
html[data-theme="dark"] .inline-search-results {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .leader-panel,
html[data-theme="dark"] .mg-search-wrap {
    background: var(--camp-surface-raised) !important;
}

html[data-theme="dark"] .act-name,
html[data-theme="dark"] .child-name-text,
html[data-theme="dark"] .mg-member-name {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .act-leader,
html[data-theme="dark"] .child-section-tag,
html[data-theme="dark"] .mg-member-meta,
html[data-theme="dark"] .mg-empty-filter {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .leader-tag,
html[data-theme="dark"] .master-chip {
    background: rgba(106, 179, 86, 0.12);
    border-color: rgba(106, 179, 86, 0.25);
    color: #c5e6b8;
}

html[data-theme="dark"] .child-item {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .child-item:hover {
    background: rgba(106, 179, 86, 0.06);
}

html[data-theme="dark"] .mg-col-header {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border) !important;
    color: var(--camp-text);
}

html[data-theme="dark"] .mg-modal-body,
html[data-theme="dark"] #masterGroupModal .modal-body,
html[data-theme="dark"] .mg-modal-content .modal-body {
    background: var(--camp-bg-muted) !important;
}

html[data-theme="dark"] .mg-modal-content {
    background: var(--camp-surface) !important;
}

html[data-theme="dark"] .leader-panel.border-top {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .activity-card .border-top {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .act-card-footer [style*="color:#999"] {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .empty-slot-msg {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .mg-modal-footer {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .mg-member-item:hover {
    background: rgba(106, 179, 86, 0.08);
}

html[data-theme="dark"] .mg-member-item.selected {
    background: rgba(106, 179, 86, 0.12) !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .mg-col-header h6 {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .mg-col-header.leaders h6 {
    color: #93c5fd !important;
}

html[data-theme="dark"] .mg-count-badge {
    background: rgba(106, 179, 86, 0.15) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .mg-col-header.leaders .mg-count-badge {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .master-panel h5 {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .master-chip .counts {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .unscheduled-panel {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .unscheduled-panel h5 {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .unscheduled-item {
    border-color: var(--camp-border) !important;
    color: var(--camp-text);
}

html[data-theme="dark"] .act-card-header:hover {
    background: rgba(106, 179, 86, 0.06) !important;
}

html[data-theme="dark"] .act-card-footer {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .capacity-bar {
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .slot-time-pill {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .act-type-badge {
    background: rgba(106, 179, 86, 0.15) !important;
    color: #a3d98a !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .section-badge {
    background: rgba(14, 165, 233, 0.15) !important;
    color: #7dd3fc !important;
}

html[data-theme="dark"] .btn-swap:not(.active):not(.cancel) {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .btn-move:not(.active):not(.cancel) {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .btn-schedule,
html[data-theme="dark"] .btn-add-inline:not(.leader),
html[data-theme="dark"] .btn-toggle-add.yp,
html[data-theme="dark"] .btn-add-child {
    background: rgba(106, 179, 86, 0.12) !important;
    border-color: rgba(106, 179, 86, 0.4) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .btn-remove,
html[data-theme="dark"] .btn-swap.cancel,
html[data-theme="dark"] .btn-move.cancel {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .btn-view-sm {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .btn-view-sm:hover {
    border-color: rgba(106, 179, 86, 0.45) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .btn-add-inline.leader,
html[data-theme="dark"] .btn-toggle-add.leader {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .child-item.swap-selected {
    background: rgba(245, 158, 11, 0.15) !important;
}

html[data-theme="dark"] .child-item.move-selected {
    background: rgba(59, 130, 246, 0.15) !important;
}

html[data-theme="dark"] .mode-bar {
    background: var(--camp-surface) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .mode-bar p {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .mode-bar .cancel-mode {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .add-result-item {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .add-result-item:hover {
    background: rgba(106, 179, 86, 0.08) !important;
}

html[data-theme="dark"] .add-result-name {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .add-result-meta,
html[data-theme="dark"] .add-search-empty {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .inline-search-input input {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .mg-search-wrap input {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .stat-pill .num {
    color: #a3d98a !important;
}

html[data-theme="dark"] .stat-pill .lbl,
html[data-theme="dark"] .stat-pill small {
    color: var(--camp-text-muted) !important;
}

/* Activity Groups — inline legend & labels */
html[data-theme="dark"] .main-content .d-flex[style*="color:#888"] {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .main-content .slot-label [style*="color:#999"] {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .main-content [style*="background:#fef3c7"][style*="color:#92400e"] {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fcd34d !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
}

html[data-theme="dark"] .main-content [style*="background:#dbeafe"][style*="color:#1e40af"] {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
}

html[data-theme="dark"] .main-content [style*="background:#d1fae5"][style*="color:#065f46"] {
    background: rgba(106, 179, 86, 0.15) !important;
    color: #a3d98a !important;
    border-color: rgba(106, 179, 86, 0.4) !important;
}

html[data-theme="dark"] .main-content [style*="background:#ede9fe"][style*="color:#5b21b6"] {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #c4b5fd !important;
    border-color: rgba(167, 139, 250, 0.4) !important;
}

html[data-theme="dark"] .child-list.border-top {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .main-content > .d-flex.border-bottom[style*="border-color:#dce6dc"] {
    border-color: var(--camp-border) !important;
}

/* ── My Section (sh-* mirrors your-group) ──────────────────────────────── */
html[data-theme="dark"] .sh-card,
html[data-theme="dark"] .sh-stat,
html[data-theme="dark"] .sh-att-card,
html[data-theme="dark"] .sh-sched-item {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .sh-card-header {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border) !important;
    color: var(--camp-text);
}

html[data-theme="dark"] .sh-person-name,
html[data-theme="dark"] .sh-sched-act,
html[data-theme="dark"] .sh-att-title {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .sh-person-sub,
html[data-theme="dark"] .sh-att-time,
html[data-theme="dark"] .sh-sched-kids,
html[data-theme="dark"] .sh-empty {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .sh-att-day,
html[data-theme="dark"] .sh-sched-day {
    color: #8bc77a !important;
}

html[data-theme="dark"] .sh-search,
html[data-theme="dark"] .sh-presence-filter,
html[data-theme="dark"] .sh-quick-link,
html[data-theme="dark"] .sh-presence-pill {
    background: var(--camp-surface-raised);
    border-color: var(--camp-border);
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .sh-mini-bar {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .session-pill {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .widget-picker-level {
    background: rgba(106, 179, 86, 0.15);
    color: #a3d98a;
}

html[data-theme="dark"] .summary-body {
    background: var(--camp-surface);
    color: var(--camp-text);
}

html[data-theme="dark"] .btn-decline {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .pin-toggle {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .char-count {
    color: var(--camp-text-muted) !important;
}

/* ── Darker navbar & sidebar in dark mode ──────────────────────────────── */
html[data-theme="dark"] .site-navbar,
html[data-theme="dark"] body.logged-in .site-navbar,
html[data-theme="dark"] .site-navbar.scrolled {
    background: rgba(8, 12, 7, 0.98) !important;
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.45) !important;
}

@media (max-width: 767.98px) {
    html[data-theme="dark"] .site-navbar {
        background: rgba(8, 12, 7, 0.98) !important;
    }

    html[data-theme="dark"] .site-navbar .nav-mobile-menu {
        background: rgba(6, 10, 6, 0.99);
    }
}

html[data-theme="dark"] .sidebar {
    background:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(106, 179, 86, 0.05) 0%, transparent 60%),
        linear-gradient(180deg, #121a10 0%, #0c120b 55%, #080d07 100%) !important;
}

/* ── Global form overrides (!important pages e.g. parking permits) ─────── */
html[data-theme="dark"] .main-content .form-label,
html[data-theme="dark"] .form-label {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .main-content .form-control,
html[data-theme="dark"] .main-content .form-select,
html[data-theme="dark"] .main-content textarea.form-control,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea.form-control {
    background-color: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .main-content .form-control:focus,
html[data-theme="dark"] .main-content .form-select:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    background-color: #252e25 !important;
    border-color: rgba(106, 179, 86, 0.55) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .input-locked {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .input-locked {
    background-color: var(--camp-surface-raised) !important;
}

html[data-theme="dark"] .table td {
    color: var(--camp-text);
}

/* ── Task assigner ─────────────────────────────────────────────────────── */
html[data-theme="dark"] .task-panel h6,
html[data-theme="dark"] .task-field label {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .task-field input,
html[data-theme="dark"] .task-field textarea,
html[data-theme="dark"] .leader-search-wrap input {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .leader-picker-toolbar {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .leader-picker-stats {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .leader-picker-stats strong {
    color: #a3d98a !important;
}

html[data-theme="dark"] .leader-selected-bar {
    background: rgba(106, 179, 86, 0.1) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .leader-pick-wrap {
    background: var(--camp-bg-muted) !important;
}

html[data-theme="dark"] .leader-group-head {
    background: var(--camp-surface-raised) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .leader-group-head button {
    color: #8bc77a !important;
}

html[data-theme="dark"] .leader-pick-row:hover {
    background: rgba(106, 179, 86, 0.08) !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .leader-pick-row.is-selected {
    border-color: rgba(106, 179, 86, 0.55) !important;
    background: rgba(106, 179, 86, 0.12) !important;
}

/* ── Manage leaders — attendance tags (unselected readable text) ───────── */
html[data-theme="dark"] .att-chip,
html[data-theme="dark"] .attendance-chip,
html[data-theme="dark"] .bulk-chip:not(.active) {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5d4c5 !important;
}

html[data-theme="dark"] .bulk-chip:hover:not(.active) {
    border-color: rgba(106, 179, 86, 0.45) !important;
    color: #d4e6d4 !important;
}

html[data-theme="dark"] input[type=checkbox].att-check:checked + .att-chip,
html[data-theme="dark"] input[type=checkbox].attendance-check:checked + .attendance-chip,
html[data-theme="dark"] .bulk-chip.active {
    background: #437037 !important;
    border-color: #437037 !important;
    color: #fff !important;
}

html[data-theme="dark"] .bulk-att-label,
html[data-theme="dark"] .section-count {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .section-divider {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .section-divider-label {
    color: #a3d98a !important;
}

/* ── Parking permits type tabs & signature pad ───────────────────────── */
html[data-theme="dark"] .signature-container {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .main-content .type-tab:not(.active) {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5d4c5 !important;
}

html[data-theme="dark"] .main-content .type-tab.active {
    background: #437037 !important;
    border-color: #437037 !important;
    color: #fff !important;
}

/* ── QR profiles (full page) ─────────────────────────────────────────────── */
html[data-theme="dark"] .qr-section {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-section-head {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-section-title {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .qr-field-label {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .qr-field-value {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .qr-field-value--empty {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .qr-field {
    background: var(--camp-bg-muted) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-section-badge {
    background: rgba(106, 179, 86, 0.15);
    color: #a3d98a;
}

html[data-theme="dark"] .qr-locked h5 {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .qr-locked p {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .qr-emergency-contact {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-emergency {
    background: var(--camp-surface) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
}

html[data-theme="dark"] .qr-emergency-head {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    border-bottom-color: rgba(248, 113, 113, 0.25) !important;
}

html[data-theme="dark"] .qr-emergency-note {
    background: var(--camp-bg-muted) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .qr-schedule-day {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-schedule-day-title {
    color: #a3d98a !important;
    border-bottom-color: var(--camp-border) !important;
}

html[data-theme="dark"] .qr-schedule-day-title--adult {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .qr-slot {
    border-left-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .qr-slot--adult {
    border-left-color: rgba(148, 163, 184, 0.35) !important;
}

html[data-theme="dark"] .qr-slot::before {
    border-color: var(--camp-surface-raised) !important;
}

html[data-theme="dark"] .qr-slot-time {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .qr-slot-name {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .qr-slot-tag {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .qr-slot-tag--loc {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
}

html[data-theme="dark"] .qr-slot-tag--grp {
    background: rgba(106, 179, 86, 0.18) !important;
    color: #a3d98a !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .qr-glv-sub {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .qr-empty-state {
    color: var(--camp-text-muted) !important;
}

/* ── Audit log ─────────────────────────────────────────────────────────── */
html[data-theme="dark"] .stat-pill .num {
    color: #a3d98a !important;
}

html[data-theme="dark"] .stat-pill .lbl {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .action-default {
    background: rgba(106, 179, 86, 0.15);
    color: #a3d98a;
}

html[data-theme="dark"] .action-view {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

/* ── Edit pages (leaders & children) ─────────────────────────────────────── */
html[data-theme="dark"] .edit-card {
    background: var(--camp-surface) !important;
}

html[data-theme="dark"] .edit-card-body {
    background: var(--camp-surface);
    color: var(--camp-text);
}

html[data-theme="dark"] .edit-card .section-header {
    background: var(--camp-surface-raised) !important;
    color: #c5e6b8 !important;
    border-left-color: #6ab356 !important;
}

html[data-theme="dark"] .section-header-shooting {
    background: rgba(122, 59, 30, 0.15) !important;
    color: #fcd34d !important;
    border-left-color: #d97706 !important;
}

html[data-theme="dark"] .field-card,
html[data-theme="dark"] .twofa-card,
html[data-theme="dark"] .medical-toggle-card,
html[data-theme="dark"] .shooting-type-card {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: var(--camp-text-muted);
}

html[data-theme="dark"] .twofa-card h6 {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .swim-check-card:has(input:checked) {
    background: rgba(106, 179, 86, 0.12) !important;
    border-color: rgba(106, 179, 86, 0.45) !important;
}

/* ── Your Group & My Section — lighten panel text ──────────────────────── */
html[data-theme="dark"] .yg-card-header,
html[data-theme="dark"] .sh-card-header {
    color: #d4e6d4 !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .yg-stat .num,
html[data-theme="dark"] .sh-stat .num {
    color: #a3d98a !important;
}

html[data-theme="dark"] .yg-stat .lbl,
html[data-theme="dark"] .sh-stat .lbl {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .yg-section-toggle {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .yg-section-toggle:hover {
    background: rgba(106, 179, 86, 0.1) !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .yg-section-chevron {
    color: #8bc77a !important;
}

html[data-theme="dark"] .yg-section-filter {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5d4c5 !important;
}

html[data-theme="dark"] .yg-section-filter.active {
    background: #437037 !important;
    border-color: #437037 !important;
    color: #fff !important;
}

html[data-theme="dark"] .yg-hide-btn,
html[data-theme="dark"] .yg-move-btn {
    background: var(--camp-surface-raised) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .yg-sched-kids {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .sh-presence-summary {
    color: var(--camp-text-muted);
}

/* ── Dashboard widget inline text (announcements, access level, etc.) ── */
html[data-theme="dark"] .info-card-body [style*="border-bottom:1px solid #f0f3f0"],
html[data-theme="dark"] .info-card-body [style*="border-bottom: 1px solid #f0f3f0"],
html[data-theme="dark"] .dash-task-row {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .info-card-body [style*="color:#888"],
html[data-theme="dark"] .info-card-body [style*="color:#aaa"],
html[data-theme="dark"] .info-card-body [style*="color:#bbb"],
html[data-theme="dark"] .info-card-body [style*="color: #888"],
html[data-theme="dark"] .info-card-body [style*="color: #aaa"],
html[data-theme="dark"] .info-card-body [style*="color: #bbb"],
html[data-theme="dark"] .info-card-body [style*="color:#64748b"] {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .info-card-body [style*="color:#1a1a1a"],
html[data-theme="dark"] .info-card-body [style*="color:#333"],
html[data-theme="dark"] .info-card-body [style*="color:#444"],
html[data-theme="dark"] .info-card-body [style*="color:#1e293b"],
html[data-theme="dark"] .info-card-body [style*="color: #1a1a1a"],
html[data-theme="dark"] .info-card-body [style*="color: #333"],
html[data-theme="dark"] .info-card-body [style*="color: #444"],
html[data-theme="dark"] .info-card-body [style*="color: #1e293b"] {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .info-card-body [style*="color:#2d4d27"] {
    color: #a3d98a !important;
}

html[data-theme="dark"] .info-card-body .bg-light,
html[data-theme="dark"] .info-card-body [style*="border:1.5px solid #dce6dc"] {
    background: rgba(106, 179, 86, 0.12) !important;
    border-color: rgba(106, 179, 86, 0.35) !important;
}

html[data-theme="dark"] .info-card-body [style*="opacity:0.45"] {
    opacity: 0.78 !important;
}

html[data-theme="dark"] .info-card-body [style*="-webkit-mask-image"] {
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent) !important;
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .info-card-header i[style*="color:#437037"],
html[data-theme="dark"] .info-card-header a[style*="color:#437037"] {
    color: #8bc77a !important;
}

/* ── Audit log action badges & table ───────────────────────────────────── */
html[data-theme="dark"] .action-danger {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .action-warn {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .action-create {
    background: rgba(106, 179, 86, 0.18) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .action-edit {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .table thead th {
    background: var(--camp-surface-raised) !important;
    color: #c5e6b8 !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .table tbody tr:hover {
    background: rgba(106, 179, 86, 0.06) !important;
}

/* ── Your Group extras ─────────────────────────────────────────────────── */
html[data-theme="dark"] .yg-group-picker label {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .yg-group-picker select {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .yg-jump-btn {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5d4c5 !important;
}

html[data-theme="dark"] .yg-jump-btn:hover,
html[data-theme="dark"] .yg-jump-btn.active {
    background: #437037 !important;
    border-color: #437037 !important;
    color: #fff !important;
}

html[data-theme="dark"] .yg-drag-handle {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .yg-drag-handle:hover {
    color: #8bc77a !important;
    background: rgba(106, 179, 86, 0.1) !important;
}

/* ── Dashboard pinned / YOU badges (inline styles) ─────────────────────── */
html[data-theme="dark"] .info-card-body [style*="background:#d1fae5"],
html[data-theme="dark"] .info-card-body [style*="background: #d1fae5"] {
    background: rgba(106, 179, 86, 0.18) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .info-card-body [style*="color:#065f46"],
html[data-theme="dark"] .info-card-body [style*="color: #065f46"] {
    color: #a3d98a !important;
}

html[data-theme="dark"] .leader-selected-chip {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
    color: #c5e6b8 !important;
}

/* ── Details Manager ───────────────────────────────────────────────────── */
html[data-theme="dark"] .manager-card {
    background: var(--camp-surface) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .manager-card .nav-tabs {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .manager-card .nav-tabs .nav-link {
    color: var(--camp-text-muted) !important;
    background: transparent !important;
}

html[data-theme="dark"] .manager-card .nav-tabs .nav-link:hover {
    background: rgba(106, 179, 86, 0.1) !important;
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .manager-card .nav-tabs .nav-link.active {
    background: var(--camp-surface) !important;
    color: var(--camp-text) !important;
    border-color: var(--camp-border) var(--camp-border) var(--camp-surface) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .manager-card .tab-content {
    background: var(--camp-surface);
    color: var(--camp-text);
}

html[data-theme="dark"] .add-zone,
html[data-theme="dark"] .block-form-card {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .add-zone h6,
html[data-theme="dark"] .manager-card .block-form-card h6 {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .section-checklist {
    background: var(--camp-bg-muted) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .section-checklist .form-check-label {
    color: var(--camp-text);
}

html[data-theme="dark"] .slot-entry {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .slot-entry-header input[type=time],
html[data-theme="dark"] .slot-entry-header select {
    background: var(--camp-input-bg) !important;
    border-color: var(--camp-input-border) !important;
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .slot-entry-body {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .slot-remove {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .slot-remove:hover {
    background: #b91c1c !important;
    color: #fff !important;
}

html[data-theme="dark"] .sess-day-card {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .sess-day-header {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .sess-day-name {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .sess-slot-row {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .sess-slot-time {
    color: var(--camp-text) !important;
}

html[data-theme="dark"] .slot-label {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .btn-edit {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .btn-edit:hover {
    background: #1e40af !important;
    color: #fff !important;
    border-color: #1e40af !important;
}

html[data-theme="dark"] .btn-del {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .btn-del:hover {
    background: #b91c1c !important;
    color: #fff !important;
    border-color: #b91c1c !important;
}

/* Requirement toggles — unchecked readable */
html[data-theme="dark"] .req-swim:not(:has(input:checked)) {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .req-gun:not(:has(input:checked)) {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .req-swim:has(input:checked) {
    background: #1e40af !important;
    color: #fff !important;
    border-color: #1e40af !important;
}

html[data-theme="dark"] .req-gun:has(input:checked) {
    background: #d97706 !important;
    color: #fff !important;
    border-color: #d97706 !important;
}

/* Activity / slot badges */
html[data-theme="dark"] .type-water {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .type-high-ropes {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .type-low-ropes {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .type-land {
    background: rgba(106, 179, 86, 0.18) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .slot-badge {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #c4b5fd !important;
}

html[data-theme="dark"] .slot-activity {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .slot-custom {
    background: rgba(148, 163, 184, 0.18) !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .reg-badge {
    background: rgba(106, 179, 86, 0.18) !important;
    color: #a3d98a !important;
}

html[data-theme="dark"] .noreg-badge {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
}

html[data-theme="dark"] .section-pill {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #c4b5fd !important;
}

html[data-theme="dark"] .all-sections-pill {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
}

/* Details Manager — inline style overrides */
html[data-theme="dark"] .manager-card [style*="color:#2d4d27"],
html[data-theme="dark"] .manager-card [style*="color: #2d4d27"] {
    color: #c5e6b8 !important;
}

html[data-theme="dark"] .manager-card [style*="color:#888"],
html[data-theme="dark"] .manager-card [style*="color: #888"],
html[data-theme="dark"] .manager-card [style*="color:#666"],
html[data-theme="dark"] .manager-card [style*="color: #666"],
html[data-theme="dark"] .manager-card [style*="color:#555"],
html[data-theme="dark"] .manager-card [style*="color: #555"],
html[data-theme="dark"] .manager-card [style*="color:#aaa"],
html[data-theme="dark"] .manager-card [style*="color: #aaa"],
html[data-theme="dark"] .manager-card [style*="color:#bbb"],
html[data-theme="dark"] .manager-card [style*="color: #bbb"] {
    color: var(--camp-text-muted) !important;
}

html[data-theme="dark"] .manager-card [style*="background:#fafcfa"],
html[data-theme="dark"] .manager-card [style*="background: #fafcfa"],
html[data-theme="dark"] .manager-card [style*="background:#f9faf9"],
html[data-theme="dark"] .manager-card [style*="background: #f9faf9"] {
    background: var(--camp-bg-muted) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .manager-card [style*="background:white"],
html[data-theme="dark"] .manager-card [style*="background: white"],
html[data-theme="dark"] .manager-card [style*="background:#fff"],
html[data-theme="dark"] .manager-card [style*="background: #fff"] {
    background: var(--camp-surface) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .manager-card [style*="linear-gradient(135deg,#f4f7f4,#edf2ed)"],
html[data-theme="dark"] .manager-card [style*="linear-gradient(135deg, #f4f7f4, #edf2ed)"] {
    background: var(--camp-surface-raised) !important;
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .manager-card [style*="border:1.5px solid #e5eae5"],
html[data-theme="dark"] .manager-card [style*="border-right:1px solid #f0f3f0"],
html[data-theme="dark"] .manager-card [style*="border-bottom:1px solid #e5eae5"] {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .manager-card [style*="background:#fef3c7"],
html[data-theme="dark"] .manager-card [style*="background: #fef3c7"] {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .manager-card [style*="background:#e5eae5"] {
    background: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .manager-card [style*="background:#dbeafe"] {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .manager-card [style*="background:#fef3c7"][style*="color:#92400e"],
html[data-theme="dark"] .manager-card .badge[style*="background:#fef3c7"] {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .manager-card .badge[style*="background:#dbeafe"] {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .main-content > .border-bottom[style*="border-color:#dce6dc"] {
    border-color: var(--camp-border) !important;
}

html[data-theme="dark"] .main-content > .d-flex .badge[style*="background:#fee2e2"] {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

html[data-theme="dark"] .manager-card code {
    color: #a3d98a;
    background: rgba(106, 179, 86, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
}
