/* Menu bar */

.menu-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--menu-bar-height);
  padding: 0 var(--gutter-size);
  background: var(--bg-gutter);
  flex-shrink: 0;
  gap: 1px;
}

.menu-bar-icons {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* Windows mirrors macOS: the app icons move to the LEFT corner (past the
   centered tabs) so the RIGHT corner is left for the window controls — both
   corners used, like macOS's traffic-lights-left / icons-right. Cancelling the
   base margin-left:auto and adding margin-right:auto seats the block at the left
   and pushes the window-controls cluster (next sibling) to the right edge.
   row-reverse keeps the order account, settings, help, connections, windows —
   the mirror image of the macOS right-corner cluster. */
.menu-bar-icons--reversed {
  flex-direction: row-reverse;
  margin-left: 0;
  margin-right: auto;
}

.menu-item--icon .menu-bar-icon-btn:hover,
.menu-item--icon.menu-item--open .menu-bar-icon-btn {
  background: var(--bg-hover-strong);
}

.menu-bar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.menu-bar-icon-btn img {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

.menu-bar-icon-btn:hover {
  background: var(--bg-hover-strong);
}

.menu-bar-icon-btn:hover img {
  opacity: 1;
}

/* Windows frameless-window controls (minimize / maximize-restore / close).
   Full-height, square-ish buttons hugging the physical top-right corner so
   they're Fitts's-law corner targets. The .menu-bar has padding 0 var(
   --gutter-size); negating it on the right lets the close button reach the
   window edge with no gap. */
.menu-bar-window-controls {
  display: flex;
  align-items: stretch;
  margin-right: calc(-1 * var(--gutter-size));
  margin-left: 4px;
}

.menu-bar-window-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: var(--menu-bar-height);
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition);
}

.menu-bar-window-control img {
  width: 16px;
  height: 16px;
  opacity: 0.85;
  transition: opacity var(--transition);
}

.menu-bar-window-control:hover {
  background: var(--bg-hover-strong);
}

.menu-bar-window-control:hover img {
  opacity: 1;
}

/* Close follows the Windows convention: red hover with a full-opacity icon. */
.menu-bar-window-control--close:hover {
  background: #c42b1c;
}

.menu-bar-window-control--close:hover img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.menu-bar-server-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  margin-right: 4px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(227, 227, 227, 0.85);
  border-radius: var(--radius-md);
  background: transparent;
  color: rgba(227, 227, 227, 0.85);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.menu-bar-server-btn:hover {
  background: var(--bg-hover-strong);
  border-color: rgba(236, 236, 236, 1);
  color: var(--text-primary);
}

.menu-bar-server-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.menu-bar-server-icon {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.menu-bar-server-btn:hover .menu-bar-server-icon {
  opacity: 1;
}

/* Workspace tab buttons (centered) */

.menu-bar-tabs {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--menu-bar-tabs-offset-y));
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

/* Shared layout for both tab themes. Visual treatment (fills, borders, icon
   tint, opacity) comes from the theme rules below: the base rules are the
   default "browser" theme; .menu-bar-tabs--bold overrides them for the opt-in
   "bold" theme (every tab a grey pill, selected one full colour). */
.menu-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  /* Page-tab labels must never wrap; the pill always stays wide enough for its
     single line of text rather than shrinking and splitting it. */
  white-space: nowrap;
  flex-shrink: 0;
  /* Browser theme: unselected tabs are dimmed; the selected one goes full. */
  opacity: 0.6;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    opacity var(--transition);
}

.menu-tab-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  /* Grey by default (browser theme, unselected); tinted when selected/bold. */
  filter: var(--icon-muted-filter);
}

/* Vertical pipe between adjacent tabs — browser theme only (hidden in bold). */
.menu-tab-sep {
  width: 1px;
  height: 14px;
  background: var(--text-muted);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ---- Browser theme (default): only the selected tab is a grey pill -------- */
.menu-tab-btn:hover:not(.menu-tab-btn--active) {
  opacity: 1;
  color: var(--text-primary);
}

.menu-tab-btn--active {
  opacity: 1;
  background: var(--bg-panel);
  border-color: var(--outline);
  color: var(--text-primary);
  box-shadow: var(--shadow-panel);
}

.menu-tab-btn--active.menu-tab-btn--revision .menu-tab-icon {
  filter: var(--icon-revision-filter);
}

.menu-tab-btn--active.menu-tab-btn--organization .menu-tab-icon {
  filter: var(--icon-organization-filter);
}

.menu-tab-btn--active.menu-tab-btn--time .menu-tab-icon {
  filter: var(--icon-time-filter);
}

.menu-tab-btn--active.menu-tab-btn--administration .menu-tab-icon {
  filter: var(--icon-maroon-filter);
}

/* ---- Bold theme: every tab a grey pill; selected one full colour --------- */
.menu-bar-tabs--bold .menu-tab-sep {
  display: none;
}

.menu-bar-tabs--bold .menu-tab-btn {
  opacity: 1;
  border-color: var(--outline);
  background: var(--bg-panel);
  box-shadow: var(--shadow-panel);
}

.menu-bar-tabs--bold .menu-tab-btn:hover:not(.menu-tab-btn--active) {
  border-color: var(--outline-hover);
  color: var(--text-primary);
}

/* Bold tints every tab's icon, selected or not. */
.menu-bar-tabs--bold .menu-tab-btn--revision .menu-tab-icon {
  filter: var(--icon-revision-filter);
}

.menu-bar-tabs--bold .menu-tab-btn--organization .menu-tab-icon {
  filter: var(--icon-organization-filter);
}

.menu-bar-tabs--bold .menu-tab-btn--time .menu-tab-icon {
  filter: var(--icon-time-filter);
}

.menu-bar-tabs--bold .menu-tab-btn--administration .menu-tab-icon {
  filter: var(--icon-maroon-filter);
}

.menu-bar-tabs--bold .menu-tab-btn--active.menu-tab-btn--revision {
  background: #5680c2;
  border-color: #8ab0e8;
  color: #ffffff;
}

.menu-bar-tabs--bold .menu-tab-btn--active.menu-tab-btn--organization {
  background: var(--bg-organization-tab);
  border-color: var(--border-organization-tab);
  color: #ffffff;
}

.menu-bar-tabs--bold .menu-tab-btn--active.menu-tab-btn--time {
  background: #d4922a;
  border-color: #f0b04a;
  color: #ffffff;
}

.menu-bar-tabs--bold .menu-tab-btn--active.menu-tab-btn--administration {
  background: var(--bg-administration-tab);
  border-color: var(--border-administration-tab);
  color: #ffffff;
}

.menu-bar-tabs--bold .menu-tab-btn--active .menu-tab-icon {
  filter: brightness(0) invert(1);
}

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-item-label {
  padding: 0 10px;
  line-height: var(--menu-bar-height);
  font-size: 12px;
  color: var(--text-primary);
  text-shadow: var(--text-shadow);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: background var(--transition);
}

.menu-item:hover .menu-item-label,
.menu-item--open .menu-item-label {
  background: var(--bg-hover-strong);
}

.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background: var(--bg-menu);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  z-index: 200;
  padding: 4px;
  overflow: hidden;
}

.menu-item--open .menu-dropdown {
  display: block;
}

.menu-dropdown--align-right {
  left: auto;
  right: 0;
}

.menu-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: default;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  text-align: left;
}

.menu-dropdown-item:hover {
  background: var(--bg-hover);
}

.menu-dropdown-item--window:hover {
  background: var(--bg-hover);
}

.menu-window-bullet {
  display: inline-block;
  width: 12px;
  flex-shrink: 0;
  text-align: center;
  color: var(--text-primary);
}

.menu-dropdown-item--toggle.menu-dropdown-item--active {
  background: var(--bg-hover-strong);
}

.menu-dropdown-item--disabled {
  color: var(--text-disabled);
  pointer-events: none;
}

/* Tabs */

.panel-tabs {
  display: flex;
  height: var(--tab-height);
  padding: 4px 8px 0;
  gap: 4px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--outline-subtle);
  flex-shrink: 0;
}

.panel-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  height: 100%;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.tab-icon {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.tab-icon--repo {
  filter: var(--icon-repo-filter);
}

.tab-icon--workspace {
  filter: var(--icon-workspace-filter);
}

.panel-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.panel-tab--active {
  background: var(--bg-hover-strong);
  color: var(--text-primary);
}

.panel-tab--active .tab-icon {
  opacity: 1;
}

/* Path bar */

.path-bar {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  flex-shrink: 0;
}

.path-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.path-bar input:focus {
  border-color: var(--outline);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Toolbar */

.toolbar {
  display: flex;
  align-items: stretch;
  height: var(--toolbar-height);
  padding: 4px 6px;
  gap: 2px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--outline-subtle);
  flex-shrink: 0;
  overflow-x: auto;
}

.toolbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 6px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: default;
  gap: 3px;
  font-family: var(--font-ui);
  font-size: 10px;
  transition: background var(--transition);
  /* Labels like "Pull Latest"/"Add New" stay on one line; the toolbar scrolls
     (overflow-x) rather than squishing buttons into two-line text. */
  white-space: nowrap;
  flex-shrink: 0;
}

.toolbar-btn:hover {
  background: var(--bg-hover-strong);
}

.toolbar-btn img {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

.toolbar-btn:hover img {
  opacity: 1;
}

/* Busy overlay: while a transfer or rescan runs, the toolbar blurs behind a
   spinner strip so a long operation reads as working, not hung. */
.toolbar-wrap {
  position: relative;
  flex-shrink: 0;
}

.toolbar--busy {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.toolbar-progress {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 2;
}

.toolbar-progress-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-progress-spinner {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--text-primary);
  animation: toolbar-progress-spin 0.8s linear infinite;
}

@keyframes toolbar-progress-spin {
  to {
    transform: rotate(360deg);
  }
}

/* File-specific actions dim until the selection contains a file they can
   work on (kept clickable for aria/discoverability; clicks no-op). */
.toolbar-btn--disabled,
.toolbar-btn--disabled:hover {
  background: transparent;
  color: var(--text-muted);
}

.toolbar-btn--disabled img,
.toolbar-btn--disabled:hover img {
  opacity: 0.3;
}

/* File tree */

.file-tree-container {
  flex: 1;
  overflow: auto;
  user-select: none;
}

.file-tree-header {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) 148px 72px 128px;
  align-items: center;
  padding: 4px 8px 4px 0;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--outline-subtle);
  font-size: 11px;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: 0 1px 0 var(--outline-subtle);
}

.file-tree-header-ribbon {
  display: block;
}

.file-tree-header-col {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-toolbar);
  border: none;
  text-align: left;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.file-tree-header-col:hover {
  color: var(--text-primary);
}

.file-tree-header-col--active {
  background: transparent;
  color: var(--text-primary);
}

.file-tree-header-col.col-size,
.file-tree-header-col.col-modified {
  text-align: right;
}

.sort-indicator {
  font-size: 9px;
  opacity: 0.8;
}

.file-tree {
  list-style: none;
}

.tree-node {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) 148px 72px 128px;
  align-items: center;
  padding: 0 8px 0 0;
  cursor: default;
  font-size: 11px;
  white-space: nowrap;
  height: 22px;
  transition: background var(--transition);
  position: relative;
  z-index: 0;
}

.tree-node--alt {
  background: var(--bg-row-alt);
}

.tree-node:hover:not(.tree-node--selected) {
  background: var(--bg-hover);
}

.tree-node--selected {
  background: var(--bg-selected-row);
}

.tree-node--selected:hover,
.tree-node--selected.tree-node--focused {
  background: var(--bg-selected-row-hover);
}

.tree-node--focused:not(.tree-node--selected) {
  background: var(--bg-hover);
  box-shadow: inset 0 0 0 1px var(--outline);
}

/* Specificity note: .tree-node:hover:not(.tree-node--selected) above is
   (0,3,0) — a plain .tree-node--drop-target (0,1,0) loses to it while the
   cursor is over an unselected drop-target row, which would mask the drop
   highlight mid-drag. The second selector below matches that same specificity
   (0,3,0) and, declared after it, wins the tie so the drop highlight always
   shows. */
.tree-node--drop-target,
.tree-node--drop-target:hover:not(.tree-node--selected) {
  outline: 1px solid var(--bg-selected);
  outline-offset: -1px;
  background: var(--bg-selected-row);
}

.file-tree-container:focus {
  outline: none;
}

.tree-ribbon {
  align-self: stretch;
  background: var(--bg-ribbon-off);
  border-radius: 0 2px 2px 0;
  transition: background var(--transition);
}

.tree-ribbon--on {
  background: var(--bg-ribbon-on);
}

.tree-node-main {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.tree-indent {
  display: inline-block;
  flex-shrink: 0;
}

.tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-ui);
}

.tree-toggle-icon {
  width: 12px;
  height: 12px;
  opacity: 0.75;
  display: block;
}

.tree-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tree-toggle--empty {
  visibility: hidden;
  pointer-events: none;
}

.tree-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 5px;
}

.tree-icon--repo {
  filter: var(--folder-repo-filter);
}

.tree-icon--workspace {
  filter: var(--folder-workspace-filter);
}

.tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-revision-count {
  flex-shrink: 0;
  margin-left: 5px;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.tree-node--root .tree-label {
  font-weight: 600;
}

/* Pull Latest flashes everything that changed on disk bright white. */
.tree-label--pulse {
  animation: tree-pulse 1.1s ease-out 1;
}

@keyframes tree-pulse {
  0% {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.95), 0 0 2px #ffffff;
  }
  70% {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  }
  100% {
    color: inherit;
    text-shadow: none;
  }
}

/* Status column: sync state chips (see src/data/statusChips.js) */

.file-tree-header-col.col-status {
  text-align: left;
}

.tree-col-status {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  padding: 0 4px 0 2px;
}

.status-chip {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 10px;
  cursor: pointer;
  padding: 1px 4px 1px 2px;
  white-space: nowrap;
}

.status-chip:hover {
  background: var(--bg-hover-strong);
}

.status-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  vertical-align: -2px;
}

.status-chip-icon {
  margin-right: 4px;
}

.status-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-icon--orange { background-color: var(--status-orange); }
.status-icon--pale-green { background-color: var(--status-pale-green); }
.status-icon--red { background-color: var(--status-red); }
.status-icon--green { background-color: var(--status-green); }
.status-icon--grey { background-color: var(--status-grey); }

.status-chip--orange { color: var(--status-orange); }
.status-chip--pale-green { color: var(--status-pale-green); }
.status-chip--red { color: var(--status-red); }
.status-chip--green { color: var(--status-green); }
.status-chip--grey { color: var(--status-grey); }

/* Marked-for-delete: the file is already gone from disk; the dimmed,
   struck-through row just shows where it was until the changelist submits. */
.tree-node--deleted .tree-node-main {
  opacity: 0.5;
}

.tree-label--deleted {
  text-decoration: line-through;
}

.tree-col-size,
.tree-col-modified {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-right: 4px;
}

.tree-node--selected .tree-col-size,
.tree-node--selected .tree-col-modified {
  color: var(--text-primary);
}

/* History table */

.history-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.history-table-wrap {
  flex: 1;
  overflow: auto;
  user-select: text;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.history-table thead {
  position: sticky;
  top: 0;
  z-index: 4;
}

.history-table th {
  text-align: left;
  padding: 5px 10px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--outline-subtle);
  color: var(--text-muted);
  font-weight: 600;
  box-shadow: 0 1px 0 var(--outline-subtle);
}

.history-table td {
  padding: 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-table tbody tr {
  transition: background var(--transition);
  position: relative;
  z-index: 0;
  user-select: none;
}

.history-table tbody tr:hover {
  background: var(--bg-hover);
}

.history-row--alt {
  background: var(--bg-row-alt);
}

.history-row--expanded {
  background: var(--bg-selected-row);
}

.history-row--expanded:hover {
  background: var(--bg-selected-row-hover);
}

.history-revision-cell {
  display: flex;
  align-items: center;
  gap: 2px;
}

.history-revision-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.history-revision-toggle:hover {
  background: var(--bg-hover);
}

.history-revision-toggle-icon {
  width: 12px;
  height: 12px;
  opacity: 0.75;
  display: block;
}

.history-changes-row td {
  padding: 0 0 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-changes {
  margin: 0 8px 2px 24px;
  background: var(--bg-panel-inner);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.history-changes-header {
  padding: 4px 8px;
  background: var(--bg-toolbar);
  border-bottom: 1px solid var(--outline-subtle);
  font-weight: 600;
  font-size: 11px;
}

.history-highlight-all {
  background: none;
  border: none;
  color: var(--text-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.history-highlight-all:hover {
  color: var(--text-muted);
}

.history-changes-list {
  list-style: none;
  padding: 4px 0;
}

.history-change-item {
  padding: 2px 10px;
  font-size: 11px;
}

.history-change-path {
  word-break: break-all;
}

.history-change-type {
  margin-left: 5px;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.history-table .col-revision {
  width: 88px;
  font-variant-numeric: tabular-nums;
}

.history-table .col-date {
  width: 140px;
  font-variant-numeric: tabular-nums;
}

.history-table .col-author {
  width: 130px;
}

.history-author-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.history-author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-table .col-description {
  white-space: normal;
}

.history-footer {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  background: var(--bg-toolbar);
  border-top: 1px solid var(--outline-subtle);
  flex-shrink: 0;
  gap: 8px;
}

.history-footer img {
  width: 14px;
  height: 14px;
  opacity: 0.55;
}

.history-search {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 11px;
  padding: 3px 8px;
  outline: none;
  transition: border-color var(--transition);
}

.history-search:focus {
  border-color: var(--outline);
}

.history-search::placeholder {
  color: var(--text-muted);
}

/* Console */

.console-container {
  flex: 1;
  overflow: auto;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.55;
  user-select: text;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
}

.console-banner {
  color: var(--text-muted);
  margin-bottom: 6px;
}

.console-modules {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.console-prompt {
  display: flex;
  align-items: center;
  gap: 4px;
}

.console-prompt-symbol {
  color: var(--text-primary);
  flex-shrink: 0;
}

.console-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  outline: none;
  caret-color: var(--text-primary);
  padding: 0;
}

.console-input:not(:focus) {
  caret-color: transparent;
}

/* Members list */

.members-container {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.members-list {
  list-style: none;
}

.member-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.member-card--alt {
  background: var(--bg-row-alt);
}

.member-avatar {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
}

.member-main {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
}

.member-name {
  font-size: 12px;
  font-weight: 700;
  text-shadow: var(--text-shadow);
  line-height: 1.2;
}

.member-email {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.member-presence {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 3px;
}

.member-presence--online {
  color: #5ecf7a;
}

.member-presence--away {
  color: #e8a040;
}

.member-presence--offline {
  color: #888888;
}

.member-presence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.member-presence-dot--online {
  background: #5ecf7a;
}

.member-presence-dot--away {
  background: #e8a040;
}

.member-presence-dot--offline {
  background: #888888;
}

.member-status {
  grid-row: 2;
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  margin: 0;
  padding: 5px 7px;
  font-size: 10px;
  font-family: inherit;
  line-height: 1.4;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-panel-inner);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
}

.member-status--editable {
  cursor: pointer;
}

.member-status--editing {
  font-style: normal;
  color: var(--text-primary);
  outline: none;
}

.member-status--editing:focus {
  border-color: var(--outline);
}

/* User management (Administration page) */

.user-mgmt-container {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.user-mgmt-error {
  margin: 8px 10px 0;
  padding: 6px 8px;
  font-size: 11px;
  color: #ff8080;
  background: rgba(255, 96, 96, 0.1);
  border: 1px solid rgba(255, 96, 96, 0.3);
  border-radius: var(--radius-sm);
}

.user-mgmt-list {
  list-style: none;
}

.user-mgmt-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  column-gap: 10px;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: opacity var(--transition);
}

.user-mgmt-card--disabled {
  opacity: 0.45;
}

.user-mgmt-main {
  min-width: 0;
}

.user-mgmt-name {
  font-size: 12px;
  font-weight: 700;
  text-shadow: var(--text-shadow);
  line-height: 1.2;
}

.user-mgmt-disabled-tag {
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #7a2338;
  border-radius: var(--radius-sm);
}

.user-mgmt-username {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.user-mgmt-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted);
}

.user-mgmt-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 110px;
}

.user-mgmt-role {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  outline: none;
  cursor: pointer;
}

.user-mgmt-role:focus {
  border-color: var(--outline);
}

.user-mgmt-role:disabled {
  color: var(--text-disabled);
  cursor: default;
  opacity: 0.75;
}

.user-mgmt-disable-btn {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  color: #ff9090;
  background: transparent;
  border: 1px solid rgba(255, 96, 96, 0.35);
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.user-mgmt-disable-btn:hover:not(:disabled) {
  background: rgba(255, 96, 96, 0.12);
  border-color: rgba(255, 96, 96, 0.6);
}

.user-mgmt-disable-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Offline server button state */

.menu-bar-server-btn--offline {
  border-color: rgba(227, 227, 227, 0.35);
  color: rgba(227, 227, 227, 0.55);
}

.menu-bar-server-btn--offline .menu-bar-server-icon {
  opacity: 0.5;
}

/* Path bar folder-picker button (workspace tab) */

.path-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.path-bar-btn:hover {
  background: var(--bg-hover-strong);
  border-color: var(--outline);
}

.path-bar-btn img {
  width: 13px;
  height: 13px;
  opacity: 0.8;
}

/* Workspace tab empty/loading/error states */

.workspace-tree-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  gap: 8px;
  padding: 24px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.workspace-tree-notice p {
  margin: 0;
}

.workspace-tree-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-panel-inner);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.workspace-tree-action:hover {
  background: var(--bg-hover-strong);
  border-color: var(--outline);
}

.workspace-tree-action img {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.workspace-tree-subnote {
  font-size: 11px;
  color: var(--text-disabled);
}

/* Members: signed-in user marker */

.member-you-tag {
  font-weight: 500;
  color: var(--text-muted);
}

.console-line {
  color: var(--text-primary);
}

.console-line--input {
  color: var(--text-muted);
}

.console-line--error {
  color: #e08080;
}

/* Members: timezone tag next to the name */

/* Matches .member-you-tag exactly — the member's local time is the same kind
   of parenthesised annotation on the name, so it must not read as a different
   class of information (it was 10px with an 8px gap, which did). */
.member-timezone {
  font-weight: 500;
  color: var(--text-muted);
}

/* Server Management (Administration page) */
/* Scroll containers follow the members-list pattern: NO padding on the edge the
   scrollbar rides (the right), so the bars sit flush to the panel edge like
   .members-container; the content inset lives on the regions instead. Only
   top/bottom padding on the container here — a vertical scrollbar is unaffected
   by it, so it still hugs the panel's right edge. */
.server-mgmt-container {
  container-type: size;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow: auto;
  padding: 12px 0;
}
.server-mgmt-region {
  min-height: 0;
  /* Column mode: the container scrolls, so this inset lives inside the scroll
     area and keeps the container scrollbar flush. Both sides inset since the
     container spans the full panel width. */
  padding: 0 12px;
}
.server-mgmt-region--config {
  flex: 0 0 auto;
}
.server-mgmt-region--projects {
  flex: 1 1 auto;
  min-height: 0;
}
/* Edge-to-edge rule between the config and projects sections, matching the repo
   column-header border. It's a flex item of its own, so the container's row-gap
   sits equally above and below it — centring it in the grey gap between the two
   sections. (The regions always stack vertically here; see the note on the
   @container block below.) */
.server-mgmt-divider {
  flex: 0 0 auto;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--outline-subtle);
}
/* Wider than tall → side by side. Each region becomes its own vertical scroll
   container, so its right (scroll) edge carries no padding and the scrollbar
   stays flush; content is inset on the left only. */
@container (min-aspect-ratio: 1/1) {
  .server-mgmt-container {
    flex-direction: row;
  }
  .server-mgmt-region {
    padding: 0 0 0 12px;
  }
  .server-mgmt-region--config {
    flex: 0 0 clamp(280px, 40%, 460px);
    overflow: auto;
  }
  .server-mgmt-region--projects {
    overflow: auto;
  }
}

/* Section titles match the Organization sidebar headings (small grey caps). */
.server-config-title,
.project-mgmt-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.server-config-section {
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  margin: 0 0 10px;
  padding: 8px 10px;
}
.server-config-section legend {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 4px;
  text-transform: uppercase;
}
.server-config-field {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 3px 0;
}
.server-config-field-label {
  font-size: 12px;
}
/* Text/number/select fields: the app's standard dark input treatment
   (same recipe as .account-input / .user-mgmt-role). */
.server-config-field input[type='text'],
.server-config-field input[type='number'],
.server-config-field select,
.project-mgmt-code-input,
.project-mgmt-new-input {
  background: var(--bg-input);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
  transition: border-color var(--transition);
}
.server-config-field input:focus,
.server-config-field select:focus,
.project-mgmt-code-input:focus,
.project-mgmt-new-input:focus {
  border-color: var(--outline);
}
.server-config-field input:read-only,
.server-config-field input:disabled,
.project-mgmt-code-input:read-only {
  color: var(--text-muted);
}
/* A permanent code whose toggle is off reads as inactive: grey it to match the
   muted look of the disabled/read-only controls above. */
.project-mgmt-code-input--muted {
  opacity: 0.45;
}
.server-config-field input[type='text'],
.server-config-field input[type='number'],
.server-config-field select {
  max-width: 180px;
}
.server-config-field select {
  cursor: pointer;
}
/* No native number spinners — plain text-style field like everywhere else. */
.server-config-field input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.server-config-field input[type='number']::-webkit-outer-spin-button,
.server-config-field input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Checkboxes pick up the app's selection blue instead of the UA default. */
.server-config-field input[type='checkbox'],
.project-mgmt-check input[type='checkbox'] {
  accent-color: var(--bg-selected);
}
.server-config-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}
.server-config-save {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.server-config-save:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--outline);
}
.server-config-save:disabled {
  opacity: 0.5;
  cursor: default;
}
.server-config-note {
  font-size: 11px;
  color: var(--text-muted);
}
.server-config-error {
  color: #e08080;
  font-size: 12px;
  margin: 6px 0;
}

/* The projects section sits on a lighter card, like the Organization page's
   "Available at" / "Upcoming meetings" cards (.availability-sidebar-section),
   to separate it clearly from the config section. */
.server-mgmt-region--projects .project-mgmt {
  background: var(--bg-toolbar);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.project-mgmt-new {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.project-mgmt-new-input { flex: 1 1 auto; }
.project-mgmt-new-btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.project-mgmt-new-btn:hover {
  background: var(--bg-hover);
  border-color: var(--outline);
}
.project-mgmt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.project-mgmt-card {
  background: var(--bg-panel-header);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.project-mgmt-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.project-mgmt-name { font-weight: 600; }
.project-mgmt-members { position: relative; }
.project-mgmt-members-btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.project-mgmt-members-btn:hover {
  background: var(--bg-hover-strong);
  border-color: var(--outline);
}
.project-mgmt-checklist {
  background: var(--bg-menu);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow: auto;
  padding: 8px;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 5;
}
.project-mgmt-check {
  align-items: center;
  display: flex;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}
/* One row per code: label, code field, then its controls (refresh / enabled
   toggle) inline — nothing wraps onto its own line. */
.project-mgmt-code-row {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 3px 0;
}
.project-mgmt-code-label {
  font-size: 12px;
  color: var(--text-muted);
  flex: 0 0 78px;
}
.project-mgmt-code-input {
  font-family: var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  flex: 0 0 auto;
  width: 96px;
}
.project-mgmt-toggle,
.project-mgmt-refresh {
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  padding: 4px;
  transition: background var(--transition);
}
.project-mgmt-toggle:hover,
.project-mgmt-refresh:hover {
  background: var(--bg-hover);
}
.project-mgmt-toggle img,
.project-mgmt-refresh img { height: 16px; width: 16px; }
.project-mgmt-na {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
}
.project-mgmt-error {
  color: #e08080;
  font-size: 12px;
  margin-top: 6px;
}

/* Owner-only destructive zone: a project's Delete flow, set off from the card
   body by a subtle top divider so it reads as a separate, weightier action. */
.project-mgmt-danger {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--outline-subtle);
}
.project-mgmt-delete-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-mgmt-delete-warning {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0;
}
.project-mgmt-delete-input {
  width: 100%;
}
.project-mgmt-delete-actions {
  display: flex;
  gap: 8px;
}
.project-mgmt-delete-btn {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: #e08080;
  background: transparent;
  border: 1px solid rgba(224, 128, 128, 0.5);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.project-mgmt-delete-btn:hover:not(:disabled) {
  background: rgba(224, 128, 128, 0.12);
  border-color: #e08080;
}
.project-mgmt-delete-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.project-mgmt-delete-cancel {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.project-mgmt-delete-cancel:hover {
  background: var(--bg-hover);
  border-color: var(--outline);
}

/* Shutdown shares the Save button's shape but takes the same danger accent as
   the destructive project actions, since it stops the server for everyone. */
.server-config-shutdown {
  color: #e08080;
  border-color: rgba(224, 128, 128, 0.5);
}
.server-config-shutdown:hover:not(:disabled) {
  background: rgba(224, 128, 128, 0.12);
  border-color: #e08080;
}

/* Right-click menu for the file trees */
.context-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  outline: none;
}

.context-menu {
  position: fixed;
  min-width: 210px;
  padding: 4px;
  background: var(--bg-menu);
  border: 1px solid var(--outline-subtle);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: default;
}

.context-menu-item:hover:not(.context-menu-item--disabled) {
  background: var(--bg-selected);
}

.context-menu-item--disabled {
  color: var(--text-disabled);
}

.context-menu-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1) opacity(0.85);
}

.context-menu-item--disabled .context-menu-icon {
  opacity: 0.35;
}

.context-menu-separator {
  height: 1px;
  margin: 4px 6px;
  background: var(--outline-subtle);
}

/* History panel — Graph View
   Grey pannable surface; DOM cards over an SVG edge layer, both inside one
   translate/scale canvas. Dead branches dim, current revision highlighted. */

.graph-view {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-panel-inner);
  cursor: grab;
  user-select: none;
}

.graph-view:active {
  cursor: grabbing;
}

.graph-view--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
  cursor: default;
}

.graph-view-file {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-panel) 85%, transparent);
  border-radius: var(--radius-sm);
  cursor: default;
}

.graph-canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

.graph-edges {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.graph-edge {
  fill: none;
  stroke: var(--outline);
  stroke-width: 2;
}

.graph-edge--dead {
  stroke: var(--outline-subtle);
}

.graph-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 176px;
  height: 118px;
  padding: 8px 10px;
  font-family: var(--font-ui);
  text-align: left;
  color: var(--text-primary);
  background: var(--bg-panel-header);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-sizing: border-box;
}

.graph-card:hover {
  border-color: var(--outline);
  background: var(--bg-menu);
}

.graph-card--current {
  /* Ring via box-shadow, not a fatter border, so every card keeps the same 1px
     border and therefore the same inner height — the fixed-height description
     box below then fills identically on current and non-current cards. */
  border-color: var(--bg-selected);
  box-shadow: 0 0 0 1px var(--bg-selected);
}

.graph-card--dead {
  opacity: 0.45;
}

.graph-card-version {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}

.graph-card-status {
  /* Pushed to the right edge of the row (which spans the description box's
     width), so the last letter lines up with the box's right edge — mirroring
     the avatar aligning with its left edge. */
  margin-left: auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.graph-card-status--added {
  color: var(--status-green);
}

.graph-card-status--deleted {
  color: var(--status-red);
}

.graph-card--local {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--status-orange) 45%, transparent);
}

.graph-card-author {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.graph-card-author-name {
  min-width: 0;
  font-size: 11px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Grows to fill the card's remaining height, so every card's box is the same
   size (the current max). Works now that the card is a <div>, not a <button>
   (WebKit doesn't distribute flex height to a button's children). The current
   node's ring is a box-shadow, not a fatter border, so the inner height stays
   constant across cards. */
.graph-card-desc {
  flex: 1;
  min-height: 0;
  padding: 6px 8px;
  background: var(--bg-panel-inner);
  border: 1px solid var(--outline-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.graph-card-desc-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-muted);
}

.graph-card-desc-text--empty {
  font-style: italic;
  opacity: 0.7;
}

/* Non-blocking first-load hint (Organization panels): visible only between
   connect and the first successful fetch — cached data never shows it. */
.panel-loading-hint {
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-secondary);
}
