:root {
  color-scheme: dark;
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8eef8;
  background: #101318;
  --text: #e8eef8;
  --muted: #aab8cd;
  --surface: #191e27;
  --inset: #12161e;
  --raised: #232b39;
  --border: #2b3545;
  --control: #445168;
  --link: #b8c6ff;
  --primary: #405bc6;
  --primary-hover: #536ee0;
  --good: #98e0b7;
  --good-bg: #1e382e;
  --warning: #f4d08c;
  --warning-bg: #3b3021;
  --bad: #ffb5b4;
  --bad-bg: #452b32;
  --active: #bdccff;
  --active-bg: #283a5f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); line-height: 1.17; letter-spacing: -.035em; }
h2 { font-size: 1.13rem; letter-spacing: -.015em; }
h3 { font-size: 1rem; }
a { color: var(--link); overflow-wrap: anywhere; }
a:hover { color: #e0e7ff; }
code { color: #d0dcf3; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #9db8ff; outline-offset: 3px; }
.muted { color: var(--muted); }
.sign-in { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at top, #222b47 0, transparent 65%); }
.sign-in-card { width: min(100%, 470px); display: grid; gap: 20px; padding: clamp(20px, 5vw, 36px); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 20px 65px #080a1180; }
.sign-in-card .button { justify-self: start; }
.sign-in-card p { color: var(--muted); }
.sign-in-card p[data-tone="bad"] { color: var(--bad); }
.auth-form { display: grid; gap: 12px; }
.auth-form input { min-height: 42px; }
.auth-form input:read-only { background: var(--surface); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 740; line-height: 1.22; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--primary); font-size: 1.3rem; }
.shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: 24px; align-self: start; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 24px 15px 16px; background: var(--surface); border-right: 1px solid var(--border); }
.sidebar .brand { padding: 0 6px; }
nav { display: grid; gap: 15px; }
.nav-group { display: grid; gap: 3px; }
.nav-heading { padding: 0 10px 4px; color: var(--muted); font-size: .73rem; font-weight: 650; }
#nav[data-role="staff"] > .nav-group:first-child { display: none; }
.nav-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; text-align: left; color: var(--muted); border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; }
.nav-item:hover { background: var(--raised); color: var(--text); }
.nav-item[aria-current="page"] { color: var(--active); background: var(--active-bg); border-color: #364e79; }
.nav-count { padding: 0 6px; border-radius: 6px; background: var(--raised); font-size: .81rem; }
.profile { display: grid; gap: 3px; margin-top: auto; padding: 12px 6px 0; border-top: 1px solid var(--border); font-size: .89rem; overflow-wrap: anywhere; }
.profile-name { font-weight: 700; }
.profile .button { justify-self: start; margin-left: -9px; }
.workspace { width: min(100%, 1500px); margin: 0 auto; padding: 30px clamp(16px, 3vw, 46px) 48px; }
.page-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 21px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.page-header p { margin-top: 5px; }
.view, .cards { display: grid; min-width: 0; gap: 15px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; }
.card-header, .form-card, .dialog-header, .dialog-body { padding: 17px 19px; }
.card-header p { margin-top: 3px; }
.form-card { display: grid; align-content: start; gap: 9px; }
.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metrics > div { padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.metrics dt { color: var(--muted); font-size: .87rem; font-weight: 600; overflow-wrap: anywhere; }
.metrics dd { font-size: 1.73rem; font-weight: 720; font-variant-numeric: tabular-nums; line-height: 1.24; }
.metrics.monitor-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics.work-metrics { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); }
.queue-toolbar, .queue-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.queue-toolbar { padding: 17px 19px; }
.queue-toolbar p { margin-top: 4px; }
.queue-folders { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.queue-folders button {
  flex: 1 1 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
}
.queue-folders button:hover { background: var(--raised); color: var(--text); }
.queue-folders button[aria-pressed="true"] { background: var(--active-bg); color: var(--active); border-color: #475d99; }
.queue-folders span { font-size: .82rem; font-variant-numeric: tabular-nums; }
.queue-filters input { width: min(320px, 100%); }
.monitor-actions { align-items: end; }
.monitor-form { flex: 0 1 380px; }
.button { min-height: 36px; display: inline-flex; justify-content: center; align-items: center; gap: 5px; padding: 6px 11px; border: 1px solid transparent; border-radius: 7px; color: var(--text); text-decoration: none; background: none; cursor: pointer; font-weight: 650; font-size: .91rem; text-align: center; }
.button:hover { color: #fff; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { background: var(--raised); border-color: var(--control); }
.button.secondary:hover, .button.quiet:hover { background: #2d3b54; }
.button.quiet { color: var(--muted); }
.button.danger { color: var(--bad); border-color: #87525d; }
.button.danger:hover:not(:disabled) { background: var(--bad-bg); }
.button:disabled { opacity: .53; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.fields { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-top: 4px; }
label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: .87rem; font-weight: 600; }
.fields label { flex: 1 1 210px; }
input, select, textarea { min-height: 36px; min-width: 0; width: 100%; padding: 6px 8px; border: 1px solid var(--control); border-radius: 7px; background: var(--inset); color: var(--text); font-weight: 450; }
textarea { resize: vertical; }
.fields .check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.check input { min-height: 0; width: auto; }
#totp-status { padding: 0 16px 12px; }
[data-density="compact"] td, [data-density="compact"] th { padding-block: 5px; }
input[type="file"] { color: var(--muted); }
input::file-selector-button { margin-right: 6px; border: 1px solid var(--control); border-radius: 4px; background: var(--raised); color: var(--text); cursor: pointer; }
.filter-label { min-width: 132px; }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 580px; text-align: left; border-collapse: collapse; }
th, td { padding: 10px 17px; vertical-align: top; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
th { background: var(--inset); color: var(--muted); font-size: .81rem; font-weight: 650; }
td { font-size: .89rem; }
.subline { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; }
.empty { padding: 27px 16px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.card-header + .empty, .table-wrap + .empty { border-top: 1px solid var(--border); }
.pill { display: inline-block; border-radius: 6px; padding: 2px 7px; background: var(--raised); color: var(--muted); font-size: .8rem; font-weight: 650; }
.pill[data-tone="good"] { color: var(--good); background: var(--good-bg); }
.pill[data-tone="warning"] { color: var(--warning); background: var(--warning-bg); }
.pill[data-tone="bad"] { color: var(--bad); background: var(--bad-bg); }
.pill[data-tone="active"] { color: var(--active); background: var(--active-bg); }
.notice { margin-bottom: 14px; padding: 9px 12px; background: var(--good-bg); color: var(--good); border: 1px solid #456a55; border-radius: 7px; overflow-wrap: anywhere; white-space: pre-line; }
.notice[data-tone="bad"] { color: var(--bad); background: var(--bad-bg); border-color: #87525d; }
.assignment-form { display: grid; gap: 13px; padding: 15px 18px; border-top: 1px solid var(--border); }
.assignment-form .fields { margin: 0; }
.work-items { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.work-item { padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; display: grid; gap: 6px; background: var(--inset); }
.work-item h3, .work-item p { overflow-wrap: anywhere; }
.work-item label { max-width: 530px; }
dialog { max-width: calc(100% - 24px); width: 480px; padding: 0; border: 1px solid var(--control); border-radius: 12px; background: var(--surface); color: var(--text); }
dialog::backdrop { background: #080d17c7; }
.dialog-header { border-bottom: 1px solid var(--border); }
.dialog-body { display: grid; gap: 10px; }
#delete-account-name { font-weight: 650; overflow-wrap: anywhere; }
.credential-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 7px; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 184px minmax(0, 1fr); }
  .cards.two { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; gap: 9px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand { padding: 0; }
  nav { display: flex; flex-wrap: wrap; }
  .nav-group { display: flex; flex-wrap: wrap; align-items: center; }
  .nav-heading { width: 100%; padding: 0 6px; }
  .queue-toolbar { padding: 12px; }
  .nav-item { min-height: 32px; padding: 5px 7px; font-size: .86rem; }
  .profile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 0; padding: 6px 0 0; }
  .profile .button { margin-left: auto; }
  .workspace { padding: 16px 11px 34px; }
  .page-header { gap: 8px; margin-bottom: 14px; }
  .page-header p { font-size: .85rem; }
  .card-header, .form-card { padding: 12px; }
}
.fields .batch-field { flex: 0 1 105px; }
.work-item .status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.assignment-form .form-notice { margin: 0; }
.staff-entry summary { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 9px; cursor: pointer; }
.staff-entry summary::-webkit-details-marker { display: none; }
.staff-entry summary::before { content: "›"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.staff-entry[open] summary::before { transform: rotate(90deg); }
.staff-entry summary:hover { background: var(--raised); border-radius: 10px; }
.staff-identity { font-weight: 650; overflow-wrap: anywhere; }
.staff-count { color: var(--good); font-weight: 650; font-size: .87rem; font-variant-numeric: tabular-nums; }
.staff-links { border-top: 1px solid var(--border); }
ul.staff-links { margin: 0; padding: 0; list-style: none; }
.staff-link { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 7px 16px; padding: 10px 19px; overflow-wrap: anywhere; }
.staff-link + .staff-link { border-top: 1px solid var(--border); }
.staff-link-urls { display: grid; align-content: start; gap: 3px; font-size: .89rem; }
.archive-repositories { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.archive-repositories li > div { margin-top: 4px; }
@media (max-width: 570px) {
  .metrics.monitor-metrics { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .staff-link { grid-template-columns: 1fr; padding-inline: 12px; }
}
.selection-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 19px 12px; }
.select-cell { width: 48px; }
.select-cell input, .row-check { width: 16px; height: 16px; min-height: 0; margin: 3px 0 0; accent-color: var(--primary-hover); }
.row-actions { min-width: 110px; }
.row-actions .button { min-height: 30px; padding: 4px 8px; }
.progress-details summary { cursor: pointer; }
.progress-details ol { margin: 4px 0; padding-left: 18px; }
.wide-dialog { width: min(980px, calc(100% - 24px)); max-height: min(92dvh, 100% - 24px); }
.preview-content { display: grid; gap: 10px; min-width: 0; }
.preview-group { display: grid; gap: 10px; min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: 12px; }
.preview-group > .pill { justify-self: start; }
.preview-field h3 { font-size: .9rem; margin-bottom: 3px; }
.preview-file { min-width: 0; border-top: 1px solid var(--border); padding-top: 7px; }
.preview-file summary { cursor: pointer; }
.preview-file summary .pill { margin-left: 7px; }
.preview-file[open] summary { margin-bottom: 8px; }
.preview-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.preview-value { min-width: 0; border-radius: 6px; padding: 6px 8px; background: var(--inset); overflow-wrap: anywhere; white-space: pre-wrap; }
.preview-value pre { overflow: auto; max-height: 290px; margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.proxy-results { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.proxy-results li { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; padding: 8px; border: 1px solid var(--border); border-radius: 7px; }
.proxy-results li p { flex-basis: 100%; }
#preview-status, #proxy-check-message, #audit-status { margin-bottom: 0; }
#check-more-proxies { justify-self: start; }
@media (max-width: 570px) {
  .preview-columns { grid-template-columns: 1fr; }
  .selection-bar { padding-inline: 12px; }
}
