﻿/* ── 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 }
