﻿/* ===== Evaluasi Page ===== */

.ev-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---- Header ---- */
.ev-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.ev-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.ev-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

.ev-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.ev-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ev-search-box:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ev-search-box svg { color: #94a3b8; flex-shrink: 0; }

.ev-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  color: #1e293b;
  min-width: 140px;
}

.ev-search-input::placeholder { color: #94a3b8; }

.ev-filter-select {
  padding: 0.55rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #fff;
  color: #374151;
  cursor: pointer;
  min-width: 170px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ev-filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ---- Stats ---- */
.ev-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.ev-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ev-stat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ev-stat-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ev-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.ev-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.ev-stat-pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: #94a3b8;
}

/* ---- Summary Row ---- */
.ev-summary-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

.ev-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

/* Pie Card */
.ev-pie-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
}

.ev-pie-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.ev-pie-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.ev-pie-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ev-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #475569;
}

.ev-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ev-legend-label { flex: 1; }

.ev-legend-count {
  font-weight: 600;
  color: #1e293b;
}

/* AI Card */
.ev-ai-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ev-ai-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ev-ai-header svg { color: #3b82f6; }

.ev-ai-text {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  background: #f0f9ff;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border-left: 3px solid #3b82f6;
}

.ev-ai-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ev-ai-tag {
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ev-ai-tag--red   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.ev-ai-tag--yellow { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* ---- Data Section ---- */
.ev-data-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
}

.ev-data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ev-view-toggle {
  display: flex;
  gap: 0.35rem;
}

.ev-toggle-btn {
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.ev-toggle-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.ev-toggle-btn--active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

/* ---- Table ---- */
.ev-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ev-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.ev-table th {
  text-align: left;
  padding: 0.75rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.ev-table td {
  padding: 0.75rem 0.65rem;
  font-size: 0.88rem;
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.ev-table tbody tr:hover {
  background: #f8fafc;
}

.ev-td-name {
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}

.ev-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Mini timeline in table */
.ev-mini-timeline {
  display: flex;
  align-items: center;
  gap: 0;
}

.ev-mini-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ev-mini-line {
  width: 18px;
  height: 2px;
  background: #cbd5e1;
}

.ev-trend-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #3b82f6;
  white-space: nowrap;
}

.ev-td-eval {
  color: #64748b;
  font-size: 0.82rem;
}

/* ---- Card Grid ---- */
.ev-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.ev-patient-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem;
  background: #fafbfc;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ev-patient-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.08);
}

.ev-patient-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.ev-patient-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

/* Card Timeline */
.ev-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.85rem;
}

.ev-tl-step {
  display: flex;
  gap: 0.65rem;
}

.ev-tl-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2px;
}

.ev-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ev-tl-connector {
  width: 2px;
  flex: 1;
  min-height: 18px;
  background: #e2e8f0;
}

.ev-tl-content {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.55rem;
}

.ev-tl-day {
  font-size: 0.8rem;
  font-weight: 600;
  color: #3b82f6;
}

.ev-tl-desc {
  font-size: 0.8rem;
  color: #64748b;
}

/* Trend Chart in Card */
.ev-trend-chart {
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
}

.ev-trend-label {
  display: block;
  font-size: 0.75rem;
  color: #3b82f6;
  margin-top: 0.25rem;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
  .ev-summary-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ev-header {
    flex-direction: column;
  }

  .ev-header-actions {
    width: 100%;
  }

  .ev-search-box {
    flex: 1;
    min-width: 0;
  }

  .ev-search-input {
    min-width: 0;
    width: 100%;
  }

  .ev-filter-select {
    min-width: 0;
    flex: 1;
  }

  .ev-stats {
    grid-template-columns: 1fr;
  }

  .ev-data-section {
    padding: 1rem;
  }

  .ev-card-grid {
    grid-template-columns: 1fr;
  }

  .ev-table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .ev-title {
    font-size: 1.25rem;
  }

  .ev-header-actions {
    flex-direction: column;
  }

  .ev-filter-select {
    width: 100%;
  }

  .ev-stat-card {
    padding: 0.85rem 1rem;
  }

  .ev-stat-value {
    font-size: 1.15rem;
  }

  .ev-pie-card,
  .ev-ai-card,
  .ev-data-section {
    padding: 0.85rem;
    border-radius: 10px;
  }

  .ev-patient-card {
    padding: 0.85rem;
  }

  .ev-data-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
