:root {
  --ink: #262033;
  --muted: #746c7f;
  --paper: #faf8fc;
  --line: #e6dfea;
  --accent: #c13584;
  --white: #fff;
  --purple: #833ab4;
  --gradient: linear-gradient(115deg, #515bd4, #833ab4 25%, #c13584 48%, #e1306c 65%, #f56040 82%, #fcaf45);
  --button-gradient: linear-gradient(110deg, #833ab4, #c13584);
  --warn: #865b16;
  --red: #b33450;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  font:
    15px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 10px 15px;
  font-weight: 600;
}
button:hover {
  background: #f6eef9;
}
button.primary {
  background: var(--button-gradient);
  color: white;
  border-color: transparent;
}
button.lime {
  background: var(--button-gradient);
  color: white;
  border-color: transparent;
}
button.danger {
  color: var(--red);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.3px;
  line-height: 1.2;
  margin-bottom: 12px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
.sidebar {
  padding: 32px 22px;
  background: linear-gradient(165deg, #241632, #432258);
  border-top: 4px solid #c13584;
  color: #faf5ff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-weight: 750;
  font-size: 21px;
  letter-spacing: -0.5px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 45px;
}
.brand i {
  font-style: normal;
  background: var(--gradient);
  color: white;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.sidebar .eyebrow {
  color: #c4acd7;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav button {
  text-align: left;
  background: transparent;
  border-color: transparent;
  color: #e1d3eb;
  font-size: 14px;
}
.nav button.active {
  background: #61317d;
  color: #fff;
}
.nav small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
}
.sidebottom {
  margin-top: auto;
  font-size: 12px;
  color: #d0bbdf;
}
.sidebottom button {
  margin-top: 16px;
  background: transparent;
  color: white;
  border-color: #705184;
}
.main {
  padding: 35px 44px;
  max-width: 1540px;
  width: 100%;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 42px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 100px;
  padding: 5px 10px;
  font-size: 12px;
  background: #f3eafa;
  white-space: nowrap;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  background: #833ab4;
  border-radius: 50%;
}
.status.warn {
  background: #fff2da;
  color: var(--warn);
}
.status.warn:before {
  background: #bc8738;
}
.status.stop {
  background: #fcebf0;
  color: var(--red);
}
.status.stop:before {
  background: var(--red);
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.muted {
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.stat {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.stat strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.stat span {
  color: var(--muted);
  font-size: 13px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.card,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px;
}
.cardhead {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 22px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 13px;
  font-weight: 700;
  background: #fce7f1;
  color: #9d286b;
}
.avatar.cadt {
  background: #eee7fb;
  color: #6c3da5;
}
.cardhead h3 {
  margin: 0;
}
.cardhead .status {
  margin-left: auto;
}
.card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.card dt {
  font-size: 12px;
  color: var(--muted);
}
.card dd {
  margin: 3px 0;
  font-size: 14px;
}
.cardfooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
  gap: 12px;
}
.notice {
  border-radius: 12px;
  padding: 20px 23px;
  background: #f4ecfa;
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 24px 0;
}
.notice p {
  margin: 0;
}
.notice button {
  margin-left: auto;
  flex-shrink: 0;
}
.notice.warn {
  background: #fff3e0;
}
.tiny {
  font-size: 12px;
}
.tabs {
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  margin: 20px 0 25px;
  overflow: auto;
  padding-bottom: 12px;
}
.tabs button {
  white-space: nowrap;
  background: transparent;
  border-color: transparent;
}
.tabs button.active {
  background: #f1e4f7;
  color: #7a299c;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.field label {
  font-weight: 600;
  font-size: 13px;
}
.field input,
.field textarea,
.field select {
  border: 1px solid #dcd2e3;
  background: white;
  border-radius: 8px;
  padding: 11px 12px;
  min-width: 0;
  width: 100%;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 100px;
}
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid #eee8f2;
  vertical-align: top;
}
td.text {
  max-width: 420px;
  min-width: 220px;
  white-space: pre-wrap;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.event {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid #eee8f2;
  padding: 12px 0;
  font-size: 13px;
}
.event time {
  color: var(--muted);
  min-width: 145px;
}
.auth {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: radial-gradient(ellipse at 10% 15%, #f1e7fb 0, transparent 48%), radial-gradient(ellipse at 90% 90%, #fff0e5 0, transparent 45%), #faf8fc;
}
.authform {
  width: 100%;
  max-width: 420px;
}
.authbox {
  position: relative;
  overflow: hidden;
  padding: 40px 36px 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 60px #5426650d;
}
.authbox::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--gradient);
}
.authbox h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  margin: 0 0 30px;
}
.authbox .field { margin-bottom: 20px; }
.authbox input { min-height: 48px; }
.authbox button { width: 100%; min-height: 48px; margin-top: 6px; }
button.primary:hover, button.lime:hover { filter: brightness(0.93); }
:focus-visible { outline: 2px solid var(--purple); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple); }
dialog {
  width: min(700px, 94vw);
  max-height: 92vh;
  border: 0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 25px 90px #0004;
  color: var(--ink);
}
dialog::backdrop {
  background: #20112e99;
  backdrop-filter: blur(3px);
}
dialog.wide {
  width: min(1340px, 96vw);
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialoghead h2 {
  margin: 0;
}
.remoteimg {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: crosshair;
}
.remotecontrols {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.remotecontrols input {
  flex: 1;
  min-width: 150px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.loading {
  padding: 60px;
  color: var(--muted);
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 440px;
  padding: 14px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  z-index: 10;
  display: none;
}
.footnote {
  margin-top: 25px;
  font-size: 12px;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  font-size: 12px;
}
.tag {
  display: inline-block;
  padding: 3px 7px;
  background: #f5edf9;
  border-radius: 5px;
  margin: 2px;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .main {
    padding: 28px 25px;
  }
  .shell {
    grid-template-columns: 195px 1fr;
  }
  .sidebar {
    padding: 28px 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 16px;
  }
  .sidebar .brand {
    margin-bottom: 14px;
  }
  .sidebar .eyebrow,
  .sidebottom {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
  }
  .nav small {
    display: none;
  }
  .main {
    padding: 22px 16px;
  }
  .topbar {
    margin-bottom: 27px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 29px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .notice {
    align-items: flex-start;
    flex-direction: column;
  }
  .notice button {
    margin-left: 0;
  }
  .cols {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .auth { padding: 24px 16px; }
  .authbox { padding: 34px 24px 28px; }
  .cardhead {
    flex-wrap: wrap;
  }
  .cardhead .status {
    margin-left: 0;
  }
}
.material-img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
}
