:root {
  --navy: #0b2140;
  --navy-light: #163b66;
  --accent: #1c7ed6;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #dfe4ea;
  --text: #1c2530;
  --muted: #667085;
  --danger: #c0392b;
  --success: #1a7f4e;
  --warn: #b8860b;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header.topbar {
  background: var(--navy);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header.topbar h1 { font-size: 18px; margin: 0; font-weight: 600; }
header.topbar .who { font-size: 13px; color: #cfe0f5; }
header.topbar a, header.topbar button.linklike {
  color: #cfe0f5;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  margin-left: 16px;
}
header.topbar a:hover, header.topbar button.linklike:hover { color: #fff; text-decoration: underline; }

main {
  max-width: 1080px;
  margin: 28px auto;
  padding: 0 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 { margin-top: 0; font-size: 17px; color: var(--navy); }

.auth-wrap {
  max-width: 380px;
  margin: 60px auto;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 5px;
  color: var(--navy-light);
}

input[type=text], input[type=email], input[type=password], input[type=date],
select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; min-height: 80px; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(28,126,214,0.15);
}

.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; }

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
}
button:hover { background: #1565c0; }
button.secondary { background: #eef1f5; color: var(--navy); }
button.secondary:hover { background: #e2e7ee; }
button.danger { background: var(--danger); }
button.danger:hover { background: #a5301f; }
button:disabled { opacity: .55; cursor: not-allowed; }

.error-box, .success-box {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 14px;
}
.error-box { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c0; }
.success-box { background: #e9f7ef; color: var(--success); border: 1px solid #bfe8cf; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #f0f3f7; color: var(--navy); font-weight: 600; position: sticky; top: 0; }
tr:hover td { background: #fafcff; }
.table-wrap { overflow-x: auto; max-height: 65vh; overflow-y: auto; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.pill.low, .pill.approved { background: #e4f6ea; color: var(--success); }
.pill.medium, .pill.underreview { background: #fff5df; color: var(--warn); }
.pill.high, .pill.rejected { background: #fdecea; color: var(--danger); }
.pill.prohibited { background: #3a0d0d; color: #fff; }
.pill.unassessed, .pill.submitted { background: #eaeef3; color: var(--muted); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: end; }
.filters > div { min-width: 160px; }

.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,33,64,0.45);
  align-items: center; justify-content: center;
  z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  width: 92%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
}
.modal h2 { margin-top: 0; }
.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.link-btn {
  background: none; border: none; color: var(--accent);
  cursor: pointer; padding: 0; margin: 0; font-size: 13px; font-weight: 600;
}

.muted { color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.actions-row { margin-top: 20px; display: flex; gap: 10px; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.small-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
