:root {
  font:
    14px/1.65 'Microsoft YaHei UI',
    'Segoe UI',
    sans-serif;
  color: #202d42;
  background: #f4f6fa;
  --line: #dfe5ef;
  --blue: #2760d7;
  --muted: #6d7a8f;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 14px;
  background: #fff;
  color: #31435d;
  cursor: pointer;
  white-space: nowrap;
}
button:hover,
.button-link:hover {
  background: #f0f5ff;
  border-color: #b6c9ef;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.primary:hover {
  background: #174fc4;
  color: #fff;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #a9c6ff;
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  line-height: 1.5;
  letter-spacing: 0.5px;
}
h2 {
  font-size: 16px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  color: var(--muted);
}
.muted,
small {
  color: var(--muted);
  font-size: 12px;
}
.app-shell {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  overflow: hidden;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 28px 16px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  margin-bottom: 27px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}
.app-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: #2760d7;
  border-radius: 11px;
  color: #fff;
  font:
    700 25px/1 'Segoe UI',
    sans-serif;
}
nav {
  display: grid;
  gap: 5px;
}
.nav-group {
  font-size: 11px;
  color: #8490a2;
  padding: 15px 16px 7px;
}
nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 10px 15px;
  border-radius: 7px;
  color: #65748b;
}
nav a:hover {
  background: #f5f7fb;
}
nav a[aria-current='page'] {
  background: #edf3ff;
  color: var(--blue);
  font-weight: 700;
}
.nav-section { border: 1px solid transparent; border-radius: 9px; }
.nav-section[open] { background: #f7f9fe; border-color: #e6ebf5; }
.nav-section > summary { cursor: pointer; list-style: none; padding: 12px 15px; color: #52627d; font-size: 13px; font-weight: 700; display:flex; justify-content:space-between; align-items:center; gap:8px; border-radius:8px; }
.nav-section > summary::-webkit-details-marker { display:none; }
.nav-section > summary:hover { background:#eef3fc; color:#324f8e; }
.nav-section > summary:focus-visible { outline:2px solid #4263eb; outline-offset:-2px; }
.nav-section > summary::after { content:'+'; flex:none; display:grid; place-items:center; width:18px; height:18px; margin-left:auto; border:1px solid #d7e0ee; border-radius:5px; background:#fff; color:#7286a3; font:400 17px/1 Arial,sans-serif; transition:background .18s ease,border-color .18s ease,color .18s ease; }
.nav-section[open] > summary::after { content:'−'; border-color:#cbd8f4; background:#eaf1ff; color:#536fa8; }
.nav-section-links { display:grid; gap:3px; padding:0 5px 6px; }
.nav-section-links a { min-height:39px; padding:7px 10px; font-size:13px; }
.nav-section-links .nav-icon { width:24px; height:24px; flex-basis:24px; }
.nav-icon {
  width: 19px;
  text-align: center;
  font:
    22px/1 'Segoe UI Symbol',
    sans-serif;
}
.nav-count {
  margin-left: auto;
  padding: 0 6px;
  border-radius: 4px;
  background: #fff0e1;
  color: #9b5c12;
  font-size: 11px;
}
.aside-note {
  margin-top: auto;
  padding: 36px 10px 0;
  color: #566781;
  font-size: 12px;
}
.aside-note p {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.9;
}
.local-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #7994bc;
  vertical-align: middle;
}
.main-area {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 20px;
  padding: 27px 32px 22px;
}
.eyebrow {
  color: #8490a2;
  letter-spacing: 1.8px;
  font-size: 10px;
  margin-bottom: 5px;
}
.page-heading {
  min-width: 0;
}
.page-heading p {
  font-size: 12px;
  margin-top: 6px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}
.badge {
  display: inline-block;
  background: #edf1f7;
  color: #65748b;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.good {
  background: #e7f5ed;
  color: #207348;
}
.warn {
  background: #fff3df;
  color: #95601b;
}
.bad {
  background: #fff0f0;
  color: #b02b3c;
}
.blue {
  background: #edf3ff;
  color: var(--blue);
}
.content-area {
  min-height: 0;
  overflow: auto;
  padding: 0 32px 24px;
  flex: 1;
  scrollbar-gutter: stable;
}
[data-view] {
  max-width: 1500px;
}
.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 22px;
  margin-bottom: 18px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 19px 18px;
}
.stat > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.stat strong {
  display: block;
  margin: 10px 0 12px;
  font-size: 18px;
  line-height: 1.4;
}
.stat strong.number {
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}
.stat a,
.text-button {
  color: var(--blue);
  font-size: 12px;
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  white-space: normal;
  text-align: left;
}
.text-button:hover {
  background: none;
  text-decoration: underline;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}
.section-heading p {
  font-size: 12px;
  margin-top: 5px;
}
.setup-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 0;
  border-top: 1px solid #edf0f5;
}
.setup-row > div {
  flex: 1;
  min-width: 0;
}
.setup-row p {
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.step-number {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: #f0f4fb;
  color: #5b79aa;
  border-radius: 8px;
  font-size: 13px;
  flex-shrink: 0;
}
.scope-card h2 {
  margin-bottom: 13px;
}
.scope-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 9px;
}
.scope-card p {
  margin-top: 6px;
  font-size: 12px;
}
.settings-card {
  max-width: 820px;
}
.settings-card label {
  max-width: 650px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 17px;
  font-size: 13px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #ccd5e3;
  border-radius: 6px;
  color: #26364f;
  background: #fff;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f5f7fb;
  color: #77869d;
}
textarea { min-height: 80px; max-width: 100%; resize: vertical; line-height: 1.6; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}
.full-width {
  grid-column: 1 / -1;
}
.table-settings {
  max-width: 1050px;
}
.storage-fields {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 2px;
}
.storage-fields h3 {
  margin-bottom: 14px;
}
.storage-fields:not(.form-grid) label {
  max-width: 48.5%;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding-top: 18px;
}
.help-note {
  max-width: 950px;
  border-left: 3px solid #bfd0ef;
  padding: 0 15px;
  margin: 21px 0;
}
.help-note h3 {
  margin-bottom: 7px;
  color: #53667f;
}
.help-note p {
  font-size: 12px;
}
.banner {
  border: 1px solid #dbe5f6;
  background: #edf3ff;
  color: #45638f;
  border-radius: 7px;
  padding: 11px 15px;
  font-size: 12px;
  margin-bottom: 18px;
}
.warning {
  background: #fff8e9;
  border-color: #efdab0;
  color: #8a611d;
}
.error-banner {
  background: #fff1ef;
  border-color: #edcbc5;
  color: #a03d32;
  overflow-wrap: anywhere;
}
#restart-required {
  margin: 0 32px 16px;
}
.notice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 0 32px 16px;
  padding: 10px 14px;
  border: 1px solid #bedbc8;
  border-radius: 7px;
  background: #eef8f0;
  color: #28663d;
  font-size: 13px;
}
.notice.error {
  background: #fff1ef;
  border-color: #edcbc5;
  color: #a03d32;
}
#notice-message {
  overflow-wrap: anywhere;
}
#dismiss-notice {
  padding: 0 5px;
  background: transparent;
  color: inherit;
  border: 0;
  font-size: 20px;
}
.jobs-card {
  padding-bottom: 12px;
}
.count-label {
  color: var(--muted);
  font-size: 12px;
  margin-left: 7px;
  font-weight: 400;
}
.jobs-controls {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  padding: 4px;
  background: #f1f4f9;
  border-radius: 7px;
}
.filter-tabs button {
  padding: 5px 12px;
  border: 0;
  background: transparent;
  color: #6d7a8f;
}
.filter-tabs button[aria-pressed='true'] {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 4px #233b5d16;
  font-weight: 600;
}
#job-search {
  width: 235px;
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  min-width: 630px;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 8px;
  vertical-align: top;
}
th {
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  background: #fafbfe;
}
td:first-child {
  max-width: 285px;
}
td small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
td code {
  overflow-wrap: anywhere;
}
td button {
  padding: 4px 8px;
  font-size: 12px;
  margin: 0 5px 4px 0;
}
.empty-state {
  padding: 48px 15px;
  text-align: center;
}
.empty-state strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
}
.table-note {
  margin-top: 14px;
  font-size: 11px;
}
.status-bar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: #f9fafd;
  color: #7b889b;
  font-size: 11px;
  padding: 8px 32px;
}
dialog {
  width: 680px;
  max-width: 90vw;
  max-height: 85vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  color: #202d42;
  box-shadow: 0 20px 70px #172b4a33;
}
dialog::backdrop {
  background: #172b4a66;
}
dl {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px 15px;
  font-size: 13px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
pre {
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #f4f6fa;
  border-radius: 7px;
  font:
    12px/1.6 Consolas,
    monospace;
  max-height: 360px;
}
summary {
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  margin-top: 14px;
}
.structure-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
}
.login-card {
  width: 440px;
  max-width: 100%;
  padding: 30px;
}
.login-card h1 {
  font-size: 22px;
  margin: 18px 0 6px;
}
.login-card p {
  margin-bottom: 20px;
}
.login-card .muted {
  margin: 18px 0 0;
}
.error-text {
  color: #a03d32;
}
.success-text {
  color: #276344;
}
.technical-nav {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.technical-nav > summary {
  padding: 9px 15px;
  color: var(--muted);
  cursor: pointer;
}
.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
}
.desk-actions {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.desk-actions a {
  justify-content: flex-start;
  white-space: normal;
}
.desk-list {
  display: grid;
  gap: 10px;
}
.desk-todo-item {
  width: 100%;
  text-align: left;
  justify-content: space-between;
  white-space: normal;
  gap: 18px;
  padding: 14px;
}
.desk-todo-item > span:first-child {
  min-width: 0;
}
.desk-todo-item small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.customer-card {
  padding: 16px;
  background: #f6f8fc;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.customer-card strong,
.customer-card small {
  display: block;
  margin-top: 6px;
}
.business-description {
  min-width: 180px;
  max-width: 400px;
  overflow-wrap: anywhere;
  white-space: normal;
}
.empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
#business-ticket-fields dd {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .brand {
    font-size: 14px;
  }
  .page-header {
    align-items: flex-start;
    padding: 23px 24px 20px;
  }
  .content-area {
    padding: 0 24px 20px;
  }
  .toolbar {
    max-width: 300px;
  }
  .stat {
    padding: 17px 14px;
  }
  .stat strong {
    font-size: 16px;
  }
  #notice,
  #restart-required {
    margin-left: 24px;
    margin-right: 24px;
  }
}
@media (max-width: 980px) {
  .desk-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-header {
    gap: 12px;
  }
  .toolbar {
    max-width: 260px;
    gap: 6px;
  }
  .toolbar button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .form-grid {
    column-gap: 16px;
  }
}
@media (max-width: 600px) {
  .app-shell {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    flex: 0 0 auto;
    max-height: 40vh;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin-bottom: 8px;
    font-size: 15px;
  }
  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
  }
  nav > .nav-group,
  .aside-note {
    display: none;
  }
  nav a {
    min-height: 36px;
    padding: 6px 10px;
  }
  .technical-nav {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .technical-nav[open] {
    grid-column: 1 / -1;
  }
  .technical-nav > summary {
    padding: 7px 10px;
  }
  .nav-section[open] { grid-column:1/-1; }
  .nav-section-links { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .main-area {
    flex: 1;
  }
  .customer-cards {
    grid-template-columns: 1fr;
  }
  .desk-todo-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
@media (max-width: 740px) {
  .app-shell {
    grid-template-columns: 155px minmax(0, 1fr);
  }
  .sidebar {
    padding: 20px 9px;
  }
  .brand {
    gap: 7px;
    font-size: 12px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand .app-mark {
    width: 29px;
    height: 32px;
    font-size: 20px;
  }
  nav a {
    padding: 9px;
    gap: 8px;
    font-size: 12px;
  }
  .aside-note {
    padding: 24px 5px 0;
    font-size: 11px;
  }
  .aside-note p {
    font-size: 10px;
  }
  .page-header {
    flex-wrap: wrap;
    padding: 18px 16px;
  }
  .toolbar {
    max-width: none;
    justify-content: flex-start;
  }
  h1 {
    font-size: 21px;
  }
  .content-area {
    padding: 0 16px 16px;
  }
  .card {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .storage-fields:not(.form-grid) label {
    max-width: none;
  }
  .setup-row {
    gap: 9px;
    flex-wrap: wrap;
  }
  .setup-row > div {
    flex-basis: calc(100% - 45px);
  }
  .setup-row > .badge {
    margin-left: 38px;
  }
  .scope-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .status-bar {
    padding: 8px 16px;
  }
  .status-bar > span:last-child {
    display: none;
  }
  #notice,
  #restart-required {
    margin-left: 16px;
    margin-right: 16px;
  }
}
.manage-dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
}
.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}
#manage-context {
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
}
#manage-form textarea {
  min-height: 84px;
}
#manage-form > label {
  margin: 16px 0;
}
#manage-fields small {
  display: block;
  line-height: 1.5;
  font-weight: normal;
}
#workbook-summary {
  white-space: pre-wrap;
  line-height: 1.8;
}
#usage-report-summary,
#workbook-summary,
#manage-context {
  white-space: pre-line;
}
.biz-line {display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;align-items:center}
.biz-line select,.biz-line input {min-width:120px;flex:1;width:auto}
#biz-fields>label,#doc-form>label {display:block;margin:16px 0}
#biz-fields textarea {min-height:80px}
#biz-stage {white-space:pre-line;line-height:1.8}
.pricing-tabs {display:flex;gap:8px;overflow-x:auto;padding:4px 0 14px;margin-bottom:12px;border-bottom:1px solid var(--line,#dfe3e8)}
.pricing-tabs button {flex:0 0 auto;border:0;border-radius:9px;padding:10px 17px;background:transparent;color:inherit;font-weight:600;cursor:pointer}
.pricing-tabs button[aria-selected="true"] {background:#171823;color:#fff}
[data-pricing-panel]>.card {margin-bottom:16px}
#transfer-calc-result .metrics {margin:18px 0}
#transfer-calc-result h3 strong {color:#5153c4;font-size:1.4em}
#transfer-ledger-rows small,#transfer-channel-rows small,#transfer-account-rows small {display:block;color:#68717e;font-size:.86em;margin-top:4px}
#transfer-channel-form textarea,#transfer-case-draft textarea {min-height:72px}
@media(max-width:680px){.pricing-tabs button{padding:9px 12px}}
:root { --billing-accent: #4275e5; }
.billing-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; margin:12px 0; }
.billing-filters label { display:flex; flex-direction:column; gap:5px; flex:1 1 135px; min-width:120px; max-width:240px; margin:0; }
.billing-filters input,.billing-filters select { width:100%; min-width:0; height:36px; }
.billing-filters button { height:36px; margin:0; }
.billing-filters label:has([name=grain]),.billing-filters label:has([name=currency]) { flex:0 1 94px; min-width:80px; }
.billing-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.billing-metrics > div { padding:14px 16px; background:var(--surface-soft,#f5f7fb); border-radius:9px; border:1px solid var(--border,#e5e9f0); }
.billing-metrics span { display:block; color:var(--muted,#64748b); font-size:12px; margin-bottom:6px; }
.billing-metrics strong { font-size:21px; color:var(--text,#24344c); overflow-wrap:anywhere; }
.billing-coverage { font-size:12px; padding:8px 10px; background:#edf8f2; color:#24694d; border-radius:6px; }
.billing-coverage.is-partial { background:#fff6e7; color:#8c621b; }
.billing-chart { width:100%; height:330px; }
.billing-dashboard td small { display:block; }
.billing-dashboard .card { margin-bottom:12px; }
@media(max-width:780px){.billing-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}.billing-filters label{max-width:none;}.billing-chart{height:290px;}}
