/* ================================================================
   NUBISS SHELL — always-on layout fixes shared by every Vuexy layout
   (top bar, page rhythm, shared page components). Theme-neutral:
   colours come from tokens with a light literal fallback, and
   nubiss_dark.css (loaded right after) defines the tokens in dark.
   ================================================================ */

/* ── Top bar: nothing may push past the rounded right edge ──
   Vuexy's bar is fixed-width and nowrap, so every child used to keep
   its natural width and the right-hand group spilled out. Order of
   yielding: greeting first, then the clinic name. Controls never shrink. */
#layout-navbar #navbar-collapse { min-width: 0; gap: .25rem; }
#layout-navbar #navbar-collapse > .navbar-nav { min-width: 0; flex-shrink: 0; }
#layout-navbar #navbar-collapse > .navbar-nav.nv-navbar-greeting { flex: 0 1 auto; overflow: hidden; }
#layout-navbar .nv-navbar-greeting .navbar-search-wrapper { min-width: 0; }
#layout-navbar .nv-greeting-text {
    display: block; max-width: 26ch;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#layout-navbar #navbar-collapse > ul.navbar-nav { flex-shrink: 0; flex-wrap: nowrap; }
#layout-navbar .nv-clinic-name {
    display: inline-block; vertical-align: bottom;
    max-width: clamp(8rem, 14vw, 16rem);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#layout-navbar .nv-clinic-menu { max-width: 22rem; }
#layout-navbar .nv-clinic-menu .dropdown-item > span {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#layout-navbar #voice-output {
    display: inline-block; max-width: 12rem; padding: 0 .5rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--nv-warning, #b8690f); font-size: .8125rem;
}
#layout-navbar #voice-output:empty { display: none; }

/* Guardian acting for a minor: tint the bar instead of turning the whole
   row into a .badge (which shrank the font and forced nowrap on it). */
#layout-navbar .nv-navbar-minor {
    background: rgba(255, 159, 67, 0.16);
    border-radius: .5rem;
    padding: .25rem .5rem;
    color: var(--nv-warning, #9a5609);
}

/* ── Page header band: actions wrap before they collide ── */
@media (max-width: 1199.98px) {
    .pg-header { flex-wrap: wrap; }
    .pg-header-body { flex: 1 1 16rem; }
}

/* pg-header buttons are also used as <button> inside forms */
button.pg-btn-ghost, button.pg-btn-solid { line-height: 1.5; }
.pg-header-actions form { margin: 0; display: inline-flex; }
a.pg-btn-solid { text-decoration: none; }
.pg-btn-ghost:focus-visible, .pg-btn-solid:focus-visible {
    outline: 2px solid #fff; outline-offset: 2px;
}

/* ── DataTables chrome inside a pg-panel: one 20px inset everywhere ──
   Vuexy pads its wrapper rows 1.25rem, first cells 1.5rem and the last
   header 1rem, while the panel head sits at 20px. */
.pg-table-wrap .dataTables_wrapper > .row { margin: 0; align-items: center; }
.pg-table-wrap .dataTables_wrapper > .row > [class*="col-"] { padding: 0; }
.pg-table-wrap .dataTables_wrapper .dataTables_length { padding: 14px 20px 0; margin: 0; }
.pg-table-wrap .dataTables_wrapper .dataTables_length label {
    font-size: .79rem; color: var(--pg-muted); margin: 0;
    display: inline-flex; align-items: center; gap: 8px;
}
.pg-table-wrap .dataTables_wrapper .dataTables_length select { min-width: 4.5rem; }
.pg-table-wrap .dataTables_wrapper .dataTables_filter { padding: 14px 20px 0; margin: 0; }
.pg-table-wrap .dataTables_wrapper .dataTables_filter label { justify-content: flex-end; margin: 0; }
.pg-table-wrap .dataTables_wrapper .dataTables_filter input { margin-left: 0; }
.pg-table-wrap .dataTables_wrapper table.dataTable { margin-top: 14px !important; margin-bottom: 0 !important; }
.pg-table-wrap .table thead th:first-child,
.pg-table-wrap .table tbody td:first-child { padding-left: 20px; }
.pg-table-wrap .table thead th:last-child,
.pg-table-wrap .table tbody td:last-child { padding-right: 20px; }
.pg-table-wrap .dataTables_wrapper .dataTables_info { padding: 14px 20px; }
.pg-table-wrap .dataTables_wrapper .dataTables_paginate { padding: 10px 20px; margin: 0; }
.pg-table-wrap .dataTables_wrapper .dataTables_paginate .pagination { margin: 0; justify-content: flex-end; }
@media (max-width: 767.98px) {
    .pg-table-wrap .dataTables_wrapper .dataTables_filter label { justify-content: flex-start; }
    .pg-table-wrap .dataTables_wrapper .dataTables_paginate .pagination { justify-content: flex-start; }
}

/* ── Panel body + form rhythm for settings pages ── */
.pg-panel-body { padding: 20px; }
.pg-panel-body > :last-child { margin-bottom: 0; }
.pg-panel + .pg-panel { margin-top: 16px; }
.pg-form-narrow { max-width: 32rem; }
.pg-callout {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; border-radius: var(--pg-radius-sm, 8px);
    background: var(--pg-teal-lt, #e0f2fe);
    color: var(--pg-text, #0f172a);
    font-size: .82rem; line-height: 1.5;
}
.pg-callout > i { color: var(--pg-teal, #0891b2); font-size: 1.05rem; margin-top: 1px; flex-shrink: 0; }

/* ── Empty state ── */
.pg-empty {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 6px; padding: 40px 20px;
}
.pg-empty-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--nv-surface-2, #f1f5f9); color: var(--pg-muted, #64748b);
    font-size: 1.5rem; margin-bottom: 6px;
}
.pg-empty-title { font-size: .95rem; font-weight: 700; color: var(--pg-text, #0f172a); margin: 0; }
.pg-empty-hint { font-size: .82rem; color: var(--pg-muted, #64748b); margin: 0; max-width: 46ch; }

/* ── Light mode: readable secondary text ──
   Vuexy's .text-muted / placeholder grey (#acaab1) is 2.3:1 on white.
   #5B6B8A (the nubissFusion muted) is 5.4:1. Dark mode has its own values in
   nubiss_dark.css. */
html:not([data-nv-theme="dark"]) {
    --bs-secondary-color: #5B6B8A;
    --bs-tertiary-color: #6B7A97;
    --bs-card-subtitle-color: #5B6B8A;
}
html:not([data-nv-theme="dark"]) .text-muted,
html:not([data-nv-theme="dark"]) .text-body-secondary,
html:not([data-nv-theme="dark"]) .text-body-tertiary { color: #5B6B8A !important; }
html:not([data-nv-theme="dark"]) caption,
html:not([data-nv-theme="dark"]) .figure-caption,
html:not([data-nv-theme="dark"]) .dropdown-header,
html:not([data-nv-theme="dark"]) div.dataTables_wrapper div.dataTables_info { color: #5B6B8A; }
html:not([data-nv-theme="dark"]) .form-control::placeholder,
html:not([data-nv-theme="dark"]) .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #6B7A97; }
/* Header band subtitle: 50% white on navy was borderline */
.pg-header-sub { color: rgba(255, 255, 255, 0.74); }
/* Neutral label badge: Vuexy's grey-on-grey is 3.2:1 */
html:not([data-nv-theme="dark"]) .bg-label-secondary { color: #4F5D7A !important; }

/* ================================================================
   LIGHT MODE BRAND — Nubiss navy (same values as nubissFusion nb.css)
   ----------------------------------------------------------------
   Vuexy hardcodes its purple (#7367f0) on selectors, often with
   !important, so setting --bs-primary alone does nothing: the real
   selectors are retargeted here. Scoped to light; nubiss_dark.css
   owns the dark values. Navy #13348B is 11.1:1 on white.
   ================================================================ */
html:not([data-nv-theme="dark"]) {
    --nvl-navy: #13348B;
    --nvl-navy-600: #0F2A70;
    --nvl-navy-050: #EEF2FC;
    --nvl-navy-rgb: 19, 52, 139;
    --bs-primary: #13348B;
    --bs-primary-rgb: 19, 52, 139;
    --bs-link-color: #13348B;
    --bs-link-color-rgb: 19, 52, 139;
    --bs-link-hover-color: #0F2A70;
    --bs-link-hover-color-rgb: 15, 42, 112;
    --bs-primary-text-emphasis: #0F2A70;
    --bs-primary-bg-subtle: #EEF2FC;
    --bs-primary-border-subtle: #C9D5F3;
}
html:not([data-nv-theme="dark"]) .btn-primary {
    color: #fff !important; background-color: var(--nvl-navy) !important;
    border-color: var(--nvl-navy) !important;
    box-shadow: 0 2px 6px rgba(var(--nvl-navy-rgb), 0.25);
}
html:not([data-nv-theme="dark"]) .btn-primary:hover,
html:not([data-nv-theme="dark"]) .btn-primary:focus,
html:not([data-nv-theme="dark"]) .btn-primary:active,
html:not([data-nv-theme="dark"]) .btn-primary.active {
    color: #fff !important; background-color: var(--nvl-navy-600) !important;
    border-color: var(--nvl-navy-600) !important;
}
html:not([data-nv-theme="dark"]) .btn-outline-primary {
    color: var(--nvl-navy) !important; border-color: var(--nvl-navy) !important;
}
html:not([data-nv-theme="dark"]) .btn-outline-primary:hover,
html:not([data-nv-theme="dark"]) .btn-outline-primary:active,
html:not([data-nv-theme="dark"]) .btn-outline-primary.active,
html:not([data-nv-theme="dark"]) .btn-check:checked + .btn-outline-primary {
    color: #fff !important; background-color: var(--nvl-navy) !important;
    border-color: var(--nvl-navy) !important;
}
html:not([data-nv-theme="dark"]) .btn-label-primary {
    color: var(--nvl-navy) !important; background-color: var(--nvl-navy-050) !important;
    border-color: transparent !important;
}
html:not([data-nv-theme="dark"]) .btn-label-primary:hover { color: #fff !important; background-color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .btn-text-primary,
html:not([data-nv-theme="dark"]) .text-primary { color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .bg-primary { background-color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .badge.bg-primary,
html:not([data-nv-theme="dark"]) .text-bg-primary { background-color: var(--nvl-navy) !important; color: #fff !important; }
html:not([data-nv-theme="dark"]) .bg-label-primary { background-color: var(--nvl-navy-050) !important; color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .alert-primary { background-color: var(--nvl-navy-050) !important; color: var(--nvl-navy) !important; border-color: transparent !important; }
html:not([data-nv-theme="dark"]) .progress-bar:not([class*="bg-"]) { background-color: var(--nvl-navy); }
html:not([data-nv-theme="dark"]) .border-primary { border-color: var(--nvl-navy) !important; }

/* Links: Bootstrap's own `a` rule reads --bs-link-color-rgb / --bs-link-hover-color-rgb
   (set above), so no selector is needed here. A blanket a:not(...) rule outranked
   component classes and painted buttons on the navy band navy-on-navy. */

/* Plain links. Vuexy's theme file hardcodes `a { color: #7367f0 }`, so the variable
   alone is not enough. :where() keeps this at the specificity of a bare `a`: it
   beats Vuexy by source order but ANY class on a link still wins, so buttons and
   components on coloured surfaces keep their own colour. */
:where(html:not([data-nv-theme="dark"])) a { color: #13348B; }
:where(html:not([data-nv-theme="dark"])) a:hover { color: #0F2A70; }

/* Forms */
html:not([data-nv-theme="dark"]) .form-control:focus,
html:not([data-nv-theme="dark"]) .form-select:focus,
html:not([data-nv-theme="dark"]) .form-check-input:focus {
    border-color: var(--nvl-navy) !important;
    box-shadow: 0 0 0 0.15rem rgba(var(--nvl-navy-rgb), 0.2) !important;
}
html:not([data-nv-theme="dark"]) .form-check-input:checked { background-color: var(--nvl-navy) !important; border-color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

/* Active states */
html:not([data-nv-theme="dark"]) .page-item.active .page-link,
html:not([data-nv-theme="dark"]) .nav-pills .nav-link.active,
html:not([data-nv-theme="dark"]) .list-group-item.active {
    background-color: var(--nvl-navy) !important; border-color: var(--nvl-navy) !important; color: #fff !important;
}
html:not([data-nv-theme="dark"]) .page-link:hover { color: var(--nvl-navy); background-color: var(--nvl-navy-050); }
html:not([data-nv-theme="dark"]) .nav-tabs .nav-link.active,
html:not([data-nv-theme="dark"]) .nav-tabs .nav-link.active:hover {
    color: var(--nvl-navy) !important; box-shadow: 0 -2px 0 var(--nvl-navy) inset !important;
}
html:not([data-nv-theme="dark"]) .nav-tabs .nav-link:hover,
html:not([data-nv-theme="dark"]) .nav-pills .nav-link:not(.active):hover { color: var(--nvl-navy); }
html:not([data-nv-theme="dark"]) .dropdown-item:hover,
html:not([data-nv-theme="dark"]) .dropdown-item:focus { background-color: var(--nvl-navy-050); color: var(--nvl-navy); }
html:not([data-nv-theme="dark"]) .dropdown-item.active,
html:not([data-nv-theme="dark"]) .dropdown-item:active { background-color: var(--nvl-navy-050) !important; color: var(--nvl-navy) !important; }

/* Sidebar */
html:not([data-nv-theme="dark"]) .bg-menu-theme .menu-inner .menu-item .menu-link:hover { color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .bg-menu-theme.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) {
    background: var(--nvl-navy) !important; color: #fff !important;
    box-shadow: 0 2px 6px rgba(var(--nvl-navy-rgb), 0.3) !important;
}
html:not([data-nv-theme="dark"]) .bg-menu-theme .menu-inner .menu-sub > .menu-item.active > .menu-link { color: #fff !important; }
html:not([data-nv-theme="dark"]) .bg-menu-theme .menu-inner .menu-item.open > .menu-link.menu-toggle,
html:not([data-nv-theme="dark"]) .bg-menu-theme .menu-inner .menu-item.active > .menu-link.menu-toggle { color: var(--nvl-navy) !important; }

/* Select2 / flatpickr / FullCalendar / DataTables accents */
html:not([data-nv-theme="dark"]) .select2-container--default .select2-results__option--highlighted[aria-selected],
html:not([data-nv-theme="dark"]) .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--nvl-navy-050) !important; color: var(--nvl-navy) !important;
}
html:not([data-nv-theme="dark"]) .select2-container--default .select2-results__option[aria-selected="true"],
html:not([data-nv-theme="dark"]) .select2-container--default .select2-results__option--selected {
    background-color: var(--nvl-navy) !important; color: #fff !important;
}
html:not([data-nv-theme="dark"]) .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--nvl-navy-050) !important; color: var(--nvl-navy) !important; border: 0 !important;
}
html:not([data-nv-theme="dark"]) .select2-container--default.select2-container--focus .select2-selection,
html:not([data-nv-theme="dark"]) .select2-container--default.select2-container--open .select2-selection { border-color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .flatpickr-day.selected,
html:not([data-nv-theme="dark"]) .flatpickr-day.selected:hover { background: var(--nvl-navy) !important; border-color: var(--nvl-navy) !important; color: #fff !important; }
html:not([data-nv-theme="dark"]) .flatpickr-day.today { border-color: var(--nvl-navy) !important; }
html:not([data-nv-theme="dark"]) .fc .fc-toolbar .fc-button-group .fc-button-primary:not(.fc-prev-button):not(.fc-next-button),
html:not([data-nv-theme="dark"]) .fc .fc-toolbar .fc-today-button {
    background-color: var(--nvl-navy-050) !important; border-color: transparent !important; color: var(--nvl-navy) !important;
}
html:not([data-nv-theme="dark"]) .fc .fc-toolbar .fc-button-group .fc-button-primary.fc-button-active:not(.fc-prev-button):not(.fc-next-button) {
    background-color: var(--nvl-navy) !important; color: #fff !important;
}
html:not([data-nv-theme="dark"]) .fc .fc-day-today:not(.fc-col-header-cell) { background-color: var(--nvl-navy-050) !important; }
html:not([data-nv-theme="dark"]) .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number { color: var(--nvl-navy); }
html:not([data-nv-theme="dark"]) table.dataTable > thead .sorting_asc::before,
html:not([data-nv-theme="dark"]) table.dataTable > thead .sorting_desc::after { color: var(--nvl-navy); }

/* AI chat accent follows the brand */
html:not([data-nv-theme="dark"]) #ai-chat-root { --accent: #13348B; --ring: rgba(19, 52, 139, 0.25); }

/* ── Focus ring (light) ── */
html:not([data-nv-theme="dark"]) a:focus-visible,
html:not([data-nv-theme="dark"]) .btn:focus-visible,
html:not([data-nv-theme="dark"]) .menu-link:focus-visible,
html:not([data-nv-theme="dark"]) .page-link:focus-visible,
html:not([data-nv-theme="dark"]) .pg-act:focus-visible { outline: 2px solid var(--nvl-navy); outline-offset: 2px; }

/* ── Skip link ── */
.nv-skip-link {
    position: fixed; top: -100px; left: 1rem; z-index: 10060;
    padding: .6rem 1rem; border-radius: .5rem;
    background: #13348B; color: #fff !important; font-weight: 600;
    text-decoration: none; transition: top .15s ease;
}
.nv-skip-link:focus { top: 1rem; outline: 2px solid #fff; outline-offset: 2px; }
#nv-main:focus { outline: none; }

/* ── Toasts ── */
.nv-toast { color: #fff; border-radius: .75rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); min-width: 16rem; }
.nv-toast .toast-body { font-weight: 500; }
.nv-toast .toast-body i { font-size: 1.15rem; flex-shrink: 0; }
.nv-toast--success { background: #15803d; }
.nv-toast--danger  { background: #c42532; }
.nv-toast--warning { background: #9a5609; }
.nv-toast--info    { background: #13348B; }
@media (max-width: 575.98px) {
    #nv-toast-container { left: 0; right: 0; padding: .5rem; }
    #nv-toast-container .nv-toast { width: 100%; }
}

/* ── Motion: honour the OS setting everywhere ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important; animation-iteration-count: 1 !important;
        transition-duration: .01ms !important; scroll-behavior: auto !important;
    }
}

/* ── Touch: row actions and small buttons reach 40px on coarse pointers ── */
@media (pointer: coarse) {
    .pg-act { width: 40px; height: 40px; font-size: 1rem; }
    .pg-act-group { gap: 8px; }
    .btn-sm { min-height: 40px; }
    .dropdown-item { min-height: 44px; display: flex; align-items: center; }
}

/* ── Error pages (templates/errors/) ── */
.nv-error-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 2rem 1rem; background: var(--nv-canvas, #f8f7fa);
}
.nv-error-card {
    width: 100%; max-width: 30rem; text-align: center;
    padding: 2.5rem 2rem; border-radius: 1rem;
    background: var(--nv-surface, #ffffff);
    border: 1px solid var(--nv-card-border, #e6e6e8);
    box-shadow: 0 10px 40px rgba(19, 52, 139, 0.08);
}
.nv-error-icon {
    width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
    background: var(--nv-accent-tint, #EEF2FC); color: var(--nv-accent-text, #13348B);
}
.nv-error-code {
    font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--nv-muted, #5B6B8A); margin: 0 0 .25rem;
}
.nv-error-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 .5rem; color: var(--nv-ink, #0B1230); }
.nv-error-text { color: var(--nv-muted, #5B6B8A); margin: 0 auto 1.5rem; max-width: 40ch; }

/* ── Signed-out pages: theme toggle pinned top-right ── */
.nv-auth-theme-toggle {
    position: fixed; top: 1rem; right: 1rem; z-index: 1080;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--nv-line-2, #d9dee3);
    background: var(--nv-surface-2, #ffffff);
    color: var(--nv-ink, #444050);
    font-size: 1.25rem; cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background-color .15s ease, transform .15s ease;
}
.nv-auth-theme-toggle:hover { transform: translateY(-1px); }
.nv-auth-theme-toggle:focus-visible { outline: 2px solid var(--nv-accent-text, #13348B); outline-offset: 2px; }

/* ================================================================
   STRIPED TABLES — every data table alternates row colour
   ----------------------------------------------------------------
   One flat colour made long rows hard to follow across wide tables.
   DataTables tags rows .odd/.even (detail rows excluded), plain tables
   fall back to :nth-of-type. Hover stays stronger than the stripe.
   The stripe is painted on the CELLS: Bootstrap paints cells with
   --bs-table-bg, so a colour on the <tr> alone would be covered.
   Dark values: nubiss_dark.css (--nv-row-alt).
   ================================================================ */
table.dataTable > tbody > tr.even > td,
table.dataTable > tbody > tr.even > th,
.pg-table-wrap .table:not(.dataTable) > tbody > tr:nth-of-type(even) > td,
.pp-table-wrap .table:not(.dataTable) > tbody > tr:nth-of-type(even) > td,
.table.table-striped > tbody > tr:nth-of-type(even) > td,
.card-datatable .table:not(.dataTable) > tbody > tr:nth-of-type(even) > td,
.table-responsive > .table:not(.dataTable):not(.table-borderless) > tbody > tr:nth-of-type(even) > td {
    background-color: var(--nv-row-alt, #EEF2F9);
    --bs-table-bg-type: transparent;
    --bs-table-accent-bg: transparent;
}
/* Bootstrap's own .table-striped tints ODD rows; neutralise so only one scheme shows */
.table.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: transparent; --bs-table-accent-bg: transparent; }

table.dataTable > tbody > tr:not(.child):hover > td,
table.dataTable > tbody > tr:not(.child):hover > th,
.pg-table-wrap .table > tbody > tr:not(.child):hover > td,
.pp-table-wrap .table > tbody > tr:not(.child):hover > td,
.table.table-striped > tbody > tr:hover > td {
    background-color: var(--nv-accent-tint, #E8EEFB);
}
/* Expanded detail rows (DataTables Responsive) sit outside the alternation */
table.dataTable > tbody > tr.child > td,
table.dataTable > tbody > tr.child:hover > td { background-color: var(--nv-surface-2, #FAFBFE); }

/* Footer links carry a Vuexy class that pins the old purple */
html:not([data-nv-theme="dark"]) .content-footer a,
html:not([data-nv-theme="dark"]) .footer-link { color: #13348B; }
html[data-nv-theme="dark"] .content-footer a,
html[data-nv-theme="dark"] .footer-link { color: #8FA7F0; }

/* ── Calendar events: per-patient / per-type colours for both themes ──
   cust-calendar-k.js (eventDidMount) sets --nv-ev-bg / --nv-ev-fg and their
   -dark twins on each event; the dark pair is applied in nubiss_dark.css, so a
   theme toggle recolours events with no re-render. Pairs are tuned to >= 7:1
   contrast (hospital/patient_colors.py). */
.fc .nv-cal-event,
.fc .nv-cal-event.fc-daygrid-dot-event,
.fc .fc-list-event.nv-cal-event td {
    background-color: var(--nv-ev-bg) !important;
    border-color: color-mix(in srgb, var(--nv-ev-bg) 70%, #0f172a 12%) !important;
    color: var(--nv-ev-fg) !important;
    --fc-event-text-color: var(--nv-ev-fg);
}
.fc .nv-cal-event .fc-event-main,
.fc .nv-cal-event .fc-event-title,
.fc .nv-cal-event .fc-event-time,
.fc .nv-cal-event .fc-list-event-title,
.fc .nv-cal-event .fc-list-event-title a,
.fc .nv-cal-event .custom-list-view-content { color: var(--nv-ev-fg) !important; }
.fc .nv-cal-event .fc-daygrid-event-dot { border-color: var(--nv-ev-fg) !important; }
