:root, html[data-theme="light"], html[data-theme="dark"] {
  color-scheme: light;
  --primary:#2563eb; --secondary:#1e40af; --accent:#fff;
  --primary-fg:#fff; --body-fg:#26334b; --body-bg:#f4f6fa; --body-quiet-color:#64748b;
  --body-loud-color:#17243b; --header-color:#fff; --header-branding-color:#17243b;
  --header-bg:#fff; --header-link-color:#475569; --breadcrumbs-fg:#64748b;
  --breadcrumbs-link-fg:#475569; --breadcrumbs-bg:#f4f6fa;
  --link-fg:#245ac4; --link-hover-color:#163f97; --link-selected-fg:#163f97;
  --hairline-color:#edf0f5; --border-color:#dfe5ee; --darkened-bg:#f7f9fc;
  --selected-bg:#edf3ff; --selected-row:#eff5ff; --button-bg:#2563eb;
  --button-hover-bg:#1d4ed8; --default-button-bg:#2563eb; --default-button-hover-bg:#1d4ed8;
  --close-button-bg:#64748b; --close-button-hover-bg:#475569;
  --object-tools-fg:#334155; --object-tools-bg:#e9eef7; --object-tools-hover-bg:#dce6f7;
  --error-fg:#b42318; --delete-button-bg:#b42318; --delete-button-hover-bg:#912018;
}
* {box-sizing:border-box}
body {font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;font-size:14px;line-height:1.6}
a,button,input,select,textarea {transition:background-color .15s,border-color .15s}
button,input,select,textarea {font:inherit}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline:3px solid #93b4ff;outline-offset:3px}
#header {min-height:82px;padding:18px 32px;border-bottom:1px solid var(--border-color);gap:20px;flex-shrink:0}
#header a.brand {color:#17243b;display:flex;align-items:center;gap:12px;font-weight:750;font-size:21px;line-height:1.25;text-decoration:none}
.brand-icon {width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#2563eb;color:#fff;font-size:23px}
.brand-caption {display:block;font-size:11px;color:#7a879b;font-weight:500;letter-spacing:3px;margin-top:5px}
#user-tools {font-size:12px;display:flex;align-items:center;gap:18px;letter-spacing:0}
#header #user-tools a,#header #user-tools button {border:0;color:#536178}
.user-greeting {padding:5px 12px;border-radius:20px;background:#f0f4fa;color:#374761}
div.breadcrumbs {padding:14px 32px;border-bottom:1px solid #e8edf4;font-size:12px}
#content {padding:28px 32px;min-width:0}
#content > h1 {font-size:25px;font-weight:700;color:#17243b;margin:0 0 24px}
#content h2 {font-size:17px;font-weight:650;margin:0 0 14px}
#nav-sidebar {background:#fff;padding:24px 16px;border-right:1px solid var(--border-color);width:238px;flex-basis:238px;left:-238px;margin-left:-238px}
.main.shifted > #nav-sidebar + .content {max-width:calc(100% - 262px)}
#nav-sidebar .module {background:transparent;margin:16px 0 24px;border:0;box-shadow:none}
#nav-sidebar table {width:100%}
#nav-sidebar th,#nav-sidebar td {border:0;padding:10px 12px}
#nav-sidebar th a {font-weight:500;color:#526078;display:block}
#nav-sidebar caption {background:transparent;padding:6px 12px;text-align:left}
#nav-sidebar caption a {color:#94a0b4;font-size:11px;font-weight:650}
#nav-sidebar .current-model {background:#edf3ff;border-radius:8px}
#nav-sidebar .current-model th a {color:#245ac4;font-weight:650}
#nav-sidebar .addlink {font-size:11px;background:none}
#nav-filter {width:100%;padding:10px 12px;margin:14px 0;border:1px solid #e5eaf2;border-radius:8px;background:#f8fafc;font-size:12px}
.overview-link {display:block;padding:11px 12px;font-weight:650;border-radius:8px}
.overview-link span {margin-right:8px;font-size:18px}
.overview-link.selected {background:#edf3ff;color:#245ac4}
.toggle-nav-sidebar {border:0;border-right:1px solid #e4e9f2;background:#fff;color:#64748b}
.dashboard #content {width:auto}
.dashboard-intro {display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:28px}
.dashboard-intro h2 {font-size:27px!important;letter-spacing:-.5px;margin:0 0 8px!important}
.eyebrow {color:#2563eb;font-size:12px;font-weight:700;letter-spacing:2px;margin:0 0 8px}
.muted {color:#718096;font-size:13px;line-height:1.8}
.workspace-tag {border:1px solid #dbe5f6;padding:7px 14px;border-radius:20px;color:#627694;font-size:12px;white-space:nowrap}
.stats-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:24px}
.stat-card {background:#fff;border:1px solid #e5eaf2;border-radius:12px;padding:22px;display:flex;flex-direction:column;gap:8px;box-shadow:0 3px 10px #20335003}
.stat-card:hover {border-color:#b1c9fa;box-shadow:0 5px 18px #2563eb0a}
.stat-card span {color:#64748b;font-size:13px}
.stat-card strong {font-size:34px;line-height:1.3;color:#182a48;font-weight:700}
.stat-card small {font-size:11px;color:#8491a6}
.stat-card:nth-child(2) strong {color:#15805d}.stat-card:nth-child(3) strong {color:#bc831e}.stat-card:nth-child(4) strong {color:#8d6470}
.panel {background:#fff;border:1px solid #e5eaf2;border-radius:12px;padding:26px;margin-bottom:24px;box-shadow:0 3px 10px #20335003}
.quick-actions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.quick-card {border:1px solid #e8edf6;border-radius:10px;padding:20px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.quick-card:hover {background:#f8faff;border-color:#b5cafa}
.quick-card strong {font-size:15px;color:#233553}.quick-card > span:last-child {font-size:12px;color:#7c899e}
.quick-icon {width:35px;height:35px;border-radius:9px;background:#edf3ff;color:#2563eb;display:grid;place-items:center;font-size:22px;margin-bottom:3px}
.module {background:#fff;border-radius:10px;overflow:hidden}
.module h2,.module caption,.inline-group h2 {background:#edf2fa;color:#334760;font-size:14px;letter-spacing:0;text-transform:none;padding:12px 18px}
.module caption a {color:#334760!important}
.module-directory .module {border:1px solid #e9edf4;margin-top:16px}
.dashboard .module table {width:100%}
.dashboard .module th {width:auto}
#changelist {border:1px solid #e5eaf2;border-radius:12px;overflow:hidden}
#changelist #toolbar {padding:18px;background:#fff;border-bottom:1px solid #e9edf4}
#toolbar #searchbar {min-height:38px;max-width:100%;border-radius:7px;padding:7px 10px;width:320px}
#toolbar #searchbar_helptext {color:#7a889c;font-size:12px}
#changelist .actions {padding:14px 18px;background:#fff;border-bottom:1px solid #edf0f5}
#changelist .actions select {height:36px;padding:5px 9px;max-width:100%}
#changelist .actions .button,#toolbar form input[type=submit] {min-height:36px;padding:6px 15px;border-radius:7px}
#changelist .results {overflow:auto}
table thead th {background:#f8fafc;color:#6d7d93;font-size:12px;border-top:0}
thead th.sorted {background:#edf2fa}
td,th {padding:14px 16px;font-size:13px;border-bottom:1px solid #edf0f5;vertical-align:middle}
#result_list tbody tr:hover {background:#f8faff}
#result_list .field-authorization_id {font-family:ui-monospace,Consolas,monospace;font-size:12px;min-width:200px;overflow-wrap:anywhere;white-space:normal}
#result_list .field-order_note {max-width:280px;overflow-wrap:anywhere}
#changelist-filter {background:#fff;border-left:1px solid #e8edf4}
#changelist-filter h2 {background:#fff;color:#334155;padding:18px;font-size:14px;border-bottom:1px solid #edf0f5}
#changelist-filter h3 {font-size:12px;color:#78869b;font-weight:650}
#changelist-filter li.selected {border-left-color:#2563eb}
#changelist-filter li.selected a {color:#2563eb}
.object-tools {font-size:12px;margin-bottom:18px;display:flex;gap:8px;flex-wrap:wrap}
.object-tools li {padding:0;height:auto;float:none;margin:0}
.object-tools a {border-radius:7px;padding:9px 14px;line-height:1.6;text-transform:none;letter-spacing:0}
.object-tools a.primary-link,.primary-link:link,.primary-link:visited {background:#2563eb;color:#fff}
.status {display:inline-block;border-radius:20px;padding:3px 10px;font-size:11px;white-space:nowrap;font-weight:600}
.status-active {background:#e9f8f1;color:#16815f}.status-pending {background:#fff5df;color:#9f7019}.status-disabled {background:#f4eaf0;color:#956475}
fieldset.module {border:1px solid #e5eaf2;margin-bottom:22px}
.aligned .form-row {padding:17px 22px}
.aligned label {color:#63738b}
input[type=text],input[type=password],input[type=email],input[type=number],input[type=url],select,textarea {border:1px solid #dbe3ee;border-radius:7px;padding:10px 12px;color:#26334b;background:#fff}
input:focus,textarea:focus,select:focus {border-color:#779ef3}
.submit-row {border:1px solid #e5eaf2;background:#fff;border-radius:10px;padding:18px;display:flex;flex-wrap:wrap;gap:10px}
.button,input[type=submit],input[type=button],button.primary,.copy-button {border-radius:7px;padding:10px 17px;border:0;cursor:pointer;font-weight:550;font-size:13px;text-decoration:none;display:inline-block;line-height:1.6}
button.primary {background:#2563eb;color:#fff}button.primary:hover {background:#1d4ed8}
button:disabled {opacity:.6;cursor:wait}
.secondary:link,.secondary:visited {background:#eef2f8;color:#536178}
.copy-button {background:#edf3ff;color:#2563eb;white-space:nowrap}
.form-layout {display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:24px;max-width:1160px}
.mode-tabs {display:flex;gap:24px;border-bottom:1px solid #edf0f5;margin-bottom:20px}
.mode-tabs a {padding:0 0 13px;color:#718096;font-weight:650}
.mode-tabs a.current {color:#2563eb;border-bottom:3px solid #2563eb}
.issue-panel .form-row {border:0;padding:12px 0}
.issue-panel label {display:block;margin:0 0 8px;color:#42536b;font-size:13px;font-weight:600}
.issue-panel input:not([type=hidden]),.issue-panel textarea {width:100%}
.issue-panel input[type=number] {max-width:180px}
.optional {font-size:11px;color:#94a0b1;font-weight:400;margin-left:10px}
.form-actions {display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:22px 0 0}
.help-panel {align-self:start;background:#fafcff}
.help-panel ol {padding-left:20px;color:#62738c;font-size:13px}
.help-panel li {padding:8px 0}
.credentials-panel {padding:24px}
.credential-row {display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 0;border-top:1px solid #edf0f5}
.credential-row > div {min-width:0;flex:1}
.detail-label {display:block;font-size:12px;color:#7d8aa0;margin-bottom:8px}
.credential-row code {font:14px/1.8 ui-monospace,Consolas,monospace;color:#263e65;overflow-wrap:anywhere;user-select:all}
.table-scroll {overflow:auto;margin-top:24px}.receipt-table {width:100%}
.confirm-panel {max-width:850px}.selected-licenses {overflow-wrap:anywhere;padding-left:20px}
.site-footer {padding:16px 32px 24px;color:#96a1b1;font-size:11px;text-align:center}
.mobile-navigation {display:none}
#nav-sidebar tbody tr {background:transparent}
#nav-sidebar tbody tr.current-model {background:#edf3ff}
#copy-feedback {position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:#1e3355;color:#fff;box-shadow:0 8px 28px #172b4d33;padding:12px 20px;border-radius:9px;font-size:13px;z-index:1000;display:none;max-width:90%}
#copy-feedback.visible {display:block}
ul.messagelist li {padding:14px 24px 14px 50px;margin:0 0 12px;border-radius:8px}
.login {background:#f4f6fa!important}
.login #container {border:1px solid #e2e8f2!important;border-radius:18px;box-shadow:0 18px 65px #1f3b6512;max-width:440px;width:calc(100% - 36px)!important;margin:9vh auto!important}
.login #header {padding:28px 32px;justify-content:center}
.login #content {padding:28px 32px 10px!important}
.login .form-row {padding:10px 0!important}
.login .form-row label {font-size:13px!important;color:#64748b;line-height:2!important}
.login .form-row input {padding:11px!important;border-radius:7px}
.login .remember-login label {display:flex;align-items:center;gap:8px;float:none;width:auto;cursor:pointer}
.login .remember-login input[type=checkbox] {width:16px;height:16px;flex:0 0 16px;margin:0;padding:0!important;accent-color:#2563eb}
.login .submit-row {padding:12px 0!important;border:0;margin:12px 0 0!important}
.login .submit-row input {width:100%;padding:12px}
.login #content-main {float:none}
.login #content,.login #footer {background:#fff}
@media(max-width:767px) {.mobile-navigation {display:flex;gap:8px;width:100%;overflow:auto;margin-top:14px}.mobile-navigation a {padding:7px 12px;border-radius:7px;background:#eef3fc;color:#365580!important;white-space:nowrap;font-size:12px}#header {display:block;height:auto}#user-tools {margin-top:14px}.readonly {overflow-wrap:anywhere}}
@media(max-width:1200px) {.stats-grid {gap:12px}.stat-card {padding:17px}.quick-card {padding:16px}.workspace-tag {display:none}}
@media(max-width:1024px) {#content {padding:24px}.stats-grid {grid-template-columns:repeat(2,minmax(0,1fr))}.form-layout {grid-template-columns:1fr}.help-panel {max-width:none}.quick-actions {grid-template-columns:1fr}.quick-card {gap:5px}.quick-icon {display:none}}
@media(max-width:767px) {#header {padding:16px 20px;align-items:flex-start;gap:15px}#user-tools {width:100%;justify-content:flex-end;font-size:11px;gap:12px}div.breadcrumbs {padding:12px 20px}#content {padding:20px 16px}#content > h1 {font-size:22px;margin-bottom:20px}.main.shifted > #nav-sidebar + .content {max-width:100%}.dashboard-intro h2 {font-size:21px!important}.dashboard-intro {margin-bottom:20px}.stats-grid {gap:10px}.stat-card {padding:16px}.stat-card strong {font-size:29px}.stat-card small {font-size:10px}.panel {padding:20px}.credential-row {align-items:flex-start;flex-direction:column;gap:12px}.object-tools {margin:0 0 18px}#changelist-filter {border-left:0;border-top:1px solid #e8edf4}#changelist-filter h2 {margin:0}#toolbar #searchbar {width:100%;min-width:0}#changelist .actions label {display:block}#changelist .actions select {width:100%;margin:8px 0}.form-actions > .button,.form-actions > button {text-align:center}.aligned .form-row {padding:15px}.submit-row {align-items:stretch}.submit-row input {margin:0!important}.site-footer {padding:18px}.login #header {padding:24px}.login #content {padding:20px 24px 8px!important}}

.credential-qr { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 16px; }
.credential-qr img, .receipt-table img { max-width: 100%; height: auto; background: #fff; }
.credential-qr > div { flex: 1; min-width: 200px; }
