/* ============================================================================
   TSN Pulse Time — Phase D overlay stylesheet.
   Loaded AFTER styles.css (later rules win the cascade), so nothing in the
   base theme is edited. Covers: chart hover tooltips, the reporting dashboard,
   the reports summary reskin, and the Users tab.
   ========================================================================== */

/* ---- Shared hover tooltip (charts) ---- */
.chart-tip {
  position: fixed; z-index: 200; display: none; pointer-events: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0.5rem 0.65rem; box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  font-size: 0.82rem; max-width: 300px;
}
.tip-row { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.tip-row + .tip-row { margin-top: 0.2rem; }
.tip-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tip-label { color: var(--muted); }
.tip-val { margin-left: auto; font-family: ui-monospace, Consolas, monospace;
  font-weight: 600; color: var(--text); }
svg .seg { cursor: pointer; transition: opacity 0.12s ease; }
svg .seg:hover { opacity: 0.82; }

/* ---- Dashboard head (scope + range on the right) ---- */
.dash-head { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.6rem; }
.dash-head .row { margin: 0; }
.stat-value.sm { font-size: 1.15rem; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }

/* ---- Per-project horizontal bars (dashboard right panel) ---- */
.proj-bars { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 0.4rem; }
.proj-row { display: grid; grid-template-columns: 1fr 2.2fr auto auto;
  align-items: center; gap: 0.6rem; font-size: 0.84rem; padding: 0.15rem 0; }
.proj-row:hover { background: var(--hover); border-radius: 6px; }
.proj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-track { background: var(--row-head); border-radius: 999px; height: 12px; overflow: hidden; }
.proj-fill { height: 100%; border-radius: 999px; min-width: 2px; }
.proj-dur { font-family: ui-monospace, Consolas, monospace; color: var(--text); }
.proj-pct { color: var(--muted); font-size: 0.78rem; min-width: 46px; text-align: right; }
#dash-team .placeholder { color: var(--muted); }

/* ---- Reports: prominent total + side-by-side lower row (image 2) ---- */
#rep-summary { font-size: 1.15rem; font-weight: 700;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.rep-lower { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 1rem; align-items: start; }
@media (max-width: 980px) { .rep-lower { grid-template-columns: 1fr; } }
#rep-bars .bar-rect { fill: #66bb6a; }   /* single green series, Clockify-style */

/* ---- Users tab (chips + lead) ---- */
.chip { display: inline-block; padding: 0.05rem 0.55rem; margin: 0.1rem 0.25rem 0.1rem 0;
  border-radius: 999px; border: 1px solid var(--border); font-size: 0.74rem;
  color: var(--text); white-space: nowrap; }
.chip.lead { border-color: var(--pulse); color: var(--pulse); }
.chip .star { margin-left: 0.25rem; }
.role-tag { text-transform: capitalize; }
tr.inactive-row td { opacity: 0.55; }

/* ---- Import-from-Jira control ---- */
.import-box { border-top: 1px solid var(--border); margin-top: 0.6rem; padding-top: 0.7rem; }
.import-box input[type="number"] { flex: 0 0 70px; }

@media print { .chart-tip { display: none !important; } }

/* ---- Spreadsheet import mapping ---- */
.xl-table td .hint, .xl-table .hint { font-size: 0.78rem; }
.xl-table select { width: 100%; max-width: 220px; }
#xl-result table { margin-top: 0.6rem; }
#xl-file { flex: 1 1 260px; }

/* ---- PHASE D2.1 BRANDING & EXPORT ---- */
.brand-logo { display: block; background: #fff; border-radius: 8px;
  padding: 5px 9px; width: 150px; height: auto; }
.sidebar .brand { flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.brand-sub { display: flex; align-items: center; gap: 0.55rem; }
@media (max-width: 860px) {
  .brand-logo { width: 104px; }
  .sidebar .brand { flex-direction: row; align-items: center; }
}
.print-header { display: none; }
@media print {
  .print-header { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
  .print-header img { height: 46px; }
  .print-header .pt { font-size: 1.05rem; font-weight: 700; color: #000; }
  #view-reports .view-head { display: none; }
  #rep-controls .row { display: none !important; }
  .rep-lower { grid-template-columns: 1fr; }
  .card, #rep-bars-card, #rep-donut-card, #rep-issues-card, #rep-entries-card {
    break-inside: avoid; page-break-inside: avoid; }
}

/* ---- PHASE D2.2 CSS: draggable columns ---- */
th.col-drag { cursor: grab; user-select: none; }
th.col-drag:active { cursor: grabbing; }
th.col-over { border-bottom: 2px solid var(--blue); }
#rep-entries table th:last-child, #rep-entries table td:last-child { display: none; }
