$bg-panel:     #ffffff;
$bg-card:      #f1f5f9;
$border:       #e2e8f0;
$text-primary: #1e293b;
$text-muted:   #64748b;
$accent-blue:  #2563eb;
$accent-red:   #dc2626;
$accent-amber: #d97706;

.ws-tile {
  border: 1px solid $border;
  border-radius: 8px;
  background: $bg-panel;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;

  &--gap {
    border-color: $accent-amber;
  }
}

.ws-tile__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-tile__title {
  display: flex;
  flex-direction: column;

  .ws-code {
    font-weight: 700;
    font-size: 13px;
    color: $text-primary;
  }

  .ws-name {
    font-size: 11px;
    color: $text-muted;
  }
}

.ws-tile__count {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: $bg-card;
  color: $text-primary;

  &--gap {
    background: #fef3c7;
    color: $accent-amber;
  }
}

.ws-tile__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 32px;
}

.ws-empty {
  font-size: 12px;
  color: $text-muted;
  font-style: italic;
}

.ws-person {
  display: flex;
  align-items: center;
  gap: 8px;

  &--absent {
    opacity: 0.65;
  }
}

.ws-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;

  &--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: $bg-card;
    color: $text-primary;
    font-size: 12px;
    font-weight: 600;
  }

  &--absent {
    background: #fee2e2;
    color: $accent-red;
  }
}

.ws-person__info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ws-person__name {
  font-size: 12px;
  font-weight: 600;
  color: $text-primary;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-person__meta {
  font-size: 11px;
  color: $text-muted;
}

.ws-primary-badge {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 10px;
}

.ws-leave-badge {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fee2e2;
  color: $accent-red;
  font-size: 10px;
  font-weight: 600;
}

.ws-replaced-by {
  color: $accent-blue;
  margin-left: 4px;
}

.ws-replace-btn {
  border: none;
  background: transparent;
  color: $text-muted;
  cursor: pointer;
  padding: 2px;

  mat-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }

  &:hover {
    color: $accent-blue;
  }
}

.ws-assign-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  border: 1px dashed $border;
  border-radius: 4px;
  background: #fff;
  color: $accent-blue;
  font-size: 12px;
  cursor: pointer;

  mat-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
  }

  &:hover {
    background: $bg-card;
  }
}
