:root {
  color-scheme: dark;
  --bg: #07131b;
  --surface: #10232e;
  --surface-raised: #16303d;
  --line: #29424f;
  --text: #e4eef1;
  --muted: #91aab7;
  --accent: #91dfe2;
  --good: #94d7bc;
  --warning: #edb686
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5
}

a {
  color: inherit;
  text-decoration: none
}

a:hover {
  color: var(--accent)
}

button,
input,
select {
  font: inherit
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap
}

button:hover,
.button:hover {
  border-color: var(--accent);
  color: var(--text)
}

button:disabled {
  cursor: default;
  opacity: .4
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #08232d
}

.primary:hover {
  background: #b4edef;
  color: #08232d
}

input,
select {
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0a1b25;
  color: var(--text);
  padding: 10px 12px;
  min-height: 43px
}

input:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px
}

input[type=checkbox] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  min-height: 18px;
  cursor: pointer;
  margin: 0
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px
}

h1,
h2,
p {
  margin-top: 0
}

h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.6px;
  margin-bottom: 8px;
  font-weight: 650
}

h2 {
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 18px;
  font-weight: 600
}

.muted,
small,
.footnote {
  color: var(--muted)
}

small {
  display: block;
  font-size: 12px;
  margin-top: 4px
}

p {
  max-width: 75ch
}

.separator {
  padding: 0 8px;
  color: var(--line)
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  border-right: 1px solid var(--line);
  padding: 32px 20px 20px;
  display: flex;
  flex-direction: column;
  background: #0b1b25
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  line-height: 1.2;
  font-size: 16px;
  margin-bottom: 44px
}

.brand strong {
  font-weight: 600
}

.brand svg {
  height: 38px;
  width: 38px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5
}

.rail nav {
  display: grid;
  gap: 8px
}

.rail nav a {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 12px;
  border-radius: 6px;
  color: var(--muted)
}

.rail nav a[aria-current] {
  background: var(--surface-raised);
  color: var(--accent)
}

.rail nav svg {
  height: 21px;
  width: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round
}

.rail-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px
}

main {
  margin-left: 224px;
  padding: 38px 38px 28px;
  max-width: 1900px
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px
}

.page-head p {
  margin-bottom: 0
}

.page-head .button {
  align-self: center
}

.back {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 18px
}

.filters input {
  width: 340px
}

.filters select {
  min-width: 180px
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: auto;
  background: var(--surface)
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap
}

th {
  background: #152b36;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line)
}

td {
  padding: 18px 16px;
  border-bottom: 1px solid #203844;
  font-size: 14px
}

tbody tr:last-child td {
  border-bottom: 0
}

tbody tr:hover {
  background: #132b38
}

th.check {
  width: 48px
}

.device-name,
.release-name {
  font-weight: 600
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #677985;
  margin-right: 8px
}

.status-dot.online {
  background: var(--good)
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #3d5360;
  border-radius: 5px;
  font-size: 12px;
  color: #b9cbd3;
  white-space: nowrap
}

.badge.good,
.badge.success {
  border-color: #3b6f5f;
  color: var(--good);
  background: #142f2a
}

.badge.warning,
.badge.error,
.badge.initiated {
  color: var(--warning);
  border-color: #6d533f;
  background: #302921
}

.badge.working {
  border-color: #3d6a79;
  color: var(--accent)
}

.badge.cancelled {
  color: var(--muted)
}

.badge.offline {
  color: var(--muted);
  border-color: var(--line);
  background: transparent
}

.meter {
  height: 4px;
  background: #29424d;
  border-radius: 2px;
  width: 95px;
  overflow: hidden
}

.meter i {
  height: 100%;
  display: block;
  background: #8fb6c9;
  border-radius: 2px
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #10232e
}

.selection-bar span {
  color: var(--muted);
  font-size: 14px
}

.footnote {
  margin: 18px 0 0;
  font-size: 12px
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 25px;
  margin-bottom: 24px
}

.narrow {
  max-width: 720px
}

.stack {
  display: grid;
  gap: 18px
}

.stack p {
  margin: 0
}

.stack label,
.upload-form label,
.config-fields label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: var(--muted)
}

.stack input,
.stack select {
  width: 100%
}

.stack button {
  justify-self: start
}

.copy-line {
  display: flex;
  gap: 10px;
  margin: 24px 0
}

.copy-line input {
  flex: 1;
  font-family: Consolas, monospace;
  font-size: 13px
}

.text-button {
  background: transparent;
  border: 0;
  min-height: 32px;
  padding: 3px 0;
  color: var(--muted);
  font-weight: 500
}

.text-link {
  display: inline-block;
  color: var(--accent);
  margin-top: 25px;
  font-size: 13px
}

.compact {
  padding: 6px 12px;
  min-height: 32px;
  font-size: 12px
}

.danger-button {
  background: #352a24;
  border-color: #705440;
  color: var(--warning)
}

.good-text {
  color: var(--good)
}

.warning-text {
  color: var(--warning)
}

.empty {
  padding: 65px 25px;
  text-align: center;
  color: var(--muted);
  white-space: normal
}

.empty h2 {
  color: var(--text)
}

.empty p {
  margin: 0 auto 22px
}

.empty.small {
  padding: 26px
}

.message {
  padding: 14px 18px;
  margin-bottom: 22px;
  background: #173a36;
  border: 1px solid #416d60;
  border-radius: 7px
}

.message.error,
.errorlist {
  color: var(--warning)
}

.errorlist {
  font-size: 13px;
  padding-left: 20px
}

.upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 18px
}

.upload-form>label {
  flex: 1;
  min-width: 220px
}

.upload-form>.errorlist {
  width: 100%;
  margin: 0
}

.upload-form input[type=file] {
  min-width: 250px
}

.upload-panel {
  margin-bottom: 30px
}

.device-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px
}

.availability {
  display: flex;
  gap: 5px;
  margin: 25px 0 18px
}

.availability i {
  flex: 1;
  min-width: 4px;
  height: 40px;
  background: #30434e;
  border-radius: 3px
}

.availability i.present {
  background: #7cbaa8
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin: 24px 0 0
}

.facts div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  min-width: 0
}

.facts dt {
  font-size: 12px;
  color: var(--muted)
}

.facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere
}

.facts.configuration {
  grid-template-columns: repeat(3, 1fr)
}

.section-title {
  margin-top: 16px
}

.job-layout {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 24px
}

.job-layout .panel {
  align-self: start
}

.device-picker {
  max-height: 560px;
  overflow: auto;
  margin-top: 18px
}

.device-picker>div>div {
  padding: 11px 0;
  border-top: 1px solid var(--line)
}

.device-picker label,
.select-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px
}

.select-heading {
  color: var(--muted)
}

.config-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 8px
}

.danger-note {
  padding: 15px;
  background: #302921;
  border-left: 3px solid var(--warning);
  color: var(--warning)
}

[hidden] {
  display: none !important
}

.login-main {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px
}

.login-panel {
  width: min(430px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px
}

.login-panel h1 {
  font-size: 26px;
  margin-top: 20px
}

.login-panel .stack {
  margin-top: 28px
}

.login-panel button {
  width: 100%
}

.login-mark {
  color: var(--accent);
  font-size: 35px;
  line-height: 1
}

.login-panel>p {
  font-size: 13px
}

@media(max-width:1100px) {
  .rail {
    width: 180px;
    padding-left: 14px;
    padding-right: 14px
  }

  main {
    margin-left: 180px;
    padding: 28px 22px
  }

  .device-layout {
    grid-template-columns: 1fr
  }

  .job-layout {
    grid-template-columns: 270px minmax(0, 1fr)
  }

  .config-fields {
    grid-template-columns: 1fr
  }
}

@media(max-width:760px) {
  .rail {
    position: relative;
    width: 100%;
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line)
  }

  .brand {
    margin: 0;
    font-size: 12px
  }

  .brand svg {
    height: 30px;
    width: 30px
  }

  .rail nav {
    display: flex;
    gap: 4px
  }

  .rail nav a {
    padding: 9px;
    font-size: 0;
    gap: 0
  }

  .rail nav svg {
    height: 24px;
    width: 24px
  }

  .rail-bottom {
    margin: 0 0 0 auto
  }

  .rail-bottom>span {
    display: none
  }

  main {
    margin: 0;
    padding: 25px 16px
  }

  .page-head {
    align-items: flex-start;
    gap: 16px
  }

  .page-head h1 {
    font-size: 25px
  }

  .page-head .button {
    font-size: 12px;
    padding: 8px 12px
  }

  .filters {
    flex-wrap: wrap
  }

  .filters input {
    flex: 1;
    min-width: 170px
  }

  .filters select {
    min-width: 130px
  }

  .job-layout {
    grid-template-columns: 1fr
  }

  .facts.configuration {
    grid-template-columns: 1fr 1fr
  }

  .selection-bar {
    gap: 14px
  }

  .selection-bar span {
    font-size: 12px
  }

  .login-main {
    padding: 22px
  }

  .login-panel {
    padding: 28px
  }

  .panel {
    padding: 20px
  }
}

@media(prefers-reduced-motion:no-preference) {

  button,
  .button,
  a {
    transition: background-color .12s, border-color .12s, color .12s
  }
}
