:root {
  --bg: #080c11;
  --panel: #10161e;
  --line: #242e39;
  --text: #edf2f5;
  --muted: #7f8b98;
  --lime: #b8ff3f;
  --red: #ff6070;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    13px Inter,
    "Noto Sans SC",
    system-ui,
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
.hidden {
  display: none !important;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.1em;
}
.brand i {
  background: var(--lime);
  color: #071007;
  padding: 6px 8px;
  font-weight: 900;
  font-style: italic;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, #18261d, transparent 34%);
}
.login-card {
  width: min(420px, 92vw);
  padding: 42px;
  background: #0e141b;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px #0009;
}
.login-card > span {
  display: block;
  color: var(--lime);
  font-size: 9px;
  letter-spacing: 0.24em;
  margin-top: 45px;
}
.login-card h1 {
  font-size: 32px;
  margin: 13px 0 6px;
}
.login-card p {
  color: var(--muted);
  line-height: 1.7;
}
.login-card label {
  display: grid;
  gap: 8px;
  color: #aab4bd;
  font-size: 11px;
  margin-top: 20px;
}
.login-card input,
.market-form input,
.market-form select {
  background: #080d12;
  border: 1px solid #2a3541;
  color: #fff;
  padding: 13px;
  outline: 0;
}
.login-card input:focus,
.market-form input:focus {
  border-color: #779d38;
}
.login-card button,
.primary {
  width: 100%;
  border: 0;
  background: var(--lime);
  color: #071007;
  padding: 13px;
  font-weight: 800;
  margin-top: 25px;
}
.login-card > small {
  display: block;
  color: var(--red);
  min-height: 18px;
  margin-top: 12px;
}
.admin {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
aside {
  position: fixed;
  width: 230px;
  height: 100vh;
  background: #0b1016;
  border-right: 1px solid #1d2630;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
aside > small {
  color: #55616d;
  font-size: 9px;
  letter-spacing: 0.15em;
  margin: 24px 10px 12px;
}
nav {
  display: grid;
  gap: 4px;
}
nav button,
.logout {
  border: 0;
  background: transparent;
  color: #84909c;
  text-align: left;
  padding: 12px 14px;
}
nav button:hover,
nav button.active {
  background: #151d25;
  color: #fff;
}
.logout {
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: #a3adb6;
}
.admin main {
  grid-column: 2;
  min-width: 0;
}
.admin header {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  position: sticky;
  top: 0;
  background: #080c11ed;
  backdrop-filter: blur(10px);
  z-index: 8;
}
.admin header small,
.admin header b {
  display: block;
}
.admin header small {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.15em;
}
.admin header b {
  margin-top: 4px;
}
.admin-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.admin-user i,
.badge {
  font-style: normal;
  font-size: 8px;
  padding: 4px 7px;
  background: #26331f;
  color: var(--lime);
  border-radius: 10px;
}
.content {
  padding: 26px;
  max-width: 1600px;
  margin: auto;
}
.title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 22px;
}
.title h1 {
  margin: 0;
  font-size: 27px;
}
.title p {
  margin: 5px 0 0;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.stat,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
}
.stat {
  padding: 18px;
}
.stat small {
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 27px;
  margin-top: 10px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h3 {
  margin: 0;
}
.panel-body {
  padding: 18px;
}
.gap {
  height: 12px;
}
.table-wrap {
  overflow: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.table th,
.table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #1e2731;
  font-size: 11px;
}
.table th {
  color: #687481;
  font-size: 9px;
}
.btn {
  border: 1px solid #35414d;
  background: #151d25;
  color: #e7ecef;
  padding: 7px 10px;
}
.btn.green {
  background: var(--lime);
  border-color: var(--lime);
  color: #071007;
}
.btn.red {
  color: #ff8590;
}
.market-form {
  display: grid;
  grid-template-columns: 1fr 140px 120px;
  gap: 10px;
  align-items: end;
}
.market-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}
.market-form button {
  margin: 0;
}
.up {
  color: var(--lime);
}
.down,
.danger {
  color: var(--red);
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--lime);
  color: #071007;
  padding: 12px 16px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s;
  z-index: 30;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.toast.error {
  background: var(--red);
  color: #fff;
}
#menu {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 20px;
}
@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .market-form {
    grid-template-columns: 1fr 1fr;
  }
  .market-form label:first-child {
    grid-column: 1/-1;
  }
}
@media (max-width: 700px) {
  .admin {
    grid-template-columns: 1fr;
  }
  aside {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  aside.open {
    transform: none;
  }
  .admin main {
    grid-column: 1;
  }
  #menu {
    display: block;
  }
  .content {
    padding: 18px 12px;
  }
  .admin-user span {
    display: none;
  }
  .title {
    align-items: start;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .market-form {
    grid-template-columns: 1fr;
  }
  .market-form label:first-child {
    grid-column: auto;
  }
}

.about-editor-shell {
  border: 1px solid #c8d2e1;
  border-radius: 8px;
  overflow: hidden;
}

.about-editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #dce4ed;
  background: #f5f8fc;
}

.about-editor {
  min-height: 260px;
  padding: 14px;
  background: #fff;
  color: #18283e;
  overflow-wrap: anywhere;
}

.about-editor:focus {
  outline: 2px solid #1753c2;
  outline-offset: -2px;
}

.about-editor img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  height: auto;
  margin: 12px 0;
}
