/* Header light/dark switch (both themes). */
.app-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 20px;
    padding: 4px 10px;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 16px;
    background: transparent;
    color: rgb(14, 14, 14);
    font-size: 13px;
    cursor: pointer;
}
    .app-theme-toggle:hover, .app-theme-toggle:focus { background: rgba(0, 0, 0, .06); }
    .app-theme-toggle__light { display: none; }
html[data-theme="dark"] .app-theme-toggle { border-color: rgba(255, 255, 255, .3); color: #e4e6eb; }
    html[data-theme="dark"] .app-theme-toggle:hover, html[data-theme="dark"] .app-theme-toggle:focus { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .app-theme-toggle__dark { display: none; }
html[data-theme="dark"] .app-theme-toggle__light { display: inline; color: #f5c542; }
@media (max-width: 1024px) { .app-theme-toggle__label { display: none; } }

/* Dark theme. Everything is scoped to html[data-theme="dark"], set by the script in _PwaHead. */
html[data-theme="dark"] {
    --dm-bg: #15171c;
    --dm-surface: #1e2128;
    --dm-surface-2: #262a33;
    --dm-border: #3a3f4b;
    --dm-text: #e4e6eb;
    --dm-muted: #9aa0ab;
    --dm-link: #7cb4ff;
    /* Kendo (bootstrap theme 14.x) reads these. */
    --kendo-color-app-surface: var(--dm-surface);
    --kendo-color-on-app-surface: var(--dm-text);
    --kendo-color-surface: var(--dm-surface-2);
    --kendo-color-surface-alt: var(--dm-surface);
    --kendo-color-on-surface: var(--dm-text);
    --kendo-color-subtle: var(--dm-muted);
    --kendo-color-border: var(--dm-border);
    --kendo-color-border-alt: #4a505e;
    --kendo-color-base: var(--dm-surface-2);
    --kendo-color-base-hover: #313642;
    --kendo-color-base-active: #3a3f4b;
    --kendo-color-base-subtle: var(--dm-surface-2);
    --kendo-color-base-subtle-hover: #313642;
    --kendo-color-base-subtle-active: #3a3f4b;
    --kendo-color-base-emphasis: #4a505e;
    --kendo-color-base-on-subtle: var(--dm-text);
    --kendo-color-on-base: var(--dm-text);
    --kendo-color-base-on-surface: var(--dm-text);
    --kendo-color-light: var(--dm-surface-2);
    --kendo-color-light-subtle: var(--dm-surface);
    --kendo-color-on-light: var(--dm-text);
    --kendo-color-dark: #e4e6eb;
    --kendo-color-on-dark: #15171c;
    --kendo-color-series-a: #5b9bff;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .m-page,
html[data-theme="dark"] .m-body,
html[data-theme="dark"] .m-grid--root,
html[data-theme="dark"] .m-content,
html[data-theme="dark"] .m-wrapper,
html[data-theme="dark"] .m-body .m-content {
    background-color: var(--dm-bg) !important;
    color: var(--dm-text);
}

html[data-theme="dark"] .m-header,
html[data-theme="dark"] .m-header .m-brand,
html[data-theme="dark"] .m-aside-left,
html[data-theme="dark"] .m-aside-menu,
html[data-theme="dark"] .m-aside-menu .m-menu__nav,
html[data-theme="dark"] .m-subheader {
    background-color: var(--dm-surface) !important;
    color: var(--dm-text);
}
html[data-theme="dark"] .m-header { border-bottom: 1px solid var(--dm-border); }
html[data-theme="dark"] .m-aside-left { border-right: 1px solid var(--dm-border); }

html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__item .m-menu__link .m-menu__link-text,
html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__item .m-menu__link .m-menu__link-icon,
html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__item .m-menu__link .m-menu__ver-arrow,
html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__section .m-menu__section-text {
    color: var(--dm-text) !important;
}
html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__item:hover > .m-menu__link,
html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__item.m-menu__item--active > .m-menu__link,
html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__item.m-menu__item--open > .m-menu__link {
    background-color: var(--dm-surface-2) !important;
}
html[data-theme="dark"] .m-aside-menu .m-menu__submenu,
html[data-theme="dark"] .m-aside-menu .m-menu__nav .m-menu__item .m-menu__submenu .m-menu__subnav {
    background-color: var(--dm-surface) !important;
}

html[data-theme="dark"] .topheadercolor,
html[data-theme="dark"] .m-brand__home-link,
html[data-theme="dark"] .m-header .app-header-user__name,
html[data-theme="dark"] .m-header .app-header-user__logout,
html[data-theme="dark"] .m-header .app-header-user__logout:hover {
    color: var(--dm-text) !important;
}

html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3,
html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6,
html[data-theme="dark"] label, html[data-theme="dark"] legend,
html[data-theme="dark"] .m-portlet__head-text, html[data-theme="dark"] .m-subheader__title {
    color: var(--dm-text) !important;
}
html[data-theme="dark"] a:not(.btn):not(.k-button):not(.m-menu__link) { color: var(--dm-link); }
html[data-theme="dark"] .text-muted, html[data-theme="dark"] .m--font-metal, html[data-theme="dark"] small { color: var(--dm-muted) !important; }

/* Cards, panels, wells, modals */
html[data-theme="dark"] .m-portlet,
html[data-theme="dark"] .m-portlet .m-portlet__head,
html[data-theme="dark"] .m-portlet .m-portlet__body,
html[data-theme="dark"] .m-portlet .m-portlet__foot,
html[data-theme="dark"] .card, html[data-theme="dark"] .card-header, html[data-theme="dark"] .card-body, html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .panel, html[data-theme="dark"] .panel-heading, html[data-theme="dark"] .panel-body, html[data-theme="dark"] .panel-footer,
html[data-theme="dark"] .well, html[data-theme="dark"] .jumbotron,
html[data-theme="dark"] .modal-content, html[data-theme="dark"] .modal-header, html[data-theme="dark"] .modal-body, html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .popover, html[data-theme="dark"] .popover-body,
html[data-theme="dark"] .list-group-item {
    background-color: var(--dm-surface) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text);
}
html[data-theme="dark"] .close { color: var(--dm-text); text-shadow: none; }
html[data-theme="dark"] hr { border-color: var(--dm-border); }

/* Forms */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="search"], html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"], html[data-theme="dark"] input[type="number"], html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="date"], html[data-theme="dark"] input[type="time"], html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] select, html[data-theme="dark"] textarea {
    background-color: var(--dm-surface-2) !important;
    border-color: var(--dm-border) !important;
    color: var(--dm-text) !important;
}
html[data-theme="dark"] .form-control:disabled, html[data-theme="dark"] .form-control[readonly],
html[data-theme="dark"] input:disabled, html[data-theme="dark"] select:disabled, html[data-theme="dark"] textarea:disabled {
    background-color: #1a1d23 !important;
    color: var(--dm-muted) !important;
}
html[data-theme="dark"] ::placeholder { color: #7d8390 !important; }
html[data-theme="dark"] .input-group-text, html[data-theme="dark"] .input-group-addon {
    background-color: var(--dm-surface) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important;
}

/* Tables */
html[data-theme="dark"] .table, html[data-theme="dark"] table { color: var(--dm-text); }
html[data-theme="dark"] .table th, html[data-theme="dark"] .table td,
html[data-theme="dark"] .table thead th, html[data-theme="dark"] .table-bordered { border-color: var(--dm-border) !important; }
html[data-theme="dark"] .table thead th, html[data-theme="dark"] .thead-light th { background-color: var(--dm-surface-2) !important; color: var(--dm-text) !important; }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .table-hover tbody tr:hover { background-color: rgba(255, 255, 255, .06); color: var(--dm-text); }
html[data-theme="dark"] .bg-white, html[data-theme="dark"] .bg-light { background-color: var(--dm-surface) !important; }

/* Dropdowns, tabs, alerts, buttons */
html[data-theme="dark"] .dropdown-menu, html[data-theme="dark"] .m-dropdown__content, html[data-theme="dark"] .m-dropdown__inner {
    background-color: var(--dm-surface-2) !important; border-color: var(--dm-border) !important; color: var(--dm-text);
}
html[data-theme="dark"] .dropdown-item, html[data-theme="dark"] .dropdown-menu > li > a { color: var(--dm-text) !important; }
html[data-theme="dark"] .dropdown-item:hover, html[data-theme="dark"] .dropdown-item:focus, html[data-theme="dark"] .dropdown-menu > li > a:hover { background-color: #313642 !important; }
html[data-theme="dark"] .nav-tabs { border-color: var(--dm-border); }
html[data-theme="dark"] .nav-tabs .nav-link.active, html[data-theme="dark"] .nav-tabs .nav-item.show .nav-link,
html[data-theme="dark"] .nav-tabs > li.active > a {
    background-color: var(--dm-surface) !important; border-color: var(--dm-border) var(--dm-border) var(--dm-surface) !important; color: var(--dm-text) !important;
}
html[data-theme="dark"] .btn-default, html[data-theme="dark"] .btn-secondary, html[data-theme="dark"] .btn-light, html[data-theme="dark"] .btn-outline-secondary {
    background-color: var(--dm-surface-2) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important;
}
html[data-theme="dark"] .alert-info { background-color: #10304a; border-color: #1d4d73; color: #cfe6ff; }
html[data-theme="dark"] .alert-warning { background-color: #3d3110; border-color: #66521a; color: #ffe8a8; }
html[data-theme="dark"] .alert-danger { background-color: #45191c; border-color: #6e2a2f; color: #ffd0d3; }
html[data-theme="dark"] .alert-success { background-color: #123b24; border-color: #1e5e3a; color: #c9f2d8; }

/* Kendo pieces that hard-code light colours */
html[data-theme="dark"] .k-grid, html[data-theme="dark"] .k-grid-header, html[data-theme="dark"] .k-grid-header-wrap,
html[data-theme="dark"] .k-grid-toolbar, html[data-theme="dark"] .k-grid-pager, html[data-theme="dark"] .k-pager,
html[data-theme="dark"] .k-grid-content, html[data-theme="dark"] .k-grid-footer, html[data-theme="dark"] .k-toolbar,
html[data-theme="dark"] .k-window, html[data-theme="dark"] .k-window-content, html[data-theme="dark"] .k-dialog,
html[data-theme="dark"] .k-popup, html[data-theme="dark"] .k-list, html[data-theme="dark"] .k-calendar,
html[data-theme="dark"] .k-tabstrip-content, html[data-theme="dark"] .k-panelbar, html[data-theme="dark"] .k-treeview {
    background-color: var(--dm-surface) !important; color: var(--dm-text) !important; border-color: var(--dm-border) !important;
}
html[data-theme="dark"] .k-grid th, html[data-theme="dark"] .k-grid-header th.k-header, html[data-theme="dark"] .k-table-th,
html[data-theme="dark"] .k-window-titlebar, html[data-theme="dark"] .k-grouping-header {
    background-color: var(--dm-surface-2) !important; color: var(--dm-text) !important; border-color: var(--dm-border) !important;
}
html[data-theme="dark"] .k-grid td, html[data-theme="dark"] .k-table-td, html[data-theme="dark"] .k-grid tr { border-color: var(--dm-border) !important; }
html[data-theme="dark"] .k-grid tr.k-alt, html[data-theme="dark"] .k-grid .k-table-alt-row, html[data-theme="dark"] .k-table-row.k-alt {
    background-color: #22252d !important;
}
html[data-theme="dark"] .k-grid tbody tr:hover, html[data-theme="dark"] .k-grid .k-table-row:hover { background-color: #2c313b !important; }
html[data-theme="dark"] .k-grid .k-selected, html[data-theme="dark"] .k-grid tr.k-state-selected { background-color: #1f3c63 !important; }
html[data-theme="dark"] .k-input, html[data-theme="dark"] .k-picker, html[data-theme="dark"] .k-dropdownlist,
html[data-theme="dark"] .k-textbox, html[data-theme="dark"] .k-numerictextbox, html[data-theme="dark"] .k-input-inner {
    background-color: var(--dm-surface-2) !important; color: var(--dm-text) !important; border-color: var(--dm-border) !important;
}
html[data-theme="dark"] .k-list-item:hover, html[data-theme="dark"] .k-list-item.k-hover { background-color: #313642 !important; }
html[data-theme="dark"] .k-link, html[data-theme="dark"] .k-grid th a.k-link { color: var(--dm-text) !important; }

/* Images and logos with dark ink stay readable */
html[data-theme="dark"] img.logo { filter: brightness(1.15); }

/* Print always uses the light look */
@media print {
    html[data-theme="dark"] body, html[data-theme="dark"] * { background: #fff !important; color: #000 !important; }
}

/* Activity Story (Views/AuditLog/Story.cshtml) */
html[data-theme="dark"] .story-session { background: var(--dm-surface); border-color: var(--dm-border); }
html[data-theme="dark"] .story-session-head { background: var(--dm-surface-2); border-bottom-color: var(--dm-border); }
html[data-theme="dark"] .story-events > li { border-bottom-color: #2e323c; }
html[data-theme="dark"] .story-session-head .story-meta,
html[data-theme="dark"] .story-time,
html[data-theme="dark"] .story-site { color: var(--dm-muted); }
html[data-theme="dark"] .story-details { color: #b9bec8; }
html[data-theme="dark"] .story-day { color: var(--dm-text); }

/* ===== Sweep of views, stylesheets and scripts ===== */
/* ===== Activity Story (Views/AuditLog/Story.cshtml <style> + JS-built cards) =====
   Replaces nothing above; reinforces dark-mode.css lines 217-224 with !important and adds the text classes they leave out
   (.story-who, .story-summary, .story-line, .story-lines, #storyPrintTitle). */
html[data-theme="dark"] .story-session { background: var(--dm-surface) !important; border-color: var(--dm-border) !important; color: var(--dm-text) !important; }
html[data-theme="dark"] .story-session-head { background: var(--dm-surface-2) !important; border-bottom-color: var(--dm-border) !important; }
html[data-theme="dark"] .story-events > li { border-bottom-color: var(--dm-border) !important; }
html[data-theme="dark"] .story-events > li:last-child { border-bottom: 0 !important; }
html[data-theme="dark"] .story-session-head .story-who,
html[data-theme="dark"] .story-summary,
html[data-theme="dark"] .story-line,
html[data-theme="dark"] .story-lines,
html[data-theme="dark"] .story-day,
html[data-theme="dark"] #storyPrintTitle { color: var(--dm-text) !important; }
html[data-theme="dark"] .story-session-head .story-meta,
html[data-theme="dark"] .story-time,
html[data-theme="dark"] .story-site { color: var(--dm-muted) !important; }
html[data-theme="dark"] .story-details { color: #b9bec8 !important; }
html[data-theme="dark"] #storyFrom,
html[data-theme="dark"] #storyTo { color-scheme: dark; }

/* Views/Home/CodeConfiguration.cshtml: .tile border #CCC, hover #EEE */
html[data-theme="dark"] .tile { border-color: var(--dm-border); color: var(--dm-text); }
html[data-theme="dark"] .tile:hover { background: var(--dm-surface-2); }

/* Views/PAPOrder/DrugAndProgramInfo.cshtml: .box border #000 */
html[data-theme="dark"] .box { border-color: var(--dm-border); }

/* PatientHealthHistory/* and PatientVisits CDM/ObGyn <style>: .nav li { background-color:#eee !important } */
html[data-theme="dark"] .nav li { background-color: var(--dm-surface-2) !important; color: var(--dm-text); }

/* PatientHealthHistory/PatientHistory.cshtml, Patient/PatientDetailIndex, CPTFeeSchedule/ManageSiteCPTCodes: inline color:blue links */
html[data-theme="dark"] a[style*="color:blue"] { color: var(--dm-link) !important; }

/* UserDetail/UpdateUser, UserDetail/Index, UserTime/Edit read-only mode: #f0f0f0 */
html[data-theme="dark"] .inactiveLink,
html[data-theme="dark"] .checkbox-inline { background-color: var(--dm-surface-2); color: var(--dm-text); }

/* PatientVisits/PatientHistory + DaysheetPatientHistory: inline border rgba(0,0,0,.125); background-color:#fff */
html[data-theme="dark"] a.nav-link[style*="rgba(0, 0, 0, 0.125)"] { border-color: var(--dm-border) !important; }
html[data-theme="dark"] a.nav-link[style*="background-color:#fff"] { background-color: var(--dm-surface) !important; color: var(--dm-text); }
html[data-theme="dark"] a.nav-link.active[style*="background-color:#fff"] { background-color: var(--dm-surface-2) !important; color: var(--dm-link); }

/* Shared/_LayoutBootstrap.cshtml: .input-validation-error #ffeeee */
html[data-theme="dark"] .input-validation-error { background-color: #3a1f24 !important; color: var(--dm-text) !important; border-color: #e06c75 !important; }

/* Document views: .k-treeview color #000, .highlight yellow */
html[data-theme="dark"] .k-widget.k-treeview,
html[data-theme="dark"] .k-treeview .k-treeview-leaf,
html[data-theme="dark"] .k-treeview .k-in { color: var(--dm-text) !important; }
html[data-theme="dark"] .k-treeview .highlight { background: #6b5d1a; color: var(--dm-text); }

/* DaySheet/DaySheetModule.cshtml: .k-state-selected lightblue/black (matches existing grid selection colour) */
html[data-theme="dark"] .k-state-selected,
html[data-theme="dark"] .k-grid td.k-state-selected:hover,
html[data-theme="dark"] .k-grid tr.k-state-selected:hover td { background-color: #1f3c63 !important; color: var(--dm-text) !important; }

/* Prescriptions/Create + Edit: .k-tabstrip-items .k-link color #000 !important */
html[data-theme="dark"] .k-tabstrip-items .k-link { color: var(--dm-text) !important; }

/* PAP/Index grid icons + Scheduler/Index event template: inline color:black */
html[data-theme="dark"] a[style*="color:black"],
html[data-theme="dark"] i[style*="color:black"],
html[data-theme="dark"] .k-scheduler div[style*="color:black"] { color: var(--dm-text) !important; }

/* Scheduler time grid: Kendo's light theme paints the table, slots and headers white. */
html[data-theme="dark"] .k-scheduler, html[data-theme="dark"] .k-scheduler-layout, html[data-theme="dark"] .k-scheduler-table,
html[data-theme="dark"] .k-scheduler-content, html[data-theme="dark"] .k-scheduler-header, html[data-theme="dark"] .k-scheduler-header-wrap,
html[data-theme="dark"] .k-scheduler-times, html[data-theme="dark"] .k-scheduler-toolbar, html[data-theme="dark"] .k-scheduler-footer,
html[data-theme="dark"] .k-scheduler-table td, html[data-theme="dark"] .k-scheduler-table th, html[data-theme="dark"] .k-scheduler-layout > tbody > tr > td {
    background-color: var(--dm-surface) !important; color: var(--dm-text) !important; border-color: var(--dm-border) !important; }
html[data-theme="dark"] .k-scheduler-table .k-nonwork-hour, html[data-theme="dark"] .k-scheduler-header th, html[data-theme="dark"] .k-scheduler-times th,
html[data-theme="dark"] .k-scheduler-table .k-scheduler-datecolumn, html[data-theme="dark"] .k-scheduler-table .k-scheduler-groupcolumn {
    background-color: var(--dm-surface-2) !important; }
html[data-theme="dark"] .k-scheduler-table .k-today { background-color: #20262e !important; }
html[data-theme="dark"] .k-scheduler-table td.k-selected,
html[data-theme="dark"] .k-scheduler-table td.k-state-selected { background-color: #1f3c63 !important; }
html[data-theme="dark"] .k-scheduler .k-current-time { background-color: #ff6b6b !important; }

/* Scheduler/Index.cshtml ~345: inline background-color:#c7f5f5 group header */
html[data-theme="dark"] [style*="background-color:#c7f5f5"] { background-color: #1f4446 !important; color: var(--dm-text) !important; border-color: var(--dm-border) !important; }

/* custom.css .validation-summary-errors(-popup): #fbe1e3 */
html[data-theme="dark"] .validation-summary-errors,
html[data-theme="dark"] .validation-summary-errors-popup { background-color: #3a1f23 !important; border-color: #6b2f36 !important; color: #ff8a93 !important; }

/* custom.css .loader ring #f3f3f3 */
html[data-theme="dark"] .loader { border-color: var(--dm-surface-2); border-top-color: #3498db; }

/* custom.css mobile: .m-brand.tab-btn-box #ccc, .nav.nav-pills / .nav.nav-tabs #efefef */
html[data-theme="dark"] .m-brand.tab-btn-box { background: var(--dm-surface-2) !important; }
html[data-theme="dark"] .nav.nav-pills { background: var(--dm-surface) !important; }
@media (max-width: 1024px) {
    html[data-theme="dark"] .nav.nav-tabs { background: var(--dm-surface) !important; }
    html[data-theme="dark"] #m_ver_menu .desktop-toolbar { background: var(--dm-surface) !important; border-bottom-color: var(--dm-border) !important; }
}

/* site.css .disable-feild #F7F5FA !important */
html[data-theme="dark"] .disable-feild { background-color: var(--dm-surface-2) !important; color: var(--dm-muted) !important; }

/* site.css #page-wrapper #fff / #ccc */
html[data-theme="dark"] #page-wrapper { background-color: var(--dm-bg) !important; border-color: var(--dm-border) !important; }

/* site.css .dropdown-menu li hover #FFF !important */
html[data-theme="dark"] .dropdown-menu li:hover,
html[data-theme="dark"] .dropdown-menu li span a:hover { background-color: var(--dm-surface-2) !important; }

/* menu.css variables */
html[data-theme="dark"] {
    --menu-text: var(--dm-text);
    --menu-muted: var(--dm-muted);
    --menu-guide: var(--dm-border);
    --menu-accent-soft: rgba(124, 180, 255, 0.12);
}

/* report-viewer.css parameter splitbar #f4f7f6 / #dee2e6 */
html[data-theme="dark"] #rptViewer .trv-parameters-area.-vertical.k-collapsed + .k-splitbar { background: var(--dm-surface-2) !important; border-bottom-color: var(--dm-border) !important; }

/* Metronic m-portlet extras (base surfaces already covered at dark-mode.css 116-119) */
html[data-theme="dark"] .m-portlet { box-shadow: 0 1px 6px rgba(0, 0, 0, .45) !important; }
html[data-theme="dark"] .m-portlet .m-portlet__head { border-bottom-color: var(--dm-border) !important; }
html[data-theme="dark"] .m-portlet .m-portlet__head .m-portlet__head-icon,
html[data-theme="dark"] .m-portlet .m-portlet__head .m-portlet__head-icon i,
html[data-theme="dark"] .m-portlet .m-portlet__nav .m-portlet__nav-item .m-portlet__nav-link,
html[data-theme="dark"] .m-portlet .m-portlet__nav .m-portlet__nav-item .m-portlet__nav-link i { color: var(--dm-muted) !important; }
html[data-theme="dark"] .m-portlet .m-portlet__nav .m-portlet__nav-item .m-portlet__nav-link:hover i { color: var(--dm-link) !important; }

/* Metronic m-nav link text #6f727d */
html[data-theme="dark"] .m-nav .m-nav__item > .m-nav__link .m-nav__link-text,
html[data-theme="dark"] .m-nav .m-nav__item > .m-nav__link .m-nav__link-icon { color: var(--dm-text) !important; }
html[data-theme="dark"] .m-nav .m-nav__item > .m-nav__link:hover { background-color: var(--dm-surface-2) !important; }

/* Metronic m-checkbox / m-radio */
html[data-theme="dark"] .m-checkbox,
html[data-theme="dark"] .m-radio { color: var(--dm-text); }
html[data-theme="dark"] .m-checkbox > span,
html[data-theme="dark"] .m-radio > span { background: var(--dm-surface-2) !important; border-color: var(--dm-border) !important; }
html[data-theme="dark"] .m-checkbox > span:after { border-color: var(--dm-text) !important; }

/* Metronic m-scroll-top #fff */
html[data-theme="dark"] .m-scroll-top { background: var(--dm-surface-2) !important; box-shadow: 0 0 10px rgba(0, 0, 0, .5) !important; }

/* Metronic .btn.m-btn--air.btn-secondary border #fff !important (Account pages) */
html[data-theme="dark"] .btn.m-btn--air.btn-secondary,
html[data-theme="dark"] .btn.m-btn--air.btn-secondary:hover { border-color: var(--dm-border) !important; }

/* Metronic m-footer */
html[data-theme="dark"] .m-footer { background-color: var(--dm-surface) !important; color: var(--dm-muted) !important; border-top-color: var(--dm-border) !important; }


/* Form-post uploads (#852): keep the button distinct from the page now that its drop zone is transparent. */
html[data-theme="dark"] .k-upload.k-upload-sync .k-upload-button {
    border-color: var(--dm-border) !important;
    background: var(--dm-surface-2) !important;
    color: var(--dm-text) !important;
}

/* Save state (#932): the text beside a Save button; each colour is at least 4.5:1 on --dm-bg and --dm-surface. */
html[data-theme="dark"] .save-status[data-save-state="saving"] { color: var(--dm-muted); }
html[data-theme="dark"] .save-status[data-save-state="saved"] { color: #7bd88f; }
html[data-theme="dark"] .save-status[data-save-state="failed"] { color: #ff8a8a; }
html[data-theme="dark"] .save-status[data-save-state="unfinished"] { color: #ff8a8a; }
