/* Spaces (Unistack) — Global dark theme layer
   This file is intentionally plain CSS (no Tailwind) so it can safely sit on top
   of Bootstrap CDN + existing inline styles across Blade pages. */

@import url('https://fonts.googleapis.com/css2?family=Recursive:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap');

/* App palette */
:root {
  --ustk-bg: #0b1220;          /* app background */
  --ustk-surface: #0f172a;     /* cards, panels */
  --ustk-surface-2: #111c33;   /* elevated */
  --ustk-surface-3: #16213d;   /* hover / active */
  --ustk-border: rgba(148, 163, 184, 0.22);
  --ustk-border-strong: rgba(148, 163, 184, 0.32);
  --ustk-text: #e5e7eb;
  --ustk-muted: #94a3b8;
  --ustk-muted-2: #a8b3c7;

  --ustk-primary: #3b82f6;
  --ustk-primary-600: #2563eb;
  --ustk-success: #22c55e;
  --ustk-warning: #f59e0b;
  --ustk-danger: #ef4444;

  --ustk-shadow-sm: 0 1px 0 rgba(2, 6, 23, 0.55);
  --ustk-shadow-md: 0 10px 30px rgba(2, 6, 23, 0.45);

  /* Layering: keep overlays above sticky headers/navbars (navbar uses z-index: 1200) */
  --bs-backdrop-zindex: 3990;
  --bs-modal-zindex: 4000;
  --bs-popover-zindex: 4100;
  --bs-tooltip-zindex: 4200;
}

/* -----------------------------------------------------------------------------
   Overlay layering fixes
   Bootstrap may define these z-index CSS variables on `.modal` / `.modal-backdrop`
   themselves, which would override our `:root` values. Force them here so modals
   never end up underneath the sticky top navigation.
----------------------------------------------------------------------------- */
html .modal {
  --bs-modal-zindex: 4000;
  z-index: var(--bs-modal-zindex) !important;
}
html .modal-backdrop {
  --bs-backdrop-zindex: 3990;
  z-index: var(--bs-backdrop-zindex) !important;
}

/* Delete / danger buttons: transparent background + red text + red border (global) */
.btn-danger,
.btn-outline-danger {
  --ustk-danger-btn: rgb(var(--bs-danger-rgb, 220, 53, 69));
  background-color: transparent !important;
  border-color: var(--ustk-danger-btn) !important;
  color: var(--ustk-danger-btn) !important;
}
.btn-danger:hover,
.btn-outline-danger:hover {
  background-color: transparent !important;
  border-color: var(--ustk-danger-btn) !important;
  color: var(--ustk-danger-btn) !important;
}
.btn-danger:active,
.btn-outline-danger:active {
  background-color: transparent !important;
  border-color: var(--ustk-danger-btn) !important;
  color: var(--ustk-danger-btn) !important;
}
.btn-danger:focus-visible,
.btn-outline-danger:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-danger-rgb, 220, 53, 69), 0.25) !important;
}
.btn-danger:disabled,
.btn-outline-danger:disabled,
.btn-danger.disabled,
.btn-outline-danger.disabled {
  background-color: transparent !important;
  border-color: var(--ustk-danger-btn) !important;
  color: var(--ustk-danger-btn) !important;
  opacity: 0.55;
}

/* Force dark color-scheme so form controls + scrollbars behave properly */
html[data-bs-theme="dark"] {
  color-scheme: dark;
}

/* Bootstrap variable tuning (works with Bootstrap 5.3 color modes) */
html[data-bs-theme="dark"] {
  --bs-body-bg: var(--ustk-bg);
  --bs-body-color: var(--ustk-text);
  --bs-secondary-color: var(--ustk-muted);
  --bs-tertiary-color: var(--ustk-muted);
  --bs-emphasis-color: var(--ustk-text);
  --bs-border-color: var(--ustk-border);
  --bs-border-color-translucent: var(--ustk-border);

  --bs-link-color: #7fb0ff;
  --bs-link-hover-color: #9ac2ff;

  --bs-heading-color: var(--ustk-text);
  --bs-secondary-bg: var(--ustk-surface);
  --bs-tertiary-bg: var(--ustk-surface-2);

  --bs-card-bg: var(--ustk-surface);
  --bs-modal-bg: var(--ustk-surface);
  --bs-dropdown-bg: var(--ustk-surface);
  --bs-popover-bg: var(--ustk-surface);
}

/* Global text/background */
html[data-bs-theme="dark"],
html[data-bs-theme="dark"] body {
  background: var(--ustk-bg) !important;
  color: var(--ustk-text) !important;
}

/* Common layout wrapper used across pages */
html[data-bs-theme="dark"] .page-shell {
  background: var(--ustk-bg) !important;
  color: var(--ustk-text) !important;
}

/* Fix common light utility usage in templates */
html[data-bs-theme="dark"] .bg-white {
  background-color: var(--ustk-surface) !important;
}
html[data-bs-theme="dark"] .bg-light {
  background-color: var(--ustk-bg) !important;
}
html[data-bs-theme="dark"] .text-dark {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .lead-muted {
  color: var(--ustk-muted) !important;
}
html[data-bs-theme="dark"] .border,
html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-end,
html[data-bs-theme="dark"] .border-start,
html[data-bs-theme="dark"] .border-bottom {
  border-color: var(--ustk-border) !important;
}

/* Navbar + top bars */
html[data-bs-theme="dark"] .navbar {
  background-color: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1200; /* stay above sticky headers/cards */
}

/* Cards */
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .workspace-card {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
  box-shadow: var(--ustk-shadow-sm);
}
html[data-bs-theme="dark"] .card .card-text {
  color: var(--ustk-muted-2);
}

/* Custom “card” blocks used on several pages */
html[data-bs-theme="dark"] .settings-card,
html[data-bs-theme="dark"] .profile-card,
html[data-bs-theme="dark"] .message-container,
html[data-bs-theme="dark"] .message-form,
html[data-bs-theme="dark"] .history-card,
html[data-bs-theme="dark"] .task-header,
html[data-bs-theme="dark"] .bill-container,
html[data-bs-theme="dark"] .bill-preview,
html[data-bs-theme="dark"] .invite-card {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}

html[data-bs-theme="dark"] .task-card {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
}

/* “Unread” accents */
html[data-bs-theme="dark"] .message-card.unread {
  background-color: rgba(59, 130, 246, 0.10) !important;
  border-left-color: rgba(59, 130, 246, 0.85) !important;
}
html[data-bs-theme="dark"] .notification-item.unread {
  background-color: rgba(59, 130, 246, 0.08) !important;
  border-left-color: rgba(59, 130, 246, 0.85) !important;
}
html[data-bs-theme="dark"] .notification-item:hover {
  background-color: rgba(148, 163, 184, 0.10) !important;
}

/* Files page */
html[data-bs-theme="dark"] .file-item:hover {
  background-color: rgba(148, 163, 184, 0.08) !important;
}
html[data-bs-theme="dark"] .file-name {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .file-meta,
html[data-bs-theme="dark"] .file-size,
html[data-bs-theme="dark"] .tracking-info,
html[data-bs-theme="dark"] .tracking-date,
html[data-bs-theme="dark"] .task-list,
html[data-bs-theme="dark"] .estimate-cell {
  color: var(--ustk-muted) !important;
}

/* My Hours / list-like rows */
html[data-bs-theme="dark"] .summary-card {
  background: var(--ustk-surface) !important;
  border: 1px solid var(--ustk-border) !important;
}
html[data-bs-theme="dark"] .tracking-row,
html[data-bs-theme="dark"] .task-row {
  background: rgba(148, 163, 184, 0.06) !important;
}

/* Summary boxes (Tracked Hours page) */
html[data-bs-theme="dark"] .summary-box {
  border-radius: 8px;
  border: 1px solid var(--ustk-border) !important;
  background: rgba(148, 163, 184, 0.06) !important;
}
html[data-bs-theme="dark"] .summary-box--paid {
  border-color: rgba(34, 197, 94, 0.35) !important;
  background: rgba(34, 197, 94, 0.10) !important;
}
html[data-bs-theme="dark"] .summary-box--paid .h4 {
  color: #bbf7d0 !important;
}
html[data-bs-theme="dark"] .summary-box--unpaid {
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.10) !important;
}
html[data-bs-theme="dark"] .summary-box--unpaid .h4 {
  color: #fecaca !important;
}

/* Timeline page */
html[data-bs-theme="dark"] .layout,
html[data-bs-theme="dark"] .timeline-header-wrapper,
html[data-bs-theme="dark"] .timeline-header,
html[data-bs-theme="dark"] .unit-row-left {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
}

/* List view (board/.../list) */
html[data-bs-theme="dark"] .list-view-header {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .list-view-row {
  border-bottom-color: rgba(148, 163, 184, 0.14) !important;
}
html[data-bs-theme="dark"] .list-view-row:hover {
  background: rgba(148, 163, 184, 0.08) !important;
}
html[data-bs-theme="dark"] .list-view-row.is-done {
  background: rgba(34, 197, 94, 0.10) !important;
}
html[data-bs-theme="dark"] .list-view-row.is-urgent {
  background: rgba(239, 68, 68, 0.10) !important;
}
html[data-bs-theme="dark"] .list-separator {
  background: rgba(148, 163, 184, 0.08) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}

/* Timeline-specific highlights (make them subtle on dark) */
html[data-bs-theme="dark"] .timeline-header-left,
html[data-bs-theme="dark"] .timeline-header-right,
html[data-bs-theme="dark"] .list-header-row,
html[data-bs-theme="dark"] .list-header-row .unit-row-right {
  background: rgba(148, 163, 184, 0.06) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .day-cell {
  border-left-color: rgba(148, 163, 184, 0.12) !important;
}
html[data-bs-theme="dark"] .today,
html[data-bs-theme="dark"] .today-indicator {
  background-color: rgba(245, 158, 11, 0.14) !important;
}
html[data-bs-theme="dark"] .weekend,
html[data-bs-theme="dark"] .weekend-indicator {
  background-color: rgba(148, 163, 184, 0.06) !important;
}
html[data-bs-theme="dark"] .unit-wrapper {
  border-bottom-color: rgba(148, 163, 184, 0.12) !important;
}
html[data-bs-theme="dark"] .unit-row-right:hover {
  background: rgba(148, 163, 184, 0.08) !important;
}
html[data-bs-theme="dark"] .list-name {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .assign-hint {
  color: var(--ustk-muted) !important;
}



/* Buttons: global “landing-style” gradient primary (every page) */
html[data-bs-theme="dark"] .btn-primary,
html[data-bs-theme="dark"] .btn-ustk-primary {
  border-color: rgba(99, 102, 241, 0.55) !important;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 1) 0%,
    rgba(236, 72, 153, 0.90) 55%,
    rgba(34, 211, 238, 0.85) 100%
  ) !important;
  color: #0b1020 !important;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
}
html[data-bs-theme="dark"] .btn-primary:hover,
html[data-bs-theme="dark"] .btn-primary:focus,
html[data-bs-theme="dark"] .btn-ustk-primary:hover,
html[data-bs-theme="dark"] .btn-ustk-primary:focus {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
html[data-bs-theme="dark"] .btn-primary:active,
html[data-bs-theme="dark"] .btn-ustk-primary:active {
  filter: brightness(0.98);
  transform: translateY(0);
}
html[data-bs-theme="dark"] .btn-primary:disabled,
html[data-bs-theme="dark"] .btn-primary.disabled,
html[data-bs-theme="dark"] .btn-ustk-primary:disabled,
html[data-bs-theme="dark"] .btn-ustk-primary.disabled {
  filter: none;
  transform: none;
  opacity: 0.65;
}

/* Outline primary: glass button */
html[data-bs-theme="dark"] .btn-outline-primary,
html[data-bs-theme="dark"] .btn-ustk-outline {
  border-color: rgba(148, 163, 184, 0.35) !important;
  color: var(--ustk-text) !important;
  background: rgba(10, 16, 34, 0.35) !important;
}
html[data-bs-theme="dark"] .btn-outline-primary:hover,
html[data-bs-theme="dark"] .btn-ustk-outline:hover {
  border-color: rgba(34, 211, 238, 0.40) !important;
  background: rgba(34, 211, 238, 0.10) !important;
  color: var(--ustk-text) !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-bs-theme="dark"] .btn-primary:hover,
  html[data-bs-theme="dark"] .btn-ustk-primary:hover {
    transform: none;
  }
}
html[data-bs-theme="dark"] .btn-outline-danger:hover {
  background-color: rgba(239, 68, 68, 0.14) !important;
}

/* Forms */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
  background-color: rgba(15, 23, 42, 0.7) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
  border-color: rgba(59, 130, 246, 0.7) !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.18) !important;
}
html[data-bs-theme="dark"] .form-control::placeholder {
  color: rgba(148, 163, 184, 0.75) !important;
}

/* Alerts */
html[data-bs-theme="dark"] .alert {
  border-color: var(--ustk-border) !important;
}
html[data-bs-theme="dark"] .alert-success {
  background-color: rgba(34, 197, 94, 0.12) !important;
  color: #bbf7d0 !important;
}
html[data-bs-theme="dark"] .alert-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  color: #fecaca !important;
}
html[data-bs-theme="dark"] .alert-warning {
  background-color: rgba(245, 158, 11, 0.14) !important;
  color: #fde68a !important;
}
html[data-bs-theme="dark"] .alert-info {
  background-color: rgba(56, 189, 248, 0.12) !important;
  color: #bae6fd !important;
}

/* Order notice (dashboard / space) — modern info hint, dark */
html[data-bs-theme="dark"] .ustk-order-notice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, var(--ustk-surface-2) 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.22) !important;
  border-radius: 10px;
  color: var(--ustk-muted-2) !important;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: var(--ustk-shadow-sm);
}
html[data-bs-theme="dark"] .ustk-order-notice svg {
  flex-shrink: 0;
  color: var(--ustk-primary) !important;
  opacity: 0.95;
}

/* Modals */
html[data-bs-theme="dark"] .modal-content {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
  box-shadow: var(--ustk-shadow-md);
}
html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer {
  border-color: var(--ustk-border) !important;
}

/* Dropdowns */
html[data-bs-theme="dark"] .dropdown-menu {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
  z-index: 2000; /* ensure profile dropdown stays above board UI */
}
html[data-bs-theme="dark"] .dropdown-item {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
  background: rgba(148, 163, 184, 0.12) !important;
}

/* Tables */
html[data-bs-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ustk-text);
  --bs-table-border-color: var(--ustk-border);
  --bs-table-striped-bg: rgba(148, 163, 184, 0.06);
  --bs-table-hover-bg: rgba(148, 163, 184, 0.08);
}

/* Badges */
html[data-bs-theme="dark"] .badge.bg-primary {
  background-color: rgba(59, 130, 246, 0.9) !important;
}

/* Notification list "New" label — gradient pill matching site primary */
html[data-bs-theme="dark"] .notification-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 1) 0%,
    rgba(236, 72, 153, 0.92) 50%,
    rgba(34, 211, 238, 0.9) 100%
  ) !important;
  color: #0b1020 !important;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* Board-specific common classes (used across multiple pages) */
html[data-bs-theme="dark"] .list-container {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: var(--ustk-border) !important;
}
html[data-bs-theme="dark"] .unit-card {
  background: var(--ustk-surface) !important;
  box-shadow: var(--ustk-shadow-sm) !important;
  border: 1px solid var(--ustk-border) !important;
}
html[data-bs-theme="dark"] .unit-card:hover {
  background: var(--ustk-surface-2) !important;
}

/* Rich-text / markdown editor blocks used on board pages */
html[data-bs-theme="dark"] .description-toolbar {
  background: rgba(15, 23, 42, 0.75) !important;
  border-bottom-color: var(--ustk-border) !important;
}
html[data-bs-theme="dark"] .description-toolbar button {
  background: rgba(15, 23, 42, 0.75) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .description-toolbar button:hover {
  background: rgba(148, 163, 184, 0.12) !important;
}
html[data-bs-theme="dark"] .description-display {
  background-color: rgba(148, 163, 184, 0.08) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .description-display blockquote {
  border-left-color: rgba(148, 163, 184, 0.35) !important;
  color: var(--ustk-muted-2) !important;
}
html[data-bs-theme="dark"] .description-display code,
html[data-bs-theme="dark"] .description-display pre {
  background-color: rgba(148, 163, 184, 0.12) !important;
  color: var(--ustk-text) !important;
}

html[data-bs-theme="dark"] .description-editor {
  background-color: rgba(15, 23, 42, 0.7) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .description-editor:empty:before {
  /* Placeholder ("Add description") - keep visible on dark editor surfaces */
  color: rgba(148, 163, 184, 0.78) !important;
}
html[data-bs-theme="dark"] .description-editor blockquote {
  border-left-color: rgba(148, 163, 184, 0.35) !important;
  color: var(--ustk-muted-2) !important;
}
html[data-bs-theme="dark"] .description-editor code,
html[data-bs-theme="dark"] .description-editor pre {
  background-color: rgba(148, 163, 184, 0.12) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .description-editor a {
  color: rgba(147, 197, 253, 0.95) !important;
}

/* Task/List labels: landing-page “glass chip” style */
html[data-bs-theme="dark"] .label-badge {
  --ustk-label-color: #61bd4f;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: rgba(248, 250, 252, 0.94) !important;
  background: rgba(10, 16, 34, 0.35) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

html[data-bs-theme="dark"] .label-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ustk-label-color);
  box-shadow: 0 0 0 2px rgba(2, 6, 23, 0.42);
  flex: 0 0 auto;
}

html[data-bs-theme="dark"] .label-badge:hover {
  background: rgba(10, 16, 34, 0.48) !important;
  border-color: rgba(148, 163, 184, 0.30) !important;
  color: #ffffff !important;
}

html[data-bs-theme="dark"] .check-dropdown {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
  box-shadow: var(--ustk-shadow-md) !important;
  color: var(--ustk-text) !important;
}

/* Assigned user “chips” (tasks, lists, modals, list view, board view) */
html[data-bs-theme="dark"] .user-badge {
  background-color: rgba(148, 163, 184, 0.12) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .user-badge:hover {
  background-color: rgba(148, 163, 184, 0.16) !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
}

/* Labels wrapper (group labels in tasks/list rows with a subtle border) */
html[data-bs-theme="dark"] .ustk-labels-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(10, 16, 34, 0.30);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

/* “Assign users / labels” containers inside modals (they were hardcoded to #f8f9fa inline) */
html[data-bs-theme="dark"] #usersContainer,
html[data-bs-theme="dark"] #createTaskUsersContainer,
html[data-bs-theme="dark"] #listUsersContainer,
html[data-bs-theme="dark"] #labelsContainer,
html[data-bs-theme="dark"] #listLabelsContainer {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}

/* Create task modal: cover drop zone was hardcoded to light theme */
html[data-bs-theme="dark"] #createTaskModal #createTaskCoverDropZone {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}
html[data-bs-theme="dark"] #createTaskModal #createTaskCoverDropZone [style*="color: #666"] {
  color: rgba(226, 232, 240, 0.78) !important;
}

/* Dropdowns used by assign-user/assign-label UIs (often have inline white background) */
html[data-bs-theme="dark"] #addUserDropdown,
html[data-bs-theme="dark"] #createTaskAddUserDropdown,
html[data-bs-theme="dark"] #addListUserDropdown,
html[data-bs-theme="dark"] #addLabelDropdown,
html[data-bs-theme="dark"] #createTaskLabelsDropdown,
html[data-bs-theme="dark"] #addListLabelDropdown {
  background-color: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
  box-shadow: var(--ustk-shadow-md) !important;
}

/* The board modals build dropdown items as plain <div> with hardcoded light backgrounds via JS.
   Force them to match the landing-page dark theme surfaces. */
html[data-bs-theme="dark"] #addUserDropdown > div,
html[data-bs-theme="dark"] #createTaskAddUserDropdown > div,
html[data-bs-theme="dark"] #addListUserDropdown > div,
html[data-bs-theme="dark"] #addLabelDropdown > div,
html[data-bs-theme="dark"] #createTaskLabelsDropdown > div {
  background-color: transparent !important; /* beats JS-set #f8f9fa / #e9ecef */
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #addUserDropdown > div:hover,
html[data-bs-theme="dark"] #createTaskAddUserDropdown > div:hover,
html[data-bs-theme="dark"] #addListUserDropdown > div:hover,
html[data-bs-theme="dark"] #addLabelDropdown > div:hover,
html[data-bs-theme="dark"] #createTaskLabelsDropdown > div:hover {
  background-color: rgba(148, 163, 184, 0.12) !important;
}

/* Make dropdown items feel native on dark */
html[data-bs-theme="dark"] .dropdown-item {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
  background: rgba(148, 163, 184, 0.12) !important;
}

/* Small readonly cost display (was forced to #f8f9fa) */
html[data-bs-theme="dark"] #costDisplayInput {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}

/* Edit task modal (#unitEditModal): kill remaining light inline backgrounds */
html[data-bs-theme="dark"] #unitEditModal #manualTimeTrackingForm,
html[data-bs-theme="dark"] #unitEditModal #commentForm,
html[data-bs-theme="dark"] #unitEditModal #askClientForm {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal #commentInput,
html[data-bs-theme="dark"] #unitEditModal #askClientInput {
  background-color: rgba(2, 6, 23, 0.35) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #commentInput:empty:before,
html[data-bs-theme="dark"] #askClientInput:empty:before {
  color: rgba(148, 163, 184, 0.75) !important;
}

/* Edit task modal core surfaces */
html[data-bs-theme="dark"] #unitEditModal .modal-content {
  /* Lighter “white-tinted” glass, matching the landing dark theme aesthetic */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.07) 100%),
    rgba(10, 16, 34, 0.44) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.65);
}
html[data-bs-theme="dark"] #unitEditModal .modal-header,
html[data-bs-theme="dark"] #unitEditModal .modal-body,
html[data-bs-theme="dark"] #unitEditModal .modal-footer {
  background: transparent !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}

/* Edit task modal: tab bar — dark glass, no white background */
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs-wrapper {
  background: rgba(10, 16, 34, 0.55) !important;
  border-bottom-color: var(--ustk-border) !important;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  padding: 0.5rem 1rem 0 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs,
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs-wrapper .task-modal-tabs {
  background: transparent !important;
  border-bottom: none !important;
}
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs .nav-link {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-bottom: none !important;
  margin-bottom: -1px;
  color: var(--ustk-muted) !important;
  border-radius: 10px 10px 0 0;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs .nav-link:hover {
  background: rgba(148, 163, 184, 0.12) !important;
  border-color: transparent !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs .nav-link.active {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: var(--ustk-border) !important;
  border-bottom-color: transparent !important;
  color: var(--ustk-text) !important;
  box-shadow: 0 -1px 0 0 var(--ustk-border);
}
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs-actions .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.7;
}
html[data-bs-theme="dark"] #unitEditModal .task-modal-tabs-actions .btn-close:hover {
  opacity: 1;
}

/* Modern dark buttons in dialogs/modals (keep them calm; brighten on hover) */
html[data-bs-theme="dark"] .modal .btn,
html[data-bs-theme="dark"] .modal button.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
html[data-bs-theme="dark"] .modal .btn.btn-sm {
  border-radius: 9px;
}
html[data-bs-theme="dark"] .modal .btn.btn-lg {
  border-radius: 12px;
}
html[data-bs-theme="dark"] .modal .btn:focus,
html[data-bs-theme="dark"] .modal .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.18) !important;
}

/* Primary (inherit global gradient primary; only tune contrast for modal surfaces) */
html[data-bs-theme="dark"] .modal .btn-primary {
  color: #0b1020 !important;
}

/* Secondary */
html[data-bs-theme="dark"] .modal .btn-secondary {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.24);
  color: var(--ustk-text);
}
html[data-bs-theme="dark"] .modal .btn-secondary:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.34);
  color: #ffffff;
}

/* Success */
html[data-bs-theme="dark"] .modal .btn-success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.30);
  color: #dcfce7;
}
html[data-bs-theme="dark"] .modal .btn-success:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.42);
  color: #ffffff;
}

/* Warning */
html[data-bs-theme="dark"] .modal .btn-warning {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.30);
  color: #ffedd5;
}
html[data-bs-theme="dark"] .modal .btn-warning:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.42);
  color: #ffffff;
}

/* Danger / Delete */
html[data-bs-theme="dark"] .modal .btn-danger,
html[data-bs-theme="dark"] .modal .btn-outline-danger {
  background: transparent !important;
  border-color: rgb(var(--bs-danger-rgb, 220, 53, 69)) !important;
  color: rgb(var(--bs-danger-rgb, 220, 53, 69)) !important;
}
html[data-bs-theme="dark"] .modal .btn-danger:hover,
html[data-bs-theme="dark"] .modal .btn-outline-danger:hover {
  background: transparent !important;
  border-color: rgb(var(--bs-danger-rgb, 220, 53, 69)) !important;
  color: rgb(var(--bs-danger-rgb, 220, 53, 69)) !important;
}

/* Outline variants: keep readable + modern on dark (inherit global glass outline) */
html[data-bs-theme="dark"] .modal .btn-outline-primary {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .modal .btn-outline-secondary {
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.24);
  color: var(--ustk-text);
}
html[data-bs-theme="dark"] .modal .btn-outline-secondary:hover {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.34);
  color: #ffffff;
}

/* Close button in modal header (avoid "bright" close on dark) */
html[data-bs-theme="dark"] .modal .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.65;
}
html[data-bs-theme="dark"] .modal .btn-close:hover {
  opacity: 0.9;
}

/* Active tracking banner (top of board) */
html[data-bs-theme="dark"] #active-tracking-users-container > .d-flex {
  background-color: rgba(34, 197, 94, 0.14) !important; /* dark transparent green */
  border: 1px solid rgba(34, 197, 94, 0.22) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #active-tracking-users-container .fw-semibold {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #active-tracking-users-container #active-tracking-users-list .badge {
  background-color: rgba(34, 197, 94, 0.20) !important; /* override inline #22c55e */
  border: 1px solid rgba(34, 197, 94, 0.30) !important;
  color: #dcfce7 !important;
}
html[data-bs-theme="dark"] #active-tracking-users-container #active-tracking-users-list .badge:hover {
  background-color: rgba(34, 197, 94, 0.26) !important;
  border-color: rgba(34, 197, 94, 0.42) !important;
  color: #ffffff !important;
}
html[data-bs-theme="dark"] #active-tracking-users-container #active-tracking-users-list span {
  color: var(--ustk-text) !important;
}

/* Description viewer/editor inside edit modal (was yellow/white) */
html[data-bs-theme="dark"] #unitEditModal #descriptionDisplay {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal #descriptionEditor {
  background-color: rgba(2, 6, 23, 0.35) !important;
  border-color: var(--ustk-border) !important;
  /* Make typed text brighter/whiter for readability in dark modal */
  color: rgba(255, 255, 255, 0.96) !important;
  caret-color: #ffffff !important;
}
html[data-bs-theme="dark"] #unitEditModal #descriptionEditor:empty:before {
  /* Placeholder ("Add description") was too dark on the modal background */
  color: rgba(248, 250, 252, 0.72) !important;
}

/* Description editor inside create task modal (match edit modal styling) */
html[data-bs-theme="dark"] #createTaskModal #createTaskDescriptionEditor {
  background-color: rgba(2, 6, 23, 0.35) !important;
  border-color: var(--ustk-border) !important;
  /* Make typed text brighter/whiter for readability in dark modal */
  color: rgba(255, 255, 255, 0.96) !important;
  caret-color: #ffffff !important;
}
html[data-bs-theme="dark"] #createTaskModal #createTaskDescriptionEditor:empty:before {
  /* Placeholder ("Add description") was too dark on the modal background */
  color: rgba(248, 250, 252, 0.72) !important;
}

/* Cover drop zone inside modal header (was #f8f9fa) */
html[data-bs-theme="dark"] #unitEditModal #coverDropZone {
  background-color: rgba(15, 23, 42, 0.55) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal #coverDropZone [style*="color: #666"] {
  color: var(--ustk-muted) !important;
}

/* Generic safety net for inline light backgrounds inside the edit modal */
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: #f8f9fa"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: #f8f9fa"],
html[data-bs-theme="dark"] #unitEditModal [style*="background:#f8f9fa"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color:#f8f9fa"] {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: #e9ecef"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color:#e9ecef"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: #e9ecef"],
html[data-bs-theme="dark"] #unitEditModal [style*="background:#e9ecef"] {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: #fffef0"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color:#fffef0"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: #fffef0"],
html[data-bs-theme="dark"] #unitEditModal [style*="background:#fffef0"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: #fff9e6"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color:#fff9e6"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: #fff9e6"],
html[data-bs-theme="dark"] #unitEditModal [style*="background:#fff9e6"] {
  background-color: rgba(15, 23, 42, 0.65) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}

/* Comments + Ask Client rendered items (JS uses light backgrounds like #f3f4f6 / #fef3c7 inline) */
html[data-bs-theme="dark"] #unitEditModal #commentsList [data-comment-id],
html[data-bs-theme="dark"] #unitEditModal #askClientList [data-comment-id] {
  /* Slightly lighter translucent surface for contrast against modal bg */
  background-color: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(148, 163, 184, 0.30) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal #commentsList [data-comment-id] .text-muted,
html[data-bs-theme="dark"] #unitEditModal #askClientList [data-comment-id] .text-muted {
  color: var(--ustk-muted) !important;
}
html[data-bs-theme="dark"] #unitEditModal #commentsList [data-comment-id] a,
html[data-bs-theme="dark"] #unitEditModal #askClientList [data-comment-id] a {
  color: #93c5fd !important;
}

/* Override inline "light theme" text colors inside rendered comment/question bodies */
html[data-bs-theme="dark"] #unitEditModal #commentsList [data-comment-id] [style*="color: #374151"],
html[data-bs-theme="dark"] #unitEditModal #askClientList [style*="color: #374151"] {
  color: #ffffff !important;
}

/* Some inline fragments inside comments use the same color but live outside [data-comment-id] */
html[data-bs-theme="dark"] #unitEditModal #commentsList [style*="color: #374151"],
html[data-bs-theme="dark"] #unitEditModal #askClientList [style*="color: #374151"] {
  color: #ffffff !important;
}

/* User badge inside comments/questions is rendered with inline light background */
html[data-bs-theme="dark"] #unitEditModal #commentsList [data-comment-id] [style*="background-color: #e5e7eb"],
html[data-bs-theme="dark"] #unitEditModal #askClientList [style*="background-color: #e5e7eb"] {
  background-color: rgba(148, 163, 184, 0.14) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: var(--ustk-text) !important;
}

/* Safety net for specific light comment/ask-client backgrounds set inline */
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: #f3f4f6"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color:#f3f4f6"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: #f3f4f6"],
html[data-bs-theme="dark"] #unitEditModal [style*="background:#f3f4f6"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: #fef3c7"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color:#fef3c7"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: #fef3c7"],
html[data-bs-theme="dark"] #unitEditModal [style*="background:#fef3c7"] {
  background-color: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(148, 163, 184, 0.30) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: white"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color:#fff"],
html[data-bs-theme="dark"] #unitEditModal [style*="background-color: #fff"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: white"],
html[data-bs-theme="dark"] #unitEditModal [style*="background:#fff"],
html[data-bs-theme="dark"] #unitEditModal [style*="background: #fff"] {
  background-color: rgba(2, 6, 23, 0.35) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}

/* Archive icon button on task cards – always visible and on top */
.unit-card .task-archive-btn,
.task-card .task-archive-btn,
.list-view-row .task-archive-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 50 !important;
}
html[data-bs-theme="dark"] .task-archive-btn {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .task-archive-btn:hover {
  background: rgba(148, 163, 184, 0.14) !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
}
html[data-bs-theme="dark"] .task-archive-btn:focus,
html[data-bs-theme="dark"] .task-archive-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.18) !important;
}

/* Compact mode: keep archive icon visible so users can archive from the list */
/* (previously hidden; re-enabled by request) */

/* Image lightboxes on board pages */
html[data-bs-theme="dark"] .lightbox-nav {
  background-color: rgba(15, 23, 42, 0.85) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .lightbox-nav:hover {
  background-color: rgba(148, 163, 184, 0.14) !important;
}

/* Tiny pill-like badges on workspace/hire pages */
html[data-bs-theme="dark"] .ai-tool-badge,
html[data-bs-theme="dark"] .skill-badge {
  background-color: rgba(148, 163, 184, 0.10) !important;
  border-color: var(--ustk-border) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] .ai-tool-badge:hover,
html[data-bs-theme="dark"] .skill-badge:hover {
  background-color: rgba(148, 163, 184, 0.14) !important;
  border-color: var(--ustk-border-strong) !important;
  box-shadow: 0 2px 8px rgba(2, 6, 23, 0.35) !important;
}

/* Space color bar (workspace boards list) */
html[data-bs-theme="dark"] .ustk-space-color-bar {
  --ustk-bar-color: #0079bf;
  height: 10px;
  max-height: 10px;
  border-radius: 9999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.20) 0%,
      rgba(255, 255, 255, 0.06) 35%,
      rgba(0, 0, 0, 0.18) 100%
    ),
    var(--ustk-bar-color);
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

/* -------------------------------------------------------------------------- */
/* Robotron2-style main app theme (authenticated pages)                        */
/* Applies to pages using <body class="page-shell">                            */
/* -------------------------------------------------------------------------- */

html[data-bs-theme="dark"] body.page-shell {
  /* Override app palette for a more “neon/glass” feel */
  --ustk-bg: #050816;
  --ustk-surface: rgba(10, 16, 34, 0.58);
  --ustk-surface-2: rgba(10, 16, 34, 0.72);
  --ustk-surface-3: rgba(20, 28, 56, 0.82);
  --ustk-border: rgba(148, 163, 184, 0.20);
  --ustk-border-strong: rgba(148, 163, 184, 0.32);
  --ustk-text: #eaf0ff;
  --ustk-muted: rgba(226, 232, 240, 0.72);
  --ustk-muted-2: rgba(226, 232, 240, 0.82);

  /* Background like the landing page (no pseudo-elements to avoid z-index issues) */
  background:
    radial-gradient(900px 520px at 12% 10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(800px 520px at 82% 18%, rgba(236, 72, 153, 0.14), transparent 62%),
    radial-gradient(900px 560px at 55% 85%, rgba(34, 211, 238, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(5, 8, 22, 1) 0%, rgba(11, 18, 32, 1) 48%, rgba(5, 8, 22, 1) 100%) !important;
  background-attachment: fixed;
  color: var(--ustk-text) !important;
}

/* Ensure body text/background use the updated palette (only for page-shell) */
html[data-bs-theme="dark"] body.page-shell,
html[data-bs-theme="dark"] body.page-shell .page-shell {
  color: var(--ustk-text) !important;
}

/* Top nav cleanup + glass treatment */
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav.navbar {
  background-color: rgba(10, 16, 34, 0.55) !important;
  border-bottom-color: rgba(148, 163, 184, 0.20) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.35);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Brand wordmark: match landing page vibe (title-only, no logo) */
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav .ustk-brand-title {
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--ustk-text) !important;
  text-shadow: 0 10px 40px rgba(2, 6, 23, 0.65);
}

/* Breadcrumb chevrons (top nav + board title) */
html[data-bs-theme="dark"] body.page-shell .ustk-crumb-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  color: rgba(148, 163, 184, 0.72);
}
html[data-bs-theme="dark"] body.page-shell .ustk-crumb-sep__svg {
  display: block;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb {
  gap: 0.15rem 0.3rem;
  justify-content: flex-start;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb .ustk-crumb-link {
  color: rgba(226, 232, 240, 0.78) !important;
  font-weight: 500;
  letter-spacing: 0.01em;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb .ustk-crumb-link:hover {
  color: rgba(248, 250, 252, 0.98) !important;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb .ustk-crumb-org {
  flex: 0 1 12rem;
  min-width: 0;
}
/*
 * Native <select> in flex uses min-width: auto ≈ width of longest <option>, which looks like a
 * huge gap before the control. Wrap clips width; spacer .ustk-top-nav-spacer takes extra row space.
 */
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb .ustk-board-select-wrap {
  flex: 0 1 16rem;
  min-width: 0;
  width: min(16rem, 46vw);
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb .ustk-board-select-wrap .ustk-board-select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: block;
  align-self: stretch;
  height: 2rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  padding-left: 0.7rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.32);
  background-color: rgba(15, 23, 42, 0.5);
  color: rgba(241, 245, 249, 0.94);
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb .ustk-board-select-wrap .ustk-board-select:hover {
  border-color: rgba(148, 163, 184, 0.48);
  background-color: rgba(30, 41, 59, 0.55);
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-breadcrumb .ustk-board-select-wrap .ustk-board-select:focus {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.18);
}

/* Page content title tagline "by nomads.lt" (e.g. dashboard) — Recursive italic, smaller, thin */
html[data-bs-theme="dark"] body.page-shell .ustk-page-brand-tagline {
  font-family: 'Recursive', sans-serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.38em;
  letter-spacing: -0.02em;
  color: var(--ustk-muted) !important;
  opacity: 0.92;
}
html[data-bs-theme="dark"] body.page-shell a.ustk-page-brand-tagline:visited,
html[data-bs-theme="dark"] body.page-shell a.ustk-page-brand-tagline:focus {
  color: var(--ustk-muted) !important;
  text-decoration: none !important;
}
html[data-bs-theme="dark"] body.page-shell a.ustk-page-brand-tagline:hover {
  color: var(--ustk-muted) !important;
  text-decoration: underline !important;
}

/* Top-nav icon buttons (glass pills) */
html[data-bs-theme="dark"] body.page-shell .ustk-icon-btn.btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html[data-bs-theme="dark"] body.page-shell .ustk-icon-btn--label.btn {
  width: auto;
  padding: 0 10px;
  gap: 0.4rem;
}

/* Board/project header + navigation: match landing-style glass + modern icons */
html[data-bs-theme="dark"] body.page-shell .ustk-project-header__title {
  letter-spacing: -0.02em;
  text-shadow: 0 10px 40px rgba(2, 6, 23, 0.45);
}

html[data-bs-theme="dark"] body.page-shell .ustk-project-nav {
  background: rgba(10, 16, 34, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.30);
}

html[data-bs-theme="dark"] body.page-shell .ustk-btn-with-ico {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
html[data-bs-theme="dark"] body.page-shell .ustk-btn-with-ico svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* Compact mode: tighten board header / nav / tracking banner */
html.ustk-compact-mode body.page-shell .ustk-project-header {
  margin-bottom: 0.35rem !important; /* override .mb-2 */
  padding-top: 0.35rem !important; /* override .pt-6 */
  padding-bottom: 0.35rem !important; /* override .pb-2 */
}

html.ustk-compact-mode body.page-shell .ustk-project-header .mb-1 {
  margin-bottom: 0.15rem !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-header .gap-2 {
  gap: 0.4rem !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-header__title {
  font-size: 1.1rem !important;
  line-height: 1.15 !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-header .text-muted {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-header__icon-btn.btn.ustk-icon-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 10px !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-header__icon-btn svg {
  width: 16px !important;
  height: 16px !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav {
  margin-bottom: 0.5rem !important; /* override .mb-3 */
  padding: 0.5rem !important; /* override .p-3 */
  border-radius: 12px;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .btn {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.8rem !important;
  line-height: 1.1 !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .ustk-btn-with-ico {
  gap: 0.35rem !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .ustk-btn-with-ico svg {
  width: 16px !important;
  height: 16px !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .mt-2 {
  margin-top: 0.35rem !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .gap-3 {
  gap: 0.5rem !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .gap-2 {
  gap: 0.4rem !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .form-check-label {
  font-size: 0.8rem !important;
  line-height: 1.1 !important;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .form-check-input {
  transform: scale(0.9);
  transform-origin: left center;
}

html.ustk-compact-mode body.page-shell .ustk-project-nav .badge,
html.ustk-compact-mode body.page-shell .ustk-project-nav .text-muted.small {
  font-size: 0.75rem !important;
}

html.ustk-compact-mode body.page-shell #active-tracking-users-container {
  margin-bottom: 0.5rem !important; /* override .mb-3 */
}

html.ustk-compact-mode body.page-shell #active-tracking-users-container > .d-flex {
  padding: 0.5rem !important; /* override .p-3 + inline background panel */
  min-height: 34px !important;
  border-radius: 10px !important;
  gap: 0.4rem !important;
}

html.ustk-compact-mode body.page-shell #active-tracking-users-container .fw-semibold {
  font-size: 0.8rem !important;
  line-height: 1.1 !important;
  margin-right: 0.25rem !important;
}

html.ustk-compact-mode body.page-shell #active-tracking-users-container #active-tracking-users-list .badge {
  padding: 0.2rem 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

html.ustk-compact-mode body.page-shell #active-tracking-users-container #active-tracking-users-list span {
  font-size: 0.75rem !important;
}

/* Project header right-side tabs: active state should match the left-side glass/outline highlight (not the global gradient primary) */
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--right .btn.ustk-tab-active,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--right .btn.ustk-tab-active:hover,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--right .btn.ustk-tab-active:focus {
  /* keep it subtle for the dark theme (less “old bright blue”) */
  border-color: rgba(59, 130, 246, 0.55) !important;
  background: rgba(59, 130, 246, 0.16) !important;
  color: var(--ustk-text) !important;
  box-shadow:
    0 0 0 0.2rem rgba(59, 130, 246, 0.10),
    0 10px 26px rgba(2, 6, 23, 0.25) !important;
  transform: none !important;
}

/* Project header right-side tabs: non-active hover/focus should match the left-side tab hover */
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--right .btn.btn-outline-primary:hover,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--right .btn.btn-outline-primary:focus,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--right .btn.btn-outline-primary:focus-visible,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--right .btn.btn-outline-primary:active {
  /* match left-side tab hover style */
  border-color: rgba(59, 130, 246, 0.55) !important;
  background: rgba(59, 130, 246, 0.16) !important;
  color: var(--ustk-text) !important;
  box-shadow:
    0 0 0 0.2rem rgba(59, 130, 246, 0.10),
    0 10px 26px rgba(2, 6, 23, 0.25) !important;
  transform: none !important;
}

/* Project header left-side tabs: match the brighter “active tab” look for hover/focus/press */
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--left .btn.btn-outline-primary:hover,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--left .btn.btn-outline-primary:focus,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--left .btn.btn-outline-primary:focus-visible,
html[data-bs-theme="dark"] body.page-shell .ustk-project-nav .view-toggle--left .btn.btn-outline-primary:active {
  border-color: rgba(59, 130, 246, 0.55) !important;
  background: rgba(59, 130, 246, 0.16) !important;
  color: var(--ustk-text) !important;
  box-shadow:
    0 0 0 0.2rem rgba(59, 130, 246, 0.10),
    0 10px 26px rgba(2, 6, 23, 0.25) !important;
  transform: none !important;
}

html[data-bs-theme="dark"] body.page-shell .ustk-badge-pill {
  display: none;
  font-size: 0.65rem;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  z-index: 10;
}

/* Cards / surfaces get a subtle glass look */
html[data-bs-theme="dark"] body.page-shell .card,
html[data-bs-theme="dark"] body.page-shell .workspace-card,
html[data-bs-theme="dark"] body.page-shell .settings-card,
html[data-bs-theme="dark"] body.page-shell .profile-card,
html[data-bs-theme="dark"] body.page-shell .message-container,
html[data-bs-theme="dark"] body.page-shell .message-form,
html[data-bs-theme="dark"] body.page-shell .history-card,
html[data-bs-theme="dark"] body.page-shell .task-header,
html[data-bs-theme="dark"] body.page-shell .bill-container,
html[data-bs-theme="dark"] body.page-shell .bill-preview,
html[data-bs-theme="dark"] body.page-shell .invite-card {
  background: var(--ustk-surface) !important;
  border-color: var(--ustk-border) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Board task cards (match landing page “glass” feel) */
html[data-bs-theme="dark"] body.page-shell .unit-card,
html[data-bs-theme="dark"] body.page-shell .task-card {
  background: rgba(10, 16, 34, 0.58) !important;
  border: 1px solid rgba(148, 163, 184, 0.20) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.45) !important;
  transition:
    transform 0.12s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
html[data-bs-theme="dark"] body.page-shell .unit-card:hover,
html[data-bs-theme="dark"] body.page-shell .task-card:hover {
  background: rgba(10, 16, 34, 0.72) !important;
  border-color: rgba(34, 211, 238, 0.25) !important;
  transform: translateY(-1px);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.55) !important;
}

/* Status variants */
html[data-bs-theme="dark"] body.page-shell .unit-card.is-done,
html[data-bs-theme="dark"] body.page-shell .task-card.is-done {
  background: rgba(34, 197, 94, 0.12) !important;
  border-color: rgba(34, 197, 94, 0.28) !important;
}
html[data-bs-theme="dark"] body.page-shell .unit-card.is-pinned,
html[data-bs-theme="dark"] body.page-shell .task-card.is-pinned {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.28) !important;
}
html[data-bs-theme="dark"] body.page-shell .unit-card.is-urgent,
html[data-bs-theme="dark"] body.page-shell .task-card.is-urgent {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
}

/* Fast mode: keep archive icon visible so users can archive from the list */
/* (archive button no longer hidden in fast mode) */

.ustk-fast-mode .unit-card.ustk-tracking-active {
  border: 2px solid rgba(34, 197, 94, 0.85) !important;
  box-shadow:
    0 18px 55px rgba(2, 6, 23, 0.45),
    0 0 0 2px rgba(34, 197, 94, 0.20) !important;
}

.ustk-fast-mode .list-view-row.ustk-tracking-active {
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.95) !important;
}

.ustk-fast-mode .unit-card input.form-check-input[type="checkbox"] {
  display: none !important;
}

.ustk-fast-mode .unit-card > img[alt="cover"],
.ustk-fast-mode .unit-card > img[data-unit-id] {
  display: none !important;
}

.ustk-fast-mode .unit-card > .mb-2 > br,
.ustk-fast-mode .unit-card > .mb-2 > small {
  display: none !important;
}

.ustk-fast-mode .unit-card > .mb-2 svg,
.ustk-fast-mode .unit-card > .mb-2 .deadline-indicator {
  display: none !important;
}

.ustk-fast-mode .unit-card > .mb-2 > span:not(.unit-title):not(.ustk-done-pending-dot) {
  display: none !important;
}

.ustk-fast-mode .unit-card > .mb-2 > span.ustk-done-pending-dot {
  display: inline-block !important;
}

/* Done pending: orange checkbox in task list */
.unit-card.is-done-pending .form-check-input:checked {
  background-color: #eab308 !important;
  border-color: #eab308 !important;
}
.unit-card.is-done-pending .form-check-input:checked:focus {
  box-shadow: 0 0 0 0.25rem rgba(234, 179, 8, 0.25) !important;
}

/* Hide meta rows (dates/hours/cost) and time tracking blocks */
.ustk-fast-mode .unit-card .d-flex.align-items-center.flex-wrap.gap-2.pt-2,
.ustk-fast-mode .unit-card .mt-2.pt-2.border-top,
.ustk-fast-mode .unit-card [id^="other-users-tracking-"] {
  display: none !important;
}

/* Archive page task cards: hide everything except title + users + labels + action buttons */
.ustk-fast-mode .task-card p.text-muted,
.ustk-fast-mode .task-card .task-details-toggle,
.ustk-fast-mode .task-card .task-details-expanded,
.ustk-fast-mode .task-card small.text-muted,
.ustk-fast-mode .task-card .badge.bg-secondary {
  display: none !important;
}

.ustk-fast-mode .task-card .btn.btn-outline-success,
.ustk-fast-mode .task-card .btn.btn-outline-danger {
  display: none !important;
}

/* Drag & drop feedback should win over glass hover */
html[data-bs-theme="dark"] body.page-shell .unit-card.drag-over,
html[data-bs-theme="dark"] body.page-shell .unit-card.drag-over:hover {
  background: rgba(34, 211, 238, 0.10) !important;
  border: 2px dashed rgba(34, 211, 238, 0.55) !important;
  transform: none !important;
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.45) !important;
}

/* Board list drop targets + placeholders (avoid bright “light blue” blocks) */
html[data-bs-theme="dark"] body.page-shell .list-container.drag-over {
  background: rgba(34, 211, 238, 0.06) !important;
  border-color: rgba(34, 211, 238, 0.42) !important;
}

html[data-bs-theme="dark"] body.page-shell .units.drag-over {
  background: rgba(34, 211, 238, 0.04) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

html[data-bs-theme="dark"] body.page-shell .drop-placeholder {
  background: rgba(10, 16, 34, 0.35) !important;
  border: 2px dashed rgba(34, 211, 238, 0.38) !important;
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.35);
}

/* Dropdowns & modals (higher “glass” because they sit on top of the UI) */
html[data-bs-theme="dark"] body.page-shell .dropdown-menu,
html[data-bs-theme="dark"] body.page-shell .modal-content {
  background: rgba(10, 16, 34, 0.82) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Profile dropdown (top nav) — landing-style “glass/neo” */
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav .ustk-profile-trigger.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px 0 10px;
  border-radius: 14px;
  border-color: rgba(148, 163, 184, 0.35) !important;
  background: rgba(10, 16, 34, 0.35) !important;
  color: var(--ustk-text) !important;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.28);
  /* Performance: avoid "glass" blur on a frequently hovered control (can feel laggy). */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* Make hover feel instant (no easing delay from Bootstrap button transitions). */
  transition: none !important;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav .ustk-profile-trigger.btn:hover {
  border-color: rgba(34, 211, 238, 0.40) !important;
  background: rgba(34, 211, 238, 0.10) !important;
  transform: none;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav .show > .ustk-profile-trigger.btn {
  border-color: rgba(99, 102, 241, 0.55) !important;
  background: rgba(99, 102, 241, 0.12) !important;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav .ustk-profile-trigger.dropdown-toggle::after {
  display: none;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav .ustk-profile-trigger__text {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: -0.01em;
}
html[data-bs-theme="dark"] body.page-shell .ustk-top-nav .ustk-profile-trigger__chev {
  opacity: 0.9;
}

html[data-bs-theme="dark"] body.page-shell .ustk-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(10, 16, 34, 0.55);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
}
html[data-bs-theme="dark"] body.page-shell .ustk-avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
}
html[data-bs-theme="dark"] body.page-shell .ustk-avatar--md {
  width: 38px;
  height: 38px;
  font-size: 16px;
  font-weight: 700;
}
html[data-bs-theme="dark"] body.page-shell .ustk-avatar--initial {
  color: #0b1020;
  border-color: rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(236, 72, 153, 0.90) 55%, rgba(34, 211, 238, 0.85) 100%);
}

html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu.dropdown-menu {
  padding: 10px;
  border-radius: 16px;
  min-width: 290px;
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.65);
  /* Performance: override global dropdown glass blur for the profile menu. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu__header {
  padding: 6px 6px 10px 6px;
}
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(10, 16, 34, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu__name {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(248, 250, 252, 0.95);
  line-height: 1.2;
}
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu__email {
  margin-top: 2px;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.72);
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu__divider.dropdown-divider {
  margin: 8px 6px;
  border-top-color: rgba(148, 163, 184, 0.18);
}

html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu .dropdown-item {
  border-radius: 12px;
  padding: 10px 10px;
  color: var(--ustk-text) !important;
  /* Instant hover highlight (no "laggy" eased transition). */
  transition: none;
}
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu .dropdown-item:hover,
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu .dropdown-item:focus {
  background: rgba(34, 211, 238, 0.10) !important;
  transform: none;
}
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu .dropdown-item.text-danger:hover,
html[data-bs-theme="dark"] body.page-shell .ustk-profile-menu .dropdown-item.text-danger:focus {
  background: rgba(239, 68, 68, 0.10) !important;
}

/* Primary button: neon gradient like landing */
html[data-bs-theme="dark"] body.page-shell .btn-primary {
  border-color: rgba(99, 102, 241, 0.55) !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(236, 72, 153, 0.90) 55%, rgba(34, 211, 238, 0.85) 100%) !important;
  color: #0b1020 !important;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
}
html[data-bs-theme="dark"] body.page-shell .btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Outline primary: glass button */
html[data-bs-theme="dark"] body.page-shell .btn-outline-primary {
  border-color: rgba(148, 163, 184, 0.35) !important;
  color: var(--ustk-text) !important;
  background: rgba(10, 16, 34, 0.35) !important;
}
html[data-bs-theme="dark"] body.page-shell .btn-outline-primary:hover {
  border-color: rgba(34, 211, 238, 0.40) !important;
  background: rgba(34, 211, 238, 0.10) !important;
}

/* Softer focus ring */
html[data-bs-theme="dark"] body.page-shell .btn:focus,
html[data-bs-theme="dark"] body.page-shell .btn:focus-visible,
html[data-bs-theme="dark"] body.page-shell .form-control:focus,
html[data-bs-theme="dark"] body.page-shell .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.18) !important;
  border-color: rgba(34, 211, 238, 0.35) !important;
}

/* Board dropdown in nav currently sets a light highlight inline; normalize it in dark mode */
html[data-bs-theme="dark"] body.page-shell #boardSelect {
  background-color: rgba(99, 102, 241, 0.10) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: var(--ustk-text) !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-bs-theme="dark"] body.page-shell .btn-primary:hover {
    transform: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Files page (landing-style)                                                 */
/* -------------------------------------------------------------------------- */

html[data-bs-theme="dark"] body.page-files .ustk-file-card.card {
  background: rgba(10, 16, 34, 0.58) !important;
  border-color: rgba(148, 163, 184, 0.20) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-bs-theme="dark"] body.page-files .ustk-badge-glass {
  background: rgba(10, 16, 34, 0.45) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: var(--ustk-text) !important;
}

html[data-bs-theme="dark"] body.page-files .ustk-file-list {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 16, 34, 0.25);
}

html[data-bs-theme="dark"] body.page-files .file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  transition: background-color 0.2s, border-color 0.2s;
}
html[data-bs-theme="dark"] body.page-files .file-item:last-child {
  border-bottom: 0;
}
html[data-bs-theme="dark"] body.page-files .file-item:hover {
  background-color: rgba(34, 211, 238, 0.06) !important;
  border-bottom-color: rgba(34, 211, 238, 0.18);
}

html[data-bs-theme="dark"] body.page-files .file-icon {
  font-size: 1.8rem;
  margin-right: 6px;
  filter: drop-shadow(0 10px 30px rgba(2, 6, 23, 0.35));
}

html[data-bs-theme="dark"] body.page-files .file-info {
  flex: 1;
  min-width: 0;
}

html[data-bs-theme="dark"] body.page-files .file-name {
  font-weight: 650;
  color: var(--ustk-text) !important;
  margin-bottom: 0.25rem;
}
html[data-bs-theme="dark"] body.page-files .file-name a {
  color: var(--ustk-text) !important;
}
html[data-bs-theme="dark"] body.page-files .file-name a:hover {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-bs-theme="dark"] body.page-files .file-meta {
  font-size: 0.875rem;
  color: var(--ustk-muted) !important;
}
html[data-bs-theme="dark"] body.page-files .file-meta a {
  color: rgba(34, 211, 238, 0.95) !important;
}
html[data-bs-theme="dark"] body.page-files .file-meta a:hover {
  color: rgba(34, 211, 238, 1) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-bs-theme="dark"] body.page-files .file-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

html[data-bs-theme="dark"] body.page-files .file-size {
  color: var(--ustk-muted) !important;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* -------------------------------------------------------------------------- */
/* Avatar / user photo safety clamps (prevents huge uploads from breaking UI)  */
/* -------------------------------------------------------------------------- */

/* Ensure avatar sizing works even on pages that don't include `.page-shell`. */
html[data-bs-theme="dark"] .ustk-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(10, 16, 34, 0.55);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
}
html[data-bs-theme="dark"] .ustk-avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
}
html[data-bs-theme="dark"] .ustk-avatar--md {
  width: 38px;
  height: 38px;
  font-size: 16px;
  font-weight: 700;
}
html[data-bs-theme="dark"] .ustk-avatar--initial {
  color: #0b1020;
  border-color: rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, rgba(99, 102, 241, 1) 0%, rgba(236, 72, 153, 0.90) 55%, rgba(34, 211, 238, 0.85) 100%);
}

/* Hard cap any user photo images so legacy 1000px uploads can't overflow. */
html[data-bs-theme="dark"] img.ustk-avatar,
html[data-bs-theme="dark"] img.user-avatar,
html[data-bs-theme="dark"] img.message-avatar,
html[data-bs-theme="dark"] img.profile-photo,
html[data-bs-theme="dark"] img.profile-avatar {
  max-width: 200px;
  max-height: 200px;
}


