:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: #0b0f14;
  color: #e6edf3;
}

a {
  color: inherit;
}

.page {
  min-height: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(16, 23, 34, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(230, 237, 243, 0.08);
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signedin {
  text-align: right;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(230, 237, 243, 0.08);
  background: rgba(230, 237, 243, 0.03);
}

.signedin__label {
  font-size: 11px;
  color: rgba(230, 237, 243, 0.64);
}

.signedin__user {
  font-size: 12px;
  font-weight: 700;
}

.brand__title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand__subtitle {
  font-size: 12px;
  color: rgba(230, 237, 243, 0.64);
}

.content {
  padding: 18px 16px 36px;
  max-width: 1200px;
  margin: 0 auto;
}

.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 8px 0 18px;
}

.pagehead__title {
  font-size: 20px;
  font-weight: 700;
}

.pagehead__subtitle {
  font-size: 12px;
  color: rgba(230, 237, 243, 0.64);
}

.card {
  background: rgba(16, 23, 34, 0.78);
  border: 1px solid rgba(230, 237, 243, 0.08);
  border-radius: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.item {
  overflow: hidden;
}

.item__top {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 14px;
}

.item__media {
  width: 112px;
}

.item__img {
  width: 112px;
  height: 112px;
  border-radius: 12px;
  border: 1px solid rgba(230, 237, 243, 0.08);
  object-fit: cover;
  display: block;
}

.item__img--placeholder {
  display: grid;
  place-items: center;
  background: rgba(230, 237, 243, 0.04);
  color: rgba(230, 237, 243, 0.6);
  font-size: 12px;
}

.item__title {
  font-weight: 700;
  margin-bottom: 8px;
}

.muted {
  color: rgba(230, 237, 243, 0.6);
  font-weight: 600;
}

.item__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(230, 237, 243, 0.10);
  background: rgba(230, 237, 243, 0.04);
}

.pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(230, 237, 243, 0.12);
  background: rgba(230, 237, 243, 0.03);
  color: inherit;
  cursor: pointer;
  font-weight: 700;
}

.pill--danger {
  border-color: rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.10);
}

.inline {
  display: inline;
  margin: 0;
}

.kv {
  display: grid;
  gap: 6px;
}

.kv__row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid rgba(230, 237, 243, 0.06);
}

.kv__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.kv__k {
  font-size: 12px;
  color: rgba(230, 237, 243, 0.64);
}

.kv__v {
  font-size: 13px;
}

.tag {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(88, 166, 255, 0.14);
  border: 1px solid rgba(88, 166, 255, 0.25);
}

.notes {
  white-space: pre-wrap;
  margin: 0;
  font-family: inherit;
  color: rgba(230, 237, 243, 0.9);
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(230, 237, 243, 0.04);
  border: 1px solid rgba(230, 237, 243, 0.08);
}

.link {
  margin-left: 10px;
  background: transparent;
  border: 0;
  color: rgba(88, 166, 255, 0.9);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.search__input {
  width: min(44vw, 420px);
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(230, 237, 243, 0.10);
  background: rgba(11, 15, 20, 0.45);
  color: inherit;
}

.search--menu .search__input {
  width: 100%;
  max-width: 100%;
}

.btn {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(230, 237, 243, 0.12);
  background: rgba(230, 237, 243, 0.04);
  color: inherit;
  cursor: pointer;
  font-weight: 600;
}

.btn--primary {
  background: rgba(88, 166, 255, 0.22);
  border-color: rgba(88, 166, 255, 0.35);
}

.btn--ghost {
  background: transparent;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(230, 237, 243, 0.12);
  background: rgba(230, 237, 243, 0.03);
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn__bars {
  width: 18px;
  height: 2px;
  background: rgba(230, 237, 243, 0.88);
  position: relative;
  border-radius: 999px;
}

.icon-btn__bars::before,
.icon-btn__bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: rgba(230, 237, 243, 0.88);
  border-radius: 999px;
}

.icon-btn__bars::before {
  top: -6px;
}

.icon-btn__bars::after {
  top: 6px;
}

.icon-btn__x {
  width: 16px;
  height: 16px;
  position: relative;
}

.icon-btn__x::before,
.icon-btn__x::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: rgba(230, 237, 243, 0.88);
  border-radius: 999px;
  transform-origin: center;
}

.icon-btn__x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.icon-btn__x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Side menu */
.sidemenu {
  position: fixed;
  inset: 0 auto 0 0;
  width: 300px;
  transform: translateX(-105%);
  transition: transform 160ms ease;
  z-index: 30;
}

.sidemenu--open {
  transform: translateX(0);
}

.sidemenu__inner {
  height: 100%;
  padding: 14px;
  background: rgba(16, 23, 34, 0.95);
  border-right: 1px solid rgba(230, 237, 243, 0.08);
  display: flex;
  flex-direction: column;
}

.sidemenu__title {
  font-weight: 800;
  margin: 8px 0 14px;
}

.sidemenu__section {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(230, 237, 243, 0.08);
  background: rgba(230, 237, 243, 0.03);
  margin-bottom: 10px;
}

.sidemenu__spacer {
  flex: 1;
}

.sidemenu__hr {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(230, 237, 243, 0.10);
  margin: 8px 0 10px;
}

.sidemenu__bottom {
  margin: 0;
}

.sidemenu__bottom .btn {
  width: 100%;
}

.sidemenu__label {
  font-size: 12px;
  color: rgba(230, 237, 243, 0.64);
}

.sidemenu__value {
  font-size: 13px;
  margin-top: 4px;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 20;
}

/* Modal */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(720px, calc(100vw - 24px));
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.62);
}

.modal__card {
  padding: 0;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(230, 237, 243, 0.10);
  background: rgba(16, 23, 34, 0.96);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(230, 237, 243, 0.08);
}

.modal__title {
  font-weight: 800;
}

.modal__body {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(230, 237, 243, 0.08);
}

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 680px) {
  .cols {
    grid-template-columns: 1fr;
  }

  .item__top {
    grid-template-columns: 1fr;
  }

  .item__media {
    width: 100%;
  }

  .item__img {
    width: 100%;
    height: 160px;
  }

  .search__input {
    width: 42vw;
  }

  .kv__row {
    grid-template-columns: 90px 1fr;
  }
}

.field__label {
  font-size: 12px;
  color: rgba(230, 237, 243, 0.70);
  margin-bottom: 6px;
}

.field__hint {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(230, 237, 243, 0.55);
}

.input,
.textarea {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(230, 237, 243, 0.10);
  background: rgba(11, 15, 20, 0.45);
  color: inherit;
}

.textarea {
  resize: vertical;
}

.auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth__card {
  width: min(420px, 100%);
  padding: 18px;
}

.auth__title {
  font-weight: 900;
  font-size: 20px;
}

.auth__subtitle {
  margin-top: 6px;
  color: rgba(230, 237, 243, 0.64);
  font-size: 13px;
  margin-bottom: 14px;
}

.form {
  display: grid;
  gap: 12px;
}

.alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(248, 81, 73, 0.35);
  background: rgba(248, 81, 73, 0.14);
  color: rgba(255, 220, 220, 0.95);
  font-size: 13px;
  margin-bottom: 12px;
}

.empty {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(230, 237, 243, 0.16);
  color: rgba(230, 237, 243, 0.70);
  background: rgba(230, 237, 243, 0.02);
}

.empty__title {
  font-weight: 800;
  color: rgba(230, 237, 243, 0.88);
}

.empty__subtitle {
  font-size: 13px;
  margin-top: 6px;
}
