/* ==========================================================================
   S16 desktop Time Clock (Mockup 7) - the office/desk capture surface.
   Reuses the crew-week data from approvals.js (window.APPR.ENTRIES). It is the
   desktop counterpart to Crew Mobile (M5): time gets entered and edited here,
   then Submit week hands it to Smart Approvals (M4). Review-only. No Date().
   ========================================================================== */

/* ---- live clock card -------------------------------------------------- */
.tc-clock { display: flex; align-items: center; gap: 16px; padding: 15px 18px; border: 1px solid var(--border-default);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); background: var(--card); margin-bottom: 16px; }
.tc-clock .who { width: 42px; height: 42px; border-radius: 50%; background: var(--sky); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tc-clock .info { flex: 1; }
.tc-clock .info .n { font-size: 15px; font-weight: 600; color: var(--fg-1); }
.tc-clock .info .s { font-size: 12.5px; color: var(--fg-3); margin-top: 1px; }
.tc-clock .info .s .live { color: var(--success); font-weight: 600; }
.tc-clock .timer { font-size: 26px; font-weight: 700; color: var(--fg-1); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.tc-clock .timer.off { color: var(--fg-3); font-size: 15px; font-weight: 500; }
.tc-clock .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); flex-shrink: 0; }

/* ---- snapshot strip --------------------------------------------------- */
.tc-snap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 15px; padding: 2px 2px 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
.tc-snap .eb { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brand); display: inline-flex; align-items: center; gap: 7px; }
.tc-snap .eb .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle); }
.tc-snap .s { font-size: 13px; color: var(--fg-3); display: inline-flex; align-items: baseline; gap: 6px; }
.tc-snap .s b { font-size: 18px; font-weight: 700; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.tc-snap .s.warn b { color: var(--warning); }
.tc-snap .sep { color: var(--border-default); }

/* ---- weekly timesheet grid ------------------------------------------- */
.tc-wrap { overflow-x: auto; }
.tc-grid { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.tc-grid thead th { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3);
  text-align: right; padding: 9px 12px; border-bottom: 2px solid var(--border-default); white-space: nowrap; }
.tc-grid thead th.l { text-align: left; }
.tc-grid tbody td { padding: 7px 12px; border-bottom: 1px solid var(--border-subtle); text-align: right; vertical-align: middle; font-variant-numeric: tabular-nums; }
.tc-grid tbody td.l { text-align: left; }
.tc-grid tbody tr.person { cursor: pointer; }
.tc-grid tbody tr.person:hover td { background: #fafbfd; }
.tc-crew { display: inline-flex; align-items: center; gap: 9px; }
.tc-crew .av { width: 27px; height: 27px; border-radius: 50%; background: var(--sky); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tc-crew .nm { font-weight: 500; color: var(--fg-1); }
.tc-crew .chev { color: var(--fg-3); transition: transform .12s ease; display: inline-block; }
.tc-grid tr.person.open .tc-crew .chev { transform: rotate(90deg); }
.tc-grid td.tot { font-weight: 700; color: var(--fg-1); }
.tc-hcell { color: var(--fg-2); }
.tc-hcell.zero { color: var(--border-default); }
.schip { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.schip.submitted { background: var(--success-soft); color: var(--success); }
.schip.draft { background: var(--surface-secondary); color: var(--fg-3); border: 1px solid var(--border-default); }
.schip.active { background: var(--brand-subtle); color: var(--brand); }

/* expanded breakdown: job/phase sub-rows that share the SAME columns as the
   parent, so each day's hours line up under its day header (aligned, spread) */
.tc-grid tr.person.open > td { border-bottom: none; }
.tc-grid tr.subline td { background: #fbfcfe; border-bottom: 1px solid var(--border-subtle); padding-top: 4px; padding-bottom: 4px; }
/* a darker divider at the top of each person block so people stay visually separate when expanded */
.tc-grid tbody tr.person td { border-top: 2px solid var(--border-default); }
.tc-grid tbody tr.person:first-child td { border-top: none; }
.tc-grid tr.subline td.l.sub { padding-left: 49px; font-size: 12.5px; }
.tc-grid tr.subline td.l .pj { color: var(--fg-1); font-weight: 500; }
.tc-grid tr.subline td.l .ph { color: var(--fg-3); }
.tc-grid tr.subline td.tot.sub { font-weight: 600; color: var(--fg-2); }
.tc-grid td.tc-hcell.sub { padding-top: 2px; padding-bottom: 2px; }
.tc-grid td.tc-hcell.sub input { font-family: inherit; font-size: 13px; color: var(--fg-1); text-align: right; width: 100%; border: 1px solid transparent; background: transparent; border-radius: var(--r-sm); padding: 4px 2px; font-variant-numeric: tabular-nums; }
.tc-grid td.tc-hcell.sub input:hover { border-color: var(--border-default); }
.tc-grid td.tc-hcell.sub input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-subtle); background: #fff; }
.tc-grid td.tc-hcell.sub.flag input { color: var(--warning); font-weight: 600; }
.tc-grid td.tc-hcell.sub.zero input { color: var(--border-default); }
.tc-legend { font-size: 11.5px; color: var(--fg-3); padding: 12px 2px 0; }
.tc-legend .amber { color: var(--warning); font-weight: 600; }

/* ---- submit bar ------------------------------------------------------- */
.tc-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 13px 16px; background: var(--card);
  border: 1px solid var(--border-default); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.tc-foot .t { font-size: 13px; color: var(--fg-2); } .tc-foot .t b { color: var(--fg-1); }
.tc-foot .grow { flex: 1; }
.tc-foot .ok { color: var(--success); font-weight: 600; }
