:root {
  --bg: #020817;
  --card-bg: #0f172a;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97316;
  --critical: #ef4444;
  --safe: #22c55e;
  --radius: 18px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: radial-gradient(circle at top, #0f172a 0, #020817 45%, #000 100%);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(2, 8, 23, 0.98), rgba(2, 8, 23, 0.7));
  border-bottom: 1px solid rgba(148, 163, 253, 0.08);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, #38bdf8, #1d4ed8);
  font-size: 18px;
}

.title {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.subtitle {
  font-size: 11px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 14px;
}

.top-actions .link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.top-actions .link:hover {
  color: var(--accent);
}

.container {
  max-width: 980px;
  padding: 18px;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 253, 0.06);
}

h2 {
  margin: 0 0 4px;
  font-size: 17px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.small {
  font-size: 11px;
}

.check-form,
.report-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-form {
  flex-direction: row;
  align-items: stretch;
}
.check-form select {
  max-width: 150px;
}

.check-form input,
.report-form input,
.report-form select,
.report-form textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 253, 0.25);
  background: #020817;
  color: var(--text);
  font-size: 13px;
}
.report-form textarea {
  resize: vertical;
}

.check-form button,
.report-form button {
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(to right, #38bdf8, #6366f1);
  color: #020817;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.check-form button:hover,
.report-form button:hover {
  opacity: 0.9;
}

.report-form .row {
  display: flex;
  gap: 8px;
}
.report-form .row > label {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
}

/* Results */
.result {
  margin-top: 10px;
  font-size: 13px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid transparent;
}
.badge.safe {
  color: var(--safe);
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(22, 163, 74, 0.12);
}
.badge.warn {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(30, 64, 175, 0.16);
}
.badge.danger {
  color: var(--critical);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(127, 29, 29, 0.3);
}

.badge.green { background:#b6f0b6; color:#065f06; }
.badge.yellow { background:#fff3b0; color:#7a5c00; }
.badge.red { background:#fcb8b8; color:#780000; }

.report-card {
  background:#fafafa;
  padding:10px;
  margin:8px 0;
  border-radius:10px;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
}
.auto-note {
  font-size:0.9em;
  color:#a00;
  font-weight:600;
  margin-top:8px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.alert-item {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148, 163, 253, 0.18);
  font-size: 13px;
  background: radial-gradient(circle at top left,
              rgba(56, 189, 248, 0.06),
              transparent);
}

.alert-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-body {
  color: #111827;
}

.alert-link {
  margin-top: 4px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: underline;
}

.alert-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.alert-label.warning {
  background: #fef2f2;
  color: #b91c1c;
}

.alert-label.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.alert-warning {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.bullets {
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}
.bullets li {
  margin-bottom: 4px;
}

.footer {
  padding: 10px 18px 18px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 768px) {
  .check-form {
    flex-direction: column;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

.auth-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
}
.btn-text:hover {
  color: var(--accent);
}
.hidden {
  display: none !important;
}

.auth-dialog {
  border: none;
  padding: 0;
  background: transparent;
}
.auth-card {
  background: #020817;
  border-radius: 14px;
  padding: 16px 14px;
  border: 1px solid rgba(148,163,253,0.25);
  min-width: 260px;
  max-width: 320px;
}
.auth-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.auth-card label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.auth-card input {
  width: 100%;
  padding: 6px 8px;
  margin-top: 2px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,253,0.35);
  background: #020817;
  color: var(--text);
  font-size: 12px;
}
.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.auth-actions button {
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 12px;
}
.auth-actions button[type="submit"] {
  background: linear-gradient(to right, #38bdf8, #6366f1);
  color: #020817;
}
.auth-actions #authCancel {
  background: transparent;
  color: var(--muted);
}
#authError {
  margin-top: 4px;
  color: #f97316;
}

/* ---- Admin Links beautify ---- */
.link-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem auto;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(37,99,235,0.3);
  transition: all 0.25s ease;
}

.link-btn i {
  font-size: 16px;
}

.link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(56,189,248,0.45);
}

.link-btn.alt {
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid rgba(148,163,253,0.25);
  color: #e2e8f0;
}

.link-btn.alt:hover {
  background: linear-gradient(135deg, #334155, #475569);
  transform: translateY(-2px);
}