/* ===== FATIGUE PAGE STYLES ===== */

/* KPI Kritis pulse */
.kpi-kritis {
  color: var(--red);
  animation: kritis-pulse 1.8s ease infinite;
}
@keyframes kritis-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Segmented bar */
.fatigue-seg-wrap {
  margin-bottom: 0.875rem;
}
.seg-pct-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  font-family: 'JetBrains Mono', monospace;
}

/* Legend */
.fatigue-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem 1rem;
  margin-bottom: 1rem;
  padding: 0.625rem;
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.fatigue-legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.legend-label {
  color: var(--muted);
  flex: 1;
}
.legend-count {
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}
.kritis-count {
  color: var(--red);
}

/* Tren chart section */
.tren-section {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.tren-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.tren-chart-wrap {
  background: rgba(239,68,68,0.03);
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.1);
  padding: 0.5rem 0.5rem 0.25rem;
}

/* Kritis rows in table */
.kritis-row td {
  background: rgba(239,68,68,0.02);
}
.kritis-row:hover td {
  background: rgba(239,68,68,0.05) !important;
}

/* Factor chips */
.factor-chip {
  display: inline-block;
  padding: 0.1rem 0.375rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-right: 0.25rem;
}
.f1 { background: rgba(239,68,68,0.15); color: #991B1B; }
.f2 { background: rgba(249,115,22,0.15); color: #9A3412; }
.f3 { background: rgba(245,158,11,0.15); color: #92400E; }
.f4 { background: rgba(139,92,246,0.15); color: #5B21B6; }

/* Pulse badge */
.pulse-badge {
  animation: blink 1.5s ease infinite;
}

/* Factor cards */
.factor-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.factor-card {
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  border: 1px solid transparent;
}
.fc-f1 { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.15); }
.fc-f2 { background: rgba(249,115,22,0.06); border-color: rgba(249,115,22,0.15); }
.fc-f3 { background: rgba(245,158,11,0.06); border-color: rgba(245,158,11,0.15); }
.fc-f4 { background: rgba(139,92,246,0.06); border-color: rgba(139,92,246,0.15); }

.fc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}
.fc-code {
  font-size: 0.6875rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--navy);
}
.fc-weight {
  font-size: 0.625rem;
  color: var(--muted);
  font-weight: 600;
}
.fc-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.fc-desc {
  font-size: 0.625rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Formula total */
.formula-total {
  background: rgba(27,58,107,0.06);
  border: 1px solid rgba(27,58,107,0.15);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.75rem;
}

/* Category key */
.category-key {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ck-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--muted);
}
.ck-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* Self-report levels */
.report-level {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 100px;
  font-size: 0.625rem;
  font-weight: 700;
  margin-left: 0.375rem;
}
.level-berat { background: rgba(239,68,68,0.12); color: #991B1B; }
.level-sedang { background: rgba(245,158,11,0.12); color: #92400E; }
.level-ringan { background: rgba(37,99,235,0.12); color: #1E40AF; }

/* Unread alert */
.alert-item.unread {
  background: rgba(37,99,235,0.02);
}
.alert-item.unread .alert-name {
  font-weight: 700;
}

/* Ack done */
.ack-done {
  font-size: 0.6875rem;
  color: var(--green);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

/* Constraint engine list */
.constraint-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ce-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.ce-item:last-child { border-bottom: none; }
.ce-item > i {
  font-size: 0.875rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.ce-ok > i { color: var(--green); }
.ce-warn > i { color: var(--amber); }
.ce-body { flex: 1; }
.ce-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}
.ce-desc {
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: 1px;
}

/* Animated prog bars */
.prog-bar-fill {
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Tren bar animation */
.tren-bar {
  transition: height 0.6s ease, y 0.6s ease;
}
