﻿/* ── Sidebar sub-item ─────────────────────────────────────────────── */
.tf-sidebar-sub {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 6px 4px 6px;
  padding: 5px 6px 5px 28px;
  border-radius: 4px;
  background: var(--gh-canvas-subtle);
  border-left: 2px solid var(--gh-accent);
  min-width: 0;
}
.tf-sidebar-sub .nav-label {
  flex: 1; font-size: 12px; color: var(--gh-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tf-sidebar-sub-close {
  flex-shrink: 0; background: none; border: none;
  color: var(--gh-fg-muted); cursor: pointer;
  font-size: 11px; width: 18px; height: 18px;
  border-radius: 3px; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.tf-sidebar-sub-close:hover { background: var(--gh-canvas); color: var(--gh-fg); }
.sidebar.collapsed .tf-sidebar-sub { display: none; }

/* ── Stats ────────────────────────────────────────────────────────── */
.tf-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.tf-stat {
  background: var(--gh-canvas); border: 1px solid var(--gh-border);
  border-radius: 8px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.tf-stat-val {
  font-size: 1.75rem; font-weight: 600;
  color: var(--gh-fg); line-height: 1.2;
}
.tf-stat-lbl {
  font-size: 14px; color: var(--gh-fg-muted);
  letter-spacing: .07em; text-transform: uppercase;
}
.tf-stat.erfolgreich .tf-stat-val        { color: var(--gh-success) }
.tf-stat.nicht-erfolgreich .tf-stat-val  { color: var(--gh-danger)  }
.tf-stat.offen .tf-stat-val              { color: var(--gh-warn)    }

/* ── Toolbar ──────────────────────────────────────────────────────── */
.tf-toolbar { display: flex; align-items: center; margin-bottom: 10px; gap: 10px }

/* ── Table ────────────────────────────────────────────────────────── */
.tf-table-wrap { overflow-x: auto; border: 1px solid var(--gh-border); border-radius: 8px }

.tf-table {
  width: 100%; border-collapse: collapse;
  font-size: 16px;
  min-width: 1080px;
}
.tf-table th {
  background: var(--gh-canvas-subtle); color: var(--gh-fg-muted);
  font-weight: 500; font-size: 14px;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 7px 10px; text-align: left;
  border-bottom: 1px solid var(--gh-border);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.tf-table td {
  padding: 7px 10px; color: var(--gh-fg);
  border-bottom: 1px solid var(--gh-border-muted);
  white-space: nowrap; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis;
}
.tf-table tbody tr:last-child td { border-bottom: none }
.tf-table tbody tr:hover td { background: var(--gh-canvas-subtle) }
.tf-table td.muted { color: var(--gh-fg-muted) }

/* ── Badges ───────────────────────────────────────────────────────── */
.tf-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 9px; border-radius: 100px;
  font-size: 14px; letter-spacing: .04em; font-weight: 500;
  white-space: nowrap;
}
.tf-badge.offen              { background: var(--gh-warn-subtle);    color: var(--gh-warn);    border: 1px solid rgba(210,153,34,.35)  }
.tf-badge.erfolgreich        { background: var(--gh-success-subtle); color: var(--gh-success); border: 1px solid rgba(63,185,80,.35)   }
.tf-badge.nicht-erfolgreich  { background: var(--gh-danger-subtle);  color: var(--gh-danger);  border: 1px solid rgba(248,81,73,.35)   }

.tf-val-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 9px; border-radius: 100px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.tf-val-badge.valide         { background: var(--gh-success-subtle); color: var(--gh-success); border: 1px solid rgba(63,185,80,.35)  }
.tf-val-badge.nicht-valide   { background: var(--gh-danger-subtle);  color: var(--gh-danger);  border: 1px solid rgba(248,81,73,.35)  }
.tf-val-badge.leer           { background: rgba(139,148,158,.1);     color: var(--gh-fg-muted); border: 1px solid rgba(139,148,158,.25) }

.tf-status-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 9px; border-radius: 100px;
  font-size: 14px; white-space: nowrap;
}

/* ── Table action buttons ─────────────────────────────────────────── */
.tf-table .btn-icon {
  background: none; border: none; cursor: pointer;
  color: var(--gh-fg-muted); font-size: 16px;
  padding: 2px 5px; border-radius: 4px;
  transition: background .15s, color .15s;
}
.tf-table .btn-icon:hover     { background: var(--gh-canvas-subtle); color: var(--gh-fg) }
.tf-table .btn-icon.del:hover { background: var(--gh-danger); color: #fff }

/* ── Status Settings ──────────────────────────────────────────────── */
.tf-status-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px }

.tf-status-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; background: var(--gh-canvas-subtle);
  border: 1px solid var(--gh-border); border-radius: 6px;
}
.tf-status-color {
  width: 24px; height: 24px; border-radius: 4px;
  border: 1px solid var(--gh-border); cursor: pointer; padding: 1px;
  background: transparent; flex-shrink: 0;
}
.tf-status-name {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--gh-fg); font-size: 16px;
  border-bottom: 1px solid transparent; transition: border-color .15s;
}
.tf-status-name:focus { border-bottom-color: var(--gh-accent) }
.tf-status-del {
  background: none; border: none; cursor: pointer;
  color: var(--gh-fg-muted); font-size: 18px; padding: 3px 5px;
  border-radius: 4px; transition: background .15s, color .15s; flex-shrink: 0;
}
.tf-status-del:hover { background: var(--gh-danger); color: #fff }

/* ── Combination Matrix ───────────────────────────────────────────── */
.tf-combo-wrap { overflow-x: auto; margin-top: 6px }

.tf-combo-table {
  border-collapse: collapse;
  font-size: 16px;
}
.tf-combo-table th,
.tf-combo-table td { padding: 7px 12px; text-align: center; border: 1px solid var(--gh-border) }
.tf-combo-table thead th { background: var(--gh-canvas-subtle); color: var(--gh-fg-muted); font-weight: 500; letter-spacing: .05em; white-space: nowrap }
.tf-combo-table tbody th  { background: var(--gh-canvas-subtle); color: var(--gh-fg);       font-weight: 400; text-align: left; white-space: nowrap }
.tf-combo-table td        { background: var(--gh-canvas) }
.tf-combo-table tbody tr:hover td { background: var(--gh-canvas-subtle) }
.tf-combo-table input[type=checkbox] { width: 14px; height: 14px; cursor: pointer; accent-color: var(--gh-accent) }

.tf-combo-empty { color: var(--gh-fg-muted); font-size: 15px; padding: 10px 0; font-style: italic }

/* ── Label-above-field layout for detail panel ────────────────────── */
.tf-field {
  display: flex; flex-direction: column; gap: 4px;
}
.tf-field label {
  font-size: 12px; font-weight: 500; color: var(--gh-fg-muted);
}

/* ── Detail view ──────────────────────────────────────────────────── */
.tf-detail-hdr {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.tf-detail-title {
  flex: 1; font-weight: 600; font-size: 20px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--gh-fg);
}
.tf-detail-grid { display: flex; flex-direction: column; gap: 0 }

.tf-info-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 16px; padding: 5px 0;
  border-bottom: 1px solid var(--gh-border-muted);
}
.tf-info-row:last-child { border-bottom: none }
.tf-info-lbl {
  color: var(--gh-fg-muted); width: 120px; flex-shrink: 0;
  font-size: 14px; text-transform: uppercase; letter-spacing: .06em;
  padding-top: 2px;
}
.tf-info-val { color: var(--gh-fg) }

/* ── Validation dropzone in detail ───────────────────────────────── */
.tf-val-dz {
  border: 1.5px dashed var(--gh-border); border-radius: 8px;
  padding: 16px 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: border-color .15s, background .15s;
}
.tf-val-dz:hover, .tf-val-dz.over {
  border-color: var(--gh-accent); background: var(--gh-accent-subtle);
}

/* ── Clickable table rows ─────────────────────────────────────────── */
.tf-table tbody tr.tf-clickable { cursor: pointer }

/* ── History testfall badge ───────────────────────────────────────── */
.tf-hist-link { cursor: pointer; transition: opacity .15s }
.tf-hist-link:hover { opacity: .7 }

/* ── Status Flow Bar (detail view) ──────────────────────────────── */
.tf-flow {
  display: flex; align-items: flex-start; gap: 0;
  background: linear-gradient(135deg, var(--gh-canvas) 0%, var(--gh-canvas-subtle) 100%);
  border: 1px solid var(--gh-border);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.04);
}

.tf-flow-step {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px; flex-shrink: 0;
}

.tf-flow-node {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  border: 2px solid transparent;
  transition: transform .2s, filter .2s;
}
.tf-flow-node:hover { transform: scale(1.1); }

.tf-flow-title {
  font-size: 12px; font-weight: 600; color: var(--gh-fg);
  white-space: nowrap; line-height: 1.2; text-align: center;
}

.tf-flow-value {
  font-size: 11px; font-weight: 500;
  white-space: nowrap; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2; text-align: center;
}

.tf-flow-line {
  flex: 1; height: 2px; min-width: 16px;
  margin: 16px 25px 0; /* top centres with 34px node; sides give 25px gap to steps */
  align-self: flex-start;
  border-radius: 1px; opacity: .5;
}

/* ── Compact dots (list view) ────────────────────────────────────── */
.tf-flow-dots { display: inline-flex; align-items: flex-end; gap: 0; }

.tf-flow-dot-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
}

.tf-flow-dot-lbl {
  font-size: 8px; font-weight: 700;
  color: var(--gh-fg-muted); letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap;
}

.tf-flow-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0; cursor: default; display: block;
  transition: transform .15s;
}
.tf-flow-dot:hover { transform: scale(1.4); }

.tf-flow-dot-seg {
  width: 10px; height: 2px;
  background: var(--gh-border); flex-shrink: 0;
  margin-bottom: 6px; /* aligns connector with dot center */
}

/* ── Rechnungs-PDF Box (Sidebar) ─────────────────────────────── */
.tf-pdf-dz {
  border: 1.5px dashed var(--gh-border); border-radius: 8px;
  padding: 14px 16px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  transition: border-color .15s, background .15s; min-height: 72px;
}
.tf-pdf-dz:hover, .tf-pdf-dz.over {
  border-color: var(--gh-accent); background: var(--gh-accent-subtle);
}
.tf-pdf-file {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--gh-canvas-subtle);
  border: 1px solid var(--gh-border); border-radius: 6px;
  min-width: 0;
}
.tf-pdf-name {
  font-size: 13px; color: var(--gh-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}

/* ── PDF-Ansichts-Modal ──────────────────────────────────────── */
.tf-pdf-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,.6); display: flex;
  align-items: center; justify-content: center;
}
.tf-pdf-panel {
  width: 92vw; height: 92vh;
  background: var(--gh-canvas); border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.tf-pdf-panel-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--gh-border);
  flex-shrink: 0;
}
.tf-pdf-panel-hdr span {
  flex: 1; font-weight: 600; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Vergleich-Modal ─────────────────────────────────────────── */
.tf-cmp-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,.65); display: flex;
  align-items: stretch; justify-content: center;
  padding: 16px;
}
.tf-cmp-panel {
  flex: 1; max-width: 100%;
  background: var(--gh-canvas); border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.tf-cmp-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--gh-border);
  flex-shrink: 0;
}
.tf-cmp-hdr-title {
  flex: 1; font-weight: 600; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tf-cmp-cols {
  flex: 1; display: flex; min-height: 0;
}
.tf-cmp-col {
  display: flex; flex-direction: column; min-width: 20%; overflow: hidden;
}
.tf-cmp-col-hdr {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--gh-fg-muted); background: var(--gh-canvas-subtle);
  border-bottom: 1px solid var(--gh-border); flex-shrink: 0;
}
.tf-cmp-col iframe {
  flex: 1; border: none; min-height: 0;
}
.tf-cmp-splitter {
  width: 8px; flex-shrink: 0; cursor: col-resize;
  background: var(--gh-border);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; user-select: none;
}
.tf-cmp-splitter:hover, .tf-cmp-splitter.dragging {
  background: var(--gh-accent);
}
.tf-cmp-splitter::after {
  content: '⋮'; color: var(--gh-fg-muted); font-size: 14px;
  pointer-events: none;
}
.tf-cmp-chips {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-top: 1px solid var(--gh-border);
  background: var(--gh-canvas-subtle); flex-shrink: 0;
  overflow-x: auto; min-height: 44px;
}
.tf-cmp-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px; cursor: pointer;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--gh-border);
  background: var(--gh-canvas); color: var(--gh-fg);
  transition: background .15s, border-color .15s;
}
.tf-cmp-chip:hover { border-color: var(--gh-accent); }
.tf-cmp-chip.active {
  background: var(--gh-accent); border-color: var(--gh-accent);
  color: #fff;
}
