/* SecureMe console. No third-party fonts or scripts: a security console should
   not call anyone else's servers. Type is the Windows/macOS UI face on purpose. */
:root {
  --bg: #f2f5f7; --surface: #ffffff; --ink: #14232d; --muted: #586874; --line: #d8e0e5;
  --rail: #10202a; --rail-ink: #c9d6dd; --teal: #0b6e6e; --teal-soft: #e1f0ef;
  --red: #b8322a; --red-soft: #fbe9e7; --amber: #a86a00; --amber-soft: #fbf1dc;
  --green: #2b7a4b; --green-soft: #e4f2e9;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 650; }
p { margin: 0 0 .75rem; max-width: 72ch; }
a { color: var(--teal); }
.muted { color: var(--muted); }
.small { font-size: .87rem; }
.mono { font-family: var(--mono); font-size: .86rem; word-break: break-all; }
.hidden { display: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100%; }
.rail { background: var(--rail); color: var(--rail-ink); padding: 1.1rem .75rem; display: flex; flex-direction: column; gap: .15rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 650; font-size: 1.1rem; padding: 0 .5rem 1rem; }
.brand svg { width: 26px; height: 26px; flex: none; }
.rail a { color: var(--rail-ink); text-decoration: none; padding: .45rem .6rem; border-radius: 6px; display: flex; justify-content: space-between; }
.rail a:hover { background: #1b3140; color: #fff; }
.rail a.on { background: var(--teal); color: #fff; }
.rail .count { background: var(--red); color: #fff; border-radius: 10px; padding: 0 .45rem; font-size: .78rem; line-height: 1.5; }
.rail .gap { height: .8rem; }
.rail .foot { margin-top: auto; padding: .6rem; font-size: .82rem; border-top: 1px solid #25404f; }
.rail select { width: 100%; margin-bottom: .6rem; background: #1b3140; color: #fff; border: 1px solid #2c4a5b; border-radius: 6px; padding: .35rem; font: inherit; }
.rail button.link { color: var(--rail-ink); }
main { padding: 1.75rem 2rem 4rem; max-width: 1220px; width: 100%; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }

/* surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 1rem; align-items: start; }
.facts { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.notice { border-left: 4px solid var(--amber); background: var(--amber-soft); padding: .7rem 1rem; border-radius: 0 6px 6px 0; margin-bottom: 1rem; }
.notice.bad { border-color: var(--red); background: var(--red-soft); }
.notice.good { border-color: var(--green); background: var(--green-soft); }

/* tables */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .85rem; padding: .45rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .6rem; border-bottom: 1px solid #e9eef1; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f6f9fa; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { padding: 1.5rem .5rem; color: var(--muted); }

/* risk meter: the one recurring visual. Width = score, colour = severity. */
.risk { display: inline-flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; font-weight: 600; min-width: 92px; }
.risk i { display: block; width: 56px; height: 6px; border-radius: 3px; background: #e3e9ed; overflow: hidden; }
.risk i b { display: block; height: 100%; background: var(--green); }
.risk.s1 i b { background: var(--amber); } .risk.s2 i b { background: var(--red); }
.w0{width:4%}.w1{width:10%}.w2{width:20%}.w3{width:30%}.w4{width:40%}.w5{width:50%}.w6{width:60%}.w7{width:70%}.w8{width:80%}.w9{width:90%}.w10{width:100%}
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 4px; font-size: .82rem; font-weight: 600; background: #e8eef1; color: var(--ink); white-space: nowrap; }
.tag.bad { background: var(--red-soft); color: var(--red); }
.tag.warn { background: var(--amber-soft); color: var(--amber); }
.tag.good { background: var(--green-soft); color: var(--green); }
.tag.info { background: var(--teal-soft); color: var(--teal); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #b3c0c8; margin-right: .4rem; }
.dot.on { background: var(--green); }

/* forms */
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .2rem; }
input, select, textarea { font: inherit; color: inherit; background: #fff; border: 1px solid #b9c6ce; border-radius: 6px; padding: .5rem .6rem; width: 100%; }
textarea { min-height: 140px; resize: vertical; }
input[type=checkbox] { width: auto; margin-right: .4rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: .75rem; align-items: end; }
.check { display: flex; align-items: center; font-weight: 400; }
button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; border: 1px solid var(--teal); background: var(--teal); color: #fff; padding: .5rem .9rem; }
button:hover { background: #095b5b; }
button.ghost { background: #fff; color: var(--teal); }
button.ghost:hover { background: var(--teal-soft); }
button.danger { background: #fff; color: var(--red); border-color: var(--red); }
button.danger:hover { background: var(--red-soft); }
button.link { background: none; border: 0; color: var(--teal); padding: 0; font-weight: 600; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); padding: .5rem .8rem; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--teal); }
pre.cmd { background: var(--rail); color: #e6eef2; padding: .8rem 1rem; border-radius: 6px; overflow-x: auto; font: .84rem/1.5 var(--mono); margin: .3rem 0 1rem; white-space: pre-wrap; word-break: break-all; }

/* incident detail */
.reasons { margin: 0 0 1rem; padding-left: 1.1rem; }
.reasons li { margin-bottom: .3rem; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 .7rem 1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; }
.timeline time { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; margin-right: .5rem; }
.verdict { font-size: 1.25rem; font-weight: 650; margin-bottom: .5rem; }
.verdict.bad { color: var(--red); } .verdict.warn { color: var(--amber); } .verdict.good { color: var(--green); }

/* sign-in */
.signin { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; background: var(--rail); }
.signin form { background: #fff; border-radius: 10px; padding: 2rem; width: 100%; max-width: 380px; }
.signin .brand { color: var(--ink); padding: 0 0 1rem; }
.signin .field { margin-bottom: .9rem; }
.error { color: var(--red); font-weight: 600; min-height: 1.4em; }
.toast { position: fixed; right: 1rem; bottom: 1rem; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 6px; max-width: 420px; z-index: 9; }
.toast.bad { background: var(--red); }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { flex-direction: row; flex-wrap: wrap; padding: .6rem; }
  .rail .brand { width: 100%; padding-bottom: .4rem; }
  .rail .gap { display: none; }
  .rail .foot { margin: .4rem 0 0; width: 100%; }
  main { padding: 1.1rem 1rem 3rem; }
  .cols { grid-template-columns: 1fr; }
}

/* conversation with a user */
.chat { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: .45rem; margin-bottom: .9rem; }
.bubble { padding: .5rem .7rem; border-radius: 8px; max-width: 80%; overflow-wrap: anywhere; }
.bubble.team { background: var(--teal-soft); align-self: flex-end; }
.bubble.user { background: #eef1f3; align-self: flex-start; }
.bubble .when { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.sso { margin-top: 1rem; display: grid; gap: .5rem; }
.ssobtn { display: block; text-align: center; border: 1px solid var(--teal); border-radius: 6px; padding: .5rem; text-decoration: none; font-weight: 600; }
.ssobtn:hover { background: var(--teal-soft); }
