:root {
  color-scheme: dark;
  --bg: #0d1115;
  --panel: #151b21;
  --edge: #2a323b;
  --muted: #94a0ad;
  --text: #edf1f5;
  --accent: #baf36a;
  --red: #ff8d8d;
  --amber: #eac374;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.5 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a.primary {
  cursor: pointer;
}
button {
  color: inherit;
  border: 1px solid var(--edge);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px 15px;
}
button:hover {
  border-color: var(--muted);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: #17200b;
  font-weight: 700;
  border: 0;
  padding: 12px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  gap: 24px;
  align-items: center;
}
.primary:hover {
  background: #cbff8c;
}
.quiet {
  background: transparent;
  border: 0;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.shell {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}
aside {
  border-right: 1px solid var(--edge);
  padding: 34px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 17px;
  letter-spacing: 2px;
  font-weight: 700;
}
.brand b {
  font-size: 35px;
  color: var(--accent);
  letter-spacing: -7px;
  padding-right: 6px;
}
.brand b span {
  font-size: 22px;
}
.brand div > span {
  display: block;
  font-size: 9px;
  letter-spacing: 2.3px;
  color: var(--muted);
  margin-top: 2px;
}
.nav-label {
  font-size: 10px;
  color: #697784;
  letter-spacing: 1.7px;
  margin: 52px 12px 16px;
}
nav {
  display: grid;
  gap: 8px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 1px solid transparent;
  text-align: left;
  padding: 13px;
  font-size: 16px;
  color: var(--muted);
}
nav button span {
  font-size: 14px;
}
nav button.active {
  background: #baf36a12;
  color: var(--accent);
  border-color: #baf36a25;
}
nav em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  padding: 1px 7px;
  background: #baf36a18;
  border-radius: 5px;
}
.aside-bottom {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}
.aside-bottom small {
  display: block;
  margin: 8px 0 18px;
  font-size: 10px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 7px;
}
main {
  padding: 42px 44px;
  max-width: 1600px;
  width: 100%;
  margin: auto;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.6px;
  color: var(--accent);
  font-weight: 650;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 10px 0;
}
header p {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--panel);
  margin-bottom: 32px;
}
.stats article {
  padding: 20px 24px;
  border-right: 1px solid var(--edge);
}
.stats article:last-child {
  border: 0;
}
.stats small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}
.stats strong {
  display: block;
  font-size: 28px;
  font-weight: 500;
  margin-top: 8px;
}
.stats em {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  font-style: normal;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--edge);
  background: var(--panel);
  border-radius: 10px;
  padding: 22px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.camera-number {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.badge {
  border: 1px solid #65778555;
  color: var(--muted);
  border-radius: 20px;
  font-size: 10px;
  padding: 3px 9px;
  white-space: nowrap;
}
.badge.recording,
.badge.active {
  color: var(--accent);
  border-color: #baf36a40;
  background: #baf36a0b;
}
.badge.error {
  color: var(--red);
  border-color: #ff8d8d40;
}
.badge.waiting {
  color: var(--amber);
  border-color: #eac37440;
}
.card h3 {
  font-size: 19px;
  margin: 19px 0 7px;
}
.card p {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.card .url {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #788897;
  font-family: monospace;
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--edge);
  padding-top: 15px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
}
.card-bottom button {
  padding: 7px 12px;
  font-size: 12px;
}
.empty {
  padding: 62px 24px;
  text-align: center;
  border: 1px dashed #36424e;
  border-radius: 12px;
  background: linear-gradient(130deg, #151c23, #10171a);
}
.empty-icon {
  font-size: 42px;
  color: var(--accent);
  line-height: 1;
}
.empty h2 {
  font-size: 23px;
  font-weight: 550;
  letter-spacing: -0.5px;
}
.empty p {
  color: var(--muted);
  max-width: 460px;
  margin: 10px auto 24px;
  font-size: 14px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #6f7c89;
  font-size: 11px;
  margin-top: 35px;
  gap: 20px;
}
label {
  display: block;
  margin: 15px 0;
  font-size: 13px;
  color: var(--muted);
}
input,
select {
  display: block;
  width: 100%;
  border: 1px solid #3b4855;
  background: #0d1319;
  color: var(--text);
  padding: 12px;
  border-radius: 7px;
  margin-top: 7px;
}
input:focus,
select:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}
input[type="checkbox"] {
  width: auto;
  display: inline-block;
  margin: 0 10px 0 0;
  accent-color: var(--accent);
}
label.check {
  display: flex;
  align-items: center;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 70% 20%, #baf36a0c, transparent 60%);
}
.login-card {
  width: min(440px, 90vw);
  padding: 35px;
}
.login-card h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 22px 0;
}
.login-card p {
  color: var(--muted);
  font-size: 14px;
}
.login-card label {
  margin-top: 30px;
}
.login-card button {
  width: 100%;
  justify-content: space-between;
}
.login-card small {
  display: block;
  color: #697784;
  font-size: 11px;
  margin-top: 26px;
}
.brandmark {
  color: var(--accent);
  font-size: 55px;
  font-weight: 700;
  letter-spacing: -10px;
  margin-bottom: 28px;
}
.brandmark span {
  font-size: 33px;
}
.error {
  color: var(--red) !important;
  min-height: 20px;
  font-size: 12px;
}
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid #3b4855;
  border-radius: 14px;
  padding: 28px;
  width: min(560px, 92vw);
  max-height: 90vh;
  box-shadow: 0 25px 100px #0008;
}
dialog::backdrop {
  background: #05080dc9;
  backdrop-filter: blur(5px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dialog-top h2 {
  font-size: 22px;
  margin: 0;
}
#editorForm > .primary {
  width: 100%;
  margin-top: 12px;
}
#qrDialog {
  text-align: center;
}
#qrImage {
  display: block;
  width: min(300px, 100%);
  margin: 20px auto;
  border-radius: 8px;
}
.access-code {
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--accent);
  font-family: monospace;
}
#qrServer {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.field-help {
  font-size: 11px;
  color: #80909e;
}
.order-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.order-row select {
  flex: 1;
}
.order-row button {
  padding: 7px 10px;
  margin-top: 7px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 24px 0 15px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
td,
th {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--edge);
}
th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
}
td button {
  font-size: 11px;
  padding: 6px 9px;
}
.table-wrap {
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 10px;
}
.settings {
  max-width: 600px;
}
.settings strong {
  font-size: 26px;
  color: var(--accent);
}
#notice {
  padding: 12px 16px;
  border: 1px solid #eac37455;
  color: var(--amber);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 200px 1fr;
  }
  main {
    padding: 28px;
  }
  .stats article {
    padding: 16px;
  }
  .stats small {
    font-size: 9px;
  }
  header {
    align-items: flex-start;
  }
}
@media (max-width: 750px) {
  .shell {
    display: block;
  }
  aside {
    position: static;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }
  .brand {
    font-size: 14px;
  }
  .brand b {
    font-size: 28px;
  }
  .nav-label,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 18px;
  }
  nav button {
    padding: 9px;
    white-space: nowrap;
  }
  nav button span {
    font-size: 12px;
  }
  nav em {
    display: none;
  }
  main {
    padding: 22px 16px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats article:nth-child(2) {
    border-right: 0;
  }
  .stats article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--edge);
  }
  h1 {
    font-size: 26px;
  }
  header {
    flex-direction: column;
    align-items: stretch;
  }
  header > .primary {
    align-self: flex-start;
  }
  footer {
    flex-direction: column;
  }
}
