/* ============================================
   PMO App — Domain-Specific Styles
   Built on design-kit (Swiss Rationalist).
   Only PMO tokens, components, and overrides here.
   Generic UI handled by /design-kit/index.css.
   ============================================ */

/* ── PMO Domain Tokens ── */
:root {
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.04);
}

/* ============================================
   PROJECT CARD (used in grid cells)
   ============================================ */

.project-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  padding: 10px;
  min-height: 120px;
  font-size: var(--t-14);
  color: var(--ink-1);
  cursor: pointer;
  transition: all var(--dt-fast);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.project-card-status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Info button — top-right corner */
.project-card-info {
  position: absolute;
  top: var(--s4);
  right: var(--s4);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--ink-4);
  cursor: pointer;
  border-radius: 50%;
  opacity: 0;
  transition: all var(--dt-fast);
}
.project-card:hover .project-card-info { opacity: 1; }
.project-card-info:hover {
  color: var(--ink-1);
  background: var(--line);
}

.project-card-name {
  font-weight: 500;
  padding-right: 20px;
}

.project-card-code {
  color: var(--ink-3);
  font-weight: 400;
}

.project-card-sponsor {
  color: var(--ink-3);
}

/* Bottom row — effort left, deps right */
.project-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: var(--s8);
  gap: var(--s8);
}

.project-card-effort {
  font-size: var(--t-12);
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 2px 6px;
  border: 1px solid var(--ink-3);
  border-radius: 3px;
  background: var(--surface);
}

.project-card-deps {
  display: flex;
  gap: var(--s4);
  font-size: var(--t-12);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.project-card-dep {
  letter-spacing: 0.01em;
  padding: 2px 6px;
  border-radius: 3px;
}

.dep-needs { color: #0e8a9e; background: rgba(14, 138, 158, 0.1); }
.dep-blocks { color: #c87a1a; background: rgba(200, 122, 26, 0.1); }
[data-theme="dark"] .dep-needs { color: #3cc0d4; background: rgba(60, 192, 212, 0.12); }
[data-theme="dark"] .dep-blocks { color: #e8a545; background: rgba(232, 165, 69, 0.12); }

/* ── Card dependency highlighting ── */
.project-card--dimmed {
  opacity: 0.25;
  transition: opacity var(--dt-fast);
}
.project-card--focused {
  border-color: var(--ink-1);
  box-shadow: var(--shadow-sm);
}
.project-card--needs {
  border-color: #0e8a9e;
  background: rgba(14, 138, 158, 0.08);
}
.project-card--enables {
  border-color: #c87a1a;
  background: rgba(200, 122, 26, 0.08);
}
.project-card--both {
  border-image: linear-gradient(135deg, #0e8a9e 50%, #c87a1a 50%) 1;
  background: linear-gradient(135deg, rgba(14, 138, 158, 0.08) 50%, rgba(200, 122, 26, 0.08) 50%);
}
/* Dark mode */
[data-theme="dark"] .project-card--needs {
  border-color: #3cc0d4;
  background: rgba(60, 192, 212, 0.1);
}
[data-theme="dark"] .project-card--enables {
  border-color: #e8a545;
  background: rgba(232, 165, 69, 0.1);
}
[data-theme="dark"] .project-card--both {
  border-image: linear-gradient(135deg, #3cc0d4 50%, #e8a545 50%) 1;
  background: linear-gradient(135deg, rgba(60, 192, 212, 0.1) 50%, rgba(232, 165, 69, 0.1) 50%);
}

/* Title click navigates — underline hint on hover */
.project-card-name {
  cursor: pointer;
}
.project-card-name:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   PAGE LOADING
   ============================================ */

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ============================================
   INBOX PAGE
   ============================================ */

/* ── Inbox list cards ── */
.inbox-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  padding: var(--s16);
  cursor: pointer;
  transition: all var(--dt-fast);
}
.inbox-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.inbox-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s12);
}

.inbox-card-name {
  font-size: var(--t-15);
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.3;
}

.inbox-card-goal {
  font-size: var(--t-13);
  color: var(--ink-2);
  margin-top: var(--s4);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inbox-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s8);
  margin-top: var(--s12);
  flex-wrap: wrap;
}

.inbox-card-actions {
  display: flex;
  gap: var(--s4);
  flex-shrink: 0;
}

/* ── Initiative form layout ── */
.initiative-form {
  max-width: 720px;
}

/* Split layout: form left, timeline right (edit mode) */
.initiative-form-split {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--s16);
  align-items: start;
}
.initiative-form-split-left {
  min-width: 0;
}
.initiative-form-split-right {
  min-width: 0;
}

@media (max-width: 1024px) {
  .initiative-form-split {
    grid-template-columns: 1fr;
  }
  .initiative-form-split-right {
    max-height: none;
  }
}

/* Form font overrides — inputs +2pt, titles +1pt */
.initiative-form .section-label {
  font-size: var(--t-11);
}
.initiative-form .form-label {
  font-size: var(--t-12);
}
.initiative-form .form-input--bare {
  font-size: var(--t-15);
}
.initiative-form .form-input--bare.bare-title {
  font-size: 1.375rem; /* 22px, up from 20px */
}
.initiative-form .selectable {
  font-size: var(--t-14);
}
.initiative-form .bullet-text {
  font-size: var(--t-15);
}
.initiative-form .tag-input-field {
  font-size: var(--t-15);
}
.initiative-form .form-input {
  font-size: var(--t-15);
}

/* ── Stage tabs (within initiative form) ── */
.initiative-form .tabs {
  margin-top: var(--s4);
  margin-bottom: var(--s20);
}

.stage-placeholder {
  padding: var(--s24) 0;
  color: var(--ink-3);
  font-size: var(--t-14);
}

.form-back {
  display: inline-flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--t-12);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: var(--s24);
  transition: color var(--dt-fast);
}
.form-back:hover { color: var(--ink-1); }

/* ── Form sections — separated by rules ── */
.form-section {
  padding-bottom: var(--s20);
  margin-bottom: var(--s20);
  border-bottom: 1px solid var(--line);
}
.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}
/* Skip section rule when last element already has a bottom border */
.initiative-form .form-section:has(> :last-child .form-input--bare),
.initiative-form .form-section:has(> :last-child .tag-input-container) {
  border-bottom: none;
}

/* ── Editable bullet list (deliverables) ── */
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s8);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line);
}
.bullet-item:last-child {
  border-bottom: none;
}

.bullet-marker {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  background: var(--ink-3);
  margin-top: 8px;
}

.bullet-text {
  flex: 1;
  font-size: var(--t-13);
  color: var(--ink-1);
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
  font-family: var(--font);
  line-height: 1.5;
  resize: none;
  overflow: hidden;
}
.bullet-text::placeholder {
  color: var(--ink-3);
}

.bullet-remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 0;
  opacity: 0;
  transition: all var(--dt-fast);
}
.bullet-item:hover .bullet-remove {
  opacity: 1;
}
.bullet-remove:hover {
  color: var(--err);
}

.bullet-add {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) 0;
  font-size: var(--t-12);
  color: var(--ink-3);
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--dt-fast);
}
.bullet-add:hover {
  color: var(--accent);
}

/* ── Collaborator Row ── */
.collaborator-row {
  display: flex;
  align-items: center;
  gap: var(--s8);
  padding: var(--s8) 0;
  border-bottom: 1px solid var(--line);
}

.collaborator-name {
  flex: 1;
  font-size: var(--t-13);
  font-weight: 500;
  color: var(--ink-1);
}

.collaborator-allocation {
  width: 48px;
  text-align: right;
  font-size: var(--t-12);
  font-family: var(--font-mono);
  color: var(--ink-2);
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 2px 0;
  background: transparent;
  outline: none;
}
.collaborator-allocation:focus {
  border-bottom-color: var(--accent);
}

/* ── Autosuggest Dropdown ── */
.autosuggest-wrapper {
  position: relative;
}

.autosuggest-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: none;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.autosuggest-option {
  padding: var(--s8) var(--s12);
  font-size: var(--t-13);
  color: var(--ink-1);
  cursor: pointer;
  transition: background var(--dt-fast);
}
.autosuggest-option:hover {
  background: var(--accent-dim);
}

.autosuggest-search {
  width: 100%;
  padding: var(--s8) var(--s12);
  font-size: var(--t-13);
  border: none;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-1);
  outline: none;
  position: sticky;
  top: 0;
  box-sizing: border-box;
}

.autosuggest-create {
  color: var(--accent);
  font-weight: 500;
  border-top: 1px solid var(--line);
}

/* ── Form footer ── */
.form-footer {
  display: flex;
  gap: var(--s8);
  justify-content: flex-end;
  padding-top: var(--s16);
  border-top: 1px solid var(--line);
  margin-top: var(--s24);
}

/* ── Two-col form grid ── */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16);
}

/* ── Completion bar (horizontal segments) ── */
.completion-bar {
  display: flex;
  gap: 2px;
  align-items: center;
}

.completion-seg {
  width: 8px;
  height: 3px;
  background: var(--line);
}
.completion-seg.filled {
  background: var(--accent);
}

/* ── Project select (for dependencies) ── */
.project-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s8);
  padding: var(--s4) var(--s8);
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  font-size: var(--t-13);
}

/* ── Tag input (infrastructure) ── */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line);
  min-height: 32px;
  cursor: text;
  transition: border-color var(--dt-fast);
}
.tag-input-container:focus-within {
  border-bottom-color: var(--accent);
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: var(--s4);
  padding: 2px 6px;
  font-size: var(--t-12);
  font-weight: 500;
  background: var(--bg-inset);
  color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r1);
}

.tag-remove {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 0;
  transition: color var(--dt-fast);
}
.tag-remove:hover {
  color: var(--err);
}

.tag-input-field {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  font-size: var(--t-13);
  font-family: var(--font);
  background: transparent;
  color: var(--ink-1);
  padding: 2px 0;
}
.tag-input-field::placeholder {
  color: var(--ink-3);
}

/* ============================================
   LIST PAGE
   ============================================ */

.list-row-clickable {
  cursor: pointer;
  transition: background var(--dt-fast);
}
.list-row-clickable:hover td {
  background: var(--accent-dim);
}
.list-row-selected td {
  background: var(--accent-dim);
}

/* ── Detail panel sections ── */
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  margin-bottom: var(--s20);
}

.detail-section {
  padding-bottom: var(--s20);
  margin-bottom: var(--s20);
  border-bottom: 1px solid var(--line);
}
.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-label {
  font-size: var(--t-10);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s8);
}

.detail-text {
  font-size: var(--t-14);
  color: var(--ink-1);
  line-height: 1.65;
  white-space: pre-line;
}

.detail-list {
  margin: 0;
  padding-left: var(--s16);
  font-size: var(--t-14);
  color: var(--ink-1);
  line-height: 1.65;
}
.detail-list li { margin-bottom: var(--s4); }
.detail-list li:last-child { margin-bottom: 0; }

.detail-row {
  font-size: var(--t-14);
  color: var(--ink-1);
  margin-bottom: var(--s8);
  display: flex;
  align-items: baseline;
  gap: var(--s8);
}
.detail-row:last-child { margin-bottom: 0; }

.detail-row-label {
  font-weight: 600;
  font-size: var(--t-12);
  color: var(--ink-2);
  min-width: 80px;
  flex-shrink: 0;
}

.detail-collabs {
  margin-top: var(--s8);
  display: flex;
  flex-direction: column;
}

.detail-collab {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-14);
  padding: var(--s8) 0;
  border-bottom: 1px solid var(--line);
}
.detail-collab:last-child {
  border-bottom: none;
}

.detail-dep-group {
  margin-bottom: var(--s16);
}
.detail-dep-group:last-child {
  margin-bottom: 0;
}

.detail-dep-item {
  font-size: var(--t-14);
  color: var(--ink-1);
  padding: var(--s4) 0 var(--s4) var(--s12);
  border-left: 2px solid var(--accent-mid);
  margin-bottom: var(--s4);
}
.detail-dep-item:last-child { margin-bottom: 0; }

/* ============================================
   CALENDAR MEETINGS (in detail panel)
   ============================================ */

.meeting-item {
  position: relative;
  padding: var(--s8) 0;
  border-bottom: 1px solid var(--line);
}
.meeting-item:last-child {
  border-bottom: none;
}

.meeting-date {
  font-size: var(--t-11);
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.meeting-subject {
  font-size: var(--t-14);
  color: var(--ink-1);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 30ch;
}

.meeting-meta {
  display: flex;
  align-items: center;
  gap: var(--s12);
  margin-top: var(--s4);
  font-size: var(--t-12);
  color: var(--ink-3);
}

.meeting-join {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.meeting-join:hover {
  text-decoration: underline;
}

.meetings-group {
  margin-bottom: var(--s12);
}
.meetings-group:last-child {
  margin-bottom: 0;
}

.meetings-group-label {
  font-size: var(--t-11);
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s8);
  margin-top: var(--s8);
}

/* Meeting header — label + add button */
.meeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
}

/* Cancelled meetings */
.meeting-item--cancelled {
  opacity: 0.55;
}
.meeting-subject--cancelled {
  text-decoration: line-through;
  color: var(--ink-3);
}
.meeting-badge--cancelled {
  display: inline-block;
  font-size: var(--t-10);
  font-weight: 600;
  color: #c53030;
  background: #fff5f5;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* Combined info line (attendees · location · duration) */
.meeting-info {
  font-size: var(--t-12);
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meeting-info-sep::before { content: ' · '; }

/* Action bar for meeting/transcription entries */
.meeting-actions {
  display: flex;
  align-items: center;
  gap: var(--s8);
  margin-top: var(--s4);
  font-size: var(--t-12);
}

/* Hover-reveal for secondary actions */
.meeting-actions .meeting-delete-btn,
.meeting-actions .meeting-attach-btn {
  opacity: 0;
  transition: opacity var(--dt-fast);
}
.meeting-item:hover .meeting-actions .meeting-delete-btn,
.meeting-item:hover .meeting-actions .meeting-attach-btn {
  opacity: 1;
}

/* Inline icon utility */
.timeline-icon {
  display: inline-flex;
  vertical-align: -1px;
  margin-right: 4px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Link/unlink buttons */
.meeting-link-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--t-12);
  color: var(--ink-3);
  padding: 2px;
  border-radius: var(--r1);
  transition: color var(--dt-fast);
}
.meeting-link-btn:hover {
  color: var(--accent);
}

/* Link dropdown */
.meeting-link-dropdown {
  position: relative;
  display: inline-flex;
}
.meeting-link-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r8);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  max-height: 180px;
  overflow-y: auto;
  padding: var(--s4) 0;
  margin-top: 2px;
}
.meeting-link-option {
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
  padding: var(--s4) var(--s8);
  font-size: var(--t-12);
  color: var(--ink-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.meeting-link-option:hover {
  background: var(--bg-inset);
}

/* Source indicator */
.meeting-source {
  font-size: var(--t-10);
  color: var(--ink-3);
  margin-left: auto;
}

/* Transcript button (dummy) */
.meeting-transcript-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--t-12);
  color: var(--ink-3);
}
.meeting-transcript-btn:hover {
  color: var(--accent);
}

/* Delete button for manual meetings */
.meeting-delete-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--r4);
  color: var(--ink-3);
}
.meeting-delete-btn:hover {
  color: #c53030;
  background: #fff5f5;
}

/* Inline meeting form */
.meeting-form {
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  padding: var(--s12);
  margin-bottom: var(--s12);
  border: 1px solid var(--line);
  border-radius: var(--r8);
  background: var(--bg-inset);
}

/* Calendar sync button */
.calendar-sync-btn.active {
  background: var(--accent-dim);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin {
  animation: spin 1s linear infinite;
}

/* ============================================
   Detail Panel Split Layout
   ============================================ */


/* ============================================
   Timeline Entry Variants
   ============================================ */

.timeline-entry--transcription {
  border-left: 3px solid var(--accent);
  padding-left: var(--s8);
}
.timeline-entry--event {
  border-left: 3px solid var(--accent);
  padding-left: var(--s8);
}
.timeline-entry--combined {
  border-left: 3px solid var(--accent-dim);
  padding-left: var(--s8);
}

/* Activity dot — accent indicator for entries with reply threads */
.timeline-activity-dot {
  position: absolute;
  top: var(--s8);
  right: -14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Comment entries in timeline */
.timeline-entry--comment {
  padding-left: var(--s8);
  border-left: 3px solid var(--line);
  border-bottom: none;
  margin-bottom: 35px;
}
.timeline-comment-header {
  display: flex;
  align-items: center;
  gap: var(--s8);
  margin-bottom: 2px;
}

/* Active transcript button (linked) */
.meeting-transcript-btn--active {
  color: var(--accent) !important;
  font-weight: 500;
  cursor: pointer;
}
.meeting-transcript-btn--active:hover {
  text-decoration: underline;
}

/* Disabled transcript button */
.meeting-transcript-btn--disabled {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--t-12);
  color: var(--ink-3);
  opacity: 0.5;
  cursor: default;
}

/* Inline summary snippet for transcription entries */
.transcript-summary-inline {
  font-size: var(--t-12);
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: var(--s4);
  background: var(--bg-inset);
  border-radius: var(--r4);
  padding: var(--s4) var(--s8);
}
/* Project code tag in timeline transcription date row */
.transcript-code {
  display: inline-block;
  margin-left: var(--s6);
  font-size: var(--t-11);
  color: var(--ink-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ============================================
   Transcript styles (modal uses design-kit)
   ============================================ */

.transcript-summary {
  background: var(--bg-inset);
  border-radius: var(--r8);
  padding: var(--s12);
  font-size: var(--t-13);
  color: var(--ink-2);
  line-height: 1.6;
  white-space: pre-wrap;
}

.transcript-text {
  font-size: var(--t-13);
  color: var(--ink-1);
  line-height: 1.7;
  white-space: pre-wrap;
  font-family: inherit;
}

/* Grouped speaker blocks */
.transcript-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--s12);
}
.transcript-block {
  padding-bottom: var(--s12);
  border-bottom: 1px solid var(--line);
}
.transcript-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.transcript-block-header {
  display: flex;
  align-items: baseline;
  gap: var(--s8);
  margin-bottom: var(--s4);
}
.transcript-speaker {
  font-size: var(--t-13);
  font-weight: 600;
}
.transcript-time {
  font-size: var(--t-11);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.transcript-block-text {
  font-size: var(--t-13);
  color: var(--ink-1);
  line-height: 1.65;
}

/* ============================================
   TASK MANAGEMENT (Kanban Board)
   ============================================ */

/* ── Task Card (compact kanban card) ── */

.task-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  padding: var(--s12);
  font-size: var(--t-13);
  color: var(--ink-1);
  cursor: grab;
  transition: border-color var(--dt-fast), box-shadow var(--dt-fast);
  line-height: 1.4;
  user-select: none;
  min-height: 100px;
  display: flex;
  flex-direction: column;
}
.task-card:hover {
  border-color: var(--accent);
}
.task-card:active {
  cursor: grabbing;
}
.task-card:hover .project-card-info { opacity: 1; }

.task-card-title {
  font-weight: 500;
  font-size: var(--t-13);
  cursor: pointer;
  padding-right: var(--s16);
}
.task-card-title:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.task-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: auto;
  padding-top: var(--s8);
}

.task-card-due {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--t-11);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.task-card-due--overdue {
  color: #c53030;
}

.task-card-assignee {
  font-size: var(--t-11);
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

/* ── Cell hover "+" button ── */

.kanban-cell-add {
  opacity: 0;
  transition: opacity var(--dt-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
  border: 1px dashed var(--line);
  border-radius: var(--r1);
  cursor: pointer;
  color: var(--ink-3);
  font-size: var(--t-12);
  margin-top: var(--s4);
}
.matrix-grid-cell:hover .kanban-cell-add {
  opacity: 1;
}
.kanban-cell-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Quick add form (inline in cell) ── */

.kanban-quick-add {
  display: flex;
  gap: var(--s4);
  margin-top: var(--s4);
}
.kanban-quick-add .form-input {
  font-size: var(--t-12);
  padding: var(--s4) var(--s8);
  flex: 1;
}

/* ── Kanban row label (vertical project name) ── */

.kanban-row-label {
  font-size: var(--t-11);
  letter-spacing: 0.08em;
  gap: var(--s8);
  padding: var(--s12) var(--s4);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-all;
  line-height: 1.4;
}
.kanban-row-code {
  font-size: var(--t-10);
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* ── Task filters toolbar ── */

.tasks-toolbar {
  display: flex;
  align-items: center;
  gap: var(--s12);
  padding: var(--s12) var(--s16);
  flex-wrap: wrap;
}

.tasks-toolbar select {
  font-size: var(--t-13);
  padding: var(--s4) var(--s8);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--surface);
  color: var(--ink-1);
  min-width: 140px;
}

/* ── Task detail metadata grid ── */

.task-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s12);
}
.task-detail-meta-field {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.task-detail-meta-label {
  font-size: var(--t-11);
  font-weight: 500;
  color: var(--ink-3);
}

/* ── Task detail dependency groups ── */

.task-detail-deps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16);
}
.task-detail-dep-group {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

/* ── Task dependency picker ── */

.task-dep-picker {
  padding: var(--s12);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--bg-inset);
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}
.task-dep-picker-title {
  font-size: var(--t-12);
  font-weight: 600;
  color: var(--ink-1);
}
.task-dep-picker-list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-height: 200px;
  overflow-y: auto;
}
.task-dep-picker-item {
  display: flex;
  align-items: center;
  gap: var(--s8);
  padding: var(--s4) var(--s8);
  font-size: var(--t-12);
  color: var(--ink-1);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--dt-fast);
}
.task-dep-picker-item:hover {
  border-color: var(--accent);
}
.task-dep-picker-item-status {
  font-size: var(--t-11);
  color: var(--ink-3);
  margin-left: auto;
  flex-shrink: 0;
}
.task-dep-picker-create {
  display: flex;
  gap: var(--s4);
}
.task-dep-picker-create .form-input {
  font-size: var(--t-12);
}

/* ── Task timeline (in detail panel) ── */

.task-updates-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.task-updates-list--collapsed {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}
.task-updates-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s4);
  width: 100%;
  padding: var(--s4) 0;
  border: none;
  background: none;
  font-size: var(--t-12);
  color: var(--ink-3);
  cursor: pointer;
  font-family: inherit;
  transition: color var(--dt-fast);
}
.task-updates-expand:hover { color: var(--accent); }

.task-update {
  padding: var(--s8) 0;
  border-bottom: 1px solid var(--line);
}
.task-update:last-child {
  border-bottom: none;
}

.task-update-header {
  display: flex;
  align-items: baseline;
  gap: var(--s8);
  margin-bottom: var(--s4);
}
.task-update-author {
  font-size: var(--t-12);
  font-weight: 600;
  color: var(--ink-1);
}
.task-update-time {
  font-size: var(--t-11);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.task-update-type {
  font-size: var(--t-11);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.task-update-actions {
  margin-left: auto;
  display: flex;
  gap: var(--s4);
  opacity: 0;
  transition: opacity 0.15s;
}
.task-update:hover .task-update-actions { opacity: 1; }
.task-update-actions .btn-icon {
  width: 20px;
  height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  border-radius: var(--r1);
}
.task-update-actions .btn-icon:hover { color: var(--ink-1); background: var(--bg-inset); }

.task-update-content {
  font-size: var(--t-13);
  color: var(--ink-1);
  line-height: 1.6;
  white-space: pre-line;
}
.task-update-edit .form-input--bare {
  font-size: var(--t-13);
  min-height: 40px;
}

.task-update--nested {
  border-left: 2px solid var(--line);
}

.task-update-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s4);
  margin-top: var(--s4);
  padding: 0;
  border: none;
  background: none;
  font-size: var(--t-11);
  color: var(--ink-3);
  cursor: pointer;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.15s;
}
.task-update:hover .task-update-reply-btn { opacity: 1; }
.task-update-reply-btn:hover { color: var(--accent); }

.task-update-inline-reply {
  padding: var(--s8) 0 var(--s8) var(--s16);
  border-left: 2px solid var(--accent);
  margin-bottom: var(--s4);
}
.task-update-inline-reply .form-input--bare {
  font-size: var(--t-13);
  min-height: 32px;
}

/* ── Task update input ── */

.task-update-form {
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  margin-top: var(--s8);
}

.task-update-form .form-input--bare {
  font-size: var(--t-13);
  min-height: 32px;
}

.task-update-form-actions {
  display: flex;
  gap: var(--s8);
}

/* ── Task dependency chips ── */

.task-dep-list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.task-dep-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s8);
  font-size: var(--t-12);
  padding: var(--s4) var(--s8);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r1);
}

.task-dep-item-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-dep-item-status {
  font-size: var(--t-11);
  color: var(--ink-3);
}

/* ── Create task modal ── */

.create-task-form {
  display: flex;
  flex-direction: column;
  gap: var(--s12);
}

/* ── Kanban grid cell gaps ── */

.matrix-grid-cell .task-card + .task-card {
  margin-top: var(--s4);
}

/* ============================================
   ROLES & PERMISSIONS
   ============================================ */

/* Direction badge in sidebar */
.badge-direction {
  background: var(--accent-bg, rgba(0,112,243,0.08));
  color: var(--accent);
  font-size: var(--t-10);
  padding: 2px 6px;
  border-radius: var(--r1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Status events in timeline (compact divider style) ── */

.timeline-entry--setup_change,
.timeline-entry--task_event {
  background: none !important;
  border: none !important;
  padding: var(--s4) 0 !important;
}

.timeline-status-line {
  display: flex;
  align-items: center;
  gap: var(--s8);
}

.timeline-status-date {
  font-size: var(--t-11);
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-status-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  min-width: 12px;
}

.timeline-status-text {
  font-size: var(--t-12);
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 30ch;
}

.timeline-status-text--link {
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
}
.timeline-status-text--link:hover {
  color: var(--accent);
}

.timeline-status-actor {
  font-size: var(--t-11);
  color: var(--ink-4);
  text-align: center;
  margin-top: 1px;
}

/* ── Reply threads on timeline entries ── */

.timeline-entry-thread {
  margin-top: var(--s4);
}

.timeline-entry-thread-actions {
  display: flex;
  gap: var(--s8);
  opacity: 0;
  transition: opacity var(--dt-fast);
}

.meeting-item:hover .timeline-entry-thread-actions,
.timeline-entry-thread:has(.timeline-entry-comments) .timeline-entry-thread-actions { opacity: 1; }

.timeline-entry-reply-btn {
  font-size: var(--t-11) !important;
  color: var(--ink-3);
  padding: 2px var(--s4) !important;
}
.timeline-entry-reply-btn:hover { color: var(--accent); }

.timeline-entry-comments {
  margin-top: var(--s4);
  padding-left: var(--s12);
  border-left: 2px solid var(--line);
}

.project-comments-section {
  margin-top: var(--s8);
}

/* ── @Mention dropdown ── */

.mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  box-shadow: var(--shadow-md);
  z-index: 100;
  margin-bottom: 4px;
}

.mention-group-label {
  font-size: var(--t-11);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--s4) var(--s8);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.mention-option {
  display: flex;
  align-items: center;
  gap: var(--s8);
  width: 100%;
  padding: var(--s4) var(--s8);
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: var(--t-13);
  color: var(--ink-1);
}
.mention-option:hover,
.mention-option--selected {
  background: var(--accent-bg, rgba(0,112,243,0.06));
}

.mention-option-initials {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-bg, rgba(0,112,243,0.08));
  color: var(--accent);
  font-size: var(--t-11);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mention-option-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-option-role {
  font-size: var(--t-11);
  color: var(--ink-3);
  text-transform: capitalize;
}

/* ── Mention highlight in content ── */

.mention-highlight {
  color: var(--accent);
  font-weight: 600;
}

/* ── Tagged users bar ── */

.tagged-users-bar {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--t-11);
  color: var(--ink-3);
  flex-wrap: wrap;
}

.tagged-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--accent-bg, rgba(0,112,243,0.08));
  color: var(--accent);
  padding: 1px 6px;
  border-radius: var(--r1);
  font-size: var(--t-11);
  font-weight: 500;
}

.tagged-user-remove {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.7;
}
.tagged-user-remove:hover {
  opacity: 1;
}

/* ── Visibility badges ── */

.visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--t-10);
  padding: 1px 4px;
  border-radius: var(--r1);
}

.visibility-badge--project {
  color: var(--ink-3);
}

.visibility-badge--public {
  color: var(--accent);
}

/* ── Project questions section ── */

.project-questions-section {
  border-top: 1px solid var(--line);
  margin-top: var(--s8);
}

/* ── Permission matrix (admin panel) ── */

.permission-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-13);
}

.permission-matrix th {
  text-align: left;
  padding: var(--s8);
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 2px solid var(--line);
  font-size: var(--t-12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.permission-matrix td {
  padding: var(--s8);
  border-bottom: 1px solid var(--line);
  color: var(--ink-1);
}

.permission-matrix tr:last-child td {
  border-bottom: none;
}

.permission-check {
  color: var(--accent);
  font-weight: 600;
}

.permission-conditional {
  color: var(--ink-3);
  font-size: var(--t-12);
  font-style: italic;
}

.permission-denied {
  color: var(--ink-4, #ccc);
}

/* ═══════════════════════════════════════════ */
/* Notification Bell                           */
/* ═══════════════════════════════════════════ */

.notification-bell {
  position: relative;
}

.notification-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--ink-2);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r1);
  transition: color 0.15s;
}
.notification-bell-btn:hover {
  color: var(--ink-1);
  background: var(--bg-inset);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--err);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.15));
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.notification-dropdown-title {
  font-weight: 600;
  font-size: var(--t-13);
}

.notification-dropdown-list {
  overflow-y: auto;
  flex: 1;
}

.notification-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: var(--t-13);
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--bg-inset); }

.notification-item--unread {
  background: var(--accent-dim, rgba(var(--accent-rgb, 99,102,241), 0.06));
}

.notification-item-title {
  font-weight: 600;
  font-size: var(--t-13);
  margin-bottom: 2px;
}

.notification-item-body {
  font-size: var(--t-12);
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item-time {
  font-size: var(--t-11);
  color: var(--ink-3);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════ */
/* Inbox Tabs                                  */
/* ═══════════════════════════════════════════ */

.inbox-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s20);
}

.inbox-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: var(--t-13);
  font-weight: 500;
  color: var(--ink-3);
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inbox-tab:hover { color: var(--ink-1); }
.inbox-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--err);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
}

/* ═══════════════════════════════════════════ */
/* Change Request Cards                        */
/* ═══════════════════════════════════════════ */

.cr-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: var(--s16);
}

.cr-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r8);
  padding: 14px 18px;
  transition: border-color 0.15s;
}
.cr-card:hover { border-color: var(--accent); }

.cr-card--pending {
  border-left: 3px solid var(--accent);
}

.cr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cr-card-project {
  font-weight: 600;
  font-size: var(--t-14);
}

.cr-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: var(--t-12);
  color: var(--ink-3);
}

.cr-card-comment {
  font-style: italic;
  color: var(--ink-2);
}

.badge-cr-pending { background: var(--accent); color: #fff; }
.badge-cr-approved { background: var(--ok, #22c55e); color: #fff; }
.badge-cr-rejected { background: var(--err); color: #fff; }

/* ═══════════════════════════════════════════ */
/* Change Request Review                       */
/* ═══════════════════════════════════════════ */

.cr-review {
  max-width: 800px;
}

.cr-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s12);
}
.cr-review-header h3 { margin: 0; }

.cr-review-meta {
  display: flex;
  gap: 16px;
  font-size: var(--t-12);
  color: var(--ink-3);
  margin-bottom: var(--s16);
}

.staleness-warning {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: var(--r6);
  padding: 10px 14px;
  font-size: var(--t-12);
  color: var(--ink-1);
  margin-bottom: var(--s16);
}

.cr-no-changes {
  padding: 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: var(--t-13);
}

.cr-diff-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--s20);
}

.diff-entry {
  border: 1px solid var(--border);
  border-radius: var(--r6);
  overflow: hidden;
}

.diff-field-label {
  background: var(--surface-2);
  padding: 8px 14px;
  font-weight: 600;
  font-size: var(--t-12);
  border-bottom: 1px solid var(--border);
}

.diff-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.diff-old, .diff-new {
  padding: 10px 14px;
  font-size: var(--t-12);
  overflow: hidden;
}
.diff-old {
  background: rgba(239, 68, 68, 0.04);
  border-right: 1px solid var(--border);
}
.diff-new {
  background: rgba(34, 197, 94, 0.04);
}

.diff-label {
  font-size: var(--t-11);
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.diff-old .diff-label { color: var(--err); }
.diff-new .diff-label { color: var(--ok, #22c55e); }

.diff-old pre, .diff-new pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: var(--t-12);
}

.cr-review-actions {
  border-top: 1px solid var(--border);
  padding-top: var(--s16);
}

.cr-review-actions textarea {
  width: 100%;
  margin-bottom: var(--s12);
}

.cr-review-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ═══════════════════════════════════════════ */
/* Direction Banner                            */
/* ═══════════════════════════════════════════ */

.direction-banner {
  background: var(--accent-dim, rgba(var(--accent-rgb, 99,102,241), 0.08));
  border: 1px solid var(--accent);
  border-radius: var(--r6);
  padding: 10px 16px;
  font-size: var(--t-13);
  color: var(--ink-1);
  margin-bottom: var(--s16);
}

.direction-banner--success {
  background: rgba(34, 197, 94, 0.08);
  border-color: var(--ok, #22c55e);
}

.direction-banner--error {
  background: rgba(239, 68, 68, 0.08);
  border-color: var(--err);
}

/* ============================================
   ATTACHMENTS (file picker + attachment list)
   ============================================ */

.attachment-picker {
  display: contents;
}

.attachment-picker-btn {
  color: var(--ink-3);
  padding: var(--s4);
  border-radius: var(--r1);
  transition: color var(--dt-fast);
}
.attachment-picker-btn:hover {
  color: var(--accent);
}

.attachment-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  padding: var(--s4) 0;
  width: 100%;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s4);
  padding: 2px var(--s8) 2px var(--s6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r1);
  font-size: var(--t-11);
  color: var(--ink-2);
  max-width: 260px;
}

.attachment-chip svg {
  flex-shrink: 0;
  color: var(--ink-3);
}

.attachment-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-1);
}

.attachment-chip--download .attachment-chip-name {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.attachment-chip--download .attachment-chip-name:hover {
  text-decoration: underline;
}

.attachment-chip-size {
  flex-shrink: 0;
  color: var(--ink-3);
  font-size: var(--t-10);
}

.attachment-chip-remove {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 50%;
  color: var(--ink-3);
  transition: color var(--dt-fast);
}
.attachment-chip-remove:hover {
  color: var(--err);
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-top: var(--s4);
}

/* Attach button in meeting meta row */
.meeting-attach-btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  color: var(--ink-3);
  padding: 2px;
  border-radius: var(--r1);
  transition: color var(--dt-fast);
}
.meeting-attach-btn:hover {
  color: var(--accent);
}

/* Attachment form actions layout */
.task-update-form-actions {
  display: flex;
  align-items: center;
  gap: var(--s8);
  margin-top: var(--s4);
}

/* ── Header Search ── */
.header-search {
  display: flex;
  align-items: center;
  position: relative;
}
.header-search-input {
  width: 180px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r2, 4px);
  background: transparent;
  padding: 0 var(--s24, 24px) 0 var(--s28, 28px);
  font-size: var(--t-12, 12px);
  color: var(--ink-1);
  transition: border-color 0.15s, width 0.15s;
}
.header-search-input::placeholder { color: var(--ink-3); }
.header-search-input:focus {
  border-color: var(--accent);
  outline: none;
  width: 240px;
}
.header-search-icon {
  position: absolute;
  left: 8px;
  color: var(--ink-3);
  pointer-events: none;
}
.header-search-clear {
  position: absolute;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
}
.header-search-clear:hover { color: var(--ink-1); background: var(--accent-dim, rgba(0,0,0,0.05)); }

/* ── Draft Save ── */
.draft-banner {
  background: var(--accent-dim, rgba(var(--accent-rgb, 99,102,241), 0.08));
  border: 1px solid var(--accent);
  border-radius: var(--r6, 6px);
  padding: var(--s8, 8px) var(--s16, 16px);
  margin-bottom: var(--s16, 16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--t-13, 13px);
  color: var(--ink-2);
}
.draft-indicator {
  font-size: var(--t-11, 11px);
  color: var(--ink-3);
  margin-left: var(--s8, 8px);
}

/* ── My Submissions ── */
.my-submissions {
  margin-bottom: var(--s24, 24px);
}
.my-submissions-header {
  display: flex;
  align-items: center;
  gap: var(--s8, 8px);
  margin-bottom: var(--s12, 12px);
}

/* ── Grid No Results ── */
.grid-no-results {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: var(--s32, 32px);
}
