/*
 * Copyright (c) 2026 HR Rebooted. All rights reserved. Patent pending.
 * Proprietary and confidential. See LICENSE at repository root.
 */
/* AI Guardian dashboard styles — single file, no framework. */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: #111827;
  background: #f3f4f6;
  line-height: 1.5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #1e40af;
  color: #fff;
}
.brand { font-weight: 600; font-size: 16px; }
.brand .sub { opacity: 0.7; font-weight: 400; font-size: 13px; margin-left: 6px; }
.topnav { display: flex; gap: 14px; align-items: center; }
.topnav a { color: #fff; text-decoration: none; font-size: 13px; padding: 4px 8px; border-radius: 4px; }
.topnav a:hover { background: rgba(255,255,255,0.15); }
.topnav .who { font-size: 12px; opacity: 0.8; margin-right: 8px; }

.wrap { max-width: 1100px; margin: 24px auto; padding: 0 24px 60px; }
h1 { margin: 0 0 18px; font-size: 22px; }
h2 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; font-weight: 600; }

.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 20px 22px; margin-bottom: 18px;
}
.card-narrow { max-width: 380px; margin: 80px auto; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.tile-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
@media (max-width: 800px) { .tile-row { grid-template-columns: repeat(2, 1fr); } }
.tile { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; text-align: center; }
.tile-num { font-size: 26px; font-weight: 600; color: #1e40af; }
.tile-of { font-size: 16px; color: #9ca3af; font-weight: 400; }
.tile-lbl { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* Risk score tile colors. Green if low, amber if medium, red if high. */
.tile-risk-low  { background: #ecfdf5; border-color: #a7f3d0; }
.tile-risk-low  .tile-num { color: #065f46; }
.tile-risk-med  { background: #fffbeb; border-color: #fde68a; }
.tile-risk-med  .tile-num { color: #92400e; }
.tile-risk-high { background: #fef2f2; border-color: #fecaca; }
.tile-risk-high .tile-num { color: #b91c1c; }

table.data td.risk { font-weight: 600; }
table.data td.risk-low  { color: #065f46; }
table.data td.risk-med  { color: #92400e; }
table.data td.risk-high { color: #b91c1c; }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; text-align: left; }
table.data th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; font-weight: 600; }
table.data td.warn { color: #b91c1c; font-weight: 500; }

.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.small { font-size: 12px; color: #6b7280; }

.empty { padding: 18px; text-align: center; color: #9ca3af; font-style: italic; }

.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert-err { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-ok  { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

form { display: block; }
form label { display: block; margin-bottom: 12px; font-size: 12px; color: #6b7280; }
form input[type="text"], form input[type="email"], form input[type="password"], form input[type="number"], form select {
  width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 14px; color: #111827; background: #fff; margin-top: 4px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid button { grid-column: 1 / -1; }

.btn {
  display: inline-block; padding: 9px 14px; border-radius: 6px;
  font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  font-family: inherit;
}
.btn-primary { background: #1e40af; color: #fff; border-color: #1e40af; }
.btn-primary:hover { background: #1d3b9e; }
.btn-secondary { background: #fff; color: #374151; border-color: #d1d5db; text-decoration: none; }
.btn-secondary:hover { background: #f9fafb; }

pre.mdm {
  background: #111827; color: #f3f4f6; padding: 14px; border-radius: 6px;
  font-size: 12px; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.foot {
  text-align: center; padding: 30px; color: #9ca3af; font-size: 11px;
}

.meta { color: #6b7280; font-size: 13px; }
