:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --paper: #fff;
  --ink: #161f35;
  --muted: #52617c;
  --line: #e2e7f0;
  --accent: #234fce;
  --focused: #ebf1ff;
  font: 15px/1.5 "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { color: inherit; font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
h1, h2, p, dl, dd { margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.shell { width: min(100% - 72px, 1440px); margin-inline: auto; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; letter-spacing: -.035em; font-weight: 700; }
.brand-secondary { color: var(--muted); font-weight: 500; }
.brand-mark {
  width: 33px; height: 33px; display: flex; align-items: end; justify-content: center;
  gap: 3px; padding-bottom: 8px; border-radius: 10px; background: var(--accent);
}
.brand-mark i { width: 4px; height: 8px; border-radius: 1px; background: #fff; }
.brand-mark i:nth-child(2) { height: 12px; }
.brand-mark i:nth-child(3) { height: 17px; }
select {
  min-height: 40px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper); font-size: 13px;
}
.language select { padding-inline: 12px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 38px 0 26px; }
h1 { font-size: clamp(32px, 4.6vw, 53px); font-weight: 710; line-height: 1.12; letter-spacing: -.036em; }
html[lang="zh-CN"] h1 { letter-spacing: -.035em; }
.sync { min-height: 21px; margin-top: 13px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sync-dot {
  width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%;
  background: #168453; box-shadow: 0 0 0 3px #d9f1e5;
}
.sync-dot.stale { background: #9b6419; box-shadow: 0 0 0 3px #f9eedc; }
.metrics { display: flex; padding-bottom: 2px; }
.metrics div { display: flex; flex-direction: column-reverse; justify-content: end; min-width: 110px; padding: 0 20px; border-left: 1px solid #d9e0eb; }
.metrics div:last-child { padding-right: 0; }
.metrics dt { font-size: 12px; color: var(--muted); }
.metrics dd { color: var(--accent); font-size: clamp(23px, 3vw, 33px); line-height: 1.15; letter-spacing: -.03em; font-weight: 700; font-variant-numeric: tabular-nums; }

.catalog { display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; gap: 18px; }
.categories, .results { border: 1px solid var(--line); background: var(--paper); border-radius: 14px; min-width: 0; }
.categories { padding: 17px 12px 10px; position: sticky; top: 14px; }
.categories h2 { margin: 0 6px 12px; font-size: 14px; }
.search {
  display: flex; align-items: center; gap: 11px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #f8faff;
}
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-icon { position: relative; width: 13px; height: 13px; flex: 0 0 13px; border: 1.6px solid #65728b; border-radius: 50%; }
.search-icon::after { position: absolute; content: ""; width: 6px; height: 1.6px; border-radius: 1px; background: #65728b; transform: rotate(45deg); right: -5px; bottom: -2px; }
.search input { background: transparent; min-width: 0; width: 100%; min-height: 39px; padding: 0; border: 0; outline: 0; font-size: 13px; }
.search input::placeholder { color: #596884; }
.category-search { margin-bottom: 10px; }
.category-button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 7px; width: 100%;
  min-height: 37px; padding: 7px 8px; border: 0; border-radius: 6px;
  background: transparent; text-align: start; font-size: 13px; overflow-wrap: anywhere;
}
.category-button:hover, .category-button.selected { color: var(--accent); background: var(--focused); }
.category-button.selected { font-weight: 650; }
.category-count { flex: none; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.category-button.selected .category-count { color: var(--accent); }
.category-list {
  max-height: min(67vh, 660px); min-height: 0; overflow: auto; overscroll-behavior: contain;
  margin: 6px 0 0; padding: 0; list-style: none; scrollbar-width: thin; scrollbar-color: #ced7e8 transparent;
}
.category-list li + li { margin-top: 2px; }
.category-list .category-button:focus-visible { outline-offset: -2px; }
.category-empty { padding: 10px 8px; color: var(--muted); font-size: 13px; }

.results { overflow: hidden; }
.results-top { padding: 17px 18px 15px; }
.results-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-height: 29px; }
.results-title h2 { font-size: 19px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.text-button { color: var(--accent); font-size: 12px; border: 0; padding: 2px; background: none; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.filters { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.service-search { flex: 1 1 320px; }
.select-label { flex: none; }
table { border-collapse: collapse; width: 100%; text-align: start; font-variant-numeric: tabular-nums; }
thead { background: #f0f4fc; border-block: 1px solid var(--line); }
th { text-align: start; font-size: 12px; color: #40516d; white-space: nowrap; font-weight: 650; }
th, td { padding: 10px 11px; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 17px; }
tbody tr { border-bottom: 1px solid #edf0f6; }
tbody tr:hover { background: #fbfcff; }
td { font-size: 13px; }
.id-column { width: 72px; }
td:first-child { color: var(--muted); }
.service-name { font-size: 14px; font-weight: 600; line-height: 1.42; overflow-wrap: anywhere; }
.service-category { color: var(--muted); font-size: 11px; line-height: 1.38; margin-top: 3px; overflow-wrap: anywhere; }
.price-column, .quantity-column { text-align: end; width: 104px; white-space: nowrap; }
td.price-column { color: var(--accent); font-weight: 680; }
.quantity-column { width: 83px; }
.action-column { width: 58px; text-align: end; }
.detail-button {
  color: var(--accent); background: #f1f5ff; border: 1px solid transparent;
  border-radius: 6px; padding: 4px 7px; min-height: 31px; white-space: nowrap; font-size: 12px;
}
.detail-button:hover { border-color: #bdccf8; }
.empty { text-align: center; padding: 75px 15px; color: var(--muted); border-top: 1px solid var(--line); }
.empty button { margin-top: 12px; }
.pagination { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 17px; color: var(--muted); font-size: 12px; }
.page-controls { display: flex; gap: 9px; align-items: center; white-space: nowrap; }
.page-number { font-variant-numeric: tabular-nums; }
.secondary-button {
  min-height: 34px; padding: 5px 10px; border: 1px solid #d8e1f0;
  border-radius: 7px; background: var(--paper); color: var(--accent); font-size: 12px;
}
.secondary-button:hover:enabled { background: var(--focused); }
.secondary-button:disabled { color: #64718a; opacity: .66; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 26px 0; color: var(--muted); font-size: 12px; }

dialog {
  width: min(610px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 23px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--ink);
  box-shadow: 0 18px 48px #1018282e;
}
dialog::backdrop { background: #17284766; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.detail-category { color: var(--accent); font-size: 12px; margin-bottom: 5px; overflow-wrap: anywhere; }
.dialog-heading h2 { font-size: clamp(17px, 3vw, 22px); line-height: 1.35; overflow-wrap: anywhere; }
.close-button { width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); font-size: 22px; line-height: 1; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 17px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.detail-grid div { min-width: 0; padding: 10px; background: #f9fbff; }
.detail-grid .original { grid-column: 1 / -1; }
.detail-grid dt { font-size: 12px; color: var(--muted); }
.detail-grid dd { font-weight: 600; overflow-wrap: anywhere; }

@media (max-width: 960px) {
  .shell { width: min(100% - 40px, 1440px); }
  .catalog { grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
  th, td { padding-inline: 7px; }
  .quantity-column { width: 64px; }
}
@media (max-width: 750px) {
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .categories { position: static; padding: 12px; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; align-items: center; }
  .categories h2 { margin: 0 0 0 4px; }
  .category-search { margin: 0; }
  .category-button { min-height: 35px; }
  .category-list { display: flex; gap: 6px; overflow-x: auto; max-height: none; margin: 0; padding: 3px; }
  .category-list li + li { margin: 0; }
  .category-list .category-button { width: max-content; max-width: 310px; min-height: 33px; border: 1px solid var(--line); }
  .category-button.all { min-width: max-content; }
  .category-empty { padding: 0; }
}
@media (max-width: 510px) {
  .shell { width: calc(100% - 24px); }
  .topbar-inner { height: 58px; }
  .intro { gap: 12px; align-items: start; padding-block: 24px 18px; }
  h1 { font-size: 30px; }
  .sync { font-size: 11px; margin-top: 9px; }
  .metrics div { padding-inline: 8px; min-width: 0; }
  .metrics dd { font-size: 21px; }
  .metrics dt { font-size: 11px; }
  .results-top { padding: 13px 10px; }
  .results-title h2 { font-size: 16px; }
  .filters { gap: 6px; }
  .filters select { max-width: 120px; font-size: 12px; }
  .search { padding-inline: 7px; }
  .search input { font-size: 12px; }
  th, td { padding-inline: 5px; }
  th:first-child, td:first-child { padding-left: 10px; }
  th:last-child, td:last-child { padding-right: 10px; }
  .id-column, .price-column, .action-column { width: auto; }
  .quantity-column { display: none; }
  .service-name { font-size: 13px; }
  .service-category { font-size: 10px; }
  .pagination { padding-inline: 10px; min-height: 58px; }
  .page-controls { gap: 5px; }
  .secondary-button { padding-inline: 7px; }
}

/* Account and order tools */
.balance-panel { display: flex; align-items: center; gap: 9px; text-align: end; }
.balance-panel strong { display: block; color: var(--accent); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balance-label { color: var(--muted); font-size: 11px; }
.balance-panel .secondary-button { min-height: 30px; }
.row-actions { display: flex; align-items: center; justify-content: end; gap: 5px; }
.order-button, .primary-button {
  white-space: nowrap; background: var(--accent); color: #fff; border: 1px solid transparent;
  border-radius: 7px; font-weight: 650;
}
.order-button { font-size: 12px; padding: 4px 7px; min-height: 31px; }
.primary-button { font-size: 13px; padding: 8px 13px; min-height: 37px; }
.order-button:hover, .primary-button:hover:enabled { background: #183dad; }
.primary-button:disabled { opacity: .65; }
.dialog-footer { display: flex; justify-content: end; margin-top: 14px; }
.operations-intro { padding-bottom: 22px; align-items: start; }
.operations-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; }
.ops-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 17px 18px; min-width: 0;
}
.ops-card h2 { font-size: 18px; }
.ops-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.history-card { margin-top: 18px; }
.ops-field { display: grid; gap: 5px; align-content: start; font-size: 13px; min-width: 0; }
.ops-field span { font-weight: 600; }
.ops-card form { display: grid; gap: 11px; margin-top: 12px; }
.ops-card form .primary-button { justify-self: start; }
.ops-field input, .ops-field select, .ops-field textarea {
  width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #d7e0f0; border-radius: 7px;
  background: #f8faff; color: inherit; font: inherit;
}
.ops-field textarea { resize: vertical; min-height: 73px; }
.field-hint, .ops-message { font-size: 13px; color: var(--muted); }
.ops-message { margin-top: 11px; overflow-wrap: anywhere; }
.ops-message:empty { display: none; }
.ops-message.success { color: #0b6b40; }
.ops-message.error { color: #9b2c2c; }
.ops-table-scroll { overflow: auto; }
.ops-table { margin-top: 12px; min-width: max-content; }
.ops-table th, .ops-table td { padding-inline: 9px; }
.ops-table td { white-space: nowrap; }
.ops-table td:last-child { white-space: normal; }
.order-dialog { width: min(650px, calc(100% - 28px)); }
.order-rate { margin-top: 11px; color: var(--accent); font-size: 15px; font-weight: 650; }
.order-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block: 14px; }
.order-fields .wide { grid-column: 1 / -1; }
.order-fields details { padding: 8px 10px; background: #f8faff; border: 1px solid var(--line); border-radius: 8px; }
.order-fields summary { font-size: 13px; color: var(--accent); cursor: pointer; }
.drip-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 11px; }
@media (max-width: 750px) {
  .operations-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .history-card { margin-top: 12px; }
  .row-actions { flex-direction: column; }
}
@media (max-width: 510px) {
  .balance-panel { gap: 5px; }
  .balance-panel strong { font-size: 12px; }
  .order-dialog { padding: 15px; }
  .ops-card { padding: 13px; }
}


.account-controls, .session-controls { display: flex; align-items: center; gap: 10px; }
.session-controls { color: var(--muted); font-size: 13px; }
.session-controls span { max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 510px) {
  .account-controls { gap: 6px; }
  .session-controls span { display: none; }
}

.work-layout {
  width: min(calc(100% - 52px), 1550px);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 19px;
}
.work-main { min-width: 0; }
.side-rail {
  position: sticky; top: 12px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.nav-group { display: grid; gap: 2px; padding: 5px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--line); margin-top: 4px; }
.nav-group a {
  padding: 8px 10px; border-radius: 7px; color: var(--muted); font-size: 13px;
  min-height: 36px; display: flex; align-items: center; font-weight: 600;
}
.nav-group a:hover { color: var(--accent); background: #f5f8ff; }
.nav-group a[aria-current="page"] { color: var(--accent); background: var(--focused); }
.nav-toggle { display: none; }
.work-main .intro { padding-top: 25px; }
.work-main .metrics div { min-width: 90px; padding-inline: 15px; }
.work-main .metrics div:last-child { padding-right: 0; }
.work-content { display: grid; gap: 14px; }
.work-content > .ops-card > p { color: var(--muted); margin-block: 6px 12px; }
.work-content h3 { margin: 0 0 9px; font-size: 15px; }
.work-content .ops-card > :last-child { margin-bottom: 0; }
.work-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.work-actions a { display: inline-flex; align-items: center; }
.work-table { margin-top: 0; min-width: 100%; }
.work-table td { white-space: normal; overflow-wrap: anywhere; }
.work-table .compact { width: 1px; white-space: nowrap; }
.work-input { max-width: 585px; }
.work-table-scroll { overflow: auto; }
.picker-list { display: grid; list-style: none; padding: 0; margin: 12px 0 0; }
.picker-list li + li { border-top: 1px solid var(--line); }
.picker-option { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding-block: 9px; }
.picker-option span { min-width: 0; overflow-wrap: anywhere; }
.picker-option .picker-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.surface-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.doc-list { display: grid; gap: 9px; }
.doc-list details { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.doc-list summary { cursor: pointer; font-weight: 650; }
.doc-list details p { color: var(--muted); margin: 8px 0 2px; }
.batch-state, .ticket-status { white-space: nowrap; font-size: 12px; }
.batch-state.success { color: #0b6b40; }
.batch-state.error { color: #9b2c2c; }
.work-thread { display: grid; gap: 8px; margin-block: 12px; }
.work-thread article { background: #f5f8ff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.work-thread article small { display: block; margin-bottom: 3px; color: var(--muted); }
.work-thread article p { white-space: pre-wrap; overflow-wrap: anywhere; }
.funds-value { display: block; color: var(--accent); font-size: 29px; font-weight: 700; margin-top: 5px; }
@media (max-width: 1280px) {
  .work-layout { grid-template-columns: 164px minmax(0, 1fr); gap: 12px; }
  .work-main .catalog { grid-template-columns: 210px minmax(0, 1fr); gap: 12px; }
  .work-main .quantity-column { width: 63px; }
}
@media (max-width: 1020px) {
  .work-layout { width: calc(100% - 38px); }
  .work-main .catalog { grid-template-columns: minmax(0, 1fr); }
  .work-main .categories { position: static; padding: 12px; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; align-items: center; }
  .work-main .categories h2 { margin: 0 0 0 4px; }
  .work-main .category-search { margin: 0; }
  .work-main .category-list { display: flex; gap: 6px; overflow-x: auto; max-height: none; margin: 0; padding: 3px; }
  .work-main .category-list li + li { margin: 0; }
  .work-main .category-list .category-button { width: max-content; max-width: 310px; min-height: 33px; border: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .work-layout { grid-template-columns: minmax(0, 1fr); gap: 9px; width: calc(100% - 24px); margin-top: 12px; }
  .side-rail { position: static; }
  .nav-toggle { display: inline-flex; min-height: 34px; align-items: center; }
  .side-rail:not(.expanded) nav { display: none; }
  .nav-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .surface-grid { grid-template-columns: minmax(0, 1fr); }
  .work-main .intro { padding-top: 18px; }
  .work-main .metrics div { min-width: 0; padding-inline: 7px; }
}
@media (max-width: 510px) {
  .picker-option { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px; }
  .work-table td, .work-table th { padding-inline: 6px; }
}


@media (max-width: 650px) {
  .work-table:has(th:nth-child(4)) { min-width: 470px; }
}

.app-topbar .topbar-inner { height: 72px; width: min(calc(100% - 52px), 1510px); gap: 20px; }
.app-topbar .brand { flex: none; }
.app-topbar .account-controls { gap: 20px; }
.profile-controls { display: flex; align-items: center; gap: 11px; }
.session-controls { gap: 9px; }
.session-controls span { color: var(--ink); font-weight: 650; }
.app-topbar .balance-panel {
  gap: 9px; padding: 6px 8px 6px 10px; background: #f0f5ff;
  border-radius: 10px; text-align: start;
}
.balance-panel .balance-label { display: block; line-height: 1.2; color: #4b6082; }
.balance-panel strong { line-height: 1.35; color: #113e9f; }
.balance-panel .secondary-button { background: var(--paper); }

.ui-icon {
  width: 20px; height: 20px; flex: 0 0 20px; display: inline-block;
  background: url('/ui-icons.png') 0 0 / 20px auto no-repeat;
}
.icon-news { background-position: 0 -20px; }
.icon-new { background-position: 0 -40px; }
.icon-batch { background-position: 0 -60px; }
.icon-services { background-position: 0 -80px; }
.icon-orders { background-position: 0 -100px; }
.icon-funds { background-position: 0 -120px; }
.icon-tickets { background-position: 0 -140px; }
.icon-faq { background-position: 0 -160px; }
.icon-terms { background-position: 0 -180px; }
.icon-affiliates { background-position: 0 -200px; }
.icon-panels { background-position: 0 -220px; }
.icon-balance { background-position: 0 -240px; }

.work-layout { width: min(calc(100% - 52px), 1510px); grid-template-columns: 205px minmax(0, 1fr); margin-top: 21px; gap: 22px; }
.side-rail { padding: 7px 9px; }
.nav-group { padding-block: 6px; }
.nav-group a { gap: 9px; font-size: 14px; padding: 8px 10px; min-height: 41px; }
.nav-group a[aria-current="page"] { color: #15398e; background: #e9f0ff; }
.nav-group a[aria-current="page"] .ui-icon { filter: brightness(.78); }
.nav-toggle::before {
  display: inline-block; content: ""; width: 12px; height: 10px; margin-inline-end: 7px;
  border-block: 1.5px solid currentColor; background: linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat;
}

.work-main .intro { padding: 12px 0 18px; }
#catalog-view .intro {
  align-items: center; gap: 20px; margin-bottom: 17px; padding: 22px 24px;
  background: #eaf1ff; border: 1px solid #dbe6fb; border-radius: 15px;
}
#catalog-view h1 { font-size: 2.35rem; line-height: 1.16; font-weight: 720; }
.work-main .metrics { gap: 14px; padding: 0; }
.work-main .metrics div {
  min-width: 92px; min-height: 56px; padding: 5px 13px; border: 0; border-radius: 9px;
  background: #f9fbff; color: var(--ink); justify-content: center;
}
.work-main .metrics dd { color: #1f427f; font-size: 1.47rem; line-height: 1.25; }
.work-main .metrics dt { color: #475f87; }
.work-main .sync { margin-top: 8px; color: #475f87; }
.work-main h1 { font-size: 2.1rem; }
.work-main .catalog { gap: 15px; }
.work-main .results-top { padding: 18px 18px 16px; }
.work-main .categories h2 { font-size: 15px; }
.work-main .category-button { padding-block: 9px; }
.work-main td .service-name { font-weight: 650; }
.work-main tbody tr:nth-child(even) { background: #fcfdff; }
.work-main tbody tr:hover { background: #f4f8ff; }
.work-content h2 { margin-bottom: 6px; }
.work-content > .ops-card > .ops-message.error { color: #9b2c2c; }
::selection { background: #dce7ff; color: #182c57; }

@media (max-width: 1280px) {
  .work-layout { grid-template-columns: 176px minmax(0, 1fr); gap: 15px; }
}
@media (max-width: 1020px) {
  .work-layout, .app-topbar .topbar-inner { width: calc(100% - 38px); }
  #catalog-view .intro { padding: 17px 19px; }
}
@media (max-width: 760px) {
  .work-layout, .app-topbar .topbar-inner { width: calc(100% - 24px); }
  .work-layout { grid-template-columns: minmax(0, 1fr); margin-top: 12px; gap: 10px; }
  .app-topbar .topbar-inner { height: auto; min-height: 62px; gap: 9px; }
  .app-topbar .account-controls { gap: 7px; }
  .work-main .intro { padding: 8px 0 14px; }
  #catalog-view h1 { font-size: 1.9rem; }
  .work-main .metrics { gap: 6px; }
  .work-main .metrics div { min-width: 62px; padding: 4px 8px; min-height: 49px; }
  .work-main .metrics dd { font-size: 1.25rem; }
  .work-main .catalog { gap: 10px; }
}
@media (max-width: 600px) {
  .app-topbar .topbar-inner { display: grid; grid-template-columns: 1fr auto; padding-block: 10px; }
  .app-topbar .account-controls { display: contents; }
  .app-topbar .profile-controls { grid-row: 1; grid-column: 2; gap: 5px; }
  .app-topbar .balance-panel { grid-row: 2; grid-column: 1 / -1; }
  .balance-panel .secondary-button { margin-inline-start: auto; }
  .work-main .metrics div { min-width: 55px; }
  #catalog-view .intro { padding: 14px 12px; gap: 7px; margin-bottom: 10px; }
  #catalog-view h1 { font-size: 1.65rem; }
  .work-main .results-top { padding: 12px 10px; }
  .nav-group a { min-height: 39px; }
}
@media (max-width: 355px) {
  .app-topbar .brand { gap: 6px; font-size: 15px; }
  .app-topbar select { padding-inline: 5px; }
  .app-topbar .profile-controls .secondary-button { padding-inline: 4px; }
}


.icon-api { background-position: 0 -180px; }
.nav-more { border-top: 1px solid var(--line); margin-top: 4px; padding-block: 5px; }
.nav-more summary {
  margin-inline: 2px; padding: 10px 8px; color: var(--muted); font-size: 13px;
  font-weight: 650; cursor: pointer; border-radius: 6px;
}
.nav-more summary:hover { background: #f5f8ff; color: var(--accent); }
.orders-intro { align-items: center; gap: 12px; }
.order-page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.order-summary {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 0 13px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.order-summary div { padding: 13px 17px; }
.order-summary div + div { border-left: 1px solid var(--line); }
.order-summary dt { color: var(--muted); font-size: 13px; }
.order-summary dd { margin-top: 3px; font-size: 1.5rem; line-height: 1.2; font-weight: 720; font-variant-numeric: tabular-nums; }
.order-summary div:nth-child(2) dd { color: var(--accent); }
.personal-orders-card { padding: 0; overflow: hidden; }
.order-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.personal-order-search { flex: 1 1 200px; }
.personal-order-table-wrap { overflow: auto; }
.personal-order-table { min-width: 738px; }
.personal-order-table td { overflow-wrap: anywhere; }
.personal-order-table .order-col-service { width: 30%; min-width: 136px; }
.personal-order-table .order-col-order { width: 125px; }
.personal-order-table .order-col-charged, .personal-order-table .order-col-remaining,
.personal-order-table .order-col-date, .personal-order-table .order-col-detail { white-space: nowrap; }
.personal-order-table .order-id { color: var(--ink); font-weight: 650; }
.order-source-line { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.order-status-badge { display: inline-block; padding: 4px 7px; border-radius: 6px; background: #edf1f6; color: #465572; font-size: 12px; white-space: nowrap; }
.order-status-badge.done { background: #e6f4eb; color: #176444; }
.order-status-badge.pending { background: #e8f0ff; color: #194799; }
.order-status-badge.issue { background: #f8ede6; color: #813a27; }
#my-order-message { margin: 0; padding: 15px; }
#my-order-list:empty + #my-order-message { padding-block: 30px; border-top: 1px solid var(--line); }
.manual-tools {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper);
}
.manual-tools summary { font-weight: 650; cursor: pointer; }
.manual-tools .operations-grid { margin-top: 12px; }
.import-hint { margin-block: 12px; color: var(--muted); }
.import-link { display: inline-flex; align-items: center; }
.order-import-form { display: grid; gap: 10px; margin-top: 12px; }
.order-import-form .primary-button { justify-self: start; }
.order-import-form input[type=file] { width: 100%; }
.catalog-category-select { min-width: 0; max-width: min(36%, 290px); }
.catalog-category-select select { width: 100%; text-overflow: ellipsis; }
.platform-panel .category-list { max-height: 65vh; }
.api-actions > div { display: grid; grid-template-columns: minmax(100px,130px) minmax(0,1fr); gap: 9px; align-items: baseline; padding-block: 10px; }
.api-actions > div + div { border-top: 1px solid var(--line); }
.api-actions code { padding: 3px 6px; background: #edf3ff; color: #1d4389; border-radius: 5px; font-size: 13px; }
.api-actions dd { color: var(--muted); font-size: 13px; }

@media (max-width: 1020px) {
  .work-main .platform-panel { grid-template-columns: minmax(100px,auto) minmax(0,1fr); }
  .platform-panel .all { grid-column: 1; grid-row: 2; }
  .work-main .platform-panel .platform-list { grid-column: 2; grid-row: 2; }
}
@media (max-width: 670px) {
  .orders-intro { align-items: start; flex-direction: column; }
  .order-summary div { padding: 12px; }
  .order-filters { padding: 10px; }
  .order-page-actions .primary-button, .order-page-actions .secondary-button { min-height: 36px; }
  .catalog-category-select { max-width: 56%; flex: 1; }
  .work-main .results .filters { flex-wrap: wrap; }
  .work-main .service-search { flex-basis: 100%; }
}

