:root {
  --navy: #1F3864;
  --gold: #BF9000;
  --grey: #F2F2F2;
  --darkgrey: #595959;
  --low: #E2EFDA;
  --medium: #FFE699;
  --high: #FFC000;
  --critical: #C00000;
}
* { box-sizing: border-box; }
body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  background: #fafafa;
  color: #1a1a1a;
}
header.topbar {
  background: var(--navy);
  color: #fff;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header.topbar h1 { font-size: 18px; margin: 0; }
header.topbar .sub { font-size: 12px; color: #cfd8e8; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 32px 64px; }
.btn {
  background: var(--navy); color: #fff; border: none; padding: 10px 18px;
  border-radius: 4px; cursor: pointer; font-size: 14px;
}
.btn:hover { opacity: 0.9; }
.btn-secondary { background: transparent; border: 1px solid #fff; color: #fff; }
.btn-link { background: none; border: none; color: var(--navy); text-decoration: underline; cursor: pointer; font-size: 13px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0 32px; }
.card { background: #fff; border: 1px solid #e2e2e2; border-radius: 6px; padding: 16px; }
.card-label { font-size: 12px; color: var(--darkgrey); text-transform: uppercase; letter-spacing: 0.03em; }
.card-value { font-size: 26px; font-weight: bold; color: var(--navy); margin-top: 4px; }
.card-critical .card-value { color: var(--critical); }
.upload-box { background: #fff; border: 1px dashed #b7b7b7; border-radius: 6px; padding: 20px; margin-bottom: 28px; }
.upload-box h3 { margin-top: 0; }
table.ar-table, table.client-table { width: 100%; border-collapse: collapse; background: #fff; }
table.ar-table th, table.ar-table td, table.client-table th, table.client-table td {
  padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 14px;
}
table.ar-table th, table.client-table th { background: var(--navy); color: #fff; font-weight: 600; }
tr.risk-critical { background: #fdecec; }
tr.risk-high { background: #fff8e6; }
.pill { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: bold; }
.pill.risk-low { background: var(--low); color: #375623; }
.pill.risk-medium { background: var(--medium); color: #7f6000; }
.pill.risk-high { background: var(--high); color: #7f4a00; }
.pill.risk-critical { background: var(--critical); color: #fff; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-content { background: #fff; max-width: 640px; width: 90%; max-height: 80vh; overflow-y: auto; padding: 24px; border-radius: 6px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; }
.modal-content pre { white-space: pre-wrap; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.5; background: var(--grey); padding: 14px; border-radius: 4px; }
.muted { color: var(--darkgrey); font-size: 13px; }
.empty-state { color: var(--darkgrey); font-style: italic; }
.login-wrap { max-width: 380px; margin: 80px auto; background: #fff; border: 1px solid #e2e2e2; border-radius: 8px; padding: 32px; }
.login-wrap h1 { color: var(--navy); font-size: 20px; }
.login-wrap input { width: 100%; padding: 10px; margin-bottom: 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; }
.error-msg { color: var(--critical); font-size: 13px; margin-bottom: 12px; }
.section-title { color: var(--navy); border-bottom: 2px solid var(--gold); padding-bottom: 6px; margin-top: 40px; }
.client-row { cursor: pointer; }
.client-row:hover { background: #f0f4fa; }
form.inline-form { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
form.inline-form input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
