/* OpenPass staff. Same colours and type as the public site (web/public/site.css); the staff site is its own app.
   No inline styles anywhere: the page's CSP allows style from this file only. */
@font-face {
  font-family: "Reddit Sans";
  src: url("assets/RedditSans.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}
:root {
  --bg: #060B14;
  --navy: #0B192C;
  --green: #10B981;
  --text: #F8FAFC;
  --muted: #8A97A8;
  --line: rgb(248 250 252 / .1);
  --line-strong: rgb(248 250 252 / .22);
  --card: rgb(248 250 252 / .035);
  --bad: #FCA5A5;
  --warn: #FCD34D;
  --font: "Reddit Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --tabs-h: 64px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
h1 { margin: 0 0 6px; font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
h2 { margin: 28px 0 10px; font-size: 14px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
code { font: 500 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

/* buttons, inputs, messages (same shapes as the public site: pills and 12px inputs) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: 600 15px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-outline { background: none; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--text); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-block { width: 100%; }
.linkish { padding: 4px 0; border: 0; background: none; color: var(--text); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], select, textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgb(248 250 252 / .03); color: var(--text); font: 400 16px/1.4 var(--font); }
input[type=text]:focus, input[type=email]:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgb(16 185 129 / .2); }
select option { background: var(--navy); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.check { display: flex; align-items: center; gap: 12px; padding: 6px 0; color: var(--text); font-size: 16px; font-weight: 400; }
.msg { margin: 0; min-height: 1.5em; font-size: 14px; font-weight: 500; }
.msg.bad { color: var(--bad); }
.msg.good { color: var(--green); }
.small { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.lede { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.lede.big { color: var(--text); font-size: 18px; }
.lede b { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

/* the sign-in, enrol and blocked cards, and the code overlay */
.boot { margin: 0; padding: 40vh 0 0; text-align: center; color: var(--muted); }
.gate { min-height: 100dvh; display: grid; place-items: start center; padding: clamp(24px, 9vh, 88px) 20px 48px; }
.panel { width: 100%; max-width: 440px; padding: clamp(22px, 5vw, 32px); border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, rgb(248 250 252 / .06), rgb(248 250 252 / .02) 60%), var(--bg); box-shadow: inset 0 1px 0 rgb(248 250 252 / .07), 0 40px 80px -48px rgb(2 6 14 / .95); }
.op-head { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.panel h1 { margin-bottom: 14px; }
.qr-box { display: grid; place-items: center; width: 200px; height: 200px; margin: 0 auto 8px; border-radius: 16px; background: #fff; }
.qr-box img { display: block; }
.qr-box + .small + form { margin-top: 18px; }
.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgb(2 6 14 / .82); }

/* the shell: side nav on desktop, bottom bar on phone */
#shell { min-height: 100dvh; }
.side { display: none; }
.tabs { position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgb(6 11 20 / .96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.tabs a { display: grid; place-items: center; padding: 0 2px; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; }
.tabs a[aria-current=page] { color: var(--text); box-shadow: inset 0 2px 0 var(--green); }
main { padding: 22px 16px calc(var(--tabs-h) + 32px + env(safe-area-inset-bottom)); max-width: 980px; outline: none; }
.readat { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.readat time { color: var(--text); }
.readat .linkish { margin-left: 8px; font-size: 14px; color: var(--muted); }

@media (min-width: 860px) {
  #shell { display: grid; grid-template-columns: 232px 1fr; }
  .tabs { display: none; }
  .side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--line); }
  .side .brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 22px; text-decoration: none; }
  .side .brand span { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 600; }
  .side a:not(.brand) { display: block; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
  .side a:not(.brand):hover { color: var(--text); background: rgb(248 250 252 / .06); }
  .side a[aria-current=page] { color: var(--text); background: rgb(16 185 129 / .14); }
  .side .who { margin: auto 8px 0; display: grid; gap: 4px; justify-items: start; font-size: 13px; color: var(--muted); }
  .side .who span { overflow-wrap: anywhere; }
  main { padding: 36px 40px 64px; }
}

/* cards and lists */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.card { display: block; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: inherit; text-decoration: none; transition: border-color .25s var(--ease); }
a.card:hover { border-color: rgb(16 185 129 / .45); }
.card .n { display: block; font-size: 38px; font-weight: 600; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card .t { display: block; margin-top: 2px; font-weight: 500; }
.card .s { display: block; color: var(--muted); font-size: 13px; }
.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.row { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.row.unread { border-color: rgb(16 185 129 / .45); }
.row .top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.row .title { font-weight: 600; overflow-wrap: anywhere; }
.row .body { margin: 4px 0 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.row .meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.row .msg { min-height: 0; margin-top: 8px; }
.row .msg:empty { display: none; }
.row .acts input[type=text] { flex: 1 1 180px; width: auto; }
.pill { display: inline-block; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pill.high { color: var(--bad); border-color: rgb(252 165 165 / .5); }
.pill.realtime { color: var(--warn); border-color: rgb(252 211 77 / .5); }
.pill.ok { color: var(--green); border-color: rgb(16 185 129 / .5); }
.empty { color: var(--muted); }
.more { display: grid; gap: 10px; }
.more a { display: block; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 500; }
.more .btn { justify-self: start; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 16px; }
.tools select { width: auto; }
.tools .check { padding: 0; }

/* tables scroll sideways inside their own box, never the page */
.scroll { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.wrapc { min-width: 160px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.rights { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.rights .check { font-size: 15px; }
.add { margin-top: 8px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }

/* Eleanor: the conversation, her plans and their steps */
textarea { resize: vertical; min-height: 88px; }
.chat { display: grid; gap: 14px; margin: 8px 0 18px; }
.bubble { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); overflow-wrap: anywhere; }
.bubble.you { justify-self: end; max-width: min(640px, 92%); background: rgb(16 185 129 / .1); border-color: rgb(16 185 129 / .3); }
.bubble .who-says { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.bubble .words p { margin: 0 0 10px; }
.bubble .words p:last-child { margin-bottom: 0; }
.bubble .words ul, .bubble .words ol { margin: 0 0 10px; padding-left: 22px; }
.bubble .words b { font-weight: 600; }
.bubble .doing { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.bubble.live .doing::after { content: " …"; }
.bubble > .msg { margin-top: 8px; }
.composer { gap: 10px; }
.composer .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.composer .msg { min-height: 0; }
.plan { margin-top: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgb(11 25 44 / .6); }
.plan .top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.plan h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.plan .eli5 { margin: 8px 0 0; font-size: 16px; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: step; }
.step { position: relative; padding: 12px 14px 12px 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); counter-increment: step; }
.step::before { content: counter(step); position: absolute; left: 14px; top: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 600; }
.step.ready { border-color: rgb(16 185 129 / .45); }
.step.ready::before { color: var(--text); border-color: var(--green); }
.step .top { display: flex; flex-wrap: wrap; gap: 6px; }
.step details { margin-top: 8px; font-size: 14px; color: var(--muted); }
.step summary { cursor: pointer; }
.step .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.step .meta { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.step .msg { min-height: 0; margin-top: 6px; }
.step .msg:empty { display: none; }
.chat-link { display: block; text-decoration: none; }
