* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f5f5f5; padding: 20px; color: #333; }
.container { max-width: 1400px; margin: 0 auto; background: white; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 30px; }
h1 { font-size: 28px; margin-bottom: 6px; color: #1a1a1a; }
.subtitle { font-size: 13px; color: #666; margin-bottom: 24px; }
.demo-note { display: inline-block; font-size: 12px; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 6px; padding: 6px 10px; margin-bottom: 20px; }
.num, .metric-value, td { font-variant-numeric: tabular-nums; }

/* Navigation */
#rq-nav { max-width: 1400px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#rq-nav a { font-size: 13px; text-decoration: none; color: #1e293b; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 7px 11px; }
#rq-nav a.on { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }
#rq-nav a.add { margin-left: auto; border-color: #1e3a5f; color: #1e3a5f; font-weight: 600; }
#rq-nav a.add.on { color: #fff; }
#rq-nav select { font-size: 13px; padding: 7px 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; max-width: 260px; }

/* Cards and sections */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 15px; margin-bottom: 36px; }
.metric-card { background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 8px; padding: 20px; text-align: center; }
.metric-label { font-size: 11px; color: #666; margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.metric-value { font-size: 30px; font-weight: 600; margin-bottom: 5px; }
.metric-description { font-size: 11px; color: #666; line-height: 1.4; }
.metric-trend { font-size: 10px; color: #666; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e0e0e0; }
.danger { color: #dc2626; } .warning { color: #d97706; } .good { color: #16a34a; } .info { color: #3b82f6; }
.section { margin-bottom: 36px; }
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 18px; color: #1a1a1a; padding-bottom: 10px; border-bottom: 2px solid #e0e0e0; }
.note { font-size: 11px; color: #666; line-height: 1.5; }

/* Progress bars */
.progress-item { margin-bottom: 16px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.progress-bar { width: 100%; height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: #22c55e; }
.progress-fill.warning { background: #f59e0b; } .progress-fill.danger { background: #dc2626; }

/* Findings */
.finding-item { padding: 14px; background: white; border: 1px solid #eee; border-left: 3px solid #f59e0b; border-radius: 4px; margin-bottom: 12px; }
.finding-item.critical { border-left-color: #dc2626; } .finding-item.positive { border-left-color: #3b82f6; }
.finding-title { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; }
.finding-text { font-size: 12px; color: #666; line-height: 1.5; }

/* Tables */
.table-wrapper { overflow-x: auto; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: #44546A; color: #fff; text-align: left; padding: 10px 12px; font-weight: 600; white-space: nowrap; }
th.num, td.num { text-align: right; }
td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; }
tr.total td { font-weight: 700; background: #f1f5f9; }
tr.highlight td { font-weight: 700; background: #1e3a5f; color: #fff; }
th.sortable { cursor: pointer; } th.sortable:hover { background: #3b4a5e; }
td a { color: #1e3a5f; font-weight: 600; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.badge-high { background: rgba(34,197,94,0.18); color: #15803d; }
.badge-medium { background: rgba(107,114,128,0.18); color: #4b5563; }
.badge-na { background: rgba(168,162,158,0.15); color: #a8a29e; }
.badge-pass { background: rgba(34,197,94,0.18); color: #15803d; }
.badge-fail { background: rgba(220,38,38,0.14); color: #b91c1c; }
.badge-lvl-High { background: rgba(220,38,38,0.14); color: #b91c1c; }
.badge-lvl-Medium { background: rgba(217,119,6,0.15); color: #b45309; }
.badge-lvl-Low { background: rgba(34,197,94,0.18); color: #15803d; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.field label { display: block; font-size: 11px; color: #555; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; font-family: inherit; }
.field .hint { font-size: 10px; color: #888; margin-top: 3px; }
.btn { font-size: 14px; padding: 10px 16px; border-radius: 6px; border: 1px solid #1e3a5f; background: #1e3a5f; color: #fff; cursor: pointer; font-weight: 600; }
.btn.secondary { background: #fff; color: #1e3a5f; }
.btn.danger { background: #fff; color: #b91c1c; border-color: #fca5a5; }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.status { font-size: 13px; }

/* Login + errors */
#rq-login-unused { position: fixed; inset: 0; background: rgba(15,23,42,0.55); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.rq-login-box { background: #fff; border-radius: 10px; padding: 28px; width: min(360px, 92vw); display: grid; gap: 12px; }
.rq-login-box h2 { font-size: 18px; }
.rq-login-box p { font-size: 13px; color: #555; }
.rq-login-box input { padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; }
.rq-login-box button { padding: 10px; border: 0; border-radius: 6px; background: #1e3a5f; color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.rq-err { color: #b91c1c; min-height: 1em; }
.rq-error { padding: 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; color: #7f1d1d; font-size: 14px; line-height: 1.5; }
.loading { color: #888; font-size: 14px; padding: 20px 0; }
footer { text-align: center; margin-top: 36px; padding-top: 18px; border-top: 1px solid #e0e0e0; color: #999; font-size: 12px; }

@media (max-width: 768px) {
  body { padding: 10px; } .container { padding: 18px; } h1 { font-size: 20px; }
  #rq-nav a.add { margin-left: 0; }
  table { font-size: 11px; } th, td { padding: 8px 6px; }
}

/* Signed-in user (nav) */
.rq-user { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rq-who { font-size: 12px; color: #475569; padding: 0 4px; }
.rq-signout { font-size: 12px; background: none; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 9px; cursor: pointer; color: #334155; }
#rq-nav [hidden] { display: none !important; }
/* Sign-in pages */
.auth-wrap { max-width: 420px; margin: 8vh auto; background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.08); padding: 28px; }
.auth-wrap h1 { font-size: 20px; margin-bottom: 6px; }
.auth-wrap p { font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 12px; }
.auth-wrap label { display: block; font-size: 12px; font-weight: 600; color: #334155; margin: 10px 0 4px; }
.auth-wrap input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; }
.auth-wrap .btn { width: 100%; margin-top: 14px; }
.auth-wrap .link { background: none; border: 0; color: #1e3a5f; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; margin-top: 12px; }
.auth-ok { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; padding: 10px; font-size: 13px; }
.qr { display: flex; justify-content: center; margin: 10px 0; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px; }
.muted-link { color: #94a3b8; font-size: 12px; text-decoration: none; } .muted-link:hover { text-decoration: underline; }
.na { color: #94a3b8; } .badge-lvl-Not { background:#f1f5f9; color:#64748b; }
