.wf-monitor-container {
  margin: 17px 26px;
}

// Summary cards
.wf-summary-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.wf-card {
  flex: 1;
  min-width: 130px;
  padding: 16px 20px;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s;

  &:hover {
    transform: translateY(-2px);
  }

  &__count {
    font-size: 28px;
    font-weight: 700;
  }

  &__label {
    font-size: 12px;
    color: var(--text-secondary, #666);
  }

  &--pending {
    border-top: 3px solid #f58d00;
    .wf-card__count { color: #f58d00; }
  }

  &--overdue {
    border-top: 3px solid #ed2531;
    .wf-card__count { color: #ed2531; }
  }

  &--approved {
    border-top: 3px solid #32ae73;
    .wf-card__count { color: #32ae73; }
  }

  &--rejected {
    border-top: 3px solid #ed2531;
    .wf-card__count { color: #ed2531; }
  }

  &--returned {
    border-top: 3px solid #6e3ab6;
    .wf-card__count { color: #6e3ab6; }
  }
}

// Filter row
.wf-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wf-date-input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;

  &:focus {
    border-color: var(--action-primary-default, #6e3ab6);
  }
}

.wf-btn-refresh {
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--action-primary-default, #6e3ab6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;

  &:hover {
    opacity: 0.88;
  }
}

// Instance table
.wf-instance-table-wrap {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  max-height: calc(100vh - 320px);
}

.wf-instance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;

  thead tr {
    background: #f4f4f8;
    position: sticky;
    top: 0;
    z-index: 2;
  }

  th,
  td {
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
  }

  th {
    font-weight: 600;
    color: var(--text-secondary, #666);
    font-size: 12px;
  }

  td {
    border-bottom: 1px solid #eee;
  }

  .wf-row-clickable {
    cursor: pointer;

    &:hover {
      background: #f9f5ff;
    }
  }

  .wf-row--overdue td:first-child {
    border-left: 3px solid #ed2531;
  }

  .wf-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary, #666);
  }
}

// Status badge
.wf-status-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.wf-status--pending  { background: #fff3e0; color: #f58d00; }
.wf-status--approved { background: #e8f5e9; color: #32ae73; }
.wf-status--rejected { background: #fdecea; color: #ed2531; }
.wf-status--returned { background: #ede7f6; color: #6e3ab6; }

// Pagination
.wf-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 0;
  font-size: 13px;

  button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px;

    &:disabled {
      opacity: 0.4;
      cursor: default;
    }
  }
}

// Lightbox
.LightBoxmodal {
  display: flex;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.Detail-LightBox-contents {
  background: #fff;
  border-radius: 10px;
  width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wf-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--action-primary-default, #6e3ab6);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px 10px 0 0;

  .wf-lightbox-close {
    cursor: pointer;
  }
}

.wf-lightbox-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.wf-history-row {
  display: grid;
  grid-template-columns: 100px 1fr 150px;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  align-items: start;

  &__action { font-weight: 600; font-size: 12px; }
  &__user    { font-size: 13px; }
  &__date    { font-size: 12px; color: var(--text-secondary, #666); text-align: right; }
  &__comment {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #666;
    font-style: italic;
    padding-top: 4px;
  }
}

.wf-action--approve  { color: #32ae73; }
.wf-action--reject   { color: #ed2531; }
.wf-action--return   { color: #f58d00; }
.wf-action--escalate { color: #6e3ab6; }
