* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green-dark:   #166534;
  --green-mid:    #16a34a;
  --green-light:  #dcfce7;
  --green-border: #bbf7d0;
  --green-bg:    #EAF3DE;
  --green-text:  #3B6D11;
  --green-border:#97C459;
  --red-bg:      #FCEBEB;
  --red-text:    #A32D2D;
  --red-border:  #F09595;
  --gray-bg:     #f8fafc;
  --gray-border: #e2e8f0;
  --text-primary:   #1a202c;
  --text-secondary: #64748b;
  --white:    #ffffff;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-bg);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #166534, #16a34a);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.logo-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav { display: flex; gap: 4px; }

.nav a {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  font-weight: 500;
}

.nav a:hover {
  background: var(--gray-bg);
  color: var(--text-primary);
}

.nav a.active {
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}

.api-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #bbf7d0;
}

.api-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: background 0.3s;
}

.api-badge .dot.online { background: #22c55e; }

/* ── Layout ──────────────────────────────────────────────── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-header { margin-bottom: 28px; }

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Metric cards ────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.metric-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-family: 'DM Mono', monospace;
}

.metric-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 20px;
  font-weight: 500;
}

.metric-badge.blue  { background: #dcfce7;  color: #166534; }
.metric-badge.green { background: var(--green-bg);    color: var(--green-text); }
.metric-badge.red   { background: var(--red-bg);      color: var(--red-text); }

/* ── Two column layout ───────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ── Pills ───────────────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.pill.fraud  { background: var(--red-bg);   color: var(--red-text); }
.pill.normal { background: var(--green-bg); color: var(--green-text); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #0a3320, #166534, #16a34a);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
}

.btn-primary:hover   { opacity: 0.92; transform: translateY(-1px); }
.btn-primary:active  { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  padding: 9px 18px;
  background: var(--white);
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.btn-secondary:hover { background: #dcfce7; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .topbar { padding: 0 16px; }
  .page   { padding: 20px 16px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .nav a { padding: 7px 10px; font-size: 12px; }
}

@media (max-width: 600px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .logo-text { display: none; }
}

/* ── Icons ──────────────────────────────────────────────── */
.svg-icon {
  width: 20px;  
  height: 20px;
  display: block;
}

.btn-icon {
  width: 18px;  
  height: 18px;
  display: block;
}

.title-icon {
  width: 18px;
  height: 18px;
  display: block;
  /* Menjaga agar icon tetap proporsional */
  object-fit: contain;
}

.placeholder-svg {
  width: 42px;  
  height: 42px;
  margin: 0 auto 16px auto; 
  opacity: 0.6; 
}

.upload-svg {
  width: 48px;  
  height: 48px;
  margin: 0 auto 16px auto; 
  display: block;
  transition: transform 0.2s ease; 
}

.upload-zone:hover .upload-svg,
.upload-zone.dragover .upload-svg {
  transform: scale(1.1);
}

.meta-icon {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.7; 
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--gray-border);
  background: white;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
  
  /* Tambahkan 3 baris ini agar icon & teks sejajar */
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-icon {
  width: 14px;
  height: 14px;
  display: block;
}

/* ── Search Input ────────────────────────────────────────── */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto; /* Ini yang akan mendorong form ke kanan */
}

.search-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  opacity: 0.5;
}

.search-input {
  padding: 7px 12px 7px 32px; /* Padding kiri 32px untuk tempat ikon */
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-primary);
  background: white;
  font-family: 'DM Sans', sans-serif;
  width: 180px;
}

.search-input:focus { 
  outline: none; 
  border-color: var(--green-mid); /* Menggunakan warna hijau tema baru */
}

.empty-svg {
  width: 56px;  /* Ukuran besar karena ini elemen utama di layar kosong */
  height: 56px;
  margin: 0 auto 16px auto; /* Memposisikan ke tengah dan memberi jarak bawah */
  display: block;
  opacity: 0.4; /* Dibuat agak transparan agar terasa seperti background/kosong */
}

.verdict-svg {
  width: 48px;  /* Dibuat cukup besar agar hasil prediksinya terlihat jelas */
  height: 48px;
  margin: 0 auto;
  display: block;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tab-icon {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0.8; 
}

.decision-q {
  display: flex;
  align-items: flex-start; 
  gap: 8px;
}

.q-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0; 
  margin-top: 0px; 
  opacity: 0.8;
}