/* ════════════════════════════════════════════════════════════════════════
   MSINDAHA Operations — REACT DASHBOARD STYLES
   Everything specific to index.html / audit.html: list & board views,
   detail drawer, activity timeline, tasks, notes, dashboard, users,
   pickers, calendar, command palette and the sign-in screen.
════════════════════════════════════════════════════════════════════════ */

/* ── Shared list container (tabs + toolbar + rows) ── */
.list-shell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.list-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding: 0 14px 0 8px;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}
.view-tabs {
  display: flex;
  align-self: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.view-tabs::-webkit-scrollbar {
  display: none;
}
.view-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  white-space: nowrap;
  transition: color var(--dur-fast);
}
.view-tab:hover {
  color: var(--text-primary);
}
.view-tab.active {
  color: var(--text-primary);
  font-weight: 600;
}
.view-tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  animation: tabUnderline 0.25s var(--ease-out);
}
.view-tab-count {
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-active);
  font-variant-numeric: tabular-nums;
}
.view-tab.active .view-tab-count {
  color: var(--accent-text);
  background: var(--accent-dim);
}
.list-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.toolbar-spacer {
  flex: 1;
}
@media (max-width: 640px) {
  .list-toolbar .search-field {
    flex: 1 1 100%;
  }
  .list-tabs {
    padding: 0 8px;
  }
}
.list-summary {
  padding: 7px 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Search field */
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  flex: 0 1 260px;
  min-width: 180px;
  max-width: 100%;
  padding: 0 6px 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.search-field:hover {
  border-color: #334059;
}
.search-field:focus-within {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.search-field > svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}
.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
}
.search-field input::placeholder {
  color: var(--text-faint);
}
.search-field .kbd {
  opacity: 0.75;
}
.search-clear {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.search-clear:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.search-clear svg {
  width: 12px;
  height: 12px;
}

/* Filter chips */
.filter-chip {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  color: var(--text-sub);
  overflow: hidden;
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast),
    color var(--dur-fast);
}
.filter-chip:hover,
.filter-chip.open {
  border-color: #3a4763;
  background: var(--bg-hover);
  color: var(--text-primary);
}
.filter-chip.active {
  border-style: solid;
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--accent-dim);
  color: var(--accent-text);
}
.filter-chip-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
}
.filter-chip-main svg {
  width: 14px;
  height: 14px;
}
.filter-chip-main > svg:last-child {
  width: 12px;
  height: 12px;
  opacity: 0.65;
}
.filter-chip-main b {
  font-weight: 600;
}
.filter-chip-clear {
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: inherit;
  border-left: 1px solid rgba(59, 130, 246, 0.3);
  transition: background var(--dur-fast);
}
.filter-chip-clear:hover {
  background: rgba(59, 130, 246, 0.2);
}
.filter-chip-clear svg {
  width: 12px;
  height: 12px;
}

/* ── Tickets: dense list ── */
.tk-table {
  position: relative;
}
.tk-head,
.tk-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 128px 178px 108px 92px;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}
.tk-head {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 38px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tk-head > :last-child {
  justify-self: end;
}
.tk-head-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  transition: color var(--dur-fast);
}
.tk-head-btn:hover {
  color: var(--text-sub);
}
.tk-head-btn.active {
  color: var(--text-primary);
}
.tk-head-btn svg {
  width: 12px;
  height: 12px;
}
.tk-row {
  min-height: 62px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast);
  animation: rowIn 0.34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 16ms);
}
.tk-row:hover {
  background: var(--bg-hover);
}
.tk-row:focus-visible {
  outline: none;
  background: var(--bg-hover);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tk-row.selected {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tk-row.flash {
  animation: rowFlash 2.4s ease;
}
.tk-row.finished .tk-title {
  color: var(--text-sub);
}
.skeleton-row {
  cursor: default;
  animation: none;
}
.skeleton-row:hover {
  background: none;
}
.tk-c-prio {
  display: grid;
  place-items: center;
}
.tk-c-main {
  min-width: 0;
}
.tk-line1 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.tk-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--text-muted);
  white-space: nowrap;
}
.tk-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.tk-line2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--text-muted);
}
.tk-cat {
  color: var(--text-sub);
  flex-shrink: 0;
}
.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-faint);
}
.tk-excerpt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-c-status,
.tk-c-assignee,
.tk-c-due {
  min-width: 0;
}
.tk-c-updated {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.tk-comments {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.tk-comments svg {
  width: 12px;
  height: 12px;
}
.muted-dash {
  color: var(--text-faint);
}
.load-more {
  display: flex;
  justify-content: center;
  padding: 14px;
}
.load-more-count {
  font-size: 12px;
  color: var(--text-faint);
}
@media (max-width: 1000px) {
  .tk-head {
    display: none;
  }
  .tk-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    padding: 12px 14px;
  }
  .tk-c-main {
    flex: 1 1 0;
  }
  .tk-c-assignee {
    order: 3;
    margin-left: 34px;
  }
  .tk-c-due {
    order: 4;
  }
  .tk-c-updated {
    order: 5;
    margin-left: auto;
    flex-direction: row;
    gap: 10px;
  }
}

/* People / assignee cells */
.assignee-one {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.assignee-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-sub);
}
.assignee-many {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.unassigned {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.dept-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--purple-dim);
  color: var(--purple-text);
}
.dept-pill svg {
  width: 12px;
  height: 12px;
}
.you-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-dim);
  flex-shrink: 0;
}
.pill-me {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-dim);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Priority & due */
.prio-ic {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.prio-ic svg {
  width: 16px;
  height: 16px;
}
.prio-ic.prio-low,
.prio-ic.prio-medium {
  color: var(--text-sub);
}
.prio-ic.prio-high {
  color: #f59e0b;
}
.prio-ic.prio-critical {
  color: #ef4444;
}
.prio-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-sub);
  white-space: nowrap;
}
.due-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-sub);
  white-space: nowrap;
}
.due-chip svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}
.due-chip.compact {
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11.5px;
  background: var(--bg-active);
}
.due-chip.compact svg {
  width: 11px;
  height: 11px;
}
.due-overdue,
.due-overdue svg {
  color: var(--danger-text);
}
.due-overdue.compact {
  background: var(--danger-dim);
}
.due-today,
.due-today svg {
  color: var(--warning-text);
}
.due-today.compact {
  background: var(--warning-dim);
}
.due-soon {
  color: #fcd34d;
}
.due-done {
  color: var(--text-muted);
}
.due-text-overdue {
  color: var(--danger-text);
}
.due-text-today {
  color: var(--warning-text);
}

/* ── Tickets: board ── */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(262px, 1fr);
  gap: 12px;
  padding: 14px;
  overflow-x: auto;
  align-items: start;
}
.board-col {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  max-height: calc(100vh - 300px);
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(7, 10, 18, 0.55);
  transition:
    border-color var(--dur),
    background var(--dur),
    box-shadow var(--dur),
    opacity var(--dur);
}
.board-col.can-drop {
  border-style: dashed;
  border-color: rgba(59, 130, 246, 0.4);
}
.board-col.no-drop {
  opacity: 0.5;
}
.board-col.drag-over {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.07);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.board-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
}
.board-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.board-col-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 10px 12px;
}
.tk-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  animation: riseIn 0.3s var(--ease-out) both;
  transition:
    border-color var(--dur-fast),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast),
    opacity var(--dur-fast);
}
.tk-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.tk-card.draggable {
  cursor: grab;
}
.tk-card.draggable:active {
  cursor: grabbing;
}
.tk-card.dragging {
  opacity: 0.4;
  transform: rotate(1.5deg);
}
.tk-card.flash {
  animation: rowFlash 2.4s ease;
}
.tk-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tk-card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tk-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin-top: 10px;
}
.board-empty {
  padding: 18px 8px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}
.board-more {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Detail drawer ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(2, 4, 10, 0.52);
  animation: fadeIn 0.2s ease both;
}
.drawer-overlay.closing {
  animation: fadeOut 0.22s ease both;
}
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card-alt);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  outline: none;
  animation: drawerIn 0.32s var(--ease-out) both;
}
.drawer.closing {
  animation: drawerOut 0.22s var(--ease-in-out) both;
}
.detail,
.detail-missing {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.drawer-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 12px 0 20px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.drawer-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.drawer-crumb > svg {
  width: 15px;
  height: 15px;
}
.drawer-crumb > svg:nth-of-type(2) {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}
.drawer-crumb .tk-id {
  font-size: 12.5px;
  color: var(--text-sub);
}
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.drawer-pos {
  margin-right: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.hdr-sep {
  width: 1px;
  height: 20px;
  margin: 0 6px;
  background: var(--border);
}
.drawer-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  overflow: hidden;
}
.detail-main {
  overflow-y: auto;
  padding: 22px 26px 36px;
}
.detail-props {
  overflow-y: auto;
  padding: 18px 18px 28px;
  border-left: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.detail-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.35;
  word-break: break-word;
}
.detail-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-sub);
}
.detail-sub b {
  color: var(--text-primary);
  font-weight: 600;
}
.detail-sub .link-btn {
  margin-left: auto;
}
.detail-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  animation: fadeIn 0.3s ease;
}
.detail-section {
  margin-top: 26px;
}
.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.detail-section-head h4 {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.detail-desc {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-desc.empty {
  color: var(--text-muted);
  font-style: italic;
}
.detail-desc a,
.tl-body a,
.note-text a {
  word-break: break-all;
}
.props-title {
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.prop-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
}
.prop-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.prop-label svg {
  width: 14px;
  height: 14px;
}
.prop-value {
  min-width: 0;
  font-size: 13px;
}
.prop-text {
  font-size: 12.5px;
  color: var(--text-sub);
}
.prop-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.prop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 30px;
  padding: 3px 6px 3px 4px;
  margin-left: -4px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: inherit;
  text-align: left;
  transition:
    background var(--dur-fast),
    border-color var(--dur-fast);
}
.prop-btn:hover,
.prop-btn.open {
  background: var(--bg-hover);
  border-color: var(--border);
}
.prop-btn > svg:last-child {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}
.props-sep {
  height: 1px;
  margin: 10px 0;
  background: var(--border);
}
.props-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  font-size: 11.5px;
  color: var(--text-faint);
}
.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-sub);
}
.cat-tag svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}
.detail-missing-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
}
@media (max-width: 860px) {
  .drawer-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .detail-main,
  .detail-props {
    overflow: visible;
  }
  .detail-props {
    order: -1;
    border-left: none;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
  }
  .props-hint {
    display: none;
  }
  .detail-main {
    padding: 20px;
  }
  .drawer-pos {
    display: none;
  }
}

/* Completion & progress */
.completion-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: var(--success-dim);
  color: var(--success-text);
  font-size: 13px;
}
.completion-line svg {
  width: 16px;
  height: 16px;
}
.completion-line strong {
  color: #bbf7d0;
}
.progress-card {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
}
.progress-count {
  color: var(--text-primary);
}
.meter {
  height: 8px;
  margin-bottom: 14px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(34, 197, 94, 0.14);
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--success);
  transition: width 0.5s var(--ease-out);
}
.progress-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 12px;
}
.progress-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.progress-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.progress-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--success-text);
}
.progress-done svg {
  width: 12px;
  height: 12px;
}
.progress-pending {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Activity timeline & comments ── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--border);
}
.tl-event {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--text-sub);
  animation: rowIn 0.3s var(--ease-out) both;
}
.tl-icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-card-alt);
  border: 2px solid var(--border);
  color: var(--tone-text, var(--text-muted));
}
.tl-icon svg {
  width: 13px;
  height: 13px;
}
.tl-text {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}
.tl-text b {
  color: var(--text-primary);
  font-weight: 600;
}
.tl-time {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.tl-comment {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 8px 0;
  animation: rowIn 0.3s var(--ease-out) both;
}
.tl-comment > .avatar {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--bg-card-alt);
}
.tl-bubble {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 4px 12px 12px 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.tl-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.tl-meta b {
  font-size: 13px;
  color: var(--text-primary);
}
.tl-body {
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.timeline-empty {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.composer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.composer-box {
  flex: 1;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.composer-box:focus-within {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.form-textarea.composer-input {
  min-height: 0;
  padding: 11px 13px 4px;
  border: none;
  background: transparent;
  box-shadow: none;
  resize: none;
}
.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 8px 12px;
}
.composer-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ── Pickers ── */
.assign-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.assign-modes {
  align-self: flex-start;
}
.people-list {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  overflow: hidden;
}
.people-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}
.people-search svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}
.people-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
}
.people-search input::placeholder {
  color: var(--text-faint);
}
.people-items {
  overflow-y: auto;
  padding: 4px;
}
.people-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 7px;
  text-align: left;
  color: inherit;
  transition: background var(--dur-fast);
}
.people-item:hover {
  background: var(--bg-hover);
}
.people-item.selected {
  background: var(--accent-dim);
}
.people-item > svg:last-child {
  width: 15px;
  height: 15px;
  color: var(--accent-text);
}
.people-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}
.people-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.people-empty {
  padding: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}
.checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1.5px solid #3a4560;
  display: grid;
  place-items: center;
  color: #fff;
  transition:
    background var(--dur-fast),
    border-color var(--dur-fast);
}
.checkbox.on {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox svg {
  width: 10px;
  height: 10px;
}
.radio {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid #3a4560;
}
.radio.on {
  border-color: var(--accent);
}
.radio.on::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.option-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
}
.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  text-align: left;
  color: inherit;
  transition: background var(--dur-fast);
}
.option-row:hover {
  background: var(--bg-hover);
}
.option-row.selected {
  background: var(--accent-dim);
}
.assign-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: var(--purple-dim);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-sub);
}
.assign-note svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--purple-text);
}
.assign-note strong {
  color: var(--text-primary);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 4px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--accent-dim);
  animation: popIn 0.18s var(--ease-out);
}
.person-chip button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: inherit;
}
.person-chip button:hover {
  background: rgba(59, 130, 246, 0.3);
}
.person-chip button svg {
  width: 10px;
  height: 10px;
}
.assignee-menu .people-list {
  border: none;
  border-radius: 0;
  background: transparent;
}
.assignee-menu-foot {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.prio-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.prio-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast),
    color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.prio-option:hover {
  border-color: #3a4763;
  color: var(--text-primary);
}
.prio-option.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px var(--accent);
}
@media (max-width: 520px) {
  .prio-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Calendar, date field and period filter ── */
.cal {
  user-select: none;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cal-title {
  font-size: 13px;
  font-weight: 600;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 2px;
}
.cal-dow {
  padding: 4px 0 6px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cal-day {
  position: relative;
  height: 32px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  transition:
    background var(--dur-fast),
    color var(--dur-fast);
}
.cal-day:hover {
  background: var(--bg-active);
}
.cal-day.outside {
  color: var(--text-faint);
}
.cal-day.today {
  color: var(--accent-text);
  font-weight: 700;
}
.cal-day.today::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-day.in-range {
  background: var(--accent-dim);
  border-radius: 0;
}
.cal-day.range-start {
  border-radius: var(--radius) 0 0 var(--radius);
}
.cal-day.range-end {
  border-radius: 0 var(--radius) var(--radius) 0;
}
.cal-day.range-start.range-end {
  border-radius: var(--radius);
}
.cal-day.range-start,
.cal-day.range-end,
.cal-day.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.cal-day.range-start::after,
.cal-day.range-end::after,
.cal-day.selected::after {
  background: #fff;
}
.cal-foot {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}
.date-pop {
  padding: 12px;
}
.date-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  white-space: nowrap;
  transition:
    border-color var(--dur-fast),
    color var(--dur-fast),
    background var(--dur-fast);
}
.chip-btn:hover {
  border-color: #3a4763;
  color: var(--text-primary);
}
.chip-btn.active {
  background: var(--accent-dim);
  border-color: rgba(59, 130, 246, 0.5);
  color: var(--accent-text);
}
.chip-btn svg {
  width: 12px;
  height: 12px;
}
.chip-danger.active {
  background: var(--danger-dim);
  border-color: rgba(239, 68, 68, 0.45);
  color: var(--danger-text);
}
.chip-count {
  padding: 0 6px;
  line-height: 16px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--bg-active);
}
.date-pop-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}
.date-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.date-field-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast);
}
.date-field-btn:hover {
  border-color: #334059;
}
.date-field-btn svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}
.date-field .placeholder {
  color: var(--text-faint);
}
.date-field.has-value .date-field-btn {
  padding-right: 34px;
}
.date-field-clear {
  position: absolute;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.date-field-clear:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.date-field-clear svg {
  width: 12px;
  height: 12px;
}
.date-field-input {
  width: 100%;
}
.date-field-input .date-field-btn {
  width: 100%;
  height: 38px;
}
.date-field-prop .date-field-btn {
  height: 30px;
  margin-left: -6px;
  padding: 0 6px;
  border-color: transparent;
  background: transparent;
}
.date-field-prop.has-value .date-field-btn {
  padding-right: 30px;
}
.date-field-prop .date-field-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.period-pop {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}
.period-fields {
  width: 100%;
}
.period-fields .seg-btn {
  flex: 1;
}
.period-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.period-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.preset-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: var(--bg-input);
  font-size: 12.5px;
  text-align: left;
  color: var(--text-sub);
  transition:
    border-color var(--dur-fast),
    color var(--dur-fast),
    background var(--dur-fast);
}
.preset-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.preset-btn.active {
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--accent-dim);
  color: var(--accent-text);
}
.period-cal-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
}
.period-cal-label .muted {
  font-weight: 500;
}
.period-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Notifications popover & page ── */
.notif-pop {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(640px, calc(100vh - 80px));
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px 16px;
}
.notif-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-panel-title strong {
  font-size: 14.5px;
}
.pill-count {
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-dim);
}
.notif-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-filter {
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border);
}
.notif-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.notif-group {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-card-alt);
}
.notif-page-list .notif-group {
  background: var(--bg-card);
}
.notif-loading {
  display: grid;
  place-items: center;
  padding: 32px;
}
.notif-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.notif-item:hover .notif-remove,
.notif-item:focus-within .notif-remove {
  opacity: 1;
}
.notif-item:hover .notif-remove ~ .notif-item-dot,
.notif-page-list .notif-item:hover .notif-item-dot {
  opacity: 0;
}
.notif-panel-foot {
  display: flex;
  justify-content: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}
.notif-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 12px 2px;
  padding: 10px 10px 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: var(--accent-dim);
  font-size: 12px;
  animation: fadeIn 0.3s ease;
}
.notif-prompt > svg {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}
.notif-prompt > div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.notif-prompt strong {
  font-size: 12.5px;
}
.notif-prompt span {
  color: var(--text-sub);
}
.notif-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}
.notif-settings {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
}
.setting-row + .setting-row {
  border-top: 1px solid var(--border);
}
.setting-title {
  font-size: 13.5px;
  font-weight: 600;
}
.setting-desc {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}
.notif-rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-sub);
}
.notif-rules li {
  position: relative;
  padding-left: 18px;
}
.notif-rules li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 1000px) {
  .notif-page-layout {
    grid-template-columns: 1fr;
  }
  .notif-settings {
    position: static;
  }
}

/* ── Tasks ── */
.tasks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.task-list {
  display: flex;
  flex-direction: column;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--dur-fast);
  animation: rowIn 0.34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 16ms);
}
.task-row:hover {
  background: var(--bg-hover);
}
.task-row:focus-visible {
  outline: none;
  background: var(--bg-hover);
  box-shadow: inset 3px 0 0 var(--accent);
}
.task-row.selected {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--accent);
}
.task-row > svg:last-child {
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.task-row:hover > svg:last-child {
  opacity: 1;
}
.task-check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #3a4560;
  display: grid;
  place-items: center;
  color: transparent;
  transition:
    background var(--dur) var(--ease-out),
    border-color var(--dur),
    color var(--dur);
}
.task-check svg {
  width: 12px;
  height: 12px;
  transform: scale(0.4);
  transition: transform 0.25s var(--ease-spring);
}
.task-check:hover:not(:disabled) {
  border-color: var(--success);
  color: rgba(74, 222, 128, 0.7);
}
.task-check:hover:not(:disabled) svg,
.task-check.checked svg {
  transform: scale(1);
}
.task-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  animation: checkPop 0.35s var(--ease-spring);
}
.task-check.locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.task-main {
  flex: 1;
  min-width: 0;
}
.task-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color var(--dur);
}
.task-row.finished .task-title {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.5);
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
}
.task-assign {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.task-from {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}
.vis-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.vis-tag svg {
  width: 11px;
  height: 11px;
}
.vis-tag.private {
  background: var(--purple-dim);
  color: var(--purple-text);
}
.vis-tag.shared {
  background: var(--success-dim);
  color: var(--success-text);
}

/* Notes */
.notes-col {
  position: sticky;
  top: 0;
}
.notes-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--topbar-h) - 60px);
  padding: 18px;
}
.notes-card .section-head {
  margin-bottom: 12px;
}
.note-composer {
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.note-composer:focus-within {
  border-color: var(--accent);
  box-shadow: var(--ring);
}
.note-composer .form-textarea {
  border: none;
  background: transparent;
  box-shadow: none;
  resize: none;
  min-height: 0;
}
.note-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px 8px;
}
.notes-search {
  margin-top: 12px;
}
.notes-search .search-field {
  width: 100%;
}
.notes-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-right: 2px;
  overflow-y: auto;
}
.note-item {
  flex-shrink: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: rgba(245, 158, 11, 0.06);
  animation: popIn 0.25s var(--ease-out) both;
  transition: border-color var(--dur-fast);
}
.note-item:hover {
  border-color: rgba(245, 158, 11, 0.38);
}
.note-item.private {
  border-color: rgba(139, 92, 246, 0.22);
  background: rgba(139, 92, 246, 0.06);
}
.note-item.private:hover {
  border-color: rgba(139, 92, 246, 0.42);
}
.note-text {
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.note-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.note-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  color: var(--text-muted);
}
.note-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.note-item:hover .note-actions,
.note-item:focus-within .note-actions {
  opacity: 1;
}
@media (hover: none) {
  .note-actions {
    opacity: 1;
  }
}
.note-edit-foot {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.notes-empty {
  padding: 22px 8px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.notes-more {
  align-self: center;
}
@media (max-width: 1180px) {
  .tasks-layout {
    grid-template-columns: 1fr;
  }
  .notes-col {
    position: static;
  }
  .notes-card {
    max-height: 640px;
  }
}

/* ── Dashboard ── */
.dash-date {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-text);
}
.dash-header h2 {
  font-size: 26px;
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.dash-grid-b {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
@media (max-width: 1100px) {
  .dash-grid,
  .dash-grid-b {
    grid-template-columns: 1fr;
  }
}
.work-list,
.feed {
  display: flex;
  flex-direction: column;
}
.feed {
  max-height: 440px;
  overflow-y: auto;
}
.work-row,
.feed-row {
  display: flex;
  width: 100%;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  color: inherit;
  transition: background var(--dur-fast);
}
.work-row {
  align-items: center;
}
.feed-row {
  align-items: flex-start;
  gap: 11px;
}
.work-row:hover,
.feed-row:hover {
  background: var(--bg-hover);
}
.work-row:last-child,
.feed-row:last-child {
  border-bottom: none;
}
.work-kind {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--tone-bg);
  color: var(--tone-text);
}
.work-kind svg {
  width: 15px;
  height: 15px;
}
.work-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.work-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 600;
}
.work-sub {
  display: flex;
  align-items: center;
  gap: 8px;
}
.feed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.feed-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-sub);
}
.feed-text b {
  font-weight: 600;
  color: var(--text-primary);
}
.feed-item {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-text);
}
.feed-quote {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  color: var(--text-muted);
}
.feed-time {
  font-size: 11.5px;
  color: var(--text-faint);
}
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pipe-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  margin: 0 -8px;
  padding: 6px 8px;
  border-radius: var(--radius);
  text-align: left;
  color: inherit;
  transition: background var(--dur-fast);
}
.pipe-row:hover {
  background: var(--bg-hover);
}
.pipe-track {
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(59, 130, 246, 0.12);
}
.pipe-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.6s var(--ease-out);
}
.pipe-n {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.attention-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.attention-row {
  display: grid;
  grid-template-columns: 94px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 -8px;
  padding: 8px;
  border-radius: var(--radius);
  text-align: left;
  color: inherit;
  transition: background var(--dur-fast);
}
.attention-row:hover {
  background: var(--bg-hover);
}
.attention-why {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--tone-text);
  background: var(--tone-bg);
}
.attention-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}
.website-card {
  margin-bottom: 8px;
}
.website-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .website-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.mini-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card-alt);
  color: inherit;
  transition:
    border-color var(--dur-fast),
    transform var(--dur-fast);
}
.mini-stat:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  text-decoration: none;
}
.mini-stat .stat-icon {
  position: static;
}
.mini-stat-val {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}
.mini-stat-lbl {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}
.inline-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-dim);
  color: var(--danger-text);
  font-size: 13px;
}
.inline-alert svg {
  width: 15px;
  height: 15px;
}

/* ── HR ── */
.hr-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(139, 92, 246, 0.13), rgba(59, 130, 246, 0.06) 55%, transparent),
    var(--bg-card);
}
.hr-logo {
  height: 72px;
  width: auto;
  flex-shrink: 0;
}
.hr-hero h3 {
  margin: 8px 0 6px;
  font-size: 18px;
  font-weight: 700;
}
.hr-hero p {
  max-width: 640px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-sub);
}
.hr-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--purple-text);
  background: var(--purple-dim);
}
.hr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.hr-feat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  animation: riseIn 0.4s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
  transition:
    border-color var(--dur),
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur);
}
.hr-feat:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.hr-feat-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--tone-bg);
  color: var(--tone-text);
}
.hr-feat-icon svg {
  width: 21px;
  height: 21px;
}
.hr-feat-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hr-feat-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.hr-feat-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}
.hr-feat-go {
  color: var(--text-muted);
  transition:
    transform var(--dur) var(--ease-out),
    color var(--dur);
}
.hr-feat-go svg {
  width: 16px;
  height: 16px;
}
.hr-feat:hover .hr-feat-go {
  color: var(--accent-text);
  transform: translate(2px, -2px);
}
@media (max-width: 800px) {
  .hr-grid {
    grid-template-columns: 1fr;
  }
  .hr-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Users ── */
.user-head,
.user-row {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) 170px 170px 140px 88px;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}
.user-head {
  height: 38px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.user-row {
  min-height: 62px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: background var(--dur-fast);
  animation: rowIn 0.34s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 16ms);
}
.user-row:last-child {
  border-bottom: none;
}
.user-row:hover {
  background: var(--bg-hover);
}
.user-row.is-me {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.07), transparent 60%);
}
.user-row.revoked {
  opacity: 0.72;
}
.user-cell-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.user-id {
  min-width: 0;
}
.user-name {
  display: flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 600;
}
.user-email {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  color: var(--text-muted);
}
.user-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}
@media (max-width: 960px) {
  .user-head {
    display: none;
  }
  .user-row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 6px;
    padding: 12px 16px;
  }
  .user-row > :nth-child(2),
  .user-row > :nth-child(3),
  .user-row > :nth-child(4) {
    grid-column: 1;
    padding-left: 48px;
  }
  .user-row > :nth-child(5) {
    grid-column: 2;
    grid-row: 1;
  }
}
.creds {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.creds-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 13px;
}
.creds-row span {
  color: var(--text-muted);
}
.creds-row b {
  text-align: right;
  word-break: break-all;
}

/* ── User menu ── */
.user-menu-head {
  display: flex;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
}
.user-menu-id {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.user-menu-name {
  font-size: 14px;
  font-weight: 600;
}
.user-menu-email {
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Command palette ── */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.15s ease both;
}
.cmdk-overlay.closing {
  animation: fadeOut 0.15s ease both;
}
.cmdk {
  align-self: flex-start;
  width: 100%;
  max-width: 640px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-alt);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s var(--ease-out) both;
}
.cmdk.closing {
  animation: modalOut 0.14s ease both;
}
.cmdk-input {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input > svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.cmdk-input input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
}
.cmdk-input input::placeholder {
  color: var(--text-faint);
}
.cmdk-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.cmdk-group-label {
  padding: 10px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  text-align: left;
  color: var(--text-primary);
}
.cmdk-item.active {
  background: var(--bg-active);
}
.cmdk-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--bg-raised);
  color: var(--text-sub);
}
.cmdk-icon svg {
  width: 14px;
  height: 14px;
}
.cmdk-item.active .cmdk-icon {
  background: var(--accent-dim);
  color: var(--accent-text);
}
.cmdk-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cmdk-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.cmdk-empty {
  padding: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.cmdk-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
}
.cmdk-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.shortcut-list {
  display: flex;
  flex-direction: column;
}
.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-sub);
}
.shortcut-row:last-child {
  border-bottom: none;
}
.shortcut-keys {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
}

/* ── Sign-in ── */
.login-split {
  width: 100%;
  min-height: 100vh;
  display: flex;
  background: var(--bg-primary);
  overflow-y: auto;
}
.login-hero {
  display: none;
  position: relative;
  flex: 1.1;
  background-size: cover;
  background-position: center;
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.5) 0%, rgba(6, 10, 18, 0.74) 55%, rgba(6, 10, 18, 0.95) 100%);
}
.login-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
}
.login-hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
.login-hero-heading {
  max-width: 480px;
  margin-bottom: 14px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.6px;
  color: #fff;
}
.login-hero-sub {
  max-width: 440px;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}
.login-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.login-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}
.login-points svg {
  width: 18px;
  height: 18px;
  color: #60a5fa;
}
.login-signature {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.login-signature-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.login-signature-role {
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  vertical-align: middle;
  color: rgba(255, 255, 255, 0.6);
}
.login-signature-tag {
  margin-top: 2px;
  font-size: 12.5px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.62);
}
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: radial-gradient(700px 400px at 50% 0%, rgba(59, 130, 246, 0.08), transparent 70%);
}
.auth-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff;
}
.auth-logos img {
  height: 26px;
  width: auto;
  max-width: 44%;
}
.auth-logos-sep {
  width: 1px;
  height: 22px;
  background: #d6dbe3;
}
@media (min-width: 960px) {
  .login-hero {
    display: flex;
  }
}
