/* Simplification pass (owner, 2026-10-05): global pages. */

/* 1. Table headings read in normal case everywhere, never ALL CAPS — plain
   tables, the Clearances grid, Labor categories' column heads and the other
   grid "heads" drawn as rows of boxes. Team Forecast's own tool (#view,
   #modalRoot) keeps its own look. */
th:not(#view th):not(#modalRoot th),
.lcat-head, .lcat-people-head, .rl-people-head, .cd-head, .q-grid-head {
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* 2. Ordered lists are dragged into place (drag-order.js). The up/down
   arrows stay for a page drawn without JavaScript; with it, a grip takes
   their place. */
.drag-order-on > button { display: none !important; }
.drag-order-grip {
  display: none; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--text-light); cursor: grab;
  font-size: 1rem; line-height: 1; user-select: none; touch-action: none; flex: 0 0 auto;
}
.drag-order-on > .drag-order-grip { display: inline-flex; }
.drag-order-grip:hover { background: var(--surface-2); color: var(--text); }
[data-drag-order-row] { cursor: grab; }
[data-drag-order-row]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
[data-drag-order-row] :is(input, select, textarea, label, a, button) { cursor: auto; }
[data-drag-order-row] :is(a, button:not(:disabled), label) { cursor: pointer; }
.drag-order-ghost {
  position: fixed; z-index: 60; pointer-events: none; margin: 0 !important;
  background: var(--card); border-radius: 8px; opacity: .97;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25); transform: scale(1.01); cursor: grabbing;
}
.drag-order-gap { border: 2px dashed var(--line); border-radius: 6px; background: transparent; list-style: none; margin: 0 0 .5rem; box-sizing: border-box; }
.drag-order-busy [data-drag-order-row] { opacity: .6; pointer-events: none; }
body.drag-order-dragging, body.drag-order-dragging * { cursor: grabbing !important; user-select: none; }

/* 3. Row actions (delete, remove, edit, switch off…) are one small button
   style site-wide rather than underlined text. Red outline for removing
   something; the link color for everything else. */
.btn-link:not(.dp-link) {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  background: transparent; border: 1px solid currentColor; border-radius: 6px;
  padding: 3px 10px; min-height: 28px; line-height: 1.2;
  font-size: .8rem; font-weight: 600; text-decoration: none; text-align: center;
  vertical-align: middle;
}
.btn-link:not(.dp-link):hover:not(:disabled) { background: var(--surface-2); text-decoration: none; }
.btn-link:not(.dp-link):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.btn-link:not(.dp-link):disabled { border-style: dashed; }

/* 4. A little room between a notes box and the button under it. */
:is(textarea, label:has(textarea), .field:has(textarea), .field-line:has(textarea), div:has(> textarea), p:has(> textarea), .unclassified-only)
  + :is(button, .btn, .form-actions, div:has(> button), p:has(> button), div:has(> .btn)) {
  margin-top: .75rem;
}
