:root {
  color-scheme: light;
  --ink: #172a25;
  --muted: #65736d;
  --line: #dce5df;
  --paper: #fff;
  --canvas: #f3f6f2;
  --green: #176b52;
  --green-dark: #10533f;
  --mint: #e9f3ec;
  --blue: #e8f1fa;
  --blue-ink: #315c7b;
  --coral: #f7ebe7;
  --danger: #a7463d;
  --shadow: 0 12px 34px rgba(24, 55, 42, 0.06);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
}
.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.topbar {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-size: 19px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}
.nav a {
  text-decoration: none;
}
.nav a:hover {
  color: var(--green);
}
.button {
  display: inline-flex;
  min-height: 40px;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: white;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.button:hover {
  border-color: #98b7a5;
}
.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: white;
}
.button.primary:hover {
  background: var(--green-dark);
}
.button.danger {
  color: var(--danger);
}
.button.small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
.button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.public-main {
  padding: 50px 0 48px;
}
.public-head {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 40px;
  padding: 16px 0 48px;
}
.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}
h1 {
  margin: 12px 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
}
.lead {
  max-width: 580px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}
.route-preview {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.route-preview h2 {
  margin: 0 0 19px;
  font-size: 15px;
}
.route-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  border-top: 1px solid #edf0ed;
  font-size: 13px;
}
.route-region {
  font-weight: 700;
}
.route-destination {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.route-region.base {
  color: var(--green);
}
.route-region.rule {
  color: var(--blue-ink);
}
.section {
  padding: 25px 0 13px;
  border-top: 1px solid var(--line);
}
.section h2 {
  margin: 0 0 18px;
  font-size: 17px;
}
.section-intro {
  max-width: 760px;
  margin: -6px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.security-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.security-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  align-items: center;
  gap: 38px;
  padding: 10px 0 12px;
}
.security-copy > h2 {
  margin: 9px 0 12px;
  font-size: 23px;
}
.security-copy .section-intro {
  margin: 0 0 21px;
}
.security-points {
  grid-template-columns: 1fr;
  gap: 0;
}
.security-points > div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.security-index {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.security-points h3 {
  margin: 0 0 4px;
  font-size: 13px;
}
.security-points p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.section-note {
  margin: 16px 0 0;
  color: #849089;
  font-size: 11px;
  line-height: 1.6;
}
.security-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf4ef;
}
.security-visual img {
  display: block;
  width: 100%;
  height: auto;
}
.security-visual figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2e9b70;
  box-shadow: 0 0 0 3px #2e9b701a;
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.section-heading h2 {
  margin: 5px 0 0;
}
.section-heading .section-intro {
  max-width: 440px;
  margin: 0;
  text-align: right;
}
.platform-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.platform-item {
  display: flex;
  min-width: 0;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}
.platform-item img {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.platform-item span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  overflow-wrap: anywhere;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 30px;
  color: #7a8780;
  font-size: 11px;
  border-top: 1px solid var(--line);
}
.page-main {
  padding: 32px 0 56px;
}
.page-title {
  margin: 0 0 6px;
  font-size: 25px;
}
.page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.member-status-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.member-status-actions #openPasswordDialog {
  min-height: 42px;
}
.status-line {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: white;
  font-size: 12px;
}
.status-line.warning {
  border-color: #e6d6b8;
  color: #805c23;
  background: #fbf6e8;
}
.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.panel + .panel {
  margin-top: 16px;
}
.panel h2 {
  margin: 0 0 15px;
  font-size: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field {
  min-width: 0;
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  display: block;
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 700;
}
.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #d6e0d9;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.field input:focus,
.field select:focus {
  border-color: #78a38d;
  box-shadow: 0 0 0 3px #176b5215;
}
.field small {
  display: block;
  margin-top: 5px;
  color: #849089;
  font-size: 11px;
  line-height: 1.5;
}
.inline-form {
  display: flex;
  align-items: end;
  gap: 10px;
}
.inline-form .field {
  flex: 1;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
}
.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}
.rule-entry {
  display: grid;
  grid-template-columns: minmax(140px, 0.5fr) 1.5fr auto;
  align-items: end;
  gap: 10px;
}
.create-rule-rows {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}
.create-rule-row .button {
  min-width: 98px;
}
.create-rule-row > .button {
  min-height: 42px;
}
.rule-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}
.rule-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e6ece7;
  border-radius: 6px;
  font-size: 12px;
}
.rule-country {
  padding: 5px 7px;
  border-radius: 5px;
  color: var(--blue-ink);
  background: var(--blue);
  font-weight: 700;
}
.rule-url {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.route-card-body .rule-list {
  gap: 0;
}
.rule-list-scroll,
.rule-entry-scroll {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}
.route-card-body .rule-entry-scroll {
  margin-top: 12px;
}
.route-card-body .rule-item {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 50px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #edf0ed;
  border-radius: 0;
  font-size: 13px;
}
.route-card-body .rule-item:last-child {
  border-bottom: 0;
}
.route-card-body .rule-country {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
}
.route-card-body .rule-item .button {
  min-height: 29px;
}
.route-list {
  display: grid;
  gap: 12px;
}
.route-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
}
.route-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #edf0ed;
}
.route-card-head h3 {
  margin: 0 0 5px;
  font-size: 14px;
}
.route-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.route-default-summary {
  display: flex;
  flex: 1;
  min-width: 0;
  align-self: center;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
}
.route-default-summary > span:first-child {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.route-default-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-card-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.route-card-body {
  padding: 14px 16px;
}
.route-card-body .rule-list {
  margin-top: 0;
}
.route-link {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 13px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.switch-track {
  width: 36px;
  height: 21px;
  padding: 3px;
  border-radius: 20px;
  background: #c8d1cb;
  transition: 0.15s;
}
.switch-track::after {
  content: '';
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  transition: 0.15s;
}
.switch input:checked + .switch-track {
  background: var(--green);
}
.switch input:checked + .switch-track::after {
  transform: translateX(15px);
}
.switch input:focus-visible + .switch-track {
  outline: 3px solid #176b5230;
}
.notice {
  display: none;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--danger);
  background: #fbefec;
  font-size: 12px;
  line-height: 1.5;
}
.notice.show {
  display: block;
}
.notice.success {
  color: #276644;
  background: #eaf4ec;
}
.empty {
  padding: 25px 15px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-box {
  width: min(420px, 100%);
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}
.auth-box .brand {
  margin-bottom: 24px;
  color: var(--green);
}
.auth-box h1 {
  margin: 0 0 7px;
  font-size: 24px;
}
.auth-box > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.auth-box .field {
  margin-bottom: 14px;
}
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 8px;
}
.auth-box .captcha-refresh {
  width: 160px;
  height: 42px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.captcha-refresh img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-box .button {
  width: 100%;
  margin-top: 5px;
}
.auth-box .captcha-refresh {
  margin-top: 0;
}
.auth-footer {
  margin-top: 17px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.auth-footer a {
  color: var(--green);
}
.table-wrap {
  overflow-x: auto;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.pagination[hidden] {
  display: none !important;
}
.member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.member-days {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 13px;
}
.member-days:focus {
  border-color: #78a38d;
  outline: 3px solid #176b5215;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
th,
td {
  padding: 11px 9px;
  border-bottom: 1px solid #e9eeea;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--mint);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}
.badge.expired {
  color: #8a4c35;
  background: var(--coral);
}
.badge.disabled {
  color: #fff;
  background: #7d3933;
}
.password-dialog {
  width: min(460px, calc(100% - 28px));
  max-height: calc(100% - 32px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 22px 70px rgba(24, 55, 42, 0.2);
}
.password-dialog::backdrop {
  background: rgba(17, 35, 28, 0.42);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.dialog-heading h2 {
  margin: 5px 0 0;
  font-size: 19px;
}
.dialog-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.password-dialog .field {
  margin-top: 14px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.dialog-actions .button {
  min-width: 86px;
}
.layer-mask {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 35, 28, 0.42);
}
.layer-panel {
  width: min(520px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 22px 70px rgba(24, 55, 42, 0.2);
}
.layer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.layer-heading h2 {
  margin: 0;
  font-size: 17px;
}
.layer-heading .button {
  min-width: 32px;
  padding: 0 8px;
  font-size: 18px;
}
.layer-body {
  padding: 18px;
}
.layer-body .form-grid {
  grid-template-columns: 1fr 1fr;
}
.layer-body .form-grid > .field:last-child {
  grid-column: 1 / -1;
}
.layer-body .notice {
  display: none;
}
.layer-body .dialog-actions {
  margin-top: 16px;
}
.layer-confirm .layer-body {
  line-height: 1.6;
}
.layer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}
.layer-toast {
  position: fixed;
  z-index: 10001;
  top: 22px;
  left: 50%;
  max-width: min(560px, calc(100% - 28px));
  padding: 12px 17px;
  transform: translate(-50%, -8px);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transition:
    opacity 0.16s,
    transform 0.16s;
  font-size: 13px;
  line-height: 1.5;
}
.layer-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.layer-toast.success {
  border-color: #b8d6c2;
  color: #276644;
  background: #eff7f0;
}
.layer-toast.error {
  border-color: #e5c5bd;
  color: #963f34;
  background: #fff6f3;
}
@media (max-width: 760px) {
  .wrap {
    width: min(100% - 28px, 600px);
  }
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .member-actions {
    flex-wrap: nowrap;
    width: max-content;
  }
  .member-actions .button {
    flex: 0 0 auto;
  }
  .public-head {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-bottom: 35px;
  }
  .public-main {
    padding-top: 32px;
  }
  .security-points {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .security-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .security-points {
    gap: 0;
  }
  .security-points p {
    max-width: none;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .section-heading .section-intro {
    text-align: left;
  }
  .platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .rule-entry {
    grid-template-columns: 1fr;
  }
  .rule-item {
    grid-template-columns: 1fr auto;
  }
  .rule-url {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .create-rule-row,
  .route-card-body .rule-entry {
    grid-template-columns: 220px minmax(280px, 1fr) auto;
    min-width: 640px;
    align-items: center;
  }
  .rule-item,
  .route-card-body .rule-item {
    grid-template-columns: minmax(220px, max-content) minmax(280px, 1fr) auto;
    min-width: 680px;
    row-gap: 0;
  }
  .route-card-body .rule-country {
    max-width: none;
    white-space: nowrap;
  }
  .route-card-body .rule-url {
    grid-column: auto;
    grid-row: auto;
    white-space: nowrap;
  }
  .route-card-body .rule-item .button {
    grid-column: auto;
    grid-row: auto;
  }
  .footer {
    flex-direction: column;
    gap: 6px;
  }
}
@media (max-width: 480px) {
  .nav {
    gap: 10px;
    font-size: 12px;
  }
  .nav .button {
    min-height: 35px;
    padding: 0 10px;
  }
  .topbar {
    min-height: 62px;
  }
  h1 {
    font-size: 34px;
  }
  .lead {
    font-size: 14px;
  }
  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .platform-item {
    min-height: 60px;
    gap: 8px;
    padding: 9px;
  }
  .platform-item img {
    flex-basis: 25px;
    width: 25px;
    height: 25px;
  }
  .platform-item span {
    font-size: 11px;
  }
  .panel {
    padding: 15px;
  }
  .pagination {
    justify-content: center;
    gap: 9px;
  }
  .route-card-head {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  .route-card-head > div:first-child {
    flex: 0 0 auto;
  }
  .route-card-head h3,
  .route-card-head p {
    white-space: nowrap;
  }
  .route-default-summary {
    flex: 0 0 auto;
    width: max-content;
    padding: 0;
  }
  .route-default-url {
    flex: 0 0 auto;
    max-width: 260px;
  }
  .route-card-tools {
    flex: 0 0 auto;
    width: max-content;
    min-width: max-content;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 7px;
    overflow: visible;
  }
  .route-card-tools .switch {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .route-card-tools .button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
}
