/* Overview tiles and KPIs, the data-entry toolbar and the lineage detail card. */

/* =========================
   Overview / Data Entry / lineage detail
   Layout geometry follows the newer build; all colour and type comes from the
   tokens above so it matches the rest of the app.
   ========================= */

.overviewContent{ flex:1 1 auto; min-height:0; overflow-y:auto; padding:22px 28px 32px; }
.dataEntryContent{ flex:1 1 auto; min-height:0; overflow:hidden; padding:22px 28px; display:flex; flex-direction:column; }


/* bento tiles */
.bento{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; }
.tile{
  grid-column:span 2; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-md); padding:16px 18px; box-shadow:var(--shadow-sm);
  display:flex; flex-direction:column; gap:10px; min-width:0;
}
.tile.wide{ grid-column:span 3; }
.tile.full{ grid-column:span 6; }
.tile-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.tile-label{ font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; font-weight:600; }
.tile-icon{ width:26px; height:26px; border-radius:7px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.tile-value{ font-size:26px; font-weight:700; letter-spacing:-.3px; line-height:1; font-family:var(--mono); }
.tile-sub{ font-size:12px; color:var(--muted); }
.tile-body{ flex:1; display:flex; flex-direction:column; justify-content:center; }

.bg-good{ background:var(--good-wash); color:var(--good); }
.bg-info{ background:var(--info-wash); color:var(--info); }
.bg-warn{ background:var(--warn-wash); color:var(--warn); }
.bg-critical{ background:var(--critical-wash); color:var(--critical); }
.bg-accent{ background:var(--primary-soft); color:var(--dark-teal); }
.status-good{ color:var(--good); }
.status-info{ color:var(--info); }
.status-warn{ color:var(--warn); }
.status-critical{ color:var(--critical); }
.status-accent{ color:var(--primary); }

.gauge-wrap{ display:flex; align-items:center; gap:14px; flex:1; }
.gauge{ flex-shrink:0; }
.gauge-num{ font-size:21px; font-weight:700; font-family:var(--mono); }

.barlist{ display:flex; flex-direction:column; gap:7px; }
.statRow{ display:flex; gap:26px; align-items:flex-start; }
.stat{ min-width:0; }
.statValue{
  font-size:26px; font-weight:700; letter-spacing:-.3px; line-height:1;
  font-family:var(--mono);
}
.statLabel{ font-size:11.5px; color:var(--muted); margin-top:4px; white-space:nowrap; }

.kpiList{
  display:flex; flex-direction:column; gap:0; margin-top:12px;
  border-top:1px solid var(--border-soft);
}
.kpiRow{
  display:flex; align-items:baseline; gap:10px; padding:6px 0;
  border-bottom:1px solid var(--border-soft); font-size:12px;
}
.kpiRow:last-child{ border-bottom:none; }
.kpiRow .k{ flex:1; color:var(--muted); min-width:0; }
.kpiRow .v{ font-family:var(--mono); font-weight:700; font-size:13px; white-space:nowrap; }
.kpiRow .of{ color:var(--muted); font-weight:400; font-size:11px; }
.barrow{ display:flex; align-items:center; gap:8px; font-size:11.5px; }
.barrow .lbl{ width:78px; flex-shrink:0; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.qbars .lbl{ width:92px; }
.barrow .track{ flex:1; height:6px; border-radius:3px; background:var(--border-soft); overflow:hidden; }
.barrow .fill{ height:100%; border-radius:3px; background:var(--primary); }
.barrow .num{ width:26px; text-align:right; font-family:var(--mono); color:var(--muted); flex-shrink:0; }

.feed{ display:flex; flex-direction:column; }
.feedrow{
  display:grid; grid-template-columns:110px 18px 1fr auto; gap:10px; align-items:center;
  padding:8px 0; border-top:1px solid var(--border-soft); font-size:12.5px;
}
.feedrow:first-child{ border-top:none; }
.feed-time{ font-family:var(--mono); color:var(--muted); font-size:11px; }
.feed-dot{ width:8px; height:8px; border-radius:50%; background:var(--primary); }
.feed-actor{ color:var(--muted); font-size:11.5px; text-align:right; white-space:nowrap; }
.feed-empty{ color:var(--muted); font-size:12.5px; padding:6px 0; }

/* lineage header, zoom controls and detail panel */
.lineageHead{ padding:14px 22px 0; flex:none; display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.lineageHead h2{ font-size:16px; font-weight:700; margin:0; }
.lineageHead .hint{ font-size:12px; color:var(--muted); }
.lineageControls{ position:absolute; top:12px; right:12px; z-index:6; display:flex; flex-direction:column; gap:6px; }
.lctl{
  width:30px; height:30px; padding:0; border-radius:8px; background:var(--surface);
  border:1px solid var(--border); color:var(--muted); font-size:15px; font-weight:700;
  line-height:1; box-shadow:var(--shadow-sm);
}
.lctl:hover{ background:var(--primary-soft); border-color:var(--teal); color:var(--text); }
.lctlWide{ width:auto; padding:0 8px; font-size:10px; letter-spacing:.4px; }

#lineageDetail{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-md); height:100%; min-height:0; overflow:auto; padding:16px;
  display:flex; flex-direction:column; gap:12px;
}
.detailEmpty{ color:var(--muted); font-size:13px; }
.detailTitle{ font-family:var(--mono); font-size:14px; font-weight:600; color:var(--text); word-break:break-word; }
.detailRow{ display:flex; justify-content:space-between; gap:10px; padding:7px 0; border-top:1px solid var(--border-soft); font-size:12.5px; }
.detailRow:first-of-type{ border-top:none; }
.detailRow .k{ color:var(--muted); flex-shrink:0; }
.detailRow .v{ font-weight:600; text-align:right; color:var(--text); min-width:0; word-break:break-word; }

/* row action buttons in the data-entry table */
td.rowActions{ white-space:nowrap; }
.rowActionBtn{
  width:26px; height:26px; padding:0; display:inline-flex; align-items:center; justify-content:center;
  font-size:13px; line-height:1; border-radius:7px; border:1px solid var(--border);
  background:var(--surface); color:var(--muted); vertical-align:middle;
}
.rowActionBtn + .rowActionBtn{ margin-left:6px; }
.rowActionBtn:hover{ background:var(--primary-soft); border-color:var(--teal); color:var(--text); }
.rowActionBtnDanger{ color:var(--critical); }
.rowActionBtnDanger:hover{ background:var(--critical-wash); border-color:var(--critical); color:var(--critical); }
tr.rowPinnedOutside td{ box-shadow:inset 3px 0 0 var(--warn); }

/* decorative corner marks on the diagram frame */
.crosshair{ position:absolute; width:16px; height:16px; opacity:.4; pointer-events:none; z-index:4; }
.crosshair::before, .crosshair::after{ content:""; position:absolute; background:var(--muted); }
.crosshair::before{ width:100%; height:1px; top:50%; }
.crosshair::after{ height:100%; width:1px; left:50%; }
.crosshair.tl{ top:12px; left:12px; }
.crosshair.tr{ top:12px; right:12px; }
.crosshair.bl{ bottom:12px; left:12px; }
.crosshair.br{ bottom:12px; right:12px; }


@media (max-width:1100px){ .bento{ grid-template-columns:repeat(2,1fr); } }

/* editable values in the lineage detail panel */
.detailEditable{
  cursor:pointer; color:var(--link);
  text-decoration:underline dotted; text-underline-offset:2px;
}
.detailEditable:hover{ color:var(--dark-teal); }
span.sens-badge.detailEditable{ text-decoration:none; }

.detailBusinessName{ font-size:12px; color:var(--muted); margin-top:-6px; word-break:break-word; }
.detailSectionLabel{
  font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.6px;
  font-weight:600; margin-top:4px; border-top:1px solid var(--border-soft); padding-top:10px;
}
.detailDescription{ font-size:12.5px; line-height:1.5; color:var(--text); word-break:break-word; white-space:pre-wrap; }
.detailEditableText{
  border-radius:5px; padding:2px 4px; margin:-2px -4px;
  outline:1px solid transparent; cursor:text;
}
.detailEditableText:hover{ background:var(--primary-soft); }
.detailEditableText:focus{ background:var(--surface); outline:1px solid var(--teal); }
.sens-none{ background:var(--bg); color:var(--muted); border:1px dashed var(--border); }

/* data-entry toolbar and per-column filters */

.entryToolbar{
  flex:none; display:flex; align-items:center; gap:12px;
  padding-bottom:10px;
}
.entryCount{ font-size:12px; color:var(--muted); }
#clearColFilters{ margin-left:auto; visibility:hidden; }
.thLabel{ cursor:pointer; white-space:nowrap; }
.colFilter{
  display:block; width:100%; margin-top:5px; padding:3px 6px;
  font-size:11px; font-weight:400; text-transform:none; letter-spacing:0;
  border:1px solid var(--border); border-radius:5px;
  background:var(--surface); color:var(--text);
}
.colFilter::placeholder{ color:var(--muted); opacity:.7; }
.colFilter:focus{ outline:1px solid var(--teal); outline-offset:0; }
