/* Lockchain admin portal demo, version 2. Fixed 1440 × 900 canvas; the host page scales it.

   The design system, in short:
   - One brand colour (indigo) for everything that can be acted on or is selected. No black buttons.
   - Cool grey neutrals (slate) for text, lines and surfaces, in a fixed scale.
   - Meaning colours are used only for meaning: red = failed, amber = needs a person, green = passed, blue = information.
     Each has a strong shade for text and a pale tint for the background behind it. No coloured outlines.
   - Icons are thin line icons in the colour of the text beside them.
   - 4px spacing steps; corners 6px (small things), 8px (controls), 12px (cards). */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* neutrals */
  --ink: #0f172a; --text: #334155; --mute: #64748b; --faint: #94a3b8;
  --line: #e2e8f0; --line-soft: #eef2f6; --soft: #f1f5f9; --wash: #f8fafc;
  /* brand */
  --brand: #3b5bfd; --brand-strong: #2f49ca; --brand-tint: #eef1ff; --brand-tint-2: #dfe5ff;
  /* meaning */
  --red: #b42318; --red-tint: #fef1f0; --red-dot: #e5484d;
  --amber: #93580a; --amber-tint: #fff6e0; --amber-dot: #e8a020;
  --green: #17703a; --green-tint: #e9f8ee; --green-dot: #2fa55a;
  --blue: #0b5c8f; --blue-tint: #e8f4fc; --blue-dot: #3a9bdc;
  --focus: var(--brand);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --pop: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
}
html, body { width: 1440px; height: 900px; overflow: hidden; background: #fff; }
body { font: 13px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 500; letter-spacing: -.01em; }
.ic { width: 14px; height: 14px; flex: none; }
#app { position: relative; display: grid; grid-template-columns: 232px 1fr; width: 1440px; height: 900px; overflow: hidden; }

/* Sidebar */
.side { display: flex; flex-direction: column; background: var(--wash); border-right: 1px solid var(--line); padding: 20px 12px 14px; }
.brand { padding: 2px 8px 22px; }
.brand-row { display: flex; align-items: center; gap: 9px; }
.brand-mark { display: inline-flex; align-items: center; width: 32px; height: 19px; border-radius: 999px; background: var(--ink); padding: 0 3.5px; justify-content: flex-end; }
.brand-mark i { width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.brand-sub { margin: 4px 0 0 41px; font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--faint); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav span { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text); }
.nav svg { width: 16px; height: 16px; flex: none; color: var(--faint); }
.nav .on { background: var(--brand-tint); color: var(--brand-strong); font-weight: 600; }
.nav .on svg { color: var(--brand); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line); }
.me b { display: block; font-size: 13px; font-weight: 600; }
.me small { display: block; font-size: 12px; color: var(--mute); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint-2); color: var(--brand-strong); font-weight: 600; }

/* Main */
#main { position: relative; display: flex; flex-direction: column; min-width: 0; height: 900px; padding: 20px 28px 0; }
h1 { font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.charts { display: grid; grid-template-columns: 1fr 392px; gap: 16px; margin-top: 14px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 12px; background: #fff; box-shadow: var(--shadow); }
.card h2 { font-size: 13px; font-weight: 600; color: var(--text); }
.bars { position: relative; display: grid; grid-template-columns: 30px 1fr; height: 178px; margin-top: 10px; }
.yaxis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 20px; font-size: 10.5px; color: var(--faint); text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.plot { position: relative; display: flex; align-items: flex-end; gap: 12px; padding-bottom: 20px; }
.plot::before { content: ""; position: absolute; inset: 0 0 20px 0; background: repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 39.5px); pointer-events: none; }
.bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: pointer; }
/* one hue for every day; the day that is picked is the only strong bar */
.bar i { display: block; width: 100%; max-width: 72px; min-height: 4px; margin: 0 auto; background: #aab6fb; border-radius: 4px 4px 0 0; transition: background .15s; }
.bar:hover i { background: #8394fc; }
.bar.on i { background: var(--brand); }
.bar.on:hover i { background: var(--brand-strong); }
.bar.on em { color: var(--ink); font-weight: 600; }
.card h2 .day { float: right; font-size: 12px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }
.card h2 .day b { margin-right: 6px; color: var(--ink); font-weight: 600; }
.bar em { position: absolute; left: 50%; bottom: -19px; transform: translateX(-50%); font-style: normal; font-size: 10px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip { position: absolute; z-index: 5; left: 50%; transform: translate(-10%, 0); min-width: 92px; padding: 7px 10px; border-radius: 8px; background: var(--ink); color: #cbd5e1; box-shadow: var(--pop); font-size: 11.5px; line-height: 1.5; pointer-events: none; opacity: 0; transition: opacity .12s; }
.tip b { display: block; color: #fff; font-weight: 600; }
.bar:hover .tip { opacity: 1; }
/* a ring instead of a pie, with the total in the middle and the legend beside it */
.pie-wrap { display: flex; align-items: center; gap: 22px; margin-top: 14px; padding: 0 6px; }
.pie { position: relative; flex: none; width: 132px; height: 132px; border-radius: 50%; }
.hole { position: absolute; inset: 22px; display: grid; place-content: center; justify-items: center; border-radius: 50%; background: #fff; }
.hole b { font-size: 22px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.hole span { margin-top: 3px; font-size: 11px; color: var(--mute); }
.legend { display: grid; flex: 1; gap: 9px; font-size: 12px; color: var(--text); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.legend b { margin-left: auto; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Toolbar */
.toolbar { position: relative; z-index: 6; display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; box-shadow: 0 1px 1px rgba(15, 23, 42, .03); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--wash); border-color: #cbd5e1; }
.btn .ic { color: var(--mute); }
/* a filter that is switched on */
.btn.active { background: var(--brand-tint); border-color: #c7d0ff; color: var(--brand-strong); }
.btn.active .chev { color: var(--brand); }
.btn.quiet { border-color: transparent; box-shadow: none; }
.btn.quiet:hover { background: var(--soft); border-color: transparent; }
.btn.danger { color: var(--red); }
.btn.danger .ic { color: var(--red-dot); }
.btn.danger:hover { background: var(--red-tint); border-color: #f6c9c5; }
/* the main action */
.btn.dark { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(59, 91, 253, .3); }
.btn.dark .ic { color: #fff; }
.btn.dark:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn .more { color: var(--brand); font-weight: 500; opacity: .8; }
.chev { width: 10px; height: 10px; flex: none; color: var(--faint); }
.ghost { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 8px; font-size: 12.5px; color: var(--mute); }
.ghost .ic { width: 12px; height: 12px; }
.ghost:hover { color: var(--ink); }
.spacer { flex: 1; }
.split { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.picked { margin-right: 4px; padding: 3px 9px; border-radius: 999px; background: var(--brand-tint); font-size: 12px; font-weight: 600; color: var(--brand-strong); }
.dd { position: relative; }
.menu { position: absolute; top: 38px; left: 0; z-index: 20; width: 232px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--pop); }
.menu .search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); color: var(--faint); font-size: 12.5px; }
.opt { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; color: var(--text); text-align: left; }
.opt:hover { background: var(--soft); }

/* Checkbox */
.cb { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border: 1.5px solid #cbd5e1; border-radius: 4px; background: #fff; transition: background .12s, border-color .12s; }
.row:hover .cb, .opt:hover .cb { border-color: var(--faint); }
.cb.on { background: var(--brand); border-color: var(--brand); }
.cb.on::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.cb.part { border-color: var(--brand); }
.cb.part::after { content: ""; width: 8px; height: 2px; border-radius: 1px; background: var(--brand); }

/* Table */
.table { margin-top: 12px; flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.row { display: grid; grid-template-columns: 44px 120px 168px 150px 1fr 96px 70px 118px; align-items: center; height: 38.2px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.row.head { height: 36px; border-top: 0; background: var(--wash); border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--mute); font-weight: 600; letter-spacing: .01em; }
.row.head + .row { border-top: 0; }
.row.head span { display: inline-flex; align-items: center; gap: 6px; }
.row:not(.head) { cursor: pointer; transition: background .1s; }
.row:not(.head):hover { background: var(--wash); }
.row.sel, .row.sel:hover { background: var(--brand-tint); }
.row b { font-weight: 600; }
.row .c0, .row.head .c0 { display: grid; place-items: center; height: 100%; }
/* the tick box in the header keeps its own centring (the header's rule for its labels would push the dash to the left) */
.row.head .cb { display: inline-grid; gap: 0; }
.sort { width: 7px; height: 11px; color: #cbd5e1; }
.attr { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 500; color: var(--text); }
.attr i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
/* failed evaluators: "x / 20" in the same type as the category chips, with the x in bold */
.meter { font-size: 11.5px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.meter b { font-weight: 700; color: var(--ink); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-right: 6px; border-radius: 6px; background: var(--soft); font-size: 11.5px; font-weight: 500; color: var(--text); white-space: nowrap; }
/* ticket tags: tint and text of the same colour, no outline */
.tag { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 30px; padding: 0 7px; margin-right: 5px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.tag.MR { background: #f1ecff; color: #5a3ec8; }
.tag.ND { background: #dff4f6; color: #0d6875; }
/* the full name of a tag, shown above it on hover */
.tag { position: relative; cursor: default; }
.tag::after { content: attr(data-tip); position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 5px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap; box-shadow: var(--pop); pointer-events: none; opacity: 0; transition: opacity .12s; }
.tag:hover::after { opacity: 1; }
.num { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--soft); font-size: 11.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.empty { display: grid; place-items: center; height: 200px; color: var(--mute); }
.foot { display: flex; align-items: center; gap: 14px; height: 52px; font-size: 12.5px; color: var(--mute); }
.foot .pg { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); }
.foot .pg:hover:not([disabled]) { background: var(--wash); }
.foot .pg[disabled] { opacity: .35; cursor: default; }
.foot .sel-box { display: inline-flex; align-items: center; gap: 14px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); }
.foot strong { color: var(--text); font-weight: 500; }

/* Detail page */
/* The page scrolls from the very top of the screen, and the pinned row carries the top padding itself, so nothing can show above it. */
.detail { display: flex; flex-direction: column; height: calc(100% + 20px); margin: -20px -28px 0; padding: 0 28px 32px; overflow: hidden auto; scrollbar-width: thin; }
.detail > * { flex-shrink: 0; }
/* the row with Back and the actions stays at the top while the ticket scrolls under it */
.dhead { position: sticky; top: -1px; z-index: 8; display: flex; align-items: center; gap: 8px; margin: -1px -28px 0; padding: 21px 28px 12px; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .15s; }
.detail.scrolled .dhead { box-shadow: 0 8px 12px -10px rgba(15, 23, 42, .12); }
.back { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 4px; margin-left: -6px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--mute); }
.back .ic { width: 16px; height: 16px; }
.back:hover { background: var(--soft); color: var(--ink); }
.switch { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; font-size: 12.5px; color: var(--text); }
.switch i { position: relative; width: 30px; height: 18px; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .2); transition: transform .15s; }
.switch.on i { background: var(--brand); }
.switch.on i::after { transform: translateX(12px); }
.dtitle { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 16px; }
.dtitle h1 { font-size: 22px; }
/* the facts about a ticket: one card, a small label above each value */
.metas { display: grid; grid-template-columns: 1.2fr 1fr 1.6fr .6fr; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.metas > div { padding: 12px 16px; min-width: 0; }
.metas > div + div { border-left: 1px solid var(--line-soft); }
.metas dt { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.metas dd { display: flex; align-items: center; min-height: 22px; margin: 6px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.metas .attr { font-size: 13.5px; font-weight: 600; color: var(--ink); }
h3 { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; font-weight: 600; }
h3 .failed { padding: 2px 8px; border-radius: 6px; background: var(--red-tint); font-size: 11.5px; font-weight: 600; color: var(--red); }
.etable { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.erow { display: grid; grid-template-columns: 84px 232px 168px 1fr 44px; align-items: center; height: 38px; padding: 0 14px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.erow:first-child { border-top: 0; height: 34px; background: var(--wash); border-bottom: 1px solid var(--line); color: var(--mute); font-size: 11.5px; font-weight: 600; }
.erow:nth-child(2) { border-top: 0; }
.erow .desc { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 16px; }
.dots { display: grid; justify-items: end; color: var(--faint); }
/* result of one evaluator: a dot and a word on a tint */
.status { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.status.Fail { background: var(--red-tint); color: var(--red); }
.status.Error { background: var(--amber-tint); color: var(--amber); }
.status.Pass { background: var(--green-tint); color: var(--green); }
.viewall { margin-top: 12px; align-self: flex-start; color: var(--brand-strong); }
.viewall .ic { color: var(--brand); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.ans { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.ans header { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 14px; background: var(--wash); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text); }
.ans header > span { margin-right: auto; }
.ans.prev header { color: var(--mute); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; gap: 5px; }
.btn.sm .ic { width: 13px; height: 13px; }
.ans.editing { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 91, 253, .14); }
.ans textarea { display: block; width: 100%; height: 100%; min-height: 220px; padding: 14px 16px; border: 0; outline: 0; resize: none; background: #fff; font: 12px/1.65 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); }
.ans.editing { display: flex; flex-direction: column; }
.ans.editing textarea { flex: 1; }
.ans.prev p { color: var(--faint); }
.ans p { padding: 14px 16px; font: 12px/1.65 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); min-height: 150px; }
.ans mark { background: var(--green-tint); color: inherit; border-radius: 2px; padding: 1px 0; }
.ans.prev mark { background: var(--red-tint); }
/* the two answers that fold away: one card, a row for each, the arrow turns when a row is open */
.accs { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.acc + .acc { border-top: 1px solid var(--line); }
.acc-head { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 46px; padding: 0 14px 0 16px; font-size: 13px; font-weight: 600; color: var(--ink); text-align: left; transition: background .12s; }
.acc-head:hover { background: var(--wash); }
.acc-head .ic { width: 16px; height: 16px; color: var(--mute); transition: transform .18s; }
.acc.open .acc-head .ic { transform: rotate(180deg); }
.acc-body { padding: 14px 16px; border-top: 1px solid var(--line-soft); background: var(--wash); font: 12px/1.6 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); white-space: pre-wrap; }

/* Drawer */
#drawer-scrim { position: absolute; inset: 0; z-index: 30; background: rgba(15, 23, 42, .28); }
#drawer { position: absolute; top: 0; right: 0; z-index: 31; width: 480px; height: 900px; background: #fff; border-left: 1px solid var(--line); transform: translateX(105%); transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s; display: flex; flex-direction: column; }
/* the panel's shadow shows only while it is open: when closed it sits just off the right edge, and its shadow used to spill back in */
#drawer.open { transform: none; box-shadow: -16px 0 48px rgba(15, 23, 42, .14); }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 650; }
.dr-x { width: 28px; height: 28px; border-radius: 7px; font-size: 18px; line-height: 1; color: var(--mute); }
.dr-x:hover { background: var(--soft); color: var(--ink); }
.dr-list { flex: 1; overflow-y: auto; padding: 14px 20px 24px; scrollbar-width: thin; display: flex; flex-direction: column; gap: 10px; }
.ev { padding: 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; }
.ev-top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; }
.ev-cat { margin-top: 8px; }
.ev dt { margin-top: 10px; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.ev dd { margin-top: 3px; line-height: 1.5; color: var(--text); }

/* Toast, guide */
#toast { position: absolute; top: 18px; left: 50%; z-index: 50; transform: translate(-50%, -80px); padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; box-shadow: var(--pop); transition: transform .3s cubic-bezier(.22, 1, .36, 1); pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }
/* the orange dot that marks what to press next: the same one the Nimble demos use */
#ring { position: absolute; left: 0; top: 0; z-index: 40; width: 0; height: 0; pointer-events: none; opacity: 0; transition: top .25s, left .25s, opacity .25s; }
#ring.on { opacity: 1; }
#ring::before, #ring::after { content: ""; position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; background: #ff6b1a; }
#ring::after { opacity: .6; }
#ring::before { opacity: 0; animation: spot 1.6s ease-out infinite; }
@keyframes spot { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #ring::before { animation: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.shot #ring { display: none; }
