/* A quiet workbench: warm neutrals, one green action color, progressive disclosure. */
:root {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none; font-size: 14px; color: #202923; background: #f6f5f1;
  --bg: #f6f5f1; --surface: #fff; --ink: #202923; --muted: #707972;
  --line: #e4e7e1; --accent: #23664e; --accent-hover: #194d3a; --accent-soft: #eaf3ed;
  --blue: var(--accent); --blue-hover: var(--accent-hover); --soft: #f8f9f6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button {
  min-height: 42px; padding: 10px 16px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink);
  font-weight: 550; line-height: 1.4; cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
button:hover:not(:disabled) { background: #f1f4ef; border-color: #ccd5ca; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.quiet:hover:not(:disabled) { border-color: transparent; color: var(--accent); }
h1, h2, h3 { color: var(--ink); }
h1 { margin: 0 0 8px; font-size: 30px; font-weight: 650; line-height: 1.35; letter-spacing: -.7px; }
h2 { margin: 0 0 16px; font-size: 17px; font-weight: 600; line-height: 1.45; }
h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; line-height: 1.5; }
p { margin: 0; color: var(--muted); line-height: 1.75; }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 44px; border: 1px solid #dce2d9;
  border-radius: 8px; padding: 10px 12px; background: #fff; color: var(--ink);
  outline: none; line-height: 1.5; transition: border-color 140ms ease, box-shadow 140ms ease;
}
input::placeholder, textarea::placeholder { color: #929b94; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #23664e12; }
input:disabled, select:disabled, textarea:disabled, input[readonly] { background: #f3f5f0; color: var(--muted); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: #b3634d; }
textarea { resize: vertical; }
input[type=file] { padding: 6px; font-size: 13px; }
input[type=file]::file-selector-button { min-height: 32px; margin-right: 12px; border: 0; border-radius: 5px; padding: 6px 12px; background: var(--accent-soft); color: var(--accent); cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
details > summary { cursor: pointer; min-height: 42px; padding-block: 10px; color: var(--muted); font-size: 13px; }
details[open] > summary { margin-bottom: 12px; color: var(--ink); }
details > summary:hover { color: var(--accent); }

/* Navigation */
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 650; letter-spacing: -.6px; color: var(--ink); }
.brand-mark { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 34px; border-radius: 9px 9px 9px 3px; background: var(--accent); color: white; font-size: 17px; }
.brand small { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; margin-left: 7px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 216px; padding: 29px 18px 20px; background: #fff; border-right: 1px solid var(--line); }
.sidebar .brand { padding-left: 11px; margin-bottom: 38px; }
.nav { display: grid; gap: 24px; overflow-y: auto; }
.nav-group { display: grid; gap: 4px; }
.nav-group-title { padding: 0 13px 6px; color: #929b93; font-size: 11px; font-weight: 500; }
.nav button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 42px; padding: 10px 13px; border-color: transparent; border-radius: 7px; background: transparent; color: #69756c; font-size: 14px; text-align: left; font-weight: 450; white-space: nowrap; }
.nav button:hover:not(:disabled) { border-color: transparent; background: #f4f6f1; color: var(--ink); }
.nav button.active { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 650; }
.nav .n, .workspace { display: none; }
.sidebar-bottom { margin-top: auto; padding: 20px 12px 0; color: #919991; font-size: 11px; line-height: 1.9; }
.sidebar-bottom .quiet { display: block; margin: 6px 0 0 -10px; padding-inline: 10px; color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.shell { min-height: 100vh; margin-left: 216px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 0 38px; color: var(--muted); font-size: 12px; }
.topbar strong { margin-left: 5px; color: #505e54; font-weight: 500; }
.links { display: flex; align-items: center; gap: 22px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; color: #68756b; font-size: 12px; white-space: nowrap; }
.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 24px 38px 60px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.heading > div { min-width: 0; }
.heading p { font-size: 13px; max-width: 56em; }
.heading > button { flex-shrink: 0; }
.heading .toolbar { margin: 0; flex-wrap: nowrap; flex-shrink: 0; }
.nav-count { display: inline-flex; justify-content: center; align-items: center; margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 5px; color: var(--accent); background: #e2ebde; font-size: 10px; }
.eyebrow { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.toolbar p { font-size: 13px; }
.filter-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.filter-tabs button { min-height: 36px; padding: 7px 13px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.filter-tabs button.active, .filter-tabs button[aria-pressed=true] { background: #e7ebe2; color: var(--ink); }
.action-bar, .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Work surfaces */
.metrics, .compact-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; margin: 0 0 30px; padding: 4px 0 27px; border-bottom: 1px solid var(--line); }
.metric { min-width: 0; }
.compact-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric span { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.metric strong { color: var(--ink); font-size: 32px; font-weight: 550; letter-spacing: -.8px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric em { margin-left: 6px; color: #899388; font-size: 11px; font-style: normal; }
.panel { margin-bottom: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-head > .small { max-width: 50%; text-align: right; line-height: 1.6; }
.panel-head > button { min-height: 36px; font-size: 12px; }
.panel-body { padding: 24px; }
.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 13px 22px; border-bottom: 1px solid var(--line); background: #fafbf8; color: #879083; font-size: 12px; font-weight: 450; }
td { padding: 16px 22px; border-bottom: 1px solid #edf0e9; color: #48564c; font-size: 13px; line-height: 1.65; }
td strong { color: var(--ink); font-weight: 550; }
.content td.amount { font-size: 14px; font-weight: 550; letter-spacing: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcf9; }
td button { min-height: 36px; padding: 7px 12px; border-color: transparent; background: #f3f6ef; color: var(--accent); font-size: 12px; }
td .row-actions { flex-wrap: nowrap; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: 0; }
.sub { display: block; margin-top: 4px; color: #8b958b; font-size: 11px; line-height: 1.6; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 5px; background: #f0f2ed; color: #768272; font-size: 11px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.badge.good { background: var(--accent-soft); color: var(--accent); }
.badge.wait { background: #faf0db; color: #896d38; }
.badge.blue { background: #f0f3ed; color: #63785d; }
.empty { padding: 49px 24px 53px; text-align: center; }
.empty .symbol { display: none; }
.empty strong { display: block; margin-bottom: 8px; color: #69766a; font-size: 14px; font-weight: 500; }
.empty p { max-width: 42em; margin-inline: auto; color: #969e93; font-size: 12px; }
.notice { margin-bottom: 22px; padding: 13px 16px; border-left: 2px solid #9db5a0; border-radius: 0 6px 6px 0; background: #eef3e9; color: #6d7d66; font-size: 12px; line-height: 1.8; }
.notice.warning { border-color: #cfb27e; background: #faf5e8; color: #8d7952; }
.overview-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.overview-grid > * { min-width: 0; }
.activity-list { padding: 0 22px; }
.activity-row { display: flex; align-items: center; gap: 15px; padding: 17px 0; border-bottom: 1px solid #edf0e9; line-height: 1.6; }
.activity-row:last-child { border-bottom: 0; }
.activity-row > div { flex: 1; min-width: 0; }
.activity-row strong { font-size: 13px; font-weight: 550; }
.activity-row p { margin-top: 3px; font-size: 12px; }
.activity-row > .activity-value { flex: 0 0 auto; display: grid; justify-items: end; gap: 6px; }
.activity-row a, .activity-row button { flex-shrink: 0; font-size: 12px; }
.setup-progress { display: flex; align-items: center; gap: 24px; padding: 24px 27px; margin-bottom: 28px; border-radius: 12px; background: #e9efe2; }
.setup-copy { flex: 1; min-width: 0; }
.setup-copy h2 { margin-bottom: 7px; font-size: 17px; }
.setup-copy p { font-size: 13px; color: #76816d; }
.setup-copy .primary { margin-top: 16px; }
.setup-copy .eyebrow { display: block; margin-bottom: 7px; }
.setup-steps { display: grid; flex: 0 0 205px; align-items: center; gap: 8px; margin: 0; color: #8b9682; font-size: 12px; }
.setup-steps li { display: flex; align-items: center; gap: 10px; }
.setup-steps li > span { min-width: 35px; font-size: 10px; }
.setup-steps ol, ol.setup-steps, ul.setup-steps { list-style: none; padding: 0; }
.setup-steps .done, .setup-steps .active { color: var(--accent); }
.setup-progress > button { flex-shrink: 0; }

/* Forms reveal only when the operator is editing. */
.form-row { display: flex; flex-wrap: wrap; align-items: end; gap: 17px; }
.form-row.single-field { display: grid; grid-template-columns: 1fr; }
.field { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 150px; color: #59685d; font-size: 12px; line-height: 1.6; }
.field label, label.field { color: #59685d; font-size: 12px; }
.field.narrow { max-width: 170px; }
.stack { display: grid; gap: 22px; }
.text-area { min-height: 140px; margin-top: 16px; font-size: 12px; line-height: 1.8; }
.checkbox { display: flex; min-height: 40px; align-items: start; gap: 10px; color: #6a766c; font-size: 12px; line-height: 1.8; cursor: pointer; }
.checkbox input { flex: 0 0 17px; width: 17px; height: 17px; min-height: 17px; margin: 3px 0 0; padding: 0; cursor: pointer; box-shadow: none; }
.product-config, .form-section { padding-top: 22px; margin-top: 2px; border-top: 1px solid var(--line); }
.product-config-heading { display: flex; align-items: start; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
.product-config h3 { margin: 0 0 5px; font-size: 14px; }
.product-config-heading p { font-size: 12px; }
.product-config-heading > span { padding-top: 2px; white-space: nowrap; }
.package-editor-list { display: grid; gap: 20px; margin-bottom: 16px; }
.package-editor-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; align-items: end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.package-editor-row .field { min-width: 0; }
.package-editor-row .sku-description-field { grid-column: 1 / 3; }
.package-editor-row .package-remove { grid-column: 3; justify-self: end; padding-inline: 10px; color: #997b6e; font-size: 12px; }
.package-editor-row textarea { min-height: 76px; }
.product-custom-toggle strong { display: block; color: var(--ink); font-size: 13px; font-weight: 550; }
.product-custom-toggle .sub { margin-top: 5px; max-width: 56em; font-size: 12px; }
.custom-pricing-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 17px; margin-top: 18px; padding-left: 27px; }
.custom-pricing-fields .field { min-width: 0; }
.custom-pricing-fields .sub { margin: 0; }
.product-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; border-top: 1px solid var(--line); }
.product-form-actions .checkbox { align-items: center; }
.product-form-actions .checkbox input { margin: 0; }
.channels-table { min-width: 680px; }
.channel-address { max-width: 300px; overflow-wrap: anywhere; }
.channel-model-summary { display: grid; gap: 5px; min-width: 100px; color: var(--muted); font-size: 11px; }
.channel-model-summary span { display: flex; justify-content: space-between; gap: 16px; }
.channel-model-summary b { font-weight: 550; }
.channel-model-editor { display: grid; gap: 17px; padding-top: 20px; border-top: 1px solid var(--line); }
.channel-model-editor h3 { margin-bottom: 5px; font-size: 14px; }
.channel-model-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.channel-model-fields .field { min-width: 0; }
.channel-model-fields textarea { min-height: 108px; font-family: Consolas,"Microsoft YaHei",monospace; font-size: 12px; }
.channel-advanced, .inline-disclosure { border-top: 1px solid var(--line); padding-top: 6px; }
.editor-identity { margin-top: 3px; }
.filter-tabs button > span { margin-left: 6px; font-size: 11px; opacity: .65; }
#channel-pricing { margin-top: 16px; }
#channel-pricing input { min-width: 105px; }
.platform-binding { display: grid; grid-template-columns: 115px 1fr 1fr; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.platform-binding:last-child { border-bottom: 0; }
.platform-binding > .checkbox { margin-top: 20px; }
.plain-fieldset { margin: 0; padding: 0; border: 0; }
.plain-fieldset legend { margin-bottom: 10px; color: #59685d; font-size: 12px; }
.form-summary { padding: 12px 0; min-height: 44px; }
.compact-field { max-width: 320px; }
.break-text { max-width: 300px; white-space: normal; overflow-wrap: anywhere; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.settings-grid > section { min-width: 0; }
.qr-preview { display: block; width: 170px; height: 170px; margin: 20px 0; padding: 10px; border: 1px solid var(--line); object-fit: contain; background: #fff; }
.qr-placeholder { display: grid; place-items: center; width: 200px; height: 200px; margin: 22px auto; padding: 16px; border: 1px dashed #d4dccd; border-radius: 8px; color: #8a9585; font-size: 12px; text-align: center; line-height: 1.8; }
.payment-issue-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 12px; }
.payment-issue-row > span { overflow-wrap: anywhere; }
.payment-issue-row > button { flex-shrink: 0; }
.plain-steps { padding-left: 20px; color: var(--muted); line-height: 2.3; }
.credential-code { width: 100%; min-height: 100px; font-family: Consolas,monospace; overflow-wrap: anywhere; }

/* Focused dialogs */
dialog { width: 480px; max-width: calc(100% - 32px); max-height: calc(100dvh - 40px); padding: 28px; overflow: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px #18271c24; }
dialog::backdrop { background: #1c2b2157; }
dialog h2 { margin-bottom: 10px; font-size: 20px; }
dialog p { margin-bottom: 20px; font-size: 13px; }
dialog form { display: grid; gap: 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.admin-dialog { width: min(840px,calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 25px; background: white; border-bottom: 1px solid var(--line); }
.dialog-head h2, .dialog-head p { margin: 0; }
.dialog-head h2 { font-size: 18px; }
.dialog-close { flex: 0 0 36px; min-height: 36px; padding: 5px; border: 0; background: #f3f5f0; color: #7b8777; font-size: 20px; }
.dialog-body { padding: 24px 25px; }
.dialog-body > .panel { border: 0; margin: 0; border-radius: 0; }
.dialog-body > .panel > .panel-body { padding: 0; }
.admin-dialog .dialog-actions { position: sticky; bottom: 0; z-index: 2; padding: 17px 0 0; background: white; }
.admin-dialog .panel-head { display: none; }
.admin-dialog .inline-error:empty { display: none; }

/* Login, retained ledger demo, and legacy payment entry. */
.login-wrap { display: grid; place-items: center; min-height: 100svh; padding: 36px 20px; }
.login { width: min(380px,100%); }
.login .brand { margin-bottom: 45px; }
.login h1 { margin-bottom: 12px; font-size: 29px; }
.login > p { margin-bottom: 28px; font-size: 14px; }
.login form { display: grid; gap: 17px; }
.login footer { margin-top: 30px; padding-top: 21px; border-top: 1px solid var(--line); color: #939b8d; font-size: 11px; line-height: 1.9; }
.standalone-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px max(28px,calc((100vw - 1060px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.standalone-header > a { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; }
.standalone { max-width: 860px; margin: 40px auto 60px; padding: 0 26px; }
.demo-intro { margin-bottom: 25px; }
.demo-intro p { font-size: 13px; }
.demo-balance { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; padding: 24px 0; margin-bottom: 28px; border-block: 1px solid var(--line); }
.demo-balance span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.demo-balance strong { color: var(--ink); font-size: 30px; font-weight: 550; font-variant-numeric: tabular-nums; }
.result { margin-top: 20px; padding: 15px 18px; border-left: 2px solid #aac5a4; background: #f0f5ec; color: #68815b; font-size: 13px; line-height: 1.8; }
.payment { max-width: 610px; margin: 35px auto 60px; padding: 0 20px; }
.payment-summary { padding: 27px 25px; border-bottom: 1px solid var(--line); text-align: center; }
.amount { margin: 13px 0; font-size: 44px; font-weight: 550; letter-spacing: -1px; }
.amount small { margin-right: 5px; font-size: 22px; }
.pay-qr { display: block; width: 220px; height: 220px; margin: 24px auto; object-fit: contain; }
.payment-body { padding: 26px; }
.payment-body form { display: grid; gap: 18px; }
.payment-steps { display: flex; justify-content: space-between; gap: 12px; padding: 18px 0; color: var(--muted); font-size: 12px; }
.payment-steps b { color: var(--accent); font-weight: 550; }

/* Shared feedback */
#toast { position: fixed; left: 50%; bottom: 26px; z-index: 999; max-width: min(540px,calc(100vw - 32px)); padding: 13px 20px; border-radius: 10px; background: #243d2e; color: white; font-size: 13px; line-height: 1.7; box-shadow: 0 5px 24px #192c1d14; transform: translateX(-50%) translateY(8px); opacity: 0; pointer-events: none; transition: opacity 150ms ease,transform 150ms ease; }
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.inline-error { min-height: 18px; color: #ae5c45; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.loading { padding: 70px 28px; color: #899582; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.section-space { margin-top: 24px; }
.align-right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; }

@media (max-width: 1080px) {
  .sidebar { width: 194px; padding-inline: 12px; }
  .shell { margin-left: 194px; }
  .content { padding: 22px 26px 45px; }
  .topbar { padding-inline: 26px; }
  .overview-grid { grid-template-columns: 1fr; gap: 0; }
  .settings-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; padding: 18px 18px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 0 15px; padding: 0; font-size: 20px; }
  .nav { display: flex; gap: 12px; width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: 3px; scrollbar-width: none; }
  .nav-group { display: flex; flex-shrink: 0; gap: 3px; }
  .nav-group + .nav-group { padding-left: 10px; border-left: 1px solid var(--line); }
  .nav-group-title, .sidebar-bottom { display: none; }
  .nav button { width: auto; min-height: 42px; padding: 9px 12px; font-size: 13px; }
  .shell { margin-left: 0; }
  .topbar { min-height: 52px; padding: 0 20px; font-size: 11px; }
  .topbar > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .links { gap: 15px; }
  .links a { font-size: 11px; }
  .content { padding: 20px 20px 42px; }
  h1 { font-size: 27px; }
  .heading { align-items: start; gap: 15px; margin-bottom: 23px; }
  .heading p { font-size: 12px; line-height: 1.7; }
  .heading > button { min-height: 38px; padding: 8px 13px; font-size: 12px; }
  .heading .toolbar { gap: 5px; flex-direction: column-reverse; align-items: stretch; }
  .heading .toolbar button { min-height: 38px; padding: 8px 12px; font-size: 12px; }
  .metrics, .compact-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 18px; padding-bottom: 22px; margin-bottom: 23px; }
  .metric strong { font-size: 28px; }
  .compact-stats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .compact-stats .metric strong { font-size: 23px; }
  .metric span { font-size: 11px; margin-bottom: 8px; }
  .panel { margin-bottom: 20px; border-radius: 10px; }
  .panel-head { padding: 17px; gap: 12px; }
  .panel-head > .small { display: none; }
  .panel-body { padding: 19px; }
  th { padding: 12px 17px; font-size: 11px; }
  td { padding: 15px 17px; font-size: 12px; }
  .setup-progress { flex-wrap: wrap; padding: 20px; gap: 17px; }
  .setup-copy { flex-basis: 100%; }
  .setup-steps { flex-basis: 100%; grid-template-columns: 1fr 1fr; gap: 9px 13px; line-height: 1.5; }
  .setup-progress > button { width: 100%; }
  .activity-list { padding-inline: 17px; }
  .form-row { gap: 16px; }
  .form-row > .field { flex-basis: 100%; min-width: 0; }
  .field.narrow { max-width: none; }
  .package-editor-row { grid-template-columns: 1fr 1fr; gap: 15px 12px; }
  .package-editor-row .package-label-field, .package-editor-row .sku-description-field { grid-column: 1 / -1; }
  .package-editor-row .package-remove { grid-column: 2; }
  .custom-pricing-fields { grid-template-columns: 1fr 1fr; padding-left: 0; gap: 16px 12px; }
  .custom-pricing-fields .field:first-child { grid-column: 1 / -1; }
  .channel-model-fields { grid-template-columns: 1fr; }
  .channel-model-fields textarea { min-height: 84px; }
  .platform-binding { grid-template-columns: 1fr; gap: 12px; }
  .platform-binding > .checkbox { margin-top: 0; }
  .payment-issue-row { align-items: start; flex-direction: column; gap: 12px; }
  .admin-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .dialog-head { padding: 17px 19px; }
  .dialog-body { padding: 20px 19px; }
  dialog { padding: 23px; }
  dialog h2 { font-size: 18px; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions button { flex: 1; }
  .product-form-actions { flex-wrap: wrap; gap: 13px; }
  .product-form-actions .primary { flex: 1; }
  .standalone-header { padding: 16px 20px; }
  .standalone { margin-top: 26px; padding-inline: 20px; }
  .standalone .form-row .grow { flex-basis: 100%; }
  .demo-balance { gap: 15px; }
  .demo-balance strong { font-size: 28px; }
  .row-actions > button { flex: 1; }
  .payment { padding-inline: 18px; }
  .payment-steps { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}


.package-quota-editor { grid-column: 1 / -1; }
.quota-count-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.quota-count-fields[hidden] { display: none; }
.quota-count-fields .field { min-width: 0; }
@media (max-width: 600px) { .quota-count-fields { grid-template-columns: 1fr; } }
