/* ============================================================
   Master Schedule (the GC's schedule) — assets/master-schedule.css
   Borrows the .sch-* / .ml-* Gantt classes from app.css; only the
   master-schedule-specific chrome lives here.
   ============================================================ */

.ms-tb { margin-bottom: 6px; }
.ms-schedname { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); font-size: 13px; }
.ms-schedname .ti { color: var(--accent); }

.ms-subbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 2px 10px; flex-wrap: wrap; }
.ms-meta { font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ms-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-faint); }
.ms-hint .ti { font-size: 13px; }

/* The Sub / Resource grid column. */
.sch-gcol.ms-gsub { flex: 0 0 128px; width: 128px; text-align: left; padding-left: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft);
  font-size: 11.5px; }
.sch-ghead .sch-gcol.ms-gsub { color: var(--ink-faint); }

/* ── Activity-list collapse ──────────────────────────────────
   The activity grid folds down to a narrow rail so the Gantt can use the
   full width. The toggle sits in the "Activity" header (and, when folded,
   is the only thing on the rail) so the way back out is always in the same
   place — never floating over the bars. */
.ms-gridtgl { margin-left: auto; margin-right: 6px; flex: 0 0 auto; align-self: center;
  height: var(--ctl-h-sm); min-height: var(--ctl-h-sm); width: var(--ctl-h-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--bd); border-radius: var(--ctl-radius);
  background: var(--white); color: var(--ink-soft); cursor: pointer; padding: 0; }
.ms-gridtgl:hover { background: var(--bg2); color: var(--ink); border-color: var(--ink-faint); }
.ms-gridtgl:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ms-gridtgl .ti { font-size: 18px; }
/* The header is bottom-aligned for its column labels; the toggle centres
   itself against the full header height instead of hanging off the baseline. */
.sch-ghead .ms-gridtgl { align-self: center; margin-bottom: -6px; }

.ms-rail { background: var(--bg2); }
.ms-railhead { justify-content: center; align-items: center !important; padding-bottom: 0; }
.ms-railbody { display: flex; justify-content: center; padding-top: 10px; }
/* Vertical caption so the folded rail still says what it is. */
.ms-raillbl { writing-mode: vertical-rl; text-orientation: mixed; font-size: 10.5px;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); user-select: none; }

/* Read-only bars — same shape as the scheduler, without the drag affordances.
   The master schedule is NEVER draggable, so its container never gets
   .sch-drag and these bars no longer claim the touch gesture at all (see
   operations.css). A finger landing on a bar pans the chart like anywhere
   else. Nothing here needs to override touch-action any more.
   History: patches 573/574 tried to override it on the bars and coincided
   with flings dying, so it was reverted. The real cause was the grid⇄timeline
   scroll-sync writing back onto the pane being flung (patch 577). */
.ms-bar { cursor: default; }
.ms-bar:hover { filter: brightness(1.04); }

.ms-diamond { position: absolute; color: var(--ink-faint); pointer-events: auto; cursor: default; }
.ms-diamond .ti { font-size: 15px; color: var(--accent); filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }

.ms-legend { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.ms-lglbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); }

/* Empty state — routes the user to the importer. */
.ms-empty { max-width: 620px; margin: 40px auto; text-align: center; padding: 0 20px; }
.ms-empty-icon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px;
  display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ms-empty-icon .ti { font-size: 32px; color: var(--accent); }
.ms-empty h3 { margin: 0 0 10px; font-size: 19px; color: var(--ink); }
.ms-empty p { margin: 0 0 12px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }
.ms-empty-how { background: var(--surface-2, rgba(127,127,127,.06)); border: 1px solid var(--bd);
  border-radius: 10px; padding: 12px 16px; }
.ms-empty .btn { margin-top: 6px; }

@media (max-width: 720px) {
  .sch-gcol.ms-gsub { display: none; }
}
