/* HSSE Books. Same look as HSSE OS: white header, green brand line, grey page. No third-party fonts or code. */
:root { --brand:#2f7d0a; --brand-d:#245f08; --brand-l:#eef8e6; --ink:#181818; --ink2:#3e3e3c; --ink3:#706e6b; --line:#e5e5e5; --line2:#c9c9c9; --page:#f3f3f3; --card:#fff;
  --act:#ea580c; --good:#2e844a; --good-l:#ebf7ee; --warn:#8c4b02; --warn-l:#fef3e2; --bad:#ba0517; --bad-l:#fef1ee;
  --muted:var(--ink3); --tint:var(--brand-l); }
* { box-sizing:border-box; }
html, body { background:var(--page); color:var(--ink); }
body { margin:0; font:14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color:var(--brand-d); }
h2 { font-size:16px; margin:0 0 4px; font-weight:650; }

/* global header */
.gh { position:sticky; top:0; z-index:30; min-height:56px; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; padding:8px 16px; flex-wrap:wrap; }
.gh-logo { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink); flex:none; }
.gh-logo img { height:34px; width:auto; display:block; }
.gh-logo span { font-weight:800; font-size:17px; letter-spacing:.2px; padding-left:10px; border-left:1px solid var(--line2); }
.search { position:relative; flex:1 1 260px; max-width:560px; margin:0 auto; }
.search input { width:100%; min-height:36px; border:1px solid var(--line2); border-radius:6px; padding:6px 64px 6px 12px; }
.search kbd { position:absolute; right:8px; top:8px; font:600 11px ui-monospace, Consolas, monospace; color:var(--ink3); border:1px solid var(--line2); border-radius:4px; padding:1px 5px; background:var(--page); }
.results { position:absolute; left:0; right:0; top:42px; z-index:40; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.16); padding:6px; max-height:60vh; overflow:auto; }
.results a { display:flex; gap:10px; align-items:baseline; padding:8px 10px; border-radius:6px; text-decoration:none; color:var(--ink); }
.results a:hover, .results a.on { background:var(--brand-l); }
.results .kind { flex:none; width:72px; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink3); }
.results .sub { margin:0; }
.gh-right { display:flex; align-items:center; gap:8px; flex:none; flex-wrap:wrap; }
.gh-right select { min-height:34px; max-width:230px; }
.gh-ic { position:relative; min-width:34px; height:34px; border:1px solid var(--line2); border-radius:6px; background:#fff; color:var(--ink2); display:inline-flex; align-items:center; justify-content:center; padding:0 9px; text-decoration:none; font-weight:600; font-size:13px; }
.gh-ic:hover { color:var(--brand); border-color:var(--brand); }
.gh-count { position:absolute; top:-7px; right:-7px; background:var(--bad); color:#fff; font-size:10px; font-weight:800; border-radius:999px; padding:0 5px; line-height:16px; }
.menu-wrap { position:relative; }
button.gh-new { height:34px; padding:0 14px; border:0; background:var(--act); color:#fff; font-weight:600; }
button.gh-av { width:34px; height:34px; padding:0; border-radius:50%; border:0; background:#f59e0b; color:#0f2a4a; font-weight:800; font-size:12px; }
.menu { position:absolute; right:0; top:40px; z-index:40; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.16); padding:6px; min-width:220px; display:flex; flex-direction:column; }
.menu a, .menu button { display:block; text-align:left; border:0; background:transparent; color:var(--ink); padding:8px 10px; border-radius:6px; text-decoration:none; font:inherit; cursor:pointer; }
.menu a:hover, .menu button:hover { background:var(--page); }
.menu .head { padding:8px 10px 6px; color:var(--ink3); font-size:12px; border-bottom:1px solid var(--line); margin-bottom:4px; }

/* left menu: main areas, with the screens of each area beneath */
.layout { display:grid; grid-template-columns:232px minmax(0, 1fr); align-items:start; }
.side { position:sticky; top:57px; height:calc(100vh - 57px); overflow-y:auto; background:#fff; border-right:1px solid var(--line); padding:12px 10px 40px; display:flex; flex-direction:column; gap:2px; }
.side a { text-decoration:none; color:var(--ink); border-radius:6px; display:flex; align-items:center; gap:8px; }
.side-top { padding:8px 12px; font-weight:600; }
.side-top:hover, .side-link:hover { background:var(--page); }
.side-top.on { background:var(--brand-l); color:var(--brand-d); box-shadow:inset 3px 0 0 var(--brand); }
.side-group { margin-top:8px; display:flex; flex-direction:column; gap:1px; }
.side-head { padding:6px 12px 4px; font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink3); }
.side-group.here .side-head { color:var(--brand-d); }
.side-link { padding:6px 12px 6px 20px; font-size:13.5px; color:var(--ink2); }
.side-link.on { background:var(--brand-l); color:var(--brand-d); font-weight:650; box-shadow:inset 3px 0 0 var(--brand); }
.side .badge { margin-left:auto; }
.gh-menu { display:none; width:36px; height:36px; padding:8px 7px; border:1px solid var(--line2); border-radius:6px; background:#fff; flex-direction:column; justify-content:space-between; }
.gh-menu span { display:block; height:2px; background:var(--ink2); border-radius:2px; }
.gh-menu:hover { background:var(--page); }
.scrim { display:none; }
main { max-width:1180px; width:100%; margin:0 auto; padding:20px 16px 72px; min-height:70vh; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:16px 18px; margin-bottom:14px; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.sub { color:var(--ink3); font-size:13px; margin:0 0 10px; }
.tablewrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:13.5px; }
th { text-align:left; color:var(--ink3); font-weight:650; font-size:12px; padding:7px 8px; border-bottom:1px solid var(--line2); white-space:nowrap; background:#fafaf9; }
th.sortable { cursor:pointer; user-select:none; } th.sortable:hover { color:var(--brand-d); }
th.sortable[aria-sort="ascending"]::after { content:" ▲"; font-size:9px; } th.sortable[aria-sort="descending"]::after { content:" ▼"; font-size:9px; }
td { padding:8px; border-bottom:1px solid var(--line); vertical-align:top; }
td.num, th.num { text-align:right; font-variant-numeric:tabular-nums; }
td.nowrap { white-space:nowrap; }
tr.click { cursor:pointer; } tr.click:hover, tbody tr:hover { background:#f7fbf4; }
.filter { display:flex; gap:8px; align-items:center; margin:4px 0 10px; flex-wrap:wrap; }
.filter input { min-width:220px; flex:0 1 320px; }
.filter .count { color:var(--ink3); font-size:12.5px; }

button { font:inherit; font-weight:600; padding:7px 14px; border-radius:6px; border:1px solid var(--brand); background:var(--brand); color:#fff; cursor:pointer; }
button:hover { background:var(--brand-d); }
button.ghost { background:#fff; color:var(--brand-d); border-color:var(--line2); } button.ghost:hover { border-color:var(--brand); background:var(--brand-l); }
button.danger { background:#fff; color:var(--bad); border-color:var(--bad); } button.danger:hover { background:var(--bad-l); }
button:disabled { opacity:.5; cursor:default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:0; box-shadow:0 0 0 3px rgba(68,170,0,.28); border-color:var(--brand); }
input, select, textarea { font:inherit; padding:7px 9px; border:1px solid var(--line2); border-radius:6px; background:#fff; color:var(--ink); max-width:100%; }
label { display:block; font-size:12.5px; font-weight:600; color:var(--ink2); margin:10px 0 4px; }
.row { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; align-items:center; }
.pill { white-space:nowrap; display:inline-block; padding:1px 9px; border-radius:99px; font-size:12px; font-weight:600; background:var(--page); color:var(--ink2); text-decoration:none; }
.pill.good { background:var(--good-l); color:var(--good); } .pill.bad { background:var(--bad-l); color:var(--bad); } .pill.warn { background:var(--warn-l); color:var(--warn); }
.msg { padding:10px 12px; border-radius:6px; margin:10px 0; font-size:13.5px; border-left:4px solid; }
.msg.err { background:var(--bad-l); color:var(--bad); } .msg.ok { background:var(--good-l); color:var(--good); }
.mono { font-family:ui-monospace, Menlo, Consolas, monospace; font-size:13px; word-break:break-all; }
.pre { white-space:pre-line; }
.empty { color:var(--ink3); padding:18px 0; }
.card.empty { padding:18px; }
a.btn { display:inline-block; font-weight:600; padding:7px 14px; border-radius:6px; border:1px solid var(--brand); background:var(--brand); color:#fff; text-decoration:none; }
a.btn:hover { background:var(--brand-d); }
.doc h2 { font-size:18px; }
img.logo { max-height:64px; max-width:240px; display:block; margin-bottom:10px; }

/* messages that appear after an action, top right, and fade on their own */
.toasts { position:fixed; right:16px; bottom:16px; z-index:60; display:flex; flex-direction:column; gap:8px; max-width:min(420px, calc(100vw - 32px)); }
.toast { background:#fff; border:1px solid var(--line); border-left:4px solid var(--good); border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,.16); padding:10px 34px 10px 12px; position:relative; font-size:13.5px; animation:slide .18s ease-out; }
.toast.err { border-left-color:var(--bad); }
.toast button { position:absolute; right:4px; top:4px; border:0; background:transparent; color:var(--ink3); padding:2px 8px; font-size:16px; }
.toast button:hover { background:var(--page); }
@keyframes slide { from { transform:translateY(-6px); opacity:0; } to { transform:none; opacity:1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation:none; } }

/* home */
.tiles { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:12px; margin-bottom:14px; }
.tile { background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px 16px; text-decoration:none; color:var(--ink); display:flex; flex-direction:column; gap:2px; box-shadow:0 1px 2px rgba(0,0,0,.04); }
a.tile:hover { border-color:var(--brand); box-shadow:0 2px 8px rgba(47,125,10,.14); }
.tile .k { font-size:12px; font-weight:650; color:var(--ink3); text-transform:uppercase; letter-spacing:.04em; }
.tile .v { font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; line-height:1.25; }
.tile .d { font-size:12.5px; color:var(--ink3); } .tile .d.bad { color:var(--bad); font-weight:600; } .tile .d.good { color:var(--good); }
.cols { display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:14px; align-items:start; }
.cols > .card { margin:0; min-width:0; }
.chart { width:100%; height:auto; display:block; }
.chart .in { fill:var(--brand); } .chart .out { fill:#c9c9c9; } .chart text { fill:var(--ink3); font-size:11px; } .chart .axis { stroke:var(--line2); }
.legend { display:flex; gap:16px; font-size:12.5px; color:var(--ink3); margin-top:6px; }
.legend i { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; background:var(--brand); } .legend i.out { background:#c9c9c9; }
.skel { height:14px; border-radius:4px; margin:10px 0; background:linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%); background-size:400% 100%; animation:shine 1.2s ease infinite; }
@keyframes shine { from { background-position:100% 0; } to { background-position:0 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation:none; } }

/* my work: one card per queue this person can act on */
.mywork h2 { font-size:17px; }
.queues { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:10px; margin-top:10px; }
.qcard { display:flex; flex-direction:column; gap:2px; padding:12px 14px; border:1px solid var(--line); border-radius:8px; text-decoration:none; color:var(--ink); background:#fff; border-left:4px solid var(--warn); }
.qcard:hover { border-color:var(--brand); box-shadow:0 2px 8px rgba(47,125,10,.14); }
.qcard .n { font-size:26px; font-weight:750; line-height:1.15; font-variant-numeric:tabular-nums; }
.qcard .k { font-weight:650; } .qcard .d { font-size:12.5px; color:var(--ink3); }
.qcard.bad { border-left-color:var(--bad); } .qcard.bad .n { color:var(--bad); }
.qcard.warn .n { color:var(--warn); }
.qcard.done { border-left-color:var(--good); } .qcard.done .n { color:var(--good); }

/* which company a form posts to */
.posting { display:inline-flex; gap:6px; align-items:baseline; margin:2px 0 10px; padding:4px 10px; border-radius:6px; background:var(--brand-l); color:var(--brand-d); font-size:13px; border:1px solid #cfe8bd; }

/* lists that come a page at a time */
.listbar { display:flex; flex-direction:column; gap:8px; margin:6px 0 12px; }
.listbar .row { align-items:center; }
.listbar input[type=search] { flex:0 1 280px; min-width:180px; }
.inline { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--ink2); margin:0; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
button.chip { background:#fff; color:var(--ink2); border:1px solid var(--line2); border-radius:99px; padding:3px 12px; font-weight:600; font-size:12.5px; }
button.chip:hover { border-color:var(--brand); background:var(--brand-l); color:var(--brand-d); }
button.chip.on { background:var(--brand); border-color:var(--brand); color:#fff; }
.pager { display:flex; gap:8px; align-items:center; justify-content:flex-end; margin-top:10px; flex-wrap:wrap; }
.pager .sub { margin-right:auto; }
tr.sel, tr.sel:hover { background:var(--brand-l); box-shadow:inset 3px 0 0 var(--brand); }

/* a list with the chosen item beside it */
.split { display:grid; grid-template-columns:minmax(330px, 2fr) minmax(0, 3fr); gap:14px; align-items:start; }
.split-list { position:sticky; top:70px; max-height:calc(100vh - 86px); overflow:auto; }
.split-list .card { margin-bottom:0; } .split-detail { min-width:0; }
.queue { display:flex; flex-direction:column; gap:4px; }
.qitem { display:flex; flex-direction:column; padding:8px 10px; border-radius:6px; text-decoration:none; color:var(--ink); border:1px solid transparent; }
.qitem:hover { background:var(--page); } .qitem.sel { background:var(--brand-l); border-color:#cfe8bd; box-shadow:inset 3px 0 0 var(--brand); }
.qitem .sub { margin:0; }
main:has(.split) { max-width:1440px; }

.msg.warn { background:var(--warn-l); color:var(--warn); } .msg ul { margin:6px 0 0; padding-left:18px; }
.note { border-left:3px solid var(--line2); padding:4px 10px; margin:8px 0; }
.card.back { border-left:4px solid var(--warn); }
.filecard { margin:0; background:#fafaf9; }
.filecard input[type=file] { max-width:100%; }

/* sign in */
.login { max-width:400px; margin:9vh auto 0; }
.login .brand { display:flex; flex-direction:column; align-items:center; gap:6px; margin-bottom:10px; }
.login .brand img { height:70px; } .login .brand strong { font-size:18px; letter-spacing:.3px; }
.login input { width:100%; } .login button { width:100%; }
.login img.qr { display:block; margin:6px auto 12px; width:200px; height:200px; image-rendering:pixelated; border:1px solid var(--line); border-radius:6px; }
.keys td:first-child { white-space:nowrap; } kbd { font:600 11.5px ui-monospace, Consolas, monospace; border:1px solid var(--line2); border-radius:4px; padding:1px 6px; background:var(--page); }

@media (max-width: 720px) {
  .gh { gap:8px; padding:8px 12px; } .gh-logo span { display:none; } .search { order:3; flex-basis:100%; max-width:none; } .search kbd { display:none; }
  main { padding:14px 10px 60px; } .card { padding:14px 12px; } .tile .v { font-size:21px; }
    .gh-right select { max-width:150px; }
}
@media (max-width: 1099px) { .split { grid-template-columns:minmax(0, 1fr); } .split-list { position:static; max-height:none; } }
@media (max-width: 900px) {
  .layout { grid-template-columns:minmax(0, 1fr); }
  .gh-menu { display:inline-flex; }
  .side { position:fixed; z-index:50; left:0; top:0; height:100%; width:min(280px, 84vw); transform:translateX(-102%); transition:transform .2s; box-shadow:0 8px 24px rgba(0,0,0,.18); padding-top:16px; }
  .side.open { transform:none; }
  .side.open + .scrim { display:block; position:fixed; inset:0; z-index:45; background:rgba(0,0,0,.28); }
}
@media (prefers-reduced-motion: reduce) { .side { transition:none; } }
@media print {
  .gh, .side, .noprint, .msg, .toasts, .filter, .listbar, .pager, .split-list { display:none !important; }
  .split { display:block; }
  .layout { display:block; } body, html { background:#fff; } main { margin:0; max-width:none; padding:0; background:none; }
  .card { border:0; padding:0; box-shadow:none; } th { background:none; }
}
