#workspace {
  container: subscription-console / inline-size;
  --paper: light-dark(#f6f8f5, #151a18);
  --panel: light-dark(#fff, #1c2420);
  --ink: light-dark(#192723, #eaf3ed);
  --subtle: light-dark(#4f645e, #a9beb4);
  --line: light-dark(#dce5df, #36453f);
  --action: light-dark(#205b4c, #a8dfc9);
  --action-ink: light-dark(#fff, #122720);
  --tint: light-dark(#e4f1ea, #293e35);
  --warning: light-dark(#805313, #f1c988);
  --warn-bg: light-dark(#faf3e2, #3d3020);
  --danger: light-dark(#9f3331, #ffb1ad);
  color-scheme: light dark;
  color: var(--ink);
  font:
    15px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Noto Sans SC',
    'Microsoft YaHei',
    sans-serif;
}
#workspace * {
  box-sizing: border-box;
}
#workspace [hidden] {
  display: none !important;
}
#workspace h2,
#workspace h3,
#workspace p {
  margin: 0;
}
#workspace button,
#workspace input {
  font: inherit;
}
#workspace button {
  min-block-size: 44px;
}
#workspace button:focus-visible,
#workspace input:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
#workspace button:disabled {
  opacity: 0.5;
}
#workspace .navbutton {
  border: 0;
  background: transparent;
  color: var(--subtle);
  padding: 6px 11px;
  border-radius: 7px;
}
#workspace .navbutton[aria-current='page'] {
  background: var(--tint);
  color: var(--action);
  font-weight: 600;
}
#workspace .stage {
  display: grid;
  justify-items: center;
}
#workspace .shell {
  inline-size: 100%;
  max-inline-size: 920px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 15px;
  overflow: clip;
}
#workspace .app-head {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
#workspace .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  white-space: nowrap;
}
#workspace .brand-mark {
  display: grid;
  inline-size: 30px;
  block-size: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--action);
  color: var(--action-ink);
}
#workspace .brand-mark:not(:has(svg)) {
  display: none;
}
#workspace .nav {
  display: flex;
  gap: 4px;
}
#workspace .app-body {
  margin: 0 auto;
  max-inline-size: 760px;
  padding: clamp(14px, 3cqi, 36px);
}
#workspace h2 {
  font-size: clamp(23px, 3cqi, 30px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
#workspace h3 {
  font-size: 16px;
  font-weight: 650;
}
#workspace .heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}
#workspace .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
#workspace .field {
  display: grid;
  gap: 5px;
  min-inline-size: 0;
}
#workspace .fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#workspace .stack {
  display: grid;
  gap: 15px;
}
#workspace .field-name {
  font-weight: 600;
}
#workspace .muted {
  color: var(--subtle);
  font-size: 13px;
}
#workspace input:not([type='radio'], [type='checkbox']) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 16px;
}
#workspace input::placeholder {
  color: var(--subtle);
  opacity: 1;
}
#workspace .with-unit {
  position: relative;
}
#workspace .with-unit input {
  padding-right: 39px;
  appearance: textfield;
}
#workspace input::-webkit-inner-spin-button {
  appearance: none;
}
#workspace .unit {
  position: absolute;
  z-index: 1;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
  pointer-events: none;
  font-size: 13px;
}
#workspace .action,
#workspace .secondary,
#workspace .danger {
  border-radius: 8px;
  padding: 8px 13px;
  border: 1px solid transparent;
  font-weight: 600;
  white-space: nowrap;
}
#workspace .action {
  background: var(--action);
  color: var(--action-ink);
}
#workspace .secondary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--panel);
}
#workspace .danger {
  color: var(--danger);
  background: transparent;
  border-color: var(--line);
}
#workspace .action:not(:disabled):hover {
  filter: brightness(1.1);
}
#workspace .secondary:not(:disabled):hover,
#workspace .navbutton:hover {
  background: var(--tint);
}
#workspace .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#workspace .full {
  width: 100%;
}
#workspace .footnote {
  font-size: 13px;
  color: var(--subtle);
  min-height: 1.45em;
}
#workspace .empty {
  color: var(--subtle);
  padding: 16px 0;
}
#workspace .catalog-tools {
  display: grid;
  grid-template-columns: minmax(12em, 1fr) auto auto;
  gap: 8px;
}
#workspace select {
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
}
#workspace select:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}
#workspace .catalog-bar,
#workspace .pager,
#workspace .page-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#workspace .catalog-bar {
  justify-content: space-between;
  padding: 10px 0;
}
#workspace .page-end {
  justify-content: flex-end;
  padding-top: 8px;
}
#workspace .jump-form {
  display: flex;
  align-items: center;
  gap: 6px;
}
#workspace .jump-form input[type='number'] {
  width: 5em;
}
#workspace .summary {
  color: var(--subtle);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
#workspace .catalog-row,
#workspace .col-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 5em;
  align-items: center;
  gap: 12px;
}
#workspace .col-head {
  color: var(--subtle);
  padding: 8px 0;
  font-size: 13px;
}
#workspace .catalog-row {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
#workspace .catalog-row .status {
  justify-self: start;
}
#workspace .catalog-name {
  text-align: start;
  min-width: 0;
  overflow-wrap: anywhere;
}
#workspace button.catalog-name {
  display: block;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--action);
}
#workspace button.catalog-name:hover .record-name {
  text-decoration: underline;
}
#workspace .catalog-name span {
  display: block;
}
#workspace .bulk-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
#workspace .bulk-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
}
#workspace .bulk-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--action);
}
#workspace .batch {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}
#workspace .mobile-label {
  display: none;
}
#workspace .record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#workspace .record-name {
  font-weight: 650;
  overflow-wrap: anywhere;
}
#workspace .status {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: var(--tint);
  color: var(--action);
  white-space: nowrap;
}
#workspace .status[data-status='waiting'] {
  color: var(--warning);
  background: var(--warn-bg);
}
#workspace .status[data-status='revoked'] {
  background: var(--paper);
  color: var(--subtle);
}
#workspace .share {
  display: grid;
  justify-items: center;
  gap: 10px;
}
#workspace .qr img {
  display: block;
  inline-size: 200px;
  max-inline-size: 100%;
  block-size: auto;
}
#workspace .meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
#workspace .meta-grid dd {
  margin: 3px 0 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}
#workspace .meta-grid > div {
  min-width: 0;
}
#workspace .admin-account {
  display: grid;
  gap: 12px;
}
#workspace .divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
#workspace .confirm-msg {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 9px;
}
@container subscription-console (min-width: 640px) {
  #workspace .panel {
    padding: 24px;
  }
}
@container subscription-console (max-width: 475px) {
  #workspace .app-head {
    padding: 8px 11px;
    gap: 5px;
  }
  #workspace .app-body {
    padding: 13px;
  }
  #workspace .meta-grid {
    gap: 7px;
  }
}
@container subscription-console (max-width: 639px) {
  #workspace .catalog-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #workspace .catalog-tools input {
    grid-column: 1 / -1;
  }
  #workspace .col-head {
    display: none;
  }
  #workspace .catalog-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    padding: 10px 0;
  }
  #workspace .catalog-name {
    grid-column: 1;
    grid-row: 1;
  }
  #workspace .catalog-row .status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  #workspace .catalog-row .usage,
  #workspace .catalog-row .expiry {
    grid-column: 1 / -1;
    font-size: 13px;
  }
  #workspace .mobile-label {
    display: inline;
    color: var(--subtle);
  }
}
@container subscription-console (max-width: 340px) {
  #workspace .fields {
    grid-template-columns: 1fr;
  }
}
:root {
  color-scheme: light dark;
  background: light-dark(#f6f8f5, #151a18);
  font-family:
    system-ui,
    -apple-system,
    'Noto Sans SC',
    'Microsoft YaHei',
    sans-serif;
}
body {
  margin: 0;
}
#workspace {
  min-height: 100vh;
}
#workspace .startup {
  padding: 32px;
  color: var(--subtle);
}
#workspace .shell {
  max-inline-size: 100%;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}
#workspace .app-head {
  padding: 12px max(18px, calc((100vw - 1080px) / 2));
}
#workspace .app-body {
  max-inline-size: 1080px;
  padding: 30px 20px 60px;
}
#workspace nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
#workspace h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0;
}
#workspace .symbol {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--action);
  color: var(--action-ink);
  place-items: center;
  font-size: 19px;
}
#workspace .symbol::before {
  content: '';
  width: 14px;
  height: 10px;
  border: 2px solid;
  border-radius: 3px;
  box-shadow:
    -3px 3px 0 -1px var(--action),
    -3px 3px 0 0 currentColor;
}
#workspace [data-admin] .symbol::before {
  width: 11px;
  height: 13px;
  border-radius: 6px 6px 3px 3px;
  box-shadow: none;
}
#workspace .login-stage {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
}
#workspace .login {
  width: min(100%, 428px);
  padding: 34px;
}
#workspace .login .symbol {
  width: 42px;
  height: 42px;
}
#workspace .login h1 {
  margin: 20px 0 24px;
}
#workspace button,
#workspace a {
  cursor: pointer;
}
#workspace button:disabled {
  cursor: default;
}
#workspace .heading .actions {
  margin-inline-start: auto;
}
#workspace fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}
#workspace .account-name {
  color: var(--subtle);
  overflow-wrap: anywhere;
}
#workspace .subnav {
  border-bottom: 1px solid var(--line);
  padding: 0 0 8px;
  margin-bottom: 20px;
}
#workspace .feedback {
  margin-block: 8px;
  padding: 9px 12px;
  background: var(--tint);
  border-radius: 7px;
  overflow-wrap: anywhere;
}
#workspace .feedback.error {
  color: var(--danger);
  background: var(--panel);
  border: 1px solid var(--danger);
}
#workspace .feedback:empty {
  display: none;
}
#workspace dialog {
  max-width: min(540px, calc(100vw - 28px));
  max-height: 82dvh;
  overflow: auto;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
#workspace dialog::backdrop {
  background: rgb(0 0 0 / 38%);
}
#workspace dialog h2 {
  font-size: 1.25rem;
}
#workspace .panel + .panel {
  margin-top: 15px;
}
#workspace .panel h2,
#workspace .panel h3 {
  overflow-wrap: anywhere;
}
#workspace .history {
  margin: 6px 0 0;
  padding-inline-start: 20px;
}
#workspace summary {
  cursor: pointer;
  padding-block: 8px;
}
#workspace .entry {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
#workspace .entry:first-child {
  border: 0;
}
#workspace .secret {
  font-family: ui-monospace, monospace;
  user-select: all;
  overflow-wrap: anywhere;
}
#workspace .qr-canvas {
  width: min(220px, 100%);
  height: auto;
  image-rendering: pixelated;
}
#workspace .table-box {
  overflow: auto;
}
#workspace .pager-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
#workspace .pager-form input[type='number'] {
  width: 5em;
}
#workspace textarea {
  min-height: 78px;
  width: 100%;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
}
#workspace .readout {
  gap: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
#workspace .readout dd {
  margin: 2px 0 0;
  font-size: 1.05rem;
  font-weight: 650;
}
#workspace .readout dt {
  font-size: 13px;
  color: var(--subtle);
}
#workspace .subtle {
  font-size: 14px;
  color: var(--subtle);
  overflow-wrap: anywhere;
}
#workspace .action-link {
  color: var(--action);
  font-weight: 650;
}
#workspace .bounded {
  max-width: 660px;
}
@media (max-width: 639px) {
  #workspace .app-body {
    padding: 18px 12px 40px;
  }
  #workspace .app-head {
    padding: 8px 12px;
  }
  #workspace .heading {
    align-items: flex-start;
  }
  #workspace .login {
    padding: 24px;
  }
  #workspace .brand {
    white-space: normal;
  }
  #workspace .navbutton {
    padding-inline: 8px;
  }
  #workspace .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#workspace .search-field {
  display: flex;
  min-width: 0;
  gap: 6px;
}
#workspace .search-field input {
  min-width: 0;
  flex: 1;
}
#workspace .catalog-tools {
  padding-bottom: 12px;
}
#workspace .only-page {
  margin-top: 12px;
  text-align: right;
}
@container subscription-console (max-width:639px) {
  #workspace .search-field {
    grid-column: 1 / -1;
  }
  #workspace .page-end .summary {
    flex-basis: 100%;
    text-align: right;
  }
}

#workspace [data-form='dealers-search'] {
  align-items: flex-end;
  margin-bottom: 14px;
}

#workspace .password-box {
  position: relative;
}
#workspace .password-box input {
  padding-right: 4em;
}
#workspace .password-box button {
  position: absolute;
  inset: 1px 3px 1px auto;
  min-height: 0;
  min-width: 50px;
}

#report-results {
  margin-top: 15px;
}
#workspace .report-trend {
  display: grid;
  gap: 8px;
}
#workspace .trend-row {
  display: grid;
  grid-template-columns: minmax(6em, auto) minmax(25px, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-variant-numeric: tabular-nums;
}
#workspace .trend-row meter {
  width: 100%;
  accent-color: var(--action);
}
#aftercare-print {
  display: none;
}
@media print {
  body.printing-receipt > :not(#aftercare-print) {
    display: none !important;
  }
  body.printing-receipt #aftercare-print {
    display: block;
    color: black;
    background: white;
    font: 14pt/1.6 sans-serif;
    padding: 8mm;
    overflow-wrap: anywhere;
  }
}
