/* 9AM source component layouts. */
.col-reset,
.addcol-btn {
  border: 0;
}

.add-row-inline,
.cycle-add {
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
}

.add-row-inline:hover,
.cycle-add:hover {
  background: var(--surface-hover);
  border: 0;
}

.view-tab.active,
.customize-tab.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.timeline-bar,
.gantt-bar-project,
.cal-bar,
.cal-task,
.cal-undated-chip {
  background: var(--surface-2) !important;
  color: var(--ink-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-control);
  font-weight: 500;
}

.timeline-bar.InProgress,
.gantt-bar-project.InProgress,
.cal-bar.InProgress,
.cal-task.InProgress,
.cal-undated-chip.InProgress {
  background: var(--primary-soft) !important;
  color: var(--accent-ink) !important;
}

.timeline-bar .cell-cal-icon {
  color: currentColor !important;
}

input[type="checkbox"] {
  border-radius: var(--radius-control);
}

.field input,
.field select,
.field textarea {
  border: 0;
  background: var(--field-bg);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: var(--surface);
}

.topbar-search {
  border: 0;
  background: var(--field-bg);
}

.topbar-search:focus-within {
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.avatar {
  border-radius: var(--radius-control);
}

.avatar.sm {
  border-radius: var(--radius-control);
}

.avatar.lg {
  border-radius: var(--radius-dialog);
}

.avatar img {
  border-radius: inherit;
}

.sidebar {
  background: var(--surface);
}

.item-open {
  color: var(--ink);
  cursor: inherit;
}

.item-open:hover {
  background: transparent;
  text-decoration: none;
}

.sheet-row.is-overdue td:not(.status-cell):not(.timeline-cell),
.sheet-row.is-overdue .item-open,
.sheet-row.is-overdue .cell-clip,
.sheet-row.is-overdue .mw-board {
  color: var(--ink);
}

.task-count {
  border-radius: var(--radius-pill);
  min-width: 18px;
  height: 18px;
  padding: 0 var(--space-1);
}

.board-count,
.nav-board-count {
  border-radius: var(--radius-pill);
}

.avatar-empty {
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface-2);
}

.person-rollup .is-owner {
  box-shadow: none;
}

.filter-panel {
  border: 0;
  box-shadow: var(--shadow-pop);
  width: 288px;
}

.filter-panel .fp-row {
  width: 100%;
}

.filter-panel .fp-row .dd {
  width: 100%;
  display: block;
}

.filter-panel .fp-row .dd .dd-toggle,
.filter-panel .fp-row .input,
.filter-panel .fp-row select {
  width: 100% !important;
  box-sizing: border-box;
  min-height: var(--control-h);
  padding: 0 var(--space-3);
  background: var(--field-bg) !important;
  border: 0 !important;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.filter-panel .fp-row .dd .dd-toggle:hover {
  background: var(--surface-hover) !important;
}

.fp-clear {
  color: var(--accent-ink);
}

.sub-name-input {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-2);
}

.mw-open {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink-2);
}

.settings-section {
  gap: var(--space-2);
}

.settings-account-row {
  margin-bottom: var(--space-3);
}

.settings-row,
.settings-action {
  width: 100%;
  min-height: 46px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--text-body);
  font-weight: 540;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  cursor: pointer;
}

.settings-action:hover {
  background: var(--surface-hover);
}

.settings-action.danger {
  color: var(--danger-ink);
}

.settings-action.danger:hover {
  background: var(--danger-soft);
}

.config-group {
  padding: var(--space-2) 0 var(--space-4);
}

.config-list {
  margin-bottom: var(--space-2);
}

#addStatusBtn,
#addTypeLibBtn {
  margin-top: var(--space-2);
}

.invoice-page {
  color: var(--doc-ink);
}

.invoice-print-area .invoice-label,
.invoice-live-preview .invoice-label,
.invoice-print-area .invoice-label-secondary,
.invoice-live-preview .invoice-label-secondary,
.invoice-print-area .invoice-value,
.invoice-live-preview .invoice-value,
.invoice-print-area .invoice-subvalue,
.invoice-live-preview .invoice-subvalue,
.invoice-print-area .invoice-inline-label,
.invoice-live-preview .invoice-inline-label,
.invoice-message {
  color: var(--doc-ink);
}

.invoice-hero,
.invoice-message,
.print-row-head {
  background: var(--doc-surface);
}

.print-row {
  border-bottom-color: var(--doc-line);
}

.print-row .cell {
  border-right-color: var(--doc-line);
}

.print-row-head .cell {
  color: var(--doc-muted);
}

.brand-logo {
  font-weight: 700;
}

.ic-title-btn,
.ic-title-input {
  font-weight: 650;
}

.nav-badge,
.icon-btn.has-unread::after,
.cycle-count,
.bulk-count,
.group-total,
.collector-total,
.discussion-head {
  font-weight: 600;
}

.invoice-brand,
.invoice-print-area .invoice-label,
.invoice-live-preview .invoice-label,
.invoice-print-area .invoice-inline-label,
.invoice-live-preview .invoice-inline-label,
.invoice-print-area .invoice-value,
.invoice-live-preview .invoice-value,
.print-row-head .cell,
.invoiced-by,
.total-row strong,
.balance-due,
.balance-due strong {
  font-weight: 700;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="option"]:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.th-sort {
  cursor: pointer;
}

.th-sort:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent);
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tbl {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

.tbl th {
  background: var(--surface-2);
  color: var(--ink-2);
}

.tbl td {
  border-right-color: var(--line-subtle);
}

@media (max-width: 600px) {

.nav-toggle,
.topbar-actions .icon-btn {
  min-width: 44px;
  min-height: 44px;
}

.board-toolbar {
  gap: var(--space-2);
}

}

@media (prefers-reduced-motion: reduce) {

.sidebar,
.nav-scrim {
  transition: none;
}

}

.col-reset-label {
  display: none;
}

@media (max-width: 600px) {

.board-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.board-toolbar .toolbar-spacer {
  display: none;
}

.board-toolbar > .btn,
.board-toolbar > .col-reset {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  justify-content: center;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-control);
}

.board-toolbar > .col-reset {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

.board-toolbar .filter-anchor {
  min-width: 0;
}

.board-toolbar .gantt-zoom {
  grid-column: 1 / -1;
}

.col-reset-label {
  display: inline;
}

}

@media (max-width: 360px) {

.board-toolbar > .btn,
.board-toolbar > .col-reset {
  font-size: var(--text-xs);
}

}

@media (max-width: 820px) {

.drawer-header .btn-icon,
.drawer-header .icon-btn {
  min-width: 44px;
  min-height: 44px;
}

.drawer-panel {
  height: 100dvh;
}

.drawer-body {
  overscroll-behavior: contain;
}

.dd-menu button {
  min-height: 44px;
}

.drawer-footer .btn {
  min-height: 44px;
}

.filter-panel {
  max-width: calc(100vw - 32px);
}

}

@media (max-width: 820px) {

.board-editor {
  max-height: calc(100dvh - 24px);
}

.board-editor-form {
  max-height: calc(100dvh - 24px);
}

.board-editor-head,
.board-editor-actions {
  flex-shrink: 0;
}

.board-editor-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.board-editor-head .btn,
.board-editor-actions .btn {
  min-height: 44px;
  min-width: 44px;
}

.board-swatch,
.board-icon-preset {
  width: 44px;
  height: 44px;
}

.board-icon-presets {
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
}

}

.avatar,
.type-chip {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}

.timeline-bar.InProgress {
  background: var(--primary-soft) !important;
  color: var(--accent-ink) !important;
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  vertical-align: middle;
}

.col-reset {
  border-radius: var(--radius-control);
  gap: var(--space-2);
  font-weight: 500;
}

.col-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-h);
}

.col-reset {
  min-width: var(--control-h);
}

.board-item.active .board-pick {
  background: var(--surface-2);
  color: var(--ink);
}

.board-edit {
  border-radius: var(--radius-control);
}

.topbar-title {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.topbar {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-xs);
  overflow: visible;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card-sub,
.topbar-eyebrow,
.metric-label {
  color: var(--muted);
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: var(--radius-panel);
}

.metric:hover {
  transform: none;
  box-shadow: var(--shadow-xs);
}

.metric-accent,
.metric-accent:hover {
  background: var(--primary-soft);
}

.metric-accent .metric-label,
.metric-accent .metric-sub {
  color: var(--accent-ink);
}

.board-toolbar {
  padding-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.group-header-inner {
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 42px;
}

.group-header .group-title {
  font-weight: 600;
}

.group-total {
  font-size: var(--text-xs);
  color: var(--muted);
}

.group-add-row .add-row-inline {
  background: transparent;
  color: var(--muted);
  font-weight: 400;
}

.group-add-row .add-row-inline:hover {
  background: var(--surface-hover);
  color: var(--ink);
}

.pill,
.task-status-pill,
.type-chip {
  font-size: var(--text-xs);
  min-height: 24px;
}

.avatar {
  border: 1px solid var(--line);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent-ring);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.filter-panel .fp-row .dd .dd-toggle,
.filter-panel .fp-row .input,
.filter-panel .fp-row select {
  background: var(--surface) !important;
  border: 1px solid var(--line-strong) !important;
}

.dd-menu,
.cell-picker,
.filter-panel,
.account-menu,
.cols-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: var(--space-2);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.drawer-panel,
.ic-panel {
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.drawer-header,
.drawer-footer,
.board-editor-head,
.board-editor-actions {
  background: var(--surface);
}

.drawer-title {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.board-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius-dialog);
  box-shadow: var(--shadow-overlay);
}

.search-empty,
.empty-state {
  color: var(--muted);
  padding: var(--space-10) var(--space-5);
  text-align: center;
}

.empty-state.small {
  padding: var(--space-5);
}

.inbox-row {
  border-radius: var(--radius-control);
}

.inbox-row:focus-within .inbox-actions {
  opacity: 1;
}

.toast {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-panel);
}

.bulk-bar {
  left: auto;
  right: 20px;
  bottom: 20px;
  width: min(340px, calc(100vw - 32px));
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-overlay);
}

.bulk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.bulk-actions > .btn {
  grid-column: 1 / -1;
}

.bulk-bar .btn-trash {
  width: 38px;
  height: 38px;
}

@keyframes ui-pop {
from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); }
}

.dd-menu:not([hidden]),
.cell-picker,
.filter-panel:not([hidden]),
.board-editor {
  animation: ui-pop var(--t-fast) var(--ease);
}

@media (max-width: 820px) {

.content {
  padding: var(--space-4) var(--space-4) var(--space-10);
  gap: var(--space-4);
}

.topbar {
  padding: var(--space-3) var(--space-4);
}

.card-header {
  flex-wrap: wrap;
  gap: var(--space-3);
}

.card-actions {
  flex-wrap: wrap;
}

.inbox-actions {
  opacity: 1;
}

.inbox-act,
.board-edit,
.task-del,
.config-del {
  min-height: 44px;
  min-width: 44px;
}

.bulk-bar {
  right: 16px;
  bottom: 16px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

}

@media (max-width: 600px) {

.topbar-title {
  font-size: 21px;
}

.metric-grid {
  grid-template-columns: 1fr;
}

.drawer-footer {
  flex-wrap: wrap;
  gap: var(--space-3);
}

.drawer-footer-right {
  flex: 1;
  justify-content: flex-end;
}

}

@media (prefers-reduced-motion: reduce) {

*,
*::before,
*::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

}

@media (max-width: 600px) {

:is([data-screen="contacts"], [data-screen="collector"]) .tbl,
:is([data-screen="contacts"], [data-screen="collector"]) .tbl tbody {
  display: block;
  width: 100%;
}

:is([data-screen="contacts"], [data-screen="collector"]) .tbl colgroup,
:is([data-screen="contacts"], [data-screen="collector"]) .tbl thead {
  display: none;
}

:is([data-screen="contacts"], [data-screen="collector"]) .tbl tr {
  display: block;
  margin: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

:is([data-screen="contacts"], [data-screen="collector"]) .tbl td {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-right: 0;
  overflow-wrap: anywhere;
  height: auto;
  min-height: var(--cell-row-h);
  align-items: center;
  overflow: visible;
}

:is([data-screen="contacts"], [data-screen="collector"]) .tbl td[data-label]::before {
  content: attr(data-label);
  color: var(--muted);
  flex: 0 0 64px;
  font-size: var(--text-xs);
}

:is([data-screen="contacts"], [data-screen="collector"]) .tbl .actions {
  justify-content: flex-end;
}

:is([data-screen="contacts"], [data-screen="collector"]) .contact-row-actions .btn {
  min-height: 44px;
}

}

#authGate {
  background: var(--bg);
}

#authGate .gate-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

#authGate .gate-hero {
  background: var(--ink);
  color: var(--surface);
}

#authGate .gate-wm {
  color: var(--surface);
}

#authGate .gate-wm .gate-dot {
  color: var(--primary);
}

#authGate .gate-tagline {
  color: var(--surface);
  opacity: 0.8;
}

#authGate #gateSubmit {
  background: var(--ink);
  color: var(--surface);
  min-height: 44px;
}

#authGate #gateSubmit:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ink) 88%, var(--surface));
}

#authGate .gate-demo {
  background: var(--surface-2);
  color: var(--ink);
  border-radius: var(--radius-control);
}

#authGate .gate-row button {
  min-height: 44px;
}

#authGate .gate-card input {
  font-size: var(--text-lg);
  min-height: 44px;
}

@media (max-width: 820px) {

.ic-head-tools .btn-icon,
.ic-nav {
  min-width: 44px;
  min-height: 44px;
}

}

@media (max-width: 600px) {

.ic-field {
  grid-template-columns: 84px minmax(0, 1fr);
  gap: var(--space-3);
}

.ic-field-label {
  font-size: var(--text-xs);
  font-weight: 500;
}

.ic-dates {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}

.ic-dates-sep {
  display: none;
}

.ic-dates .dp,
.ic-dates .date-picker,
.ic-dates .dp-toggle {
  width: 100%;
  min-width: 0;
}

.ic-dates input {
  min-width: 0;
  width: 100%;
}

.ic-header {
  padding: var(--space-4) var(--space-4);
}

.ic-head-main {
  min-width: 0;
}

}

@media (max-width: 820px) {

.cal-nav-btn,
.mw-cal-nav,
.dp-nav {
  min-width: 44px;
  min-height: 44px;
}

}

@media (max-width: 600px) {

.invoice-top-row {
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

.invoice-top-row > * {
  max-width: 100%;
}

.invoice-top-row .field,
.invoice-top-row .dd {
  min-width: 0;
}

.sidebar .board-pick {
  min-height: 44px;
}

}

.customize-tabs,
.settings-tabs {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

@media (max-width: 600px) {

.customize-tabs {
  flex-wrap: wrap;
}

.customize-tabs .customize-tab {
  min-height: 44px;
}

}

.sidebar {
  padding: var(--space-1) 0 var(--space-2);
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  transition: width 300ms var(--beautiful-ease);
  overflow: visible;
}

.sidebar-brand {
  height: 40px;
  min-height: 40px;
  padding: var(--space-1) var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-home {
  padding: 0 var(--space-2);
  height: 32px;
}

.brand-logo {
  font-size: 19px;
}

.sidebar-collapse-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--faint);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-collapse-control:hover {
  background: var(--line);
  color: var(--ink);
}

.sidebar-nav {
  position: relative;
  padding: var(--space-2);
  gap: var(--space-1);
  overflow-x: hidden;
}

.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-2);
  width: 100%;
  min-height: 32px;
  height: 32px;
  margin: 0;
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-md);
  font-weight: 500;
  box-shadow: none;
  transition: color 150ms, transform 150ms;
}

.nav-item.active {
  background: var(--line);
  color: var(--ink);
  box-shadow: none;
}

.nav-item:hover {
  background: transparent;
  color: var(--ink);
}

.nav-item:active,
.board-pick:active {
  transform: scale(.98);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: inherit;
}

.nav-item > span,
.account-who,
.board-name {
  transition: opacity 150ms, transform 150ms var(--beautiful-ease);
  white-space: nowrap;
}

.beautiful-glide {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  top: 0;
  opacity: 0;
  border-radius: var(--radius-control);
  background: var(--line);
  transition: transform 180ms var(--beautiful-ease), height 180ms, width 180ms, opacity 100ms;
}

.sidebar-nav:has(.beautiful-glide[style*="opacity: 1"]) .nav-item.active {
  background: transparent;
}

.boards-nav {
  margin: var(--space-4) 0;
  padding: 0;
  border: 0;
}

.boards-head {
  padding: 0 var(--space-2) var(--space-1);
  gap: var(--space-1);
  min-height: 32px;
}

.boards-toggle {
  flex: 1;
  justify-content: flex-start;
  color: var(--faint);
  font-size: var(--text-xs);
}

.boards-search,
.boards-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: var(--space-1);
  border: 0;
  background: transparent;
  color: var(--faint);
  border-radius: var(--radius-control);
  cursor: pointer;
}

.boards-search:hover,
.boards-add:hover {
  background: var(--line);
}

.boards-search-input {
  width: calc(100% - 16px);
  margin: 0 var(--space-2) var(--space-2);
  padding: var(--space-2) var(--space-2);
  background: var(--field-bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

.board-item {
  position: relative;
  z-index: 1;
  margin: var(--space-1) 0;
  border-radius: var(--radius-control);
}

.board-pick {
  padding: var(--space-1) var(--space-2);
  min-height: 32px;
  font-size: var(--text-md);
}

.board-item.active {
  background: var(--line);
  box-shadow: none;
}

.board-item:hover,
.board-pick:hover {
  background: transparent;
}

.sidebar-account {
  border-top: 1px solid var(--line);
  margin: 0 var(--space-2);
  padding-top: var(--space-3);
}

.account-chip {
  padding: var(--space-2) var(--space-2);
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--line);
  box-shadow: none;
}

.account-email {
  display: none;
}

@media(min-width:821px) {

body.sidebar-is-collapsed {
  --sidebar-w: 52px;
}

.sidebar[data-sidebar-collapsed="true"] {
  width: 52px;
}

[data-sidebar-collapsed="true"] .brand-home,
[data-sidebar-collapsed="true"] .boards-nav,
[data-sidebar-collapsed="true"] .account-who,
[data-sidebar-collapsed="true"] .account-caret,
[data-sidebar-collapsed="true"] .sidebar-resizer {
  display: none;
}

[data-sidebar-collapsed="true"] .sidebar-brand {
  padding: var(--space-1) var(--space-3);
}

[data-sidebar-collapsed="true"] .sidebar-nav {
  padding: var(--space-2);
}

[data-sidebar-collapsed="true"] .nav-item {
  width: 36px;
  padding: var(--space-1) var(--space-2);
}

[data-sidebar-collapsed="true"] .nav-item > span {
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  width: 0;
}

[data-sidebar-collapsed="true"] .sidebar-account {
  margin: 0 var(--space-2);
}

[data-sidebar-collapsed="true"] .account-chip {
  padding: var(--space-1);
}

}

#workspaceCard {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.status-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 -4px var(--space-1);
  padding: var(--space-1);
  gap: var(--space-1);
  scrollbar-width: none;
}

.status-tabs .tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-shrink: 0;
  min-height: 26px;
  height: 26px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: background-color 200ms, box-shadow 200ms, color 200ms;
}

.status-tabs .tab:hover {
  background: var(--surface-hover);
}

.status-tabs .tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-xs);
}

.status-tabs .filter-count-chip {
  padding: 0 var(--space-1);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--faint);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.status-tabs .tab.active .filter-count-chip {
  background: var(--beautiful-field);
  color: var(--ink-2);
}

.filter-dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: var(--ink-2);
}

.filter-dot.is-progress {
  background: var(--primary);
}

.table-wrap,
.mw-table-wrap {
  padding: 0;
  border: 0;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--beautiful-card-shadow);
  overflow: auto;
}

#projectTable,
.mw-table {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}

#projectTable th,
#projectTable td,
.mw-table th,
.mw-table td {
  height: 40px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-right: 1px solid var(--beautiful-grid);
  border-bottom: 1px solid var(--beautiful-grid);
  box-shadow: none;
  font-size: var(--text-sm);
  background: transparent;
}

#projectTable th,
.mw-table th {
  color: var(--ink-2);
  font-size: var(--text-xs);
  font-weight: 500;
}

#projectTable .th-ico,
.mw-table .th-ico {
  display: none;
}

#projectTable tbody tr:hover td,
.mw-table tbody tr:hover td {
  background: var(--surface-hover);
}

#projectTable td[data-field="projectCode"] {
  font-weight: 500;
}

#projectTable td.is-active,
.sub-cell.is-active {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.status-pill,
.task-status-pill {
  min-height: 23px;
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-2);
  font-weight: 500;
}

.search-overlay {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh var(--space-4) var(--space-4);
  background: var(--scrim);
}

.search-overlay[hidden] {
  display: none;
}

.search-panel {
  position: relative;
  inset: auto;
  width: min(480px,100%);
  height: auto;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-lg);
  transform: translateY(10px) scale(.985);
  transition: transform 200ms var(--beautiful-ease), opacity 200ms;
}

.search-overlay.is-open .search-panel {
  transform: translateY(0) scale(1);
}

.search-head {
  height: 44px;
  min-height: 44px;
  padding: 0 var(--space-3);
  gap: var(--space-2);
  border-bottom: 1px solid var(--line);
}

.search-head svg {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.search-input {
  font-size: var(--text-sm);
  min-width: 0;
}

.search-head .btn {
  height: 26px;
  min-height: 26px;
  width: 26px;
  padding: var(--space-1);
}

.search-results {
  position: relative;
  padding: var(--space-1);
  overflow-y: auto;
}

.search-result {
  position: relative;
  z-index: 1;
  min-height: 36px;
  padding: var(--space-2) var(--space-2);
  gap: var(--space-2);
  border-radius: var(--radius-control);
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: var(--text-sm);
}

.search-result:hover {
  background: transparent;
}

.search-result.active {
  background: var(--beautiful-field);
}

.search-section-title {
  padding: var(--space-2);
  font-size: var(--text-xs);
  color: var(--faint);
}

.sr-name {
  font-size: var(--text-sm);
  font-weight: 500;
}

.sr-meta {
  font-size: var(--text-xs);
  color: var(--ink-2);
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-8) var(--space-4);
  color: var(--faint);
  font-size: var(--text-xs);
}

.search-empty strong {
  font-size: var(--text-sm);
  color: var(--ink);
  font-weight: 500;
}

.search-clear {
  align-self: flex-end;
  margin: var(--space-1) var(--space-3) 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-xs);
  cursor: pointer;
}

.confirm-modal {
  position: fixed;
  max-width: calc(100vw - 32px);
  width: 320px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-panel);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--beautiful-card-shadow);
}

.confirm-modal[open] {
  animation: beautiful-fade-up 380ms var(--beautiful-ease) both;
}

.confirm-modal-form {
  position: relative;
  padding: var(--space-4) 0 0;
}

.confirm-modal-message {
  margin: 0;
  padding: 0 42px var(--space-5) var(--space-4);
  font-size: var(--text-md);
  line-height: 1.5;
  font-weight: 500;
}

.approval-dismiss {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  border-radius: var(--radius-control);
  width: 24px;
  height: 24px;
  background: transparent;
  color: var(--faint);
  font-size: 18px;
  cursor: pointer;
}

.approval-dismiss:hover {
  background: var(--surface-hover);
}

.confirm-modal-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3);
  border-top: 1px solid var(--line);
}

.approval-step {
  flex: 1;
  color: var(--faint);
  font-size: var(--text-xs);
}

.confirm-modal-actions .btn {
  min-height: 28px;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  border: 0;
  box-shadow: none;
}

#confirmModalOk {
  background: var(--ink);
  color: var(--surface);
}

.ic-comments,
.discussion {
  padding: 0;
  margin: var(--space-4);
  border: 0;
  border-radius: var(--radius-dialog);
  background: var(--surface);
  box-shadow: var(--beautiful-card-shadow);
  overflow: hidden;
}

.ic-section-title:has(+ .ic-comment-list),
.discussion-head {
  margin: 0;
  padding: var(--space-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  font-weight: 500;
}

.comment-list,
.ic-comment-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
  min-height: 120px;
  max-height: 340px;
  overflow-y: auto;
}

.comment {
  display: flex;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  gap: 0;
  animation: beautiful-fade-up 400ms var(--beautiful-ease) both;
}

.comment > .avatar,
.comment > .user-avatar {
  display: none;
}

.comment-body {
  min-width: 0;
  width: 100%;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
  font-size: var(--text-xs);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.comment-meta strong {
  font-weight: 500;
  color: var(--ink);
}

.comment-meta > span {
  color: var(--ink-2);
  font-size: var(--text-xs);
}

.comment-text {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment.is-mine {
  align-self: flex-end;
  width: auto;
  max-width: 85%;
  padding-left: var(--space-8);
}

.comment.is-mine .comment-text {
  border-radius: var(--radius-panel);
  background: var(--beautiful-field);
  padding: var(--space-2) var(--space-3);
}

.comment.is-mine .comment-meta {
  justify-content: flex-end;
}

.comment-actions {
  margin-top: var(--space-1);
}

.comment.is-mine .comment-actions {
  justify-content: flex-end;
}

.ic-composer,
.comment-composer {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--beautiful-field);
  box-shadow: var(--shadow-xs);
}

.ic-composer:focus-within,
.comment-composer:focus-within {
  border-color: var(--line-strong);
}

.ic-composer input,
.comment-composer input {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 24px;
  font-size: var(--text-sm);
  box-shadow: none;
  outline: none;
}

.ic-composer .btn,
.comment-composer .btn {
  align-self: flex-end;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  height: 28px;
  width: 28px;
  padding: 0;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--surface);
  font-size: 20px;
}

.ic-composer .btn:disabled,
.comment-composer .btn:disabled {
  background: var(--line-strong);
  color: var(--ink-2);
  opacity: 1;
}

.beautiful-loading {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
}

.pixel-grid {
  display: grid;
  grid-template-columns: repeat(3,4px);
  gap: 1.5px;
  flex-shrink: 0;
}

.pixel-grid i {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--ink);
  opacity: .15;
  animation: beautiful-pixel 650ms ease-in-out var(--pixel-delay) infinite;
}

.loading-label {
  font-size: var(--text-sm);
  font-weight: 500;
  background: linear-gradient(90deg,var(--faint) 35%,var(--ink) 50%,var(--faint) 65%);
  background-size: 200% 100%;
  background-clip: text;
  color: transparent;
  animation: beautiful-shimmer 1.4s linear infinite;
}

.loading-elapsed {
  font-family: monospace;
  font-size: var(--text-xs);
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

@keyframes beautiful-pixel {
0%,100% {opacity:.15} 18%,42% {opacity:1} 62% {opacity:.15}
}

@keyframes beautiful-shimmer {
from { background-position: 100% 0; } to { background-position: -100% 0; }
}

@keyframes beautiful-fade-up {
from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); }
}

@media(max-width:820px) {

.sidebar-collapse-control {
  display: none;
}

.nav-item,
.board-pick {
  min-height: 44px;
  height: auto;
}

.status-tabs .tab {
  min-height: 44px;
  height: 44px;
}

.search-head {
  min-height: 48px;
}

.search-head .btn,
.approval-dismiss {
  min-height: 44px;
  min-width: 44px;
}

.confirm-modal-message {
  padding-right: 58px;
}

.confirm-modal-actions .btn {
  min-height: 44px;
}

.ic-composer .btn,
.comment-composer .btn {
  height: 44px;
  width: 44px;
}

}

@media(prefers-reduced-motion:reduce) {

.pixel-grid i {
  animation: none;
}

.loading-label {
  animation: none;
  background: none;
  color: var(--ink-2);
}

.comment,
.confirm-modal[open] {
  animation: none;
}

.sidebar,
.nav-item,
.beautiful-glide,
.search-panel {
  transition: none;
}

}

#workspaceCard .card-header {
  padding: 0;
}

#workspaceCard .table-toolbar {
  padding: var(--space-3) 0;
}

#projectTable {
  width: 100%;
  border: 0;
  border-radius: 0;
}

#projectTable .col-item {
  width: auto;
}

#projectTable .col-client {
  width: 24%;
}

#projectTable .col-status {
  width: 20%;
}

#projectTable .col-due {
  width: 20%;
}

#projectTable .col-addcol {
  width: 40px;
}

#projectTable .hide-col-placeholder {
  display: none;
}

#projectTable th {
  background: var(--surface);
}

#projectTable th:nth-child(2) {
  width: 32%;
}

#projectTable td:nth-child(2) {
  font-weight: 500;
}

.comment > :first-child:not(.comment-body) {
  display: none;
}

.beautiful-chat-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border-bottom: 1px solid var(--line);
}

.beautiful-chat-tabs button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-sm);
  border-radius: var(--radius-control);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
}

.beautiful-chat-tabs button[aria-pressed="true"] {
  background: var(--beautiful-field);
  color: var(--ink);
}

[data-chat-mode="activity"] .comment:not(.is-log) {
  display: none;
}

@media(max-width:820px) {

.beautiful-chat-tabs button {
  min-height: 44px;
}

}

#projectTable {
  table-layout: fixed;
}

#projectTable.hide-col-client .col-client,
#projectTable.hide-col-type .col-type,
#projectTable.hide-col-person .col-person,
#projectTable.hide-col-status .col-status,
#projectTable.hide-col-owed .col-money,
#projectTable.hide-col-due .col-due,
#projectTable.hide-col-timeline .col-timeline {
  width: 0 !important;
}

@media(max-width:600px) {

#projectTable {
  min-width: 620px;
}

#workspaceCard .table-wrap {
  max-width: 100%;
}

#projectTable th,
#projectTable td {
  height: 48px;
}

#projectTable .col-resizer {
  display: none;
}

.mw-table {
  min-width: 560px;
}

}

@media(max-width:600px) {

#projectTable .item-cell,
#projectTable .select-cell {
  position: relative;
  left: auto;
  box-shadow: none;
}

#projectTable thead th:nth-child(1),
#projectTable thead th:nth-child(2) {
  left: auto;
  box-shadow: none;
  background: var(--surface);
}

#projectTable .cell-clip {
  white-space: nowrap;
  overflow: hidden;
  font-weight: 500;
}

#projectColResetBtn {
  display: none;
}

}

[data-sidebar-collapsed="true"] .sidebar-collapse-control svg {
  transform: rotate(180deg);
}

[data-chat-mode="activity"] .comment-list:not(:has(.is-log))::after {
  content: "No activity yet.";
  font-size: var(--text-sm);
  color: var(--faint);
  padding: var(--space-5) var(--space-3);
}

#projectTable.hide-col-client th[data-sort-field="client"],
#projectTable.hide-col-client td[data-field="client"] {
  visibility: hidden;
}

#projectTable.hide-col-type th[data-sort-field="deliverable"],
#projectTable.hide-col-type td[data-field="deliverable"] {
  visibility: hidden;
}

#projectTable.hide-col-person th[data-sort-field="person"],
#projectTable.hide-col-person td[data-field="person"] {
  visibility: hidden;
}

#projectTable.hide-col-status th[data-sort-field="status"],
#projectTable.hide-col-status td[data-field="status"] {
  visibility: hidden;
}

#projectTable.hide-col-owed th[data-sort-field="owed"],
#projectTable.hide-col-owed td[data-field="owed"] {
  visibility: hidden;
}

#projectTable.hide-col-timeline th[data-sort-field="duration"],
#projectTable.hide-col-timeline td[data-field="duration"] {
  visibility: hidden;
}

#projectTable.hide-col-due th[data-sort-field="endDate"],
#projectTable.hide-col-due td[data-field="endDate"] {
  visibility: hidden;
}

.due-wrap > .cell-cal-icon {
  display: none;
}

#myWorkCard {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.mw-table {
  width: 100%;
  table-layout: fixed;
  border: 0;
}

.mw-table .mw-col-task {
  width: auto;
}

.mw-table .mw-col-date {
  width: 22%;
}

.mw-table .mw-col-status {
  width: 24%;
}

.mw-table .mw-col-item {
  width: 26%;
}

.mw-table .mw-col-fill {
  width: 24px;
}

.mw-table th {
  background: var(--surface);
}

/* Toolbar Refresh button: spin the icon while a manual refresh runs. */
.data-refresh.is-syncing .ui-icon {
  animation: data-refresh-spin 0.8s linear infinite;
}

@keyframes data-refresh-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .data-refresh.is-syncing .ui-icon { animation: none; opacity: 0.5; }
}

@media (max-width: 600px) {
  #dataRefreshBtn {
    flex: 0 0 auto;
    width: var(--touch-target);
    min-width: var(--touch-target);
    border: 0;
    background: transparent;
  }

  #dataRefreshBtn .col-reset-label {
    display: none;
  }
}

.board-symbol {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  flex: none;
  vertical-align: -.15em;
  object-fit: contain;
  line-height: 1;
}
#topbarTitle > .board-symbol,
.sr-board > .board-symbol { margin-inline-end: var(--space-2); }
.board-icon-preview { font-size: var(--text-xl); }
.board-icon-note, .board-icon-feedback { color: var(--muted); font-size: var(--text-xs); }
.board-icon-preset[aria-pressed="true"] { border-color: var(--accent); background: var(--primary-soft); }
