/* Asset details */
.asset-detail-section {
  margin: 16px 0 4px;
  font-size: var(--fs-xs);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.asset-more-details {
  margin: 4px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.asset-more-details > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-main);
  padding: 4px 0;
}
.asset-more-details[open] > summary {
  margin-bottom: 8px;
}
.asset-details-grid .form-group,
#newAssetMoreFields .form-group {
  margin-bottom: 10px;
}

/* Fitted parts */
.component-list {
  list-style: none;
  margin: 6px 0;
  padding: 0;
}
.component-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-main);
}
.component-pn {
  font-family: monospace;
  color: var(--primary);
}
.component-meta {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}
.component-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.component-actions .btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-main);
  cursor: pointer;
  padding: 2px 8px;
}
.component-buttons {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.set-parts-ref {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.set-parts-ref > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: var(--fs-sm);
}

/* Project timeline */
.tl-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.tl-ranges button {
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  /* Batch C (sweep D5): 31px -> the 44px tap standard. */
  min-height: 44px;
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
}
.tl-ranges button.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.tl-range-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin: 4px 0 8px;
}
.tl-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.tl-tile {
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tl-tile-n {
  font-weight: 800;
  font-size: var(--fs-md, 1rem);
  color: var(--text-main);
}
.tl-tile-l {
  font-size: var(--fs-2xs, 0.7rem);
  color: var(--text-muted);
  text-transform: uppercase;
}
.tl-tile-s {
  font-size: var(--fs-2xs, 0.7rem);
  color: var(--text-main);
}
.tl-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.tl-day {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 14px 0 6px;
}
.tl-item {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  color: var(--text-main);
  cursor: pointer;
}
.tl-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tl-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.tl-top {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: var(--fs-sm);
}
.tl-asset {
  font-family: monospace;
  color: var(--primary);
}
.tl-proj {
  font-size: var(--fs-2xs, 0.7rem);
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px;
  white-space: nowrap;
}
.tl-time {
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.tl-sum {
  font-size: var(--fs-xs);
  color: var(--text-main);
  overflow-wrap: anywhere;
}
.tl-tech {
  font-size: var(--fs-2xs, 0.7rem);
  color: var(--text-muted);
}

/* The compound selector is deliberate: the polish and night-shift
   sheets load after this one and set a 48px min-height on .btn-secondary
   alone, which at equal specificity would override a floor set here. */
.btn-secondary.dash-timeline {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  margin: -4px 0 14px;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  /* One shared height for the whole dashboard stack (owner, Nov 2026:
     "make the buttons the same size", levelled UP to the big one). The
     hero "Start today's report" renders at 88px (its theme min-height),
     so that is the stack's floor: the siblings sit here, and the End of
     Day bar in the rule below. The siblings' own tallest natural case —
     a two-line subtitle with the Team button's project-suffixed subtitle
     and both badges showing, 82px at phone widths 320–430 — fits under
     it, so nothing is ever shrunk. test/e2e/dash-timeline-height.spec.js
     pins all five buttons equal at 360/390/430. */
  min-height: 88px;
}
/* The End of Day bar shares the stack's 88px. It is a plain .btn, and
   #dashboardView .btn (css/06) floors every dashboard .btn at 76px, so
   this rule needs the id in its selector to win; the theme sheets set
   no min-height on a plain .btn, so nothing later overrides it. Its
   label group is already centred by the .btn flex rules. */
#dashboardView > .btn.dash-eod {
  min-height: 88px;
}
/* Home shell rows (slice 1): the doors are one size - "make the
   buttons the same size", levelled UP to the biggest. A row's natural
   worst case is the ring icon's line (36px) plus a two-line subtitle:
   102.8px at phone widths (measured; the Team row's project-suffixed
   subtitle is the real-world case), so the shared floor is 104px -
   taller than the hero/EoD 88px because a row carries an icon and a
   subtitle side by side where the old stack stacked text alone. The
   selector carries both dashboard ids so it beats the 76px floor in
   css/06; the night-shift sheet's !important folder floor gets its own
   matching override there. The Project timeline row joined the stack
   on 2026-11-09 and takes the same floor. test/e2e/dash-timeline-
   height.spec.js pins all the rows equal at 360/390/430. */
#dashboardView > #dashRows > .btn {
  min-height: 104px;
}
/* An open row looks open in the base layer too: the folder-open
   class the Team, Reports and Technical rows toggle gets an inset
   ring here; the theme sheets layer their own colours on top. */
#dashboardView > #dashRows > .btn.folder-open {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.dash-timeline-sub {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-muted);
}

/* Fleet tools (2.3.64) - service due, reorder, shift stock
   check, handovers, QR stickers, monthly report, ops dashboard.
   Night Shift: dark cards, sky accent, red/amber only for real problems. */
.fl-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: -4px 0 14px;
}
/* Section pages (home redesign slice 3a; ROWS since 2026-11-09):
   each home row opens its own page, and the page's contents are rows
   in the EXACT arrangement of the home rows - full width, one per
   line, gradient-ring icon at the left, bold title with the plain
   subtitle beneath, chevron at the right. The rows reuse the home
   rows' own markup and class (btn dash-row), so their height comes
   from the same rule the home rows use (min-height 104px here for
   the section container, the !important 104px in the night-shift
   sheet for both) and the two layers stay identical by construction.
   The container is a plain block: the base .btn width and margins
   stack the rows. (The 2-across square tiles this replaces were the
   owner's call to retire - he liked the home rows and not the
   tiles.) */
.section-rows {
  margin-bottom: 14px;
}
.section-page .section-rows > .btn {
  min-height: 104px;
  justify-content: flex-start;
  text-align: left;
}
.section-rows > .btn.fl-chip-alert {
  border-color: rgba(245, 158, 11, 0.6);
}
.fl-chip-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: var(--tap);
  padding: 10px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.fl-chip-btn small {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-muted);
}
.fl-chip-btn.fl-chip-alert {
  border-color: rgba(245, 158, 11, 0.6);
}
.fl-chip-btn.fl-chip-alert small {
  color: var(--warning);
}
.fl-chip-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.fl-chip-n {
  font-size: var(--fs-lg);
  font-weight: 800;
  line-height: 1;
}
.fl-n-bad {
  color: var(--danger);
}
.fl-n-warn {
  color: var(--warning);
}
.fl-n-ok {
  color: var(--success);
}
.fl-ctl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: stretch;
}
.fl-ctl-row > select {
  flex: 1 1 140px;
}
.fl-ctl-btn {
  width: auto;
  flex: 1 1 auto;
  margin: 0;
  padding: 10px 12px;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.fl-mini {
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: var(--fs-sm);
  font-weight: 700;
  min-height: 36px;
}
.fl-section {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 16px 0 6px;
}
.fl-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  text-align: left;
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
}
.fl-row-static {
  cursor: default;
}
.fl-row-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: var(--fs-md);
}
.fl-row-top .fl-pill {
  margin-left: auto;
}
.fl-row-sub {
  font-size: var(--fs-sm);
  color: var(--text-main);
  overflow-wrap: anywhere;
}
.fl-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.fl-muted {
  color: var(--text-muted);
  font-weight: 400;
  font-size: var(--fs-sm);
}
.fl-bad {
  color: var(--danger);
}
.fl-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
/* Same rule as .status-pill-wrap: a pill carrying the tech's own
   words (a fault's custom "other reason") wraps in full rather than
   clipping at phone width (hardening phase 2, P2-1). */
.fl-pill-wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}
.fl-pill-bad {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
}
.fl-pill-warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}
.fl-pill-ok {
  background: rgba(74, 222, 128, 0.12);
  color: var(--success);
}
/* Split across places (2.3.84): the Location dialog's place + quantity rows. */
.sp-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-muted);
}
.sp-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.1);
}
.sp-mode button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.sp-mode button[aria-checked='true'] {
  background: var(--primary-gradient, var(--primary));
  color: var(--brand-on, #04111f);
}
.sp-split {
  margin-bottom: 14px;
}
.sp-split[hidden] {
  display: none !important;
}
.sp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  grid-template-areas:
    'place remove'
    'qty qty';
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.06);
}
.sp-row .sp-place {
  grid-area: place;
  width: 100%;
  min-height: 44px;
  margin: 0;
}
.sp-row .sp-qty {
  grid-area: qty;
  grid-template-columns: var(--tap) 1fr var(--tap);
}
.sp-row .sp-remove {
  grid-area: remove;
}
.sp-remove {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.sp-add {
  width: 100%;
  min-height: 44px;
  margin: 2px 0 8px;
}
.sp-sum {
  margin: 4px 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 700;
}
.sp-sum.sp-match {
  background: rgba(74, 222, 128, 0.1);
  color: var(--success);
}
.sp-sum.sp-short {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}
.sp-sum.sp-over {
  background: rgba(248, 113, 113, 0.14);
  color: var(--danger);
}
.sp-errors {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: var(--fs-sm);
}
.sp-errors:empty {
  display: none;
}
.sw-warn {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  color: var(--warning);
}
/* Where is it and how many (2.3.83): places with the quantity at each,
   then the total and a low / out pill. Red out, amber low. */
.stock-where {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.stock-where.sw-low {
  border-color: rgba(245, 158, 11, 0.45);
}
.stock-where.sw-out {
  border-color: rgba(248, 113, 113, 0.5);
}
.sw-places {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sw-places li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--text-main);
  font-size: var(--fs-sm);
}
.sw-places li.sw-unplaced {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}
.sw-sep {
  margin-left: -6px;
}
.sw-qty {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.sw-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.sw-total b {
  color: var(--text-main);
  font-size: 1.05rem;
}
/* Quick adjust (2.4.49): the total as a tap target on the Parts card.
   The <b> inside keeps the total's own styling; the button adds only
   the affordance. */
.sw-qty-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  margin: -2px -4px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  min-height: 32px;
}
.sw-low .sw-total b {
  color: var(--warning);
}
.sw-out .sw-total b {
  color: var(--danger);
}
.fl-pill-muted {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}
.fl-tile-overdue .tl-tile-n {
  color: var(--danger);
}
.fl-tile-due .tl-tile-n {
  color: var(--warning);
}
.fl-tile-ok .tl-tile-n {
  color: var(--success);
}
.fl-banner {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 8px 0;
}
.fl-banner:empty {
  display: none;
}
.fl-banner-warn {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.45);
}
.fl-repeat-badge {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  font-weight: 700;
  font-size: var(--fs-sm);
}
.fl-card {
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}
.fl-card-title {
  font-weight: 800;
  font-size: var(--fs-md);
  margin-bottom: 4px;
}
.fl-list {
  margin: 0 0 6px 18px;
  font-size: var(--fs-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fl-pre {
  white-space: pre-wrap;
  font-size: var(--fs-sm);
}
.fl-gap-top {
  margin-top: 12px;
}
.fl-line {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}
.fl-line input {
  flex: 1;
  min-width: 0;
}
.fl-line-action {
  flex-wrap: wrap;
}
.fl-line-action input {
  flex: 1 1 100%;
}
.fl-line-action select {
  flex: 1;
}
.fl-x {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}
/* Shift stock check rows: name, then − [count] + ✓ */
.fl-count {
  background: var(--card-dark);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.fl-count-done {
  border-left-color: var(--success);
}
.fl-count-low {
  border-left-color: var(--danger);
}
.fl-count-name {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  margin-bottom: 8px;
}
.fl-count-name strong {
  flex: 1 1 100%;
}
.fl-stepper {
  display: grid;
  grid-template-columns: var(--tap) 1fr var(--tap) var(--tap);
  gap: 6px;
}
.fl-stepper button {
  height: var(--tap);
  border-radius: var(--radius-xs);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
}
.fl-stepper input {
  height: var(--tap);
  text-align: center;
  font-size: var(--fs-lg);
  font-weight: 800;
  margin: 0;
}
.fl-stepper .fl-ok.on {
  background: var(--success);
  border-color: var(--success);
  color: var(--on-accent);
}
/* .fl-note-btn removed in Batch C: the shift stock check that used it
   was retired in slice 3b - the rule had no markup left (sweep D5). */

/* Part requests (2.3.101). */
.pr-seg-wrap {
  border: none;
  margin: 0 0 14px;
  padding: 0;
  min-inline-size: 0;
  background: transparent;
}
.pr-seg-wrap legend {
  display: block;
  float: none;
  width: auto;
  padding: 0;
  margin: 0 0 6px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-muted);
  background: transparent;
}
.pr-banner-sent {
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.45);
}
.pr-part {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.pr-part strong {
  display: block;
}
.pr-part .fl-muted {
  display: block;
}
.pr-seg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pr-seg-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
}
.pr-seg-opt input {
  width: auto;
  margin: 0;
}
.pr-seg-opt span {
  display: flex;
  flex-direction: column;
}
.pr-seg-opt small {
  color: var(--text-muted);
  font-size: var(--fs-2xs);
}
.pr-urg-now:has(input:checked) {
  border-color: var(--danger);
  box-shadow: var(--glow-rose);
}
.pr-urg-today:has(input:checked) {
  border-color: var(--warning);
  box-shadow: var(--glow-amber);
}
.pr-urg-next:has(input:checked) {
  border-color: var(--primary);
  box-shadow: var(--glow-cyan);
}
.pr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}
.pr-row-urgent {
  border-color: var(--danger);
}
.pr-detail-what {
  font-size: var(--fs-lg);
  font-weight: 800;
  margin: 6px 0 10px;
}
.pr-facts {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 4px 8px;
  margin: 0;
}
.pr-facts dt {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.pr-facts dd {
  margin: 0;
  font-size: var(--fs-sm);
}
.pr-steps {
  margin: 0;
  padding-left: 1.1rem;
}
.pr-steps li {
  margin: 0 0 8px;
}
.pr-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pr-pill-ordered {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
}
.pr-tile-ordered .tl-tile-n {
  color: var(--primary);
}
.pr-tile-arrived .tl-tile-n {
  color: var(--success);
}
.pr-tile-requested .tl-tile-n {
  color: var(--warning);
}
