/* UKMB shared theme system. Loaded after page styles so the selected palette is authoritative. */
:root {
    --ukmb-theme-page: #f2f0e7; --ukmb-theme-surface: #fffdf7; --ukmb-theme-surface-soft: #eaf0e9;
    --ukmb-theme-border: #d8d7c9; --ukmb-theme-ink: #173f38; --ukmb-theme-muted: #62766e;
    --ukmb-theme-heading: #17483f; --ukmb-theme-gold: #c79b35; --ukmb-theme-nav: #075044;
    --ukmb-theme-input: #fffefa; --ukmb-theme-shadow: 0 8px 24px rgba(27,48,39,.08);
}
html[data-ukmb-theme="dark"] {
    color-scheme: dark; --ukmb-theme-page: #101916; --ukmb-theme-surface: #19241f;
    --ukmb-theme-surface-soft: #202e28; --ukmb-theme-border: #3a4b42; --ukmb-theme-ink: #f1f4ef;
    --ukmb-theme-muted: #c1cec6; --ukmb-theme-heading: #f0cd70; --ukmb-theme-gold: #f0cd70;
    --ukmb-theme-nav: #063d35; --ukmb-theme-input: #202d27; --ukmb-theme-shadow: 0 10px 28px rgba(0,0,0,.25);
}
html[data-ukmb-theme="light"] { color-scheme: light; }

/* Shared theme control */
.ukmb-theme-toggle { display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;min-width:66px!important;min-height:34px!important;padding:6px 10px!important;border:1px solid rgba(218,185,104,.55)!important;border-radius:999px!important;background:rgba(255,255,255,.12)!important;color:#fff8df!important;font:600 11px/1.2 Inter,Arial,sans-serif!important;cursor:pointer!important;white-space:nowrap!important;box-shadow:none!important; }
.ukmb-theme-toggle:hover { background:rgba(255,255,255,.2)!important; }
.ukmb-theme-toggle-icon { font-size:15px!important;line-height:1!important; }
.ukmb-topbar .ukmb-theme-toggle { flex:0 0 auto!important; }
.user-topbar .ukmb-theme-toggle { background:#0b5549!important;color:#fff8df!important; }

/* Light appearance — calm cream canvas, readable dark text and soft surfaces. */
html[data-ukmb-theme="light"] body:has(.ukmb-shell),
html[data-ukmb-theme="light"] body:has(.user-app) { background:var(--ukmb-theme-page)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] .ukmb-main,
html[data-ukmb-theme="light"] .dashboard-content,
html[data-ukmb-theme="light"] .user-app,
html[data-ukmb-theme="light"] .user-main { background:var(--ukmb-theme-page)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section,
html[data-ukmb-theme="light"] .dashboard-content > section,
html[data-ukmb-theme="light"] .dashboard-content .panel,
html[data-ukmb-theme="light"] .user-main .panel,
html[data-ukmb-theme="light"] .user-main section.panel,
html[data-ukmb-theme="light"] .user-main .profile-readiness-panel,
html[data-ukmb-theme="light"] .user-main .quick-access-panel,
html[data-ukmb-theme="light"] .user-main .membership-panel,
html[data-ukmb-theme="light"] .user-main .security-panel {
    background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:var(--ukmb-theme-shadow)!important;
}
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section h1,
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section h2,
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section h3,
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section h4,
html[data-ukmb-theme="light"] .user-main h1,
html[data-ukmb-theme="light"] .user-main h2,
html[data-ukmb-theme="light"] .user-main h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section p,
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section small,
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section label,
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section td,
html[data-ukmb-theme="light"] .dashboard-content .dashboard-section th,
html[data-ukmb-theme="light"] .user-main p,
html[data-ukmb-theme="light"] .user-main small,
html[data-ukmb-theme="light"] .user-main label,
html[data-ukmb-theme="light"] .user-main td,
html[data-ukmb-theme="light"] .user-main th { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] .dashboard-content .overview-card,
html[data-ukmb-theme="light"] .dashboard-content .quick-card,
html[data-ukmb-theme="light"] .dashboard-content .action-card,
html[data-ukmb-theme="light"] .dashboard-content .health-card,
html[data-ukmb-theme="light"] .dashboard-content .management-card,
html[data-ukmb-theme="light"] .dashboard-content .status-item,
html[data-ukmb-theme="light"] .dashboard-content .rule-item,
html[data-ukmb-theme="light"] .user-main .stat-card,
html[data-ukmb-theme="light"] .user-main .quick-card {
    background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:none!important;
}
html[data-ukmb-theme="light"] .dashboard-content .overview-card .info,
html[data-ukmb-theme="light"] .dashboard-content .overview-card .info span,
html[data-ukmb-theme="light"] .dashboard-content .overview-card .info h3,
html[data-ukmb-theme="light"] .dashboard-content .quick-card strong,
html[data-ukmb-theme="light"] .dashboard-content .quick-card small,
html[data-ukmb-theme="light"] .dashboard-content .action-card strong,
html[data-ukmb-theme="light"] .dashboard-content .action-card small,
html[data-ukmb-theme="light"] .dashboard-content .health-card .health-content,
html[data-ukmb-theme="light"] .dashboard-content .management-card h4,
html[data-ukmb-theme="light"] .dashboard-content .management-card p,
html[data-ukmb-theme="light"] .dashboard-content .management-card span,
html[data-ukmb-theme="light"] .dashboard-content .status-item div,
html[data-ukmb-theme="light"] .dashboard-content .rule-item .rule-text,
html[data-ukmb-theme="light"] .user-main .stat-card strong,
html[data-ukmb-theme="light"] .user-main .stat-card span,
html[data-ukmb-theme="light"] .user-main .stat-card small,
html[data-ukmb-theme="light"] .user-main .quick-card strong,
html[data-ukmb-theme="light"] .user-main .quick-card small { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] .dashboard-content table,
html[data-ukmb-theme="light"] .dashboard-content .table-responsive,
html[data-ukmb-theme="light"] .user-main table { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] .dashboard-content input:not([type=checkbox]):not([type=radio]),
html[data-ukmb-theme="light"] .dashboard-content select,
html[data-ukmb-theme="light"] .dashboard-content textarea,
html[data-ukmb-theme="light"] .user-main input:not([type=checkbox]):not([type=radio]),
html[data-ukmb-theme="light"] .user-main select,
html[data-ukmb-theme="light"] .user-main textarea { background:var(--ukmb-theme-input)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }

/* Dark appearance — coherent dark surfaces with gold headings and light body copy. */
html[data-ukmb-theme="dark"] body:has(.ukmb-shell),
html[data-ukmb-theme="dark"] body:has(.user-app) { background:var(--ukmb-theme-page)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .ukmb-main,
html[data-ukmb-theme="dark"] .dashboard-content,
html[data-ukmb-theme="dark"] .user-app,
html[data-ukmb-theme="dark"] .user-main { background:var(--ukmb-theme-page)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section,
html[data-ukmb-theme="dark"] .dashboard-content > section,
html[data-ukmb-theme="dark"] .dashboard-content .panel,
html[data-ukmb-theme="dark"] .user-main .panel,
html[data-ukmb-theme="dark"] .user-main section.panel,
html[data-ukmb-theme="dark"] .user-main .profile-readiness-panel,
html[data-ukmb-theme="dark"] .user-main .quick-access-panel,
html[data-ukmb-theme="dark"] .user-main .membership-panel,
html[data-ukmb-theme="dark"] .user-main .security-panel {
    background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:var(--ukmb-theme-shadow)!important;
}
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section h1,
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section h2,
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section h3,
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section h4,
html[data-ukmb-theme="dark"] .user-main h1,
html[data-ukmb-theme="dark"] .user-main h2,
html[data-ukmb-theme="dark"] .user-main h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section p,
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section small,
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section label,
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section td,
html[data-ukmb-theme="dark"] .dashboard-content .dashboard-section th,
html[data-ukmb-theme="dark"] .user-main p,
html[data-ukmb-theme="dark"] .user-main small,
html[data-ukmb-theme="dark"] .user-main label,
html[data-ukmb-theme="dark"] .user-main td,
html[data-ukmb-theme="dark"] .user-main th { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .dashboard-content .overview-card,
html[data-ukmb-theme="dark"] .dashboard-content .quick-card,
html[data-ukmb-theme="dark"] .dashboard-content .action-card,
html[data-ukmb-theme="dark"] .dashboard-content .health-card,
html[data-ukmb-theme="dark"] .dashboard-content .management-card,
html[data-ukmb-theme="dark"] .dashboard-content .status-item,
html[data-ukmb-theme="dark"] .dashboard-content .rule-item,
html[data-ukmb-theme="dark"] .user-main .stat-card,
html[data-ukmb-theme="dark"] .user-main .quick-card {
    background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:none!important;
}
html[data-ukmb-theme="dark"] .dashboard-content .overview-card .info,
html[data-ukmb-theme="dark"] .dashboard-content .overview-card .info span,
html[data-ukmb-theme="dark"] .dashboard-content .overview-card .info h3,
html[data-ukmb-theme="dark"] .dashboard-content .quick-card strong,
html[data-ukmb-theme="dark"] .dashboard-content .quick-card small,
html[data-ukmb-theme="dark"] .dashboard-content .action-card strong,
html[data-ukmb-theme="dark"] .dashboard-content .action-card small,
html[data-ukmb-theme="dark"] .dashboard-content .health-card .health-content,
html[data-ukmb-theme="dark"] .dashboard-content .management-card h4,
html[data-ukmb-theme="dark"] .dashboard-content .management-card p,
html[data-ukmb-theme="dark"] .dashboard-content .management-card span,
html[data-ukmb-theme="dark"] .dashboard-content .status-item div,
html[data-ukmb-theme="dark"] .dashboard-content .rule-item .rule-text,
html[data-ukmb-theme="dark"] .user-main .stat-card strong,
html[data-ukmb-theme="dark"] .user-main .stat-card span,
html[data-ukmb-theme="dark"] .user-main .stat-card small,
html[data-ukmb-theme="dark"] .user-main .quick-card strong,
html[data-ukmb-theme="dark"] .user-main .quick-card small { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .dashboard-content table,
html[data-ukmb-theme="dark"] .dashboard-content .table-responsive,
html[data-ukmb-theme="dark"] .user-main table { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .dashboard-content input:not([type=checkbox]):not([type=radio]),
html[data-ukmb-theme="dark"] .dashboard-content select,
html[data-ukmb-theme="dark"] .dashboard-content textarea,
html[data-ukmb-theme="dark"] .user-main input:not([type=checkbox]):not([type=radio]),
html[data-ukmb-theme="dark"] .user-main select,
html[data-ukmb-theme="dark"] .user-main textarea { background:var(--ukmb-theme-input)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="dark"] .dashboard-content input::placeholder,
html[data-ukmb-theme="dark"] .user-main input::placeholder,
html[data-ukmb-theme="dark"] .user-main textarea::placeholder { color:#aebdb4!important; }
html[data-ukmb-theme="dark"] .ukmb-footer { background:#061f1b!important;color:#f1f4ef!important; }
html[data-ukmb-theme="dark"] .user-topbar { background:#10221c!important;color:#f1f4ef!important;border-color:#34463d!important; }
html[data-ukmb-theme="dark"] .user-topbar .topbar-title strong { color:#f0cd70!important; }
html[data-ukmb-theme="dark"] .user-topbar .topbar-title span { color:#c1cec6!important; }
html[data-ukmb-theme="dark"] .user-topbar .topbar-search { background:#202d27!important;border-color:#3a4b42!important; }
html[data-ukmb-theme="dark"] .user-topbar .topbar-search input { color:#f1f4ef!important; }
html[data-ukmb-theme="dark"] .user-topbar .topbar-icon { background:#202e28!important;color:#f1f4ef!important;border-color:#3a4b42!important; }
html[data-ukmb-theme="dark"] .user-sidebar { background:linear-gradient(180deg,#062e29 0%,#071c18 100%)!important; }
html[data-ukmb-theme="light"] .user-sidebar { background:linear-gradient(180deg,#075344 0%,#064638 100%)!important; }

/* Search icon remains visible on all admin/consultant widths and themes. */
.ukmb-topbar .search-box button .ukmb-topbar-search-icon { display:block!important;width:15px!important;height:15px!important;stroke:#fff!important;fill:none!important;stroke-width:2.2!important;visibility:visible!important;opacity:1!important; }

/* Theme settings page */
.ukmb-theme-settings-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px; }
.ukmb-theme-option { display:flex;flex-direction:column;gap:12px;min-height:210px;padding:20px;border:2px solid var(--ukmb-theme-border);border-radius:16px;background:var(--ukmb-theme-surface);color:var(--ukmb-theme-ink);text-align:left;cursor:pointer;box-shadow:var(--ukmb-theme-shadow); }
.ukmb-theme-option.is-selected { border-color:#c99d3e;box-shadow:0 0 0 3px rgba(201,157,62,.16),var(--ukmb-theme-shadow); }
.ukmb-theme-option strong { font-size:17px;color:var(--ukmb-theme-heading); }
.ukmb-theme-option span { color:var(--ukmb-theme-muted);font-size:13px;line-height:1.5; }
.ukmb-theme-preview { display:grid;grid-template-columns:42px 1fr;gap:8px;width:100%;height:88px;padding:9px;border-radius:10px;background:#f0eee5;border:1px solid #d9d6c9; }
.ukmb-theme-preview i { display:block;border-radius:6px;background:#075044; }
.ukmb-theme-preview b { display:block;border-radius:6px;background:#fffdf7;border:1px solid #d8d7c9; }
.ukmb-theme-preview.dark { background:#101916;border-color:#3a4b42; }
.ukmb-theme-preview.dark i { background:#063d35; }
.ukmb-theme-preview.dark b { background:#19241f;border-color:#3a4b42; }
@media(max-width:760px){.ukmb-theme-settings-grid{grid-template-columns:1fr}.ukmb-theme-toggle-label{display:none!important}.ukmb-theme-toggle{min-width:36px!important;padding:6px 9px!important}}
@media(prefers-reduced-motion:reduce){.ukmb-theme-toggle,.ukmb-theme-option{transition:none!important}}
.theme-settings-note { margin:16px 0 0;color:var(--ukmb-theme-muted)!important;font-size:12px;line-height:1.5; }

/* Consultant workspace — shared theme support for its separate page shell. */
html[data-ukmb-theme="light"] .ukmb-consultant-dashboard,
html[data-ukmb-theme="light"] .ukmb-consultant-subpage,
html[data-ukmb-theme="light"] .ukmb-message-new-page,
html[data-ukmb-theme="light"] .ukmb-client-profile-page { background:var(--ukmb-theme-page)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] .ukmb-dashboard-hero,
html[data-ukmb-theme="light"] .ukmb-dashboard-section,
html[data-ukmb-theme="light"] .ukmb-subpage-card,
html[data-ukmb-theme="light"] .ukmb-message-new-card,
html[data-ukmb-theme="light"] .ukmb-profile-card { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:var(--ukmb-theme-shadow)!important; }
html[data-ukmb-theme="light"] .ukmb-dashboard-section h1,
html[data-ukmb-theme="light"] .ukmb-dashboard-section h2,
html[data-ukmb-theme="light"] .ukmb-dashboard-section h3,
html[data-ukmb-theme="light"] .ukmb-subpage-head h1,
html[data-ukmb-theme="light"] .ukmb-subpage-card h2,
html[data-ukmb-theme="light"] .ukmb-subpage-card h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] .ukmb-dashboard-section p,
html[data-ukmb-theme="light"] .ukmb-dashboard-section small,
html[data-ukmb-theme="light"] .ukmb-subpage-card p,
html[data-ukmb-theme="light"] .ukmb-subpage-card label,
html[data-ukmb-theme="light"] .ukmb-subpage-card td,
html[data-ukmb-theme="light"] .ukmb-subpage-card th { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .ukmb-consultant-dashboard,
html[data-ukmb-theme="dark"] .ukmb-consultant-subpage,
html[data-ukmb-theme="dark"] .ukmb-message-new-page,
html[data-ukmb-theme="dark"] .ukmb-client-profile-page { background:var(--ukmb-theme-page)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .ukmb-dashboard-hero,
html[data-ukmb-theme="dark"] .ukmb-dashboard-section,
html[data-ukmb-theme="dark"] .ukmb-subpage-card,
html[data-ukmb-theme="dark"] .ukmb-message-new-card,
html[data-ukmb-theme="dark"] .ukmb-profile-card { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:var(--ukmb-theme-shadow)!important; }
html[data-ukmb-theme="dark"] .ukmb-dashboard-section h1,
html[data-ukmb-theme="dark"] .ukmb-dashboard-section h2,
html[data-ukmb-theme="dark"] .ukmb-dashboard-section h3,
html[data-ukmb-theme="dark"] .ukmb-subpage-head h1,
html[data-ukmb-theme="dark"] .ukmb-subpage-card h2,
html[data-ukmb-theme="dark"] .ukmb-subpage-card h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="dark"] .ukmb-dashboard-section p,
html[data-ukmb-theme="dark"] .ukmb-dashboard-section small,
html[data-ukmb-theme="dark"] .ukmb-subpage-card p,
html[data-ukmb-theme="dark"] .ukmb-subpage-card label,
html[data-ukmb-theme="dark"] .ukmb-subpage-card td,
html[data-ukmb-theme="dark"] .ukmb-subpage-card th { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] .ukmb-subpage-card input,
html[data-ukmb-theme="dark"] .ukmb-subpage-card select,
html[data-ukmb-theme="dark"] .ukmb-subpage-card textarea { background:var(--ukmb-theme-input)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }

/* Additional named cards used by the 10-page admin reference set. */
html[data-ukmb-theme="light"] .dashboard-content .package-card,
html[data-ukmb-theme="light"] .dashboard-content .membership-action-card,
html[data-ukmb-theme="light"] .dashboard-content .matching-center-intro,
html[data-ukmb-theme="light"] .dashboard-content .finance-operation-card,
html[data-ukmb-theme="light"] .dashboard-content .system-header,
html[data-ukmb-theme="light"] .dashboard-content .login-records,
html[data-ukmb-theme="light"] .dashboard-content .security-summary-card { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] .dashboard-content .package-card h3,
html[data-ukmb-theme="light"] .dashboard-content .package-card strong,
html[data-ukmb-theme="light"] .dashboard-content .membership-action-card h3,
html[data-ukmb-theme="light"] .dashboard-content .membership-action-card strong,
html[data-ukmb-theme="light"] .dashboard-content .matching-center-intro strong { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="dark"] .dashboard-content .package-card,
html[data-ukmb-theme="dark"] .dashboard-content .membership-action-card,
html[data-ukmb-theme="dark"] .dashboard-content .matching-center-intro,
html[data-ukmb-theme="dark"] .dashboard-content .finance-operation-card,
html[data-ukmb-theme="dark"] .dashboard-content .system-header,
html[data-ukmb-theme="dark"] .dashboard-content .login-records,
html[data-ukmb-theme="dark"] .dashboard-content .security-summary-card { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="dark"] .dashboard-content .package-card h3,
html[data-ukmb-theme="dark"] .dashboard-content .package-card strong,
html[data-ukmb-theme="dark"] .dashboard-content .membership-action-card h3,
html[data-ukmb-theme="dark"] .dashboard-content .membership-action-card strong,
html[data-ukmb-theme="dark"] .dashboard-content .matching-center-intro strong { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="dark"] .dashboard-content .package-card p,
html[data-ukmb-theme="dark"] .dashboard-content .membership-action-card p,
html[data-ukmb-theme="dark"] .dashboard-content .package-card li,
html[data-ukmb-theme="dark"] .dashboard-content .membership-action-card small { color:var(--ukmb-theme-ink)!important; }

/* ======================================================================
   02 NOV 2026 — SCREENSHOT-DRIVEN THEME PAIRING REPAIR
   Scope: Consultants, Pending Applicants, Payment Queue, Membership
   Control and Matching Center. These rules intentionally follow the
   page-owned stylesheets and only change theme-dependent colors/surfaces.
   ====================================================================== */

/* 1. Consultants Management — preserve emerald consultant profile cards. */
html[data-ukmb-theme="light"] body .consultants-index-page,
html[data-ukmb-theme="dark"] body .consultants-index-page {
    background:var(--ukmb-theme-surface)!important;
    color:var(--ukmb-theme-ink)!important;
    border-color:var(--ukmb-theme-border)!important;
}
html[data-ukmb-theme="light"] body .consultants-index-page .section-header h2,
html[data-ukmb-theme="light"] body .consultants-index-page .section-header p,
html[data-ukmb-theme="dark"] body .consultants-index-page .section-header h2,
html[data-ukmb-theme="dark"] body .consultants-index-page .section-header p {
    color:var(--ukmb-theme-heading)!important;
}
html[data-ukmb-theme="light"] body .consultants-index-page .section-header p { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="dark"] body .consultants-index-page .section-header p { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="light"] body .consultants-index-page .overview-grid,
html[data-ukmb-theme="dark"] body .consultants-index-page .overview-grid {
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
}
html[data-ukmb-theme="light"] body .consultants-index-page .overview-card,
html[data-ukmb-theme="dark"] body .consultants-index-page .overview-card {
    background:var(--ukmb-theme-surface-soft)!important;
    color:var(--ukmb-theme-ink)!important;
    border-color:var(--ukmb-theme-border)!important;
    box-shadow:var(--ukmb-theme-shadow)!important;
}
html[data-ukmb-theme="light"] body .consultants-index-page .overview-card span,
html[data-ukmb-theme="light"] body .consultants-index-page .overview-card h3,
html[data-ukmb-theme="dark"] body .consultants-index-page .overview-card span,
html[data-ukmb-theme="dark"] body .consultants-index-page .overview-card h3 {
    color:var(--ukmb-theme-ink)!important;
}
html[data-ukmb-theme="light"] body .consultants-index-page .consultant-list-card,
html[data-ukmb-theme="dark"] body .consultants-index-page .consultant-list-card {
    background:linear-gradient(145deg,#08765d,#064b3d)!important;
    border-color:rgba(243,207,105,.42)!important;
}
html[data-ukmb-theme="light"] body .consultants-index-page .consultant-list-body h3,
html[data-ukmb-theme="dark"] body .consultants-index-page .consultant-list-body h3,
html[data-ukmb-theme="light"] body .consultants-index-page .consultant-list-meta b,
html[data-ukmb-theme="dark"] body .consultants-index-page .consultant-list-meta b { color:#f3cf69!important; }
html[data-ukmb-theme="light"] body .consultants-index-page .consultant-list-meta,
html[data-ukmb-theme="dark"] body .consultants-index-page .consultant-list-meta { color:#f1f4ef!important; }

/* 2. Pending Applicants — filter panel, status tabs and table are theme aware. */
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-page-title { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-page-title { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-page-subtitle { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-page-subtitle { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-panel,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .bulk-bar {
    background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-panel,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .bulk-bar {
    background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;
}
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .filter-group label,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .bulk-bar label { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .filter-group label,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .bulk-bar label { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-panel input:not([type=checkbox]):not([type=radio]),
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-panel select,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .bulk-bar input,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .bulk-bar select {
    background:var(--ukmb-theme-input)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-panel input:not([type=checkbox]):not([type=radio]),
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-panel select,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .bulk-bar input,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .bulk-bar select {
    background:var(--ukmb-theme-input)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;
}
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-table,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-table td,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-table .table-empty { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-table,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-table td,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-table .table-empty { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-table th,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-table th { background:var(--ukmb-theme-nav)!important;color:#fff8df!important; }
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-applicant-status-links a:not(.is-active) { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) input::placeholder { color:#71847c!important;opacity:1!important; }
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) input::placeholder { color:#aebdb4!important;opacity:1!important; }

/* 3. Payment Queue — correct hard-coded dark palette in light mode and
      dark-on-dark form controls in dark mode without changing actions. */
html[data-ukmb-theme="light"] body .page-payments .dashboard-content { background:var(--ukmb-theme-page)!important;color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] body .page-payments .payments-page,
html[data-ukmb-theme="dark"] body .page-payments .payments-page { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:var(--ukmb-theme-shadow)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-header h2,
html[data-ukmb-theme="dark"] body .page-payments .payment-header h2 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-header p,
html[data-ukmb-theme="dark"] body .page-payments .payment-header p,
html[data-ukmb-theme="light"] body .page-payments .payment-panel-heading p,
html[data-ukmb-theme="dark"] body .page-payments .payment-panel-heading p { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-box,
html[data-ukmb-theme="light"] body .page-payments .payment-panel { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:var(--ukmb-theme-shadow)!important; }
html[data-ukmb-theme="dark"] body .page-payments .payment-box,
html[data-ukmb-theme="dark"] body .page-payments .payment-panel { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-box span,
html[data-ukmb-theme="light"] body .page-payments .payment-box strong,
html[data-ukmb-theme="light"] body .page-payments .payment-box p,
html[data-ukmb-theme="light"] body .page-payments .payment-panel h3,
html[data-ukmb-theme="dark"] body .page-payments .payment-box span,
html[data-ukmb-theme="dark"] body .page-payments .payment-box strong,
html[data-ukmb-theme="dark"] body .page-payments .payment-box p,
html[data-ukmb-theme="dark"] body .page-payments .payment-panel h3 { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-table th { background:var(--ukmb-theme-nav)!important;color:#fff8df!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-table td,
html[data-ukmb-theme="light"] body .page-payments .payment-table,
html[data-ukmb-theme="light"] body .page-payments .payment-table-wrap { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="dark"] body .page-payments .payment-table th { background:var(--ukmb-theme-nav)!important;color:#fff8df!important; }
html[data-ukmb-theme="dark"] body .page-payments .payment-table td,
html[data-ukmb-theme="dark"] body .page-payments .payment-table,
html[data-ukmb-theme="dark"] body .page-payments .payment-table-wrap { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-verify-fields input,
html[data-ukmb-theme="light"] body .page-payments .payment-verify-fields select,
html[data-ukmb-theme="dark"] body .page-payments .payment-verify-fields input,
html[data-ukmb-theme="dark"] body .page-payments .payment-verify-fields select { background:var(--ukmb-theme-input)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-member,
html[data-ukmb-theme="light"] body .page-payments .payment-amount,
html[data-ukmb-theme="dark"] body .page-payments .payment-member,
html[data-ukmb-theme="dark"] body .page-payments .payment-amount { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-date,
html[data-ukmb-theme="light"] body .page-payments .payment-muted,
html[data-ukmb-theme="dark"] body .page-payments .payment-date,
html[data-ukmb-theme="dark"] body .page-payments .payment-muted { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="dark"] body .page-payments .payment-panel-heading p { color:var(--ukmb-theme-muted)!important; }

/* 4. Membership Control — package/action/rule text follows each tile surface. */
html[data-ukmb-theme="light"] body .page-membership .dashboard-content .dashboard-section,
html[data-ukmb-theme="dark"] body .page-membership .dashboard-content .dashboard-section { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] body .page-membership .section-header h2,
html[data-ukmb-theme="light"] body .page-membership .dashboard-section > h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="dark"] body .page-membership .section-header h2,
html[data-ukmb-theme="dark"] body .page-membership .dashboard-section > h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] body .page-membership .overview-card,
html[data-ukmb-theme="light"] body .page-membership .quick-card,
html[data-ukmb-theme="light"] body .page-membership .rule-item,
html[data-ukmb-theme="dark"] body .page-membership .overview-card,
html[data-ukmb-theme="dark"] body .page-membership .quick-card,
html[data-ukmb-theme="dark"] body .page-membership .rule-item { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:none!important; }
html[data-ukmb-theme="light"] body .page-membership .overview-card h3,
html[data-ukmb-theme="light"] body .page-membership .quick-card h4,
html[data-ukmb-theme="light"] body .page-membership .rule-text,
html[data-ukmb-theme="dark"] body .page-membership .overview-card h3,
html[data-ukmb-theme="dark"] body .page-membership .quick-card h4,
html[data-ukmb-theme="dark"] body .page-membership .rule-text { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] body .page-membership .overview-card p,
html[data-ukmb-theme="light"] body .page-membership .quick-card p,
html[data-ukmb-theme="dark"] body .page-membership .overview-card p,
html[data-ukmb-theme="dark"] body .page-membership .quick-card p { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="light"] body .page-membership .overview-grid,
html[data-ukmb-theme="light"] body .page-membership .quick-grid,
html[data-ukmb-theme="light"] body .page-membership .rules-grid,
html[data-ukmb-theme="dark"] body .page-membership .overview-grid,
html[data-ukmb-theme="dark"] body .page-membership .quick-grid,
html[data-ukmb-theme="dark"] body .page-membership .rules-grid { background:transparent!important; }

/* 5. Matching Center — make workflow titles, copy and secondary links legible. */
html[data-ukmb-theme="light"] body .page-matching .dashboard-content .dashboard-section,
html[data-ukmb-theme="dark"] body .page-matching .dashboard-content .dashboard-section { background:var(--ukmb-theme-surface)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important; }
html[data-ukmb-theme="light"] body .page-matching .section-header h2,
html[data-ukmb-theme="light"] body .page-matching .dashboard-section > h3,
html[data-ukmb-theme="dark"] body .page-matching .section-header h2,
html[data-ukmb-theme="dark"] body .page-matching .dashboard-section > h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] body .page-matching .section-header p,
html[data-ukmb-theme="dark"] body .page-matching .section-header p { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="light"] body .page-matching .matching-center-intro,
html[data-ukmb-theme="light"] body .page-matching .quick-card,
html[data-ukmb-theme="dark"] body .page-matching .matching-center-intro,
html[data-ukmb-theme="dark"] body .page-matching .quick-card { background:var(--ukmb-theme-surface-soft)!important;color:var(--ukmb-theme-ink)!important;border-color:var(--ukmb-theme-border)!important;box-shadow:none!important; }
html[data-ukmb-theme="light"] body .page-matching .quick-card h4,
html[data-ukmb-theme="light"] body .page-matching .matching-secondary-links a,
html[data-ukmb-theme="dark"] body .page-matching .quick-card h4,
html[data-ukmb-theme="dark"] body .page-matching .matching-secondary-links a { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] body .page-matching .quick-card p,
html[data-ukmb-theme="light"] body .page-matching .matching-center-intro p,
html[data-ukmb-theme="light"] body .page-matching .matching-secondary-links,
html[data-ukmb-theme="dark"] body .page-matching .quick-card p,
html[data-ukmb-theme="dark"] body .page-matching .matching-center-intro p,
html[data-ukmb-theme="dark"] body .page-matching .matching-secondary-links { color:var(--ukmb-theme-muted)!important; }
html[data-ukmb-theme="dark"] body .page-matching .quick-card p { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="dark"] body .page-matching .matching-secondary-links a { color:#f0cd70!important; }

/* Pending Applicants statistic tiles also follow the selected palette. */
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-dashboard-stats .ukmb-stat-card,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-dashboard-stats .ukmb-stat-card-link {
    background:var(--ukmb-theme-surface-soft)!important;
    color:var(--ukmb-theme-ink)!important;
    border-color:var(--ukmb-theme-border)!important;
    box-shadow:var(--ukmb-theme-shadow)!important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-stat-label,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-stat-value { color:var(--ukmb-theme-ink)!important; }
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-stat-label,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-stat-value { color:#173f38!important; }
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-panel input:focus,
html[data-ukmb-theme="light"] body:has(.ukmb-applicant-status-links) .ukmb-panel select:focus,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-panel input:focus,
html[data-ukmb-theme="dark"] body:has(.ukmb-applicant-status-links) .ukmb-panel select:focus { outline:2px solid var(--ukmb-theme-gold)!important;outline-offset:1px!important; }

/* Payment headings and proof links keep their semantic accent without losing contrast. */
html[data-ukmb-theme="light"] body .page-payments .payment-panel h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="dark"] body .page-payments .payment-panel h3 { color:var(--ukmb-theme-heading)!important; }
html[data-ukmb-theme="light"] body .page-payments .payment-secondary-btn,
html[data-ukmb-theme="light"] body .page-payments .payment-proof-btn { color:#17483f!important;background:#f4e8c8!important;border-color:#d8bd78!important; }
html[data-ukmb-theme="dark"] body .page-payments .payment-secondary-btn,
html[data-ukmb-theme="dark"] body .page-payments .payment-proof-btn { color:#f0cd70!important; }


/* ======================================================================
   02 NOV 2026 — MEMBERSHIP PACKAGES PAGE LAYOUT REPAIR
   Strictly scoped to /admin/clients/membership/packages.php.
   No membership data, permissions, routes or actions are changed.
   ====================================================================== */
.page-membership-packages .dashboard-content > .dashboard-section {
    width:100%;
    max-width:none;
    padding:22px;
}
.page-membership-packages .dashboard-content > .dashboard-section > .section-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    flex-wrap:wrap;
    margin-bottom:0;
}
.page-membership-packages .package-grid {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-items:stretch;
    gap:18px!important;
    margin-top:22px!important;
}
.page-membership-packages .package-card {
    box-sizing:border-box;
    display:flex!important;
    flex-direction:column;
    align-items:flex-start;
    position:relative;
    min-width:0;
    min-height:224px!important;
    height:100%;
    padding:20px 22px 18px 22px!important;
    overflow:hidden;
    border-radius:18px!important;
    border:1px solid var(--ukmb-theme-border)!important;
    background:var(--ukmb-theme-surface-soft)!important;
    color:var(--ukmb-theme-ink)!important;
    box-shadow:var(--ukmb-theme-shadow)!important;
    text-decoration:none;
    text-shadow:none!important;
    transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.page-membership-packages .package-card::before {
    content:none!important;
    display:none!important;
}
.page-membership-packages .package-card:hover {
    transform:translateY(-3px);
    border-color:var(--ukmb-theme-gold)!important;
    box-shadow:0 12px 24px rgba(0,0,0,.13)!important;
}
.page-membership-packages .package-card:focus-visible {
    outline:3px solid var(--ukmb-theme-gold)!important;
    outline-offset:3px;
}
.page-membership-packages .package-card > .icon {
    position:absolute!important;
    top:18px;
    left:20px;
    z-index:2;
    display:flex;
    align-items:center;
    justify-content:center;
    width:46px;
    height:46px;
    margin:0!important;
    border-radius:13px;
    background:linear-gradient(145deg,#ffe58b,#c99b25)!important;
    box-shadow:0 5px 12px rgba(0,0,0,.14);
    font-size:23px!important;
}
.page-membership-packages .package-card h2 {
    position:static!important;
    display:flex;
    align-items:center;
    min-height:46px;
    margin:0 0 12px 62px!important;
    padding:0!important;
    color:var(--ukmb-theme-heading)!important;
    font-family:Inter,Arial,sans-serif;
    font-size:20px!important;
    font-weight:700!important;
    line-height:1.25!important;
    letter-spacing:0;
    white-space:nowrap;
    text-shadow:none!important;
    z-index:1;
}
.page-membership-packages .package-card h3 {
    display:inline-flex!important;
    align-items:center;
    max-width:100%;
    margin:0 0 8px!important;
    padding:5px 10px!important;
    border:1px solid var(--ukmb-theme-border);
    border-radius:7px!important;
    background:var(--ukmb-theme-surface)!important;
    color:var(--ukmb-theme-heading)!important;
    font-family:Inter,Arial,sans-serif;
    font-size:13px!important;
    font-weight:700!important;
    line-height:1.2;
    letter-spacing:.04em;
    text-shadow:none!important;
}
.page-membership-packages .package-card ul {
    width:100%;
    margin:4px 0 16px!important;
    padding:0 0 0 18px!important;
    color:var(--ukmb-theme-ink)!important;
}
.page-membership-packages .package-card li {
    margin:0 0 7px!important;
    padding:0;
    color:var(--ukmb-theme-ink)!important;
    font-family:Inter,Arial,sans-serif;
    font-size:13px!important;
    font-weight:500!important;
    line-height:1.45!important;
    text-shadow:none!important;
}
.page-membership-packages .package-card:nth-child(7):last-child { grid-column:2; }
.page-membership-packages .package-card-action {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:auto!important;
    padding:7px 11px;
    border:1px solid var(--ukmb-theme-border);
    border-radius:8px;
    background:var(--ukmb-theme-surface);
    color:var(--ukmb-theme-heading)!important;
    font-size:12px;
    font-weight:600;
    line-height:1.2;
    text-shadow:none!important;
}
.page-membership-packages .membership-actions {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:18px!important;
    margin-top:22px!important;
}
.page-membership-packages .membership-action-card {
    box-sizing:border-box;
    min-width:0;
    min-height:92px!important;
    padding:18px!important;
    display:flex;
    align-items:center;
    gap:14px;
    border:1px solid var(--ukmb-theme-border)!important;
    border-radius:14px!important;
    background:var(--ukmb-theme-surface-soft)!important;
    color:var(--ukmb-theme-ink)!important;
    box-shadow:var(--ukmb-theme-shadow)!important;
}
.page-membership-packages .membership-action-card > .icon {
    flex:0 0 28px;
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0!important;
    font-size:18px;
}
.page-membership-packages .membership-action-card h3 {
    margin:0 0 5px!important;
    color:var(--ukmb-theme-heading)!important;
    font-size:14px!important;
    line-height:1.3;
    text-shadow:none!important;
}
.page-membership-packages .membership-action-card p {
    margin:0!important;
    color:var(--ukmb-theme-ink)!important;
    font-size:12px!important;
    line-height:1.45;
    text-shadow:none!important;
}
@media (max-width:1100px) {
    .page-membership-packages .package-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
    .page-membership-packages .membership-actions { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
    .page-membership-packages .package-card:nth-child(7):last-child { grid-column:1 / -1; }
}
@media (max-width:680px) {
    .page-membership-packages .dashboard-content > .dashboard-section { padding:15px!important; }
    .page-membership-packages .package-grid,
    .page-membership-packages .membership-actions { grid-template-columns:minmax(0,1fr)!important; gap:13px!important; }
    .page-membership-packages .package-card { min-height:205px!important; padding:17px!important; }
    .page-membership-packages .package-card:nth-child(7):last-child { grid-column:auto; }
    .page-membership-packages .section-header > div:last-child { display:flex; flex-wrap:wrap; gap:8px; }
}


/* 02 NOV 2026 — Membership Packages page final cascade correction v2 */
html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:stretch!important; gap:18px!important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid > a.package-card {
  box-sizing:border-box!important; display:flex!important; flex-direction:column!important;
  align-items:flex-start!important; justify-content:flex-start!important;
  width:100%!important; min-width:0!important; min-height:232px!important;
  height:auto!important; aspect-ratio:auto!important; padding:20px 22px!important;
  overflow:visible!important; clip-path:none!important; border-radius:16px!important;
  border:1px solid var(--ukmb-theme-border)!important;
  background:var(--ukmb-theme-surface-soft)!important;
  color:var(--ukmb-theme-ink)!important; box-shadow:var(--ukmb-theme-shadow)!important;
  text-decoration:none!important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid > a.package-card::before,
html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid > a.package-card::after {
  content:none!important; display:none!important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid > a.package-card > h2 {
  color:var(--ukmb-theme-heading)!important; margin-left:62px!important;
  white-space:normal!important; overflow:visible!important; text-overflow:clip!important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid > a.package-card > .package-card-action {
  box-sizing:border-box!important; display:inline-flex!important; align-items:center!important;
  justify-content:center!important; align-self:flex-start!important; position:relative!important;
  inset:auto!important; margin: auto 0 0!important; padding:8px 12px!important;
  min-height:34px!important; max-width:100%!important; text-indent:0!important;
  white-space:nowrap!important; overflow:visible!important;
  border:1px solid var(--ukmb-theme-border)!important; border-radius:8px!important;
  background:var(--ukmb-theme-surface)!important; color:var(--ukmb-theme-heading)!important;
  font-size:12px!important; font-weight:700!important; line-height:1.2!important;
  letter-spacing:0!important;
}
html[data-ukmb-theme="dark"] body .ukmb-shell.page-membership-packages .section-header h2 {
  color:#f0cd70!important; text-shadow:none!important;
}
html[data-ukmb-theme="dark"] body .ukmb-shell.page-membership-packages .section-header p {
  color:#c1cec6!important;
}
html[data-ukmb-theme="light"] body .ukmb-shell.page-membership-packages .section-header h2 {
  color:#17483f!important; text-shadow:none!important;
}
html[data-ukmb-theme="light"] body .ukmb-shell.page-membership-packages .section-header p {
  color:#62766e!important;
}
@media (max-width:1100px) {
  html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-card:nth-child(7):last-child {
    grid-column:1 / -1!important;
  }
}
@media (max-width:680px) {
  html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-grid {
    grid-template-columns:minmax(0,1fr)!important; gap:13px!important;
  }
  html[data-ukmb-theme] body .ukmb-shell.page-membership-packages .package-card:nth-child(7):last-child {
    grid-column:auto!important;
  }
}


/* =========================================================
   UKMB PUBLIC WEBSITE — SHARED DARK / LIGHT THEME
   Scope: pages using the canonical partials/header.php shell.
   The page layout and individual branded components remain page-owned.
========================================================= */
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome) {
    --ukmb-public-page: #f2f0e7;
    --ukmb-public-section: #f8f6ee;
    --ukmb-public-card: #e8eee8;
    --ukmb-public-border: #d7d9ce;
    --ukmb-public-ink: #183d34;
    --ukmb-public-muted: #63756d;
    background: var(--ukmb-public-page);
    color: var(--ukmb-public-ink);
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome) {
    --ukmb-public-page: #050807;
    --ukmb-public-section: #101916;
    --ukmb-public-card: #192720;
    --ukmb-public-border: #34483e;
    --ukmb-public-ink: #f3f5ef;
    --ukmb-public-muted: #bdcbc2;
    background: var(--ukmb-public-page);
    color: var(--ukmb-public-ink);
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome) .page-wrapper,
html[data-ukmb-theme] body:has(.ukmb-site-chrome) .page-content {
    background: var(--ukmb-public-page);
    color: var(--ukmb-public-ink);
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome) .page-content {
    transition: background-color .2s ease, color .2s ease;
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .section-title,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .page-title {
    color: var(--ukmb-public-ink);
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .section-subtitle,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .page-subtitle {
    color: var(--ukmb-public-muted);
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .section,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .page-section {
    background-color: var(--ukmb-public-section);
    border-color: var(--ukmb-public-border);
}
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .section,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .page-section {
    background-color: var(--ukmb-public-section);
    border-color: var(--ukmb-public-border);
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .card,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .ukmb-card,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .service-card,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .feature-card,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .testimonial-card,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .faq-item {
    background-color: var(--ukmb-public-card);
    border-color: var(--ukmb-public-border);
    color: var(--ukmb-public-ink);
}
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .card,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .ukmb-card,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .service-card,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .feature-card,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .testimonial-card,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .faq-item {
    background-color: var(--ukmb-public-card);
    border-color: var(--ukmb-public-border);
    color: var(--ukmb-public-ink);
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content input:not([type="checkbox"]):not([type="radio"]),
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content select,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content textarea {
    background-color: #111a16;
    border-color: #46594e;
    color: #f3f5ef;
}
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content input:not([type="checkbox"]):not([type="radio"]),
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content select,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content textarea {
    background-color: #fffdf7;
    border-color: #c9d1c8;
    color: #183d34;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome) .ukmb-header {
    background: linear-gradient(135deg, #050807 0%, #0b211b 52%, #050807 100%);
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome) .ukmb-main-nav,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome) .ukmb-mobile-menu {
    background: #050807;
    border-color: rgba(212,175,55,.3);
}
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome) .ukmb-header {
    background: linear-gradient(135deg, #123f36 0%, #15594c 52%, #123f36 100%);
}
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome) .ukmb-main-nav,
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome) .ukmb-mobile-menu {
    background: #0b4039;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome) .ukmb-footer {
    background: linear-gradient(135deg, #000 0%, #071b15 55%, #000 100%);
    color: #f3f5ef;
}
html[data-ukmb-theme="light"] body:has(.ukmb-site-chrome) .ukmb-footer {
    background: linear-gradient(135deg, #082626 0%, #0b4a4a 55%, #116f6f 100%);
    color: #fff;
}

/* Public header theme switch: same desktop footprint as the Login CTA (135 × 48 px). */
.ukmb-social-icons .ukmb-public-theme-toggle {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 135px !important;
    min-width: 135px !important;
    max-width: 135px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    font: 700 .88rem/1 Inter, Arial, sans-serif !important;
    cursor: pointer !important;
    box-shadow: 0 5px 12px rgba(0,0,0,.22) !important;
    white-space: nowrap !important;
    transition: transform .2s ease, background-color .2s ease, color .2s ease !important;
}
html[data-ukmb-theme="dark"] .ukmb-social-icons .ukmb-public-theme-toggle {
    background: #000 !important;
    color: #f8f5e9 !important;
    border: 1px solid rgba(240,205,112,.55) !important;
}
html[data-ukmb-theme="light"] .ukmb-social-icons .ukmb-public-theme-toggle {
    background: #f2f0e7 !important;
    color: #183d34 !important;
    border: 1px solid #d6cda9 !important;
}
.ukmb-social-icons .ukmb-public-theme-toggle:hover { transform: translateY(-2px); }
.ukmb-public-theme-toggle .ukmb-theme-toggle-icon { font-size: 16px !important; line-height: 1 !important; }
.ukmb-public-theme-toggle .ukmb-theme-toggle-label { display: inline !important; }
@media (max-width: 768px) {
    .ukmb-social-icons .ukmb-public-theme-toggle {
        width: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    .ukmb-public-theme-toggle .ukmb-theme-toggle-label { display: none !important; }
}
@media (max-width: 480px) {
    .ukmb-social-icons .ukmb-public-theme-toggle {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
    }
}

/* ======================================================================
   02 NOV 2026 — PROJECT-WIDE THEME COVERAGE + COMPACT SHARED CONTROL
   Applies the selected palette to the canonical public, Admin, Consultant
   and Member shells. Page geometry and semantic action/status colors stay
   owned by their existing components.
   ====================================================================== */

/* One consistent compact control in public and authenticated headers.
   135×48 px public control reduced by 25% to approximately 101×36 px.
   Font sizes are intentionally not reduced by this sizing correction. */
.ukmb-theme-toggle,
.ukmb-social-icons .ukmb-public-theme-toggle {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: 101px !important;
    min-width: 101px !important;
    max-width: 101px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 12px !important;
    gap: 6px !important;
    border: 1px solid #c9a64d !important;
    border-radius: 999px !important;
    box-shadow: 0 3px 9px rgba(0,0,0,.16) !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}
html[data-ukmb-theme="dark"] .ukmb-theme-toggle,
html[data-ukmb-theme="dark"] .ukmb-social-icons .ukmb-public-theme-toggle {
    background: #000000 !important;
    color: #f8f5e9 !important;
    border-color: rgba(240,205,112,.62) !important;
}
html[data-ukmb-theme="light"] .ukmb-theme-toggle,
html[data-ukmb-theme="light"] .ukmb-social-icons .ukmb-public-theme-toggle {
    background: #f2f0e7 !important;
    color: #183d34 !important;
    border-color: #d6cda9 !important;
}
.ukmb-theme-toggle:hover,
.ukmb-social-icons .ukmb-public-theme-toggle:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}
.ukmb-theme-toggle .ukmb-theme-toggle-icon { flex: 0 0 auto; }
.ukmb-theme-toggle .ukmb-theme-toggle-label { display: inline !important; }
@media (max-width: 768px) {
    .ukmb-theme-toggle,
    .ukmb-social-icons .ukmb-public-theme-toggle {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    .ukmb-theme-toggle .ukmb-theme-toggle-label { display: none !important; }
}

/* Admin / staff workspace — common page canvas and content surfaces. */
html[data-ukmb-theme] body:has(.ukmb-shell),
html[data-ukmb-theme] body:has(.ukmb-admin-shell) {
    background: var(--ukmb-theme-page) !important;
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] .ukmb-shell .ukmb-main,
html[data-ukmb-theme] .ukmb-admin-shell .ukmb-main,
html[data-ukmb-theme] .ukmb-shell .dashboard-content,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content {
    background: var(--ukmb-theme-page) !important;
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] .ukmb-shell .dashboard-content > section,
html[data-ukmb-theme] .ukmb-shell .dashboard-content > .dashboard-section,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .dashboard-section,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .panel,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .card,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .content-card,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .form-card,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .filter-card,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .table-responsive,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content > section,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .dashboard-section,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .panel,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .card,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .content-card,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .form-card,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .filter-card,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .table-responsive {
    background: var(--ukmb-theme-surface) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] .ukmb-shell .dashboard-content h1,
html[data-ukmb-theme] .ukmb-shell .dashboard-content h2,
html[data-ukmb-theme] .ukmb-shell .dashboard-content h3,
html[data-ukmb-theme] .ukmb-shell .dashboard-content h4,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content h1,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content h2,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content h3,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content h4 {
    color: var(--ukmb-theme-heading) !important;
}
html[data-ukmb-theme] .ukmb-shell .dashboard-content p,
html[data-ukmb-theme] .ukmb-shell .dashboard-content label,
html[data-ukmb-theme] .ukmb-shell .dashboard-content li,
html[data-ukmb-theme] .ukmb-shell .dashboard-content td,
html[data-ukmb-theme] .ukmb-shell .dashboard-content small,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content p,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content label,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content li,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content td,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content small {
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] .ukmb-shell .dashboard-content .text-muted,
html[data-ukmb-theme] .ukmb-shell .dashboard-content .form-text,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .text-muted,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content .form-text {
    color: var(--ukmb-theme-muted) !important;
}
html[data-ukmb-theme] .ukmb-shell .dashboard-content input:not([type="checkbox"]):not([type="radio"]),
html[data-ukmb-theme] .ukmb-shell .dashboard-content select,
html[data-ukmb-theme] .ukmb-shell .dashboard-content textarea,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content input:not([type="checkbox"]):not([type="radio"]),
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content select,
html[data-ukmb-theme] .ukmb-admin-shell .dashboard-content textarea {
    background: var(--ukmb-theme-input) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme="dark"] .ukmb-shell .dashboard-content input::placeholder,
html[data-ukmb-theme="dark"] .ukmb-shell .dashboard-content textarea::placeholder,
html[data-ukmb-theme="dark"] .ukmb-admin-shell .dashboard-content input::placeholder,
html[data-ukmb-theme="dark"] .ukmb-admin-shell .dashboard-content textarea::placeholder {
    color: #aebdb4 !important;
    opacity: 1 !important;
}

/* Member / Consultant shells share the same tokens and contrast contract. */
html[data-ukmb-theme] body:has(.user-app),
html[data-ukmb-theme] body:has(.ukmb-consultant-dashboard),
html[data-ukmb-theme] body:has(.ukmb-consultant-subpage),
html[data-ukmb-theme] body:has(.ukmb-client-profile-page) {
    background: var(--ukmb-theme-page) !important;
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] .user-app,
html[data-ukmb-theme] .user-main,
html[data-ukmb-theme] .ukmb-consultant-dashboard,
html[data-ukmb-theme] .ukmb-consultant-subpage,
html[data-ukmb-theme] .ukmb-client-profile-page {
    background-color: var(--ukmb-theme-page) !important;
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] .user-main h1,
html[data-ukmb-theme] .user-main h2,
html[data-ukmb-theme] .user-main h3,
html[data-ukmb-theme] .user-main h4,
html[data-ukmb-theme] .ukmb-consultant-dashboard h1,
html[data-ukmb-theme] .ukmb-consultant-dashboard h2,
html[data-ukmb-theme] .ukmb-consultant-subpage h1,
html[data-ukmb-theme] .ukmb-consultant-subpage h2 { color: var(--ukmb-theme-heading) !important; }
html[data-ukmb-theme] .user-main p,
html[data-ukmb-theme] .user-main label,
html[data-ukmb-theme] .user-main li,
html[data-ukmb-theme] .user-main td,
html[data-ukmb-theme] .user-main small,
html[data-ukmb-theme] .ukmb-consultant-dashboard p,
html[data-ukmb-theme] .ukmb-consultant-subpage p,
html[data-ukmb-theme] .ukmb-consultant-subpage label,
html[data-ukmb-theme] .ukmb-consultant-subpage td { color: var(--ukmb-theme-ink) !important; }

/* Public site — cover shared content wrappers used by the different routes,
   not only pages that happen to use the .page-content class. */
html[data-ukmb-theme] body:has(.ukmb-site-chrome) {
    color: var(--ukmb-public-ink) !important;
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome) main:not(.ukmb-main-nav),
html[data-ukmb-theme] body:has(.ukmb-site-chrome) .page-wrapper,
html[data-ukmb-theme] body:has(.ukmb-site-chrome) .page-content,
html[data-ukmb-theme] body:has(.ukmb-site-chrome) .content-wrapper,
html[data-ukmb-theme] body:has(.ukmb-site-chrome) .main-content {
    background-color: var(--ukmb-public-page) !important;
    color: var(--ukmb-public-ink) !important;
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main h1,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main h2,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main h3,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main h4,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content h1,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content h2,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content h3,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content h4 {
    color: var(--ukmb-public-ink) !important;
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main p,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main label,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main li,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main td,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main small,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content p,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content label,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content li,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content td,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content small {
    color: var(--ukmb-public-ink) !important;
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main .text-muted,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .text-muted,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main .form-text,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .form-text {
    color: var(--ukmb-public-muted) !important;
}
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main .form-control,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main input:not([type="checkbox"]):not([type="radio"]),
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main select,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main textarea,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content .form-control,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content input:not([type="checkbox"]):not([type="radio"]),
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content select,
html[data-ukmb-theme] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content textarea {
    background-color: var(--ukmb-public-card) !important;
    border-color: var(--ukmb-public-border) !important;
    color: var(--ukmb-public-ink) !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main input::placeholder,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) main textarea::placeholder,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content input::placeholder,
html[data-ukmb-theme="dark"] body:has(.ukmb-site-chrome):not(:has(.hero-section)) .page-content textarea::placeholder {
    color: var(--ukmb-public-muted) !important;
    opacity: 1 !important;
}

/* Shared theme changes animate only color surfaces; no layout transitions. */
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-main,
html[data-ukmb-theme] body:has(.user-app) .user-main,
html[data-ukmb-theme] body:has(.ukmb-site-chrome) main {
    transition: background-color .18s ease, color .18s ease;
}

/* ======================================================================
   03 NOV 2026 — PROJECT-WIDE CONTRAST ACCEPTANCE CORRECTIONS
   This is a continuation of the single shared theme system. It fixes
   component-owned fixed colors observed on DEV without changing layout,
   routes, actions, or business workflows.
   ====================================================================== */

/* Shared Admin / Consultant / Member dashboard cards and tables.
   Semantic action buttons, status badges and the emerald consultant cards
   remain component-owned and are intentionally excluded. */
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .overview-card:not(.consultant-profile-card):not(.consultant-card),
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .quick-card,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .rule-item {
    background: var(--ukmb-theme-surface-soft) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .overview-card h3,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .quick-card h4,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .dashboard-section > h3,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .section-header h2 {
    color: var(--ukmb-theme-heading) !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .overview-card p,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .quick-card p,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .rule-text,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .section-header p {
    color: var(--ukmb-theme-ink) !important;
    opacity: .9 !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table-wrap,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .table-responsive {
    background: var(--ukmb-theme-surface) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table {
    background: var(--ukmb-theme-surface) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table thead th {
    background: var(--ukmb-theme-nav) !important;
    color: #fff8df !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table tbody tr,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table tbody td {
    background: var(--ukmb-theme-surface-soft) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table tbody td strong,
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table tbody td small {
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell) .ukmb-shell .dashboard-content .ukmb-table .table-empty {
    color: var(--ukmb-theme-muted) !important;
}

/* Family Center — remove fixed near-black/emerald plates from the page-owned
   wrappers while keeping the established card geometry and green shell. */
html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content {
    background: var(--ukmb-theme-page) !important;
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content > .dashboard-section {
    background: var(--ukmb-theme-surface) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
    box-shadow: var(--ukmb-theme-shadow) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-family .overview-grid,
html[data-ukmb-theme] body .ukmb-shell.page-family .quick-grid,
html[data-ukmb-theme] body .ukmb-shell.page-family .rules-grid {
    background: transparent !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-family .overview-card,
html[data-ukmb-theme] body .ukmb-shell.page-family .quick-card,
html[data-ukmb-theme] body .ukmb-shell.page-family .rules-grid .rule-item {
    background: var(--ukmb-theme-surface-soft) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
    box-shadow: none !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-family .overview-card h3,
html[data-ukmb-theme] body .ukmb-shell.page-family .quick-card h4,
html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-section > h3,
html[data-ukmb-theme] body .ukmb-shell.page-family .section-header h2 {
    color: var(--ukmb-theme-heading) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-family .overview-card p,
html[data-ukmb-theme] body .ukmb-shell.page-family .quick-card p,
html[data-ukmb-theme] body .ukmb-shell.page-family .rules-grid .rule-item .rule-text,
html[data-ukmb-theme] body .ukmb-shell.page-family .section-header p {
    color: var(--ukmb-theme-ink) !important;
    opacity: .92 !important;
}

/* Matching Center — the intro, workflow tiles and record links use the
   same theme tokens instead of fixed dark-green foregrounds. */
html[data-ukmb-theme] body .ukmb-shell.page-matching .dashboard-content {
    background: var(--ukmb-theme-page) !important;
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-matching .dashboard-content > .dashboard-section {
    background: var(--ukmb-theme-surface) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
    box-shadow: var(--ukmb-theme-shadow) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-matching .matching-center-intro,
html[data-ukmb-theme] body .ukmb-shell.page-matching .quick-card {
    background: var(--ukmb-theme-surface-soft) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
    box-shadow: none !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-matching .section-header h2,
html[data-ukmb-theme] body .ukmb-shell.page-matching .dashboard-section > h3,
html[data-ukmb-theme] body .ukmb-shell.page-matching .quick-card h4,
html[data-ukmb-theme] body .ukmb-shell.page-matching .matching-secondary-links a {
    color: var(--ukmb-theme-heading) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-matching .section-header p,
html[data-ukmb-theme] body .ukmb-shell.page-matching .matching-center-intro p,
html[data-ukmb-theme] body .ukmb-shell.page-matching .quick-card p,
html[data-ukmb-theme] body .ukmb-shell.page-matching .matching-secondary-links,
html[data-ukmb-theme] body .ukmb-shell.page-matching .matching-secondary-links span {
    color: var(--ukmb-theme-ink) !important;
    opacity: .92 !important;
}

/* Membership Control and Membership History — page cards, rule labels and
   history rows are all readable in both modes. Existing package/action
   buttons and the separately locked Packages page layout are untouched. */
html[data-ukmb-theme] body .ukmb-shell.page-membership .dashboard-content > .dashboard-section {
    background: var(--ukmb-theme-surface) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .overview-grid,
html[data-ukmb-theme] body .ukmb-shell.page-membership .quick-grid,
html[data-ukmb-theme] body .ukmb-shell.page-membership .rules-grid {
    background: transparent !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .overview-card,
html[data-ukmb-theme] body .ukmb-shell.page-membership .quick-card,
html[data-ukmb-theme] body .ukmb-shell.page-membership .rule-item {
    background: var(--ukmb-theme-surface-soft) !important;
    color: var(--ukmb-theme-ink) !important;
    border-color: var(--ukmb-theme-border) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .overview-card h3,
html[data-ukmb-theme] body .ukmb-shell.page-membership .quick-card h4,
html[data-ukmb-theme] body .ukmb-shell.page-membership .section-header h2,
html[data-ukmb-theme] body .ukmb-shell.page-membership .dashboard-section > h3 {
    color: var(--ukmb-theme-heading) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .overview-card p,
html[data-ukmb-theme] body .ukmb-shell.page-membership .quick-card p,
html[data-ukmb-theme] body .ukmb-shell.page-membership .rule-text,
html[data-ukmb-theme] body .ukmb-shell.page-membership .section-header p {
    color: var(--ukmb-theme-ink) !important;
    opacity: .92 !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .ukmb-table-wrap {
    background: var(--ukmb-theme-surface) !important;
    border: 1px solid var(--ukmb-theme-border) !important;
    border-radius: 18px !important;
    padding: 12px !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .ukmb-table thead th {
    background: var(--ukmb-theme-nav) !important;
    color: #fff8df !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .ukmb-table tbody tr,
html[data-ukmb-theme] body .ukmb-shell.page-membership .ukmb-table tbody td {
    background: var(--ukmb-theme-surface-soft) !important;
    color: var(--ukmb-theme-ink) !important;
}
html[data-ukmb-theme] body .ukmb-shell.page-membership .ukmb-table tbody td strong,
html[data-ukmb-theme] body .ukmb-shell.page-membership .ukmb-table tbody td small {
    color: var(--ukmb-theme-ink) !important;
}

/* ==========================================================================
   PUBLIC WEBSITE — PROJECT-WIDE LIGHT / DARK THEME
   Shared public shell only; no layout, spacing, sizing or business logic changes.
========================================================================== */
html[data-ukmb-theme="light"] body .page-wrapper .page-content {
    background:#f2f0e7!important;color:#173f38!important;
    --ukmb-public-page:#f2f0e7;--ukmb-public-section:#f8f7f1;
    --ukmb-public-card:#fffdf8;--ukmb-public-border:#deded3;
    --ukmb-public-ink:#173f38;--ukmb-public-muted:#586d65;
    --ukmb-public-heading:#12483d;--ukmb-public-input:#fffefa;
}
html[data-ukmb-theme="dark"] body .page-wrapper .page-content {
    background:#101916!important;color:#edf3ee!important;
    --ukmb-public-page:#101916;--ukmb-public-section:#17231e;
    --ukmb-public-card:#1d2b25;--ukmb-public-border:#3a4b42;
    --ukmb-public-ink:#edf3ee;--ukmb-public-muted:#c0cec5;
    --ukmb-public-heading:#f0cd70;--ukmb-public-input:#202e28;
}

/* Generic public-page content. Blog and Offers have dedicated theme rules below
   their own page stylesheets; do not override their intentional two-tone cards. */
html[data-ukmb-theme="light"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content :is(
    .bg-alt,.section-light,.section-bg,.content-section,.content-card,.info-card,
    .form-card,.form-section,.blog-intro,.blog-content-card,.category-sidebar,
    .sidebar-card,.offer-card,.special-offer-card,.contact-card,.service-card,
    .form-wrapper,.value-card,.team-card,.mission-card,.faq-card,.article-card,.post-card
) {
    background-color:var(--ukmb-public-card)!important;
    color:var(--ukmb-public-ink)!important;border-color:var(--ukmb-public-border)!important;
}
html[data-ukmb-theme="dark"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content :is(
    .bg-alt,.section-light,.section-bg,.content-section,.content-card,.info-card,
    .form-card,.form-section,.blog-intro,.blog-content-card,.category-sidebar,
    .sidebar-card,.offer-card,.special-offer-card,.contact-card,.service-card,
    .form-wrapper,.value-card,.team-card,.mission-card,.faq-card,.article-card,.post-card
) {
    background-color:var(--ukmb-public-card)!important;
    color:var(--ukmb-public-ink)!important;border-color:var(--ukmb-public-border)!important;
}

/* Theme-aware general text for public pages without their own bespoke theme palette. */
html[data-ukmb-theme="light"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content :is(h1,h2,h3,h4,h5,h6) {
    color:var(--ukmb-public-heading)!important;
}
html[data-ukmb-theme="light"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content :is(
    p,li,label,small,.description,.subtitle,.section-description,.section-subtitle,.text-muted,.muted,.meta
) {color:var(--ukmb-public-ink)!important}
html[data-ukmb-theme="dark"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content :is(h1,h2,h3,h4,h5,h6) {
    color:var(--ukmb-public-heading)!important;
}
html[data-ukmb-theme="dark"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content :is(
    p,li,label,small,.description,.subtitle,.section-description,.section-subtitle,.text-muted,.muted,.meta
) {color:var(--ukmb-public-ink)!important}

/* Shared form controls across public pages. */
html[data-ukmb-theme="light"] body .page-wrapper .page-content :is(
 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]),
 select,textarea
){background:#fffefa!important;color:#173f38!important;border-color:#d8d7c9!important}
html[data-ukmb-theme="dark"] body .page-wrapper .page-content :is(
 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]),
 select,textarea
){background:#202e28!important;color:#edf3ee!important;border-color:#3a4b42!important}
html[data-ukmb-theme="light"] body .page-wrapper .page-content :is(input,textarea)::placeholder{color:#718078!important;opacity:1}
html[data-ukmb-theme="dark"] body .page-wrapper .page-content :is(input,textarea)::placeholder{color:#b8c7bd!important;opacity:1}

/* Branded blue/green hero panels retain their light foreground in both themes. */
html[data-ukmb-theme] body .page-wrapper .page-content :is(
 .page-hero,.about-hero,.contact-hero,.signup-card,.countdown-wrapper,
 .contact-notice,.important-links,.stats-section,.final-cta-section
) :is(h1,h2,h3,h4,h5,h6,p,li,span,label,small){
    color:#f3f5f0!important;
}
html[data-ukmb-theme] body .page-wrapper .page-content :is(
 .page-hero,.about-hero,.contact-hero,.signup-card,.countdown-wrapper,
 .contact-notice,.important-links,.stats-section,.final-cta-section
) :is(h1,h2,h3,h4,h5,h6,.gold,.accent,.section-title){
    color:#f0cd70!important;
}
html[data-ukmb-theme] body .page-wrapper .page-content .page-hero :is(.page-hero-title,.page-hero-subtitle){
    color:#fff!important;
}

/* Homepage section canvas follows the toggle. Premium green/gold card faces remain branded. */
html[data-ukmb-theme="light"] body .page-wrapper .page-content :is(.services,.global-branches,.success-stories,.homepage-section){
    background-color:#f8f7f1!important;color:#173f38!important;
}
html[data-ukmb-theme="dark"] body .page-wrapper .page-content :is(.services,.global-branches,.success-stories,.homepage-section){
    background-color:#101916!important;color:#edf3ee!important;
}
html[data-ukmb-theme="light"] body .page-wrapper .page-content :is(.services,.global-branches,.success-stories,.homepage-section) .section-description,
html[data-ukmb-theme="light"] body .page-wrapper .page-content :is(.services,.global-branches,.success-stories,.homepage-section) .section-subtitle{color:#52685f!important}
html[data-ukmb-theme="dark"] body .page-wrapper .page-content :is(.services,.global-branches,.success-stories,.homepage-section) .section-description,
html[data-ukmb-theme="dark"] body .page-wrapper .page-content :is(.services,.global-branches,.success-stories,.homepage-section) .section-subtitle{color:#d7e1da!important}

/* About page: section and card surfaces change; intentionally dark hero/stat/CTA
   bands retain white copy and muted-gold emphasis. */
html[data-ukmb-theme="light"] body:has(.about-page) .about-page{background:#f2f0e7!important;color:#173f38!important}
html[data-ukmb-theme="light"] body:has(.about-page) .about-page :is(.bg-alt,.principle-card,.team-card,.credential-card,.founder-quote,.founder-image){background-color:#fffdf8!important;color:#173f38!important;border-color:#deded3!important}
html[data-ukmb-theme="light"] body:has(.about-page) .about-page :is(h2,h3,h4){color:#17483f!important}
html[data-ukmb-theme="light"] body:has(.about-page) .about-page :is(p,li,.section-subtitle){color:#344b41!important}
html[data-ukmb-theme="dark"] body:has(.about-page) .about-page{background:#101916!important;color:#edf3ee!important}
html[data-ukmb-theme="dark"] body:has(.about-page) .about-page :is(section:not(.about-hero):not(.stats-section):not(.final-cta-section),.bg-alt){background-color:#17231e!important;color:#edf3ee!important}
html[data-ukmb-theme="dark"] body:has(.about-page) .about-page :is(.principle-card,.team-card,.credential-card,.founder-quote,.founder-image){background:#1d2b25!important;color:#edf3ee!important;border-color:#3a4b42!important}
html[data-ukmb-theme="dark"] body:has(.about-page) .about-page :is(h2,h3,h4){color:#f0cd70!important}
html[data-ukmb-theme="dark"] body:has(.about-page) .about-page :is(p,li,.section-subtitle){color:#dce7df!important}

/* Contact page: its dark notice/service/quick-link bands stay dark with light copy;
   all light information, plan, form and map surfaces follow the selected theme. */
html[data-ukmb-theme="light"] body:has(.contact-page) .contact-page{background:#f2f0e7!important;color:#173f38!important}
html[data-ukmb-theme="light"] body:has(.contact-page) .contact-page :is(.contact-main,.service-plans,.map-section,.additional-services){background:#f8f7f1!important;color:#173f38!important}
html[data-ukmb-theme="light"] body:has(.contact-page) .contact-page :is(.contact-card,.contact-tile,.plan-card,.info-card,.contact-form-section,.modal-content){background:#fffdf8!important;color:#173f38!important;border-color:#deded3!important}
html[data-ukmb-theme="light"] body:has(.contact-page) .contact-page :is(.contact-card,.contact-tile,.plan-card,.info-card,.contact-form-section,.modal-content) :is(h1,h2,h3,h4,p,span,small,label){color:#173f38!important}
html[data-ukmb-theme="dark"] body:has(.contact-page) .contact-page{background:#101916!important;color:#edf3ee!important}
html[data-ukmb-theme="dark"] body:has(.contact-page) .contact-page :is(.contact-main,.service-plans,.map-section,.additional-services){background:#17231e!important;color:#edf3ee!important}
html[data-ukmb-theme="dark"] body:has(.contact-page) .contact-page :is(.contact-card,.contact-tile,.plan-card,.info-card,.contact-form-section,.modal-content){background:#1d2b25!important;color:#edf3ee!important;border-color:#3a4b42!important}
html[data-ukmb-theme="dark"] body:has(.contact-page) .contact-page :is(.contact-card,.contact-tile,.plan-card,.info-card,.contact-form-section,.modal-content) :is(h1,h2,h3,h4){color:#f0cd70!important}
html[data-ukmb-theme="dark"] body:has(.contact-page) .contact-page :is(.contact-card,.contact-tile,.plan-card,.info-card,.contact-form-section,.modal-content) :is(p,span,small,label){color:#dce7df!important}
html[data-ukmb-theme] body:has(.contact-page) .contact-page :is(.contact-notice,.service-card,.important-links){background:linear-gradient(135deg,#0b4650,#082c35)!important;color:#f3f5f0!important}
html[data-ukmb-theme] body:has(.contact-page) .contact-page :is(.contact-notice,.service-card,.important-links) :is(h1,h2,h3,h4,p,span,small,a){color:#f3f5f0!important}
html[data-ukmb-theme] body:has(.contact-page) .contact-page :is(.contact-notice,.service-card,.important-links) :is(h1,h2,h3,h4){color:#f0cd70!important}

/* Signup page: the deep-green signup intro remains branded; the form canvas,
   fields and supporting panels switch as a unit. */
html[data-ukmb-theme="light"] body:has(.signup-main) .signup-main{background:#f2f0e7!important;color:#173f38!important}
html[data-ukmb-theme="dark"] body:has(.signup-main) .signup-main{background:#101916!important;color:#edf3ee!important}
html[data-ukmb-theme="light"] body:has(.signup-main) .signup-main :is(.field,.form-group,.signup-form-section,.signup-section,.signup-step-content,.signup-panel){color:#173f38!important}
html[data-ukmb-theme="dark"] body:has(.signup-main) .signup-main :is(.field,.form-group,.signup-form-section,.signup-section,.signup-step-content,.signup-panel){color:#edf3ee!important}
html[data-ukmb-theme="dark"] body:has(.signup-main) .signup-main :is(.field label,.form-group label,.field small,.form-group small){color:#dce7df!important}
html[data-ukmb-theme="light"] body:has(.signup-main) .signup-main :is(.field label,.form-group label,.field small,.form-group small){color:#344b41!important}

/* Public tables and tabular content. */
html[data-ukmb-theme="light"] body .page-wrapper .page-content :is(table,.table-wrap,.table-responsive){background:#fffdf8!important;color:#173f38!important}
html[data-ukmb-theme="dark"] body .page-wrapper .page-content :is(table,.table-wrap,.table-responsive){background:#1d2b25!important;color:#edf3ee!important}
html[data-ukmb-theme="light"] body .page-wrapper .page-content :is(th,td){color:#173f38!important;border-color:#deded3!important}
html[data-ukmb-theme="dark"] body .page-wrapper .page-content :is(th,td){color:#edf3ee!important;border-color:#3a4b42!important}


/* Remaining public route sections use the same page/section canvas even when
   an individual legacy stylesheet supplied a fixed white/cream background.
   Branded hero, campaign and intentionally dark CTA bands are excluded. */
html[data-ukmb-theme="light"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content section:not(
 .page-hero,.about-hero,.contact-hero,.stats-section,.important-links,
 .final-cta-section,.signup-card,.countdown-wrapper,.contact-notice,
 .service-card,.dark-panel,.dark-section,.cta-section
) {
    background-color:#f8f7f1!important;
    color:#173f38!important;
}
html[data-ukmb-theme="dark"] body:not(:has(.blog-page)):not(:has(.offers-page)) .page-wrapper .page-content section:not(
 .page-hero,.about-hero,.contact-hero,.stats-section,.important-links,
 .final-cta-section,.signup-card,.countdown-wrapper,.contact-notice,
 .service-card,.dark-panel,.dark-section,.cta-section
) {
    background-color:#17231e!important;
    color:#edf3ee!important;
}

html[data-ukmb-theme] body:has(.signup-main) .page-wrapper .page-content .signup-badges {
    background:transparent!important;
}



/* ================================================================
   UKMB CONSULTANTS MODULE — THEME CONTRAST FIX (15-NOV-2026)
   Scoped to consultant pages only. Keeps the established green/gold
   cards while making text and tables legible in both appearances.
================================================================ */

/* Page-level headings and action controls */
html[data-ukmb-theme="light"] .consultants-index-page .section-header h2,
html[data-ukmb-theme="light"] .consultant-assignments-page .section-header h2,
html[data-ukmb-theme="light"] .consultant-communication-page .section-header h2,
html[data-ukmb-theme="light"] .consultant-performance-page .section-header h2 {
    color:#075747!important;
}
html[data-ukmb-theme="dark"] .consultants-index-page .section-header h2,
html[data-ukmb-theme="dark"] .consultant-assignments-page .section-header h2,
html[data-ukmb-theme="dark"] .consultant-communication-page .section-header h2,
html[data-ukmb-theme="dark"] .consultant-performance-page .section-header h2 {
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultants-index-page .section-header p,
html[data-ukmb-theme="light"] .consultant-assignments-page .section-header p,
html[data-ukmb-theme="light"] .consultant-communication-page .section-header p,
html[data-ukmb-theme="light"] .consultant-performance-page .section-header p {
    color:#536b64!important;
}

/* Consultants Management */
html[data-ukmb-theme="light"] .consultants-index-page.dashboard-section,
html[data-ukmb-theme="light"] .dashboard-section.consultants-index-page {
    background:#fffdf7!important;
    border:1px solid #ded8c8!important;
    box-shadow:0 10px 28px rgba(29,54,45,.08)!important;
}
html[data-ukmb-theme="light"] .consultants-index-page .overview-card {
    background:#edf1e9!important;
    border:1px solid #d8dfd1!important;
    box-shadow:0 8px 20px rgba(29,54,45,.06)!important;
}
html[data-ukmb-theme="light"] .consultants-index-page .overview-card span,
html[data-ukmb-theme="light"] .consultants-index-page .overview-card h3 {
    color:#064c40!important;
}
html[data-ukmb-theme="light"] .consultants-index-page .consultant-list-card,
html[data-ukmb-theme="dark"] .consultants-index-page .consultant-list-card {
    background:linear-gradient(120deg,#176b53,#064438)!important;
    border:1px solid rgba(218,180,80,.62)!important;
}
html[data-ukmb-theme="light"] .consultants-index-page .consultant-list-body h3,
html[data-ukmb-theme="dark"] .consultants-index-page .consultant-list-body h3,
html[data-ukmb-theme="light"] .consultants-index-page .consultant-list-meta,
html[data-ukmb-theme="dark"] .consultants-index-page .consultant-list-meta,
html[data-ukmb-theme="light"] .consultants-index-page .consultant-list-meta b,
html[data-ukmb-theme="dark"] .consultants-index-page .consultant-list-meta b {
    color:#fff!important;
}
html[data-ukmb-theme="light"] .consultants-index-page .consultant-list-body h3,
html[data-ukmb-theme="dark"] .consultants-index-page .consultant-list-body h3,
html[data-ukmb-theme="light"] .consultants-index-page .consultant-list-meta b,
html[data-ukmb-theme="dark"] .consultants-index-page .consultant-list-meta b {
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultants-index-page .consultant-list-meta span,
html[data-ukmb-theme="dark"] .consultants-index-page .consultant-list-meta span {
    color:#f4faf7!important;
}

/* Consultant Assignments: retain green assignment boards and white controls */
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-stats-frame,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-stats-frame {
    background:linear-gradient(145deg,#07100e,#061411)!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-selection-card,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-selection-card {
    background:linear-gradient(145deg,#08634f,#034337)!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-selection-head h3,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-selection-head h3,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-selection-head p,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-selection-head p,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-select-block label,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-select-block label,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-select-block small,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-select-block small {
    color:#fff!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-selection-head>span,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-selection-head>span,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-current-kicker,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-current-kicker,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table-heading h3,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table-heading h3,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table-heading>span,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table-heading>span {
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-current-card,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-current-card,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table-card,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table-card {
    background:linear-gradient(145deg,#075b4b,#043b33)!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-current-card h3,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-current-card h3,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-current-card p,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-current-card p,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-current-pair strong,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-current-pair strong,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table-heading p,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table-heading p,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table td,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table td {
    color:#f5faf8!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-current-pair span,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-current-pair span,
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table th,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table th {
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table tbody tr,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table tbody tr {
    background:rgba(0,20,16,.34)!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-table td,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-table td {
    border-bottom:1px solid rgba(255,255,255,.08)!important;
}
html[data-ukmb-theme="light"] .consultant-assignments-page .assignment-select-block select,
html[data-ukmb-theme="dark"] .consultant-assignments-page .assignment-select-block select {
    background:#f8faf9!important;
    color:#17352f!important;
}

/* Communication Cases: eliminate pale-on-pale and dark-on-green text */
html[data-ukmb-theme="light"] .consultant-communication-page,
html[data-ukmb-theme="dark"] .consultant-communication-page {
    color:#f4faf7!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-note,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-note {
    background:#063d37!important;
    color:#eaf6f1!important;
    border:1px solid rgba(218,180,80,.35)!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-panel,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-panel {
    background:linear-gradient(145deg,#17634f,#063d34)!important;
    border:1px solid rgba(218,180,80,.48)!important;
    box-shadow:0 12px 26px rgba(0,40,32,.14)!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-head h3,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-head h3,
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-head p,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-head p,
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-card h4,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-card h4,
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-card p,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-card p,
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-card>div>small,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-card>div>small {
    color:#f4faf7!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-head h3,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-head h3,
html[data-ukmb-theme="light"] .consultant-communication-page .cc-kicker,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-kicker {
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-head p,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-head p,
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-card h4 small,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-card h4 small,
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-card>div>small,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-card>div>small {
    color:#d4e7df!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-card,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-card {
    background:rgba(0,29,24,.28)!important;
    border:1px solid rgba(255,255,255,.13)!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-empty,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-empty {
    background:rgba(0,27,23,.24)!important;
    border:1px solid rgba(255,255,255,.12)!important;
    color:#eaf5f1!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-count,
html[data-ukmb-theme="dark"] .consultant-communication-page .cc-review-count {
    background:rgba(255,228,119,.14)!important;
    border:1px solid rgba(255,228,119,.35)!important;
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultant-communication-page .cc-review-head {
    border-bottom-color:rgba(255,255,255,.16)!important;
}

/* Consultant Performance: dark reporting board with legible headings and rows */
html[data-ukmb-theme="light"] .consultant-performance-page .overview-grid,
html[data-ukmb-theme="dark"] .consultant-performance-page .overview-grid {
    background:linear-gradient(145deg,#07100e,#061411)!important;
    border:1px solid rgba(218,180,80,.42)!important;
    border-radius:18px!important;
    padding:24px!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .overview-card,
html[data-ukmb-theme="dark"] .consultant-performance-page .overview-card {
    background:#203c34!important;
    border:1px solid rgba(218,180,80,.30)!important;
    box-shadow:none!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .overview-card span,
html[data-ukmb-theme="dark"] .consultant-performance-page .overview-card span {
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .overview-card h3,
html[data-ukmb-theme="dark"] .consultant-performance-page .overview-card h3 {
    color:#fff!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .security-card,
html[data-ukmb-theme="dark"] .consultant-performance-page .security-card {
    background:linear-gradient(145deg,#075b4b,#043b33)!important;
    border:1px solid rgba(218,180,80,.42)!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .admin-table th,
html[data-ukmb-theme="dark"] .consultant-performance-page .admin-table th {
    background:#063d35!important;
    color:#ffe477!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .admin-table tbody tr,
html[data-ukmb-theme="dark"] .consultant-performance-page .admin-table tbody tr {
    background:rgba(0,22,18,.34)!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .admin-table td,
html[data-ukmb-theme="dark"] .consultant-performance-page .admin-table td {
    color:#f4faf7!important;
}
html[data-ukmb-theme="light"] .consultant-performance-page .admin-table td strong,
html[data-ukmb-theme="dark"] .consultant-performance-page .admin-table td strong {
    color:#ffe477!important;
}

/* Small-screen safeguards across all four pages */
@media(max-width:700px) {
    .consultants-index-page .consultant-list-meta span {white-space:normal!important;overflow-wrap:anywhere!important}
    .consultant-communication-page .cc-review-actions {justify-content:flex-start!important}
    .consultant-assignments-page .assignment-selection-grid {grid-template-columns:1fr!important}
    .consultant-assignments-page .assignment-current-card {grid-template-columns:1fr!important}
}


/* ==========================================================================
   UKMB FAMILY MAIN PAGE — FINAL VISUAL CORRECTIONS (17 NOV 2026)
   Scoped only to /admin/family/ main page. This is intentionally appended
   after the existing Family theme rules so these page-specific corrections
   take precedence without changing other modules.
   ========================================================================== */

/* Overview cards: icon | title | count. Keep all three cards balanced. */
html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 64px !important;
    grid-template-rows: minmax(56px, auto) !important;
    align-items: center !important;
    column-gap: 12px !important;
    min-width: 0 !important;
    min-height: 76px !important;
    padding: 12px 14px !important;
    text-align: left !important;
}

html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card > span:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    font-size: 20px !important;
}

html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card p {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    overflow-wrap: anywhere;
    opacity: 1 !important;
}

html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card h3 {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: grid !important;
    place-items: center !important;
    width: 64px !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    border: 1px solid rgba(216, 180, 93, 0.42) !important;
    border-radius: 14px !important;
    background: #101b17 !important;
    color: #d7e1dc !important;
    -webkit-text-fill-color: #d7e1dc !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0.2px !important;
    text-align: center !important;
}

/* Light Mode: a richer sage surface, dark title and a clearly visible counter. */
html[data-ukmb-theme="light"] body .ukmb-shell.page-family .dashboard-content .overview-card {
    background: linear-gradient(135deg, #e5eee7 0%, #d9e6dd 100%) !important;
    border-color: rgba(23, 63, 56, 0.22) !important;
    box-shadow: 0 8px 22px rgba(20, 48, 40, 0.10),
                inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
}

html[data-ukmb-theme="light"] body .ukmb-shell.page-family .dashboard-content .overview-card p {
    color: #173f38 !important;
    -webkit-text-fill-color: #173f38 !important;
}

/* Dark Mode: gold title and light-grey counter on a dark badge. */
html[data-ukmb-theme="dark"] body .ukmb-shell.page-family .dashboard-content .overview-card {
    background: linear-gradient(135deg, #20342d 0%, #192a24 100%) !important;
    border-color: rgba(216, 180, 93, 0.34) !important;
}

html[data-ukmb-theme="dark"] body .ukmb-shell.page-family .dashboard-content .overview-card p {
    color: #f0cd70 !important;
    -webkit-text-fill-color: #f0cd70 !important;
}

/* Family Operations cards: place the heading at the top of the text block,
   beside the icon; keep its description directly underneath. */
html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .quick-card {
    align-content: center !important;
    grid-template-rows: min-content min-content !important;
    row-gap: 3px !important;
}

html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .quick-card > div:first-child {
    align-self: center !important;
}

html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .quick-card h4 {
    align-self: end !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    text-align: left !important;
}

html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .quick-card p {
    align-self: start !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    text-align: left !important;
    opacity: 1 !important;
}

html[data-ukmb-theme="dark"] body .ukmb-shell.page-family .dashboard-content .quick-card h4 {
    color: #f0cd70 !important;
    -webkit-text-fill-color: #f0cd70 !important;
}

html[data-ukmb-theme="light"] body .ukmb-shell.page-family .dashboard-content .quick-card h4 {
    color: #173f38 !important;
    -webkit-text-fill-color: #173f38 !important;
}

html[data-ukmb-theme="dark"] body .ukmb-shell.page-family .dashboard-content .quick-card p {
    color: #c7d1cc !important;
    -webkit-text-fill-color: #c7d1cc !important;
}

html[data-ukmb-theme="light"] body .ukmb-shell.page-family .dashboard-content .quick-card p {
    color: #53665f !important;
    -webkit-text-fill-color: #53665f !important;
}

/* Tablet and mobile: preserve hierarchy and wrap without overlap. */
@media (max-width: 1024px) {
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card {
        grid-template-columns: 40px minmax(0, 1fr) 58px !important;
        column-gap: 10px !important;
    }
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card h3 {
        width: 58px !important;
    }
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card p {
        font-size: 15px !important;
    }
}

@media (max-width: 680px) {
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card {
        grid-template-columns: 38px minmax(0, 1fr) 54px !important;
        min-height: 66px !important;
        padding: 10px 12px !important;
        column-gap: 9px !important;
    }
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card > span:first-child {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px !important;
    }
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card p {
        font-size: 14px !important;
        text-align: left !important;
    }
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .overview-card h3 {
        width: 54px !important;
        min-height: 44px !important;
        font-size: 16px !important;
    }
    html[data-ukmb-theme] body .ukmb-shell.page-family .dashboard-content .quick-card h4 {
        font-size: 15px !important;
    }
}

/* UKMB Family Rules intentionally remain unchanged. */


/* ==========================================================================
   UKMB FAMILY MAIN PAGE — APPROVED MASTER THEME COLOR CORRECTION
   Scoped only to /admin/family/index.php via .page-family-home.
   Follows the approved Premium Sign-Up Light/Dark color standard.
   Does not change layout, typography family, navigation, or functionality.
   ========================================================================== */

/* Overview navigation titles: dark mode gold, light mode deep charcoal. */
html[data-ukmb-theme="dark"] body .ukmb-shell.page-family-home .dashboard-content .overview-card p {
    color: #f0cd70 !important;
    -webkit-text-fill-color: #f0cd70 !important;
    font-weight: 800 !important;
}

html[data-ukmb-theme="light"] body .ukmb-shell.page-family-home .dashboard-content .overview-card p {
    color: #173f38 !important;
    -webkit-text-fill-color: #173f38 !important;
    font-weight: 800 !important;
}

/* Numeric counters sit on dark badges in both themes: keep the digits light. */
html[data-ukmb-theme="dark"] body .ukmb-shell.page-family-home .dashboard-content .overview-card h3,
html[data-ukmb-theme="light"] body .ukmb-shell.page-family-home .dashboard-content .overview-card h3 {
    color: #d7e1dc !important;
    -webkit-text-fill-color: #d7e1dc !important;
}

/* Family Operations navigation titles follow the master heading colors. */
html[data-ukmb-theme="dark"] body .ukmb-shell.page-family-home .dashboard-content .quick-card h4 {
    color: #f0cd70 !important;
    -webkit-text-fill-color: #f0cd70 !important;
}

html[data-ukmb-theme="light"] body .ukmb-shell.page-family-home .dashboard-content .quick-card h4 {
    color: #173f38 !important;
    -webkit-text-fill-color: #173f38 !important;
}

/* Clickable-card descriptions remain secondary, but clearly readable. */
html[data-ukmb-theme="dark"] body .ukmb-shell.page-family-home .dashboard-content .quick-card p {
    color: #c7d1cc !important;
    -webkit-text-fill-color: #c7d1cc !important;
}

html[data-ukmb-theme="light"] body .ukmb-shell.page-family-home .dashboard-content .quick-card p {
    color: #53665f !important;
    -webkit-text-fill-color: #53665f !important;
}

/* UKMB Family Rules are intentionally not targeted by this correction. */


/* =====================================================================
   UKMB MESSAGES CENTER — FAMILY CENTER APPROVED CARD LANGUAGE
   Scope: /admin/communication/messages/ landing page only.
   Keep the shared layout and all message workflows unchanged.
===================================================================== */

/* Page title and supporting line */
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .dashboard-section > .section-header h2 {
    color: #f3cf69 !important;
    -webkit-text-fill-color: #f3cf69 !important;
    font-family: var(--ukmb-font-heading) !important;
}
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .dashboard-section > .section-header h2 {
    color: #17483c !important;
    -webkit-text-fill-color: #17483c !important;
    font-family: var(--ukmb-font-heading) !important;
}
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .dashboard-section > .section-header p {
    color: #d4e2dc !important;
    -webkit-text-fill-color: #d4e2dc !important;
}
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .dashboard-section > .section-header p {
    color: #60756d !important;
    -webkit-text-fill-color: #60756d !important;
}

/* Three summary cards: icon left, centered label, numeric box right. */
.ukmb-shell.page-messages .overview-grid {
    gap: 12px !important;
    margin: 14px 0 18px !important;
}
.ukmb-shell.page-messages .overview-grid .overview-card {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) 56px !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    column-gap: 10px !important;
    min-height: 76px !important;
    height: 76px !important;
    padding: 10px 12px !important;
    text-align: center !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    transform: none !important;
}
.ukmb-shell.page-messages .overview-grid .overview-card > span:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    border-radius: 11px !important;
    font-size: 23px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}
.ukmb-shell.page-messages .overview-grid .overview-card p {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: stretch !important;
    margin: 0 !important;
    font-family: var(--ukmb-font-heading) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: center !important;
}
.ukmb-shell.page-messages .overview-grid .overview-card h3 {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    min-width: 56px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 11px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    font-variant-numeric: tabular-nums lining-nums !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    box-sizing: border-box !important;
}

/* Light-mode summary palette */
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .overview-grid .overview-card {
    background: #e8f0ea !important;
    border: 1px solid #d2ddd3 !important;
    box-shadow: 0 7px 18px rgba(31, 57, 46, .10) !important;
}
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .overview-grid .overview-card > span:first-child,
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .overview-grid .overview-card h3 {
    background: #101b16 !important;
    border: 1px solid rgba(216, 180, 93, .34) !important;
    color: #fffdf4 !important;
    -webkit-text-fill-color: #fffdf4 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,.18) !important;
}
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .overview-grid .overview-card p {
    color: #24483d !important;
    -webkit-text-fill-color: #24483d !important;
}

/* Dark-mode summary palette */
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .overview-grid .overview-card {
    background: linear-gradient(135deg, #164d40, #10382f) !important;
    border: 1px solid rgba(216, 180, 93, .32) !important;
    box-shadow: 0 7px 18px rgba(0,0,0,.22) !important;
}
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .overview-grid .overview-card > span:first-child,
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .overview-grid .overview-card h3 {
    background: #07130f !important;
    border: 1px solid rgba(216, 180, 93, .42) !important;
    color: #f3cf69 !important;
    -webkit-text-fill-color: #f3cf69 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.30) !important;
}
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .overview-grid .overview-card p {
    color: #f3ead0 !important;
    -webkit-text-fill-color: #f3ead0 !important;
}

/* Communication rules: compact Family Center-style cards with a boxed icon. */
.ukmb-shell.page-messages .rules-section {
    margin-top: 14px !important;
}
.ukmb-shell.page-messages .rules-section > h3 {
    font-family: var(--ukmb-font-heading) !important;
    font-size: 17px !important;
    margin: 0 0 10px !important;
}
.ukmb-shell.page-messages .rules-grid {
    gap: 10px !important;
}
.ukmb-shell.page-messages .rules-grid .rule-item {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 62px !important;
    height: 62px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    transform: none !important;
}
.ukmb-shell.page-messages .rules-grid .rule-item .rule-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 9px !important;
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    background: #075b49 !important;
    color: #fffdf4 !important;
}
.ukmb-shell.page-messages .rules-grid .rule-item .rule-text {
    display: block !important;
    text-align: center !important;
    font-family: var(--ukmb-font-body) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .rules-grid .rule-item {
    background: #e8f0ea !important;
    border: 1px solid #d2ddd3 !important;
    box-shadow: 0 4px 12px rgba(31,57,46,.07) !important;
}
html[data-ukmb-theme="light"] .ukmb-shell.page-messages .rules-grid .rule-item .rule-text {
    color: #36584e !important;
    -webkit-text-fill-color: #36584e !important;
}
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .rules-grid .rule-item {
    background: linear-gradient(135deg, #164d40, #10382f) !important;
    border: 1px solid rgba(216,180,93,.28) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.18) !important;
}
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .rules-grid .rule-item .rule-icon {
    background: #07130f !important;
    border: 1px solid rgba(216,180,93,.38) !important;
    color: #f3cf69 !important;
}
html[data-ukmb-theme="dark"] .ukmb-shell.page-messages .rules-grid .rule-item .rule-text {
    color: #edf4ef !important;
    -webkit-text-fill-color: #edf4ef !important;
}

/* Keep the three metrics and four rule cards responsive without distortion. */
@media (max-width: 1024px) {
    .ukmb-shell.page-messages .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 768px) {
    .ukmb-shell.page-messages .overview-grid,
    .ukmb-shell.page-messages .rules-grid {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 480px) {
    .ukmb-shell.page-messages .overview-grid .overview-card {
        grid-template-columns: 46px minmax(0,1fr) 52px !important;
        min-height: 68px !important;
        height: 68px !important;
        padding: 8px !important;
        column-gap: 7px !important;
    }
    .ukmb-shell.page-messages .overview-grid .overview-card > span:first-child {
        width: 42px !important;
        height: 42px !important;
        font-size: 20px !important;
    }
    .ukmb-shell.page-messages .overview-grid .overview-card h3 {
        width: 52px !important;
        min-width: 52px !important;
        height: 42px !important;
        font-size: 17px !important;
    }
    .ukmb-shell.page-messages .overview-grid .overview-card p {
        font-size: 12px !important;
    }
    .ukmb-shell.page-messages .rules-grid .rule-item {
        min-height: 58px !important;
        height: 58px !important;
    }
}


/* ==========================================================================
   UKMB MESSAGES CENTER — SCREENSHOT REVIEW CORRECTIONS (18 NOV 2026)
   Strictly scoped to .ukmb-shell.page-messages; no shared component changes.
   ========================================================================== */

/* Summary card label and counter: restore strong contrast above theme cascade. */
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .overview-grid .overview-card p {
    font-family: var(--ukmb-font-heading, "Playfair Display", Georgia, serif) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    opacity: 1 !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .overview-grid .overview-card h3.ukmb-numeric {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    font-variant-numeric: tabular-nums lining-nums !important;
    font-feature-settings: "tnum" 1 !important;
    color: #f5f2e8 !important;
    -webkit-text-fill-color: #f5f2e8 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}
html[data-ukmb-theme="light"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .overview-grid .overview-card p {
    color: #173f38 !important;
    -webkit-text-fill-color: #173f38 !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .overview-grid .overview-card p {
    color: #f3cf69 !important;
    -webkit-text-fill-color: #f3cf69 !important;
}

/* Message table: keep the teal header but make every heading legible.
   Empty-state copy is deliberately high-contrast in both themes. */
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table-wrap {
    background: #f7faf8 !important;
    border: 1px solid #cbdcd5 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table thead tr,
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table thead th {
    background: #075b4e !important;
    color: #fffdf5 !important;
    -webkit-text-fill-color: #fffdf5 !important;
    font-weight: 800 !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table tbody td {
    color: #173f38 !important;
    -webkit-text-fill-color: #173f38 !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table .table-empty {
    background: #f7faf8 !important;
    color: #36584e !important;
    -webkit-text-fill-color: #36584e !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: center !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table-wrap {
    background: #f7faf8 !important;
    border-color: rgba(216,180,93,.42) !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table thead tr,
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table thead th {
    background: #075b4e !important;
    color: #fffdf5 !important;
    -webkit-text-fill-color: #fffdf5 !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table tbody td,
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .messages-table .table-empty {
    color: #36584e !important;
    -webkit-text-fill-color: #36584e !important;
}

/* Communication Rules: icon remains in its own left box; text is centered
   against the full tile width, not merely the space beside the icon. */
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-section {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
}
html[data-ukmb-theme="light"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-section > h3 {
    color: #17483c !important;
    -webkit-text-fill-color: #17483c !important;
    text-shadow: none !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-section > h3 {
    color: #f3cf69 !important;
    -webkit-text-fill-color: #f3cf69 !important;
    text-shadow: none !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 62px !important;
    height: 62px !important;
    padding: 8px 54px !important;
    box-sizing: border-box !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item .rule-icon {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9px !important;
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    background: #075b49 !important;
    color: #fffdf4 !important;
    -webkit-text-fill-color: #fffdf4 !important;
}
html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item .rule-text {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-family: var(--ukmb-font-body, Inter, Arial, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
}
html[data-ukmb-theme="light"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item {
    background: #e8f0ea !important;
    border: 1px solid #d2ddd3 !important;
    box-shadow: 0 4px 12px rgba(31,57,46,.07) !important;
}
html[data-ukmb-theme="light"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item .rule-text {
    color: #36584e !important;
    -webkit-text-fill-color: #36584e !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item {
    background: #1d3029 !important;
    border: 1px solid rgba(216,180,93,.30) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.18) !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item .rule-icon {
    background: #07130f !important;
    border: 1px solid rgba(216,180,93,.38) !important;
    color: #f3cf69 !important;
    -webkit-text-fill-color: #f3cf69 !important;
}
html[data-ukmb-theme="dark"] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item .rule-text {
    color: #edf4ef !important;
    -webkit-text-fill-color: #edf4ef !important;
}

@media (max-width: 768px) {
    html[data-ukmb-theme] body:has(.ukmb-shell.page-messages) .ukmb-shell.page-messages .dashboard-content .rules-grid .rule-item {
        min-height: 58px !important;
        height: auto !important;
        padding: 8px 50px !important;
    }
}


/* ======================================================================
   UKMB — NOTIFICATIONS CENTER SUMMARY LABEL ALIGNMENT / THEME CONTRAST
   Date: 18 November 2026
   Scope: Admin → Communication → Notifications Center summary cards only.
   The page markup uses direct span / p / h3 children; target those exact
   elements so the Light theme cannot inherit the low-contrast overview
   paragraph color. Keep all existing card geometry and behavior intact.
   ====================================================================== */
html[data-ukmb-theme="light"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > p,
html[data-ukmb-theme="dark"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > p {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(216, 180, 93, .42) !important;
    border-radius: 10px !important;
    background: #071610 !important;
    color: #f6e5a5 !important;
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.28) !important;
}
html[data-ukmb-theme="light"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > h3,
html[data-ukmb-theme="dark"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > h3 {
    grid-column: 3 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: stretch !important;
    display: grid !important;
    place-items: center !important;
    box-sizing: border-box !important;
    width: 66px !important;
    min-width: 66px !important;
    height: 48px !important;
    margin: 0 !important;
    border: 1px solid rgba(216, 180, 93, .48) !important;
    border-radius: 12px !important;
    background: #071610 !important;
    color: #f7f7f2 !important;
    font-family: Arial, sans-serif !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    font-variant-numeric: tabular-nums !important;
    line-height: 1 !important;
    box-shadow: 0 5px 11px rgba(0,0,0,.17), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
@media (max-width: 700px) {
    html[data-ukmb-theme="light"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > p,
    html[data-ukmb-theme="dark"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > p {
        font-size: 12px !important;
        padding-inline: 5px !important;
    }
    html[data-ukmb-theme="light"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > h3,
    html[data-ukmb-theme="dark"] body .ukmb-shell.page-notifications .ukmb-notification-stat-card > h3 {
        width: 58px !important;
        min-width: 58px !important;
        font-size: 20px !important;
    }
}
