/* The portal shell: dark sidebar and light top bar. Loaded last by every page (client pages and the
   staff record screens built on the Django admin), so the frame is identical everywhere. Colours are
   literal on purpose: this file must not depend on either page family's variables. */
.side, .side * { box-sizing: border-box; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 14px 10px 12px; overflow-y: auto; background: radial-gradient(140% 38% at 0% 0%, rgba(53, 80, 216, 0.24), transparent 70%), #0a0a0a; border-right: 1px solid rgba(255, 255, 255, 0.08); color: #f4f5f8; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 13.5px; line-height: 1.55; color-scheme: dark; }
.side a.logo, .side a.logo:link, .side a.logo:visited { display: inline-flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #f4f5f8; text-decoration: none; }
.side .logo-ring { width: 24px; height: 24px; filter: drop-shadow(0 0 10px rgba(91, 123, 253, 0.65)); }
.side .logo-word { font-family: "Poppins Mark", "Poppins", system-ui, sans-serif; font-weight: 600; font-size: 20px; letter-spacing: 0.01em; line-height: 1; }
.side .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side .side-label { margin: 18px 8px 6px; padding: 0; font: 400 11px/1.6 "JetBrains Mono", ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(244, 245, 248, 0.44); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .side-label-first { margin-top: 2px; }
.side .side-link, .side a.side-link:link, .side a.side-link:visited { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 0 8px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 14px; font-weight: 450; color: rgba(244, 245, 248, 0.66); text-align: left; text-decoration: none; cursor: pointer; transition: color .2s, background-color .2s; }
.side .side-link:hover, .side a.side-link:hover { color: #f4f5f8; background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.side .side-link[aria-current], .side a.side-link[aria-current] { color: #f4f5f8; font-weight: 550; background: rgba(91, 123, 253, 0.16); box-shadow: inset 0 0 0 1px rgba(142, 162, 255, 0.22); }
.side .side-link[aria-current] .ico { color: #8ea2ff; }
.side .side-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .ico { display: block; width: 16px; height: 16px; flex: none; }
.side .side-count { font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 6px; border-radius: 999px; color: rgba(244, 245, 248, 0.68); background: rgba(255, 255, 255, 0.08); font-variant-numeric: tabular-nums; }
.side .side-link[aria-current] .side-count { color: #f4f5f8; background: rgba(91, 123, 253, 0.3); }
.side .side-foot { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.side .side-foot form { margin: 0; }
.side .who { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px; min-width: 0; }
.side .avatar { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(91, 123, 253, 0.2); color: #8ea2ff; font-size: 12px; font-weight: 650; }
.side .who-text { display: grid; min-width: 0; line-height: 1.3; }
.side .who-text b { font-size: 13.5px; font-weight: 600; color: #f4f5f8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .who-text small { font-size: 12px; color: rgba(244, 245, 248, 0.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar, .topbar * { box-sizing: border-box; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 48px; padding: 0 32px; background: #fff; border-bottom: 1px solid #e4e7f0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
.topbar .topbar-path { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; font-size: 13.5px; line-height: 1.4; color: #6c738c; white-space: nowrap; }
.topbar .topbar-path span { overflow: hidden; text-overflow: ellipsis; }
.topbar .topbar-path i { font-style: normal; color: #cfd4e2; }
.topbar .topbar-path b { font-weight: 550; color: #10132a; }
.topbar .topbar-search { position: relative; flex: 0 1 280px; margin: 0; }
.topbar .topbar-search .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: #6c738c; pointer-events: none; }
.topbar .topbar-search input { width: 100%; min-width: 0; height: 32px; margin: 0; padding: 0 10px 0 30px; font: inherit; font-size: 13.5px; color: #10132a; background: #f5f6fb; border: 1px solid transparent; border-radius: 10px; }
.topbar .topbar-search input::placeholder { color: #6c738c; }
.topbar .topbar-search input:hover { border-color: #cfd4e2; }
.topbar .topbar-search input:focus-visible { outline: 2px solid #3350e0; outline-offset: 0; background: #fff; }

/* staff record screens (Django admin markup): put the shared parts on the same grid as the portal */
body.bb-app #container { grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; }
body.bb-app #container > .side { grid-column: 1; grid-row: 1 / -1; }
body.bb-app #container > .topbar { grid-column: 2; grid-row: 1; }
/* the top bar already says where you are; the admin's own breadcrumb row would repeat it */
body.bb-app #container > nav { display: none; }
body.bb-app #main { grid-column: 2; grid-row: 3; }

@media (max-width: 860px) {
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 12px 6px; overflow: visible; border-right: 0; }
  .side a.logo { padding: 4px 8px; margin-right: auto; }
  .side .side-nav { order: 3; flex: 1 0 100%; flex-direction: row; overflow-x: auto; gap: 4px; }
  .side .side-foot { flex-direction: row; align-items: center; padding: 0; border: 0; }
  .side .side-link { width: auto; white-space: nowrap; }
  .side .side-link span { flex: none; }
  .side .side-label, .side .who { display: none; }
  .side .side-foot .side-link span { display: none; }
  .topbar { padding-inline: 16px; }
  body.bb-app #container { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto; }
  body.bb-app #container > .side { grid-column: 1; grid-row: 1; }
  body.bb-app #container > .topbar { grid-column: 1; grid-row: 2; }
  body.bb-app #main { grid-column: 1; grid-row: 4; }
}

/* ---------- tables, shared by client pages and staff lists (behaviour in tables.js) ---------- */
th.has-grip { position: relative; }
.col-grip { position: absolute; top: 0; right: -5px; bottom: 0; width: 11px; z-index: 2; cursor: col-resize; touch-action: none; }
.col-grip::after { content: ""; position: absolute; top: 25%; bottom: 25%; left: 5px; width: 1px; background: #d9dce8; transition: background-color .15s; }
.col-grip:hover::after, .col-grip.dragging::after { top: 0; bottom: 0; width: 2px; left: 4px; background: #5b7bfd; }
table.cols-fixed { table-layout: fixed; }
table.cols-fixed th, table.cols-fixed td { min-width: 0 !important; overflow: hidden; text-overflow: ellipsis; }
.th-sort { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.th-sort:hover { color: #10132a; }
.th-sort:focus-visible { outline: 2px solid #8ea2ff; outline-offset: 3px; border-radius: 4px; }
.th-sort::after { content: ""; border: 4px solid transparent; border-bottom-color: currentColor; border-top-width: 0; opacity: 0; }
.th-sort:hover::after { opacity: .35; }
th[aria-sort] .th-sort { color: #10132a; }
th[aria-sort] .th-sort::after { opacity: 1; border-bottom-color: #5b7bfd; }
th[aria-sort="descending"] .th-sort::after { border-bottom-width: 0; border-top: 4px solid #5b7bfd; }

/* ---------- controls: one size and two button styles on the working surface ----------
   Every field, select and button is 36px high with a 10px radius and 13.5px text. Actions are the
   accent blue; everything else (filter, cancel, secondary saves) is white with a hairline border.
   The only smaller control is .btn-xs, for actions inside a table row. Buttons get no outline on
   click; keyboard focus shows as a soft neutral ring. */
.main .btn, .main .btn-lg,
#content .button, #content input[type=submit], #content input[type=button], #content a.button,
#content .object-tools a, #content .filter-btn, #content .submit-row a.deletelink, #content .submit-row a.closelink,
#content #changelist #toolbar form input[type=submit], #content #changelist .actions .button {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 36px; min-height: 0; margin-block: 0;
  padding: 0 14px; border-radius: 10px; font-family: inherit; font-size: 13.5px; font-weight: 550; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap; box-shadow: none; }
.main .btn-xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }

/* primary: the action of the page or of the form */
.main .btn-primary,
#content .button.default, #content input[type=submit], #content .object-tools a.addlink,
#content #changelist #toolbar form input[type=submit], #content #changelist .actions .button {
  background: #5b7bfd; border: 1px solid #5b7bfd; color: #fff; }
.main .btn-primary:hover,
#content .button.default:hover, #content input[type=submit]:hover, #content .object-tools a.addlink:hover,
#content #changelist #toolbar form input[type=submit]:hover, #content #changelist .actions .button:hover {
  background: #4a69ee; border-color: #4a69ee; color: #fff; }

/* secondary */
.main .btn-ghost,
#content .submit-row input:not(.default), #content .object-tools a:not(.addlink), #content .filter-btn, #content input[type=button], #content a.button:not(.default) {
  background: #fff; border: 1px solid #cfd4e2; color: #10132a; }
.main .btn-ghost:hover,
#content .submit-row input:not(.default):hover, #content .object-tools a:not(.addlink):hover, #content .filter-btn:hover, #content .filter-btn[aria-expanded="true"],
#content input[type=button]:hover, #content a.button:not(.default):hover {
  background: #f5f6fb; border-color: #b6bccd; color: #10132a; }
#content .submit-row a.deletelink { border: 1px solid transparent; }

.main .btn:focus, #content .button:focus, #content input[type=submit]:focus, #content input[type=button]:focus, #content a.button:focus,
#content .object-tools a:focus, #content .filter-btn:focus, #content .submit-row a:focus, .th-sort:focus { outline: none; }
.main .btn:focus-visible, #content .button:focus-visible, #content input[type=submit]:focus-visible, #content input[type=button]:focus-visible, #content a.button:focus-visible,
#content .object-tools a:focus-visible, #content .filter-btn:focus-visible, #content .submit-row a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(16, 19, 42, 0.16); }
.th-sort:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }

/* fields */
.main select, .main input[type=text], .main input[type=password], .main input[type=search], .main input[type=email],
.main .toolbar-form select, .main .toolbar-form input[type=text],
#content input[type=text], #content input[type=password], #content input[type=email], #content input[type=url], #content input[type=number],
#content input[type=search], #content select:not([multiple]), #content .vTextField,
#content #changelist #toolbar #searchbar, #content #changelist .actions select {
  box-sizing: border-box; height: 36px; min-height: 0; margin-block: 0; padding-block: 0; border-radius: 10px; font-size: 13.5px; line-height: normal; }
#content #changelist #toolbar #searchbar { width: min(340px, 50vw); padding-inline: 11px; border: 1px solid #cfd4e2; }
#content #changelist #toolbar form#changelist-search > div, #content #changelist .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#content #changelist #toolbar form#changelist-search label { display: inline-flex; align-items: center; }
#content #changelist .actions label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
#content #changelist .actions .action-counter { line-height: 36px; }
.topbar .topbar-search input { height: 36px; }

/* list filters in the same row line up with the fields */
.main .chip { height: 36px; padding: 0 13px; }
.main .seg { height: 36px; box-sizing: border-box; padding: 3px; border-radius: 10px; align-items: stretch; }
.main .seg a { display: inline-flex; align-items: center; padding: 0 12px; border-radius: 7px; }
html.js .main .btn.js-hide { display: none; }
/* one corner radius for everything clickable, whatever its height */
.main .btn, .main .btn-xs, .main .btn-lg, .main .chip, .main .seg, .main .viewing .btn { border-radius: 10px; }

/* ---------- the top bar is the navy band: path, whose data is shown, search, account menu ---------- */
.topbar { background: #1d2a6e; border-bottom: 0; color: #fff; gap: 12px; }
.topbar .topbar-path { color: rgba(255, 255, 255, 0.66); margin-right: auto; }
.topbar .topbar-path i { color: rgba(255, 255, 255, 0.32); }
.topbar .topbar-path b { color: #fff; }
.topbar .topbar-search .ico { color: rgba(255, 255, 255, 0.6); }
.topbar .topbar-search input { height: 34px; color: #fff; background: rgba(255, 255, 255, 0.1); border: 1px solid transparent; }
.topbar .topbar-search input::placeholder { color: rgba(255, 255, 255, 0.6); }
.topbar .topbar-search input:hover { border-color: rgba(255, 255, 255, 0.28); }
.topbar .topbar-search input:focus, .topbar .topbar-search input:focus-visible { outline: none; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.5); }
.topbar .topbar-viewing { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.8); white-space: nowrap; }
.topbar .topbar-viewing b { font-weight: 600; color: #fff; }
.topbar .topbar-viewing button { display: inline-flex; align-items: center; gap: 7px; height: 30px; margin: 0; padding: 0 11px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px; background: rgba(255, 255, 255, 0.08); font: inherit; font-size: 12.5px; font-weight: 550; color: #fff; cursor: pointer; }
.topbar .topbar-viewing button:hover { background: rgba(255, 255, 255, 0.16); }
.topbar .ico { display: block; width: 15px; height: 15px; flex: none; }

.topbar .account { position: relative; margin: 0; }
.topbar .account summary { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px; border-radius: 10px; list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 550; color: #fff; -webkit-user-select: none; user-select: none; }
.topbar .account summary::-webkit-details-marker { display: none; }
.topbar .account summary:hover, .topbar .account[open] summary { background: rgba(255, 255, 255, 0.1); }
.topbar .account summary:focus { outline: none; }
.topbar .account summary:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45); }
.topbar .account summary > .ico { width: 12px; height: 12px; color: rgba(255, 255, 255, 0.7); transform: rotate(90deg); }
.topbar .account .avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, 0.16); font-size: 12px; font-weight: 650; color: #fff; }
.topbar .account-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 224px; padding: 6px; background: #fff; border: 1px solid #cfd4e2; border-radius: 12px; box-shadow: 0 16px 40px -16px rgba(16, 19, 42, 0.3); }
.topbar .account-head { display: grid; margin: 0 0 6px; padding: 8px 10px 10px; border-bottom: 1px solid #e4e7f0; line-height: 1.35; }
.topbar .account-head b { font-size: 13.5px; font-weight: 600; color: #10132a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .account-head small { font-size: 12px; color: #6c738c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .account-menu form { margin: 0; }
.topbar .account-menu a, .topbar .account-menu a:link, .topbar .account-menu a:visited, .topbar .account-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; margin: 0; padding: 0 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; font-weight: 450; color: #10132a; text-align: left; text-decoration: none; cursor: pointer; }
.topbar .account-menu a:hover, .topbar .account-menu button:hover, .topbar .account-menu a[aria-current] { background: #f5f6fb; }
.topbar .account-menu .ico { color: #6c738c; }
@media (max-width: 720px) { .topbar .account-name, .topbar .topbar-viewing span { display: none; } .topbar { padding: 0 16px; } }
/* client pages use the full width of the surface, like the staff lists */
.main .content { max-width: none; }

/* ---------- page layers: navy top bar, then a white band with the page's title, subtitle and
   actions, then the content on the grey surface. Same on client pages and staff screens. ---------- */
.app .main .content { --px: 32px; padding: 0 var(--px) 64px; }
.app .main .content > :first-child { margin-top: 24px; }
.app .main .content > .head, .app .main .content > .issue-head, .app .main .content > .crumbs:first-child { margin-inline: calc(-1 * var(--px)); padding-inline: var(--px); background: #fff; }
.app .main .content > .head, .app .main .content > .issue-head { margin-top: 0; margin-bottom: 24px; padding-block: 22px; border-bottom: 1px solid #e4e7f0; }
.app .main .content > .crumbs:first-child { margin-top: 0; margin-bottom: 0; padding-top: 18px; padding-bottom: 0; }
.app .main .content > .crumbs:first-child + .head, .app .main .content > .crumbs:first-child + .issue-head { padding-top: 10px; }

body.bb-app #content { --px: 32px; position: relative; padding: 0 var(--px) 56px; }
body.bb-app #content > h1 { margin: 0 calc(-1 * var(--px)) 24px; padding: 22px var(--px); background: #fff; border-bottom: 1px solid #e4e7f0; line-height: 1.2; }
body.bb-app #content > h1:has(+ h2) { margin-bottom: 0; padding-bottom: 4px; border-bottom: 0; }
body.bb-app #content > h1 + h2 { margin: 0 calc(-1 * var(--px)) 24px; padding: 0 var(--px) 20px; background: #fff; border-bottom: 1px solid #e4e7f0; font-size: 13.5px; font-weight: 450; line-height: 1.4; color: #6c738c; }
body.bb-app #content .object-tools { position: absolute; top: 17px; right: var(--px); display: flex; gap: 8px; float: none; margin: 0; padding: 0; }
body.bb-app #content .object-tools li { float: none; margin: 0; }
@media (max-width: 860px) { .app .main .content, body.bb-app #content { --px: 16px; } }
@media (max-width: 720px) { body.bb-app #content .object-tools { position: static; margin-bottom: 16px; } }
.app .main .content > .issue-head { border-width: 0 0 1px; border-style: solid; border-color: #e4e7f0; border-radius: 0; box-shadow: none; }

/* ---------- staff record screens (Laravel): list, form, filter pop-over, notices ---------- */
.main .toolbar .record-search { flex: 1; }
.main .record-search input[type=search] { width: min(340px, 50vw); padding: 0 11px; background: #fff; border: 1px solid #cfd4e2; color: #10132a; }
.main .filter-btn { margin-left: auto; }
.main .filter-btn i { width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: #5b7bfd; }

.main .record-list .bulk-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid #e4e7f0; background: #fbfbfd; }
.main .record-list .bulk-bar select { min-width: 220px; }
.main .record-list td { vertical-align: middle; }
.main .record-list td select { height: 30px; min-width: 110px; font-size: 13px; }
.main .record-list .check-col { width: 44px; padding-right: 0; }
.main .record-list th a.th-sort { color: inherit; text-decoration: none; }
.main .pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px; border-top: 1px solid #e4e7f0; font-size: 13px; color: #6c738c; }

.main .head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.main .record-form { padding: 0; }
.main .record-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 14px 20px; border-bottom: 1px solid #e4e7f0; }
.main .record-label { padding-top: 8px; font-size: 13px; font-weight: 550; color: #474d68; }
.main .record-input input[type=text], .main .record-input input[type=url], .main .record-input input[type=number], .main .record-input input[type=password], .main .record-input select { width: min(520px, 100%); background: #fff; border: 1px solid #cfd4e2; color: #10132a; }
.main .record-input textarea { box-sizing: border-box; width: min(760px, 100%); min-height: 110px; padding: 9px 11px; font: inherit; font-size: 13.5px; line-height: 1.5; color: #10132a; background: #fff; border: 1px solid #cfd4e2; border-radius: 10px; resize: vertical; }
.main .record-input textarea:focus, .main .record-input input:focus, .main .record-input select:focus { outline: none; border-color: #5b7bfd; box-shadow: 0 0 0 3px rgba(91, 123, 253, 0.18); }
.main .record-input input[type=checkbox] { width: 18px; height: 18px; margin: 9px 0 0; accent-color: #5b7bfd; }
.main .record-input .help { margin: 6px 0 0; font-size: 12.5px; color: #6c738c; max-width: 72ch; }
.main .record-input .field-error { margin: 6px 0 0; font-size: 12.5px; color: #c9283a; }
.main .record-value { margin: 0; padding-top: 8px; font-size: 13.5px; color: #10132a; overflow-wrap: anywhere; }
.main .record-submit { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; background: #fbfbfd; border-radius: 0 0 12px 12px; }
.main .record-submit .btn-danger { margin-left: auto; }
.main .btn-danger { background: #c9283a; border: 1px solid #c9283a; color: #fff; }
.main .btn-danger:hover { background: #b01f30; border-color: #b01f30; color: #fff; }
.main .delete-list { margin: 0; padding: 16px 20px 16px 40px; font-size: 13.5px; }
.main .related { margin-top: 24px; }
.main .related-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.main .related-head h2 { font-size: 15px; font-weight: 600; }
.main .notices { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.main .notice { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; border: 1px solid #e4e7f0; background: #fff; color: #10132a; }
.main .notice-success { border-color: #bfe5d1; background: #e6f6ee; }
.main .notice-error { border-color: #f3b6c0; background: #fde8eb; }
.main .notice-warning { border-color: #ecd9a0; background: #fdf3d7; }
@media (max-width: 720px) { .main .record-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.main .record-input input[type=text], .main .record-input input[type=url], .main .record-input input[type=number], .main .record-input input[type=password], .main .record-input input[type=file] {
  box-sizing: border-box; height: 36px; padding: 0 11px; font: inherit; font-size: 13.5px; border-radius: 10px; }
.main .record-input input[type=file] { padding: 6px 11px; border: 1px dashed #cfd4e2; width: min(520px, 100%); background: #fff; }
/* staff list header bar: search left; bulk actions, a divider, then the filter on the right */
.main .record-list .list-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid #e4e7f0; background: #fbfbfd; }
.main .record-list .record-search { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1 1 320px; }
.main .record-list .list-bar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.main .record-list .list-bar-end select { min-width: 200px; }
.main .record-list .filter-btn { margin-left: 0; }
.main .record-list .bar-sep { width: 1px; height: 24px; margin: 0 4px; background: #d9dce8; }

/* ---------- staff filter: a panel that slides in over the table, as tall as the table ---------- */
.main .record-list { position: relative; }
.main .record-list .list-body { position: relative; overflow: hidden; min-height: 480px; }   /* room for the filter panel on short lists */
.main .record-list .list-scroll { overflow-x: auto; }
.main .slide-pane { position: absolute; top: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-direction: column; width: 320px; max-width: 100%;
  background: #fff; border-left: 1px solid #e4e7f0; box-shadow: -18px 0 40px -28px rgba(16, 19, 42, 0.35);
  transform: translateX(100%); visibility: hidden; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s; }
html.js .main #changelist-filter.slide-pane { display: flex; }
html.js .main #changelist-filter.slide-pane.open { transform: none; visibility: visible; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
html:not(.js) .main .slide-pane { position: static; transform: none; visibility: visible; width: auto; border-left: 0; box-shadow: none; border-bottom: 1px solid #e4e7f0; }
@media (prefers-reduced-motion: reduce) { .main .slide-pane, html.js .main #changelist-filter.slide-pane.open { transition: none; } }
.main .slide-pane .pane-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid #e4e7f0; }
.main .slide-pane .pane-head h2 { margin: 0; font-size: 14px; font-weight: 600; color: #10132a; }
.main .slide-pane .pane-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: #6c738c; cursor: pointer; }
.main .slide-pane .pane-close:hover { background: #f5f6fb; color: #10132a; }
.main .slide-pane .pane-close .ico { width: 16px; height: 16px; }
.main .slide-pane .pane-body { flex: 1; overflow-y: auto; padding: 6px 0; }
.main .slide-pane .pane-section { border-bottom: 1px solid #eef0f5; }
.main .slide-pane .pane-section summary { display: grid; grid-template-columns: auto minmax(0, 1fr) 14px; align-items: center; gap: 10px; padding: 11px 18px; list-style: none; cursor: pointer; }
.main .slide-pane .pane-section summary::-webkit-details-marker { display: none; }
.main .slide-pane .pane-section summary:hover { background: #fafbfd; }
.main .slide-pane .pane-name { font: 500 11px/1.6 "JetBrains Mono", ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.06em; color: #474d68; }
.main .slide-pane .pane-picked { font-size: 13px; color: #6c738c; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main .slide-pane details[open] .pane-picked { visibility: hidden; }
.main .slide-pane .pane-section summary .ico { width: 12px; height: 12px; color: #9aa0b4; transform: rotate(90deg); transition: transform .15s; }
.main .slide-pane details[open] summary .ico { transform: rotate(-90deg); }
.main .slide-pane .pane-options { display: grid; gap: 2px; padding: 0 10px 10px; }
.main .slide-pane .pane-option { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; color: #10132a; cursor: pointer; }
.main .slide-pane .pane-option:hover { background: #f5f6fb; }
.main .slide-pane .pane-option input { width: 16px; height: 16px; margin: 0; accent-color: #5b7bfd; }
.main .slide-pane .pane-empty { margin: 0; padding: 4px 8px; font-size: 13px; color: #6c738c; }
.main .slide-pane .pane-foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; border-top: 1px solid #e4e7f0; background: #fbfbfd; }
.main .slide-pane .pane-foot .btn-primary { flex: 1; }
.main .slide-pane .pane-option span { flex: 1; min-width: 0; }
.main .slide-pane .pane-option b { font-size: 12px; font-weight: 500; color: #9aa0b4; }
.main .slide-pane.busy .pane-body { opacity: .55; pointer-events: none; transition: opacity .15s .1s; }
/* checkboxes: no focus ring or outline on click; keyboard focus shows as a soft row highlight instead */
.main input[type=checkbox]:focus, .main input[type=checkbox]:focus-visible { outline: none; box-shadow: none; }
.main .slide-pane .pane-option:has(input:focus-visible) { background: #eef1fe; }

/* ---------- staff list fills the visible height: header bar, scrolling rows, footer ---------- */
.app .main:has(.record-list) { height: 100vh; min-height: 0; }
.app .main:has(.record-list) .content { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 24px; }
.main .record-list { flex: 1; min-height: 320px; display: flex; flex-direction: column; overflow: hidden; }
.main .record-list .list-body { flex: 1; min-height: 0; display: flex; }
.main .record-list .list-scroll { flex: 1; min-width: 0; overflow: auto; }
.main .record-list .list-scroll thead th { position: sticky; top: 0; z-index: 2; background: #fbfbfd; box-shadow: inset 0 -1px 0 #e4e7f0; }
.main .record-list .list-foot { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-top: 1px solid #e4e7f0; background: #fbfbfd; font-size: 13px; color: #6c738c; }
.main .record-list .list-per { display: flex; align-items: center; gap: 8px; margin: 0; }
.main .record-list .list-per select { height: 30px; min-width: 76px; font-size: 13px; }
.main .record-list .list-range { margin-left: auto; }
.main .record-list .list-pages { display: flex; align-items: center; gap: 4px; }
.main .record-list .pg { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; color: #474d68; text-decoration: none; }
.main .record-list a.pg:hover { background: #fff; border-color: #cfd4e2; color: #10132a; }
.main .record-list .pg.on { background: #fff; border-color: #cfd4e2; color: #10132a; font-weight: 600; }
.main .record-list .pg.off { color: #c5cad8; }
.main .record-list .pg.gap { min-width: 18px; padding: 0; }
.main .record-list .pg .ico { width: 14px; height: 14px; }
@media (max-width: 860px) { .app .main:has(.record-list) { height: auto; } .main .record-list .list-foot { flex-wrap: wrap; } }

/* ---------- sidebar: one order for everybody; workspace switcher for staff; admin section below ---------- */
.side .side-ws, .side a.side-ws:link, .side a.side-ws:visited { display: grid; grid-template-columns: minmax(0, 1fr) 12px; grid-template-rows: auto auto; column-gap: 8px; align-items: center; margin: 0 2px 8px; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; background: rgba(255, 255, 255, 0.03); color: #f4f5f8; text-decoration: none; transition: background-color .15s, border-color .15s; }
.side a.side-ws:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(142, 162, 255, 0.35); }
.side .side-ws-label { grid-column: 1; font: 400 10.5px/1.5 "JetBrains Mono", ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(244, 245, 248, 0.44); }
.side .side-ws-name { grid-column: 1; font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .side-ws .ico { grid-column: 2; grid-row: 1 / 3; width: 12px; height: 12px; color: rgba(244, 245, 248, 0.5); }
.side .side-link.is-off { color: rgba(244, 245, 248, 0.28); cursor: default; }
.side .side-link.is-off:hover { background: none; color: rgba(244, 245, 248, 0.28); }
.side .side-admin { margin-top: 10px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.side .side-sublabel { margin-top: 12px; }
/* admin dashboard */
.main .row-form { margin: 0; }
.main .row-form button.row { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.main .admin-clients { margin-top: 24px; flex: none; min-height: 0; }
.main .admin-clients .list-body { min-height: 0; }
.main .list-title { margin: 0; font-size: 14px; font-weight: 600; color: #10132a; }
.app .main:has(.admin-clients) { height: auto; min-height: 100vh; }

/* ---------- visual cues: severity bars, exploited flame, issue status ---------- */
.main .sev-ico { display: inline-block; flex: none; width: 13px; height: 13px; vertical-align: -2px; }
.main .badge .sev-ico { margin-left: -1px; }
.main .badge.kev .ico { width: 12px; height: 12px; margin-left: -1px; fill: currentColor; stroke: none; }
.main .cell span .sev-ico, .main tr.group th .sev-ico { margin-right: 7px; }
.main .cell.sev-critical span .sev-ico, .main tr.group.sev-critical .sev-ico { color: var(--critical, #d42a45); }
.main .cell.sev-high span .sev-ico, .main tr.group.sev-high .sev-ico { color: var(--high, #d9622b); }
.main .cell.sev-medium span .sev-ico, .main tr.group.sev-medium .sev-ico { color: var(--medium, #a77800); }
.main .cell.sev-low span .sev-ico, .main tr.group.sev-low .sev-ico { color: var(--low, #1f8a5b); }
.main .cell.sev-unknown span .sev-ico, .main tr.group.sev-unknown .sev-ico { color: #8a90a6; }
.main .cell.zero span .sev-ico { opacity: .45; }
/* critical stands out a little more than the rest: solid fill, white text */
.main .badge.sev-critical { color: #fff; background: #d42a45; border-color: #d42a45; }
.main .badge.sev-critical .sev-ico rect { fill: #fff; }
.main .badge.sev-critical .sev-ico path { stroke: #d42a45; }
.main .badge.sev-critical .sev-ico circle { fill: #d42a45; }
.main .status-ico { display: inline-block; flex: none; width: 14px; height: 14px; vertical-align: -2.5px; margin-right: 6px; }
.main .status-new .status-ico, .main .status-ico.status-new { color: #5b7bfd; }
.main .status-todo .status-ico, .main .status-ico.status-todo { color: #d9822b; }
.main .status-ignored .status-ico, .main .status-ico.status-ignored { color: #8a90a6; }
.main .status-solved .status-ico, .main .status-ico.status-solved { color: #1f8a5b; }
.main .badge-status { gap: 0; }
.main .status-cell { display: inline-flex; align-items: center; color: #474d68; }
.side .side-admin { margin-top: 14px; padding-top: 10px; }
.side .side-label-admin { margin-top: 2px; color: rgba(142, 162, 255, 0.75); }
.side .side-admin .side-sublabel { margin: 12px 8px 4px; font-size: 10px; color: rgba(244, 245, 248, 0.34); }
/* the status switch sits right after the search, the actions and filter at the far right */
.main .record-list .record-search { flex: 0 1 auto; }
/* "actively exploited" reads apart from "critical": dark badge, red flame */
.main .badge.kev { color: #fff; background: #1b1d2a; border-color: #1b1d2a; }
.main .badge.kev .ico { fill: #ff5c4d; }

/* ---------- workspace switcher menu ---------- */
.side .side-ws-menu { position: relative; margin: 0 2px 8px; }
.side .side-ws-menu > summary { list-style: none; cursor: pointer; margin: 0; }
.side .side-ws-menu > summary::-webkit-details-marker { display: none; }
.side .side-ws-menu > summary:hover, .side .side-ws-menu[open] > summary { background: rgba(255, 255, 255, 0.06); border-color: rgba(142, 162, 255, 0.35); }
.side .side-ws-menu > summary:focus { outline: none; }
.side .side-ws-menu > summary:focus-visible { box-shadow: 0 0 0 2px rgba(142, 162, 255, 0.5); }
.side .side-ws-menu[open] > summary .ico { transform: rotate(90deg); }
.side .side-ws .ico { transition: transform .15s; }
.side .ws-menu { position: absolute; top: calc(100% + 6px); left: 0; right: -8px; z-index: 70; padding: 6px; background: #15161d; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7); }
.side .ws-search { box-sizing: border-box; width: 100%; height: 32px; margin: 0 0 6px; padding: 0 10px; font: inherit; font-size: 13px; color: #f4f5f8; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; }
.side .ws-search:focus { outline: none; border-color: rgba(142, 162, 255, 0.5); }
.side .ws-list { margin: 0; padding: 0; list-style: none; max-height: 300px; overflow-y: auto; }
.side .ws-menu form { margin: 0; }
.side .ws-menu button, .side .ws-menu a, .side .ws-menu a:link, .side .ws-menu a:visited { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; color: rgba(244, 245, 248, 0.82); text-align: left; text-decoration: none; cursor: pointer; }
.side .ws-menu button:hover, .side .ws-menu a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side .ws-menu button.is-current { color: #fff; background: rgba(91, 123, 253, 0.16); }
.side .ws-menu button.is-off { color: rgba(244, 245, 248, 0.45); }
.side .ws-avatar { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 6px; background: rgba(91, 123, 253, 0.22); color: #c5d0ff; font-size: 11px; font-weight: 650; }
.side .ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .ws-menu .ico { width: 15px; height: 15px; flex: none; color: rgba(244, 245, 248, 0.6); }
.side .ws-menu button.is-current .ico { color: #8ea2ff; }
.side .ws-menu small { font-size: 11px; color: rgba(244, 245, 248, 0.4); }
.side .ws-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
