$border:       #e2e8f0;
$bg-card:      #f1f5f9;
$text-primary: #1e293b;
$text-muted:   #64748b;
$accent-blue:  #2563eb;
$accent-green: #047857;
$accent-green-bg: #ecfdf5;
$accent-amber: #92400e;
$accent-amber-bg: #fffbeb;
$accent-red: #b91c1c;
$accent-red-bg: #fef2f2;

.ldt-filter-bar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding: 12px 0;
  flex-wrap: wrap;
}

// ── Plant Overview — wrapping card grid (many lines) ────────────────────────

.plo-empty {
  padding: 24px;
  text-align: center;
  color: $text-muted;
  font-size: 14px;
}

.plo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.plo-line-card {
  border: 1px solid $border;
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;

  &:hover {
    border-color: $accent-blue;
  }

  &__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 600;
    color: $text-primary;
  }

  &__code {
    font-size: 11px;
    color: $text-muted;
  }

  &__stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
  }

  &__footer {
    margin-top: 10px;
    font-size: 12px;
    color: $accent-blue;
  }
}

.plo-stat {
  font-size: 12px;
  color: $text-muted;
}

.plo-gap-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: $accent-amber-bg;
  color: $accent-amber;

  &--ok {
    background: $accent-green-bg;
    color: $accent-green;
  }
}

// ── Line Detail — ordered horizontal flow-strip ──────────────────────────────

.ldt-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 4px;
}

.ldt-back {
  border: none;
  background: none;
  color: $accent-blue;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.ldt-detail-title {
  font-weight: 600;
  color: $text-primary;
}

.ldt-empty {
  padding: 24px;
  text-align: center;
  color: $text-muted;
  font-size: 14px;
}

.ldt-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding: 12px 0 20px;
}

.ldt-station {
  flex: 0 0 240px;
  border: 1px solid $border;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;

  &__header {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  &__name {
    font-weight: 600;
    font-size: 13px;
    color: $text-primary;
  }

  &__status {
    font-size: 11px;
    color: $accent-green;
    margin-top: 2px;

    &--idle {
      color: $text-muted;
    }

    &--outage {
      color: $accent-red;
      font-weight: 600;
    }
  }

  &__body {
    margin-top: 8px;
    border-top: 1px dashed $border;
    padding-top: 8px;
  }
}

.ldt-arrow {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: $text-muted;
  font-size: 16px;
}

.ldt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;

  &--live {
    background: $accent-green;
    box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.6);
    animation: ldt-pulse 1.6s infinite;
  }

  &--idle {
    background: $text-muted;
  }

  &--outage {
    background: $accent-red;
    animation: none;
    box-shadow: none;
  }
}

@keyframes ldt-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(4, 120, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(4, 120, 87, 0); }
}

.ldt-empty-state {
  font-size: 12px;
  color: $text-muted;
}

.ldt-employee {
  padding: 6px 0;
  border-bottom: 1px solid $border;
  cursor: pointer;

  &:last-child {
    border-bottom: none;
  }

  &__row {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  &__name {
    font-size: 12px;
    font-weight: 600;
    color: $text-primary;
  }

  &__meta {
    font-size: 11px;
    color: $text-muted;
    margin-left: 14px;
  }
}

// Skill-gap chip styling — copied verbatim from skillgapforroster.component.scss for visual
// consistency between the two screens (no shared base component in this project's convention).
.skg-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: $accent-green;
  flex-shrink: 0;

  &.has-gap {
    background: $accent-amber;
  }
}

.skg-skills {
  margin-top: 6px;
  margin-left: 14px;
  padding-top: 6px;
  border-top: 1px dashed $border;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skg-skill-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;

  &.gapstatus-met { background: $accent-green-bg; color: $accent-green; }
  &.gapstatus-gap { background: $accent-amber-bg; color: $accent-amber; }
  &.gapstatus-noprofile { background: $bg-card; color: $text-muted; }
}
