@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(/static/poppins-500.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(/static/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(/static/poppins-700.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 300 800; font-display: swap; src: url(/static/open-sans.woff2) format("woff2"); }
/* ButterflyMX palette (butterflymx.com): violet #6600ff, hover #4d00c0, light gray sections #f4f4f4, ink #252622 / #444 / #535862 */
:root {
  --bg: #f4f4f4; --panel: #fff; --text: #252622; --muted: #535862; --line: #e3e3e8; --accent: #6600ff; --accent-hover: #4d00c0; --accent-bg: #f0e8ff;
  --open: #d42f43; --progress: #a86a00; --mitigated: #0c71c3; --fixed: #2a7d2e; --na: #6b6f78; --risk: #7a00df;
  --open-bg: #fde9ec; --progress-bg: #fff3d6; --mitigated-bg: #e3f1fc; --fixed-bg: #e3f4e3; --na-bg: #ececef; --risk-bg: #f3e8ff;
  --radius: 12px; --heading: "Poppins", Helvetica, Arial, sans-serif; font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121217; --panel: #1c1b24; --text: #ececf1; --muted: #a3a3b2; --line: #2f2d3b; --accent: #8f4dff; --accent-hover: #a874ff; --accent-bg: #2a1d4a;
    --open: #ff7383; --progress: #e0a83a; --mitigated: #5bb0f0; --fixed: #6bc46f; --na: #9a9aa8; --risk: #c08bff;
    --open-bg: #3d1820; --progress-bg: #3a2c0c; --mitigated-bg: #0e2d47; --fixed-bg: #15331a; --na-bg: #2a2933; --risk-bg: #2e1f4d;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Open Sans", Helvetica, Arial, sans-serif; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.top { display: flex; align-items: center; gap: 28px; padding: 12px 28px; box-shadow: 0 1px 8px rgba(37,38,34,.06); background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: 10px; align-items: center; font-family: var(--heading); font-weight: 600; color: var(--text); font-size: 19px; letter-spacing: -.2px; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
#nav { display: flex; gap: 14px; flex: 1; } #nav a { color: var(--text); font-family: var(--heading); font-weight: 500; font-size: 15px; opacity: .75; } #nav a.on, #nav a:hover { opacity: 1; color: var(--accent); text-decoration: none; }
#whoami { color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: center; }
main { max-width: 1400px; margin: 0 auto; padding: 20px; }
h1, h2, h3 { font-family: var(--heading); letter-spacing: -.2px; }
h1 { font-size: 26px; font-weight: 600; margin: 0 0 4px; } h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; } h3 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(37,38,34,.04); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; } .spacer { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; } @media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }
button, .btn { font: inherit; font-family: var(--heading); font-weight: 500; border: 1.5px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 6px 16px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); text-transform: uppercase; letter-spacing: .4px; font-size: 13px; font-weight: 600; }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
button.danger { color: var(--open); }
button.link { border: 0; background: none; color: var(--accent); padding: 0 4px; font-family: inherit; font-weight: 600; }
button.link:hover { text-decoration: underline; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: var(--text); background: var(--panel); border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
input[type=checkbox] { accent-color: var(--accent); }
textarea { width: 100%; min-height: 70px; resize: vertical; }
label.f { display: block; margin: 10px 0 4px; font-weight: 550; font-size: 13px; }
label.f .muted { font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 550; white-space: nowrap; border: 1px solid transparent; }
.st-open { color: var(--open); background: var(--open-bg); } .st-in_progress { color: var(--progress); background: var(--progress-bg); }
.st-mitigated { color: var(--mitigated); background: var(--mitigated-bg); } .st-fixed { color: var(--fixed); background: var(--fixed-bg); }
.st-not_affected, .st-retired { color: var(--na); background: var(--na-bg); } .st-accepted_risk { color: var(--risk); background: var(--risk-bg); }
.sev-critical { color: #fff; background: var(--open); } .sev-high { color: var(--open); background: var(--open-bg); }
.sev-medium { color: var(--progress); background: var(--progress-bg); } .sev-low { color: var(--na); background: var(--na-bg); }
.cs-active { color: var(--fixed); background: var(--fixed-bg); } .cs-paused { color: var(--progress); background: var(--progress-bg); } .cs-closed { color: var(--na); background: var(--na-bg); }
.chip { display: inline-block; padding: 0 6px; margin: 1px 3px 1px 0; border-radius: 4px; font-size: 12px; border: 1px solid var(--line); white-space: nowrap; }
.chip.k-remediation { border-color: var(--fixed); color: var(--fixed); background: var(--fixed-bg); } .chip.k-mitigation { border-color: var(--mitigated); color: var(--mitigated); background: var(--mitigated-bg); }
.bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--na-bg); margin: 8px 0; }
.bar span { display: block; height: 100%; }
.bar .fixed { background: var(--fixed); } .bar .mitigated { background: var(--mitigated); } .bar .in_progress { background: var(--progress); }
.bar .closed { background: var(--na); } .bar .open { background: var(--open); opacity: .75; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--bg); }
.stat b { display: block; font-family: var(--heading); font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; } .stat span { color: var(--muted); font-size: 12px; }
.card { cursor: pointer; transition: border-color .15s, box-shadow .15s; } .card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(102,0,255,.10); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; position: sticky; top: 57px; background: var(--panel); z-index: 1; }
tbody tr.sys { cursor: pointer; } tbody tr.sys:hover { background: var(--bg); } tr.detail td { background: var(--bg); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 14px 0 16px; }
.tabs a { padding: 9px 16px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-family: var(--heading); font-weight: 500; }
.tabs a:hover { color: var(--accent); text-decoration: none; }
.tabs a.on { color: var(--accent); border-color: var(--accent); }
.desc p { margin: 0 0 8px; } .desc ul { margin: 0 0 8px; padding-left: 20px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
.events li { padding: 5px 0; border-bottom: 1px solid var(--line); list-style: none; font-size: 13px; }
.events { padding: 0; margin: 0; }
dialog { border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px rgba(37,38,34,.25); padding: 0; background: var(--panel); color: var(--text); width: min(640px, 94vw); max-height: 90vh; }
dialog::backdrop { background: rgba(37,38,34,.45); }
dialog form { padding: 22px 26px; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; } .checks label { font-size: 13px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--panel); padding: 10px 20px; border-radius: 999px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 80vw; }
#toast.show { opacity: 1; } #toast.err { background: var(--open); color: #fff; }
.login { max-width: 440px; margin: 12vh auto; text-align: center; padding: 36px; }
.login img { width: 56px; height: 56px; }
.fixtype-row { display: grid; grid-template-columns: 110px 1fr 130px 28px; gap: 6px; margin-bottom: 6px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters input[type=search] { min-width: 240px; }
.legend i.bar-fixed { background: var(--fixed); } .legend i.bar-mitigated { background: var(--mitigated); }
.legend i.bar-closed { background: var(--na); } .legend i.bar-in_progress { background: var(--progress); } .legend i.bar-open { background: var(--open); opacity: .75; }
.pill { font-family: var(--heading); font-weight: 500; }
a.btn { display: inline-block; }
.brand .sub { font-weight: 400; color: var(--muted); font-size: 15px; }
