/* Mobile-first -- tool ini memang ditujukan dibuka dari HP (lihat permintaan asli), jadi
   default-nya 1 kolom lebar penuh, touch target besar, baru di-lebarkan di breakpoint desktop. */
:root {
  --bg: #0f1420; --card: #1a2133; --border: #2a3350; --text: #e8ecf5; --muted: #8a93ab;
  --accent: #4f8cff; --critical: #ff4d6d; --high: #ff9f4d; --medium: #ffd84d; --low: #8a93ab;
  --ok: #3ddc97;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.9em; }
.error { color: var(--critical); font-size: 0.9em; }
.req { color: var(--critical); }

.login-card { max-width: 360px; margin: 15vh auto 0; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin: 12px;
}
h1 { font-size: 1.3em; margin: 0 0 4px; }
h2 { font-size: 1.05em; margin: 0 0 12px; }

label { display: block; margin-bottom: 12px; font-size: 0.9em; color: var(--muted); }
input, select {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font-size: 1em;
  background: #0f1420; color: var(--text); border: 1px solid var(--border); border-radius: 8px;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }

.row { display: flex; gap: 10px; }
.row .grow { flex: 1; }
.row label:not(.grow) { width: 90px; }

button {
  display: block; width: 100%; padding: 12px; font-size: 1em; font-weight: 600;
  background: var(--accent); color: #fff; border: none; border-radius: 8px; cursor: pointer;
  margin-top: 8px;
}
button.secondary { background: #2a3350; }
button.link-btn { width: auto; background: none; color: var(--accent); padding: 6px 10px; margin: 0; }
.btn-row { display: flex; gap: 10px; }
.btn-row button { margin-top: 8px; }

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0;
  background: var(--bg); z-index: 10;
}
header h1 { font-size: 1.1em; margin: 0; }

.tabs { display: flex; border-bottom: 1px solid var(--border); position: sticky; top: 57px; background: var(--bg); z-index: 9; }
.tab-btn {
  flex: 1; background: none; color: var(--muted); border: none; border-radius: 0;
  padding: 12px; margin: 0; font-weight: 600; border-bottom: 3px solid transparent;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- hasil scan ---- */
.result-section { margin: 12px; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 0.78em;
  font-weight: 700; text-transform: uppercase;
}
.badge.critical { background: var(--critical); color: #fff; }
.badge.high { background: var(--high); color: #1a1200; }
.badge.medium { background: var(--medium); color: #1a1200; }
.badge.low { background: var(--low); color: #fff; }
.badge.ok { background: var(--ok); color: #042a1c; }
.badge.closed { background: #2a3350; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.85em; }

.cve-item { border-left: 4px solid var(--border); padding: 10px 12px; margin-bottom: 10px; background: #141b2c; border-radius: 0 8px 8px 0; }
.cve-item.critical { border-left-color: var(--critical); }
.cve-item.high { border-left-color: var(--high); }
.cve-item.medium { border-left-color: var(--medium); }
.cve-item.low { border-left-color: var(--low); }
.cve-item .cve-title { font-weight: 600; margin-bottom: 4px; }
.cve-item .cve-meta { font-size: 0.82em; color: var(--muted); margin-bottom: 6px; }
.cve-item .cve-note { font-size: 0.88em; }

.device-item, .history-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; margin: 8px 12px;
}
.device-item button, .history-item button { width: auto; padding: 6px 12px; font-size: 0.85em; }

@media (min-width: 720px) {
  body { max-width: 720px; margin: 0 auto; }
}
