/* Unslop design review, after the method by Damir Sokolovsky (@heydamir).
   https://github.com/heydamir/unslop — CC BY 4.0.
   Every workspace rule is opt-in and leaves the existing style intact. */
.workspace-design-review, .workspace-tools-menu { display: none; }
body:not(.worker-mode):has(#appView:not(.hidden)) .workspace-design-review {
  position: fixed; z-index: 120; bottom: 16px; left: calc(50% + 120px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 6px 8px 6px 16px;
  border: 1px solid #bec9cf; border-radius: 10px; background: #fff; color: #22323d;
  box-shadow: 0 4px 20px rgb(0 0 0 / 10%); font: 13px/20px "Segoe UI", sans-serif;
}
.workspace-design-review > div { display: flex; gap: 4px; }
.workspace-design-review button { min-height: 36px; padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.workspace-design-review button[aria-pressed="true"] { background: #e8eff3; color: #164c69; }
.workspace-design-review .workspace-review-close { min-width: 36px; padding: 4px; font-size: 22px; }
.workspace-design-review button:focus-visible { outline: 2px solid #09678b; outline-offset: 2px; }
html[data-theme="dark"] body:not(.worker-mode):has(#appView:not(.hidden)) .workspace-design-review { color: #e9eef1; border-color: #53616a; background: #20282d; }
html[data-theme="dark"] .workspace-design-review button[aria-pressed="true"] { background: #35434d; color: #edf1f3; }

html[data-workspace-design="unslop"] body:not(.worker-mode):has(#appView:not(.hidden)) {
  --ux-bg: #f5f6f7;
  --ux-panel: #fff;
  --ux-sidebar: #fafbfc;
  --ux-raised: #f0f3f5;
  --ux-text: #1c2e3a;
  --ux-secondary: #50616d;
  --ux-muted: #60727e;
  --ux-line: #dce3e7;
  --ux-accent: #09678b;
  --ux-accent-soft: #e6eff4;
  --ux-on-accent: #fff;
  --ux-late: #ac4329;
  --ux-late-bg: #faf0eb;
  background: var(--ux-bg);
  color: var(--ux-text);
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;

  & .portal-topbar { height: 64px; min-height: 64px; gap: 24px; padding: 0 28px; border-bottom: 1px solid var(--ux-line); background: var(--ux-panel); color: var(--ux-text); box-shadow: none; backdrop-filter: none; }
  & .portal-brand { gap: 12px; color: var(--ux-text); font-size: 17px; font-weight: 600; letter-spacing: .01em; }
  & .brand-symbol { width: 32px; height: 36px; border-radius: 7px; color: var(--ux-panel); background: var(--ux-text); box-shadow: none; font-size: 20px; }
  & .topbar-right { gap: 12px; min-width: 0; }
  & .topbar-right :is(.text-button, .ghost, .theme-toggle) { min-height: 36px; padding: 8px 12px; border: 1px solid var(--ux-line); border-radius: 8px; background: var(--ux-panel); color: var(--ux-secondary); box-shadow: none; font-size: 12px; font-weight: 500; line-height: 20px; transition: background-color 150ms ease, border-color 150ms ease; }
  & .topbar-right :is(.text-button, .ghost, .theme-toggle):hover { background: var(--ux-raised); border-color: var(--ux-muted); color: var(--ux-text); box-shadow: none; }
  & .theme-toggle-track { color: var(--ux-muted); background: var(--ux-raised); }
  & .theme-toggle-track i { background: var(--ux-panel); box-shadow: none; }
  & :is(.theme-toggle-sun, .theme-toggle-moon) { color: var(--ux-text); }
  & .demo-mode-badge { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ux-muted); font-size: 12px; font-weight: 400; box-shadow: none; }
  & .demo-mode-badge svg { width: 16px; height: 16px; }
  & .system-status { gap: 8px; color: var(--ux-muted); font-size: 12px; }
  & .system-status i { width: 6px; height: 6px; background: var(--ux-accent); box-shadow: none; animation: none; }
  & #notificationCount { min-width: 20px; padding: 2px 5px; border: 0; border-radius: 5px; background: var(--ux-late-bg); color: var(--ux-late); font-size: 10px; font-weight: 500; }
  & .workspace-tools-menu { display: block; position: relative; }
  & .workspace-tools-menu summary { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border: 1px solid var(--ux-line); border-radius: 8px; color: var(--ux-secondary); font-size: 12px; line-height: 20px; list-style: none; cursor: pointer; }
  & .workspace-tools-menu summary::-webkit-details-marker { display: none; }
  & .workspace-tools-menu summary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  & .workspace-tools-menu[open] summary { background: var(--ux-raised); }
  & .workspace-tools-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 100; width: 232px; padding: 8px; border: 1px solid var(--ux-line); border-radius: 10px; background: var(--ux-panel); box-shadow: 0 8px 24px rgb(0 0 0 / 10%); }
  & .workspace-tools-popover :is(button,a):not(.hidden):not(.role-action-hidden) { display: flex !important; align-items: center; width: 100%; min-height: 40px; margin: 0; padding: 8px 12px; border: 0; border-radius: 6px; color: var(--ux-text); background: transparent; text-decoration: none; font-size: 13px; font-weight: 400; }
  & .workspace-tools-popover :is(button,a):hover { background: var(--ux-raised); }
  & .workspace-tools-popover #logoutButton { margin-top: 4px; border-top: 1px solid var(--ux-line); border-radius: 0; }
  & :is(.portal-topbar, .sidebar) :is(button,a,summary):focus-visible { outline: 2px solid var(--ux-accent); outline-offset: 2px; }

  & #appView { --sidebar-width: 256px; min-height: calc(100svh - 64px); background: var(--ux-bg); transition: none; }
  & #appView.sidebar-collapsed { --sidebar-width: 76px; }
  & .sidebar { position: sticky; top: 64px; height: calc(100svh - 64px); min-height: 0; padding: 24px 16px 16px; border-right: 1px solid var(--ux-line); color: var(--ux-text); background: var(--ux-sidebar); box-shadow: none; backdrop-filter: none; transition: none; }
  & .company-switcher { padding: 4px 8px 16px; border: 0; border-radius: 0; background: none; box-shadow: none; }
  & .company-switcher span { color: var(--ux-muted); font-size: 12px; line-height: 20px; font-weight: 400; letter-spacing: 0; text-transform: none; }
  & .company-switcher strong { margin-top: 4px; color: var(--ux-text); font-size: 14px; line-height: 22px; font-weight: 500; }
  & .company-switcher small { margin-top: 4px; color: var(--ux-muted); font-size: 12px; line-height: 20px; }
  & .sidebar-collapse-toggle { min-height: 32px; gap: 8px; margin-top: 0; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--ux-muted); font-size: 12px; font-weight: 400; box-shadow: none; }
  & .sidebar-collapse-toggle:hover { color: var(--ux-text); background: var(--ux-raised); }
  & #mainNav { gap: 0; margin-top: 16px; padding-right: 4px; scrollbar-color: var(--ux-line) transparent; }
  & #mainNav .sidebar-nav-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ux-line); }
  & #mainNav .sidebar-nav-group:first-child { margin-top: 0; padding-top: 0; border: 0; }
  & #mainNav .sidebar-nav-group > summary { min-height: 32px; padding: 4px 8px; color: var(--ux-muted); font-size: 12px; font-weight: 500; line-height: 20px; letter-spacing: 0; text-transform: none; background: transparent; }
  & #mainNav .sidebar-nav-group > summary:hover { color: var(--ux-text); background: var(--ux-raised); }
  & #mainNav .sidebar-nav-items { display: grid; gap: 4px; }
  & #mainNav button { width: 100%; min-height: 36px; gap: 12px; padding: 8px 12px; border: 0; border-radius: 6px; color: var(--ux-secondary); background: transparent; box-shadow: none; font-size: 13px; font-weight: 400; line-height: 20px; transition: background-color 150ms ease, color 150ms ease; }
  & #mainNav button:hover { background: var(--ux-raised); color: var(--ux-text); }
  & #mainNav button.active { color: var(--ux-accent); background: var(--ux-accent-soft); box-shadow: inset 2px 0 var(--ux-accent); font-weight: 500; }
  & #mainNav button > span { width: 18px; flex: 0 0 18px; }
  & #mainNav button svg { width: 18px; height: 18px; stroke-width: 1.5; }
  & #appView.sidebar-collapsed #mainNav button { width: 44px; justify-content: center; gap: 0; padding: 10px 12px; font-size: 0; }
  & .sidebar-user { gap: 12px; padding: 16px 4px 0; border-top: 1px solid var(--ux-line); }
  & .sidebar-user .avatar { width: 36px; height: 36px; flex: 0 0 36px; border: 0; background: var(--ux-accent-soft); color: var(--ux-accent); font-size: 13px; font-weight: 500; box-shadow: none; }
  & .sidebar-user strong { color: var(--ux-text); font-size: 12px; font-weight: 500; line-height: 20px; }
  & .sidebar-user small { color: var(--ux-muted); font-size: 11px; line-height: 18px; }

  & .content-shell { padding: 36px 40px 88px; color: var(--ux-text); background: var(--ux-bg); }
  & .content-view { max-width: 1600px; margin-inline: auto; animation: none; }
  & [data-content="dashboard"] { --da-bg: var(--ux-panel); --da-text: var(--ux-text); --da-muted: var(--ux-secondary); --da-line: var(--ux-line); --da-tint: var(--ux-raised); --da-accent: var(--ux-accent); --da-on-accent: var(--ux-on-accent); --da-pending: var(--ux-late); --da-pending-bg: var(--ux-late-bg); }
  & [data-content="dashboard"] > .page-heading { align-items: center; gap: 24px; margin-bottom: 20px; }
  & [data-content="dashboard"] .page-heading .kicker { margin: 0 0 8px; color: var(--ux-muted); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
  & [data-content="dashboard"] .page-heading h1 { color: var(--ux-text); font-size: 32px; line-height: 1.2; font-weight: 500; letter-spacing: -.025em; }
  & [data-content="dashboard"] .page-heading p:last-child { margin-top: 12px; color: var(--ux-secondary); font-size: 14px; line-height: 22px; }
  & [data-content="dashboard"] .dashboard-actions { gap: 8px; }
  & [data-content="dashboard"] .dashboard-actions .dashboard-action { min-height: 40px; padding: 8px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; line-height: 20px; }
  & [data-content="dashboard"] .dashboard-shortcuts { gap: 12px; margin-bottom: 16px; }
  & [data-content="dashboard"] .dashboard-shortcuts button { min-height: 36px; padding: 8px 12px; border-radius: 7px; border-color: var(--ux-line); background: var(--ux-panel); font-size: 13px; font-weight: 400; line-height: 20px; }
  & [data-content="dashboard"] .dashboard-shortcut-count { padding: 0 4px; border-radius: 4px; font-size: 12px; font-weight: 400; }
  & .company-dashboard { --cd-bg: var(--ux-panel); --cd-subtle: var(--ux-raised); --cd-line: var(--ux-line); --cd-ink: var(--ux-text); --cd-muted: var(--ux-secondary); --cd-accent: var(--ux-accent); --cd-tint: var(--ux-accent-soft); --cd-done: var(--ux-accent); --cd-working: #718e9d; --cd-open: #dbe2e6; --cd-late: var(--ux-late); --cd-late-bg: var(--ux-late-bg); --cd-shadow: none; }
  & .company-dashboard-meta { gap: 16px; margin-bottom: 16px; font-size: 12px; line-height: 20px; }
  & .company-dashboard-meta button { min-height: 36px; padding: 8px; font-size: 13px; font-weight: 400; }
  & .company-kpis { gap: 0; margin-bottom: 24px; border: 1px solid var(--ux-line); border-radius: 10px; background: var(--ux-panel); }
  & .company-kpis article { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 24px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  & .company-kpis article + article { border-left: 1px solid var(--ux-line); }
  & .company-kpis article > svg { display: none; }
  & .company-kpis article > span { color: var(--ux-secondary); font-size: 13px; font-weight: 400; line-height: 20px; }
  & .company-kpis article > strong { font-size: 36px; font-weight: 500; line-height: 40px; letter-spacing: -.02em; }
  & .company-kpis article > small { font-size: 12px; line-height: 20px; }
  & .company-dashboard-top { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; margin-bottom: 24px; align-items: start; }
  & .company-dashboard :is(.company-chart-panel,.company-attention-panel,.company-project-panel) { border-radius: 10px; box-shadow: none; }
  & .company-panel-head { gap: 16px; padding: 24px 24px 0; }
  & .company-dashboard h2 { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
  & .company-panel-head p { margin-top: 8px; font-size: 13px; line-height: 20px; }
  & .company-chart-content { gap: 40px; padding: 36px 32px; }
  & .company-donut { width: 196px; height: 196px; }
  & .company-donut-chart circle { stroke-width: 10px; }
  & .company-donut strong { font-size: 40px; font-weight: 500; letter-spacing: -.025em; }
  & .company-donut strong small { font-size: 18px; }
  & .company-chart-legend { gap: 24px; }
  & .company-chart-legend dt { font-size: 13px; }
  & .company-chart-legend dd { font-size: 16px; font-weight: 500; }
  & .company-chart-legend i { width: 6px; height: 6px; border-radius: 2px; }
  & .company-dashboard .company-progress-explainer { padding: 16px 24px; font-size: 12px; line-height: 20px; }
  & .company-attention-count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 6px; font-size: 13px; font-weight: 500; }
  & .company-attention-list { padding: 8px 24px 16px; }
  & .company-attention-list > button { gap: 12px; padding: 16px 0; }
  & .company-attention-list strong { font-size: 13px; line-height: 20px; font-weight: 500; }
  & .company-attention-list small { margin-top: 4px; font-size: 12px; line-height: 20px; }
  & .company-attention-dot { width: 5px; height: 5px; }
  & .company-attention-all { padding: 12px 16px; font-weight: 500 !important; }
  & .company-project-toolbar { padding: 20px 24px; }
  & .company-project-filters { border-radius: 7px; }
  & .company-project-filters button { min-height: 36px; border-radius: 5px; font-weight: 400; }
  & .company-project-toolbar input { min-height: 40px; border-color: var(--ux-muted); border-radius: 7px; }
  & .company-project-card { padding: 20px 24px; }
  & .company-project-name h3 > button { font-size: 14px; font-weight: 500; }
  & .company-project-name > span { font-size: 12px; font-weight: 400; }
  & .company-project-bar { box-shadow: none; }
  & .company-project-bar i { background: var(--ux-accent); box-shadow: none; }
}

html[data-workspace-design="unslop"][data-theme="dark"] body:not(.worker-mode):has(#appView:not(.hidden)) {
  --ux-bg: #141a1e; --ux-panel: #1c2328; --ux-sidebar: #171e23; --ux-raised: #293239;
  --ux-text: #edf1f3; --ux-secondary: #b3c0c8; --ux-muted: #a0b0ba; --ux-line: #35434c;
  --ux-accent: #83c9e5; --ux-accent-soft: #253b47; --ux-on-accent: #11232d;
  --ux-late: #f1ad91; --ux-late-bg: #3a2b25;
  & .company-dashboard { --cd-open: #465761; --cd-working: #7d99a8; }
}

@media (max-width: 1250px) {
  html[data-workspace-design="unslop"] body:not(.worker-mode):has(#appView:not(.hidden)) {
    & .content-shell { padding: 28px 28px 88px; }
    & .system-status { display: none; }
    & .company-chart-content { flex-wrap: wrap; justify-content: center; gap: 24px; padding: 28px 24px; }
    & .company-chart-legend { min-width: 160px; }
    & [data-content="dashboard"] > .page-heading { align-items: flex-start; flex-wrap: wrap; }
    & .company-kpis article { padding: 20px; }
  }
}
@media (max-width: 900px) {
  body:not(.worker-mode):has(#appView:not(.hidden)) .workspace-design-review { left: 50%; }
  html[data-workspace-design="unslop"] body:not(.worker-mode):has(#appView:not(.hidden)) {
    & .portal-topbar { gap: 12px; padding: 0 16px; }
    & .topbar-right { gap: 8px; }
    & .demo-mode-badge { font-size: 11px; }
    & .sidebar { top: 64px; height: auto; border-right: 0; border-bottom: 1px solid var(--ux-line); padding: 12px 16px; }
    & .mobile-nav-toggle { min-height: 44px; padding: 10px 12px; border: 1px solid var(--ux-line); border-radius: 8px; color: var(--ux-text); background: var(--ux-panel); box-shadow: none; }
    & .mobile-nav-current { color: var(--ux-text); font-size: 14px; font-weight: 500; }
    & .mobile-nav-menu-icon i { background: var(--ux-secondary); }
    & .mobile-nav-chevron { color: var(--ux-secondary); }
    & #mainNav { margin-top: 8px; }
    & #mainNav button { min-height: 44px; }
    & .content-shell { padding: 24px 20px 96px; }
    & .company-dashboard-top { grid-template-columns: 1fr; }
    & .company-chart-content { flex-wrap: nowrap; justify-content: flex-start; }
    & .company-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    & .company-kpis article:nth-child(3) { border-left: 0; }
    & .company-kpis article:nth-child(n+3) { border-top: 1px solid var(--ux-line); }
    & .workspace-tools-menu summary { min-height: 44px; }
    & .workspace-tools-popover :is(button,a):not(.hidden):not(.role-action-hidden) { min-height: 44px; }
  }
}
@media (max-width: 560px) {
  body:not(.worker-mode):has(#appView:not(.hidden)) .workspace-design-review { bottom: 16px; gap: 4px; padding: 6px; font-size: 12px; }
  body.manager-mobile-mode:has(#appView:not(.hidden)) .workspace-design-review { bottom: 84px; }
  .workspace-design-review > span { display: none; }
  .workspace-design-review button { min-height: 44px; }
  html[data-workspace-design="unslop"] body:not(.worker-mode):has(#appView:not(.hidden)) {
    & .portal-topbar { height: 64px; }
    & .portal-brand { font-size: 15px; gap: 8px; }
    & .topbar-right { gap: 6px; }
    & .demo-mode-badge { display: none; }
    & .topbar-right :is(.ghost, .theme-toggle) { min-height: 44px; }
    & .content-shell { padding: 24px 16px 152px; }
    & [data-content="dashboard"] .page-heading h1 { font-size: 28px; }
    & [data-content="dashboard"] .dashboard-actions { width: 100%; }
    & [data-content="dashboard"] .dashboard-actions .dashboard-action { min-height: 44px; font-size: 12px; }
    & [data-content="dashboard"] .dashboard-shortcuts button { min-height: 44px; }
    & .company-kpis article { padding: 16px; }
    & .company-kpis article > strong { font-size: 32px; }
    & .company-kpis article > span { font-size: 12px; }
    & .company-panel-head { padding: 20px 20px 0; }
    & .company-chart-content { gap: 20px; padding: 24px 20px; }
    & .company-donut { width: 128px; height: 128px; }
    & .company-donut > div { width: 96px; height: 96px; }
    & .company-donut strong { font-size: 30px; }
    & .company-chart-legend { min-width: 0; gap: 16px; }
    & .company-chart-legend dt { gap: 6px; font-size: 12px; }
    & .company-chart-legend dd { font-size: 14px; }
    & .company-attention-list { padding: 8px 20px 16px; }
    & .company-project-toolbar { flex-wrap: wrap; padding: 16px 20px; }
    & .company-project-toolbar input { width: 100%; }
    & .company-project-filters { width: 100%; flex-wrap: wrap; }
    & .company-project-filters button { min-height: 44px; flex: 1 1 auto; }
  }
}
