@charset "UTF-8";
:root {
  --bg: #f3f5f9;
  --card: #fff;
  --text: #19263b;
  --muted: #68758a;
  --border: #e3e8f0;
  --primary: #245bda;
  --primary-hover: #1948b2;
  --danger: #b83236;
  --ok: #137b62;
  --sidebar: #101c31;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.6 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
input,
select,
textarea {
  border: 1px solid #d4dce7;
  border-radius: 7px;
  padding: 9px 12px;
}
input,
select,
textarea {
  background: #fff;
  color: var(--text);
  min-width: 0;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #8b96a6;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #c7d9ff;
  border-color: var(--primary);
}
button {
  cursor: pointer;
  background: #fff;
  color: #34445c;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  background: #f3f6fc;
  border-color: #a4b5ce;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
}
button.primary:hover {
  background: var(--primary-hover);
}
button.danger {
  color: var(--danger);
  border-color: #efc2c5;
  background: #fff8f8;
}
button.text-button {
  border: 0;
  background: none;
  color: var(--primary);
  padding: 4px;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a,
button,
input,
select,
summary {
  touch-action: manipulation;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}
h2 {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
  font-weight: 650;
}
h3 {
  font-size: 14px;
}
p {
  margin-bottom: 14px;
}
small {
  font-size: 12px;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.err {
  color: var(--danger);
}
.ok {
  color: var(--ok);
}
.msg {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: #7587a1;
  margin-bottom: 8px;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 12px;
  background: #fff;
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f4f7ff;
  font-size: 13px;
  letter-spacing: 1.3px;
  font-weight: 750;
  text-decoration: none !important;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #8495b1;
  font-weight: 500;
  margin-top: 2px;
}
.brand-mark {
  background: #3669e6;
  color: white;
  width: 37px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  letter-spacing: -4px;
  padding-right: 5px;
  border-radius: 10px;
  font-weight: 700;
}
.brand-mark span {
  font-size: 18px;
  transform: translateY(3px);
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #66d5ac;
  border-radius: 50%;
  margin-right: 7px;
}
/* Account entry */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 46% 54%;
}
.auth-story {
  background: var(--sidebar);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 48px 10%;
  position: relative;
  overflow: hidden;
}
.auth-story:after {
  content: "";
  width: 460px;
  height: 460px;
  border: 1px solid #233556;
  border-radius: 50%;
  position: absolute;
  right: -240px;
  bottom: 80px;
  box-shadow:
    0 0 0 80px #18284355,
    0 0 0 160px #18284333;
  pointer-events: none;
}
.auth-intro {
  margin: auto 0;
  position: relative;
  z-index: 1;
  padding: 70px 0;
}
.auth-intro .eyebrow {
  color: #8faad6;
  font-size: 12px;
  letter-spacing: 2px;
}
.auth-intro h1 {
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 20px 0;
}
.auth-intro p {
  color: #9aacc8;
  font-size: 15px;
  line-height: 1.9;
}
.protocol-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}
.protocol-tags span {
  font-size: 11px;
  border: 1px solid #33435d;
  color: #b6c8e5;
  border-radius: 5px;
  padding: 5px 10px;
}
.auth-foot {
  font-size: 11px;
  color: #8e9fba;
  position: relative;
  z-index: 1;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 7%;
  background: #fff;
}
.auth-card {
  width: 100%;
  max-width: 390px;
}
.auth-card h2 {
  font-size: 28px;
  margin: 8px 0;
}
.auth-card > .muted {
  margin-bottom: 28px;
}
.auth-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}
.auth-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 9px 2px;
  color: var(--muted);
  background: none;
}
.auth-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.auth-card .primary {
  padding: 11px 16px;
  margin-top: 5px;
}
.auth-card .primary span {
  float: right;
}
.auth-help {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  padding-top: 20px;
  margin-top: 28px;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-stack > label,
.filter-bar label,
.field-pair > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #40516a;
  font-size: 12px;
  font-weight: 550;
}
.form-stack input,
.form-stack select {
  width: 100%;
  font-size: 14px;
  font-weight: 400;
}
.input-action {
  display: flex;
  gap: 8px;
}
.input-action input {
  flex: 1;
  width: 70px;
}
.input-action button {
  white-space: nowrap;
  font-size: 12px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
/* Console shell */
.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 232px;
  background: var(--sidebar);
  color: #b1bfd5;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 27px 18px 0;
  z-index: 30;
}
.sidebar > .brand {
  padding: 0 6px;
  margin-bottom: 22px;
}
.nav-group-label {
  font-size: 10px;
  color: #8192ae;
  letter-spacing: 1.5px;
  padding: 20px 12px 10px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a8b7cd;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 13px;
  text-decoration: none;
}
.sidebar nav a > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  font-size: 18px;
  color: #7e92b2;
  line-height: 18px;
}
.sidebar nav a:hover {
  background: #1a2b45;
  color: white;
}
.sidebar nav a.active {
  background: #254b8e;
  color: #fff;
}
.sidebar nav a.active span {
  color: #bbd5ff;
}
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 24px 4px 20px;
  border-top: 1px solid #26344b;
  margin-top: 26px;
}
.sidebar-bottom button {
  background: none;
  color: #9caecb;
  border: 0;
  padding: 6px;
  font-size: 18px;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: #2a3e5e;
  color: #d6e5fb;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 600;
}
.account-name {
  flex: 1;
  min-width: 0;
}
.account-name strong {
  display: block;
  font-size: 12px;
  color: #d4dfef;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.account-name span {
  font-size: 10px;
  color: #7f91ae;
}
.workspace-wrap {
  margin-left: 232px;
  min-width: 0;
  width: calc(100% - 232px);
}
.topbar {
  height: 67px;
  background: #ffffffee;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  font-size: 12px;
}
.breadcrumb-slash {
  color: #bac4d2;
  margin: 0 13px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-actions button {
  font-size: 12px;
  padding: 6px 11px;
}
.mobile-menu {
  display: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 25px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.page-heading h1 {
  font-weight: 650;
}
.page-heading .eyebrow {
  margin-bottom: 6px;
}
#workspace {
  max-width: 1560px;
  margin: 0 auto;
  padding: 32px 36px;
  outline: 0;
}
.auto-refresh {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.auto-refresh input {
  accent-color: var(--primary);
}
.workspace-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: #8490a3;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 30px;
  letter-spacing: 0.4px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 23px;
  margin-bottom: 20px;
  min-width: 0;
  box-shadow: 0 2px 4px #172b4d03;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-heading h2 {
  margin: 0;
}
.card-heading > a,
.card-heading > .muted {
  font-size: 11px;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
}
.columns > .card {
  min-width: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  background: white;
  border: 1px solid var(--border);
  padding: 20px 22px;
  border-radius: var(--radius);
  border-top: 3px solid #d5e1f8;
}
.metric:first-child {
  border-top-color: var(--primary);
}
.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.metric-value {
  font-size: 27px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.metric-sub {
  font-size: 10px;
  color: #8894a5;
  margin-top: 9px;
}
.notice {
  padding: 12px 16px;
  border: 1px solid #d5e2fa;
  background: #edf3ff;
  color: #345c98;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 20px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.notice.warn {
  background: #fff8ea;
  border-color: #f4dfad;
  color: #9b6919;
}
.notice.error {
  background: #fff2f2;
  border-color: #f1cccc;
  color: #a43235;
}
.notice.success {
  background: #edf9f4;
  border-color: #cce8dc;
  color: #247d61;
}
.notice a {
  font-weight: 600;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 550;
  background: #eef2f7;
  color: #5b6c82;
  white-space: nowrap;
}
.pill.good {
  background: #eaf7f1;
  color: #12785a;
}
.pill.bad {
  background: #fff0f0;
  color: #ac363b;
}
.pill.warn {
  background: #fff5df;
  color: #9e6a19;
}
.pill.blue {
  background: #ecf2ff;
  color: #2c5fc5;
}
.key-value {
  border: 1px dashed #ced9e8;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  background: #f7f9fd;
  overflow-wrap: anywhere;
}
.key-value code {
  font-size: 12px;
  border: 0;
  background: none;
  padding: 0;
}
.key-card .row {
  margin-bottom: 15px;
}
.card-link {
  display: block;
  font-size: 12px;
  margin-top: 18px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.row button {
  font-size: 12px;
}
.quick-start {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.quick-start > a {
  color: var(--text);
  text-decoration: none;
}
.quick-start > a:hover strong {
  color: var(--primary);
}
.quick-start span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: #edf3ff;
  color: #3d69bb;
  font-size: 11px;
  border-radius: 7px;
  margin-right: 10px;
}
.quick-start strong {
  font-size: 13px;
}
.quick-start p {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 0;
}
.chart {
  width: 100%;
  height: 160px;
  display: block;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}
.chart-summary {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.chart-summary strong {
  color: var(--text);
  font-size: 18px;
  margin-left: 8px;
}
.empty {
  padding: 32px 16px;
  text-align: center;
  color: #8792a3;
  font-size: 12px;
}
.loading {
  height: 3px;
  background: linear-gradient(90deg, #6e9cff, #d7e4ff);
  color: transparent;
  margin: -12px 0 12px;
  animation: pulse 1.4s infinite;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}
th {
  color: #6d7b90;
  background: #f7f9fc;
  font-weight: 500;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
td {
  padding: 14px 13px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafcff;
}
td strong {
  font-size: 12px;
  font-weight: 550;
}
td small {
  display: block;
  color: #8b96a7;
  font-size: 10px;
  margin-top: 2px;
}
td button {
  font-size: 11px;
  padding: 5px 8px;
  margin-right: 5px;
}
.td-wrap {
  white-space: normal;
  min-width: 170px;
  max-width: 420px;
  overflow-wrap: anywhere;
}
.money {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar label:first-child {
  flex: 1;
  min-width: 160px;
  max-width: 400px;
}
.filter-bar label {
  font-size: 11px;
  gap: 6px;
}
.filter-bar input,
.filter-bar select {
  font-size: 12px;
}
.filter-bar button {
  font-size: 12px;
}
.table-note {
  color: #8390a3;
  font-size: 11px;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
.pager button {
  padding: 5px 10px;
  font-size: 11px;
  margin-left: 7px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.toolbar p {
  margin: 0;
  font-size: 12px;
}
.worker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.worker-card {
  margin: 0;
}
.worker-card h2 {
  font-size: 16px;
}
.worker-load-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.worker-load-toolbar label { margin: 0; }
.worker-load-toolbar select { width: auto; min-width: 125px; }
.worker-load {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-bottom: 18px;
}
.worker-load-heading { display: flex; flex-direction: column; gap: 4px; }
.worker-load-heading span, .worker-share, .worker-coverage { font-size: 12px; color: var(--muted); }
.worker-load-heading strong { font-size: 28px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.worker-share { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.worker-share progress { flex: 1; min-width: 80px; max-width: 100%; height: 8px; accent-color: #2563eb; }
.worker-coverage { margin: 10px 0 16px; }
.worker-coverage.incomplete { color: #9b5a12; }
.worker-load-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.worker-load-details dt { color: var(--muted); font-size: 11px; }
.worker-load-details dd { margin: 4px 0 0; font-size: 13px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.worker-url {
  display: block;
  color: #6c7e99;
  font-size: 11px;
  word-break: break-all;
  margin: 4px 0 18px;
}
.worker-route-label,
.worker-network span {
  font-size: 11px;
  color: var(--muted);
}
.worker-network {
  padding: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7f9fc;
}
.worker-network > div {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}
.worker-network code {
  font-size: 12px;
  overflow-wrap: anywhere;
  user-select: all;
}
.worker-network-summary {
  overflow-wrap: anywhere;
}
.worker-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.worker-details span {
  display: block;
  font-size: 10px;
  color: #8490a2;
  margin-bottom: 3px;
}
.worker-details b {
  font-size: 12px;
  font-weight: 500;
}
.node-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eef1f5;
  padding: 15px 0;
  font-size: 12px;
}
.node-line:last-child {
  border: 0;
}
.node-line > div:first-child {
  min-width: 0;
  padding-right: 16px;
}
.node-line > div:last-child {
  flex-shrink: 0;
}
.node-line small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.maintenance-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.maintenance-item:last-of-type {
  margin-bottom: 22px;
}
.maintenance-item span {
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 22px;
  background: #14243c;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px #0a173533;
  z-index: 100;
  max-width: calc(100vw - 30px);
  font-size: 13px;
}
.toast.error {
  background: #9f3038;
}
.protection-card {
  margin-bottom: 24px;
}
.protection-card .metrics {
  margin: 20px 0;
}
#captcha-dialog {
  width: min(440px, calc(100vw - 32px));
}
.captcha-picture {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.captcha-picture img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f5f8fd;
}
#captcha-answer {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
#captcha-answer::placeholder {
  text-transform: none;
  letter-spacing: normal;
}
dialog {
  width: min(520px, calc(100vw - 30px));
  max-height: 90vh;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  color: var(--text);
  box-shadow: 0 20px 100px #0d1a3444;
}
dialog::backdrop {
  background: #101b3277;
  backdrop-filter: blur(3px);
}
dialog .card-heading button {
  border: 0;
  font-size: 22px;
  padding: 0 5px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
textarea {
  width: 100%;
  resize: vertical;
  font-size: 12px;
}
#codes-output {
  margin: 0 0 10px;
  font-family: monospace;
}
code {
  font:
    12px/1.7 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  background: #f1f4f8;
  padding: 2px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
pre {
  padding: 18px;
  background: #111e33;
  color: #d6e2f6;
  border-radius: 8px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.7;
}
pre code {
  background: none;
  padding: 0;
  font: inherit;
  white-space: pre;
  overflow-wrap: normal;
}
.tiers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.tier {
  font-size: 12px;
  padding: 8px 15px;
}
.tier.active {
  background: #eef3ff;
  border-color: #4d79d5;
  color: #245bda;
}
.payment-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #84aafa;
  outline-offset: 3px;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-height: 920px) {
  .sidebar-bottom {
    margin-top: auto;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 210px;
    padding-inline: 12px;
  }
  .workspace-wrap {
    margin-left: 210px;
    width: calc(100% - 210px);
  }
  #workspace {
    padding: 26px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .metric {
    padding: 18px 15px;
  }
  .metric-value {
    font-size: 24px;
  }
  .quick-start {
    gap: 16px;
  }
  .quick-start strong {
    display: block;
    margin-top: 10px;
  }
}
@media (max-width: 1000px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .worker-grid {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 36px 9%;
  }
  .auth-intro h1 {
    font-size: 33px;
  }
  .auth-main {
    padding: 35px 8%;
  }
}
.planning-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.planning-form label { display: grid; gap: 8px; font-size: 14px; }
.planning-form input { width: 100%; min-width: 0; }
.planning-wide { grid-column: 1 / -1; }
.pricing-preview { background: #f4f7fb; border-radius: 8px; padding: 14px; font-size: 14px; line-height: 1.7; }
.capacity-result { margin-top: 24px; padding: 20px; border: 1px solid #cbdcf4; border-radius: 10px; background: #f5f9ff; }
.capacity-recommendation { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.capacity-recommendation strong { display: block; font-size: 36px; color: var(--primary); margin: 8px 0; }
.capacity-recommendation strong small { font-size: 15px; }
.capacity-recommendation p { margin-bottom: 8px; font-size: 14px; }
.capacity-result progress { width: 100%; margin-top: 14px; accent-color: var(--primary); }
.capacity-method { margin-top: 18px; font-size: 14px; line-height: 1.8; }
.capacity-method summary { cursor: pointer; }
#capacity-days progress { width: 100px; accent-color: var(--primary); }
#view-planning .card-heading { flex-wrap: wrap; }
@media (max-width: 760px) {
  .planning-form { grid-template-columns: 1fr; }
  .capacity-result { padding: 14px; }
  .sidebar {
    transform: translateX(-100%);
    width: 232px;
    box-shadow: 10px 0 30px #101a3244;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .workspace-wrap {
    margin-left: 0;
    width: 100%;
  }
  .mobile-menu {
    display: inline-block;
    border: 0;
    background: none;
    margin-right: 12px;
    padding: 5px;
    font-size: 17px;
  }
  .topbar {
    height: 60px;
    padding: 0 16px;
  }
  .top-actions {
    gap: 7px;
  }
  #updated-at {
    display: none;
  }
  #workspace {
    padding: 24px 16px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 290px;
  }
  .auto-refresh {
    font-size: 10px;
    padding-top: 5px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric-value {
    font-size: 24px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-sub {
    font-size: 9px;
  }
  .card {
    padding: 19px 16px;
  }
  .quick-start {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .quick-start strong {
    display: inline;
  }
  .quick-start p {
    margin: 5px 0 0 38px;
  }
  .workspace-footer {
    flex-direction: column;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: 0;
    padding: 25px 28px;
  }
  .auth-intro,
  .auth-foot {
    display: none;
  }
  .auth-story:after {
    display: none;
  }
  .auth-main {
    padding: 30px 26px;
    align-items: flex-start;
  }
  .auth-card h2 {
    font-size: 25px;
  }
  .auth-card > .muted {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .auth-tabs {
    margin-bottom: 22px;
  }
  .auth-help {
    margin-top: 20px;
  }
  .filter-bar label {
    flex: 1;
    min-width: 130px;
  }
  .filter-bar button {
    width: 100%;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar button {
    white-space: nowrap;
  }
  .field-pair {
    gap: 10px;
  }
  .worker-details {
    gap: 16px;
  }
  .card-heading {
    gap: 8px;
  }
  .card-heading h2 {
    font-size: 15px;
  }
}

.guide-link {
  color: var(--primary);
  font-size: 14px;
  text-decoration: none;
}
.guide-link:hover {
  text-decoration: underline;
}
.usage-guide {
  scroll-margin-top: 88px;
  min-width: 0;
}
.guide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.guide-heading h2 {
  margin-bottom: 4px;
}
.guide-heading p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.guide-badge,
.guide-tag {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  white-space: nowrap;
}
.guide-tag {
  margin-left: 8px;
  background: #eff6ff;
  color: var(--primary);
  padding: 2px 8px;
}
.guide-toolbar,
.guide-actions,
.guide-model-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.guide-toolbar label {
  font-size: 14px;
  font-weight: 600;
}
.guide-toolbar select {
  background: white;
  min-width: 170px;
}
.usage-guide button {
  background: white;
  font-size: 13px;
  padding: 7px 11px;
}
.usage-guide button.primary {
  background: var(--primary);
}
.usage-guide button:hover {
  border-color: var(--primary);
}
.usage-guide a {
  color: var(--primary);
}
.usage-guide p {
  overflow-wrap: anywhere;
}
.usage-guide .guide-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.guide-endpoints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.guide-endpoint {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.guide-endpoint > span {
  font-size: 12px;
  color: var(--muted);
}
.guide-endpoint code {
  max-width: 100%;
  font-size: 13px;
  background: none;
  border: none;
  padding: 0;
}
.guide-endpoint button {
  margin-top: auto;
}
.guide-model-row {
  font-size: 13px;
}
.guide-copy-status {
  min-height: 24px;
  margin: 8px 0;
  font-size: 13px;
  color: #047857;
}
.guide-method {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 12px;
  overflow: hidden;
}
.guide-method > summary {
  padding: 15px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  background: #f8fafc;
}
.guide-method[open] > summary {
  border-bottom: 1px solid var(--border);
}
.guide-content {
  padding: 4px 18px 18px;
}
.guide-steps {
  padding-left: 24px;
  margin: 18px 0;
}
.guide-steps li {
  padding-left: 6px;
  margin-bottom: 18px;
}
.guide-steps li::marker {
  color: var(--primary);
  font-weight: 700;
}
.guide-steps strong {
  font-size: 14px;
}
.guide-steps p {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.8;
}
kbd {
  font: inherit;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f8fafc;
  padding: 1px 5px;
  white-space: nowrap;
}
.guide-code-details {
  margin: 12px 0;
}
.guide-code-details summary {
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 10px;
}
.guide-test,
.guide-info {
  margin-top: 18px;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  font-size: 14px;
}
.guide-test p,
.guide-info p {
  margin: 8px 0;
}
.guide-test .guide-note {
  margin-bottom: 0;
}
.guide-code-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0 8px;
  flex-wrap: wrap;
}
.guide-code-heading h3 {
  margin: 0;
}
.usage-guide pre {
  max-width: 100%;
  line-height: 1.7;
}
.guide-table-wrap {
  overflow-x: auto;
}
.guide-table-wrap td {
  vertical-align: top;
  line-height: 1.7;
}
.guide-table-wrap td:first-child {
  min-width: 120px;
}
button:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
#copy-dialog {
  width: min(680px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}
#copy-dialog::backdrop {
  background: rgb(15 23 42 / 40%);
}
#copy-dialog h2 {
  margin-top: 0;
  font-size: 18px;
}
#copy-dialog p {
  font-size: 14px;
}
#copy-dialog textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: monospace;
  resize: vertical;
}

@media (max-width: 760px) {
  .guide-endpoints {
    grid-template-columns: 1fr;
  }
  .guide-heading {
    flex-wrap: wrap;
  }
  .guide-content {
    padding: 12px;
  }
  .guide-heading p {
    font-size: 12px;
  }
  .guide-toolbar button {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .sidebar {
    box-shadow: none;
  }
  .sidebar.open {
    box-shadow: 10px 0 30px #101a3244;
  }
}
.deepseek-card { margin-bottom: 24px; }
.deepseek-endpoint { border: 1px solid var(--line, #deded9); border-radius: 10px; padding: 18px; display: grid; gap: 14px; min-width: 0; }
.deepseek-endpoint h3 { margin: 0; font-size: 15px; }
.deepseek-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.deepseek-enabled { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; }
.deepseek-enabled input { width: 16px; }
.deepseek-state { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .deepseek-endpoint { padding: 12px; }
  .deepseek-endpoint .field-pair { grid-template-columns: 1fr; }
  .deepseek-actions .row { flex-wrap: wrap; }
}
