:root {
  color-scheme: dark;
  --bg: #08111d;
  --panel: #101a27;
  --panel-2: #162233;
  --text: #eff5fb;
  --muted: #a4b3c7;
  --line: #24354b;
  --green: #16b75f;
  --blue: #8bbcf0;
  --red: #ff8691;
  --amber: #f4bc61;
  --sidebar: #102845;
  --sidebar-active: #244d7b;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #fff;
  --panel-2: #eef3f8;
  --text: #17202a;
  --muted: #53657b;
  --line: #dce4ee;
  --blue: #205dba;
  --red: #a5293c;
  --amber: #8b580d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter,"Segoe UI",Arial,sans-serif;
}

a {
  color: var(--blue);
}

button,input,select,textarea {
  font: inherit;
}

h1,h2,h3,p {
  margin: 0;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.55px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  font-weight: 650;
}

h3 {
  font-size: 14px;
}

.muted,.hint,small {
  color: var(--muted);
}

.hint {
  font-size: 12px;
}

.loading {
  margin: 3rem;
}

.shell {
  display: grid;
  grid-template-columns: 228px minmax(0,1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  padding: 28px 14px 18px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: block;
  text-align: center;
  padding: 2px 6px 22px;
  text-decoration: none;
  color: #fff;
}

.brand img {
  display: block;
  width: 154px;
  max-width: 100%;
  margin: 0 auto 8px;
}

.brand span {
  font-size: 12px;
  letter-spacing: .11px;
  color: #c1d6ea;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  color: #d8e8f7;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 500;
}

.nav a:hover,.nav a[aria-current] {
  background: var(--sidebar-active);
  color: #fff;
}

.nav a[aria-current] {
  border-left-color: #24cd73;
}

.nav i {
  width: 12px;
  height: 12px;
  border: 1.5px solid #8bbcf0;
  border-radius: 3px;
  display: block;
  flex-shrink: 0;
}

.nav a[aria-current] i {
  border-color: #25d976;
}

.sidefoot {
  margin-top: auto;
  padding: 12px 10px;
  color: #bdd1e6;
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  background: var(--panel);
}

.topbar strong {
  letter-spacing: .2px;
}

.topbar .smallnote {
  font-size: 12px;
  color: var(--muted);
}

.body {
  max-width: 1450px;
  margin: auto;
  padding: 27px 28px 48px;
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 22px;
}

.heading p,.panel-head p {
  margin-top: 5px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn,button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn.primary,button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #051b10;
}

.btn:hover,button:hover:not(:disabled) {
  filter: brightness(1.13);
  border-color: var(--blue);
}

button:disabled {
  opacity: .54;
  cursor: default;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 13px;
  margin-bottom: 16px;
}

.metric {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
}

.metric b {
  display: block;
  font-size: 23px;
  line-height: 1.15;
  margin-top: 4px;
}

.dot {
  background: #2c7be5;
  border-radius: 50%;
  height: 12px;
  width: 12px;
  flex: 0 0 12px;
}

.dot.wait {
  background: #f4ae24;
}

.dot.ok {
  background: #16b75f;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  margin-bottom: 15px;
}

.panel-head {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.panel-body {
  padding: 4px 18px 17px;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}

th,td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-2);
  letter-spacing: .5px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td a {
  font-weight: 600;
  text-decoration: none;
}

td a:hover {
  text-decoration: underline;
}

td .btn {
  min-height: 29px;
  padding: 4px 10px;
  font-size: 12px;
}

.empty {
  text-align: center;
  padding: 36px 14px 44px;
}

.empty p {
  margin: 5px 0 13px;
}

.status {
  display: inline-flex;
  border-radius: 100px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 650;
  background: var(--panel-2);
  color: var(--blue);
  white-space: nowrap;
}

.status.wait {
  color: var(--amber);
}

.status.ok {
  color: #39ce80;
}

.status.bad {
  color: var(--red);
}

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 10px 12px;
  margin-bottom: 13px;
  color: var(--text);
}

.notice.warn {
  border-left-color: var(--amber);
}

.notice.error {
  border-left-color: var(--red);
  color: var(--red);
}

.notice.success {
  border-left-color: var(--green);
}

.notice:empty {
  display: none;
}

.notice ul {
  margin: 5px 0;
  padding-left: 19px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(290px,1fr);
  gap: 14px;
}

.grid.equal {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.fields {
  display: grid;
  gap: 13px;
}

.fields.two {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.fields label {
  display: grid;
  gap: 5px;
  font-weight: 600;
}

.row-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.row-line:last-child {
  border-bottom: 0;
}

.row-line strong {
  overflow-wrap: anywhere;
}

.kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kv div {
  padding: 11px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.kv strong {
  display: block;
  margin-top: 3px;
}

.stack {
  display: grid;
  gap: 10px;
}

.space-top {
  margin-top: 12px;
}

.tabs {
  display: flex;
  overflow: auto;
  gap: 7px;
  padding: 0 18px 12px;
}

.tabs button {
  font-size: 12px;
  min-height: 30px;
}

.tabs button[aria-selected=true] {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--panel-2);
}

.review-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(195px,1fr));
  gap: 10px;
  padding-top: 10px;
}

.record {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  margin: 8px 0;
}

.record summary {
  cursor: pointer;
  font-weight: 650;
}

.review-fields label {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}

input,select,textarea {
  width: 100%;
  min-height: 38px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
}

.review-fields textarea {
  min-height: 36px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0;
}

.check input {
  width: auto;
  min-height: 0;
  margin-top: 5px;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: radial-gradient(ellipse at 30% 4%,#142e4e,transparent 58%),var(--bg);
}

.login .panel {
  width: min(100%,410px);
  padding: 27px;
}

.login img {
  width: 149px;
  margin: 0 0 20px;
}

.login h1 {
  font-size: 27px;
}

.login button {
  width: 100%;
}

.login p {
  margin-top: 5px;
}

.login .fields {
  margin: 18px 0 12px;
}

dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 19px;
  width: min(92vw,490px);
}

dialog::backdrop {
  background: #050b15b0;
}

.secret {
  white-space: pre-wrap;
  user-select: all;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--bg);
  font-family: Consolas,monospace;
  letter-spacing: .5px;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form input {
  min-width: 140px;
}

.asset-list {
  max-width: 820px;
}

.path {
  margin-bottom: 8px;
  font-size: 12px;
}

.pill-label {
  font-size: 11px;
}

.filter {
  width: min(280px,100%);
}

@media(max-width:975px) {
  .shell {
    grid-template-columns: 180px minmax(0,1fr);
  }
  .body,.topbar {
    padding-left: 17px;
    padding-right: 17px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 12px 9px;
  }
}

@media(max-width:670px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    min-height: 0;
    height: auto;
    padding: 10px;
  }
  .brand {
    text-align: start;
    padding: 3px 6px 9px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .brand img {
    margin: 0;
    width: 110px;
  }
  .nav {
    grid-template-columns: repeat(3,1fr);
    gap: 2px;
  }
  .nav a {
    padding: 4px 6px;
    font-size: 12px;
    gap: 5px;
  }
  .nav i,.sidefoot {
    display: none;
  }
  .topbar {
    height: auto;
    min-height: 52px;
  }
  .smallnote {
    display: none;
  }
  .body {
    padding: 17px 10px 35px;
  }
  .heading {
    flex-wrap: wrap;
    gap: 12px;
  }
  .grid.equal,.fields.two {
    grid-template-columns: 1fr;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .metric {
    display: block;
    text-align: center;
  }
  .dot {
    display: none;
  }
  .metric b {
    font-size: 19px;
  }
  .table-wrap {
    max-width: 100%;
  }
}

.jobs-table td:nth-child(2),
.jobs-table td:nth-child(3) {
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 975px) {
  .jobs-table th, .jobs-table td {
    padding-left: 9px;
    padding-right: 9px;
  }
}
