/* Visual audit 2026-08-03: shared alignment, counter, control, and dark-menu guards. */
.layout.os-layout-v10 .workspace-tab {
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
}

.layout.os-layout-v10 .workspace-tab .icon {
  grid-row: 1;
  align-self: center;
}

.layout.os-layout-v10 .workspace-tab > span {
  align-self: center;
  line-height: 1.1;
}

.layout.os-layout-v10 .dashboss-range button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.layout.os-layout-v10 .dashboss-date-trigger {
  box-sizing: border-box;
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: center;
  row-gap: 2px;
  padding: 4px 12px;
}

.layout.os-layout-v10 .dashboss-date-trigger strong,
.layout.os-layout-v10 .dashboss-date-trigger span {
  display: block;
  margin: 0;
  line-height: 1.08;
}

.ui-count-badge,
.workspace-filter-chip .ui-count-badge,
.inbox-person-item .ui-count-badge,
.channel-meta .ui-count-badge {
  box-sizing: border-box;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 11%, transparent);
  color: var(--teal);
  box-shadow: none;
  text-shadow: none;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.workspace-status-filter {
  align-items: center;
}

.workspace-filter-chip {
  box-sizing: border-box;
  min-height: 38px;
  justify-content: space-between;
  gap: 9px;
  padding: 6px 7px 6px 11px;
  box-shadow: none;
  line-height: 1;
  white-space: nowrap;
}

.workspace-filter-chip.active {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 14%, transparent);
}

.workspace-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.workspace-row > .badge {
  box-sizing: border-box;
  min-width: max-content;
  min-height: 24px;
  justify-self: end;
  align-self: center;
  padding: 4px 8px;
  line-height: 1;
  overflow: visible;
}

.inbox-composer-bar {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.inbox-composer-bar > .filter-select {
  flex: 1 1 150px;
  min-width: 120px;
}

.inbox-toggle {
  box-sizing: border-box;
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 40px;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  line-height: 1;
  overflow: visible;
}

.inbox-toggle input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
}

.inbox-toggle span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.layout.os-layout-v10 .content:has(.task-workspace) > .page-header .module-tag {
  margin: 0;
}

.layout.os-layout-v10 .content:has(.task-workspace) > .page-header > div:first-child {
  align-content: center;
}

.layout.os-layout-v10 .task-card-actions {
  min-height: 36px;
  gap: 6px;
  overflow: visible;
}

.layout.os-layout-v10 .task-card-actions .btn {
  box-sizing: border-box;
  min-height: 36px;
  height: 36px;
  gap: 4px;
  padding: 0 7px;
  overflow: visible;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.layout.os-layout-v10 .task-card-actions .btn .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] select,
html[data-theme="dark"] select option,
html[data-theme="dark"] select optgroup {
  color-scheme: dark;
  color: #f4f7ff;
  background-color: #0b1125;
  text-shadow: none;
}

html[data-theme="dark"] select {
  border-color: rgba(164, 191, 238, 0.28);
}

html[data-theme="dark"] select:focus-visible {
  outline: 2px solid rgba(122, 162, 255, 0.72);
  outline-offset: 2px;
  border-color: rgba(122, 162, 255, 0.78);
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.14);
}

html[data-theme="dark"] select option:checked {
  color: #ffffff;
  background: #24489a linear-gradient(0deg, #24489a 0%, #24489a 100%);
}

html[data-theme="dark"] select option:disabled,
html[data-theme="dark"] select optgroup:disabled {
  color: #72809d;
}

@media (max-width: 640px) {
  .workspace-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px;
  }

  .workspace-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .workspace-status-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-filter-chip {
    width: 100%;
  }

  .inbox-composer-bar > .filter-select {
    flex-basis: 100%;
  }
}

/* Recent task work: shared across Lite and Pro, independent of board paging. */
.task-recent-panel { background: var(--panel, #fff); border: 1px solid #dce4f2; border-radius: 14px; padding: 16px; margin: 12px 0 18px; }
.task-recent-heading, .task-recent-results-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.task-recent-heading > div:first-child { display: grid; gap: 4px; }
.task-recent-heading small, .task-recent-note, .task-recent-row small { color: #5d6d87; font-size: 11px; }
.task-recent-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.task-recent-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 8px; }
.task-recent-count { display: flex; align-items: center; gap: 10px; padding: 12px; background: #f6f8fc; border: 1px solid #e1e7f1; border-radius: 10px; color: #23344d; text-align: left; cursor: pointer; }
.task-recent-count strong { font-size: 24px; line-height: 1; }
.task-recent-count.active, .task-recent-count:hover { border-color: #244cdb; background: #edf2ff; }
.task-recent-results { margin-top: 14px; border-top: 1px solid #e1e7f1; padding-top: 12px; }
.task-recent-row { width: 100%; display: flex; justify-content: space-between; gap: 14px; border: 0; border-bottom: 1px solid #e9edf5; background: transparent; text-align: left; padding: 12px 0; cursor: pointer; color: inherit; }
.task-recent-row:hover { background: #f6f8fc; }
.task-recent-row > span { display: grid; gap: 6px; min-width: 0; }
.task-recent-row > span:last-child { justify-items: end; flex-shrink: 0; }
.task-recent-row strong { overflow-wrap: anywhere; }
.task-recent-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; }
.task-card > .task-recent-badges:empty { display: none; }
@media (max-width: 600px) { .task-recent-count { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; font-size: 12px; } .task-recent-panel { padding: 12px; } }
.finance-document-input { margin-top: 16px; padding: 14px; border: 1px dashed #a5b6d7; background: #f6f8fd; border-radius: 10px; }
.finance-document-input input[type="file"] { max-width: 100%; width: 100%; padding: 8px; }
.finance-document-panel { margin-top: 16px; }
.finance-document-panel .file-row-actions { display: flex; gap: 6px; }
