:root {
  color-scheme: light;
  --canvas: #f5f7f7;
  --ink: #1d302b;
  --muted: #718079;
  --line: #e3e9e6;
  --paper: #fff;
  --forest: #183c30;
  --green: #235943;
  --amber: #216b50;
  --red: #a32d31;
  font: 14px "Inter", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, fieldset:disabled .button { opacity: .46; cursor: default; }
h1, h2, p { margin: 0; }
h2 { font-size: 18px; }
:focus-visible { outline: 2px solid #168265; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }

.topbar { color: #fff; background: var(--forest); }
.topbar-inner, .workspace { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.topbar-inner { display: flex; min-height: 62px; justify-content: space-between; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 750; line-height: 1.1; }
.brand small { display: block; color: #c5dbd0; font-size: 11px; font-weight: 500; margin-top: 4px; letter-spacing: .11em; }
.mark { display: inline-grid; place-items: center; flex: 0 0 37px; height: 37px; border-radius: 10px; background: var(--amber); color: #26332a; }
.workspace { padding: 23px 0 32px; }
.workspace h1 { font-size: clamp(25px, 4vw, 33px); line-height: 1.18; }
.intro { margin: 7px 0 15px; font-size: 14px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 173px; padding: 13px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); }
.step.next { border-color: #8db8a1; box-shadow: inset 0 2px #449471; }
.step h2 { display: flex; gap: 7px; align-items: center; }
.step h2 span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #286047; background: #e4f0e9; font-size: 12px; }
.scope-id, .empty-step { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.empty-step { padding: 8px 0 4px; }
.step > .button, .step > .button-row { margin-top: auto; }
.button-row { display: flex; gap: 5px; align-items: center; }
.issue-form { display: grid; gap: 6px; flex: 1; }
.issue-form fieldset { display: grid; align-content: space-between; gap: 8px; min-width: 0; padding: 0; margin: 0; border: 0; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 35px; padding: 5px 11px; border: 1px solid transparent; border-radius: 7px; font-weight: 650; white-space: nowrap; }
.button.primary { color: #fff; background: var(--amber); }
.button.primary:not(:disabled):hover { background: #19563f; }
.button.secondary { border-color: #d4e2d8; background: #fff; color: var(--green); }
.button.secondary:not(:disabled):hover, .button.quiet:hover { background: #edf4ef; }
.button.quiet { color: #405f50; background: transparent; }
.topbar .button.quiet { color: #ebf7ef; }
.topbar .button.quiet:hover { background: #305643; }
.button.danger-text { background: transparent; color: var(--red); }
.button.danger-text:hover { background: #fff0ef; }
.button.danger { background: #a92e31; color: #fff; }
.button.danger:hover { background: #8d2326; }
.button.small { min-height: 30px; font-size: 12px; padding: 4px 7px; }
.button.full { width: 100%; }

label { display: grid; gap: 4px; min-width: 0; font-weight: 650; font-size: 12px; color: #345343; }
input:not([type=hidden]), select, textarea { width: 100%; min-width: 0; min-height: 35px; border: 1px solid #cbdad1; border-radius: 7px; background: #fff; color: var(--ink); padding: 6px 8px; }
input::placeholder { color: #657a70; }
select { text-overflow: ellipsis; }
fieldset:disabled input { background: #f5f7f6; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.alert { border: 1px solid #cddfd3; padding: 10px 13px; border-radius: 8px; background: #eaf5ed; }
.alert.is-error { color: #8d2b2b; background: #fff1ef; border-color: #f2d2cf; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 11px; overflow-wrap: anywhere; }
.notice p { font-size: 13px; margin-top: 3px; }

.panel { margin-top: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); overflow: hidden; }
.panel-head { display: flex; padding: 13px 16px; }
.panel-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.lookup { display: grid; gap: 5px; padding: 0 16px 11px; }
.lookup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; max-width: 660px; }
.lookup-row input, code, [data-issued-code], textarea { font-family: ui-monospace, Consolas, monospace; }
.table-tools { display: flex; gap: 7px; padding: 0 16px 10px; }
.table-tools input { width: min(100%, 257px); }
.table-tools select { width: 111px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; text-align: left; }
th, td { padding: 8px 13px; border-top: 1px solid var(--line); }
th { font-size: 12px; color: #466255; background: #f7f9f8; }
td { font-size: 13px; }
tr.matched, tr:hover { background: #eff8f1; }
code { color: #305448; }
.pill { display: inline-flex; padding: 3px 7px; border-radius: 14px; font-size: 11px; font-weight: 700; }
.pill.good { background: #e2f2e9; color: #23644c; }
.pill.bad { background: #fceae8; color: #a12b2b; }
.pill.warn { background: #fff2db; color: #875821; }
.pill.neutral { background: #eaf0ef; color: #4f6761; }
.row-actions { display: flex; gap: 3px; }
.empty { padding: 14px 16px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; }

dialog { width: min(434px, calc(100vw - 26px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 55px #1632275c; color: var(--ink); }
dialog::backdrop { background: #142d22b8; }
dialog form.form-stack, .receipt { padding: 19px; }
.form-stack { display: grid; gap: 12px; }
.form-stack p, .receipt p { font-size: 13px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 7px; padding-top: 3px; }
#issued-dialog { width: min(596px, calc(100vw - 26px)); }
.receipt { display: grid; gap: 9px; }
.issued-list { display: grid; gap: 5px; max-height: min(250px, 42dvh); overflow: auto; padding: 2px 2px 4px; }
.issued-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.issued-row input { font-size: 13px; background: #f6faf7; }
.field-status, .receipt-hint { color: var(--muted); font-size: 12px; }
.field-status:empty { display: none; }
.receipt textarea { resize: vertical; }

.signin { min-height: 100dvh; display: grid; place-items: center; padding: 22px 12px; background: radial-gradient(ellipse at 32% 18%, #e0f0e7, transparent 60%), #f2f6f3; }
.signin-card { width: min(100%, 440px); padding: 26px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 18px 58px #213c3020; }
.signin-brand { margin-bottom: 23px; }
.signin-brand small { color: #506b61; }
.eyebrow { color: #467365; font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.signin-card h1 { font-size: clamp(22px, 6vw, 28px); margin: 6px 0; }
.signin-card > p.muted { font-size: 14px; line-height: 1.6; }
.signin-card .form-stack { margin-top: 17px; }
.signin-card .alert { margin-top: 10px; }
.signin-footer { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.dot { display: inline-block; margin-right: 3px; width: 6px; height: 6px; background: #46a477; border-radius: 100%; }

@media (max-width: 640px) {
  .topbar-inner, .workspace { width: calc(100% - 22px); }
  .steps { grid-template-columns: 1fr; gap: 7px; }
  .step { min-height: 0; }
  .notice { align-items: flex-start; flex-direction: column; }
  th, td { padding-inline: 8px; }
}

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.service-tag { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: #fff; font-size: 12px; }
.page-notice { margin: 0 0 12px; }
.panel-head { justify-content: space-between; align-items: center; }
.record-count { padding: 4px 8px; color: var(--green); background: #e8f3ea; border-radius: 8px; font-size: 12px; font-weight: 650; }
[aria-busy="true"] { cursor: wait; opacity: .62; }
.detail { display: grid; gap: 13px; padding: 19px; }
#detail-dialog { width: min(710px, calc(100vw - 24px)); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.detail-head h2 { font-size: 21px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #f7faf8; }
.detail-grid .wide { grid-column: 1 / -1; }
.detail-grid dt { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.detail-grid dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.secret-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: end; gap: 6px; }
.secret-row input { font-family: ui-monospace, Consolas, monospace; }
.detail-actions { justify-content: flex-end; }
.profile-form { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.profile-form h3 { margin: 0 0 4px; font-size: 16px; }
.profile-section { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.profile-section summary { cursor: pointer; font-weight: 650; font-size: 13px; }
.profile-section label { margin-top: 7px; }
.profile-section textarea { min-height: 74px; resize: vertical; }
.upload-label input { font: 12px system-ui, sans-serif; }
@media (max-width: 640px) {
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-labels { grid-template-columns: 1fr; }
  .service-tag { display: none; }
}


.admin-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
}
.sidebar {
  grid-row: 1 / 3;
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 22px 14px;
  color: #fff;
  background: #163329;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 5px 24px; font-weight: 700; }
.sidebar-brand small { display: block; margin-top: 4px; color: #bfd5cb; font-size: 12px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar button {
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  color: #dcebe4;
  background: transparent;
  text-align: left;
}
.sidebar button:hover, .sidebar button[aria-current="page"] { color: #fff; background: #2c5544; }
.admin-layout .topbar, .admin-layout .workspace { grid-column: 2; }
.admin-layout .workspace, .admin-layout .topbar-inner { width: calc(100% - 56px); }
.admin-layout .workspace { padding-top: 28px; }
.admin-layout .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-layout .step { min-height: 0; padding: 18px; gap: 10px; }
.admin-layout .issue-step, .admin-layout .panel { margin-top: 20px; }
.admin-layout .issue-form fieldset { max-width: 580px; }
.admin-layout .issue-form .button { width: auto; justify-self: start; }
.admin-layout .panel-head { align-items: center; padding: 17px 19px; gap: 12px; }
.admin-layout td { padding-block: 12px; }
.table-code { display: flex; align-items: center; gap: 8px; }
.table-code input { width: 23ch; min-height: 30px; font: 650 13px ui-monospace, Consolas, monospace; }
.secret-row { grid-template-columns: minmax(0, 1fr) auto; }
.global-lookup { padding: 14px 18px 10px; margin-bottom: 18px; }
@media (max-width: 850px) {
  .admin-layout { grid-template-columns: 154px minmax(0, 1fr); }
  .admin-layout .workspace, .admin-layout .topbar-inner { width: calc(100% - 28px); }
  .admin-layout .steps { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 560px) {
  .admin-layout { display: block; }
  .sidebar { position: relative; height: auto; padding: 12px; }
  .sidebar-brand { padding-bottom: 10px; }
  .sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .sidebar button { padding: 8px; text-align: center; }
  .admin-layout .topbar-inner { min-height: 48px; }
}


.workspace-grid { display: grid; min-width: 0; }
.workspace-main { min-width: 0; }
.workspace-grid.has-inspector {
  grid-template-columns: minmax(225px, .85fr) minmax(320px, 1.15fr);
  align-items: start;
  gap: 16px;
}
.has-inspector .steps { grid-template-columns: 1fr; }
.card-inspector {
  min-width: 0;
  position: sticky;
  top: 14px;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.card-inspector dialog[open] {
  position: static;
  width: 100% !important;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.card-inspector .detail { padding: 14px; }
.card-inspector .detail-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 6px;
  background: var(--paper);
}
.card-inspector .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-inspector .profile-labels { grid-template-columns: 1fr; }
.card-inspector .field-pair input { min-width: 0; }
.batch-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 12px 10px; }
.batch-lookup button { justify-self: start; }
.pick-col { width: 31px; padding-inline: 7px; }
.pick-col input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--green); cursor: pointer; vertical-align: middle; }
.pickable-row { cursor: pointer; }
#history-table td { white-space: normal; overflow-wrap: anywhere; }
#history-table td, #history-table th { padding-inline: 7px; }
.report-pane { container: account-report / inline-size; }
.card-inspector .report-pane { padding: 15px 17px; gap: 12px; }
.report-section { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.report-section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 9px; }
.report-section h3 { margin: 0; font-size: 16px; }
.report-empty { margin: 0; padding: 9px 0 2px; }
.report-credentials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 8px; }
.report-credentials div { padding: 7px 9px; border-radius: 7px; background: var(--canvas); }
.report-credentials dt, .report-proxy > span { font-size: 12px; color: var(--muted); }
.report-credentials dd { margin: 3px 0 0; overflow-wrap: anywhere; user-select: text; }
.report-proxy { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.report-proxy code { flex: 1; min-width: 0; white-space: nowrap; overflow-x: auto; user-select: text; }
.credential-fields { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
#backup-dialog { width: min(600px, calc(100vw - 32px)); }
.setting-list { margin: 0; }
.setting-list > div { display: grid; grid-template-columns: minmax(92px, .8fr) minmax(0, 1.2fr); gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.setting-list > div:last-child { border-bottom: 0; }
.setting-list dt { color: var(--muted); overflow-wrap: anywhere; }
.setting-list dd { margin: 0; overflow-wrap: anywhere; user-select: text; }
.setting-list summary { cursor: pointer; }
.setting-list .setting-list { margin: 4px 0 0; }
.pill.event-playing { background: #e5f0f7; color: #244c69; }
#history-table table { min-width: 0; }
#history-table td { font-variant-numeric: tabular-nums; }
@container account-report (max-width: 640px) {
  #history-table table, #history-table tbody { display: block; }
  #history-table thead { display: none; }
  #history-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 8px; padding: 8px 2px; border-top: 1px solid var(--line); }
  .admin-layout #history-table td { border: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  #history-table td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
  #history-table td[data-missing] { display: none; }
  #history-table td:last-child { grid-column: 1 / -1; }
}
tr.is-inspected { background: #e2f3e9; }
@media (max-width: 799px) {
  .workspace-grid.has-inspector { grid-template-columns: minmax(0, 1fr); }
  .card-inspector {
    position: fixed;
    top: 65px;
    right: 8px;
    z-index: 4;
    width: min(430px, calc(100vw - 16px));
    max-height: calc(100dvh - 75px);
    box-shadow: 0 10px 35px #152b2460;
  }
}
@media (max-width: 560px) {
  .sidebar nav { grid-template-columns: repeat(2, 1fr); }
}


.scope-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; }
.scope-bar label { flex: 0 1 220px; min-width: 130px; }
.scope-bar .button-row { flex-wrap: wrap; }
.customer-workbench { display: grid; grid-template-columns: clamp(190px, 24%, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-layout .customer-workbench > .panel { margin-top: 0; min-width: 0; }
.customer-row { cursor: pointer; }
.customer-row:hover { background: var(--canvas); }
.customer-row.is-selected { background: #e2f3e9; }
.customer-row td:first-child { white-space: normal; }
.customer-row td:last-child { width: 1%; }
.customer-name { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; text-decoration: none; }
.customer-name:hover { text-decoration: underline; }
.customer-row-status { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; color: var(--muted); font-size: 12px; }

.customer-report-panel { container: customer-report / inline-size; }
#customer-report-title { overflow-wrap: anywhere; }
.customer-report-panel .report-section { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 13px 16px; }
.customer-report-panel .report-section-head { flex-wrap: wrap; }
.customer-list-tabs { display: flex; gap: 30px; margin-bottom: 3px; }
.customer-list-tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 0 17px; border: 0; background: transparent; color: #8a968e; font-size: 14px; font-weight: 550; }
.customer-list-tabs button[aria-selected="true"] { color: #275a40; }
.customer-list-tabs button[aria-selected="true"]::after { content: ""; position: absolute; bottom: -3px; left: 0; right: 0; height: 2px; background: #40845b; }
.tab-count { display: inline-flex; align-items: center; min-width: 22px; height: 18px; justify-content: center; padding-inline: 5px; border-radius: 5px; font-size: 10px; background: #f1f4f2; color: #8c9c91; }
.customer-list-tabs button[aria-selected="true"] .tab-count { background: #eaf4ed; color: #498260; }
.customer-list-pager { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 17px; font-size: 11px; color: #8b998f; }
.customer-list-pager > div { display: flex; align-items: center; gap: 10px; }
.customer-list-pager .button { font-size: 11px; color: #5d7d68; }
.customer-list-pager .button:disabled { color: #aab5ad; opacity: .55; }
.server-log-panel .panel-head { justify-content: space-between; gap: 18px; align-items: flex-start; }
.server-log-panel .panel-head p { max-width: 720px; line-height: 1.7; }
.server-log-pager { padding: 16px 20px; border-top: 1px solid var(--line); }
.customer-connection { display: flex; flex-wrap: wrap; gap: 18px 45px; padding-top: 20px; }
.customer-connection > div { display: grid; gap: 8px; }
.customer-connection span { font-size: 10px; color: #8a998e; }
.customer-connection strong { font-size: 11px; font-weight: 450; color: #566f5e; }
.connection-policy { margin-top: 17px; font-size: 10px; color: #95a198; line-height: 1.7; }
.account-credential, .account-proxy-address { font-family: Consolas, monospace; font-size: 11px; }
#customer-accounts-table .table-code { gap: 4px; }
#customer-accounts-table .table-code input { width: 20ch; padding: 3px 4px; min-height: 26px; border-color: transparent; font: 11px Consolas, monospace; color: #405e4a; background: #f6f9f6; }
#customer-accounts-table .table-code button { padding-inline: 5px; min-height: 25px; font-size: 10px; }
#customer-accounts-table th, #customer-accounts-table td { padding-inline: 10px; }
#customer-accounts-table th:first-child, #customer-accounts-table td:first-child { padding-left: 22px; }
.customer-report-panel .report-empty { text-align: left; }
.customer-report-logs td { vertical-align: top; }
#device-opens-table td:last-child { min-width: 180px; white-space: normal; }
.customer-machine-fields { display: grid; gap: 4px; margin: 0; }
.customer-machine-fields > div { display: grid; grid-template-columns: minmax(64px, 2fr) minmax(0, 3fr); gap: 8px; }
.customer-machine-fields dt { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.customer-machine-fields dd { margin: 0; overflow-wrap: anywhere; }
#customer-app-keys { display: grid; gap: 5px; }
#customer-app-keys .table-code input { max-width: 100%; min-width: 0; }
#customer-app-notice:empty { display: none; }

.customer-settings-row { display: flex; align-items: center; gap: 8px; }
.customer-settings-row > span:first-child { color: var(--muted); font-size: 12px; }
.customer-date-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.customer-settings-actions { flex-wrap: wrap; }
#customer-app-policy label { margin-top: 7px; }

@media (max-width: 740px) {
  .customer-workbench { grid-template-columns: minmax(0, 1fr); }
}
@container customer-report (max-width: 660px) {
  .customer-report-logs thead { display: none; }
  .customer-report-logs tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px;
    padding: 10px 0; border-top: 1px solid var(--line);
  }
  .admin-layout .customer-report-logs td { border: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  .customer-report-logs td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
  #device-opens-table td:last-child { grid-column: 1 / -1; min-width: 0; }
}

/* Current administration workbench. */
.admin-layout { grid-template-columns: 208px minmax(0, 1fr); }
.sidebar { background: #182e27; padding: 31px 16px 20px; display: flex; flex-direction: column; }
.sidebar-brand { font-size: 18px; padding: 0 10px 39px; gap: 11px; font-weight: 650; }
.sidebar-brand small { color: #91aaa0; letter-spacing: .16em; font-size: 10px; margin-top: 6px; }
.sidebar .mark { color: #fff; border: 1px solid #537367; background: #2b4a3e; border-radius: 11px; width: 38px; height: 38px; font-size: 19px; font-weight: 500; }
.sidebar nav { gap: 7px; }
.sidebar button { min-height: 44px; color: #a7bcb2; padding: 12px 16px; font-weight: 500; border-radius: 7px; }
.sidebar button:hover { background: #243f33; }
.sidebar button[aria-current=page] { background: #315c47; color: #fff; box-shadow: inset 3px 0 #a7d1ac; }
.sidebar-footer { margin-top: auto; padding: 20px 12px 0; color: #8ba499; font-size: 11px; }
.admin-layout .topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.admin-layout .topbar-inner { min-height: 68px; width: calc(100% - 64px); }
.topbar-context { display: flex; align-items: center; gap: 13px; font-size: 12px; color: var(--muted); }
.topbar-context strong { color: #42534b; font-weight: 550; }
.separator { color: #c8d1cc; }
.topbar .button.quiet { color: #6b7b72; font-size: 12px; min-height: 30px; }
.topbar .button.quiet:hover { color: #24553f; background: #f0f5f2; }
.admin-layout .workspace { width: calc(100% - 64px); max-width: 1800px; padding-top: 29px; }
.workspace h1 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; }
.page-heading { margin-bottom: 23px; align-items: center; }
.intro { font-size: 12px; margin: 8px 0 0; color: #839088; }
.service-tag { font-size: 11px; padding: 6px 10px; background: transparent; border-color: #dde6e0; color: #687d70; }
.dot { background: #4f9c72; width: 6px; height: 6px; }
.scope-bar { margin-bottom: 20px; gap: 12px; align-items: center; }
.scope-bar label { display: flex; align-items: center; gap: 12px; flex-basis: 252px; color: #79877f; font-weight: 500; font-size: 12px; }
.scope-bar label select { font-weight: 500; padding: 8px 11px; border-color: #dfe6e1; border-radius: 7px; max-width: 210px; }
#workspace-controls { margin-left: auto; }
.button { font-size: 12px; min-height: 36px; font-weight: 550; padding-inline: 14px; }
.button.secondary { border-color: #dce5de; color: #4b6557; }
.button.small { font-size: 11px; padding-inline: 10px; min-height: 28px; }
.panel, .admin-layout .step { border-radius: 10px; box-shadow: 0 2px 4px #20382a03; }
.panel-head { justify-content: space-between; }
.panel-head h2, .report-section h3 { font-size: 14px; font-weight: 650; }
.record-count { font-size: 11px; color: #8a978f; font-weight: 400; }
.customer-workbench { grid-template-columns: 268px minmax(0, 1fr); gap: 22px; }
.customer-list-panel thead { display: none; }
.customer-row td { padding: 20px 18px; }
.customer-row td:last-child { padding-left: 0; padding-right: 14px; }
.customer-row .button { border-color: transparent; background: transparent; padding-inline: 6px; color: #668270; }
.customer-row.is-selected { background: #edf5ef; box-shadow: inset 3px 0 #3c8056; }
.customer-row-status { display: grid; gap: 7px; margin-top: 9px; font-size: 10px; }
.customer-row-status .pill { justify-self: start; border-radius: 4px; padding: 2px 5px; font-size: 10px; }
.customer-name { font-size: 13px; font-weight: 600; }
.customer-report-panel .panel-head { padding: 20px 22px; }
#customer-report-title { font-size: 18px; }
.customer-report-panel .report-section { padding: 21px 22px; }
.report-section-head { margin-bottom: 15px; }
#customer-app-keys .table-code { gap: 12px; }
#customer-app-keys .table-code input { border: 0; border-radius: 5px; background: #f1f5f2; width: 29ch; min-height: 38px; padding: 9px 12px; color: #2a4d3a; font-size: 14px; font-weight: 550; letter-spacing: .04em; }
th { color: #88978e; font-weight: 500; font-size: 10px; background: #f8faf8; }
td { font-size: 11px; }
th, td { padding-inline: 12px; border-color: #edf1ee; }
.admin-layout td { padding-block: 15px; }
.number-cell { font-variant-numeric: tabular-nums; color: #415b4b; }
.customer-report-logs .table-scroll { margin-inline: -22px; }
.customer-report-logs td:first-child, .customer-report-logs th:first-child { padding-left: 22px; }
.pill { border-radius: 5px; font-size: 10px; font-weight: 500; padding: 3px 6px; }
.pill.good { color: #37825a; background: #ebf6ef; }
.pill.neutral { color: #8a968e; background: #f0f3f1; }
.pill.bad { color: #be6565; background: #fff0ed; }
.pill.warn { color: #b38c45; background: #fff7e7; }
.machine-details summary { cursor: pointer; font-size: 11px; color: #658171; }
.machine-details[open] .customer-machine-fields { margin-top: 12px; }
.customer-machine-fields { min-width: 240px; font-size: 11px; }
.customer-machine-fields dt { font-size: 10px; }
.systems-workbench { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-layout .systems-workbench .panel { margin-top: 0; }
.system-select { position: relative; display: grid; gap: 9px; width: 100%; padding: 21px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.system-select strong { font-size: 12px; font-weight: 550; color: var(--ink); padding-right: 48px; overflow-wrap: anywhere; }
.system-select > span:last-child { font-size: 10px; color: var(--muted); }
.system-select .system-availability { position: absolute; top: 21px; right: 13px; color: #6c8e78; font-size: 10px; }
.system-select.is-selected { background: #edf5ef; box-shadow: inset 3px 0 #3c8056; }
.system-detail-head p { margin-top: 8px; }
.system-identity { display: flex; align-items: center; gap: 16px; margin: 0 22px; padding: 24px 0; border-top: 1px solid var(--line); }
.system-identity h3 { font-size: 15px; margin: 0 0 8px; font-weight: 550; }
.system-identity p { font-size: 12px; }
.system-device-mark { display: block; position: relative; width: 51px; height: 51px; border-radius: 11px; background: #edf5ef; flex-shrink: 0; }
.system-device-mark::before { content: ""; position: absolute; top: 12px; left: 11px; width: 29px; height: 20px; border: 1.5px solid #629278; border-radius: 3px; }
.system-device-mark::after { content: ""; position: absolute; left: 17px; top: 36px; width: 18px; height: 1.5px; background: #629278; box-shadow: 0 -3px #629278; }
.revision-tag { margin-left: auto; color: #819487; font-size: 11px; white-space: nowrap; }
.system-detail-panel .report-section { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 24px 22px; border-radius: 0; }
.system-detail-panel .report-section h3 { margin: 0 0 19px; }
.system-fields { margin: 0; display: grid; gap: 17px; }
.system-fields > div { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 20px; }
.system-fields dt { color: #8b998f; font-size: 12px; }
.system-fields dd { margin: 0; color: #455e4f; overflow-wrap: anywhere; font-size: 12px; }
.system-downloads { padding: 19px 22px; display: flex; gap: 10px; background: #fbfcfb; border-top: 1px solid var(--line); }
.release-panel .panel-head p { font: 10px Consolas, monospace; overflow-wrap: anywhere; margin-top: 12px; }
.release-identity { display: flex; gap: 24px; align-items: center; padding: 17px 21px; background: #f9fbf9; border-block: 1px solid var(--line); font-size: 11px; color: #849388; }
.release-identity code { word-break: break-all; font-size: 11px; color: #577361; }
.manifest-hash { font: 10px Consolas, monospace; color: #8d9c92; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.publish-form { padding: 8px 22px 22px; display: grid; gap: 20px; max-width: 900px; }
.publish-form label { font-weight: 500; gap: 8px; }
.publish-form input { font-family: Consolas, monospace; min-height: 40px; }
.publish-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 11px; }
@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .admin-layout .workspace, .admin-layout .topbar-inner { width: calc(100% - 36px); }
  .sidebar-brand { font-size: 15px; padding-inline: 0; }
  .customer-workbench, .systems-workbench { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  #customer-rows { display: flex; }
  .customer-row { display: table; flex: 1 1 0; min-width: 0; width: 0; border-right: 1px solid var(--line); }
  .systems-list { display: flex; overflow-x: auto; }
  .system-select { min-width: 235px; }
  #release-table table, #release-table tbody { display: block; }
  #release-table thead { display: none; }
  #release-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 14px 22px; border-top: 1px solid var(--line); }
  .admin-layout #release-table td { border: 0; padding: 5px 0; min-width: 0; }
  #release-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
  #release-table td:nth-child(2) { grid-column: 1; font-size: 10px; color: var(--muted); }
  #release-table td:nth-child(3) { grid-column: 1 / -1; max-width: none; white-space: normal; overflow-wrap: anywhere; }
  #release-table td:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; padding-left: 15px; }
  .customer-row td { padding-inline: 13px; }
}
@media (max-width: 740px) {
  .admin-layout { grid-template-columns: 150px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .sidebar-brand { font-size: 15px; padding-inline: 0; }
  .sidebar .mark { width: 29px; flex-basis: 29px; height: 32px; }
  .customer-workbench, .systems-workbench { grid-template-columns: minmax(0, 1fr); }
  .system-fields > div { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
  .publish-actions { align-items: start; flex-direction: column; }
}
@media (max-width: 560px) {
  .admin-layout { display: block; }
  .sidebar { padding: 16px; }
  .sidebar-brand { padding-bottom: 18px; }
  .sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .sidebar button { min-height: 34px; font-size: 12px; padding: 8px 5px; }
  .sidebar-footer { display: none; }
  .admin-layout .topbar-inner { min-height: 50px; }
  .scope-bar .button-row { margin-left: 0; }
}



.customer-page-options { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; color:var(--muted); font-size:12px; }
.scheme-report-version { display:block; margin:5px 0; color:var(--muted); }
.scheme-report-dialog { width:min(960px,calc(100vw - 40px)); max-height:85vh; overflow:auto; padding:26px; border:1px solid #cfdad2; border-radius:16px; background:#fff; color:#26372d; }
.scheme-report-dialog::backdrop { background:#172e2580; }
.security-event-dialog .customer-machine-fields { min-width:0; white-space:normal; gap:8px; margin:18px 0; font-size:13px; }
.security-event-dialog .customer-machine-fields dt { font-size:12px; }
.security-event-dialog h2 { overflow-wrap:anywhere; }
.scheme-report-dialog details { margin-top:12px; padding:14px; border:1px solid #e0e8e2; border-radius:10px; }
.scheme-report-dialog summary { cursor:pointer; font-weight:600; }
.scheme-report-fields > div { display:grid; grid-template-columns:minmax(100px,1fr) minmax(100px,2fr); gap:18px; padding:7px 0; border-bottom:1px solid #edf1ed; }
.scheme-report-fields dt,.scheme-report-fields dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.customer-page-options label,.customer-list-pager label { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.customer-page-options select,.customer-list-pager select { width:auto; min-width:68px; padding:6px 9px; }
.page-jump input { width:64px; min-width:0; padding:6px; text-align:center; }
.customer-report-panel .report-collapsible > summary { cursor:pointer; list-style:none; margin:0; justify-content:flex-start; }
.report-collapsible > summary::-webkit-details-marker { display:none; }
.report-collapsible > summary::before { content:"▸"; color:#658171; transition:transform .15s; }
.report-collapsible[open] > summary::before { transform:rotate(90deg); }
.report-collapsible > summary .record-count { margin-left:auto; }
.report-collapsible[open] > summary { margin-bottom:15px; }
@media(max-width:900px) { .customer-list-pager,.customer-list-pager > div { flex-wrap:wrap; } .customer-page-options { flex-wrap:wrap; } }

.customer-app-scope { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.computer-picker { display:flex; align-items:center; gap:10px; min-width:230px; }
.computer-picker select { min-width:200px; }
.account-proxy-compact { white-space:nowrap; font-family:ui-monospace,monospace; font-size:12px; }
.scheme-name-button { border:0; background:none; padding:7px 0; color:#246344; cursor:pointer; font:inherit; text-align:left; }
.scheme-name-button:hover { text-decoration:underline; }
.scheme-editor fieldset { border:0; padding:0; margin:0; min-width:0; }
.scheme-editor fieldset:disabled { opacity:1; }
.scheme-editor input:disabled,.scheme-editor select:disabled { color:#3a4941; opacity:1; background:#f5f7f5; }
.scheme-edit-row { display:grid; grid-template-columns:minmax(130px,1fr) minmax(180px,2fr); align-items:start; gap:16px; padding:9px 0; }
.scheme-edit-row > span { padding-top:9px; }
.scheme-edit-field { min-width:0; }
.scheme-edit-field input[type=checkbox] { width:18px; margin-top:10px; }
.scheme-array-item { display:flex; align-items:start; gap:10px; margin-bottom:8px; border-bottom:1px solid #e5ece6; }
.scheme-array-item > .scheme-edit-field { flex:1; }
.scheme-editor .dialog-actions { position:sticky; bottom:-26px; background:white; padding:16px 0; margin-top:16px; }
@media(max-width:650px){.scheme-edit-row{grid-template-columns:1fr;gap:3px}.scheme-edit-row>span{padding:0}.computer-picker{width:100%}}

.computer-picker { white-space:nowrap; }
#customer-accounts-table table,#customer-overview-table table { display:table; min-width:100%; }
#customer-accounts-table thead,#customer-overview-table thead { display:table-header-group; }
#customer-accounts-table tbody,#customer-overview-table tbody { display:table-row-group; }
#customer-accounts-table tr,#customer-overview-table tr { display:table-row; }
#customer-accounts-table th,#customer-accounts-table td,#customer-overview-table th,#customer-overview-table td { display:table-cell; white-space:nowrap; width:auto; }
#customer-accounts-table td::before,#customer-overview-table td::before { display:none; }

.game-history-dialog table {min-width:650px;}
.game-history-dialog th,.game-history-dialog td {white-space:nowrap;}

.cloud-scheme-editor { width:min(1120px,calc(100vw - 32px)); }
.cloud-scheme-editor>fieldset {border:0;padding:0;margin:0;min-width:0;}
.cloud-settings-section {border:1px solid #d7e1da;border-radius:12px;padding:20px;margin-top:20px;}
.cloud-settings-section h3 {margin:0 0 18px;color:#356347;font-size:17px;}
.cloud-form-row {display:grid;grid-template-columns:130px minmax(0,1fr);gap:16px;align-items:start;margin:11px 0;}
.cloud-form-label {padding-top:10px;white-space:nowrap;}
.cloud-form-value,.cloud-inline {display:flex;align-items:center;gap:10px;min-width:0;}
.cloud-form-value>input,.cloud-form-value>select {flex:1;min-width:0;}
.cloud-form-value .cloud-unit {flex:1;}
.cloud-unit {display:flex;align-items:center;gap:8px;min-width:0;}
.cloud-unit input {min-width:0;flex:1;}
.cloud-checkbox {display:flex;align-items:center;gap:10px;margin:12px 0;}
.cloud-checkbox input {width:18px;height:18px;}
.cloud-side-tasks {margin:12px 0;}
.cloud-side-tasks>summary {display:inline-block;cursor:pointer;}
.cloud-side-list {max-height:280px;overflow:auto;margin-top:12px;border:1px solid #d7e1da;padding:12px;border-radius:8px;}
.cloud-plan-table {min-width:620px;}
.cloud-plan-table input {min-width:70px;}
.cloud-plan-table td:nth-child(3) {width:45%;}
.cloud-trade-items {min-height:160px;border:1px solid #d7e1da;border-radius:8px;padding:8px;margin:12px 0;}
.cloud-trade-item {display:flex;gap:10px;padding:7px;border-radius:6px;}
.cloud-trade-item>input {flex:1;min-width:0;}
.cloud-trade-item .cloud-unit {width:120px;}
.cloud-trade-item.selected {background:#eaf3ec;}
.cloud-scheme-editor input:disabled,.cloud-scheme-editor select:disabled {color:#354d3d;background:#f7faf7;opacity:1;}
.cloud-scheme-editor .dialog-actions {position:sticky;bottom:-26px;background:white;padding:16px 0;}
@media(max-width:650px){.cloud-form-row{grid-template-columns:1fr;gap:4px}.cloud-form-label{padding:0}.cloud-settings-section{padding:12px}.cloud-form-value{flex-wrap:wrap}}

.game-history-dialog table {display:table;}
.game-history-dialog thead {display:table-header-group;}
.game-history-dialog tbody {display:table-row-group;}
.game-history-dialog tr {display:table-row;}
.game-history-dialog th,.game-history-dialog td {display:table-cell;white-space:nowrap;}
.game-history-dialog td::before {display:none;}
