:root {
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #202a2d;
  background: #f4f6f6;
  font-size: 14px;
  letter-spacing: 0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #dce2e2;
  background: white;
  color: inherit;
  padding: 9px 15px;
  border-radius: 5px;
  min-height: 38px;
}
button:hover {
  background: #eef3f2;
}
button.primary {
  background: #167766;
  color: white;
  border-color: #167766;
}
button.danger {
  color: #b64047;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
input,
select {
  border: 1px solid #d4dddd;
  border-radius: 5px;
  padding: 10px;
  background: white;
  min-width: 0;
  width: 100%;
  outline: none;
}
input:focus,
select:focus {
  border-color: #167766;
  box-shadow: 0 0 0 3px #16776615;
}
label {
  display: grid;
  gap: 8px;
  margin: 15px 0;
  font-size: 13px;
  color: #536165;
}
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
}
input[type="checkbox"] {
  width: auto;
  accent-color: #167766;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 15px;
}
small,
.muted {
  color: #819092;
}
small {
  font-size: 12px;
}
code {
  font:
    12px Consolas,
    monospace;
  overflow-wrap: anywhere;
}
a {
  color: #167766;
}
.shell {
  display: grid;
  grid-template-columns: 224px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid #e1e6e6;
  position: fixed;
  width: 224px;
  inset: 0 auto 0 0;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 750;
  margin: 0 12px 44px;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: #167766;
  color: white;
  border-radius: 7px;
  font-size: 23px;
}
.sidebar small {
  margin: 0 12px 12px;
  font-size: 10px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  text-align: left;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  padding: 12px 14px;
  color: #667477;
}
.nav button.active {
  color: #116c5c;
  background: #eaf4ef;
  font-weight: 650;
}
.nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.bottom {
  margin-top: auto;
  padding-top: 40px;
  display: grid;
  gap: 12px;
}
.live-dot {
  display: inline-block;
  background: #22a17d;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 7px;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 70px;
  padding: 0 40px;
  border-bottom: 1px solid #e1e6e6;
  background: #ffffffbc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.topbar span {
  font-size: 12px;
  color: #6e7e81;
}
.avatar {
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  background: #e8eeee;
  font-size: 11px;
  margin-left: 14px;
}
.content {
  padding: 35px 40px;
  max-width: 1600px;
  margin: auto;
}
.pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 10px;
  color: #167766;
  letter-spacing: 0;
  margin-bottom: 9px;
  font-weight: 650;
}
.date {
  font-size: 12px;
  color: #829092;
  margin-top: 10px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dfe6e5;
  background: white;
  border-radius: 6px;
  margin-bottom: 28px;
}
.metric {
  padding: 24px;
  border-right: 1px solid #e5eaea;
  min-width: 0;
}
.metric:last-child {
  border: 0;
}
.metric .value {
  font-size: 32px;
  font-weight: 650;
  margin: 16px 0 10px;
}
.metric small {
  display: block;
}
.metric .hint {
  font-size: 12px;
  color: #167766;
}
.band {
  border-top: 1px solid #dde5e4;
  padding-top: 23px;
  margin: 26px 0;
}
.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 10px;
}
.chart {
  height: 180px;
  display: flex;
  align-items: end;
  gap: 18px;
  padding: 15px 10px 25px;
  border-bottom: 1px solid #dce5e4;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent 44px,
    #e8edec 45px
  );
}
.barcol {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  position: relative;
}
.bar {
  width: min(65px, 90%);
  background: #58a58e;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.barcol small {
  position: absolute;
  bottom: -20px;
}
.barcol span {
  font-size: 11px;
  color: #6c7c78;
  margin-bottom: 5px;
}
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
}
.tablewrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-weight: 500;
  color: #839193;
  background: #edf1f0;
  padding: 12px;
  white-space: nowrap;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid #e2e8e7;
  vertical-align: middle;
}
td strong {
  font-weight: 600;
  font-size: 13px;
}
td small {
  display: block;
  margin-top: 6px;
}
td.actions {
  white-space: nowrap;
}
.actions button {
  padding: 5px 9px;
  min-height: 30px;
  font-size: 12px;
  margin-right: 4px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: #e8f4ed;
  color: #277255;
}
.badge.busy,
.badge.queued,
.badge.running {
  background: #fff2da;
  color: #9c6c20;
}
.badge.offline,
.badge.cancelled {
  background: #e9eded;
  color: #7e8b8b;
}
.badge.disabled,
.badge.failed,
.badge.timeout {
  background: #fae9e9;
  color: #b0464c;
}
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.filters input,
.filters select {
  max-width: 270px;
}
.empty {
  padding: 55px 20px;
  text-align: center;
  color: #889594;
}
.pager {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  max-width: 850px;
}
.formfooter {
  padding: 20px 0;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f1f5f3;
}
.loginform {
  width: 100%;
  max-width: 380px;
}
.loginform .brand {
  margin: 0 0 55px;
}
.loginform h1 {
  font-size: 28px;
  margin-bottom: 10px;
}
.loginform form {
  margin-top: 30px;
}
.loginform button {
  width: 100%;
  margin-top: 15px;
}
.loginform footer {
  margin-top: 35px;
  color: #8a9794;
  font-size: 11px;
}
.error {
  color: #b64047;
  margin-top: 12px;
  line-height: 1.7;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #182b2d66;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 10;
}
.dialog {
  background: #fff;
  width: 100%;
  max-width: 540px;
  border-radius: 8px;
  padding: 26px;
  max-height: 90vh;
  overflow: auto;
}
.dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dialog footer {
  display: flex;
  gap: 10px;
  justify-content: end;
  margin-top: 25px;
}
.dialog pre {
  white-space: pre-wrap;
  word-break: break-all;
  padding: 15px;
  background: #eef4f1;
  font:
    12px Consolas,
    monospace;
  line-height: 1.8;
}
.dialog .formgrid {
  gap: 0 18px;
}
.checklist {
  display: grid;
  gap: 4px;
  max-height: 150px;
  overflow: auto;
  border: 1px solid #e1e6e5;
  padding: 8px;
}
.checklist label {
  margin: 5px;
}
.note {
  font-size: 12px;
  line-height: 1.8;
  color: #7b8989;
}
.device-note {
  max-width: 24rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.taskurl {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #253c36;
  color: white;
  border-radius: 5px;
  padding: 12px 22px;
  display: none;
  z-index: 20;
  max-width: 90vw;
}
.mobile-brand {
  display: none;
}
.spinner {
  padding: 50px;
  color: #81908e;
}
.device-detail {
  font-size: 12px;
  line-height: 2;
  overflow-wrap: anywhere;
}
.statsline {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #e2e8e7;
}
.statsline b {
  font-weight: 550;
}
@media (max-width: 1050px) {
  .sidebar {
    width: 180px;
    padding: 25px 12px;
  }
  .shell {
    grid-template-columns: 180px 1fr;
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric:nth-child(2) {
    border-right: 0;
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid #e5eaea;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    width: 100%;
    height: auto;
    inset: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid #dfe5e3;
  }
  .brand {
    font-size: 20px;
    margin: 0 0 10px 4px;
    gap: 8px;
  }
  .brandmark {
    width: 25px;
    height: 25px;
    font-size: 19px;
  }
  .sidebar > small,
  .bottom {
    display: none;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    justify-content: space-between;
  }
  .nav button {
    padding: 7px 2px;
    min-height: 49px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    white-space: nowrap;
  }
  .nav svg {
    width: 14px;
    height: 14px;
  }
  .topbar {
    height: 44px;
    padding: 0 18px;
  }
  .topbar .muted {
    display: none;
  }
  .content {
    padding: 24px 16px;
  }
  .pagehead {
    margin-bottom: 22px;
    align-items: start;
  }
  .pagehead button {
    white-space: nowrap;
    padding: 8px 11px;
  }
  h1 {
    font-size: 23px;
  }
  .metric {
    padding: 18px 14px;
  }
  .metric .value {
    font-size: 28px;
  }
  .metric small {
    font-size: 11px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters input,
  .filters select {
    max-width: none;
    flex: 1;
    min-width: 120px;
  }
  .chart {
    gap: 8px;
  }
  .dialog {
    padding: 20px;
  }
  .overlay {
    padding: 12px;
  }
  table.responsive thead {
    display: none;
  }
  table.responsive,
  table.responsive tbody,
  table.responsive tr,
  table.responsive td {
    display: block;
  }
  table.responsive tr {
    border-bottom: 1px solid #dae3e1;
    padding: 14px 0;
  }
  table.responsive td {
    border: 0;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    overflow-wrap: anywhere;
  }
  table.responsive td:before {
    content: attr(data-label);
    color: #86938f;
    flex-shrink: 0;
    font-size: 11px;
  }
  table.responsive .actions {
    justify-content: end;
  }
  .taskurl {
    max-width: 230px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .pager {
    justify-content: center;
  }
}
