:root {
  color-scheme: light;
  --isp-bg: #f7f9fb;
  --isp-surface: #ffffff;
  --isp-surface-subtle: #f2f4f6;
  --isp-surface-raised: #eceef0;
  --isp-header: #2c6dad;
  --isp-sidebar: #edf2f7;
  --isp-sidebar-surface: #d9e4ef;
  --isp-text: #191c1e;
  --isp-text-soft: #334155;
  --isp-muted: #64748b;
  --isp-border: #c6c6cd;
  --isp-border-soft: #e2e8f0;
  --isp-accent: #188ace;
  --isp-accent-strong: #2c6dad;
  --isp-danger: #ba1a1a;
  --isp-overlay: rgba(15, 23, 42, 0.52);
  --isp-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
  --isp-control-bg: #ffffff;
}

:root[data-isp-theme="dark"] {
  color-scheme: dark;
  --isp-bg: #0b1220;
  --isp-surface: #111a2a;
  --isp-surface-subtle: #172337;
  --isp-surface-raised: #1d2b41;
  --isp-header: #173c65;
  --isp-sidebar: #08111f;
  --isp-sidebar-surface: #253754;
  --isp-text: #e5edf8;
  --isp-text-soft: #c4d0e0;
  --isp-muted: #a5b4c8;
  --isp-border: #3a4b64;
  --isp-border-soft: #2b3a50;
  --isp-accent: #70b8eb;
  --isp-accent-strong: #4d9bd1;
  --isp-danger: #ff9b9b;
  --isp-overlay: rgba(2, 8, 23, 0.72);
  --isp-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  --isp-control-bg: #0f1929;
}

html,
body {
  background-color: var(--isp-bg);
  color: var(--isp-text);
}

html {
  transition: background-color 0.18s ease, color 0.18s ease;
}

body,
button,
input,
select,
textarea {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

body {
  accent-color: var(--isp-accent-strong);
}

::selection {
  color: var(--isp-surface);
  background: var(--isp-accent);
}

:focus-visible {
  outline: 2px solid var(--isp-accent);
  outline-offset: 2px;
}

a {
  color: var(--isp-accent-strong);
}

a:hover {
  color: var(--isp-accent);
}

/* Shared ISP shell */
body.isp-dashboard-page,
body.isp-work-page,
body.isp-work-page #cwicontent {
  background: var(--isp-bg) !important;
  color: var(--isp-text);
}

body.isp-dashboard-page #headercwi,
body.isp-work-page #headercwi {
  background: var(--isp-header) !important;
  color: #ffffff;
}

body.isp-dashboard-page #nav_brand,
body.isp-work-page #nav_brand,
body.isp-dashboard-page #nav_email,
body.isp-work-page #nav_email {
  color: #ffffff !important;
}

body.isp-dashboard-page #isp-dashboard-sidebar,
body.isp-work-page #isp-dashboard-sidebar {
  background: var(--isp-sidebar) !important;
  color: var(--isp-text);
  border-color: var(--isp-sidebar-surface) !important;
}

body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-brand,
body.isp-work-page #isp-dashboard-sidebar .isp-page-sidebar-brand,
body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-footer,
body.isp-work-page #isp-dashboard-sidebar .isp-page-sidebar-footer {
  border-color: var(--isp-sidebar-surface) !important;
}

body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-brand p,
body.isp-work-page #isp-dashboard-sidebar .isp-page-sidebar-brand p,
body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-group-head,
body.isp-work-page #isp-dashboard-nav-items .isp-nav-group-head,
body.isp-dashboard-page #isp-dashboard-nav-items > a,
body.isp-work-page #isp-dashboard-nav-items > a,
body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-sub > a,
body.isp-work-page #isp-dashboard-nav-items .isp-nav-sub > a {
  color: var(--isp-muted) !important;
}

body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-group-head:hover,
body.isp-work-page #isp-dashboard-nav-items .isp-nav-group-head:hover,
body.isp-dashboard-page #isp-dashboard-nav-items > a:hover,
body.isp-work-page #isp-dashboard-nav-items > a:hover,
body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-sub > a:hover,
body.isp-work-page #isp-dashboard-nav-items .isp-nav-sub > a:hover {
  color: #ffffff !important;
  background: var(--isp-sidebar-surface) !important;
}

:root:not([data-isp-theme="dark"]) body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-group-head:hover,
:root:not([data-isp-theme="dark"]) body.isp-work-page #isp-dashboard-nav-items .isp-nav-group-head:hover,
:root:not([data-isp-theme="dark"]) body.isp-dashboard-page #isp-dashboard-nav-items > a:hover,
:root:not([data-isp-theme="dark"]) body.isp-work-page #isp-dashboard-nav-items > a:hover,
:root:not([data-isp-theme="dark"]) body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-sub > a:hover,
:root:not([data-isp-theme="dark"]) body.isp-work-page #isp-dashboard-nav-items .isp-nav-sub > a:hover {
  color: var(--isp-text) !important;
}

body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-sub > a[class*="border-l-2"],
body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-sub > a[class*="border-l-2"]:hover,
body.isp-work-page #isp-dashboard-nav-items .isp-nav-sub > a[class*="border-l-2"],
body.isp-work-page #isp-dashboard-nav-items .isp-nav-sub > a[class*="border-l-2"]:hover {
  color: var(--isp-accent-strong) !important;
  background: transparent !important;
  border-left-color: var(--isp-accent) !important;
}

body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-group.is-open > .isp-nav-group-head,
body.isp-work-page #isp-dashboard-nav-items .isp-nav-group.is-open > .isp-nav-group-head,
body.isp-dashboard-page #isp-dashboard-nav-items > a[href*="isp-"][class*="border-l"],
body.isp-work-page #isp-dashboard-nav-items > a[href*="isp-"][class*="border-l"] {
  color: #ffffff !important;
  background: var(--isp-sidebar-surface) !important;
  border-left-color: var(--isp-accent) !important;
}

:root:not([data-isp-theme="dark"]) body.isp-dashboard-page #isp-dashboard-nav-items .isp-nav-group.is-open > .isp-nav-group-head,
:root:not([data-isp-theme="dark"]) body.isp-work-page #isp-dashboard-nav-items .isp-nav-group.is-open > .isp-nav-group-head,
:root:not([data-isp-theme="dark"]) body.isp-dashboard-page #isp-dashboard-nav-items > a[href*="isp-"][class*="border-l"],
:root:not([data-isp-theme="dark"]) body.isp-work-page #isp-dashboard-nav-items > a[href*="isp-"][class*="border-l"] {
  color: var(--isp-text) !important;
}

:root:not([data-isp-theme="dark"]) body.isp-dashboard-page #isp-dashboard-nav-items,
:root:not([data-isp-theme="dark"]) body.isp-work-page #isp-dashboard-nav-items {
  scrollbar-color: rgba(71, 85, 105, 0.42) transparent;
}

:root:not([data-isp-theme="dark"]) body.isp-dashboard-page #isp-dashboard-nav-items::-webkit-scrollbar-thumb,
:root:not([data-isp-theme="dark"]) body.isp-work-page #isp-dashboard-nav-items::-webkit-scrollbar-thumb {
  background-color: rgba(71, 85, 105, 0.42);
}

body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-brand-mark {
  background: var(--isp-surface-raised) !important;
  color: var(--isp-text-soft) !important;
}

body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-footer a,
body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-footer button,
body.isp-work-page #isp-dashboard-sidebar .isp-page-sidebar-footer a,
body.isp-work-page #isp-dashboard-sidebar .isp-page-sidebar-footer button {
  color: var(--isp-text) !important;
  background: var(--isp-surface) !important;
  border-color: var(--isp-border) !important;
}

body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-footer a:hover,
body.isp-dashboard-page #isp-dashboard-sidebar .isp-page-sidebar-footer button:hover,
body.isp-work-page #isp-dashboard-sidebar .isp-page-sidebar-footer a:hover,
body.isp-work-page #isp-dashboard-sidebar .isp-page-sidebar-footer button:hover {
  background: var(--isp-surface-raised) !important;
  border-color: var(--isp-accent) !important;
}

body.isp-work-page .pageheader {
  background: var(--isp-surface) !important;
  border-color: var(--isp-border-soft) !important;
  box-shadow: var(--isp-shadow) !important;
}

body.isp-work-page .pageheader #cwipagebar1,
body.isp-work-page .pageheader .form-group .form-field {
  color: var(--isp-text) !important;
}

body.isp-work-page .pageheader .form-group > span {
  color: var(--isp-text-soft) !important;
  background: var(--isp-surface-subtle) !important;
  border-color: var(--isp-border) !important;
}

body.isp-work-page .pageheader .form-group > span:not(:first-child):not(:last-child) {
  color: var(--isp-muted) !important;
  background: var(--isp-surface) !important;
}

body.isp-work-page .pageheader .form-group .form-field {
  background: var(--isp-control-bg) !important;
  border-color: var(--isp-border) !important;
}

body.isp-work-page .pageheader .form-group .form-field::placeholder {
  color: var(--isp-muted) !important;
}

/* Dashboard utility colors generated by Tailwind */
body.isp-dashboard-page .bg-background { background-color: var(--isp-bg) !important; }
body.isp-dashboard-page .bg-surface,
body.isp-dashboard-page .bg-surface-bright,
body.isp-dashboard-page .bg-surface-container-lowest { background-color: var(--isp-surface) !important; }
body.isp-dashboard-page .bg-surface-container-low { background-color: var(--isp-surface-subtle) !important; }
body.isp-dashboard-page .bg-surface-container,
body.isp-dashboard-page .bg-surface-container-high,
body.isp-dashboard-page .bg-surface-container-highest { background-color: var(--isp-surface-raised) !important; }
body.isp-dashboard-page .text-primary,
body.isp-dashboard-page .text-on-background,
body.isp-dashboard-page .text-on-surface { color: var(--isp-text) !important; }
body.isp-dashboard-page .text-on-surface-variant { color: var(--isp-muted) !important; }
body.isp-dashboard-page .text-secondary { color: var(--isp-text-soft) !important; }
body.isp-dashboard-page .text-on-secondary-container { color: var(--isp-text-soft) !important; }
body.isp-dashboard-page .bg-secondary-container { background-color: var(--isp-surface-raised) !important; }
body.isp-dashboard-page .border-outline-variant { border-color: var(--isp-border) !important; }
body.isp-dashboard-page .hover\:bg-surface-container-low:hover { background-color: var(--isp-surface-subtle) !important; }
body.isp-dashboard-page .text-on-tertiary-container { color: var(--isp-accent-strong) !important; }

/* Common form and grid surfaces */
body.isp-dashboard-page input,
body.isp-dashboard-page select,
body.isp-dashboard-page textarea,
body.isp-work-page input,
body.isp-work-page select,
body.isp-work-page textarea,
body.isp-work-page .pq-grid,
body.isp-work-page .pq-grid-inner,
body.isp-work-page .pq-grid-bottom,
body.isp-work-page .pq-toolbar,
body.isp-work-page .pq-pager,
body.isp-work-page .pq-select-menu,
body.isp-work-page .ui-autocomplete {
  color: var(--isp-text) !important;
  background-color: var(--isp-control-bg) !important;
  border-color: var(--isp-border) !important;
}

body.isp-work-page .pq-grid-header,
body.isp-work-page .pq-grid-header-table,
body.isp-work-page .pq-grid-title,
body.isp-work-page .pq-grid-top,
body.isp-work-page .pq-grid-bottom,
body.isp-work-page .pq-pager,
body.isp-work-page .ui-widget-header {
  color: var(--isp-text) !important;
  background: var(--isp-surface-subtle) !important;
  border-color: var(--isp-border) !important;
}

body.isp-work-page .pq-grid-cell,
body.isp-work-page .pq-grid-row,
body.isp-work-page .pq-grid-row > td,
body.isp-work-page .pq-grid-row > div,
body.isp-work-page .ui-widget-content {
  color: var(--isp-text) !important;
  background: var(--isp-surface) !important;
  border-color: var(--isp-border-soft) !important;
}

body.isp-work-page .pq-grid-row:hover,
body.isp-work-page .pq-grid-row:hover > td,
body.isp-work-page .pq-grid-row:hover > div {
  background: var(--isp-surface-subtle) !important;
}

body.isp-work-page button:not(.isp-theme-toggle),
body.isp-work-page .btn,
body.isp-work-page .cwibtn {
  border-color: var(--isp-border) !important;
}

/* ParamQuery pager and datepicker controls */
body.isp-work-page .pq-pager .pq-page-rppoptions {
  display: inline-flex;
  align-items: center;
  min-width: 64px;
  white-space: nowrap;
}

body.isp-work-page .pq-pager .pq-page-select {
  min-width: 64px !important;
  width: 64px !important;
  padding: 2px 6px !important;
  padding-right: 20px !important;
  color: var(--isp-text) !important;
  background-color: var(--isp-control-bg) !important;
  border-color: var(--isp-border) !important;
}

body.isp-work-page .pq-pager .pq-ui-button {
  color: var(--isp-text) !important;
  background: var(--isp-surface) !important;
  border: 1px solid var(--isp-border) !important;
  border-radius: 4px;
}

body.isp-work-page .pq-pager .pq-ui-button:hover,
body.isp-work-page .pq-pager .pq-ui-button:focus {
  color: var(--isp-accent-strong) !important;
  background: var(--isp-surface-raised) !important;
  border-color: var(--isp-accent) !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .pq-pager .pq-ui-button .ui-icon {
  background-image: url("/theme/assets/libs/jquery-ui-themes-1.12.1/images/ui-icons_444444_256x240.png") !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .pq-pager .pq-ui-button:hover .ui-icon,
:root:not([data-isp-theme="dark"]) body.isp-work-page .pq-pager .pq-ui-button:focus .ui-icon {
  background-image: url("/theme/assets/libs/jquery-ui-themes-1.12.1/themes/redmond/images/ui-icons_2e83ff_256x240.png") !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker,
:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-header,
:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-title {
  background: var(--isp-surface) !important;
  color: var(--isp-text) !important;
  border-color: var(--isp-border) !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-header {
  background: var(--isp-accent-strong) !important;
  color: #ffffff !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-title,
:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-month,
:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-year,
:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker select.ui-datepicker-year {
  color: #ffffff !important;
  background: var(--isp-accent-strong) !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-prev span,
:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-next span {
  background-image: url("/theme/assets/libs/jquery-ui-themes-1.12.1/images/ui-icons_ffffff_256x240.png") !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-prev:hover span,
:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker .ui-datepicker-next:hover span {
  background-image: url("/theme/assets/libs/jquery-ui-themes-1.12.1/images/ui-icons_ffffff_256x240.png") !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker th {
  color: #ffffff !important;
  background: var(--isp-accent-strong) !important;
}

:root:not([data-isp-theme="dark"]) body.isp-work-page .ui-datepicker-calendar .ui-state-default {
  color: var(--isp-text) !important;
}

/* Language menu and the theme control share the header surface */
.isp-header-lang-toggle,
.isp-theme-toggle {
  border-color: rgba(255, 255, 255, 0.26) !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.10) !important;
}

.isp-header-lang-toggle:hover,
.isp-theme-toggle:hover,
.isp-theme-toggle[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.18) !important;
}

.isp-theme-sidebar {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--isp-sidebar-surface);
}

.isp-theme-sidebar__label {
  display: block;
  margin: 0 4px 6px;
  color: var(--isp-muted);
  font: 500 10px/14px 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.isp-theme-sidebar__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.isp-theme-sidebar .isp-theme-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 32px;
  margin: 0 !important;
  padding: 0 6px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  color: var(--isp-muted) !important;
  background: transparent !important;
  font: 500 11px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.isp-theme-sidebar .isp-theme-option:hover,
.isp-theme-sidebar .isp-theme-option.is-active {
  color: var(--isp-text) !important;
  background: var(--isp-sidebar-surface) !important;
  border-color: var(--isp-border) !important;
}

.isp-theme-sidebar .isp-theme-option.is-active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.isp-header-lang-menu {
  background: var(--isp-surface) !important;
  border-color: var(--isp-border) !important;
  box-shadow: var(--isp-shadow) !important;
}

.isp-header-lang-menu button {
  color: var(--isp-text) !important;
}

.isp-header-lang-menu button:hover,
.isp-header-lang-menu button.is-active {
  background: var(--isp-surface-subtle) !important;
}

/* Chat follows the selected application theme */
.isp-chat-panel {
  color: var(--isp-text) !important;
  background: var(--isp-surface) !important;
  border-color: var(--isp-border) !important;
  box-shadow: var(--isp-shadow) !important;
}

.isp-chat-header,
.isp-chat-toolbar,
.isp-chat-composer {
  background: var(--isp-surface-subtle) !important;
  border-color: var(--isp-border-soft) !important;
}

.isp-chat-body {
  background: var(--isp-bg) !important;
}

.isp-chat-list-head,
.isp-chat-subhead,
.isp-chat-room-copy strong,
.isp-chat-user-row strong {
  color: var(--isp-text) !important;
}

:root[data-isp-theme="light"] .isp-chat-new-btn {
  opacity: 1 !important;
  color: var(--isp-accent-strong) !important;
  background: #e3f1fa !important;
  border: 1px solid #91c9e8 !important;
}

:root[data-isp-theme="light"] .isp-chat-new-btn:hover,
:root[data-isp-theme="light"] .isp-chat-new-btn:focus-visible {
  color: #ffffff !important;
  background: var(--isp-accent-strong) !important;
  border-color: var(--isp-accent-strong) !important;
}

.isp-chat-heading p,
.isp-chat-room-copy span,
.isp-chat-room-meta,
.isp-chat-user-row small,
.isp-chat-message-meta,
.isp-chat-empty,
.isp-chat-loading {
  color: var(--isp-muted) !important;
}

.isp-chat-room-list,
.isp-chat-user-list,
.isp-chat-room-row,
.isp-chat-user-row,
.isp-chat-check-row {
  border-color: var(--isp-border-soft) !important;
}

.isp-chat-room-row:hover,
.isp-chat-user-row:hover {
  background: var(--isp-surface-subtle) !important;
}

.isp-chat-lang,
.isp-chat-search input,
.isp-chat-group-name input,
#isp-chat-input {
  color: var(--isp-text) !important;
  background: var(--isp-control-bg) !important;
  border-color: var(--isp-border) !important;
}

.isp-chat-bubble {
  color: var(--isp-text) !important;
  background: var(--isp-surface-raised) !important;
  border-color: var(--isp-border) !important;
}

.isp-chat-message.mine .isp-chat-bubble {
  color: #ffffff !important;
  background: var(--isp-accent-strong) !important;
  border-color: var(--isp-accent) !important;
}

.isp-chat-bubble em,
.isp-chat-original-text {
  color: var(--isp-muted) !important;
}

/* Login and auxiliary authentication pages */
body.auth-shell-page {
  --auth-shell-card: var(--isp-surface);
  --auth-shell-muted: var(--isp-muted);
  --auth-shell-border: var(--isp-border);
  --auth-shell-input-bg: var(--isp-control-bg);
  --auth-shell-bg-1: var(--isp-sidebar);
  --auth-shell-bg-2: var(--isp-header);
  background: var(--isp-bg) !important;
  color: var(--isp-text) !important;
}

body.auth-shell-page .auth-shell-card__hero,
body.auth-shell-page .auth-shell-card__body {
  background: var(--isp-surface) !important;
  border-color: var(--isp-border) !important;
}

body.auth-shell-page .auth-shell-card__title,
body.auth-shell-page .auth-shell-card .form-label,
body.auth-shell-page .auth-shell-card .form-check-label {
  color: var(--isp-text) !important;
}

body.auth-shell-page .auth-shell-card .form-control,
body.auth-shell-page .auth-shell-card .input-group-text {
  color: var(--isp-text) !important;
  background-color: var(--isp-control-bg) !important;
  border-color: var(--isp-border) !important;
}

body.auth-shell-page .auth-shell-copyright {
  color: var(--isp-muted) !important;
}

/* Auxiliary pages without the full shell */
body:not(.isp-dashboard-page):not(.isp-work-page):not(.auth-shell-page) {
  background: var(--isp-bg);
  color: var(--isp-text);
}

.isp-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font: 500 12px/1 Inter, system-ui, sans-serif;
}

.isp-theme-toggle svg,
.isp-theme-option svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.isp-theme-toggle__label {
  white-space: nowrap;
}

.isp-theme-option .isp-theme-toggle__icon {
  display: inline-flex;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
}

:root:not([data-isp-theme="dark"]) .isp-theme-sidebar .isp-theme-option .isp-theme-toggle__icon {
  color: #172033 !important;
}

:root[data-isp-theme="dark"] .isp-theme-sidebar .isp-theme-option .isp-theme-toggle__icon {
  color: #f8fafc !important;
}

.isp-theme-sidebar .isp-theme-option .isp-theme-toggle__icon svg {
  display: block !important;
  width: 20px;
  height: 20px;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
}

.isp-theme-floating {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2100;
  color: var(--isp-text) !important;
  background: var(--isp-surface) !important;
  border-color: var(--isp-border) !important;
  box-shadow: var(--isp-shadow);
}

.isp-chat-menu-item .isp-chat-open {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  padding: 0;
  color: #ffffff;
  background: transparent;
}

.isp-chat-menu-item .isp-chat-open:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.isp-chat-menu-item .isp-chat-open .material-symbols-outlined {
  font-size: 19px;
  line-height: 1;
}

.isp-chat-menu-item .isp-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
}

body.isp-sidebar-collapsed .isp-theme-sidebar__label,
body.isp-sidebar-collapsed .isp-theme-option .isp-theme-toggle__label {
  display: none !important;
}

body.isp-sidebar-collapsed .isp-theme-sidebar {
  margin-top: 10px;
  padding-top: 10px;
}

body.isp-sidebar-collapsed .isp-theme-sidebar__options {
  grid-template-columns: 1fr;
  gap: 4px;
}

body.isp-sidebar-collapsed .isp-theme-sidebar .isp-theme-option {
  width: 40px;
  height: 32px;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.isp-sidebar-collapsed .isp-theme-option .isp-theme-toggle__icon {
  display: inline-flex !important;
}

body.isp-sidebar-collapsed #isp-dashboard-sidebar .isp-theme-sidebar .isp-theme-option .isp-theme-toggle__icon {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: currentColor !important;
}

body.isp-sidebar-collapsed #isp-dashboard-sidebar .isp-theme-sidebar .isp-theme-option .isp-theme-toggle__icon svg {
  display: block !important;
  visibility: visible !important;
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

@media (max-width: 767px) {
  .isp-theme-toggle__label {
    display: none;
  }
  .isp-theme-floating {
    top: 12px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body,
  button,
  input,
  select,
  textarea {
    transition: none !important;
  }
}

/* Dark-mode work controls and sidebar brand */
:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__toggle {
  color: var(--isp-text) !important;
  background: var(--isp-surface-raised) !important;
  border-color: var(--isp-border) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__toggle:hover,
:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu.is-open .isp-page-menu__toggle {
  color: #ffffff !important;
  background: var(--isp-sidebar-surface) !important;
  border-color: var(--isp-accent) !important;
  box-shadow: 0 0 0 3px rgba(112, 184, 235, 0.16) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__chev {
  color: var(--isp-text-soft) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__list {
  color: var(--isp-text) !important;
  background: var(--isp-surface-raised) !important;
  border-color: var(--isp-border) !important;
  box-shadow: var(--isp-shadow) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__link {
  color: var(--isp-text-soft) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__link:hover,
:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__link.is-active {
  color: #ffffff !important;
  background: var(--isp-sidebar-surface) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .isp-page-menu__divider {
  background: var(--isp-border) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker,
:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker .ui-datepicker-header,
:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker .ui-datepicker-title {
  color: var(--isp-text) !important;
  background: var(--isp-surface) !important;
  border-color: var(--isp-border) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker .ui-datepicker-header,
:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker .ui-datepicker-title {
  color: #ffffff !important;
  background: var(--isp-header) !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker th,
:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker th span {
  color: #ffffff !important;
  background: #000000 !important;
}

:root[data-isp-theme="dark"] body.isp-work-page .ui-datepicker-calendar .ui-state-default {
  color: var(--isp-text) !important;
}

:root[data-isp-theme="dark"] body.isp-dashboard-page #dash-company,
:root[data-isp-theme="dark"] body.isp-work-page #dash-company {
  color: #f8fafc !important;
}
