/* ============================================================
   STYLE TAMBAHAN UNTUK ALGORITMA LEVENSHTEIN UI
   File ini di-load setelah style.css
   ============================================================ */

/* Badge jarak edit di setiap kata saran */
.jarak-badge {
  display: inline-block;
  background: #4dabf7;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

.rekomendasi-kata:hover .jarak-badge {
  background: #1d4ed8;
}

/* Info perhitungan jarak edit setelah user memilih saran */
.info-jarak {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
  border-radius: 6px;
  font-size: 0.95rem;
}

.info-jarak strong {
  color: #0c4128;
}

/* Catatan kecil tentang algoritma di bawah daftar saran */
.info-algoritma {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #6c757d;
  text-align: left;
}

/* State: loading (saat menunggu respons server) */
.loading-text {
  color: #4dabf7;
  font-style: italic;
  padding: 0.5rem 0;
}

/* State: error */
.error-text {
  color: #dc3545;
  background: #f8d7da;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border-left: 4px solid #dc3545;
}

/* State: tidak ditemukan dan tidak ada saran mirip */
.not-found {
  color: #856404;
  background: #fff3cd;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border-left: 4px solid #ffc107;
  text-align: left;
}

/* ============================================================
   FLASH MESSAGE (success / error) untuk halaman admin
   ============================================================ */
.flash-message {
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  border-left: 4px solid;
}

.flash-message.success {
  background: #d4edda;
  color: #155724;
  border-color: #28a745;
}

.flash-message.error {
  background: #f8d7da;
  color: #721c24;
  border-color: #dc3545;
}

/* ============================================================
   DASHBOARD ADMIN: kartu statistik
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-top: 4px solid #4dabf7;
}

.stat-card.success { border-top-color: #28a745; }
.stat-card.warning { border-top-color: #ffc107; }
.stat-card.info    { border-top-color: #17a2b8; }

.stat-card .stat-label {
  font-size: 0.85rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

.stat-card .stat-sub {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* Tabel kecil di dashboard untuk log terbaru */
.dashboard-section {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

.dashboard-section h3 {
  margin-top: 0;
  color: #343a40;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.dashboard-section table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-section table th,
.dashboard-section table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.dashboard-section table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.dashboard-section .empty-state {
  text-align: center;
  color: #6c757d;
  padding: 2rem;
  font-style: italic;
}

/* Sub-statistik (arah terjemahan) */
.arah-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.arah-stat-item {
  flex: 1 1 200px;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid #4dabf7;
}

.arah-stat-item .arah-label {
  font-size: 0.85rem;
  color: #495057;
  text-transform: capitalize;
}

.arah-stat-item .arah-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
}
