:root {
  --mk-primary: #1c4f79;
  --mk-primary-strong: #153f62;
  --mk-primary-soft: #3d759f;
  --mk-secondary: #8aa2b8;
  --mk-bg: #ecf2f8;
  --mk-bg-soft: #f6f9fc;
  --mk-card: #ffffff;
  --mk-card-soft: #f2f7fb;
  --mk-text: #17364f;
  --mk-muted: #5f778f;
  --mk-border: #d6e2ec;
  --mk-success: #1f9b66;
  --mk-danger: #d14747;
  --mk-radius: 18px;
  --mk-shadow-lg: 0 18px 36px rgba(23, 54, 79, 0.15);
  --mk-shadow-md: 0 10px 24px rgba(23, 54, 79, 0.12);
  --mk-shadow-sm: 0 4px 12px rgba(23, 54, 79, 0.1);
  --mk-space-1: 8px;
  --mk-space-2: 12px;
  --mk-space-3: 16px;
  --mk-space-4: 24px;
  --mk-space-5: 32px;
}

html[data-theme="dark"] {
  --mk-primary: #6ea0c8;
  --mk-primary-strong: #4f81ab;
  --mk-primary-soft: #8db6d4;
  --mk-secondary: #93abc0;
  --mk-bg: #102438;
  --mk-bg-soft: #132a42;
  --mk-card: #1a334c;
  --mk-card-soft: #213d59;
  --mk-text: #edf4fb;
  --mk-muted: #b3c6d8;
  --mk-border: #35556f;
  --mk-shadow-lg: 0 18px 36px rgba(0, 0, 0, 0.35);
  --mk-shadow-md: 0 10px 24px rgba(0, 0, 0, 0.3);
  --mk-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.24);
}

html,
body {
  background: var(--mk-bg) !important;
}

body {
  color: var(--mk-text) !important;
  font-family: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif !important;
  background-image:
    radial-gradient(900px 420px at -8% -8%, rgba(61, 117, 159, 0.24), transparent 60%),
    radial-gradient(900px 460px at 108% -10%, rgba(138, 162, 184, 0.2), transparent 58%),
    linear-gradient(180deg, var(--mk-bg), var(--mk-bg-soft)) !important;
}

.page {
  position: relative;
}

.page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(61, 117, 159, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 117, 159, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.55;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 22;
  height: 72px !important;
  padding: 0 22px !important;
  border-bottom: 1px solid var(--mk-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(242, 247, 251, 0.8));
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(26, 51, 76, 0.92), rgba(19, 42, 66, 0.84));
}

.topbar .link {
  color: var(--mk-primary) !important;
  font-weight: 700;
  text-decoration: none;
}

.topbar .link:hover {
  color: var(--mk-primary-strong) !important;
}

.main {
  padding: 26px 22px !important;
  position: relative;
  z-index: 1;
}

.card {
  border-radius: var(--mk-radius) !important;
  border: 1px solid var(--mk-border) !important;
  background: var(--mk-card) !important;
  box-shadow: var(--mk-shadow-lg) !important;
}

.card.card-xl {
  border-radius: 20px !important;
}

.card::before {
  background: radial-gradient(circle at 10% 16%, rgba(61, 117, 159, 0.17), transparent 60%) !important;
}

.title,
.section-title,
h1,
h2,
h3,
label,
th,
td,
.meta,
.lede,
.muted {
  color: var(--mk-text) !important;
}

.lede,
.meta,
.muted,
.footnote,
.pp-subtext,
.helper-text,
.ew-status,
.pu-status,
.sb-status,
.pp-status,
.col-meta {
  color: var(--mk-muted) !important;
}

.brand-logo {
  border: none !important;
  background-color: #ffffff !important;
  box-shadow:
    var(--mk-shadow-md),
    0 12px 26px rgba(61, 117, 159, 0.2) !important;
}

html[data-theme="dark"] .brand-logo {
  border: none !important;
  background-color: #f8fbff !important;
}

.brand-row {
  padding-bottom: var(--mk-space-3);
  margin-bottom: var(--mk-space-4) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--mk-border) 70%, transparent);
}

.brand-row .title {
  margin-bottom: 4px;
}

.brand-row .lede {
  margin-bottom: 0;
  max-width: 760px;
}

/* Shared dashboard button language for nav + selection controls */
.btn:not(.dashboard-tile),
.btn-add,
.btn-remove,
.toggle-chip,
.archive-toggle,
.task-action,
.pp-save-btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 22px 10px 22px 10px !important;
  border: 1px solid var(--mk-border) !important;
  background: linear-gradient(150deg, var(--mk-card), var(--mk-card-soft)) !important;
  color: var(--mk-primary-strong) !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(23, 54, 79, 0.1) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.btn:not(.dashboard-tile)::before,
.btn-add::before,
.btn-remove::before,
.toggle-chip::before,
.archive-toggle::before,
.task-action::before,
.pp-save-btn::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(160deg, rgba(61, 117, 159, 0.28), rgba(61, 117, 159, 0.05));
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  pointer-events: none;
}

.btn:not(.dashboard-tile):hover,
.btn-add:hover,
.btn-remove:hover,
.toggle-chip:hover,
.archive-toggle:hover,
.task-action:hover:not(:disabled),
.pp-save-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(28, 79, 121, 0.55) !important;
  box-shadow: 0 14px 26px rgba(23, 54, 79, 0.18) !important;
}

.btn:not(.dashboard-tile):active,
.btn-add:active,
.btn-remove:active,
.toggle-chip:active,
.archive-toggle:active,
.task-action:active,
.pp-save-btn:active {
  transform: translateY(0);
}

.btn-primary,
.btn-secondary {
  color: var(--mk-primary-strong) !important;
}

.btn-small {
  min-height: 34px;
  padding: 6px 10px;
}

.toggle-chip {
  gap: 8px;
  user-select: none;
}

.toggle-chip:has(input:checked) {
  border-color: rgba(28, 79, 121, 0.6) !important;
  background: linear-gradient(150deg, #e7f2fd, #dceefe) !important;
  box-shadow: 0 10px 20px rgba(23, 54, 79, 0.15) !important;
}

.task-action:disabled,
.task-action.task-action-busy,
.btn-add:disabled,
.btn-remove:disabled,
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .btn:not(.dashboard-tile),
html[data-theme="dark"] .btn-add,
html[data-theme="dark"] .btn-remove,
html[data-theme="dark"] .toggle-chip,
html[data-theme="dark"] .archive-toggle,
html[data-theme="dark"] .task-action,
html[data-theme="dark"] .pp-save-btn {
  background: linear-gradient(150deg, #1a334c, #213d59) !important;
  border-color: #35556f !important;
  color: #edf4fb !important;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-secondary {
  color: #edf4fb !important;
}

html[data-theme="dark"] .toggle-chip:has(input:checked) {
  border-color: #5f88aa !important;
  background: linear-gradient(150deg, #2a4663, #355a7c) !important;
}

.btn-large,
.dashboard-tile {
  min-height: 70px;
}

.dashboard-tile {
  justify-content: flex-start;
  text-align: left;
  border: 1px solid var(--mk-border) !important;
  border-left: 5px solid var(--mk-primary-soft) !important;
  background: linear-gradient(180deg, var(--mk-card), var(--mk-card-soft)) !important;
  color: var(--mk-primary-strong) !important;
  box-shadow: var(--mk-shadow-md) !important;
}

.dashboard-tile:hover {
  border-left-color: var(--mk-primary-strong) !important;
  box-shadow: 0 16px 28px rgba(28, 79, 121, 0.18) !important;
}

.button-grid {
  gap: 12px !important;
}

.form-control,
.pp-select,
.pu-input,
.ew-search-input,
.ew-range-select,
.ew-employee-select,
.country-search-input,
.dual-list-search,
.pp-add-user-select,
textarea,
select,
input {
  border-radius: 12px !important;
  border: 1px solid var(--mk-border) !important;
  background: linear-gradient(180deg, var(--mk-card), var(--mk-card-soft)) !important;
  color: var(--mk-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.form-control:focus,
.pp-select:focus,
.pu-input:focus,
.ew-search-input:focus,
.ew-range-select:focus,
.ew-employee-select:focus,
.country-search-input:focus,
.dual-list-search:focus,
.pp-add-user-select:focus,
textarea:focus,
select:focus,
input:focus {
  border-color: var(--mk-primary-soft) !important;
  box-shadow: 0 0 0 3px rgba(61, 117, 159, 0.2) !important;
}

.ew-kpi-card,
.ew-panel,
.pp-panel,
.pp-groups-panel,
.pp-members-panel,
.sb-shell,
.qb-step,
.col-card,
.info-box,
.offboard-panel,
.review-details,
.pu-table-wrap,
.pu-controls,
.ew-table-wrap,
.sb-table-wrap,
.pp-table-wrap,
.rd-table-wrap,
.rd-controls,
.col-help,
.lookup-side-card,
.lookup-content-card,
.lookup-modal-panel {
  border: 1px solid var(--mk-border) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, var(--mk-card), var(--mk-card-soft)) !important;
  box-shadow: var(--mk-shadow-sm) !important;
}

.lookup-side-card,
.lookup-content-card {
  padding: 16px !important;
}

.lookup-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.lookup-scroll {
  max-height: 700px;
  overflow-y: auto;
  padding-right: 2px;
}

.lookup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.lookup-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(10, 19, 31, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1200;
}

.lookup-modal-panel {
  width: min(460px, 92vw);
  padding: 24px;
}

.lookup-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.pu-table th,
.pu-table td,
.pp-table th,
.pp-table td,
.ew-table th,
.ew-table td,
.sb-table th,
.sb-table td,
.col-table th,
.col-table td,
.rd-table th,
.rd-table td,
th,
td {
  color: var(--mk-text) !important;
  border-bottom: 1px solid var(--mk-border) !important;
}

tbody tr:hover,
.pu-table tbody tr:hover,
.pp-table tbody tr:hover,
.ew-table tbody tr:hover,
.sb-table tbody tr:hover,
.col-table tbody tr:hover,
.rd-table tbody tr:hover {
  background: rgba(61, 117, 159, 0.08) !important;
}

.pu-table tbody tr:nth-child(even),
.pp-table tbody tr:nth-child(even),
.ew-table tbody tr:nth-child(even),
.sb-table tbody tr:nth-child(even),
.col-table tbody tr:nth-child(even),
.rd-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--mk-card-soft) 62%, transparent);
}

.pu-table th,
.pp-table th,
.ew-table th,
.sb-table th,
.col-table th,
.rd-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--mk-card-soft) 86%, var(--mk-card));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
}

.pu-sort-btn,
.sb-sort {
  border: 0 !important;
  background: transparent !important;
  color: var(--mk-muted) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
}

.pu-sort-btn:hover,
.sb-sort:hover,
.sb-sort.active {
  color: var(--mk-primary-strong) !important;
}

.ew-kpi-card-active,
.pp-group-row.is-active td,
.pp-member-row.is-active td,
.dual-list li.selected,
.employee-list li:hover,
.dual-list li:hover,
.offboarded-user-list .dual-list li:hover {
  background: rgba(61, 117, 159, 0.14) !important;
  border-color: rgba(28, 79, 121, 0.45) !important;
}

.notice-red,
.pp-status.error,
.pu-status.error,
.ew-status.error,
.sb-status.error,
.rd-status.error {
  color: var(--mk-danger) !important;
}

.ew-status,
.pu-status,
.pp-status,
.sb-status,
.rd-status,
#qbStatus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--mk-border) 70%, transparent);
  background: color-mix(in srgb, var(--mk-card-soft) 72%, transparent);
  color: var(--mk-primary-strong) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ew-status.error,
.pu-status.error,
.pp-status.error,
.sb-status.error,
.rd-status.error,
#qbStatus.error {
  border-color: color-mix(in srgb, var(--mk-danger) 45%, var(--mk-border)) !important;
  background: color-mix(in srgb, var(--mk-danger) 12%, transparent) !important;
  color: var(--mk-danger) !important;
}

html[data-theme="dark"] .ew-status,
html[data-theme="dark"] .pu-status,
html[data-theme="dark"] .pp-status,
html[data-theme="dark"] .sb-status,
html[data-theme="dark"] .rd-status,
html[data-theme="dark"] #qbStatus {
  color: #e6f1fb !important;
  border-color: rgba(141, 182, 212, 0.55) !important;
  background: rgba(61, 117, 159, 0.24) !important;
}

.actions-row {
  gap: 12px !important;
  align-items: center;
}

.actions-row:not(.rd-top-nav) {
  margin-top: var(--mk-space-4) !important;
  padding-top: var(--mk-space-2);
  border-top: 1px dashed color-mix(in srgb, var(--mk-border) 75%, transparent);
}

.qb-step .actions-row,
.ew-panel .actions-row {
  border-top: 0;
  padding-top: 0;
  margin-top: 12px !important;
}

.actions-row .btn-primary {
  min-width: 170px;
}

.card form .grid {
  gap: var(--mk-space-4) !important;
}

form .form-group {
  margin-bottom: var(--mk-space-4);
}

.form-group label {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mk-muted) !important;
  letter-spacing: 0.01em;
}

.card .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card .section-title::before {
  content: "";
  width: 5px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--mk-primary), var(--mk-primary-soft));
  box-shadow: 0 0 0 1px rgba(61, 117, 159, 0.2);
}

.ui-empty,
.sb-empty,
.offboarded-user-empty,
.ew-empty-state {
  position: relative;
  margin: 6px 0;
  padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, var(--mk-border) 70%, transparent);
  border-radius: 10px;
  color: var(--mk-muted) !important;
  background: color-mix(in srgb, var(--mk-card-soft) 62%, transparent);
}

.ui-empty::before,
.sb-empty::before,
.offboarded-user-empty::before,
.ew-empty-state::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--mk-primary-soft) 48%, var(--mk-border));
  color: var(--mk-primary-strong);
  font-size: 11px;
  font-weight: 700;
}

.ui-loading {
  position: relative !important;
  color: transparent !important;
  min-height: 20px;
}

.ui-loading::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(61, 117, 159, 0.16), rgba(61, 117, 159, 0.36), rgba(61, 117, 159, 0.16));
  background-size: 220% 100%;
  animation: mk-shimmer 1.1s linear infinite;
}

@keyframes mk-shimmer {
  0% { background-position: 160% 0; }
  100% { background-position: -30% 0; }
}

.main .card.ui-enter {
  opacity: 0;
  transform: translateY(10px) scale(0.995);
}

.main .card.ui-enter.ui-enter-active {
  opacity: 1;
  transform: none;
  transition: opacity 0.32s ease, transform 0.34s ease;
  transition-delay: var(--mk-stagger, 0ms);
}

.theme-toggle-fab {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  border: 1px solid var(--mk-primary-strong) !important;
  background: linear-gradient(150deg, var(--mk-primary), var(--mk-primary-soft)) !important;
  color: #ffffff !important;
  box-shadow: var(--mk-shadow-md) !important;
}

.env-badge {
  border-color: var(--mk-primary-soft) !important;
  background: rgba(61, 117, 159, 0.12) !important;
  color: var(--mk-primary-strong) !important;
}

/* Dark-mode standardization for page-local styles */
html[data-theme="dark"] .taskboard-shell .taskboard-subtitle,
html[data-theme="dark"] .taskboard-shell .column-sub,
html[data-theme="dark"] .taskboard-shell .task-meta,
html[data-theme="dark"] .taskboard-shell .task-age,
html[data-theme="dark"] .taskboard-shell .user-menu-item,
html[data-theme="dark"] .taskboard-shell .user-meta,
html[data-theme="dark"] .dw-legend,
html[data-theme="dark"] .dw-device-name,
html[data-theme="dark"] .dw-day-meta,
html[data-theme="dark"] .dw-bar-row,
html[data-theme="dark"] .reboot-shell .date-filter-wrap,
html[data-theme="dark"] .reboot-shell .panel-title {
  color: var(--mk-muted) !important;
}

html[data-theme="dark"] .taskboard-shell .column,
html[data-theme="dark"] .taskboard-shell .task-card,
html[data-theme="dark"] .taskboard-shell .user-dropdown,
html[data-theme="dark"] .dw-day-group,
html[data-theme="dark"] .dw-device-block,
html[data-theme="dark"] .dw-track,
html[data-theme="dark"] .dw-seg-popover,
html[data-theme="dark"] .reboot-users,
html[data-theme="dark"] .reboot-logs,
html[data-theme="dark"] .reboot-shell .user-item-btn {
  background: linear-gradient(180deg, #1a334c, #213d59) !important;
  border-color: #35556f !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] .taskboard-shell .column-title,
html[data-theme="dark"] .taskboard-shell .task-title,
html[data-theme="dark"] .taskboard-shell .task-body,
html[data-theme="dark"] .taskboard-shell .user-menu-item:hover,
html[data-theme="dark"] .dw-day-group-title,
html[data-theme="dark"] .reboot-shell .user-item-btn.active {
  color: #edf4fb !important;
}

html[data-theme="dark"] .taskboard-shell .column-count {
  background: rgba(61, 117, 159, 0.2) !important;
  border-color: #5f88aa !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] .taskboard-shell .archive-toggle {
  background: linear-gradient(150deg, #1a334c, #213d59) !important;
  border-color: #35556f !important;
  color: #edf4fb !important;
}

html[data-theme="dark"] .taskboard-shell .archive-toggle:hover {
  border-color: #5f88aa !important;
  background: linear-gradient(150deg, #2a4663, #355a7c) !important;
}

html[data-theme="dark"] .taskboard-shell .task-card-na {
  background: linear-gradient(180deg, #4a2227, #3f1d22) !important;
  border-color: #85404a !important;
}

html[data-theme="dark"] .taskboard-shell .task-card-ip {
  background: linear-gradient(180deg, #4a3b1f, #403219) !important;
  border-color: #8c6b2f !important;
}

html[data-theme="dark"] .taskboard-shell .task-card-co {
  background: linear-gradient(180deg, #1e3f33, #17352a) !important;
  border-color: #2f7357 !important;
}

html[data-theme="dark"] .taskboard-shell .task-card-others {
  background: linear-gradient(180deg, #1b3a4a, #153241) !important;
  border-color: #35657f !important;
}

html[data-theme="dark"] .taskboard-shell .task-age-old,
html[data-theme="dark"] .taskboard-shell .task-age-critical {
  color: #fca5a5 !important;
}

html[data-theme="dark"] .dw-axis,
html[data-theme="dark"] .dw-trend-label,
html[data-theme="dark"] .dw-trend-point-label,
html[data-theme="dark"] .dw-trend-point-label-max,
html[data-theme="dark"] .dw-trend-point-label-min,
html[data-theme="dark"] .dw-trend-marker-max,
html[data-theme="dark"] .dw-trend-marker-min {
  color: #b3c6d8 !important;
  fill: #b3c6d8 !important;
}

html[data-theme="dark"] .dw-axis-tick::before,
html[data-theme="dark"] .dw-day-row td,
html[data-theme="dark"] .dw-track {
  border-color: #35556f !important;
  background: #1a334c !important;
}

html[data-theme="dark"] .dw-future,
html[data-theme="dark"] .dw-bar-track {
  background: #274760 !important;
  border-color: #4a6c86 !important;
}

html[data-theme="dark"] .dw-seg.is-selected {
  outline-color: #dbeaf7 !important;
}

html[data-theme="dark"] .dw-seg-popover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .reboot-shell .user-item-btn:hover {
  background: #274760 !important;
}

html[data-theme="dark"] .reboot-shell .user-item-btn.active {
  border-color: #5f88aa !important;
  background: #355a7c !important;
}

html[data-theme="dark"] .reboot-shell .log-output {
  background: #0f1f2f !important;
  border-color: #35556f !important;
  color: #dbeaf7 !important;
}

html[data-theme="dark"] .reboot-shell .log-file-title {
  color: #9fc6e4 !important;
  border-bottom-color: #35556f !important;
}

html[data-theme="dark"] .reboot-shell .download-link {
  color: #dbeaf7 !important;
  border-color: #4a6c86 !important;
}

html[data-theme="dark"] .reboot-shell .download-link:hover {
  background: #355a7c !important;
  border-color: #6ea0c8 !important;
}

html[data-theme="dark"] .reboot-shell .log-hit {
  background: #5f88aa !important;
  color: #0b1b2f !important;
}

html[data-theme="dark"] .form-note,
html[data-theme="dark"] .retire-note {
  background: rgba(61, 117, 159, 0.14) !important;
  border-color: rgba(61, 117, 159, 0.45) !important;
  color: #dbeaf7 !important;
}

html[data-theme="dark"] .retire-note-title {
  color: #9fc6e4 !important;
}

html[data-theme="dark"] .dw-day-group,
html[data-theme="dark"] .dw-device-block {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .dw-trend-axis {
  stroke: #5a7b95 !important;
}

html[data-theme="dark"] .dw-trend-grid {
  stroke: #35556f !important;
}

html[data-theme="dark"] .dw-trend-line,
html[data-theme="dark"] .dw-trend-dot {
  stroke: #8db6d4 !important;
  fill: #8db6d4 !important;
}

html[data-theme="dark"] .dw-trend-dot-max {
  fill: #22c55e !important;
}

html[data-theme="dark"] .dw-trend-dot-min {
  fill: #ef4444 !important;
}

html[data-theme="dark"] .taskboard-shell .user-dropdown {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24) !important;
}

/* Light header row style in dark mode for data tables */
html[data-theme="dark"] .col-table thead th,
html[data-theme="dark"] .rd-table thead th,
html[data-theme="dark"] .pu-table thead th,
html[data-theme="dark"] .pp-table thead th,
html[data-theme="dark"] .ew-table thead th,
html[data-theme="dark"] .sb-table thead th {
  background: #dce3ea !important;
  color: #1f2937 !important;
  border-bottom-color: #c5ced9 !important;
}

html[data-theme="dark"] .pu-sort-btn,
html[data-theme="dark"] .sb-sort {
  color: #334155 !important;
}

html[data-theme="dark"] .pu-sort-btn:hover,
html[data-theme="dark"] .sb-sort:hover,
html[data-theme="dark"] .sb-sort.active {
  color: #0f172a !important;
}

html[data-theme="dark"] .col-table thead th.col-col-log,
html[data-theme="dark"] .col-table tbody td.col-col-log {
  background: #dce3ea !important;
  color: #1f2937 !important;
}

/* Keep dropdowns/selects white in dark mode */
html[data-theme="dark"] select,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] select.form-control option,
html[data-theme="dark"] select option {
  background: #ffffff !important;
  color: #153f62 !important;
  border-color: #cfdbe6 !important;
  color-scheme: light !important;
}

html[data-theme="dark"] .employee-list,
html[data-theme="dark"] .user-dropdown,
html[data-theme="dark"] .country-dropdown,
html[data-theme="dark"] .offboarded-user-list .dual-list,
html[data-theme="dark"] #userList {
  background: #ffffff !important;
  color: #153f62 !important;
  border-color: #cfdbe6 !important;
}

html[data-theme="dark"] .employee-list li,
html[data-theme="dark"] .user-menu-item,
html[data-theme="dark"] .country-option,
html[data-theme="dark"] .offboarded-user-list .dual-list li,
html[data-theme="dark"] #userList .user-item-btn {
  color: #153f62 !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="dark"] .employee-list li:hover,
html[data-theme="dark"] .user-menu-item:hover,
html[data-theme="dark"] .country-option:hover,
html[data-theme="dark"] .offboarded-user-list .dual-list li:hover,
html[data-theme="dark"] #userList .user-item-btn:hover {
  background: #eef4fb !important;
  color: #153f62 !important;
}

@media (max-width: 960px) {
  .main {
    padding: 14px !important;
  }

  .topbar {
    height: 64px !important;
    padding: 0 12px !important;
  }

  .card,
  .card.card-xl {
    padding: 18px !important;
    border-radius: 14px !important;
  }

  .dashboard-tile {
    min-height: 58px;
  }

  .lookup-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
