:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1a2938;
  background: #f5f7f9;
  font-synthesis: none;
  --teal: #087f75;
  --teal-soft: #e6f5f0;
  --line: #e7ecf0;
  --muted: #738191;
  --navy: #132c37;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:active {
  transform: translateY(1px);
}
a {
  color: var(--teal);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.8;
}
code,
pre,
.mono {
  font-family: Consolas, monospace;
}
pre {
  background: #152c37;
  color: #e2eee9;
  padding: 22px;
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
  font-size: 13px;
}
code {
  font-size: 0.95em;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--teal);
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}
.primary,
.secondary,
.danger {
  border-radius: 7px;
  padding: 11px 18px;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.primary {
  background: var(--teal);
  color: white;
}
.primary:hover {
  background: #066a62;
}
.secondary {
  background: white;
  border-color: #dfe5e9;
  color: #40515f;
}
.secondary:hover {
  background: #f0f5f5;
}
.danger {
  background: #fff2f2;
  color: #bc4242;
  border-color: #f2d4d4;
}
.text-button {
  background: none;
  border: 0;
  color: var(--teal);
  padding: 5px;
  font-size: 12px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #dce3e8;
  border-radius: 7px;
  padding: 11px 12px;
  background: white;
  color: #203342;
  margin-top: 8px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a7d6ce;
  border-color: var(--teal);
}
textarea {
  min-height: 85px;
}
label {
  display: block;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 18px;
}
label small {
  font-weight: 400;
  display: block;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spread {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 18px;
}
.error {
  color: #c33d45;
  font-size: 13px;
}
.error:empty {
  display: none;
}
.notice {
  background: #eff8f5;
  border: 1px solid #d6ebe4;
  border-radius: 8px;
  padding: 14px 17px;
  line-height: 1.8;
  color: #37695e;
  font-size: 13px;
  margin-bottom: 20px;
}
.warning {
  background: #fff8ea;
  color: #89652a;
  border-color: #f0e2c7;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-intro {
  background: var(--navy);
  color: white;
  padding: 70px max(45px, 8vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: inherit;
}
.logo {
  display: inline-grid;
  place-items: center;
  background: #57c7ab;
  color: #153b3c;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 25px;
}
.login-intro .wordmark {
  margin-bottom: 100px;
}
.login-intro .eyebrow {
  color: #6ed0b7;
}
.login-intro h1 {
  font-size: 52px;
  line-height: 1.3;
  letter-spacing: -2px;
  margin: 12px 0 28px;
}
.login-intro p {
  color: #a8bdc7;
  font-size: 15px;
  line-height: 2;
}
.login-features {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 45px;
  color: #b9cfd5;
  font-size: 12px;
}
.login-features span:before {
  content: "✓";
  color: #6dd1b6;
  margin-right: 8px;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: min(380px, calc(100% - 48px));
  padding: 40px 0;
}
.login-card h2 {
  font-size: 27px;
  margin-bottom: 12px;
}
.login-card label {
  margin-top: 34px;
}
.login-card .primary {
  width: 100%;
  justify-content: space-between;
  margin: 7px 0 16px;
}
.shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: var(--navy);
  color: #bacbd2;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.sidebar .wordmark {
  font-size: 23px;
  color: white;
  padding: 0 8px;
}
.edition {
  border: 1px solid #3a505c;
  font-size: 10px;
  padding: 3px 5px;
  border-radius: 4px;
  letter-spacing: 0;
  font-weight: 400;
  color: #9eb7bd;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  margin: 46px 18px 15px;
  color: #718e9b;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.sidebar nav button {
  border: 0;
  background: transparent;
  text-align: left;
  color: #a7bdc7;
  padding: 14px 17px;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.sidebar nav button span {
  font-size: 20px;
  width: 20px;
  line-height: 16px;
}
.sidebar nav button:hover {
  background: #1b3642;
}
.sidebar nav button.active {
  background: #244943;
  color: #b2eddb;
}
.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 20px 10px 0;
  font-size: 11px;
  color: #8ba7b3;
  border-top: 1px solid #28424e;
}
.sidebar-footer .text-button {
  margin-left: auto;
  color: #a9c2cc;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: #67ccb1;
  border-radius: 50%;
}
.shell main {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 70px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: white;
  color: #7d8b98;
  font-size: 12px;
}
.topbar-tag {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 6px 9px;
  border-radius: 5px;
}
.main-content {
  padding: 34px 36px;
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.page-heading .muted {
  font-size: 13px;
  margin-bottom: 0;
}
.page-heading .eyebrow {
  margin-bottom: 9px;
}
.page-heading .secondary {
  font-size: 12px;
}
.main-footer {
  display: flex;
  justify-content: space-between;
  color: #9aa7b2;
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding: 20px 36px;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filters label {
  margin: 0;
  flex: 1;
  min-width: 140px;
  font-size: 11px;
  color: #6e8090;
}
.filters input,
.filters select {
  font-size: 12px;
  padding: 9px;
}
.filters .secondary {
  padding: 9px 16px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 10px;
  position: relative;
}
.metric.featured {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.metric-label {
  font-size: 12px;
  color: #7a8997;
  margin-bottom: 18px;
}
.featured .metric-label {
  color: #bae1d8;
}
.metric-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
}
.metric-note {
  font-size: 10px;
  color: #8d9aa5;
  margin-top: 14px;
}
.featured .metric-note {
  color: #a7d8cc;
}
.metric-icon {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 18px;
  opacity: 0.35;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.panel-head {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f3f5;
  gap: 12px;
}
.panel-head h3 {
  margin: 0;
}
.panel-head p {
  margin: 5px 0 0;
  font-size: 11px;
}
.panel-body {
  padding: 24px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.toolbar p {
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  background: #fafbfc;
  color: #8895a1;
  font-weight: 500;
  font-size: 11px;
  padding: 14px 21px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 17px 21px;
  border-bottom: 1px solid #f0f3f5;
  line-height: 1.6;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td .muted {
  font-size: 10px;
  margin-top: 4px;
}
td.actions {
  white-space: nowrap;
}
td strong {
  font-weight: 600;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 5px;
  white-space: nowrap;
  background: #f0f3f6;
  color: #728390;
}
.badge.good {
  background: #e8f6ef;
  color: #27815c;
}
.badge.wait {
  background: #fff4db;
  color: #af832c;
}
.badge.bad {
  background: #ffebec;
  color: #bf555b;
}
.empty {
  padding: 45px 25px;
  text-align: center;
  color: #8b9ba7;
  line-height: 1.9;
}
.empty strong {
  display: block;
  color: #516675;
  font-size: 15px;
  margin-bottom: 6px;
}
.empty-icon {
  font-size: 30px;
  color: #9ec7bd;
  margin-bottom: 12px;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.channel-card {
  padding: 24px;
}
.channel-card h3 {
  margin: 0;
  font-size: 18px;
}
.channel-card .channel-icon {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  background: var(--teal-soft);
  color: var(--teal);
  border-radius: 11px;
  font-size: 21px;
}
.channel-card p {
  font-size: 12px;
}
.channel-card .channel-id {
  font-size: 10px;
  word-break: break-all;
  color: #98a6b0;
  margin: 14px 0 18px;
}
.channel-bottom {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-card {
  margin-bottom: 20px;
}
.proxy-panel {
  padding: 24px;
  max-width: 760px;
}
.proxy-panel #proxy-test {
  margin-top: 16px;
}
.route-list {
  padding: 0 24px 15px;
}
.route-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.route-item .muted {
  font-size: 11px;
}
.chart {
  width: 100%;
  height: 230px;
}
.chart-label {
  font-size: 10px;
  fill: #96a4af;
}
.channel-ranking {
  padding: 7px 0 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f0f3f5;
  margin-bottom: 16px;
}
.channel-ranking:last-child {
  border: 0;
  margin: 0;
}
.channel-ranking strong {
  font-size: 13px;
}
.channel-ranking small {
  font-size: 10px;
  color: #9ba7b0;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}
.step {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.step span {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}
.step h3 {
  margin: 9px 0;
}
.step p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  color: var(--muted);
  font-size: 12px;
}
.pager button {
  font-size: 11px;
  padding: 7px 11px;
}
dialog {
  border: 1px solid #dfe7e9;
  border-radius: 14px;
  width: min(560px, calc(100% - 30px));
  padding: 0;
  box-shadow: 0 25px 100px #0c253c33;
  max-height: 90vh;
  color: #243647;
}
dialog::backdrop {
  background: #122d3b66;
  backdrop-filter: blur(3px);
}
#modal-form {
  padding: 26px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 {
  margin: 0;
  font-size: 20px;
}
.modal-header button {
  background: none;
  border: 0;
  font-size: 28px;
  color: #8fa1ac;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 15px;
}
.secret-box {
  background: #edf8f4;
  border: 1px dashed #88bcae;
  border-radius: 8px;
  padding: 18px;
  word-break: break-all;
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
  user-select: all;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #153b37;
  color: #e8fffa;
  padding: 14px 25px;
  border-radius: 9px;
  box-shadow: 0 5px 20px #0002;
  z-index: 100;
}
.checkout-body {
  min-height: 100vh;
  background: #f1f6f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.checkout-card {
  max-width: 440px;
  width: 100%;
  background: white;
  border: 1px solid #e0e9e5;
  border-radius: 18px;
  box-shadow: 0 18px 65px #1c4b3a0b;
  overflow: hidden;
  text-align: center;
}
.checkout-brand {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
}
.checkout-brand .wordmark {
  font-size: 19px;
}
.checkout-main {
  padding: 32px;
}
.checkout-main h1 {
  font-size: 21px;
  letter-spacing: 0;
  margin-top: 9px;
}
.checkout-amount {
  font-size: 45px;
  font-weight: 650;
  letter-spacing: -1px;
  margin: 20px 0;
}
.checkout-amount small {
  font-size: 21px;
  margin-right: 5px;
}
.qr-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-block;
  margin: 6px 0 13px;
}
.qr-box img {
  display: block;
  width: 216px;
  height: 216px;
}
.checkout-main .primary {
  width: 100%;
  margin: 16px 0 12px;
}
.checkout-meta {
  border-top: 1px solid var(--line);
  padding: 20px 28px;
  font-size: 11px;
  color: #8d9f9a;
  line-height: 1.8;
}
.checkout-state {
  font-size: 52px;
  margin: 22px 0;
  color: var(--teal);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1600px) {
  .main-content {
    padding-top: 45px;
  }
}
@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .channel-grid {
    grid-template-columns: 1fr;
  }
  .main-content {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
}
@media (max-width: 740px) {
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-intro {
    padding: 30px;
  }
  .login-intro .wordmark {
    margin-bottom: 30px;
  }
  .login-intro h1 {
    font-size: 36px;
  }
  .login-intro p,
  .login-features {
    display: none;
  }
  .login-card {
    padding: 35px 0;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px 18px 10px;
  }
  .sidebar .wordmark {
    font-size: 20px;
  }
  .nav-label,
  .sidebar-footer {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    margin-top: 18px;
  }
  .sidebar nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px;
  }
  .sidebar nav button span {
    display: none;
  }
  .topbar {
    height: 47px;
    font-size: 10px;
    padding: 0 18px;
  }
  .topbar-tag {
    font-size: 9px;
  }
  .main-content {
    padding: 25px 18px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading .muted {
    font-size: 11px;
    max-width: 260px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 18px;
  }
  .metric-value {
    font-size: 26px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-icon {
    display: none;
  }
  .metric-note {
    font-size: 9px;
  }
  .filters {
    gap: 9px;
  }
  .filters label {
    min-width: calc(50% - 10px);
  }
  .panel-head {
    padding: 18px;
  }
  .panel-body {
    padding: 18px;
  }
  th,
  td {
    padding: 13px 15px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .main-footer {
    padding: 18px;
  }
  .main-footer span {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar p {
    font-size: 12px;
  }
  .toolbar .primary {
    font-size: 12px;
    white-space: nowrap;
  }
  .checkout-body {
    padding: 15px;
  }
  .checkout-main {
    padding: 25px;
  }
  .channel-card {
    padding: 20px;
  }
}
