/* ============================================================
   Projects — dense professional directory
   Admin-aligned navy, cool gray, green + warm-neutral accents
   ============================================================ */

body[data-page="projects"] {
  --pj-ink: #18212f;
  --pj-ink-soft: #404b5b;
  --pj-muted: #6a7484;
  --pj-subtle: #8993a2;
  --pj-line: #e5e8ed;
  --pj-line-strong: #d9dde4;
  --pj-bg: #f3f4f6;
  --pj-surface: #ffffff;
  --pj-surface-soft: #f7f8fa;
  --pj-hover: #f7f8fa;

  --pj-gold: #233a5a;
  --pj-gold-strong: #192e4a;
  --pj-gold-ink: #ffffff;
  --pj-gold-soft: #eef2f7;

  --pj-cobalt: #38506f;
  --pj-cobalt-strong: #233a5a;
  --pj-cobalt-soft: #eef2f7;

  --pj-green: #24815d;
  --pj-green-soft: #ecf5f0;
  --pj-red: #b74b52;
  --pj-red-strong: #8f3e45;
  --pj-red-soft: #fff8f8;
  --pj-amber: #81643d;
  --pj-amber-soft: #f5f0e8;
  --pj-violet: #81643d;
  --pj-violet-soft: #f5f0e8;

  --pj-radius: 10px;
  --pj-shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --pj-shadow-pop: 0 8px 24px -6px rgba(16, 24, 40, 0.18), 0 2px 6px rgba(16, 24, 40, 0.08);
  --pj-shadow-modal: 0 24px 64px -12px rgba(16, 24, 40, 0.28), 0 4px 12px rgba(16, 24, 40, 0.1);

  min-height: 100vh;
  background: var(--pj-bg);
  color: var(--pj-ink);
  font-family: "Inter", "DM Sans", "Segoe UI", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

body[data-page="projects"] button,
body[data-page="projects"] input,
body[data-page="projects"] select,
body[data-page="projects"] textarea {
  font-family: inherit;
  font-size: inherit;
}

body[data-page="projects"] [hidden] {
  display: none !important;
}

body[data-page="projects"] .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body[data-page="projects"] button:focus-visible,
body[data-page="projects"] input:focus-visible,
body[data-page="projects"] select:focus-visible,
body[data-page="projects"] textarea:focus-visible,
body[data-page="projects"] a:focus-visible {
  outline: 2px solid var(--pj-cobalt);
  outline-offset: 2px;
}

/* ---------- page scaffold ---------- */

body[data-page="projects"] .page-content.projects-directory-page {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 48px;
  background: transparent;
  align-content: start;
}

body[data-page="projects"] .projects-directory-shell {
  display: grid;
  width: 100%;
  gap: 16px;
  align-content: start;
}

/* ---------- topbar ---------- */

body[data-page="projects"] .projects-topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 2px 2px 0;
}

body[data-page="projects"] .projects-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

body[data-page="projects"] .projects-topbar-title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--pj-ink);
}

body[data-page="projects"] .projects-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e9ebef;
  color: var(--pj-ink-soft);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body[data-page="projects"] .projects-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
}

body[data-page="projects"] .projects-stat {
  display: grid;
  gap: 1px;
  padding: 0 22px;
  border-left: 1px solid var(--pj-line-strong);
}

body[data-page="projects"] .projects-stat:first-child {
  border-left: 0;
}

body[data-page="projects"] .projects-stat dt {
  margin: 0;
  color: var(--pj-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-stat dd {
  margin: 0;
  color: var(--pj-ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ---------- primary / secondary buttons ---------- */

body[data-page="projects"] .projects-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--pj-gold);
  border-radius: 8px;
  background: var(--pj-gold);
  color: var(--pj-gold-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(31, 52, 80, 0.16);
  cursor: pointer;
  transition: filter 120ms ease, box-shadow 120ms ease;
}

body[data-page="projects"] .projects-primary-button:hover:not(:disabled) {
  border-color: var(--pj-gold-strong);
  background: var(--pj-gold-strong);
  filter: none;
  box-shadow: 0 7px 15px rgba(31, 52, 80, 0.18);
}

body[data-page="projects"] .projects-primary-button:active:not(:disabled) {
  filter: none;
  transform: translateY(1px);
}

body[data-page="projects"] .projects-primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body[data-page="projects"] .projects-primary-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

body[data-page="projects"] .projects-modal-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 8px;
  background: var(--pj-surface);
  color: var(--pj-ink-soft);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  box-shadow: var(--pj-shadow-1);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

body[data-page="projects"] .projects-modal-secondary:hover:not(:disabled) {
  background: var(--pj-hover);
  border-color: #b9c0ca;
}

body[data-page="projects"] .projects-modal-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body[data-page="projects"] .projects-modal-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--pj-red);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

body[data-page="projects"] .projects-modal-danger:hover:not(:disabled) {
  background: var(--pj-red-soft);
  border-color: #f0cfcb;
}

body[data-page="projects"] .projects-modal-danger.is-solid {
  border-color: var(--pj-red-strong);
  background: var(--pj-red);
  color: #fff;
}

body[data-page="projects"] .projects-modal-danger.is-solid:hover:not(:disabled) {
  background: var(--pj-red-strong);
}

body[data-page="projects"] .projects-modal-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- workspace panel + toolbar ---------- */

body[data-page="projects"] .projects-directory-panel {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--pj-line);
  border-radius: 12px;
  background: var(--pj-surface);
  box-shadow: var(--pj-shadow-1);
  overflow: hidden;
}

body[data-page="projects"] .projects-directory-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pj-line);
  background: var(--pj-surface);
}

body[data-page="projects"] .projects-directory-search {
  position: relative;
  display: block;
  width: min(320px, 100%);
}

body[data-page="projects"] .projects-directory-search > svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 15px;
  height: 15px;
  color: var(--pj-subtle);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}

body[data-page="projects"] .projects-directory-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 8px;
  background: var(--pj-surface);
  color: var(--pj-ink);
  font-size: 13px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

body[data-page="projects"] .projects-directory-search input::placeholder {
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-search input:focus {
  outline: none;
  border-color: var(--pj-cobalt);
  box-shadow: 0 0 0 3px var(--pj-cobalt-soft);
}

body[data-page="projects"] .projects-directory-filterbar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--pj-line);
  border-radius: 9px;
  background: var(--pj-surface-soft);
}

body[data-page="projects"] .projects-directory-filter-pill {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--pj-muted);
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

body[data-page="projects"] .projects-directory-filter-pill:hover {
  color: var(--pj-ink);
}

body[data-page="projects"] .projects-directory-filter-pill.is-active {
  background: var(--pj-surface);
  color: var(--pj-ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), 0 0 0 1px var(--pj-line);
}

body[data-page="projects"] .projects-directory-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

body[data-page="projects"] .projects-directory-select select {
  height: 34px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 8px;
  background-color: var(--pj-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23667085' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 12px;
  color: var(--pj-ink-soft);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 120ms ease;
}

body[data-page="projects"] .projects-directory-select select:hover {
  border-color: #b9c0ca;
}

body[data-page="projects"] .projects-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--pj-line);
  border-radius: 9px;
  background: var(--pj-surface-soft);
}

body[data-page="projects"] .projects-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--pj-muted);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

body[data-page="projects"] .projects-view-btn:hover {
  color: var(--pj-ink);
}

body[data-page="projects"] .projects-view-btn.is-active {
  background: var(--pj-surface);
  color: var(--pj-ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), 0 0 0 1px var(--pj-line);
}

body[data-page="projects"] .projects-view-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

body[data-page="projects"] .projects-view-btn svg circle,
body[data-page="projects"] .projects-view-btn svg rect {
  fill: none;
}

/* ---------- results / table ---------- */

body[data-page="projects"] .projects-directory-results {
  min-width: 0;
  overflow-x: auto;
}

body[data-page="projects"] .projects-directory-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

body[data-page="projects"] .projects-directory-table thead th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--pj-line);
  background: var(--pj-surface-soft);
  color: var(--pj-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-table thead th:last-child,
body[data-page="projects"] .projects-directory-table thead th.projects-th-number {
  text-align: right;
}

body[data-page="projects"] .projects-directory-row {
  cursor: pointer;
  transition: background-color 100ms ease;
}

body[data-page="projects"] .projects-directory-row:hover {
  background: var(--pj-hover);
}

body[data-page="projects"] .projects-directory-row td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--pj-line);
  vertical-align: middle;
}

body[data-page="projects"] .projects-directory-row:last-child td {
  border-bottom: 0;
}

body[data-page="projects"] .projects-directory-row.is-active-project-row {
  background: linear-gradient(90deg, rgba(35, 58, 90, 0.07), rgba(35, 58, 90, 0.02) 55%, transparent);
  box-shadow: inset 3px 0 0 var(--pj-gold);
}

body[data-page="projects"] .projects-directory-project-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="projects"] .projects-directory-project-cell > strong {
  color: var(--pj-ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 440px;
}

body[data-page="projects"] .projects-directory-project-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--pj-muted);
  font-size: 11.5px;
}

body[data-page="projects"] .projects-directory-project-meta-line > span {
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-tags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

body[data-page="projects"] .projects-directory-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 5px;
  background: #eef0f3;
  color: var(--pj-ink-soft);
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-tag.is-muted {
  background: transparent;
  color: var(--pj-subtle);
  padding: 0;
}

body[data-page="projects"] .projects-directory-cell-text {
  color: var(--pj-ink-soft);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  display: block;
}

body[data-page="projects"] .projects-directory-cell-text.is-empty {
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-estimator-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-estimator-cell i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--pj-cobalt-soft);
  color: var(--pj-cobalt-strong);
  font-size: 10px;
  font-weight: 650;
  font-style: normal;
  letter-spacing: 0.02em;
}

body[data-page="projects"] .projects-directory-estimator-cell.is-empty i {
  background: #eef0f3;
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-estimator-cell span {
  color: var(--pj-ink-soft);
  font-size: 13px;
}

body[data-page="projects"] .projects-directory-estimator-cell.is-empty span {
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-date-cell {
  display: grid;
  gap: 2px;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-date-cell > strong {
  color: var(--pj-ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

body[data-page="projects"] .projects-directory-date-cell > strong:empty::before,
body[data-page="projects"] .projects-directory-date-cell.is-empty > strong {
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-due-pill {
  font-size: 11.5px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-due-pill[data-tone="scheduled"] {
  color: var(--pj-muted);
}

body[data-page="projects"] .projects-directory-due-pill[data-tone="soon"] {
  color: var(--pj-amber);
}

body[data-page="projects"] .projects-directory-due-pill[data-tone="urgent"] {
  color: var(--pj-amber);
  font-weight: 650;
}

body[data-page="projects"] .projects-directory-due-pill[data-tone="overdue"] {
  color: var(--pj-red);
  font-weight: 650;
}

body[data-page="projects"] .projects-directory-number-cell {
  text-align: right;
  color: var(--pj-ink);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-number-cell.is-zero {
  color: var(--pj-subtle);
  font-weight: 500;
}

/* status control */

body[data-page="projects"] .projects-directory-status-dropdown {
  position: relative;
  display: inline-flex;
}

body[data-page="projects"] .projects-directory-status-trigger,
body[data-page="projects"] .projects-directory-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--pj-ink-soft);
  font-size: 12.5px;
  font-weight: 550;
  font-style: normal;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

body[data-page="projects"] .projects-directory-status-pill {
  cursor: default;
}

body[data-page="projects"] .projects-directory-status-trigger::before,
body[data-page="projects"] .projects-directory-status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-status-trigger[data-tone="in-progress"]::before,
body[data-page="projects"] .projects-directory-status-pill[data-tone="in-progress"]::before {
  background: var(--pj-cobalt);
}

body[data-page="projects"] .projects-directory-status-trigger[data-tone="submitted"]::before,
body[data-page="projects"] .projects-directory-status-pill[data-tone="submitted"]::before {
  background: var(--pj-violet);
}

body[data-page="projects"] .projects-directory-status-trigger[data-tone="awarded"]::before,
body[data-page="projects"] .projects-directory-status-pill[data-tone="awarded"]::before {
  background: var(--pj-green);
}

body[data-page="projects"] .projects-directory-status-trigger[data-tone="lost"]::before,
body[data-page="projects"] .projects-directory-status-pill[data-tone="lost"]::before {
  background: var(--pj-red);
}

body[data-page="projects"] .projects-directory-status-trigger[data-tone="canceled"]::before,
body[data-page="projects"] .projects-directory-status-pill[data-tone="canceled"]::before {
  background: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-status-trigger:hover:not(:disabled),
body[data-page="projects"] .projects-directory-status-dropdown.is-open .projects-directory-status-trigger {
  border-color: var(--pj-line-strong);
  background: var(--pj-surface);
}

body[data-page="projects"] .projects-directory-status-trigger:disabled {
  opacity: 0.6;
  cursor: wait;
}

body[data-page="projects"] .projects-directory-status-trigger-chevron {
  display: inline-flex;
  color: var(--pj-subtle);
  opacity: 0;
  transition: opacity 120ms ease;
}

body[data-page="projects"] .projects-directory-status-trigger:hover .projects-directory-status-trigger-chevron,
body[data-page="projects"] .projects-directory-status-dropdown.is-open .projects-directory-status-trigger-chevron {
  opacity: 1;
}

body[data-page="projects"] .projects-directory-status-trigger-chevron svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

body[data-page="projects"] .projects-directory-status-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 2px;
  min-width: 148px;
  padding: 5px;
  border: 1px solid var(--pj-line);
  border-radius: 10px;
  background: var(--pj-surface);
  box-shadow: var(--pj-shadow-pop);
}

body[data-page="projects"] .projects-directory-status-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--pj-ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms ease;
}

body[data-page="projects"] .projects-directory-status-menu-item::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-status-menu-item[data-tone="in-progress"]::before {
  background: var(--pj-cobalt);
}

body[data-page="projects"] .projects-directory-status-menu-item[data-tone="submitted"]::before {
  background: var(--pj-violet);
}

body[data-page="projects"] .projects-directory-status-menu-item[data-tone="awarded"]::before {
  background: var(--pj-green);
}

body[data-page="projects"] .projects-directory-status-menu-item[data-tone="lost"]::before {
  background: var(--pj-red);
}

body[data-page="projects"] .projects-directory-status-menu-item:hover:not(:disabled) {
  background: var(--pj-hover);
  color: var(--pj-ink);
}

body[data-page="projects"] .projects-directory-status-menu-item[aria-checked="true"] {
  background: var(--pj-cobalt-soft);
  color: var(--pj-cobalt-strong);
  font-weight: 600;
}

/* row actions */

body[data-page="projects"] .projects-directory-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

body[data-page="projects"] .projects-directory-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--pj-muted);
  cursor: pointer;
  opacity: 0;
  transition: background-color 100ms ease, color 100ms ease, opacity 120ms ease;
}

body[data-page="projects"] .projects-directory-row:hover .projects-directory-action-button,
body[data-page="projects"] .projects-directory-card:hover .projects-directory-action-button,
body[data-page="projects"] .projects-directory-action-button:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  body[data-page="projects"] .projects-directory-action-button {
    opacity: 1;
  }
}

body[data-page="projects"] .projects-directory-action-button:hover {
  background: #e9ebef;
  color: var(--pj-ink);
}

body[data-page="projects"] .projects-directory-action-button-delete:hover {
  background: var(--pj-red-soft);
  color: var(--pj-red);
}

body[data-page="projects"] .projects-directory-action-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-directory-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-top: 1px solid var(--pj-line);
  background: var(--pj-surface-soft);
}

body[data-page="projects"] .projects-directory-table-footer p {
  margin: 0;
  color: var(--pj-muted);
  font-size: 12px;
}

body[data-page="projects"] .projects-directory-table-footer strong {
  color: var(--pj-ink-soft);
  font-weight: 600;
}

/* ---------- cards ---------- */

body[data-page="projects"] .projects-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  padding: 14px;
}

body[data-page="projects"] .projects-directory-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px 16px 12px;
  border: 1px solid var(--pj-line);
  border-radius: 10px;
  background: var(--pj-surface);
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

body[data-page="projects"] .projects-directory-card:hover {
  border-color: var(--pj-line-strong);
  box-shadow: 0 4px 14px -4px rgba(16, 24, 40, 0.12);
}

body[data-page="projects"] .projects-directory-card.is-active-project-card {
  border-color: rgba(35, 58, 90, 0.28);
  box-shadow: inset 0 3px 0 var(--pj-gold), 0 1px 3px rgba(16, 24, 40, 0.07);
}

body[data-page="projects"] .projects-directory-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-page="projects"] .projects-directory-card-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-page="projects"] .projects-directory-card-title h3 {
  margin: 0;
  color: var(--pj-ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-page="projects"] .projects-directory-card-title p {
  margin: 0;
  color: var(--pj-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-card-status {
  flex: 0 0 auto;
  margin-right: -6px;
}

body[data-page="projects"] .projects-directory-card-facts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--pj-line);
  border-radius: 8px;
  background: var(--pj-surface-soft);
}

body[data-page="projects"] .projects-directory-card-facts > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

body[data-page="projects"] .projects-directory-card-facts dt {
  color: var(--pj-muted);
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-directory-card-facts dd {
  margin: 0;
  color: var(--pj-ink);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-card-facts dd[data-tone="overdue"] {
  color: var(--pj-red);
}

body[data-page="projects"] .projects-directory-card-facts dd[data-tone="urgent"],
body[data-page="projects"] .projects-directory-card-facts dd[data-tone="soon"] {
  color: var(--pj-amber);
}

body[data-page="projects"] .projects-directory-card-tags-row {
  display: flex;
  align-items: center;
  min-height: 18px;
}

body[data-page="projects"] .projects-directory-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--pj-line);
}

body[data-page="projects"] .projects-directory-card-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pj-cobalt);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

body[data-page="projects"] .projects-directory-card-open:hover {
  color: var(--pj-cobalt-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- empty state ---------- */

body[data-page="projects"] .projects-directory-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 72px 24px;
  text-align: center;
}

body[data-page="projects"] .projects-directory-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--pj-surface-soft);
  border: 1px solid var(--pj-line);
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-empty-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

body[data-page="projects"] .projects-directory-empty h3 {
  margin: 0;
  color: var(--pj-ink);
  font-size: 14px;
  font-weight: 600;
}

body[data-page="projects"] .projects-directory-empty p {
  margin: 0;
  color: var(--pj-muted);
  font-size: 12.5px;
}

/* ---------- feedback toast ---------- */

body[data-page="projects"] .projects-directory-feedback {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  margin: 0;
  max-width: 380px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #22262d;
  color: #f4f5f7;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: var(--pj-shadow-pop);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

body[data-page="projects"] .projects-directory-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- modal base ---------- */

body[data-page="projects"] .projects-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 20px 40px;
  background: rgba(18, 22, 29, 0.52);
  overflow-y: auto;
}

body[data-page="projects"] .projects-modal-dialog {
  display: flex;
  flex-direction: column;
  width: min(620px, 100%);
  max-height: 88vh;
  border-radius: 14px;
  background: var(--pj-surface);
  box-shadow: var(--pj-shadow-modal);
  overflow: hidden;
}

body[data-page="projects"] .projects-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--pj-line);
}

body[data-page="projects"] .projects-modal-header h2 {
  margin: 0;
  color: var(--pj-ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

body[data-page="projects"] .projects-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--pj-muted);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

body[data-page="projects"] .projects-modal-close:hover {
  background: var(--pj-hover);
  color: var(--pj-ink);
}

body[data-page="projects"] .projects-modal-close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

body[data-page="projects"] .projects-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body[data-page="projects"] .projects-modal-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
}

body[data-page="projects"] .projects-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 14px 20px;
  border-top: 1px solid var(--pj-line);
  background: var(--pj-surface-soft);
}

body[data-page="projects"] .projects-modal-actions-spacer {
  flex: 1;
}

/* ---------- form fields ---------- */

body[data-page="projects"] .projects-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-page="projects"] .projects-field label {
  color: var(--pj-ink-soft);
  font-size: 12px;
  font-weight: 550;
}

body[data-page="projects"] .projects-label-hint {
  color: var(--pj-subtle);
  font-weight: 450;
}

body[data-page="projects"] .projects-form-legend {
  margin: 8px 0 -4px;
  color: var(--pj-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

body[data-page="projects"] .projects-field input:not([type="file"]),
body[data-page="projects"] .projects-field select,
body[data-page="projects"] .projects-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 8px;
  background: var(--pj-surface);
  color: var(--pj-ink);
  font-size: 13px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

body[data-page="projects"] .projects-field textarea {
  resize: vertical;
  line-height: 1.5;
}

body[data-page="projects"] .projects-field input::placeholder,
body[data-page="projects"] .projects-field textarea::placeholder {
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-field input:not([type="file"]):focus,
body[data-page="projects"] .projects-field select:focus,
body[data-page="projects"] .projects-field textarea:focus {
  outline: none;
  border-color: var(--pj-cobalt);
  box-shadow: 0 0 0 3px var(--pj-cobalt-soft);
}

body[data-page="projects"] .projects-field select {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23667085' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

body[data-page="projects"] .projects-field input[type="file"] {
  padding: 8px;
  border: 1px dashed var(--pj-line-strong);
  border-radius: 8px;
  background: var(--pj-surface-soft);
  color: var(--pj-muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

body[data-page="projects"] .projects-field input[type="file"]:hover {
  border-color: var(--pj-cobalt);
  background: var(--pj-cobalt-soft);
}

body[data-page="projects"] .projects-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 6px;
  background: var(--pj-surface);
  color: var(--pj-ink-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
}

body[data-page="projects"] .projects-modal-field-note {
  margin: 0;
  color: var(--pj-muted);
  font-size: 12px;
}

body[data-page="projects"] .projects-modal-documents-launcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--pj-line);
  border-radius: 9px;
  background: var(--pj-surface-soft);
}

body[data-page="projects"] .projects-modal-documents-launcher h3 {
  margin: 0 0 2px;
  color: var(--pj-ink);
  font-size: 12.5px;
  font-weight: 600;
}

body[data-page="projects"] .projects-modal-documents-launcher .projects-modal-attachments-summary {
  margin: 0;
}

body[data-page="projects"] .projects-modal-documents-launcher .projects-modal-secondary {
  height: 32px;
  flex: 0 0 auto;
}

body[data-page="projects"] .projects-modal-attachments-summary {
  margin: 0;
  color: var(--pj-muted);
  font-size: 12px;
}

/* ---------- documents modal ---------- */

body[data-page="projects"] .projects-documents-modal-dialog {
  width: min(980px, 100%);
  height: min(680px, 88vh);
  max-height: 88vh;
}

body[data-page="projects"] .projects-documents-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--pj-line);
  background: var(--pj-surface-soft);
}

body[data-page="projects"] .projects-documents-toolbar-spacer {
  flex: 1;
}

body[data-page="projects"] .projects-documents-toolbar-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 7px;
  background: var(--pj-surface);
  color: var(--pj-ink-soft);
  font-size: 12.5px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--pj-shadow-1);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

body[data-page="projects"] .projects-documents-toolbar-button:hover:not(:disabled) {
  background: var(--pj-hover);
  border-color: #b9c0ca;
}

body[data-page="projects"] .projects-documents-toolbar-button.is-primary {
  border-color: var(--pj-cobalt-strong);
  background: var(--pj-cobalt);
  color: #fff;
}

body[data-page="projects"] .projects-documents-toolbar-button.is-primary:hover:not(:disabled) {
  background: var(--pj-cobalt-strong);
}

body[data-page="projects"] .projects-documents-toolbar-button.is-danger {
  color: var(--pj-red);
}

body[data-page="projects"] .projects-documents-toolbar-button.is-danger:hover:not(:disabled) {
  background: var(--pj-red-soft);
  border-color: #f0cfcb;
}

body[data-page="projects"] .projects-documents-toolbar-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body[data-page="projects"] .projects-documents-toolbar-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-documents-search-field {
  position: relative;
  display: block;
  width: min(240px, 100%);
}

body[data-page="projects"] .projects-documents-search-field > svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  color: var(--pj-subtle);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}

body[data-page="projects"] .projects-documents-search-field input {
  width: 100%;
  height: 32px;
  padding: 0 11px 0 31px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 7px;
  background: var(--pj-surface);
  color: var(--pj-ink);
  font-size: 12.5px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

body[data-page="projects"] .projects-documents-search-field input:focus {
  outline: none;
  border-color: var(--pj-cobalt);
  box-shadow: 0 0 0 3px var(--pj-cobalt-soft);
}

body[data-page="projects"] .projects-documents-modal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
}

body[data-page="projects"] .projects-documents-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--pj-line);
  background: var(--pj-surface-soft);
  overflow-y: auto;
}

body[data-page="projects"] .projects-documents-sidebar-title {
  margin: 0 0 6px;
  padding: 0 6px;
  color: var(--pj-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-documents-folder-list {
  display: grid;
  gap: 1px;
}

body[data-page="projects"] .projects-documents-folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--pj-ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 100ms ease, color 100ms ease;
}

body[data-page="projects"] .projects-documents-folder-item:hover {
  background: #eef0f3;
}

body[data-page="projects"] .projects-documents-folder-item.is-active {
  background: var(--pj-cobalt-soft);
  color: var(--pj-cobalt-strong);
  font-weight: 600;
}

body[data-page="projects"] .projects-documents-folder-item-copy {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

body[data-page="projects"] .projects-documents-folder-caret {
  display: none;
}

body[data-page="projects"] .projects-documents-folder-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

body[data-page="projects"] .projects-documents-folder-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-documents-folder-item strong {
  color: var(--pj-subtle);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body[data-page="projects"] .projects-documents-folder-item.is-active strong {
  color: var(--pj-cobalt-strong);
}

body[data-page="projects"] .projects-documents-main-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  min-width: 0;
  padding: 14px 16px;
  overflow-y: auto;
}

body[data-page="projects"] .projects-documents-pathbar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 auto;
}

body[data-page="projects"] .projects-documents-pathbar-label {
  color: var(--pj-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-documents-pathbar strong {
  color: var(--pj-ink);
  font-size: 12.5px;
  font-weight: 600;
}

body[data-page="projects"] .projects-documents-pathbar .projects-modal-attachments-summary {
  margin-left: auto;
}

body[data-page="projects"] .projects-modal-upload-status {
  display: grid;
  gap: 7px;
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 1px solid var(--pj-cobalt-soft);
  border-radius: 8px;
  background: var(--pj-cobalt-soft);
}

body[data-page="projects"] .projects-modal-upload-status-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="projects"] .projects-modal-upload-status-copy strong {
  color: var(--pj-cobalt-strong);
  font-size: 12px;
  font-weight: 600;
}

body[data-page="projects"] .projects-modal-upload-status-copy span {
  color: var(--pj-cobalt-strong);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body[data-page="projects"] .projects-modal-upload-status-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(35, 58, 90, 0.16);
  overflow: hidden;
}

body[data-page="projects"] .projects-modal-upload-status-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--pj-cobalt);
  transition: width 200ms ease;
}

/* documents table */

body[data-page="projects"] .projects-documents-table {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--pj-line);
  border-radius: 9px;
  overflow: hidden;
}

body[data-page="projects"] .projects-documents-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 130px 76px 168px;
  gap: 10px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pj-line);
  background: var(--pj-surface-soft);
  color: var(--pj-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-documents-table-head-actions {
  text-align: right;
}

body[data-page="projects"] .projects-documents-table-body {
  display: block;
  min-height: 0;
  overflow-y: auto;
}

body[data-page="projects"] .projects-modal-attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 130px 76px 168px;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pj-line);
  transition: background-color 100ms ease;
}

body[data-page="projects"] .projects-modal-attachment-row:last-child {
  border-bottom: 0;
}

body[data-page="projects"] .projects-modal-attachment-row:hover {
  background: var(--pj-hover);
}

body[data-page="projects"] .projects-modal-attachment-row[data-state="error"] {
  background: var(--pj-red-soft);
}

body[data-page="projects"] .projects-modal-attachment-cell {
  min-width: 0;
  color: var(--pj-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-modal-attachment-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="projects"] .projects-modal-attachment-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body[data-page="projects"] .projects-modal-attachment-title strong {
  color: var(--pj-ink);
  font-size: 12.5px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-modal-attachment-copy > span {
  color: var(--pj-muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-modal-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #eef0f3;
  color: var(--pj-ink-soft);
}

body[data-page="projects"] .projects-modal-attachment-icon.tone-pdf {
  background: var(--pj-red-soft);
  color: var(--pj-red);
}

body[data-page="projects"] .projects-modal-attachment-icon.tone-doc {
  background: var(--pj-cobalt-soft);
  color: var(--pj-cobalt-strong);
}

body[data-page="projects"] .projects-modal-attachment-icon.tone-sheet {
  background: var(--pj-green-soft);
  color: var(--pj-green);
}

body[data-page="projects"] .projects-modal-attachment-icon.tone-image {
  background: var(--pj-violet-soft);
  color: var(--pj-violet);
}

body[data-page="projects"] .projects-modal-attachment-progress {
  height: 4px;
  border-radius: 999px;
  background: #e9ebef;
  overflow: hidden;
}

body[data-page="projects"] .projects-modal-attachment-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--pj-cobalt);
  transition: width 200ms ease;
}

body[data-page="projects"] .projects-modal-attachment-folder-select {
  width: 100%;
  height: 28px;
  padding: 0 24px 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23667085' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 11px;
  color: var(--pj-ink-soft);
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 120ms ease, background-color 120ms ease;
}

body[data-page="projects"] .projects-modal-attachment-folder-select:hover:not(:disabled) {
  border-color: var(--pj-line-strong);
  background-color: var(--pj-surface);
}

body[data-page="projects"] .projects-modal-attachment-folder-text {
  color: var(--pj-muted);
  font-size: 12px;
}

body[data-page="projects"] .projects-modal-attachment-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

body[data-page="projects"] .projects-modal-attachment-button {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--pj-line-strong);
  border-radius: 6px;
  background: var(--pj-surface);
  color: var(--pj-ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}

body[data-page="projects"] .projects-modal-attachment-button:hover:not(:disabled) {
  background: var(--pj-hover);
  border-color: #b9c0ca;
}

body[data-page="projects"] .projects-modal-attachment-button.is-danger {
  color: var(--pj-red);
}

body[data-page="projects"] .projects-modal-attachment-button.is-danger:hover:not(:disabled) {
  background: var(--pj-red-soft);
  border-color: #f0cfcb;
}

body[data-page="projects"] .projects-modal-attachment-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body[data-page="projects"] .projects-modal-attachments-empty {
  margin: 0;
  padding: 28px 16px;
  color: var(--pj-subtle);
  font-size: 12.5px;
  text-align: center;
}

/* ---------- confirm dialogs ---------- */

body[data-page="projects"] .projects-confirm-dialog {
  width: min(420px, 100%);
}

body[data-page="projects"] .projects-confirm-body {
  display: grid;
  gap: 10px;
  padding: 16px 20px;
}

body[data-page="projects"] .projects-confirm-body p {
  margin: 0;
  color: var(--pj-ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  body[data-page="projects"] .projects-stats {
    display: none;
  }
}

@media (max-width: 860px) {
  body[data-page="projects"] .page-content.projects-directory-page {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  body[data-page="projects"] .projects-directory-toolbar {
    align-items: stretch;
  }

  body[data-page="projects"] .projects-directory-search {
    width: 100%;
  }

  body[data-page="projects"] .projects-directory-toolbar-actions {
    margin-left: 0;
  }

  body[data-page="projects"] .projects-modal-form-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="projects"] .projects-documents-modal-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="projects"] .projects-documents-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--pj-line);
    max-height: 180px;
  }

  body[data-page="projects"] .projects-documents-table-head {
    display: none;
  }

  body[data-page="projects"] .projects-modal-attachment-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ============================================================
   Portfolio workspace
   ============================================================ */

body[data-page="projects"] .projects-directory-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 2px 2px 0;
}

body[data-page="projects"] .projects-directory-panel-head > div:first-child {
  min-width: 0;
}

body[data-page="projects"] .projects-directory-eyebrow,
body[data-page="projects"] .projects-directory-section-label {
  margin: 0 0 6px;
  color: var(--pj-cobalt);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-directory-panel-head h1 {
  margin: 0;
  color: var(--pj-ink);
  font-size: clamp(27px, 2.2vw, 34px);
  font-weight: 660;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

body[data-page="projects"] .projects-directory-panel-head h1 + p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--pj-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

body[data-page="projects"] .projects-directory-panel-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

body[data-page="projects"] .projects-directory-create-button {
  height: 38px;
  padding-inline: 17px;
}

body[data-page="projects"] .projects-directory-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--pj-line);
  border-radius: 12px;
  background: var(--pj-surface);
  box-shadow: var(--pj-shadow-1);
  overflow: hidden;
}

body[data-page="projects"] .projects-directory-kpi {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 82px;
  padding: 15px 18px;
  border-right: 1px solid var(--pj-line);
  background: var(--pj-surface);
}

body[data-page="projects"] .projects-directory-kpi:last-child {
  border-right: 0;
}

body[data-page="projects"] .projects-directory-kpi::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

body[data-page="projects"] .projects-directory-kpi--projects::after {
  background: var(--pj-cobalt);
}

body[data-page="projects"] .projects-directory-kpi--value::after {
  background: var(--pj-gold);
}

body[data-page="projects"] .projects-directory-kpi--clients::after {
  background: var(--pj-green);
}

body[data-page="projects"] .projects-directory-kpi--due::after {
  background: var(--pj-violet);
}

body[data-page="projects"] .projects-directory-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #dfe3e9;
  border-radius: 9px;
  background: var(--pj-surface-soft);
  color: var(--pj-cobalt);
}

body[data-page="projects"] .projects-directory-kpi--value .projects-directory-kpi-icon {
  color: var(--pj-amber);
}

body[data-page="projects"] .projects-directory-kpi--clients .projects-directory-kpi-icon {
  color: var(--pj-green);
}

body[data-page="projects"] .projects-directory-kpi--due .projects-directory-kpi-icon {
  color: var(--pj-violet);
}

body[data-page="projects"] .projects-directory-kpi-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-directory-kpi-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-page="projects"] .projects-directory-kpi-copy strong {
  color: var(--pj-ink);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-kpi-copy small {
  color: var(--pj-muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

body[data-page="projects"] .projects-directory-panel {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 520px;
}

body[data-page="projects"] .projects-directory-filterbar {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px 12px 14px;
  border: 0;
  border-right: 1px solid var(--pj-line);
  border-radius: 0;
  background: #f9fafb;
}

body[data-page="projects"] .projects-directory-filterbar > p {
  margin: 0;
  padding: 0 10px;
  color: var(--pj-subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-directory-filterbar > div[role="tablist"] {
  display: grid;
  gap: 3px;
}

body[data-page="projects"] .projects-directory-filter-pill {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 40px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--pj-muted);
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
  box-shadow: none;
}

body[data-page="projects"] .projects-directory-filter-pill:hover {
  border-color: var(--pj-line);
  background: rgba(255, 255, 255, 0.68);
}

body[data-page="projects"] .projects-directory-filter-pill.is-active {
  border-color: #d9deee;
  background: var(--pj-cobalt-soft);
  color: var(--pj-cobalt-strong);
  box-shadow: inset 2px 0 0 var(--pj-cobalt);
}

body[data-page="projects"] .projects-directory-filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-filter-pill.is-active .projects-directory-filter-icon {
  color: var(--pj-cobalt);
}

body[data-page="projects"] .projects-directory-filter-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-directory-filter-pill small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e9ecf0;
  color: var(--pj-muted);
  font-size: 10.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

body[data-page="projects"] .projects-directory-filter-pill.is-active small {
  background: rgba(35, 58, 90, 0.1);
  color: var(--pj-cobalt-strong);
}

body[data-page="projects"] .projects-directory-rail-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding: 12px 10px 2px;
  border-top: 1px solid var(--pj-line);
}

body[data-page="projects"] .projects-directory-rail-note > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 7px;
  background: var(--pj-green-soft);
  color: var(--pj-green);
}

body[data-page="projects"] .projects-directory-rail-note svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-directory-rail-note p {
  display: grid;
  gap: 2px;
  margin: 1px 0 0;
}

body[data-page="projects"] .projects-directory-rail-note strong {
  color: var(--pj-ink-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

body[data-page="projects"] .projects-directory-rail-note small {
  color: var(--pj-subtle);
  font-size: 10.5px;
  line-height: 1.35;
}

body[data-page="projects"] .projects-directory-content {
  min-width: 0;
  background: var(--pj-surface);
}

body[data-page="projects"] .projects-directory-workspace-head {
  padding: 22px 24px 14px;
}

body[data-page="projects"] .projects-directory-workspace-head h2 {
  margin: 0;
  color: var(--pj-ink);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

body[data-page="projects"] .projects-directory-workspace-head h2 + p {
  margin: 5px 0 0;
  color: var(--pj-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

body[data-page="projects"] .projects-directory-section-label {
  margin-bottom: 5px;
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-directory-toolbar {
  gap: 12px;
  padding: 0 24px 18px;
  border-bottom: 1px solid var(--pj-line);
}

body[data-page="projects"] .projects-directory-search {
  width: min(390px, 100%);
}

body[data-page="projects"] .projects-directory-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

body[data-page="projects"] .projects-directory-select > span {
  color: var(--pj-subtle);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

body[data-page="projects"] .projects-view-btn {
  width: auto;
  gap: 6px;
  padding: 0 8px;
}

body[data-page="projects"] .projects-view-btn span {
  font-size: 11.5px;
  font-weight: 600;
}

body[data-page="projects"] .projects-directory-results {
  background: var(--pj-surface);
}

body[data-page="projects"] .projects-directory-table thead th {
  padding-top: 10px;
  padding-bottom: 10px;
  background: #fafbfc;
}

body[data-page="projects"] .projects-directory-row td {
  padding-top: 12px;
  padding-bottom: 12px;
}

@media (max-width: 1120px) {
  body[data-page="projects"] .projects-directory-panel {
    grid-template-columns: 194px minmax(0, 1fr);
  }

  body[data-page="projects"] .projects-directory-kpi {
    padding-inline: 14px;
  }

  body[data-page="projects"] .projects-directory-toolbar {
    align-items: stretch;
  }

  body[data-page="projects"] .projects-directory-search {
    width: 100%;
  }

  body[data-page="projects"] .projects-directory-toolbar-actions {
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  body[data-page="projects"] .projects-directory-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="projects"] .projects-directory-kpi:nth-child(2) {
    border-right: 0;
  }

  body[data-page="projects"] .projects-directory-kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--pj-line);
  }

  body[data-page="projects"] .projects-directory-panel {
    display: block;
    min-height: 0;
  }

  body[data-page="projects"] .projects-directory-filterbar {
    display: block;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--pj-line);
    overflow: hidden;
  }

  body[data-page="projects"] .projects-directory-filterbar > p,
  body[data-page="projects"] .projects-directory-rail-note {
    display: none;
  }

  body[data-page="projects"] .projects-directory-filterbar > div[role="tablist"] {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-page="projects"] .projects-directory-filterbar > div[role="tablist"]::-webkit-scrollbar {
    display: none;
  }

  body[data-page="projects"] .projects-directory-filter-pill {
    grid-template-columns: 18px auto auto;
    width: auto;
    min-width: max-content;
    height: 36px;
    padding: 0 10px;
  }

  body[data-page="projects"] .projects-directory-filter-pill.is-active {
    box-shadow: inset 0 -2px 0 var(--pj-cobalt);
  }
}

@media (max-width: 620px) {
  body[data-page="projects"] .page-content.projects-directory-page {
    width: calc(100% - 20px);
    padding-top: 16px;
    padding-bottom: 28px;
  }

  body[data-page="projects"] .projects-directory-shell {
    gap: 12px;
  }

  body[data-page="projects"] .projects-directory-panel-head {
    display: grid;
    align-items: start;
    gap: 14px;
  }

  body[data-page="projects"] .projects-directory-panel-head h1 {
    font-size: 27px;
  }

  body[data-page="projects"] .projects-directory-panel-actions,
  body[data-page="projects"] .projects-directory-create-button {
    width: 100%;
  }

  body[data-page="projects"] .projects-directory-kpis {
    grid-template-columns: 1fr;
  }

  body[data-page="projects"] .projects-directory-kpi,
  body[data-page="projects"] .projects-directory-kpi:nth-child(2) {
    min-height: 68px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--pj-line);
  }

  body[data-page="projects"] .projects-directory-kpi:last-child {
    border-bottom: 0;
  }

  body[data-page="projects"] .projects-directory-workspace-head {
    padding: 18px 16px 12px;
  }

  body[data-page="projects"] .projects-directory-toolbar {
    display: grid;
    padding: 0 16px 14px;
  }

  body[data-page="projects"] .projects-directory-toolbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  body[data-page="projects"] .projects-directory-select {
    min-width: 0;
  }

  body[data-page="projects"] .projects-directory-select > span {
    display: none;
  }

  body[data-page="projects"] .projects-directory-select select {
    width: 100%;
  }

  body[data-page="projects"] .projects-directory-results {
    padding: 10px;
    overflow: visible;
    background: var(--pj-surface-soft);
  }

  body[data-page="projects"] .projects-directory-table {
    display: block;
    min-width: 0;
  }

  body[data-page="projects"] .projects-directory-table thead {
    display: none;
  }

  body[data-page="projects"] .projects-directory-table tbody {
    display: grid;
    gap: 9px;
  }

  body[data-page="projects"] .projects-directory-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 13px 16px;
    padding: 16px;
    border: 1px solid var(--pj-line);
    border-radius: 10px;
    background: var(--pj-surface);
    box-shadow: var(--pj-shadow-1);
  }

  body[data-page="projects"] .projects-directory-row:hover {
    background: var(--pj-surface);
  }

  body[data-page="projects"] .projects-directory-row.is-active-project-row {
    border-color: rgba(35, 58, 90, 0.28);
    background: var(--pj-surface);
    box-shadow: inset 3px 0 0 var(--pj-gold), var(--pj-shadow-1);
  }

  body[data-page="projects"] .projects-directory-row td {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
    padding: 0;
    border: 0;
  }

  body[data-page="projects"] .projects-directory-row td:first-child {
    grid-column: 1 / -1;
    padding-right: 60px;
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(4),
  body[data-page="projects"] .projects-directory-row td:nth-child(5) {
    grid-column: 1 / -1;
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(2)::before,
  body[data-page="projects"] .projects-directory-row td:nth-child(3)::before,
  body[data-page="projects"] .projects-directory-row td:nth-child(4)::before,
  body[data-page="projects"] .projects-directory-row td:nth-child(5)::before,
  body[data-page="projects"] .projects-directory-row td:nth-child(6)::before,
  body[data-page="projects"] .projects-directory-row td:nth-child(7)::before {
    color: var(--pj-subtle);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(2)::before {
    content: "Client";
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(3)::before {
    content: "Location";
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(4)::before {
    content: "Estimator";
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(5)::before {
    content: "Bid due";
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(6)::before {
    content: "Status";
  }

  body[data-page="projects"] .projects-directory-row td:nth-child(7)::before {
    content: "Estimate";
  }

  body[data-page="projects"] .projects-directory-actions-wrap {
    position: absolute;
    top: 12px;
    right: 10px;
    display: block;
  }

  body[data-page="projects"] .projects-directory-action-button {
    opacity: 1;
  }

  body[data-page="projects"] .projects-directory-number-cell {
    text-align: left;
  }

  body[data-page="projects"] .projects-directory-table-footer {
    display: grid;
    gap: 4px;
    margin: 10px -10px -10px;
    padding: 11px 12px;
  }

  body[data-page="projects"] .projects-directory-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 0;
  }

  body[data-page="projects"] .projects-directory-card-facts {
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="projects"] .projects-directory-card-facts > div:last-child {
    grid-column: 1 / -1;
  }

  body[data-page="projects"] .projects-modal {
    padding: 10px;
  }

  body[data-page="projects"] .projects-modal-dialog {
    max-height: calc(100vh - 20px);
  }
}

/* ============================================================
   Embedded document library
   ============================================================ */

body[data-page="projects"] .projects-modal-documents-launcher {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--pj-line);
  border-radius: 9px;
  background: #fafbfc;
}

body[data-page="projects"] .projects-modal-documents-launcher-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #ead59e;
  border-radius: 8px;
  background: var(--pj-gold-soft);
  color: var(--pj-amber);
}

body[data-page="projects"] .projects-modal-documents-launcher-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-modal-documents-launcher-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-page="projects"] .projects-modal-documents-launcher-copy > p {
  margin: 0;
  color: var(--pj-subtle);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-modal-documents-launcher h3 {
  margin: 0;
  color: var(--pj-ink);
  font-size: 12.5px;
  font-weight: 650;
}

body[data-page="projects"] .projects-modal-documents-launcher .projects-modal-attachments-summary {
  color: var(--pj-muted);
  font-size: 10.5px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-modal-documents-launcher-button {
  gap: 5px;
  height: 32px;
  padding-inline: 10px;
}

body[data-page="projects"] .projects-modal-documents-launcher-button svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] #projects-documents-modal {
  align-items: center;
  padding: 20px;
}

body[data-page="projects"] .projects-documents-modal-dialog {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: min(1080px, 100%);
  height: min(760px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--pj-line);
  border-radius: 12px;
  background: var(--pj-surface);
  box-shadow: 0 28px 72px -18px rgba(16, 24, 40, 0.38);
}

body[data-page="projects"] .projects-documents-modal-header {
  padding: 14px 18px;
}

body[data-page="projects"] #projects-documents-modal .projects-documents-modal-header {
  padding: 14px 18px;
}

body[data-page="projects"] #projects-documents-modal .projects-documents-modal-header h2 {
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
}

body[data-page="projects"] .projects-documents-modal-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

body[data-page="projects"] .projects-documents-modal-heading > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #ead59e;
  border-radius: 8px;
  background: var(--pj-gold-soft);
  color: var(--pj-amber);
}

body[data-page="projects"] .projects-documents-modal-heading > span svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-documents-modal-heading > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

body[data-page="projects"] .projects-documents-modal-heading p {
  margin: 0;
  color: var(--pj-cobalt);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-documents-modal-heading h2 {
  font-size: 15px;
}

body[data-page="projects"] .projects-documents-modal-heading small {
  color: var(--pj-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

body[data-page="projects"] .projects-documents-modal-header .projects-modal-close {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  color: var(--pj-ink-soft);
}

body[data-page="projects"] #projects-documents-modal .projects-documents-modal-header .projects-modal-close {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

body[data-page="projects"] .projects-documents-modal-header .projects-modal-close svg,
body[data-page="projects"] .projects-documents-modal-header .projects-modal-close svg path {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

body[data-page="projects"] .projects-documents-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--pj-line);
  background: #fafbfc;
}

body[data-page="projects"] .projects-documents-metrics article {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 16px;
  border-right: 1px solid var(--pj-line);
}

body[data-page="projects"] .projects-documents-metrics article:last-child {
  border-right: 0;
}

body[data-page="projects"] .projects-documents-metrics article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid #dfe3e9;
  border-radius: 7px;
  background: var(--pj-surface);
  color: var(--pj-cobalt);
}

body[data-page="projects"] .projects-documents-metrics article:nth-child(2) > span {
  color: var(--pj-green);
}

body[data-page="projects"] .projects-documents-metrics article:nth-child(3) > span {
  color: var(--pj-violet);
}

body[data-page="projects"] .projects-documents-metrics svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-documents-metrics p {
  display: grid;
  gap: 1px;
  min-width: 0;
  margin: 0;
}

body[data-page="projects"] .projects-documents-metrics strong {
  color: var(--pj-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-documents-metrics small {
  color: var(--pj-muted);
  font-size: 9.5px;
  font-weight: 500;
}

body[data-page="projects"] .projects-documents-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  padding: 9px 12px;
  background: var(--pj-surface);
}

body[data-page="projects"] .projects-documents-toolbar-title {
  display: grid;
  gap: 2px;
  min-width: 150px;
}

body[data-page="projects"] .projects-documents-toolbar-title p {
  margin: 0;
  color: var(--pj-ink);
  font-size: 11.5px;
  font-weight: 650;
}

body[data-page="projects"] .projects-documents-toolbar-title span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pj-subtle);
  font-size: 9.5px;
}

body[data-page="projects"] .projects-documents-toolbar-title i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pj-green);
  box-shadow: 0 0 0 3px var(--pj-green-soft);
}

body[data-page="projects"] .projects-documents-toolbar-group {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}

body[data-page="projects"] .projects-documents-toolbar-button {
  height: 32px;
  padding: 0 9px;
  border-color: transparent;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  box-shadow: none;
}

body[data-page="projects"] .projects-documents-toolbar-button:hover:not(:disabled) {
  border-color: var(--pj-line);
}

body[data-page="projects"] .projects-documents-toolbar-button.is-primary {
  border-color: var(--pj-gold);
  background: var(--pj-gold);
  color: var(--pj-gold-ink);
  box-shadow: 0 4px 10px rgba(31, 52, 80, 0.14);
}

body[data-page="projects"] .projects-documents-toolbar-button.is-primary:hover:not(:disabled) {
  border-color: var(--pj-gold-strong);
  background: var(--pj-gold-strong);
}

body[data-page="projects"] .projects-documents-toolbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: var(--pj-line);
}

body[data-page="projects"] .projects-documents-modal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  border-top: 0;
}

body[data-page="projects"] .projects-documents-sidebar {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
  padding: 16px 10px 11px;
  background: #f9fafb;
  overflow: hidden;
}

body[data-page="projects"] .projects-documents-sidebar-head {
  padding: 0 8px;
}

body[data-page="projects"] .projects-documents-sidebar-head p {
  margin: 0 0 4px;
  color: var(--pj-subtle);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

body[data-page="projects"] .projects-documents-sidebar-head h3 {
  margin: 0;
  color: var(--pj-ink);
  font-size: 13px;
  font-weight: 650;
}

body[data-page="projects"] .projects-documents-sidebar-head span {
  display: block;
  margin-top: 4px;
  color: var(--pj-muted);
  font-size: 9.5px;
  line-height: 1.4;
}

body[data-page="projects"] .projects-documents-folder-list {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
}

body[data-page="projects"] .projects-documents-folder-item {
  min-height: 36px;
  height: auto;
  padding-right: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--pj-muted);
  font-size: 11px;
  font-weight: 550;
}

body[data-page="projects"] .projects-documents-folder-item:hover {
  border-color: var(--pj-line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--pj-ink);
}

body[data-page="projects"] .projects-documents-folder-item.is-active {
  border-color: #d9deee;
  background: var(--pj-cobalt-soft);
  color: var(--pj-cobalt-strong);
  box-shadow: inset 2px 0 0 var(--pj-cobalt);
}

body[data-page="projects"] .projects-documents-folder-caret {
  display: block;
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.55;
  transform: rotate(-45deg);
}

body[data-page="projects"] .projects-documents-folder-icon {
  width: 14px;
  height: 11px;
  flex: 0 0 14px;
  border: 1px solid #8f9db7;
  border-radius: 2px;
  background: #edf1f7;
  opacity: 1;
  -webkit-mask: none;
  mask: none;
}

body[data-page="projects"] .projects-documents-folder-icon::before {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 3px;
  border: 1px solid #8f9db7;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background: #edf1f7;
  content: "";
}

body[data-page="projects"] .projects-documents-folder-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e9ecf0;
  color: var(--pj-muted);
  font-size: 9.5px;
}

body[data-page="projects"] .projects-documents-folder-item.is-active strong {
  background: rgba(35, 58, 90, 0.1);
}

body[data-page="projects"] .projects-documents-sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 11px 8px 1px;
  border-top: 1px solid var(--pj-line);
}

body[data-page="projects"] .projects-documents-sidebar-note > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 7px;
  background: var(--pj-green-soft);
  color: var(--pj-green);
}

body[data-page="projects"] .projects-documents-sidebar-note svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-documents-sidebar-note p {
  display: grid;
  gap: 2px;
  margin: 1px 0 0;
}

body[data-page="projects"] .projects-documents-sidebar-note strong {
  color: var(--pj-ink-soft);
  font-size: 9.5px;
  font-weight: 650;
}

body[data-page="projects"] .projects-documents-sidebar-note small {
  color: var(--pj-subtle);
  font-size: 9px;
  line-height: 1.35;
}

body[data-page="projects"] .projects-documents-main-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

body[data-page="projects"] .projects-documents-pathbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pj-line);
}

body[data-page="projects"] .projects-documents-pathbar {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
}

body[data-page="projects"] .projects-documents-pathbar-icon {
  display: inline-flex;
  color: var(--pj-cobalt);
}

body[data-page="projects"] .projects-documents-pathbar-icon svg,
body[data-page="projects"] .projects-documents-pathbar-chevron {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="projects"] .projects-documents-pathbar-chevron {
  width: 11px;
  color: var(--pj-subtle);
}

body[data-page="projects"] .projects-documents-pathbar-label {
  color: var(--pj-muted);
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

body[data-page="projects"] .projects-documents-pathbar strong {
  min-width: 0;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="projects"] .projects-documents-search-field {
  width: min(270px, 40%);
}

body[data-page="projects"] .projects-documents-search-field input {
  height: 32px;
  font-size: 11.5px;
}

body[data-page="projects"] .projects-modal-upload-status {
  margin: 12px 14px 0;
  padding: 9px 11px;
}

body[data-page="projects"] .projects-documents-list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px 10px;
}

body[data-page="projects"] .projects-documents-list-head h3 {
  margin: 0;
  color: var(--pj-ink);
  font-size: 13px;
  font-weight: 650;
}

body[data-page="projects"] .projects-documents-list-head .projects-modal-attachments-summary {
  margin-top: 2px;
  color: var(--pj-muted);
  font-size: 9.5px;
}

body[data-page="projects"] .projects-documents-queue-note {
  max-width: 310px;
  margin: 0;
  color: var(--pj-subtle);
  font-size: 9.5px;
  line-height: 1.4;
  text-align: right;
}

body[data-page="projects"] .projects-documents-table {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--pj-line);
  border-radius: 0;
  overflow: auto;
}

body[data-page="projects"] .projects-documents-table-head,
body[data-page="projects"] .projects-modal-attachment-row {
  grid-template-columns: minmax(220px, 2fr) minmax(135px, 1fr) minmax(115px, 0.8fr) 72px minmax(125px, 0.8fr);
  min-width: 825px;
}

body[data-page="projects"] .projects-documents-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 14px;
  background: #fafbfc;
  font-size: 9.5px;
}

body[data-page="projects"] .projects-documents-table-head span:last-child {
  text-align: right;
}

body[data-page="projects"] .projects-documents-table-body {
  width: 100%;
  min-width: 825px;
  overflow: visible;
}

body[data-page="projects"] .projects-modal-attachment-row {
  min-height: 52px;
  padding: 8px 14px;
}

body[data-page="projects"] .projects-modal-attachment-cell {
  font-size: 10.5px;
}

body[data-page="projects"] .projects-modal-attachment-title strong {
  font-size: 11.5px;
  font-weight: 600;
}

body[data-page="projects"] .projects-modal-attachment-copy > span {
  font-size: 9.5px;
}

body[data-page="projects"] .projects-modal-attachment-icon {
  height: 24px;
  border: 1px solid #dfe3e9;
}

body[data-page="projects"] .projects-modal-attachment-actions {
  gap: 4px;
}

body[data-page="projects"] .projects-modal-attachment-button {
  height: 26px;
  padding: 0 7px;
  border-color: transparent;
  background: transparent;
  font-size: 9.5px;
  opacity: 0;
}

body[data-page="projects"] .projects-modal-attachment-row:hover .projects-modal-attachment-button,
body[data-page="projects"] .projects-modal-attachment-button:focus-visible {
  opacity: 1;
}

body[data-page="projects"] .projects-modal-attachment-button:hover:not(:disabled) {
  border-color: var(--pj-line);
  background: var(--pj-surface);
}

body[data-page="projects"] .projects-modal-attachment-button.is-danger {
  border-color: transparent;
  background: transparent;
}

body[data-page="projects"] .projects-modal-attachment-folder-select {
  font-size: 10.5px;
}

body[data-page="projects"] .projects-modal-attachments-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: 0;
  padding: 34px 16px;
  border-top: 1px solid var(--pj-line);
  background: var(--pj-surface-soft);
  font-size: 10.5px;
}

body[data-page="projects"] .projects-documents-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--pj-line);
  background: #fafbfc;
}

body[data-page="projects"] .projects-documents-modal-footer p {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--pj-muted);
  font-size: 9.5px;
}

body[data-page="projects"] .projects-documents-modal-footer p > span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--pj-green);
  box-shadow: 0 0 0 3px var(--pj-green-soft);
}

body[data-page="projects"] .projects-documents-modal-footer .projects-primary-button {
  height: 32px;
  min-height: 32px;
  padding-inline: 15px;
}

@media (max-width: 860px) {
  body[data-page="projects"] #projects-documents-modal {
    align-items: flex-start;
    padding: 8px;
  }

  body[data-page="projects"] .projects-documents-modal-dialog {
    width: 100%;
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }

  body[data-page="projects"] .projects-documents-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  body[data-page="projects"] .projects-documents-toolbar-title {
    display: none;
  }

  body[data-page="projects"] .projects-documents-toolbar-group {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-page="projects"] .projects-documents-toolbar-group::-webkit-scrollbar {
    display: none;
  }

  body[data-page="projects"] .projects-documents-modal-layout {
    display: block;
    min-height: 0;
    overflow-y: auto;
  }

  body[data-page="projects"] .projects-documents-sidebar {
    display: block;
    padding: 7px;
    border-right: 0;
    border-bottom: 1px solid var(--pj-line);
    overflow: hidden;
  }

  body[data-page="projects"] .projects-documents-sidebar-head,
  body[data-page="projects"] .projects-documents-sidebar-note {
    display: none;
  }

  body[data-page="projects"] .projects-documents-folder-list {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body[data-page="projects"] .projects-documents-folder-list::-webkit-scrollbar {
    display: none;
  }

  body[data-page="projects"] .projects-documents-folder-item {
    width: auto;
    min-width: max-content;
    padding: 0 9px !important;
  }

  body[data-page="projects"] .projects-documents-folder-caret {
    display: none;
  }

  body[data-page="projects"] .projects-documents-folder-item.is-active {
    box-shadow: inset 0 -2px 0 var(--pj-cobalt);
  }

  body[data-page="projects"] .projects-documents-main-panel {
    min-height: 440px;
  }
}

@media (max-width: 620px) {
  body[data-page="projects"] .projects-modal-documents-launcher {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  body[data-page="projects"] .projects-modal-documents-launcher-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  body[data-page="projects"] .projects-documents-modal-header {
    padding: 11px 12px;
  }

  body[data-page="projects"] .projects-documents-modal-heading small {
    display: none;
  }

  body[data-page="projects"] .projects-documents-metrics article {
    min-height: 52px;
    padding: 7px 9px;
  }

  body[data-page="projects"] .projects-documents-metrics article > span {
    display: none;
  }

  body[data-page="projects"] .projects-documents-pathbar-row {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  body[data-page="projects"] .projects-documents-search-field {
    width: 100%;
  }

  body[data-page="projects"] .projects-documents-list-head {
    display: grid;
    gap: 5px;
    padding: 11px 10px 8px;
  }

  body[data-page="projects"] .projects-documents-queue-note {
    max-width: none;
    text-align: left;
  }

  body[data-page="projects"] .projects-documents-table {
    padding: 8px;
    border-top: 1px solid var(--pj-line);
    background: var(--pj-surface-soft);
    overflow: hidden;
  }

  body[data-page="projects"] .projects-documents-table-head {
    display: none;
  }

  body[data-page="projects"] .projects-documents-table-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    width: 100%;
    min-width: 0;
  }

  body[data-page="projects"] .projects-modal-attachment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "name name"
      "modified size"
      "folder folder"
      "actions actions";
    gap: 10px 14px;
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--pj-line);
    border-radius: 8px;
    background: var(--pj-surface);
  }

  body[data-page="projects"] .projects-modal-attachment-name-cell {
    grid-area: name;
  }

  body[data-page="projects"] .projects-modal-attachment-row > .projects-modal-attachment-cell:nth-child(2) {
    grid-area: modified;
  }

  body[data-page="projects"] .projects-modal-attachment-row > .projects-modal-attachment-cell:nth-child(3) {
    grid-area: folder;
  }

  body[data-page="projects"] .projects-modal-attachment-row > .projects-modal-attachment-cell:nth-child(4) {
    grid-area: size;
  }

  body[data-page="projects"] .projects-modal-attachment-actions {
    display: flex;
    grid-area: actions;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid var(--pj-line);
    overflow: visible;
  }

  body[data-page="projects"] .projects-modal-attachment-button {
    opacity: 1;
  }

  body[data-page="projects"] .projects-documents-modal-footer p {
    display: none;
  }

  body[data-page="projects"] .projects-documents-modal-footer .projects-primary-button {
    width: 100%;
  }
}

/* Keep legacy project rules in the shared bundle from shaping this workspace. */

body[data-page="projects"] .projects-directory-shell {
  height: auto;
  min-height: 0;
}

body[data-page="projects"] .projects-directory-panel {
  grid-template-rows: none;
  height: auto;
  padding: 0;
}

body[data-page="projects"] .projects-directory-panel-head h1,
body[data-page="projects"] .projects-directory-panel-head h1 + p,
body[data-page="projects"] .projects-directory-filter-pill,
body[data-page="projects"] .projects-directory-card-title h3,
body[data-page="projects"] .projects-directory-card-title p,
body[data-page="projects"] .projects-directory-card-facts dt,
body[data-page="projects"] .projects-directory-card-facts dd,
body[data-page="projects"] .projects-directory-card-open {
  font-family: inherit;
}

body[data-page="projects"] .projects-primary-button,
body[data-page="projects"] .projects-modal-secondary,
body[data-page="projects"] .projects-modal-danger {
  min-height: 0;
}

body[data-page="projects"] .projects-directory-results {
  height: auto;
  min-height: 0;
  margin-top: 0;
}

body[data-page="projects"] .projects-directory-table-shell {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-page="projects"] .projects-directory-due-pill {
  display: inline;
  width: auto;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  animation: none;
}

body[data-page="projects"] .projects-directory-tag {
  min-height: 0;
  border: 0;
}

body[data-page="projects"] .projects-directory-grid {
  min-height: 0;
  align-items: start;
}

body[data-page="projects"] .projects-directory-card {
  aspect-ratio: auto;
  transform: none;
}

body[data-page="projects"] .projects-directory-card::before,
body[data-page="projects"] .projects-directory-card::after {
  content: none;
}

body[data-page="projects"] .projects-directory-card:hover {
  transform: none;
}

body[data-page="projects"] .projects-directory-card.is-active-project-card {
  background: var(--pj-surface) !important;
}

body[data-page="projects"] .projects-directory-card-facts > div {
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-page="projects"] .projects-directory-card-open {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="projects"] .projects-directory-card-open:hover {
  background: transparent;
}

body[data-page="projects"] .projects-directory-card-footer .projects-directory-action-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}

body[data-page="projects"] .projects-directory-card-footer .projects-directory-action-button-delete {
  background: transparent;
}

body[data-page="projects"] .projects-directory-empty {
  min-height: 260px;
  border: 0;
  border-radius: 0;
}

@media (max-width: 860px) {
  body[data-page="projects"] .projects-directory-panel {
    min-height: 0;
  }
}

/* Full-viewport workspace */

body[data-page="projects"] .page-content.projects-directory-page {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 28px 24px 24px;
}

body[data-page="projects"] .projects-directory-shell {
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: calc(100vh - 52px);
}

body[data-page="projects"] .projects-directory-panel {
  height: 100%;
}

@media (max-width: 860px) {
  body[data-page="projects"] .page-content.projects-directory-page {
    width: 100%;
    padding: 18px 12px 24px;
  }

  body[data-page="projects"] .projects-directory-shell {
    grid-template-rows: none;
    min-height: calc(100vh - 42px);
  }

  body[data-page="projects"] .projects-directory-panel {
    height: auto;
  }
}

@media (max-width: 620px) {
  body[data-page="projects"] .page-content.projects-directory-page {
    width: 100%;
    padding: 16px 10px 24px;
  }

  body[data-page="projects"] .projects-directory-shell {
    min-height: calc(100vh - 40px);
  }
}
