:root {
  --bg: #f5f6f8; --panel: #ffffff; --ink: #1d2433; --muted: #667085; --line: #e3e6eb;
  --brand: #1f3a68; --brand-2: #2e5aa8; --accent: #e8eef8;
  --ok: #157f3b; --ok-bg: #e6f4ea; --bad: #b42318; --bad-bg: #fdecea;
  --warn: #9a6700; --warn-bg: #fff4d6; --act: #5b3fb5; --act-bg: #efeafc; --info: #475467; --info-bg: #eef0f3;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.layout { display: flex; min-height: 100vh; }
.side { width: 220px; background: var(--brand); color: #fff; padding: 20px 14px; flex-shrink: 0; }
.side .logo { font-weight: 700; font-size: 17px; margin-bottom: 24px; letter-spacing: .02em; }
.side .logo span { display: block; font-weight: 400; font-size: 11px; opacity: .7; }
.side a { display: block; color: #dfe7f5; padding: 8px 10px; border-radius: 6px; margin-bottom: 2px; }
.side a:hover, .side a.on { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.side form { margin-top: 24px; }
.side .who { font-size: 12px; opacity: .7; margin-top: 24px; }
.main { flex: 1; padding: 24px 28px 60px; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 24px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
.kv td:first-child { color: var(--muted); width: 38%; }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=email], input[type=file], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 6px; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 80px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); font-weight: 400; }
.field { margin-bottom: 12px; }
.btn { display: inline-block; border: 1px solid var(--brand-2); background: var(--brand-2); color: #fff; padding: 8px 14px;
  border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--brand-2); }
.btn.ghost:hover { background: var(--accent); }
.btn.danger { background: #fff; color: var(--bad); border-color: #f1b5af; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.inline { display: inline; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.s-MET { background: var(--ok-bg); color: var(--ok); }
.s-NOT_MET { background: var(--bad-bg); color: var(--bad); }
.s-REVIEW { background: var(--warn-bg); color: var(--warn); }
.s-ACTION { background: var(--act-bg); color: var(--act); }
.s-INFO, .s-NA { background: var(--info-bg); color: var(--info); }
.crit { color: var(--bad); font-size: 11px; font-weight: 700; }

.verdict { border-radius: 10px; padding: 16px 18px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.verdict.v-ok { background: var(--ok-bg); }
.verdict.v-gap { background: var(--warn-bg); }
.verdict.v-bad { background: var(--bad-bg); }
.verdict .big { font-size: 20px; font-weight: 800; }
.meter { height: 8px; background: #fff; border-radius: 99px; width: 180px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; }
.tabs a.on { color: var(--brand); border-color: var(--brand); text-decoration: none; }
details summary { cursor: pointer; color: var(--brand-2); font-weight: 600; }
.override { display: flex; gap: 6px; margin-top: 6px; }
.override select { width: auto; padding: 3px 6px; font-size: 12px; }
.override input { padding: 3px 6px; font-size: 12px; }
.pill { display: inline-block; background: var(--accent); color: var(--brand); border-radius: 6px; padding: 1px 7px; margin: 0 4px 4px 0; font-size: 12px; }
.clause { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; margin-bottom: 10px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 360px; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 16px; }
  .side .logo { margin: 0 12px 0 0; }
  .side form, .side .who { margin: 0; }
  .main { padding: 16px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .scroll { overflow-x: auto; }
}

.pricing-lines input[name=qty], .pricing-lines input[name=months] { width: 72px; padding: 6px 8px; }
.pricing-lines input[name=rate] { width: 115px; padding: 6px 8px; }
.pricing-lines select { min-width: 128px; }
.pricing-lines td.amt { white-space: nowrap; }

/* accept / decline */
details.decline { position: relative; }
details.decline > summary { list-style: none; }
details.decline > summary::-webkit-details-marker { display: none; }
.decline-box { position: absolute; right: 0; top: 34px; z-index: 20; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px; width: 280px; box-shadow: 0 8px 24px rgba(16,24,40,.12); display: grid; gap: 6px; }
.dtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.dtabs a { padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 13px; }
.dtabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); text-decoration: none; }
.dtabs a span { opacity: .7; font-weight: 400; margin-left: 4px; }
tr.row-closed td { opacity: .6; }

/* what the buyer wants */
ol.needs { margin: 6px 0 10px; padding-left: 22px; columns: 2; column-gap: 32px; }
ol.needs li { break-inside: avoid; margin-bottom: 7px; line-height: 1.45; }
ol.needs .src { font-size: 11px; color: var(--muted); background: var(--info-bg); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
@media (max-width: 1100px) { ol.needs { columns: 1; } }

/* IT relevance */
tr.row-notit td { background: #FDF2F1; }
tr.row-partialit td { background: #FFFBEF; }
.fitbadge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.fit-relevant { background: var(--ok-bg); color: var(--ok); }
.fit-partial { background: var(--warn-bg); color: var(--warn); }
.fit-not_relevant { background: var(--bad-bg); color: var(--bad); }
.fitbar { border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.fitbar.fit-not_relevant { border: 1px solid #f3b8b2; }
.fitbar.fit-partial { border: 1px solid #f0d58a; }
