:root {
  font-family: Inter, 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  color: #192d2b;
  background: #f5f7f6;
  font-size: 100%;
  --ink: #172e2a;
  --muted: #536761;
  --green: #256849;
  --line: #dce4e0;
  --side: #172e2b;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-width: 300px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
select,
summary {
  cursor: pointer;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
:focus-visible {
  outline: 3px solid #4e9f80;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
p,
dl,
dd {
  margin: 0;
}
h1 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -0.045em;
}
h2 {
  font-size: 1.075rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.icon {
  width: 1.16rem;
  height: 1.16rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
input,
select,
textarea {
  color: var(--ink);
  background-color: #fff;
  border: 1px solid #c9d5cf;
  border-radius: 7px;
  padding: 0.58rem 0.75rem;
  min-height: 2.55rem;
  min-width: 0;
  max-width: 100%;
}
select {
  appearance: none;
  padding-right: 2.15rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #536761 50%),
    linear-gradient(135deg, #536761 50%, transparent 50%);
  background-position:
    calc(100% - 16px) center,
    calc(100% - 11px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
textarea {
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: #74827b;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  font-size: 1.17rem;
  font-weight: 680;
  letter-spacing: -0.035em;
  color: #fff;
  white-space: nowrap;
}
.brand img {
  width: 2.4rem;
  height: 2.4rem;
}
.brand small {
  display: block;
  font-size: 0.77rem;
  font-weight: 450;
  letter-spacing: 0.08em;
  color: #b2c9bc;
}
.login-stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: #eff4f0;
}
.login-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(54rem, 100%);
  overflow: hidden;
  border-radius: 17px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 18px 65px #1b382716;
}
.login-cover {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 29rem;
  padding: 2.3rem;
  background-color: var(--side);
  background-image:
    linear-gradient(#b2d9c00b 1px, transparent 1px), linear-gradient(90deg, #b2d9c00b 1px, transparent 1px);
  background-size: 28px 28px;
  color: white;
}
.login-cover .brand small {
  margin-left: -0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0;
}
.cover-art {
  position: absolute;
  left: 48%;
  top: 43%;
  width: 10.5rem;
  height: 10.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.3rem;
  transform: translate(-50%, -50%) rotate(-18deg) skewY(4deg);
}
.cover-art i {
  background: #70b68c;
  border: 1px solid #c3f7d3;
  border-radius: 7px;
  box-shadow: -4px 6px 0 #3b7057;
}
.cover-art i:first-child {
  grid-column: 2;
}
.cover-art i:nth-child(2) {
  grid-row: 2;
}
.cover-art i:nth-child(3),
.cover-art i:nth-child(4) {
  grid-row: 2;
  background: #92e5b7;
}
.cover-art i:last-child {
  grid-column: 2;
  grid-row: 3;
}
.cover-caption {
  position: relative;
}
.cover-caption p {
  margin-top: 0.7rem;
  color: #c1d8cb;
  font-size: 0.93rem;
}
.login-form {
  padding: clamp(2rem, 5vw, 3.6rem);
  align-self: center;
  display: grid;
}
.login-form h2 {
  font-size: 1.55rem;
  margin-bottom: 1.8rem;
}
.login-form label {
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  font-weight: 620;
}
.login-form .btn {
  margin-top: 1.35rem;
}
.login-form .error {
  margin-top: 0.8rem;
}
.shell {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  min-height: 100svh;
}
.sidebar {
  background: var(--side);
  color: #c4d4cc;
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1rem 1rem;
}
.sidebar .brand {
  padding: 0 0.48rem 2.5rem;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.9rem;
  padding: 0.55rem 0.9rem;
  border-radius: 7px;
  font-size: 0.95rem;
}
.nav-link:hover,
.icon-button:hover {
  background: #ffffff0e;
  color: #fff;
}
.nav-link.active {
  color: #cdf5dc;
  background: #2b4c40;
  font-weight: 630;
}
.nav-link.active .icon {
  color: #9cdeb2;
}
.account {
  margin-top: auto;
  padding: 1.15rem 0.2rem 0.25rem;
  border-top: 1px solid #ffffff20;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.account strong,
.account small {
  display: block;
}
.account strong {
  font-size: 0.88rem;
  color: #f1f7f3;
}
.account small {
  color: #acc4b6;
  font-size: 0.77rem;
}
.avatar {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: #38594a;
  color: #d0f3d8;
  font-size: 0.88rem;
}
.icon-button {
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: inherit;
  padding: 0.55rem;
  border-radius: 6px;
  margin-left: auto;
}
.workspace {
  min-width: 0;
}
.topbar {
  min-height: 4.35rem;
  background: white;
  padding: 0.7rem clamp(1rem, 3.2vw, 3.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.crumb,
.game-picker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.crumb span {
  color: #a5b3ab;
}
.crumb b {
  font-weight: 550;
  color: var(--ink);
}
.game-picker select {
  min-height: 2.25rem;
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
  font-weight: 580;
}
#content {
  padding: clamp(1.2rem, 3.2vw, 3.4rem);
  max-width: 106rem;
  margin: 0 auto;
}
.page,
.compose {
  display: grid;
  gap: 1.45rem;
  min-width: 0;
}
.page-heading,
.panel-head,
.form-foot,
.pager,
.spread,
.save-row,
.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}
.page-heading p {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid #cbd6cf;
  border-radius: 7px;
  padding: 0.55rem 0.9rem;
  min-height: 2.55rem;
  font-size: 0.9rem;
  font-weight: 560;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: #eef4ef;
  border-color: #90a69a;
}
.btn.primary {
  background: #236b4b;
  color: white;
  border-color: #236b4b;
}
.btn.primary:hover:not(:disabled) {
  background: #195638;
}
.btn.danger {
  background: #a63036;
  border-color: #a63036;
  color: #fff;
}
.btn.danger:hover:not(:disabled) {
  background: #81292e;
}
.btn.danger-outline {
  color: #96343b;
  border-color: #dfbfc2;
}
.btn.small,
.panel-head select {
  min-height: 2rem;
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
  font-size: 0.875rem;
}
.text-link,
.id-link,
.item-link {
  color: var(--green);
}
.text-link {
  font-size: 0.88rem;
  white-space: nowrap;
}
.text-link:hover,
.id-link:hover,
.item-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.item-link {
  font-weight: 620;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 3px #203e2904;
}
.metric {
  min-width: 0;
  padding: 1.15rem 1.2rem;
  transition: border-color 0.15s;
}
.metric:hover {
  border-color: #84ac94;
}
.metric strong {
  display: block;
  margin-top: 0.7rem;
  font-size: 2.15rem;
  letter-spacing: -0.05em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.metric-label {
  font-size: 0.9rem;
  color: var(--muted);
}
.glyph {
  display: inline-grid;
  place-items: center;
  height: 2.05rem;
  width: 2.05rem;
  border-radius: 8px;
  flex: none;
}
.teal .glyph,
.badge.green {
  background: #e4f4e9;
  color: #286943;
}
.blue .glyph,
.badge.blue {
  background: #e6effc;
  color: #3c638f;
}
.amber .glyph,
.badge.amber {
  background: #fcf0da;
  color: #855619;
}
.violet .glyph {
  background: #f1ebfb;
  color: #765397;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(13rem, 1fr);
  gap: 1rem;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.panel {
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--line);
  min-height: 3.75rem;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 0.85rem 1.15rem;
  vertical-align: middle;
}
th {
  background: #f7f9f7;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 550;
  font-size: 0.875rem;
}
td {
  border-top: 1px solid #e9eeea;
  overflow-wrap: anywhere;
}
tbody tr:hover {
  background: #fafcf9;
}
.id-link {
  display: inline-block;
  max-width: 17rem;
}
.mono,
pre {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  overflow-wrap: anywhere;
}
.mono {
  font-size: 0.85rem;
}
.row-title {
  display: grid;
  gap: 0.2rem;
}
.row-title .mono {
  color: var(--muted);
  font-size: 0.8rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  white-space: nowrap;
  padding: 0.13rem 0.5rem;
  font-size: 0.875rem;
}
.badge.gray {
  color: #55615e;
  background: #edf0ee;
}
.badge.red {
  color: #923e41;
  background: #fbe9e9;
}
.channel-list,
.form-fields,
.pad {
  padding: 1.15rem 1.25rem;
}
.channel-list {
  display: grid;
  gap: 1.25rem;
}
.channel-list a {
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
}
meter {
  appearance: none;
  display: block;
  width: 100%;
  height: 0.45rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 0;
  background: #e9efea;
}
meter::-webkit-meter-bar {
  height: 0.45rem;
  background: #e9efea;
  border: 0;
  border-radius: 1rem;
}
meter::-webkit-meter-optimum-value {
  background: #70a989;
  border-radius: 1rem;
}
meter::-moz-meter-bar {
  background: #70a989;
  border-radius: 1rem;
}
.empty {
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  gap: 0.7rem;
  font-size: 0.92rem;
}
.empty .icon {
  width: 1.65rem;
  height: 1.65rem;
  color: #849b8a;
}
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 1rem 1.15rem;
}
.filters select,
.filters input {
  font-size: 0.9rem;
}
.search {
  display: flex;
  align-items: center;
  position: relative;
  min-width: min(16rem, 100%);
  flex: 1;
}
.search input {
  width: 100%;
  padding-left: 2.4rem;
}
.search .icon {
  position: absolute;
  left: 0.75rem;
  color: #77877c;
}
.pager,
.form-foot {
  padding: 0.9rem 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.pager {
  border-top: 1px solid var(--line);
}
.facts {
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.15rem 2rem;
}
.facts dt,
.save-row small,
.hint,
.muted,
.delivery-counts small {
  color: var(--muted);
  font-size: 0.875rem;
}
.facts dd {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.save-row + .save-row {
  border-top: 1px solid var(--line);
  padding-top: 0.95rem;
  margin-top: 0.95rem;
}
.save-row small {
  display: block;
}
.form-fields,
.field {
  display: grid;
}
.form-fields {
  gap: 1rem;
}
.field {
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 560;
}
.field input,
.field textarea,
.field select {
  font-weight: 400;
}
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.reward-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 0.65rem;
}
.reward-row + .reward-row {
  margin-top: 0.7rem;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  font-size: 0.92rem;
  font-weight: 560;
  padding: 0 0 0.45rem;
}
.checks,
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.checks label,
.attachments span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.38rem 0.8rem;
}
.checks input {
  min-height: auto;
  accent-color: var(--green);
  width: 1rem;
  height: 1rem;
  margin: 0;
}
summary {
  color: var(--green);
  font-size: 0.9rem;
}
details[open] > summary {
  margin-bottom: 0.7rem;
}
.form-foot {
  padding: 0;
}
.mail-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.attachments {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.id-list {
  padding: 0 1.25rem 1rem;
}
.delivery-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 1.15rem 1.25rem;
  gap: 1rem;
}
.delivery-counts strong {
  display: block;
  font-size: 1.7rem;
}
.error {
  color: #8b353c;
  background: #fcf0ef;
  border: 1px solid #efc8c5;
  padding: 0.75rem 1rem;
  border-radius: 7px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.loading {
  color: var(--muted);
}
dialog {
  color: var(--ink);
  width: min(42rem, calc(100% - 2rem));
  max-height: 85svh;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.55rem;
  box-shadow: 0 20px 80px #122b2633;
}
dialog::backdrop {
  background: #122a2585;
}
#modal-inner {
  display: grid;
  gap: 1rem;
}
#modal-inner .facts {
  background: #f5f8f5;
  border-radius: 8px;
  margin-top: 1rem;
}
#modal-inner > .actions {
  justify-content: flex-end;
}
pre {
  max-height: 55vh;
  overflow: auto;
  white-space: pre-wrap;
  padding: 1rem;
  color: #1d4537;
  background: #f4f7f4;
  border-radius: 7px;
  font-size: 0.88rem;
}
#toast {
  position: fixed;
  z-index: 5;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: #1e3930;
  color: #fff;
  border-radius: 8px;
  padding: 0.72rem 1.15rem;
  box-shadow: 0 5px 20px #203c3228;
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .channel-list {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }
  .metric {
    padding: 1rem;
  }
}
@media (max-width: 800px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 0.7rem 1rem 0.35rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
  }
  .sidebar .brand {
    padding: 0;
    font-size: 1rem;
  }
  .sidebar .brand img {
    width: 2rem;
    height: 2rem;
  }
  .sidebar .brand small {
    display: none;
  }
  .sidebar nav {
    order: 3;
    flex: 0 0 100%;
    flex-direction: row;
    overflow-x: auto;
  }
  .nav-link {
    padding: 0.4rem 0.55rem;
    min-height: 2.4rem;
    font-size: 0.875rem;
    gap: 0.35rem;
    white-space: nowrap;
  }
  .account {
    margin: 0;
    border: 0;
    padding: 0;
  }
  .account .avatar,
  .account small {
    display: none;
  }
  .topbar {
    min-height: 3.6rem;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .login-card {
    max-width: 28rem;
    grid-template-columns: 1fr;
  }
  .login-cover {
    min-height: 11rem;
    padding: 1.4rem 1.6rem;
  }
  .cover-art {
    left: 84%;
    top: 48%;
    width: 5rem;
    height: 5rem;
  }
  .cover-caption h1 {
    font-size: 1.4rem;
  }
}
@media (max-width: 520px) {
  .nav-link {
    flex: 1;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.84rem;
  }
  .sidebar nav {
    gap: 0;
  }
  .sidebar {
    padding-inline: 0.65rem;
  }
  .crumb {
    display: none;
  }
  .topbar {
    justify-content: flex-end;
  }
  .game-picker {
    flex: 1;
    justify-content: space-between;
  }
  #content {
    padding: 1.1rem 0.8rem;
  }
  .page,
  .compose {
    gap: 1rem;
  }
  .metrics {
    gap: 0.6rem;
  }
  .metric-label {
    font-size: 0.875rem;
    gap: 0.15rem;
  }
  .metric {
    padding: 0.75rem;
  }
  .glyph {
    height: 1.6rem;
    width: 1.6rem;
  }
  .metric strong {
    font-size: 1.75rem;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  .form-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .search {
    flex-basis: 100%;
  }
  th,
  td {
    padding: 0.7rem 0.8rem;
  }
  table {
    min-width: 30rem;
  }
  .facts {
    grid-template-columns: 1fr;
  }
}
