:root {
  --navy: #1f2a44;
  --accent: #2e6f63;
  --gray: #5b6472;
  --light: #edeff3;
  --red: #b02a2a;
  --amber: #b87a0e;
  --bg: #f7f8fa;
  --border: #dfe3e9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Calibri, Roboto, sans-serif;
  background: var(--bg);
  color: #2b2b2b;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--navy);
  padding: 14px 24px;
  color: white;
}
.topnav .brand a { color: white; font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.navlinks { display: flex; align-items: center; gap: 18px; }
.navlinks a { color: #dfe3e9; }
.navlinks a:hover { color: white; }
.navuser { color: #9aa4b5; font-size: 0.9rem; }
.btn-nav {
  background: var(--accent);
  color: white !important;
  padding: 6px 12px;
  border-radius: 5px;
}

.container { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.page-header h1 { margin: 0; color: var(--navy); font-size: 1.5rem; }

.muted { color: var(--gray); }
.small { font-size: 0.85rem; }

.login-wrap { display: flex; justify-content: center; padding-top: 60px; }
.login-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  width: 340px;
}
.login-card h1 { font-size: 1.3rem; color: var(--navy); margin-bottom: 4px; }

form label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}
form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}
.form-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  max-width: 560px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.btn-primary, .btn-secondary {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #255a50; text-decoration: none; }
.btn-secondary { background: white; border: 1px solid var(--accent); color: var(--accent); margin-right: 10px; margin-bottom: 10px; }
.btn-secondary:hover { background: var(--light); text-decoration: none; }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: #fbeaea; }
.pin-indicator { color: var(--amber); font-size: 0.85rem; margin-left: 6px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background: #fbeaea; border: 1px solid var(--red); color: var(--red); }
.alert-info { background: #eaf1f0; border: 1px solid var(--accent); color: #1c4a41; }
.alert-warn { background: #fdf3e3; border: 1px solid var(--amber); color: #7a5209; }
.error-trace { white-space: pre-wrap; font-size: 0.8rem; max-height: 300px; overflow-y: auto; }

.table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.table th { background: var(--navy); color: white; font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.table tr:nth-child(even) td { background: var(--light); }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; text-transform: capitalize; }
.badge-queued { background: #e6e9ee; color: var(--gray); }
.badge-running { background: #fdf3e3; color: var(--amber); }
.badge-done { background: #e4f0ec; color: var(--accent); }
.badge-error { background: #fbeaea; color: var(--red); }
.badge-sev-critical { background: #fbeaea; color: var(--red); }
.badge-sev-high { background: #fbeaea; color: var(--red); }
.badge-sev-medium { background: #fdf3e3; color: var(--amber); }
.badge-sev-low { background: #e4f0ec; color: var(--accent); }

.score-summary { display: flex; gap: 28px; align-items: baseline; margin-bottom: 20px; }
.score-big { font-size: 2.2rem; font-weight: 700; color: var(--accent); }
.score-grade { font-size: 1.2rem; color: var(--navy); font-weight: 600; }
.score-count { color: var(--gray); }

.downloads { margin-bottom: 20px; }
