/* Spaces (Unistack) — Global light theme layer
   Mirrors the structure of `public/css/ustk-dark.css`, but for Bootstrap 5.3
   color-modes via `html[data-bs-theme="light"]`.
*/

/* -----------------------------------------------------------------------------
   Theme tokens (light)
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] {
  color-scheme: light;

  --ustk-bg: #f7f9fc;              /* app background */
  --ustk-surface: #ffffff;         /* cards, panels */
  --ustk-surface-2: #f1f5fb;       /* elevated / subtle tint */
  --ustk-surface-3: #e9effa;       /* hover / active */
  --ustk-border: rgba(15, 23, 42, 0.10);
  --ustk-border-strong: rgba(15, 23, 42, 0.16);
  --ustk-text: #0f172a;
  --ustk-muted: rgba(15, 23, 42, 0.62);
  --ustk-muted-2: rgba(15, 23, 42, 0.74);

  --ustk-primary: #2563eb;
  --ustk-primary-600: #1d4ed8;
  --ustk-success: #16a34a;
  --ustk-warning: #f59e0b;
  --ustk-danger: #dc2626;

  --ustk-shadow-sm: 0 1px 0 rgba(15, 23, 42, 0.06);
  --ustk-shadow-md: 0 18px 55px rgba(15, 23, 42, 0.10);
}

/* Bootstrap variable tuning (works with Bootstrap 5.3 color modes) */
html[data-bs-theme="light"] {
  --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: var(--ustk-primary);
  --bs-link-hover-color: var(--ustk-primary-600);

  --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="light"],
html[data-bs-theme="light"] body {
  background: var(--ustk-bg) !important;
  color: var(--ustk-text) !important;
}

/* Common layout wrapper used across pages */
html[data-bs-theme="light"] .page-shell {
  background:
    radial-gradient(900px 520px at 12% 10%, rgba(37, 99, 235, 0.08), transparent 60%),
    radial-gradient(800px 520px at 82% 18%, rgba(236, 72, 153, 0.06), transparent 62%),
    radial-gradient(900px 560px at 55% 85%, rgba(34, 211, 238, 0.05), transparent 60%),
    linear-gradient(180deg, rgba(247, 249, 252, 1) 0%, rgba(243, 246, 252, 1) 48%, rgba(247, 249, 252, 1) 100%) !important;
  background-attachment: fixed;
  color: var(--ustk-text) !important;
}

/* Fix common dark utility usage in templates */
html[data-bs-theme="light"] .text-muted,
html[data-bs-theme="light"] .lead-muted {
  color: var(--ustk-muted) !important;
}

html[data-bs-theme="light"] .text-dark {
  color: var(--ustk-text) !important;
}

/* -----------------------------------------------------------------------------
   Navbar + top bars (modern glass on light)
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.72) !important;
  border-bottom-color: rgba(15, 23, 42, 0.10) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 1200;
}

/* -----------------------------------------------------------------------------
   Board header navigation (project tabs) — modern light “glass” panel
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] body.page-shell .ustk-project-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.62) 100%);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
}

/* Make active tab feel “selected” without looking too dark/heavy */
html[data-bs-theme="light"] body.page-shell .ustk-project-nav .btn.ustk-tab-active,
html[data-bs-theme="light"] body.page-shell .ustk-project-nav .btn.ustk-tab-active:hover,
html[data-bs-theme="light"] body.page-shell .ustk-project-nav .btn.ustk-tab-active:focus {
  border-color: rgba(37, 99, 235, 0.35) !important;
  background: rgba(37, 99, 235, 0.10) !important;
  color: var(--ustk-text) !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.08) !important;
  transform: none !important;
}

/* Order notice (dashboard / space) — modern info hint, light */
html[data-bs-theme="light"] .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(37, 99, 235, 0.06) 0%, var(--ustk-surface-2) 100%) !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !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="light"] .ustk-order-notice svg {
  flex-shrink: 0;
  color: var(--ustk-primary) !important;
  opacity: 0.95;
}

/* -----------------------------------------------------------------------------
   Cards / surfaces
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] .card,
html[data-bs-theme="light"] .workspace-card,
html[data-bs-theme="light"] .settings-card,
html[data-bs-theme="light"] .profile-card,
html[data-bs-theme="light"] .message-container,
html[data-bs-theme="light"] .message-form,
html[data-bs-theme="light"] .history-card,
html[data-bs-theme="light"] .task-header,
html[data-bs-theme="light"] .bill-container,
html[data-bs-theme="light"] .bill-preview,
html[data-bs-theme="light"] .invite-card {
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: var(--ustk-border) !important;
  box-shadow: var(--ustk-shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html[data-bs-theme="light"] .card .card-text {
  color: var(--ustk-muted-2);
}

/* Task/List labels: modern light “chip” style (with color dot like dark theme) */
html[data-bs-theme="light"] .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: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: rgba(15, 23, 42, 0.92) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

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

html[data-bs-theme="light"] .label-badge:hover {
  background: rgba(37, 99, 235, 0.06) !important;
  border-color: rgba(37, 99, 235, 0.16) !important;
  color: rgba(15, 23, 42, 0.95) !important;
}

/* Notification list "New" label — gradient pill matching site (light) */
html[data-bs-theme="light"] .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.5);
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.95) 0%,
    rgba(99, 102, 241, 0.9) 40%,
    rgba(168, 85, 247, 0.88) 100%
  ) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

/* -------------------------------------------------------------------------- */
/* Files page (board tab) — modern light list UI                               */
/* -------------------------------------------------------------------------- */

html[data-bs-theme="light"] body.page-files .ustk-file-card.card {
  background: rgba(255, 255, 255, 0.82) !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
}

html[data-bs-theme="light"] body.page-files .ustk-badge-glass {
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  color: var(--ustk-text) !important;
}

html[data-bs-theme="light"] body.page-files .ustk-file-list {
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

html[data-bs-theme="light"] body.page-files .file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transition: background-color 0.2s, border-color 0.2s;
}
html[data-bs-theme="light"] body.page-files .file-item:last-child {
  border-bottom: 0;
}
html[data-bs-theme="light"] body.page-files .file-item:hover {
  background-color: rgba(37, 99, 235, 0.06) !important;
  border-bottom-color: rgba(37, 99, 235, 0.14);
}

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

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

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

html[data-bs-theme="light"] body.page-files .file-meta {
  font-size: 0.875rem;
  color: var(--ustk-muted) !important;
}
html[data-bs-theme="light"] body.page-files .file-meta a {
  color: rgba(37, 99, 235, 1) !important;
}
html[data-bs-theme="light"] body.page-files .file-meta a:hover {
  color: rgba(29, 78, 216, 1) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

@media (max-width: 575.98px) {
  html[data-bs-theme="light"] body.page-files .file-item {
    align-items: flex-start;
  }
  html[data-bs-theme="light"] body.page-files .file-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
}

/* -----------------------------------------------------------------------------
   Board task cards (match dark theme “modern” treatment but light)
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] body.page-shell .unit-card,
html[data-bs-theme="light"] body.page-shell .task-card {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.08) !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="light"] body.page-shell .unit-card:hover,
html[data-bs-theme="light"] body.page-shell .task-card:hover {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
  transform: translateY(-1px);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.10) !important;
}

/* Status variants */
html[data-bs-theme="light"] body.page-shell .unit-card.is-done,
html[data-bs-theme="light"] body.page-shell .task-card.is-done {
  background: rgba(22, 163, 74, 0.08) !important;
  border-color: rgba(22, 163, 74, 0.22) !important;
}
html[data-bs-theme="light"] body.page-shell .unit-card.is-pinned,
html[data-bs-theme="light"] body.page-shell .task-card.is-pinned {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.22) !important;
}
html[data-bs-theme="light"] body.page-shell .unit-card.is-urgent,
html[data-bs-theme="light"] body.page-shell .task-card.is-urgent {
  background: rgba(220, 38, 38, 0.07) !important;
  border-color: rgba(220, 38, 38, 0.22) !important;
}

/* Drag & drop feedback should win over hover */
html[data-bs-theme="light"] body.page-shell .unit-card.drag-over,
html[data-bs-theme="light"] 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;
}

/* Fast mode: highlight tasks that have active time tracking (even though timers are hidden) */
.ustk-fast-mode .unit-card.ustk-tracking-active {
  border: 2px solid rgba(34, 197, 94, 0.85) !important;
  box-shadow:
    0 18px 55px rgba(15, 23, 42, 0.08),
    0 0 0 2px rgba(34, 197, 94, 0.18) !important;
}

.ustk-fast-mode .list-view-row.ustk-tracking-active {
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.95) !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;
}

/* Board list drop targets + placeholders */
html[data-bs-theme="light"] body.page-shell .list-container.drag-over {
  background: rgba(34, 211, 238, 0.10) !important;
  border-color: rgba(34, 211, 238, 0.42) !important;
}
html[data-bs-theme="light"] body.page-shell .units.drag-over {
  background: rgba(34, 211, 238, 0.06) !important;
  border-color: rgba(15, 23, 42, 0.20) !important;
}
html[data-bs-theme="light"] body.page-shell .drop-placeholder {
  background: rgba(37, 99, 235, 0.05) !important;
  border: 2px dashed rgba(37, 99, 235, 0.25) !important;
}

/* Assigned user “chips” (tasks, lists, modals, list view, board view) */
html[data-bs-theme="light"] .user-badge {
  background-color: rgba(37, 99, 235, 0.06) !important;
  border-color: rgba(37, 99, 235, 0.16) !important;
  color: var(--ustk-text) !important;
}
html[data-bs-theme="light"] .user-badge:hover {
  background-color: rgba(37, 99, 235, 0.10) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
}

/* Labels wrapper (group labels in tasks/list rows with a subtle border) */
html[data-bs-theme="light"] .ustk-labels-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

/* -----------------------------------------------------------------------------
   Dropdowns & modals (slightly frosted)
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] body.page-shell .dropdown-menu,
html[data-bs-theme="light"] body.page-shell .modal-content {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
}

/* -----------------------------------------------------------------------------
   Buttons + focus rings (modern)
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] body.page-shell .btn-primary {
  border-color: rgba(37, 99, 235, 0.55) !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 1) 0%, rgba(99, 102, 241, 0.95) 55%, rgba(34, 211, 238, 0.85) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.18);
}

html[data-bs-theme="light"] body.page-shell .btn-outline-primary {
  border-color: rgba(37, 99, 235, 0.32) !important;
  color: rgba(37, 99, 235, 1) !important;
  background: rgba(255, 255, 255, 0.60) !important;
}
html[data-bs-theme="light"] body.page-shell .btn-outline-primary:hover {
  border-color: rgba(37, 99, 235, 0.45) !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

html[data-bs-theme="light"] body.page-shell .btn:focus,
html[data-bs-theme="light"] body.page-shell .btn:focus-visible,
html[data-bs-theme="light"] body.page-shell .form-control:focus,
html[data-bs-theme="light"] body.page-shell .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.16) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
}

/* -----------------------------------------------------------------------------
   Top nav profile dropdown (light)
----------------------------------------------------------------------------- */
html[data-bs-theme="light"] body.page-shell .ustk-top-nav .ustk-brand-title {
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--ustk-text) !important;
}

/* Breadcrumb chevrons (top nav + board title) */
html[data-bs-theme="light"] body.page-shell .ustk-crumb-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  color: rgba(71, 85, 105, 0.65);
}
html[data-bs-theme="light"] body.page-shell .ustk-crumb-sep__svg {
  display: block;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-breadcrumb {
  gap: 0.15rem 0.3rem;
  justify-content: flex-start;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-breadcrumb .ustk-crumb-link {
  color: rgba(51, 65, 85, 0.88) !important;
  font-weight: 500;
  letter-spacing: 0.01em;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-breadcrumb .ustk-crumb-link:hover {
  color: rgba(15, 23, 42, 0.95) !important;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-breadcrumb .ustk-crumb-org {
  flex: 0 1 12rem;
  min-width: 0;
}
html[data-bs-theme="light"] 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="light"] 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.45);
  background-color: rgba(255, 255, 255, 0.92);
  color: rgba(15, 23, 42, 0.92);
}
html[data-bs-theme="light"] body.page-shell .ustk-top-breadcrumb .ustk-board-select-wrap .ustk-board-select:hover {
  border-color: rgba(100, 116, 139, 0.45);
  background-color: #fff;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-breadcrumb .ustk-board-select-wrap .ustk-board-select:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

/* Page content title tagline "by nomads.lt" (e.g. dashboard) — Recursive italic, smaller, thin */
html[data-bs-theme="light"] 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="light"] body.page-shell a.ustk-page-brand-tagline:visited,
html[data-bs-theme="light"] body.page-shell a.ustk-page-brand-tagline:focus {
  color: var(--ustk-muted) !important;
  text-decoration: none !important;
}
html[data-bs-theme="light"] body.page-shell a.ustk-page-brand-tagline:hover {
  color: var(--ustk-muted) !important;
  text-decoration: underline !important;
}

html[data-bs-theme="light"] 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="light"] body.page-shell .ustk-icon-btn--label.btn {
  width: auto;
  padding: 0 10px;
  gap: 0.4rem;
}

/* Project/board navigation buttons: keep icon sizing consistent (SVGs have no explicit size attrs). */
html[data-bs-theme="light"] body.page-shell .ustk-btn-with-ico {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
html[data-bs-theme="light"] 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;
}

/* Compact mode: hide archive icon button on task cards in lists */
/* Archive icon kept visible in compact mode */

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;
}

html[data-bs-theme="light"] 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(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.65) !important;
  color: var(--ustk-text) !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  /* 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="light"] body.page-shell .ustk-top-nav .ustk-profile-trigger.btn:hover {
  border-color: rgba(37, 99, 235, 0.28) !important;
  background: rgba(37, 99, 235, 0.08) !important;
  transform: none;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-nav .show > .ustk-profile-trigger.btn {
  border-color: rgba(37, 99, 235, 0.32) !important;
  background: rgba(37, 99, 235, 0.10) !important;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-nav .ustk-profile-trigger.dropdown-toggle::after {
  display: none;
}
html[data-bs-theme="light"] body.page-shell .ustk-top-nav .ustk-profile-trigger__text {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  letter-spacing: -0.01em;
}

html[data-bs-theme="light"] 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(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
}
html[data-bs-theme="light"] body.page-shell .ustk-avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 12px;
  font-weight: 700;
}
html[data-bs-theme="light"] body.page-shell .ustk-avatar--md {
  width: 38px;
  height: 38px;
  font-size: 16px;
  font-weight: 700;
}
html[data-bs-theme="light"] body.page-shell .ustk-avatar--initial {
  color: #ffffff;
  border-color: rgba(37, 99, 235, 0.30);
  background: linear-gradient(135deg, rgba(37, 99, 235, 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="light"] img.ustk-avatar,
html[data-bs-theme="light"] img.user-avatar,
html[data-bs-theme="light"] img.message-avatar,
html[data-bs-theme="light"] img.profile-photo,
html[data-bs-theme="light"] img.profile-avatar {
  max-width: 200px;
  max-height: 200px;
}

html[data-bs-theme="light"] body.page-shell .ustk-profile-menu.dropdown-menu {
  padding: 10px;
  border-radius: 16px;
  min-width: 290px;
  /* Performance: override global dropdown glass blur for the profile menu. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-bs-theme="light"] body.page-shell .ustk-profile-menu__divider.dropdown-divider {
  margin: 8px 6px;
  border-top-color: rgba(15, 23, 42, 0.10);
}
html[data-bs-theme="light"] 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="light"] body.page-shell .ustk-profile-menu .dropdown-item:hover,
html[data-bs-theme="light"] body.page-shell .ustk-profile-menu .dropdown-item:focus {
  background: rgba(37, 99, 235, 0.08) !important;
  transform: none;
}
html[data-bs-theme="light"] body.page-shell .ustk-profile-menu .dropdown-item.text-danger:hover,
html[data-bs-theme="light"] body.page-shell .ustk-profile-menu .dropdown-item.text-danger:focus {
  background: rgba(220, 38, 38, 0.08) !important;
}

/* Board dropdown in nav */
html[data-bs-theme="light"] body.page-shell #boardSelect {
  background-color: rgba(255, 255, 255, 0.70) !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: var(--ustk-text) !important;
}


