:root {
  color-scheme: dark;
  --bg: #0e110d;
  --panel: #181e15;
  --line: #30392a;
  --text: #edf1e6;
  --muted: #9da993;
  --lime: #d3fa78;
  --red: #ff9a93;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--lime);
}
button {
  border: 1px solid var(--line);
  background: #222b1b;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 17px;
  min-height: 43px;
}
.primary {
  background: var(--lime);
  color: #14200b;
  border-color: var(--lime);
  font-weight: 650;
}
.danger {
  color: var(--red);
  border-color: #6e3934;
  background: #321f1a;
}
.subtle {
  background: transparent;
}
.brand {
  background: var(--lime);
  color: #11180c;
  border-radius: 12px;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -3px;
  width: 47px;
  height: 43px;
  display: grid;
  place-items: center;
  transform: rotate(-6deg);
  border: 4px solid var(--bg);
}
.brand span {
  display: none;
}
.login {
  width: min(420px, calc(100% - 36px));
  margin: 12vh auto;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}
.login h1 {
  font-size: 38px;
  letter-spacing: -1.5px;
  margin: 24px 0 8px;
}
.login p {
  color: var(--muted);
  line-height: 1.6;
}
.login .primary {
  width: 100%;
  margin-top: 8px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  padding: 32px 20px;
  border-right: 1px solid var(--line);
  background: #11160e;
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 3;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -1px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-item {
  background: transparent;
  text-align: left;
  border: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  font-size: 14px;
}
.nav-item span {
  width: 20px;
  font-size: 18px;
}
.nav-item.selected {
  color: var(--lime);
  background: #27321b;
}
.sidebar footer {
  margin-top: auto;
  display: grid;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.workspace {
  margin-left: 238px;
  padding: 32px 42px 60px;
  max-width: 1800px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.topbar small {
  color: var(--muted);
}
.status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #bbd99a;
  background: #202d18;
  padding: 8px 12px;
  border-radius: 20px;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8e771;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 35px 0 25px;
}
.page-title h1 {
  font-size: 36px;
  letter-spacing: -1.6px;
  margin: 0 0 9px;
}
.page-title p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.page-title select {
  width: auto;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 23px;
  min-width: 0;
}
.card > small {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.card > strong {
  display: block;
  font-size: 31px;
  letter-spacing: -1px;
  margin-top: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.card.featured {
  background: #26351b;
  border-color: #566b3b;
}
.card.featured strong {
  color: var(--lime);
}
.card-note {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 13px;
  line-height: 1.5;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  margin-top: 22px;
  min-width: 0;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 20px;
  letter-spacing: -0.6px;
  margin: 0 0 9px;
}
.panel-title h2 {
  margin: 0;
}
.panel p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar input {
  flex: 1;
  min-width: 200px;
  margin: 0;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chips button {
  padding: 8px 12px;
  min-height: 34px;
  font-size: 12px;
}
.chips button.active {
  color: #18250e;
  background: var(--lime);
}
.chart {
  width: 100%;
  display: block;
  overflow: visible;
}
.chart .grid {
  stroke: #343e2c;
  stroke-dasharray: 4 5;
}
.chart text {
  fill: #99a58e;
  font-size: 11px;
}
.chart .area {
  fill: #d3fa7810;
}
.chart .line {
  stroke: var(--lime);
  stroke-width: 2.5;
  fill: none;
  stroke-linejoin: round;
}
.chart circle {
  fill: var(--lime);
  stroke: var(--panel);
  stroke-width: 2;
}
.chart circle:hover {
  r: 6;
  fill: white;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 14px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 16px 14px;
  border-bottom: 1px solid #293122;
  vertical-align: middle;
  max-width: 330px;
  overflow-wrap: anywhere;
}
td small {
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
tr:hover td {
  background: #20291b;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tag {
  display: inline-block;
  border: 1px solid #3e4c30;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 11px;
  color: #c9d9b7;
}
.tag.red {
  border-color: #73413b;
  color: var(--red);
}
.pager {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
.back {
  margin-bottom: 20px;
}
.user-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}
.user-name h2 {
  font-size: 28px;
  margin: 6px 0 12px;
}
.user-name p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
}
.user-columns {
  display: grid;
  grid-template-columns: minmax(310px, 1fr) minmax(350px, 1.2fr);
  gap: 22px;
  align-items: start;
}
.user-columns .panel {
  margin-top: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 15px;
}
label {
  display: block;
  color: #b2bea6;
  font-size: 12px;
  margin: 17px 0;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #445038;
  border-radius: 9px;
  color: var(--text);
  background: #0f150b;
  margin-top: 8px;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #bedb7a;
  outline-offset: 1px;
}
.form-grid label {
  margin: 10px 0;
}
textarea.code {
  font-family: Consolas, monospace;
  font-size: 12px;
  min-height: 340px;
}
.notice {
  background: #25311c;
  padding: 16px 18px;
  border-left: 3px solid #a0c260;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.65;
  color: #c6d7b2;
  margin: 20px 0;
}
.error {
  color: var(--red);
  font-size: 13px;
  line-height: 1.6;
}
.inventory {
  display: grid;
  gap: 9px;
}
.inventory-item {
  padding: 12px;
  background: #10160c;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.plate-text {
  display: inline-block;
  border: 2px solid #bbc4b3;
  border-radius: 6px;
  padding: 5px 9px;
  font-family: Consolas, monospace;
  font-size: 17px;
  color: #111;
  background: #edf0e8;
  letter-spacing: 1px;
  white-space: nowrap;
}
.inventory-item small {
  font-size: 11px;
  color: var(--muted);
}
details {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
summary {
  cursor: pointer;
  font-size: 14px;
  color: #d3dfc6;
}
.json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: Consolas, monospace;
  font-size: 11px;
  color: #a7b798;
  max-height: 260px;
  overflow: auto;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.catalog-grid .panel {
  margin: 0;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.toggle-row h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 5px;
}
.toggle-row small {
  font-size: 11px;
  color: var(--muted);
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.row-actions button {
  font-size: 11px;
  padding: 8px 10px;
  min-height: 36px;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}
dialog {
  color: var(--text);
  background: #1b2415;
  border: 1px solid #64794b;
  border-radius: 20px;
  width: min(520px, calc(100% - 30px));
  padding: 30px;
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #060a04c9;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin: 5px 0 20px;
}
dialog p {
  line-height: 1.65;
  color: #b7c5a8;
}
dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #10160b;
  padding: 15px;
  border-radius: 10px;
  font-size: 12px;
  color: #d2dfc5;
}
.close {
  float: right;
  border: 0;
  padding: 3px 8px;
  min-height: 30px;
  background: transparent;
  font-size: 24px;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}
.dialog-actions button {
  flex: 1;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--lime);
  color: #18220e;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 12px 50px #0007;
  z-index: 20;
  display: none;
  max-width: calc(100vw - 24px);
  font-size: 14px;
}
#toast.show {
  display: block;
}
.loading {
  color: var(--muted);
  padding: 80px 25px;
  text-align: center;
}
.broadcast-copy {
  max-width: 430px;
  white-space: pre-wrap;
  line-height: 1.6;
}
.section-gap {
  margin-top: 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (min-width: 1500px) {
  .cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .card {
    padding: 20px;
  }
  .card > strong {
    font-size: 26px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
    padding: 25px 15px;
  }
  .workspace {
    margin-left: 200px;
    padding: 26px;
  }
  .user-columns,
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 17px;
    gap: 20px;
  }
  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .nav-item {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px;
  }
  .nav-item span {
    display: none;
  }
  .sidebar footer {
    display: none;
  }
  .workspace {
    margin-left: 0;
    padding: 20px 16px 45px;
  }
  .topbar {
    padding-bottom: 18px;
  }
  .topbar small {
    font-size: 10px;
  }
  .status {
    font-size: 10px;
  }
  .page-title {
    margin: 27px 0 20px;
  }
  .page-title h1 {
    font-size: 29px;
  }
  .page-title p {
    font-size: 12px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .card {
    padding: 17px;
  }
  .card > strong {
    font-size: 26px;
  }
  .card > small {
    font-size: 11px;
  }
  .panel {
    padding: 18px;
  }
  .panel-title {
    flex-wrap: wrap;
  }
  .user-hero {
    flex-wrap: wrap;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .catalog-grid {
    gap: 16px;
  }
  .toggle-row {
    align-items: start;
  }
  .row-actions {
    flex-wrap: wrap;
    justify-content: end;
  }
  .login {
    padding: 28px;
    margin-top: 8vh;
  }
  table {
    font-size: 12px;
  }
  td,
  th {
    padding: 12px 10px;
  }
  .page-title select {
    max-width: 110px;
  }
  .notice {
    padding: 12px;
  }
  .user-columns {
    grid-template-columns: 1fr;
  }
}
