/**
 * TSF UI Kit — shared constitutional workspace chrome (IP-001)
 * Extends shell tokens; does not redesign the Universal Workspace grid.
 */

.tsf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* TSF UI baseline — reusable metadata label/value layout */
.tsf-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--uw-meta-group-gap, 24px);
  min-width: 0;
}

.tsf-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: var(--uw-meta-label-value-gap, 10px);
  min-width: 0;
  max-width: 100%;
}

.tsf-meta-label {
  flex-shrink: 0;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, rgba(145, 155, 170, 0.85));
  line-height: 1.2;
}

.tsf-meta-value {
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text, rgba(235, 240, 248, 0.96));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.tsf-ws-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.tsf-ws-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(145, 165, 190, 0.72);
}

.tsf-ws-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(235, 240, 248, 0.96);
}

.tsf-ws-lead {
  margin: 0.3rem 0 0;
  max-width: 40rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(160, 172, 190, 0.82);
}

.tsf-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
}

.tsf-toolbar-left,
.tsf-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.tsf-search {
  min-width: 14rem;
  flex: 1 1 14rem;
}

.tsf-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 0.42rem 0.55rem;
  background: rgba(10, 14, 22, 0.65);
  color: rgba(220, 228, 238, 0.95);
  font: inherit;
  font-size: 0.78rem;
}

.tsf-search-input::placeholder {
  color: rgba(140, 155, 175, 0.65);
}

.tsf-search-input:focus {
  outline: 1px solid rgba(77, 163, 255, 0.35);
  border-color: rgba(77, 163, 255, 0.28);
}

.tsf-action-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tsf-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 0.4rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(200, 210, 225, 0.9);
  font: inherit;
  font-size: 0.72rem;
  cursor: default;
}

.tsf-action-btn.is-primary {
  border-color: rgba(77, 163, 255, 0.35);
  background: rgba(40, 80, 130, 0.35);
  color: rgba(220, 232, 248, 0.95);
}

.tsf-filter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.tsf-filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  padding: 0.28rem 0.5rem;
  background: transparent;
  color: rgba(170, 182, 200, 0.85);
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.tsf-filter-chip em {
  margin-left: 0.28rem;
  font-style: normal;
  color: rgba(150, 170, 195, 0.7);
}

.tsf-filter-chip.is-active {
  border-color: rgba(77, 163, 255, 0.4);
  background: rgba(77, 163, 255, 0.12);
  color: rgba(220, 232, 248, 0.95);
}

.tsf-grid-wrap {
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  max-height: min(52vh, 28rem);
}

.tsf-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.tsf-grid th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 0.48rem 0.55rem;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(140, 155, 175, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(12, 16, 24, 0.96);
  white-space: nowrap;
}

.tsf-grid td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(190, 200, 215, 0.9);
  white-space: nowrap;
}

.tsf-grid-row {
  cursor: pointer;
}

.tsf-grid-row:hover {
  background: rgba(77, 163, 255, 0.06);
}

.tsf-grid-row.is-selected {
  background: rgba(77, 163, 255, 0.12);
}

.tsf-grid-row.is-selected td:first-child {
  color: rgba(235, 242, 252, 0.98);
  font-weight: 550;
}

.tsf-status-badge {
  display: inline-block;
  padding: 0.12rem 0.38rem;
  border-radius: 2px;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.tsf-status-badge.is-pass {
  color: rgba(150, 210, 170, 0.95);
  background: rgba(40, 90, 60, 0.28);
  border-color: rgba(90, 160, 110, 0.25);
}

.tsf-status-badge.is-warn {
  color: rgba(230, 195, 120, 0.95);
  background: rgba(90, 70, 30, 0.28);
  border-color: rgba(180, 140, 60, 0.28);
}

.tsf-status-badge.is-fail {
  color: rgba(220, 150, 150, 0.95);
  background: rgba(90, 40, 40, 0.28);
  border-color: rgba(170, 80, 80, 0.28);
}

.tsf-status-badge.is-muted {
  color: rgba(160, 170, 185, 0.85);
  background: rgba(40, 48, 60, 0.4);
  border-color: rgba(255, 255, 255, 0.06);
}

.tsf-tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0.85rem 0 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.15rem;
}

.tsf-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.4rem 0.55rem;
  background: transparent;
  color: rgba(155, 168, 186, 0.8);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.tsf-tab.is-active {
  color: rgba(225, 234, 246, 0.95);
  border-bottom-color: rgba(77, 163, 255, 0.75);
}

.tsf-tab-panel {
  min-height: 4.5rem;
  padding: 0.55rem 0.15rem 0.25rem;
  font-size: 0.76rem;
  color: rgba(165, 178, 196, 0.82);
}

.tsf-info-card {
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  background: rgba(14, 18, 26, 0.55);
}

.tsf-info-card-title {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(140, 155, 175, 0.7);
}

.tsf-info-card-value {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: rgba(220, 228, 238, 0.95);
}

.tsf-info-card-hint {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: rgba(145, 160, 180, 0.7);
}

.tsf-context-card {
  margin-bottom: 0.75rem;
}

.tsf-context-card-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(220, 228, 238, 0.92);
}

.tsf-context-dl {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.tsf-context-row dt {
  font-size: 0.56rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(140, 155, 175, 0.7);
}

.tsf-context-row dd {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  color: rgba(210, 218, 230, 0.92);
}

.tsf-quick-action {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  padding: 0.38rem 0.45rem;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(200, 210, 225, 0.9);
  font: inherit;
  font-size: 0.7rem;
  cursor: default;
}

.tsf-quick-actions {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tsf-empty-state {
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.tsf-empty-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: rgba(210, 220, 235, 0.9);
}

.tsf-empty-message {
  margin: 0;
  font-size: 0.76rem;
  color: rgba(150, 165, 185, 0.75);
}
