:root {
  --brand-900: #243b78;
  --brand-700: #2c5fa7;
  --brand-600: #2e68b2;
  --brand-100: #eef3fb;
  --ink: #202735;
  --muted: #737b88;
  --line: #e5e8ed;
  --surface: #ffffff;
  --canvas: #ffffff;
  --shadow: 0 16px 44px rgba(35, 55, 91, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.dashboard-loading .dashboard-shell { opacity: .55; }

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(240px, 1fr);
  align-items: stretch;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 15px rgba(35, 55, 91, .06);
}

.dashboard-brand { display: flex; align-items: center; gap: 11px; width: max-content; }
.dashboard-brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 15px;
  background: #fff;
}
.dashboard-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-brand strong { display: block; color: var(--brand-900); font-size: 21px; letter-spacing: .02em; line-height: 1.05; }
.dashboard-brand small { display: block; margin-top: 4px; color: #748099; font-size: 10px; }

.dashboard-nav { display: flex; align-items: stretch; height: 72px; }
.dashboard-nav .mobile-feedback-link { display: none; }
.dashboard-nav a { position: relative; display: grid; place-items: center; min-width: 104px; padding: 0 20px; font-size: 16px; }
.dashboard-nav a::after { position: absolute; right: 18px; bottom: 0; left: 18px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-600); content: ""; opacity: 0; transform: scaleX(.5); transition: .2s ease; }
.dashboard-nav a:hover { background: #f6f8fc; color: var(--brand-900); }
.dashboard-nav a:hover::after, .dashboard-nav a.active::after { opacity: 1; transform: scaleX(1); }
.dashboard-nav a.active { background: var(--brand-100); color: var(--brand-900); font-weight: 700; }

.dashboard-account { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.dashboard-account a, .dashboard-account button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: #536078; cursor: pointer; }
.dashboard-account a:hover, .dashboard-account button:hover { background: #f4f6fa; color: var(--brand-900); }
.dashboard-account i { font-size: 19px; }
.mobile-nav-toggle { display: none; border: 0; background: transparent; color: var(--brand-900); font-size: 28px; }

.dashboard-shell { width: min(1180px, calc(100% - 40px)); margin: 24px auto 56px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); transition: opacity .2s; }
.dashboard-titlebar { display: flex; align-items: center; justify-content: space-between; min-height: 65px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.dashboard-titlebar h1 { margin: 0; font-size: 18px; }
.dashboard-titlebar span { color: #96a098; font-size: 12px; }
.dashboard-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); }

.dashboard-sidebar { padding: 12px 0 28px; border-right: 1px solid var(--line); background: #fbfcfb; }
.dashboard-sidebar nav { padding: 0 12px; }
.dashboard-sidebar .sidebar-account-links { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.dashboard-sidebar a { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 2px 0; padding: 0 12px; border-radius: 7px; color: #4e5750; transition: .18s ease; }
.dashboard-sidebar a i { width: 20px; color: #9aa39c; font-size: 18px; text-align: center; transition: .18s ease; }
.dashboard-sidebar a:hover { background: #f2f5fa; color: var(--brand-900); }
.dashboard-sidebar a.active { background: var(--brand-100); color: var(--brand-900); font-weight: 700; }
.dashboard-sidebar a.active i { color: var(--brand-700); }

.dashboard-content { min-width: 0; padding: 28px 30px 36px; }
.content-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.eyebrow, .section-kicker { margin: 0 0 7px; color: var(--brand-700); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.content-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: var(--brand-100); color: var(--brand-900); font-size: 12px; }
.api-intro { max-width: 860px; margin: 18px 0 24px; color: #626c64; line-height: 1.8; }

.account-summary { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.summary-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; min-height: 88px; padding: 16px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; }
.summary-icon { display: none; }
.summary-content { min-width: 0; }
.summary-label, .summary-card small { display: block; color: var(--muted); font-size: 12px; }
.summary-card > .summary-content > strong { display: block; margin: 6px 0 4px; font-size: 21px; }
.balance-amount { display: flex; align-items: baseline; gap: 4px; margin: 5px 0 3px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.balance-currency { color: var(--brand-600); font-size: 18px; font-weight: 700; }
.balance-amount strong { color: #172033; font-size: 30px; font-weight: 750; letter-spacing: -.035em; }
.balance-meta { display: flex !important; align-items: center; gap: 6px; line-height: 1.4; }
.balance-meta > span { color: #596579; font-variant-numeric: tabular-nums; font-weight: 600; }
.primary-button, .secondary-button, .add-printer-button, .modal-confirm { min-height: 38px; border: 0; border-radius: 5px; padding: 0 19px; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.primary-button, .modal-confirm { background: var(--brand-600); color: #fff; }
.secondary-button { background: var(--brand-100); color: var(--brand-900); }
.primary-button:hover, .secondary-button:hover, .add-printer-button:hover, .modal-confirm:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(46, 104, 178, .18); }

.notice-row { display: grid; grid-template-columns: 1fr; margin: 0 0 20px; }
.notice-row p { display: flex; align-items: center; gap: 8px; min-height: 49px; margin: 0; padding: 0 10px; border-bottom: 1px solid var(--line); color: #616a63; font-size: 12px; line-height: 1.7; }
.notice-row p:last-child { border-bottom: 1px solid var(--line); }
.notice-row i { color: var(--brand-700); font-size: 15px; }
.notice-row strong { color: var(--brand-700); font-size: 17px; }

.developer-credentials { margin: 0 0 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.developer-credentials > header { display: flex; min-height: 94px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border-bottom: 1px solid var(--line); }
.developer-credentials h3 { margin: 0; font-size: 18px; }
.developer-credentials header p { max-width: 650px; margin: 7px 0 0; color: #697487; font-size: 12px; line-height: 1.65; }
.developer-credentials button { min-height: 38px; border: 1px solid #cdd8e7; border-radius: 5px; padding: 0 14px; background: #fff; color: var(--brand-700); cursor: pointer; font-weight: 700; }
.developer-credentials button:hover { border-color: var(--brand-600); background: #f5f8fd; }
.developer-credentials button:disabled { cursor: wait; opacity: .6; }
.developer-credentials > header .primary-button { flex: 0 0 auto; border: 0; background: var(--brand-600); color: #fff; }
.credential-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.credential-grid article { display: grid; min-width: 0; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 18px; }
.credential-grid article + article { border-left: 1px solid var(--line); }
.credential-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 8px; background: var(--brand-100); color: var(--brand-700); font-size: 19px; }
.credential-grid small { display: block; margin-bottom: 6px; color: #697487; font-size: 11px; }
.credential-grid code { display: block; overflow: hidden; color: #233752; font-family: Consolas, monospace; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.credential-grid p { margin: 6px 0 0; color: #7b8697; font-size: 10px; line-height: 1.55; }
.credential-secret { margin: 0 18px 18px; padding: 16px; border: 1px solid #b9d2f2; border-radius: 8px; background: #f4f8fe; }
.credential-secret > div:first-child strong { color: var(--brand-900); font-size: 14px; }
.credential-secret > div:first-child p { margin: 5px 0 14px; color: #64748b; font-size: 11px; }
.credential-secret dl { display: grid; gap: 8px; margin: 0; }
.credential-secret dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; }
.credential-secret dt { color: #60708a; font-size: 11px; font-weight: 700; }
.credential-secret dd { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0; }
.credential-secret code { overflow-x: auto; padding: 10px 11px; border: 1px solid #d2dfef; border-radius: 5px; background: #fff; color: #153763; font: 12px/1.45 Consolas, monospace; white-space: nowrap; }
.credential-secret button { min-height: 36px; }
.credential-message { min-height: 18px; margin: -8px 18px 14px; color: #315c91; font-size: 11px; }
.credential-message.error { color: #c03636; }

.printer-panel { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.printer-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 74px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.printer-panel h3 { margin: 0; font-size: 17px; }
.add-printer-button { display: inline-flex; align-items: center; gap: 7px; background: var(--brand-600); color: #fff; }
.printer-table-wrap { overflow-x: auto; }
.printer-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.printer-table th { height: 43px; padding: 0 14px; background: #f7f9f7; color: #6f7871; font-size: 12px; text-align: left; }
.printer-table td { height: 69px; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.printer-table tbody tr:hover { background: #fbfdfb; }
.printer-table th:first-child, .printer-table td:first-child { width: 58px; text-align: center; }
.printer-name { font-weight: 700; }
.printer-alias { color: #7a837c; }
.printer-status { display: inline-flex; align-items: center; gap: 6px; color: #687169; font-size: 12px; }
.printer-status::before { width: 7px; height: 7px; border-radius: 50%; background: #aab0ab; content: ""; }
.printer-status.online { color: var(--brand-900); }
.printer-status.online::before { background: var(--brand-600); box-shadow: 0 0 0 4px rgba(46,104,178,.12); }
.api-key-cell code { display: block; max-width: 240px; overflow: hidden; color: #273129; font-family: Consolas, monospace; font-size: 12px; text-overflow: ellipsis; }
.key-actions { display: flex; gap: 10px; margin-top: 6px; }
.key-actions button { padding: 0; border: 0; background: transparent; color: var(--brand-700); font-size: 12px; cursor: pointer; }
.key-actions button:hover { text-decoration: underline; }
.row-menu { border: 0; background: transparent; color: #8a938c; cursor: pointer; font-size: 19px; }
.printer-card-list { display: none; }
.printer-mobile-card { padding: 18px; border-bottom: 1px solid var(--line); background: #fff; }
.printer-mobile-card:last-child { border-bottom: 0; }
.printer-mobile-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.printer-mobile-number { color: var(--brand-700); font-size: 11px; font-weight: 700; }
.printer-mobile-card h4 { margin: 6px 0 4px; font-size: 17px; }
.printer-mobile-card header p { margin: 0; color: #636d78; font-size: 13px; }
.printer-mobile-key { margin-top: 16px; padding: 13px; border-radius: 7px; background: #f5f7fa; }
.printer-mobile-key > span { display: block; margin-bottom: 7px; color: #596474; font-size: 11px; font-weight: 700; }
.printer-mobile-key code { display: block; overflow-wrap: anywhere; color: #273129; font-family: Consolas, monospace; font-size: 12px; line-height: 1.6; }
.printer-mobile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.printer-mobile-actions button { min-height: 44px; padding: 0 10px; border: 1px solid #d8dee8; border-radius: 6px; background: #fff; color: var(--brand-700); cursor: pointer; font-weight: 700; }
.printer-mobile-actions button:first-child { border-color: var(--brand-600); background: var(--brand-600); color: #fff; }
.printer-mobile-actions button:active { transform: translateY(1px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(46, 104, 178, .42);
  outline-offset: 3px;
}

.feedback-content { min-height: 620px; }
.feedback-intro { max-width: 720px; margin: 18px 0 22px; color: #5f6978; line-height: 1.8; }
.feedback-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; margin-bottom: 26px; }
.feedback-contact > div { padding: 15px 17px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.feedback-contact span { display: flex; align-items: center; gap: 7px; color: #6a7483; font-size: 12px; }
.feedback-contact i { color: var(--brand-700); font-size: 16px; }
.feedback-contact strong { display: block; margin-top: 7px; color: var(--brand-900); font-size: 16px; letter-spacing: .02em; }
.feedback-form { max-width: 820px; border-top: 1px solid var(--line); }
.feedback-field { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.feedback-field label { padding-top: 12px; color: #303846; font-weight: 700; }
.feedback-field input,
.feedback-field textarea { width: 100%; border: 1px solid #cfd5df; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; transition: border-color .18s ease, box-shadow .18s ease; }
.feedback-field input { max-width: 420px; min-height: 46px; padding: 0 14px; }
.feedback-field textarea { min-height: 190px; padding: 13px 14px 34px; line-height: 1.7; resize: vertical; }
.feedback-field input::placeholder,
.feedback-field textarea::placeholder { color: #858e9b; }
.feedback-field input:focus,
.feedback-field textarea:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(46, 104, 178, .1); }
.feedback-field [aria-invalid="true"] { border-color: #c63d3d; }
.feedback-input-wrap { position: relative; }
.feedback-counter { position: absolute; right: 12px; bottom: 10px; color: #7c8592; font-size: 11px; }
.feedback-actions { display: flex; align-items: center; gap: 16px; padding: 20px 0; }
.feedback-actions button { min-width: 130px; min-height: 44px; border: 0; border-radius: 6px; background: var(--brand-600); color: #fff; cursor: pointer; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease; }
.feedback-actions button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(46, 104, 178, .18); }
.feedback-actions button:active { transform: translateY(1px); }
.feedback-actions p { margin: 0; color: var(--brand-900); }

/* API documentation */
.api-docs-open .dashboard-shell { width: min(1420px, calc(100% - 32px)); }
.api-docs-content { padding: 0; overflow: clip; }
.api-docs-layout { display: grid; grid-template-columns: 170px minmax(480px, 1fr) 350px; min-height: 760px; }
.api-docs-toc { padding: 28px 16px; border-right: 1px solid var(--line); background: #fbfcfe; }
.api-docs-toc p { margin: 0 12px 14px; color: #7a8594; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.api-docs-toc a { display: block; margin: 3px 0; padding: 10px 12px; border-left: 2px solid transparent; color: #586474; font-size: 13px; text-decoration: none; transition: .18s ease; }
.api-docs-toc a:hover { color: var(--brand-700); background: #f1f5fb; }
.api-docs-toc a.active { border-left-color: var(--brand-600); background: #edf3fb; color: var(--brand-900); font-weight: 700; }
.api-docs-main { min-width: 0; padding: 34px 38px 70px; }
.api-docs-hero, .doc-section, .security-callout { scroll-margin-top: 90px; }
.api-docs-hero h2 { margin: 4px 0 12px; color: var(--brand-900); font-size: clamp(28px, 3vw, 38px); letter-spacing: -.03em; }
.api-docs-hero > p:last-of-type { max-width: 720px; margin: 0; color: #5f6b7a; line-height: 1.8; }
.base-url { display: grid; grid-template-columns: auto minmax(0, 1fr) 38px; align-items: center; gap: 10px; margin-top: 20px; padding: 10px 12px 10px 14px; border: 1px solid #d9e3f1; border-radius: 7px; background: #f8fafd; }
.base-url span { color: #6a7686; font-size: 12px; font-weight: 700; }
.base-url code { overflow: hidden; color: var(--brand-900); font: 13px/1.5 Consolas, monospace; text-overflow: ellipsis; }
.base-url button { width: 36px; height: 36px; border: 0; border-radius: 5px; background: #e9f0fa; color: var(--brand-700); cursor: pointer; }
.security-callout { display: flex; gap: 13px; margin: 22px 0 32px; padding: 16px 18px; border: 1px solid #a9c6ee; border-left: 3px solid var(--brand-600); border-radius: 7px; background: #f4f8fe; color: #1d4f8f; }
.security-callout > i { color: var(--brand-600); font-size: 20px; }
.security-callout p { margin: 5px 0 0; color: #496785; font-size: 13px; line-height: 1.65; }
.security-callout code, .doc-copy code, .client-flow code { padding: 1px 4px; border-radius: 3px; background: rgba(28,66,123,.08); color: #173f79; font: 12px Consolas, monospace; }
.doc-section { padding: 30px 0; border-top: 1px solid var(--line); }
.doc-section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.doc-section-heading > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #cbd9ec; border-radius: 50%; color: var(--brand-700); font-size: 11px; font-weight: 800; }
.doc-section-heading p { margin: 0 0 2px; color: var(--brand-600); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.doc-section-heading h3 { margin: 0; color: #14233a; font-size: 20px; }
.quick-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--line); list-style: none; }
.quick-flow li { position: relative; min-height: 104px; padding: 18px 12px; background: #fff; color: #435064; font-size: 12px; text-align: center; }
.quick-flow li:not(:last-child)::after { position: absolute; top: 45px; right: -5px; z-index: 1; width: 9px; height: 9px; border-top: 1px solid #aab7c9; border-right: 1px solid #aab7c9; background: #fff; content: ""; transform: rotate(45deg); }
.quick-flow i { display: block; margin-bottom: 10px; color: var(--brand-600); font-size: 21px; }
.endpoint-line { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 9px 0; padding: 11px 13px; border: 1px solid #dbe3ee; border-radius: 6px; background: #f9fbfd; }
.endpoint-line b { color: #20855a; font-size: 11px; }
.endpoint-line.get b { color: #276ab6; }
.endpoint-line code { color: #1f2f47; font: 12px Consolas, monospace; }
.endpoint-line span { color: #7a8592; font-size: 11px; }
.doc-table-wrap { margin-top: 15px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-table th { padding: 11px 12px; background: #f5f7fa; color: #536071; text-align: left; white-space: nowrap; }
.doc-table td { padding: 11px 12px; border-top: 1px solid var(--line); color: #5f6977; line-height: 1.5; }
.doc-table td code { color: #143f7b; font: 11px Consolas, monospace; }
.doc-table em { display: inline-block; padding: 1px 7px; border-radius: 10px; background: #fff0f0; color: #bb3f3f; font-size: 10px; font-style: normal; font-weight: 700; }
.doc-copy { margin: 15px 0 0; color: #687383; font-size: 13px; line-height: 1.75; }
.client-flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.client-flow > div { padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.client-flow i { color: var(--brand-600); font-size: 19px; }
.client-flow strong { margin-left: 8px; color: #24344b; font-size: 13px; }
.client-flow p { margin: 9px 0 0; color: #667282; font-size: 12px; line-height: 1.65; }
.error-list { margin: 0; border-top: 1px solid var(--line); }
.error-list > div { display: grid; grid-template-columns: 54px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.error-list dt { color: var(--brand-700); font: 700 13px Consolas, monospace; }
.error-list dd { margin: 0; color: #637080; font-size: 12px; line-height: 1.6; }
.api-code-aside { padding: 28px 22px; border-left: 1px solid var(--line); background: #f7f9fc; }
.code-panel { position: sticky; top: 88px; margin-bottom: 16px; overflow: hidden; border: 1px solid #263b59; border-radius: 7px; background: #102139; box-shadow: 0 8px 22px rgba(18,37,62,.1); }
.code-panel + .code-panel { position: static; }
.code-panel header { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; border-bottom: 1px solid #29415f; background: #162b47; color: #d9e5f4; font-size: 11px; font-weight: 700; }
.code-panel header button { min-height: 30px; border: 0; background: transparent; color: #9db7d7; cursor: pointer; font-size: 11px; }
.code-panel pre { margin: 0; padding: 16px; overflow: auto; color: #d4e5f7; font: 11px/1.75 Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.support-note { display: flex; gap: 11px; padding: 15px; border: 1px solid #dbe3ef; border-radius: 7px; background: #fff; color: #31445f; }
.support-note i { color: var(--brand-600); font-size: 20px; }
.support-note p { margin: 5px 0 0; color: #6a7686; font-size: 12px; }

/* Online API debugger */
.debug-content { min-height: 720px; background: #fff; }
.debug-heading { align-items: flex-start; }
.debug-heading h2 { margin-bottom: 8px; }
.debug-heading p:last-child { margin: 0; color: #697586; font-size: 13px; line-height: 1.65; }
.debug-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; margin-top: 24px; }
.debug-form { min-width: 0; }
.debug-security-note { display: flex; gap: 10px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #c8daf2; border-radius: 7px; background: #f5f9fe; color: #315c91; }
.debug-security-note i { font-size: 17px; }
.debug-security-note p { margin: 0; font-size: 12px; line-height: 1.65; }
.debug-security-note code { color: #174d8e; font: 11px Consolas, monospace; }
.debug-form-section { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.debug-form-section > header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.debug-form-section > header > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-size: 10px; font-weight: 800; }
.debug-form-section header strong, .debug-form-section header small { display: block; }
.debug-form-section header strong { color: #22334b; font-size: 14px; }
.debug-form-section header small { margin-top: 2px; color: #87909c; font-size: 10px; }
.debug-fields-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.debug-field { min-width: 0; }
.debug-field.full + .debug-field.full { margin-top: 15px; }
.debug-field > label:first-child { display: block; margin-bottom: 7px; color: #435064; font-size: 12px; font-weight: 700; }
.debug-field input, .debug-field select { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #ccd5e0; border-radius: 6px; background: #fff; color: #26364c; font: inherit; }
.debug-field input.sr-only { width: 1px; min-height: 1px; padding: 0; border: 0; }
.debug-field input::placeholder { color: #939ba6; }
.debug-field input:focus, .debug-field select:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(46,104,178,.1); outline: 0; }
.debug-file-picker { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 14px; border: 1px dashed #b8c8dc; border-radius: 7px; background: #fbfcfe; cursor: pointer; }
.debug-file-picker > i { color: #d54e4e; font-size: 25px; }
.debug-file-picker > span { min-width: 0; flex: 1; }
.debug-file-picker strong, .debug-file-picker small { display: block; }
.debug-file-picker strong { overflow: hidden; color: #33445a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.debug-file-picker small { margin-top: 4px; color: #84909e; font-size: 10px; }
.debug-file-picker b { padding: 8px 11px; border-radius: 5px; background: #eaf1fb; color: var(--brand-700); font-size: 11px; }
.debug-confirm { display: flex; align-items: flex-start; gap: 9px; margin: 16px 2px; color: #5f6b7a; font-size: 12px; line-height: 1.5; cursor: pointer; }
.debug-confirm input { width: 17px; height: 17px; accent-color: var(--brand-600); }
.debug-actions { display: flex; align-items: center; gap: 11px; }
.debug-actions button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 6px; cursor: pointer; font-weight: 700; }
.debug-actions button[type="submit"] { background: var(--brand-600); color: #fff; }
.debug-actions button[type="submit"]:disabled { cursor: wait; opacity: .65; }
.debug-actions .debug-reset { border: 1px solid #ccd5e0; background: #fff; color: #556173; }
.debug-actions p { margin: 0 0 0 4px; color: #53647a; font-size: 12px; }
.debug-response-column { position: sticky; top: 88px; align-self: start; display: grid; gap: 14px; }
.debug-result { min-height: 340px; overflow: hidden; border: 1px solid #263b59; border-radius: 8px; background: #102139; color: #dce7f5; }
.debug-result > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid #29415f; background: #162b47; }
.debug-result header span, .debug-result header strong { display: block; }
.debug-result header span { margin-bottom: 3px; color: #769bc8; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.debug-result header strong { font-size: 13px; }
.debug-result header button { min-height: 34px; border: 0; background: transparent; color: #abc1dc; cursor: pointer; font-size: 11px; }
.debug-result header button:disabled { opacity: .35; cursor: default; }
.debug-result-state { display: grid; min-height: 250px; padding: 36px 28px; place-content: center; text-align: center; }
.debug-result-state i { margin-bottom: 13px; color: #5e82ae; font-size: 28px; }
.debug-result-state strong { font-size: 14px; }
.debug-result-state p { max-width: 260px; margin: 9px auto 0; color: #91a6bf; font-size: 11px; line-height: 1.7; }
.debug-result-meta { display: flex; justify-content: space-between; padding: 11px 16px; background: #173252; color: #8fd5ad; font-size: 11px; }
.debug-result-meta.error { color: #ffabab; }
.debug-result pre { max-height: 520px; margin: 0; padding: 17px; overflow: auto; color: #d9e7f7; font: 11px/1.75 Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.debug-return { min-height: 265px; }
.debug-return .debug-result-state { min-height: 175px; }
.debug-return pre { max-height: 360px; }

.profile-content { min-height: 690px; background: #f8fafc; }
.profile-heading { margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile-heading > div > p:last-child { margin: 7px 0 0; color: #647287; font-size: 13px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); gap: 20px; align-items: start; }
.profile-card { overflow: hidden; border: 1px solid #dce3ec; border-radius: 10px; background: #fff; box-shadow: 0 6px 20px rgba(35,55,91,.04); }
.profile-card > header { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.profile-card > header > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--brand-100); color: var(--brand-700); font-size: 18px; }
.profile-card h3, .profile-card header p { margin: 0; }
.profile-card h3 { color: #22334b; font-size: 16px; }
.profile-card header p { margin-top: 4px; color: #7a8696; font-size: 11px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; padding: 22px; }
.profile-field { display: block; min-width: 0; color: #46546a; font-size: 12px; font-weight: 700; }
.profile-field-wide { grid-column: 1 / -1; }
.profile-field > span:first-child { display: block; margin-bottom: 8px; }
.profile-field input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #26364c; font: inherit; font-weight: 400; }
.profile-field input[readonly] { background: #f3f6f9; color: #707b89; cursor: not-allowed; }
.profile-field input:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(46,104,178,.12); outline: 0; }
.profile-field small { display: block; margin-top: 7px; color: #7d8896; font-size: 10px; font-weight: 400; }
.profile-card > footer { display: flex; min-height: 70px; align-items: center; justify-content: flex-end; gap: 15px; padding: 13px 22px; border-top: 1px solid var(--line); background: #fbfcfe; }
.profile-card > footer .primary-button { min-width: 126px; }
.profile-card button:disabled { cursor: wait; opacity: .65; }
.profile-message { flex: 1; margin: 0; color: #315c91; font-size: 12px; line-height: 1.5; }
.password-fields { grid-template-columns: 1fr; }
.password-input { position: relative; display: block; margin: 0 !important; }
.password-input input { padding-right: 46px; }
.password-input button { position: absolute; top: 0; right: 0; display: grid; width: 44px; height: 44px; place-items: center; border: 0; background: transparent; color: #6c7889; cursor: pointer; }
.password-input button:focus-visible { border-radius: 5px; outline: 2px solid var(--brand-600); outline-offset: -4px; }

@media (max-width: 1080px) {
  .profile-grid { grid-template-columns: 1fr; }
  .debug-layout { grid-template-columns: 1fr; }
  .debug-response-column { position: static; }
  .debug-result { min-height: 340px; }
  .debug-result-state { min-height: 270px; }
}

@media (max-width: 1180px) {
  .api-docs-layout { grid-template-columns: 150px minmax(0, 1fr); }
  .api-code-aside { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border-top: 1px solid var(--line); border-left: 0; }
  .code-panel { position: static; margin: 0; }
  .support-note { grid-column: 1 / -1; }
}

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(24, 33, 49, .5); backdrop-filter: blur(3px); }
.dashboard-modal { position: relative; width: min(420px, 100%); padding: 34px; border-radius: 14px; background: #fff; box-shadow: 0 28px 70px rgba(0,0,0,.22); text-align: center; }
.modal-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f2f5f2; color: #59615b; cursor: pointer; }
.modal-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 16px; background: var(--brand-100); color: var(--brand-700); font-size: 25px; }
.dashboard-modal h2 { margin: 0; font-size: 23px; }
.dashboard-modal > p { margin: 10px 0 20px; color: var(--muted); line-height: 1.65; }
.amount-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amount-options button { min-height: 48px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #374039; cursor: pointer; }
.amount-options button.active { border-color: var(--brand-600); background: var(--brand-100); color: var(--brand-900); font-weight: 700; }
.custom-recharge-amount { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 12px; color: #526075; font-size: 12px; font-weight: 700; text-align: left; }
.custom-recharge-input { display: grid; min-height: 46px; grid-template-columns: 30px minmax(0, 1fr); align-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.custom-recharge-input:focus-within { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(46,104,178,.12); }
.custom-recharge-input b { color: #506078; text-align: right; }
.custom-recharge-input input { width: 100%; min-width: 0; height: 44px; padding: 0 12px 0 6px; border: 0; outline: 0; background: transparent; color: #24354d; font: inherit; font-size: 14px; }
.modal-confirm { width: 100%; margin-top: 16px; }
.dashboard-modal .modal-message { min-height: 20px; margin: 13px 0 0; color: var(--brand-900); }
.wechat-pay-panel { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.wechat-pay-panel:not([hidden]) { display: grid; justify-items: center; gap: 7px; }
.wechat-pay-qr { display: grid; width: 214px; height: 214px; place-items: center; padding: 8px; border-radius: 8px; background: #fff; box-shadow: 0 5px 18px rgba(21,49,90,.1); }
.wechat-pay-qr svg, .wechat-pay-qr img { width: 198px !important; height: 198px !important; }
.wechat-pay-panel strong { color: #1d2f49; }
.wechat-pay-panel span, .wechat-pay-panel small { color: var(--muted); font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(360px, calc(100% - 48px)); padding: 13px 18px; border-radius: 8px; background: #243b78; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.printer-point { display: block; margin-top: 5px; color: #8a94a2; font-size: 10px; }
.printer-status.unknown::before { background: #d19b35; }
.printer-status.unknown { color: #8a641e; }
.printer-empty-row td { padding: 48px 20px !important; text-align: center; }
.printer-empty-row i, .printer-empty-row strong, .printer-empty-row span { display: block; }
.printer-empty-row i { margin-bottom: 10px; color: #9aa9bc; font-size: 30px; }
.printer-empty-row strong { color: #35445a; }
.printer-empty-row span { margin-top: 6px; color: #7c8795; font-size: 12px; }
.printer-card-empty { padding: 36px 15px; color: #7c8795; text-align: center; }
.printer-card-empty i, .printer-card-empty strong, .printer-card-empty span { display: block; }
.printer-card-empty i { margin-bottom: 9px; font-size: 27px; }
.printer-card-empty strong { color: #35445a; }
.printer-card-empty span { margin-top: 5px; font-size: 12px; }

.printer-add-backdrop { z-index: 90; }
.printer-add-modal { display: flex; width: min(720px, 100%); max-height: min(820px, calc(100vh - 40px)); overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 28px 70px rgba(15,34,62,.26); flex-direction: column; }
.printer-add-modal > header { position: relative; display: flex; justify-content: space-between; padding: 24px 28px 20px; border-bottom: 1px solid var(--line); }
.printer-add-modal > header h2 { margin: 4px 0 0; color: #1d2f49; font-size: 21px; }
.printer-add-modal > header p { margin: 7px 0 0; color: #728096; font-size: 12px; }
.printer-add-modal > header > button { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: #f3f6fa; color: #637086; cursor: pointer; }
.printer-add-steps { display: grid; grid-template-columns: repeat(2, 1fr); padding: 0 28px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.printer-add-steps span { position: relative; display: flex; min-height: 58px; align-items: center; justify-content: center; gap: 8px; color: #8490a0; font-size: 12px; font-weight: 700; }
.printer-add-steps span::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; content: ""; }
.printer-add-steps span.active { color: var(--brand-700); }
.printer-add-steps span.active::after { background: var(--brand-600); }
.printer-add-steps b { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: #e8eef7; font-size: 10px; }
.printer-add-steps span.active b { background: var(--brand-600); color: #fff; }
.printer-step { min-height: 0; padding: 24px 28px 28px; overflow: auto; }
.printer-step[data-printer-step="2"]:not([hidden]) { display: grid; flex: 1; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; }
.printer-modal-field { display: block; color: #435169; font-size: 12px; font-weight: 700; }
.printer-modal-field > span:first-child { display: block; margin-bottom: 8px; }
.printer-modal-field input, .printer-modal-field select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #26364c; font: inherit; }
.printer-modal-field input:focus, .printer-modal-field select:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(46,104,178,.12); outline: 0; }
.printer-modal-field small { display: block; margin-top: 7px; color: #8792a1; font-size: 10px; font-weight: 400; }
.printer-scan-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.printer-scan-heading strong, .printer-scan-heading small { display: block; }
.printer-scan-heading strong { color: #26384f; font-size: 13px; }
.printer-scan-heading small { margin-top: 4px; color: #8490a0; font-size: 10px; }
.printer-scan-heading button { min-height: 38px; padding: 0 13px; border: 1px solid #c7d4e5; border-radius: 6px; background: #fff; color: var(--brand-700); cursor: pointer; font-weight: 700; }
.printer-scan-heading button:disabled { cursor: wait; opacity: .6; }
.installed-printer-list { min-height: 188px; margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.installed-printer-item { display: grid; width: 100%; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: #34445a; cursor: pointer; text-align: left; }
.installed-printer-item:last-child { border-bottom: 0; }
.installed-printer-item:hover:not(:disabled), .installed-printer-item:focus-visible { background: #f3f7fd; outline: 0; }
.installed-printer-item > i:first-child { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 7px; background: #edf3fb; color: var(--brand-700); font-size: 17px; }
.installed-printer-item strong, .installed-printer-item small { display: block; }
.installed-printer-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.installed-printer-item small { margin-top: 4px; overflow: hidden; color: #7e8998; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.installed-printer-item b { padding: 5px 8px; border-radius: 10px; background: #eef1f4; color: #8a939f; font-size: 10px; }
.installed-printer-item.added { cursor: not-allowed; opacity: .7; }
.printer-modal-empty { display: grid; min-height: 186px; place-content: center; color: #8793a3; text-align: center; }
.printer-modal-empty i { font-size: 28px; }
.printer-modal-empty p { margin: 9px 0 0; font-size: 11px; }
.printer-modal-empty.loading i { animation: printer-spin .9s linear infinite; }
@keyframes printer-spin { to { transform: rotate(360deg); } }
.selected-printer-summary { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 22px; padding: 14px; border: 1px solid #c9d9ed; border-radius: 8px; background: #f5f9fe; }
.selected-printer-summary > i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 8px; background: #fff; color: var(--brand-700); font-size: 19px; }
.selected-printer-summary strong, .selected-printer-summary small { display: block; }
.selected-printer-summary small { margin-top: 4px; color: #718097; font-size: 10px; }
.selected-printer-summary button { min-height: 36px; border: 0; background: transparent; color: var(--brand-700); cursor: pointer; font-weight: 700; }
.printer-modal-grid { display: grid; min-height: 0; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-right: 4px; overflow: auto; }
.printer-modal-grid .full { grid-column: 1 / -1; }
.printer-capability { display: flex; gap: 18px; margin: 0; padding: 14px 15px; border: 1px solid var(--line); border-radius: 7px; }
.printer-capability legend { padding: 0 6px; color: #435169; font-size: 11px; font-weight: 700; }
.printer-capability label { display: flex; align-items: center; gap: 6px; color: #526075; font-size: 12px; cursor: pointer; }
.printer-capability input { width: 16px; height: 16px; accent-color: var(--brand-600); }
.printer-switch { display: flex; align-items: center; gap: 10px; color: #526075; font-size: 12px; cursor: pointer; }
.printer-switch input { position: absolute; opacity: 0; }
.printer-switch span { position: relative; width: 38px; height: 22px; border-radius: 12px; background: #c8d0da; transition: .2s; }
.printer-switch span::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; content: ""; transition: .2s; }
.printer-switch input:checked + span { background: var(--brand-600); }
.printer-switch input:checked + span::after { transform: translateX(16px); }
.printer-add-message { min-height: 20px; margin: 16px 0 0; color: #315c91; font-size: 12px; }
.printer-add-form footer, .printer-step > footer { display: flex; justify-content: flex-end; gap: 10px; margin: 4px -28px -28px; padding: 16px 28px; border-top: 1px solid var(--line); background: #fbfcfe; }
.printer-step footer button { min-height: 42px; padding: 0 18px; border-radius: 6px; cursor: pointer; font-weight: 700; }

.history-content { min-width: 0; }
.history-heading { align-items: flex-end; }
.history-heading h2 { margin-bottom: 5px; }
.history-heading p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.history-refresh { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid #c9d6e8; border-radius: 6px; cursor: pointer; }
.history-refresh:active { transform: translateY(1px); }
.history-toolbar { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 12px 16px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #fbfcfe; }
.history-toolbar label { display: flex; align-items: center; gap: 10px; color: #536278; font-size: 12px; font-weight: 700; }
.history-toolbar select { min-width: 132px; min-height: 38px; padding: 0 34px 0 11px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #26364c; font: inherit; }
.history-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.history-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.history-table th { height: 44px; padding: 0 13px; background: #f7f9fb; color: #59677a; font-weight: 700; text-align: left; white-space: nowrap; }
.history-table td { min-height: 66px; padding: 14px 13px; border-top: 1px solid var(--line); color: #45546a; vertical-align: middle; }
.history-table tr:hover td { background: #fbfdff; }
.history-task { min-width: 190px; }
.history-task strong { display: block; max-width: 290px; overflow: hidden; color: #15243a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.history-task code { display: block; margin-top: 4px; color: #748197; font-size: 10px; }
.history-printer { min-width: 125px; }
.history-params { min-width: 100px; white-space: nowrap; }
.history-status { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 5px; background: #eef3fb; color: #245aa1; font-weight: 700; white-space: nowrap; }
.history-status.completed { background: #eaf7f1; color: #177553; }
.history-status.failed { background: #fff0f0; color: #bd3434; }
.history-status.cancelled { background: #f1f3f5; color: #667085; }
.history-status.printing { background: #edf5ff; color: #1263ad; }
.history-error { display: block; max-width: 180px; margin-top: 4px; overflow: hidden; color: #bd3434; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.history-fee { color: #1d385f; font-weight: 700; white-space: nowrap; }
.history-time { min-width: 130px; color: #617087; white-space: nowrap; }
.history-loading-row td, .history-empty-row td { height: 180px; color: #718096; text-align: center; }
.history-card-list { display: none; }
.history-pagination { display: flex; min-height: 66px; align-items: center; justify-content: flex-end; gap: 14px; }
.history-pagination button { min-height: 36px; padding: 0 14px; border: 1px solid #c9d6e8; border-radius: 6px; cursor: pointer; }
.history-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.history-pagination span { min-width: 84px; color: #607087; font-size: 12px; text-align: center; }
.history-message { min-height: 18px; margin: -6px 0 0; color: #bd3434; font-size: 12px; text-align: right; }

@media (max-width: 1080px) {
  .dashboard-header { grid-template-columns: 220px 1fr auto; padding: 0 20px; }
  .dashboard-nav a { min-width: auto; padding: 0 14px; font-size: 14px; }
  .dashboard-account .account-name { display: none; }
  .notice-row { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .dashboard-header { grid-template-columns: 1fr auto; min-height: 64px; }
  .dashboard-brand-mark { width: 42px; height: 42px; border-radius: 12px; }
  .dashboard-brand strong { font-size: 18px; }
  .dashboard-nav { position: fixed; top: 64px; right: 14px; left: 14px; display: none; height: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 18px 50px rgba(35,55,91,.16); }
  .dashboard-header.nav-open .dashboard-nav { display: grid; }
  .dashboard-nav .mobile-feedback-link { display: grid; }
  .dashboard-nav a { min-height: 46px; border-radius: 6px; }
  .dashboard-nav a::after { display: none; }
  .dashboard-account { display: none; }
  .mobile-nav-toggle { display: block; min-width: 44px; min-height: 44px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }
  .dashboard-shell { width: min(100% - 24px, 720px); margin-top: 14px; }
  .dashboard-titlebar { min-height: 56px; padding: 0 17px; }
  .dashboard-titlebar span { display: none; }
  .dashboard-content { padding: 22px 17px 26px; }
  .account-summary { grid-template-columns: 1fr; }
  .developer-credentials > header { align-items: flex-start; flex-direction: column; }
  .developer-credentials > header .primary-button { width: 100%; }
  .credential-grid { grid-template-columns: 1fr; }
  .credential-grid article + article { border-top: 1px solid var(--line); border-left: 0; }
  .feedback-content { min-height: 520px; }
  .api-docs-open .dashboard-shell { width: min(100% - 24px, 720px); }
  .api-docs-layout { display: block; min-height: 0; }
  .api-docs-toc { display: flex; gap: 4px; padding: 10px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .api-docs-toc p { display: none; }
  .api-docs-toc a { flex: 0 0 auto; border-bottom: 2px solid transparent; border-left: 0; }
  .api-docs-toc a.active { border-bottom-color: var(--brand-600); }
  .api-docs-main { padding: 24px 17px 34px; }
  .base-url { grid-template-columns: 1fr 38px; }
  .base-url span { grid-column: 1 / -1; }
  .quick-flow { grid-template-columns: 1fr; }
  .quick-flow li { min-height: 64px; text-align: left; }
  .quick-flow li:not(:last-child)::after { display: none; }
  .quick-flow i { display: inline-block; width: 30px; margin: 0 7px 0 0; vertical-align: middle; }
  .endpoint-line { grid-template-columns: 48px minmax(0, 1fr); }
  .endpoint-line span { grid-column: 2; }
  .client-flow { grid-template-columns: 1fr; }
  .api-code-aside { display: block; padding: 18px 14px; }
  .code-panel { margin-bottom: 14px; }
  .debug-content { padding: 22px 17px 30px; }
  .debug-layout { margin-top: 18px; }
  .debug-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-table-wrap { display: none; }
  .history-card-list { display: grid; gap: 10px; margin-top: 14px; }
  .history-card { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .history-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .history-card h3 { margin: 0; overflow: hidden; color: #172840; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .history-card header > div { min-width: 0; }
  .history-card header code { display: block; margin-top: 4px; color: #7a8798; font-size: 10px; }
  .history-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 15px 0 0; padding-top: 13px; border-top: 1px solid var(--line); }
  .history-card dt { color: #8792a3; font-size: 10px; }
  .history-card dd { margin: 4px 0 0; color: #3e4f66; font-size: 12px; }
  .history-card-empty { padding: 70px 20px; border: 1px solid var(--line); border-radius: 8px; color: #718096; text-align: center; }
}

@media (max-width: 520px) {
  .dashboard-header { padding: 0 14px; }
  .dashboard-brand small { display: none; }
  .content-heading h2 { font-size: 21px; }
  .status-badge { display: none; }
  .summary-card { grid-template-columns: 1fr auto; min-height: 88px; padding: 14px 4px; }
  .credential-grid article { grid-template-columns: 42px minmax(0, 1fr); }
  .credential-grid article > button { grid-column: 2; justify-self: start; }
  .credential-secret dl > div { grid-template-columns: 1fr; }
  .credential-secret dd { grid-template-columns: 1fr; }
  .credential-secret dd button { width: 100%; }
  .printer-panel > header { align-items: flex-start; padding: 16px; }
  .add-printer-button { min-height: 34px; padding: 0 12px; font-size: 12px; }
  .printer-table-wrap { display: none; }
  .printer-card-list { display: block; }
  .dashboard-modal { padding: 30px 20px 24px; }
  .custom-recharge-amount { grid-template-columns: 1fr; gap: 7px; }
  .feedback-contact { grid-template-columns: 1fr; }
  .feedback-field { grid-template-columns: 1fr; gap: 9px; padding: 17px 0; }
  .feedback-field label { padding-top: 0; }
  .feedback-actions { align-items: flex-start; flex-direction: column; }
  .feedback-actions button { width: 100%; }
  .debug-form-section { padding: 16px 14px; }
  .debug-fields-grid { grid-template-columns: 1fr; }
  .debug-file-picker { align-items: flex-start; flex-wrap: wrap; }
  .debug-file-picker b { margin-left: 37px; }
  .debug-actions { align-items: stretch; flex-direction: column; }
  .debug-actions button { width: 100%; }
  .debug-actions p { margin: 2px 0 0; }
  .profile-content { padding: 18px 12px 24px; }
  .profile-fields { grid-template-columns: 1fr; padding: 18px 15px; }
  .profile-field-wide { grid-column: auto; }
  .profile-card > header { padding: 17px 15px; }
  .profile-card > footer { align-items: stretch; flex-direction: column; padding: 14px 15px; }
  .profile-card > footer .primary-button { width: 100%; min-height: 44px; }
  .printer-add-backdrop { padding: 0; align-items: end; }
  .printer-add-modal { max-height: 92vh; border-radius: 14px 14px 0 0; }
  .printer-add-modal > header, .printer-step { padding-right: 17px; padding-left: 17px; }
  .printer-add-steps { padding: 0 12px; }
  .printer-add-steps span { font-size: 10px; }
  .printer-scan-heading { align-items: flex-start; gap: 10px; }
  .printer-scan-heading button { flex: 0 0 auto; }
  .installed-printer-item { padding: 13px 11px; }
  .selected-printer-summary { grid-template-columns: 40px minmax(0, 1fr); }
  .selected-printer-summary button { grid-column: 2; justify-self: start; }
  .printer-modal-grid { grid-template-columns: 1fr; }
  .printer-modal-grid .full { grid-column: auto; }
  .printer-step > footer { margin-right: -17px; margin-bottom: -28px; margin-left: -17px; padding: 14px 17px; }
  .printer-step footer button { flex: 1; }
  .history-heading { align-items: flex-start; }
  .history-refresh { width: 100%; justify-content: center; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .history-toolbar label { justify-content: space-between; }
  .history-toolbar select { flex: 1; }
  .history-card dl { grid-template-columns: 1fr; gap: 9px; }
  .history-pagination { justify-content: space-between; }
  .history-pagination button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
