:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: #29232c;
  background: #f6f4f7;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 5vw;
  background: white;
  border-bottom: 1px solid #e5dfe6;
}
.brand {
  text-decoration: none;
  color: #29232c;
  font-size: 22px;
  font-weight: 750;
}
.brand span {
  font-size: 14px;
  font-weight: 400;
  color: #736a76;
  margin-left: 18px;
}
main {
  max-width: 1360px;
  margin: auto;
  padding: 48px 5vw;
}
h1 {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 10px 0 18px;
}
h2 {
  font-size: 24px;
}
p {
  line-height: 1.7;
}
.overline {
  color: #783451;
  font-weight: 650;
}
.subtle {
  color: #736a76;
  font-size: 13px;
}
.login {
  max-width: 480px;
  margin: 10vh auto;
}
.login form {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}
label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
input,
select,
textarea {
  border: 1px solid #d9cfda;
  border-radius: 9px;
  background: white;
  font: inherit;
  padding: 12px;
  color: inherit;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
button {
  border: 1px solid #e5dfe6;
  border-radius: 8px;
  background: white;
  color: #783451;
  padding: 11px 16px;
  font: inherit;
  cursor: pointer;
}
button:hover {
  background: #efe6ed;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: #783451;
  color: white;
  border-color: #783451;
}
.primary:hover {
  background: #43283b;
}
input:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #e0a52c;
  outline-offset: 2px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.intro .primary {
  flex-shrink: 0;
}
nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}
nav button {
  border: 0;
  background: transparent;
}
nav .selected {
  background: #efe6ed;
  color: #783451;
  font-weight: 700;
}
#filters {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
#search {
  flex: 1;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid #e5dfe6;
  border-radius: 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  background: #f2edf3;
  color: #736a76;
  font-size: 12px;
  font-weight: 600;
}
td,
th {
  padding: 15px 18px;
  border-bottom: 1px solid #f2edf3;
}
td {
  font-size: 14px;
  max-width: 400px;
  overflow-wrap: anywhere;
}
td small {
  display: block;
  color: #7c8795;
  margin-top: 5px;
}
.actions {
  white-space: nowrap;
}
.actions button {
  padding: 6px 10px;
  font-size: 12px;
  margin-right: 5px;
}
.danger {
  color: #a64134;
}
#pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}
#message {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #18385d;
  color: white;
  border-radius: 10px;
  padding: 15px 24px;
  max-width: 90vw;
  z-index: 100;
}
#message:empty {
  display: none;
}
dialog {
  border: 0;
  border-radius: 18px;
  width: min(720px, 94vw);
  max-height: 90dvh;
  padding: 28px;
  color: inherit;
  box-shadow: 0 24px 80px #16335640;
}
dialog::backdrop {
  background: #182e4c70;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input {
  width: 18px;
  height: 18px;
}
.stream {
  border: 1px solid #dce5ef;
  border-radius: 10px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.stream h3 {
  font-size: 14px;
  margin: 0;
}
footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
#form-error {
  color: #a64134;
}
#revision {
  font-size: 12px;
  color: #736a76;
}
pre {
  white-space: pre-wrap;
  max-width: 400px;
  font-size: 12px;
}
@media (max-width: 640px) {
  main {
    padding: 26px 16px;
  }
  header {
    padding: 18px 16px;
  }
  .brand span {
    display: none;
  }
  h1 {
    font-size: 26px;
  }
  .intro {
    align-items: flex-start;
  }
  .intro p {
    font-size: 13px;
  }
  #filters {
    flex-wrap: wrap;
  }
  #search {
    flex-basis: 100%;
  }
  #fields {
    grid-template-columns: 1fr;
  }
  dialog {
    padding: 20px;
  }
  td,
  th {
    padding: 12px;
  }
  .stream {
    grid-template-columns: 1fr;
  }
}
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) { button { transition: transform 120ms ease-out, background-color 150ms ease-out; } button:active:not(:disabled) { transform: scale(.98); } }

.brand img { vertical-align: middle; border-radius: 8px; margin-right: 6px; }
