:root {
  --bg: #eef0f3;
  --surface: #ffffff;
  --surface-muted: #f4f6f8;
  --surface-strong: #e9edf2;
  --text: #111827;
  --muted: #64748b;
  --muted-strong: #475569;
  --border: #d6dbe1;
  --border-soft: #e3e7ec;
  --primary: #0b5bd3;
  --primary-soft: #eaf2ff;
  --primary-ink: #ffffff;
  --success: #0f766e;
  --success-soft: #e6faf6;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --danger: #b4232f;
  --danger-soft: #fff1f2;
  --focus: rgba(37, 99, 235, 0.28);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
}

:root[data-admin-theme="business_blue"] {
  --bg: #f3f6fb;
  --surface-muted: #f7faff;
  --surface-strong: #e5efff;
  --border: #cfd9e8;
  --border-soft: #dce5f1;
  --primary: #0052d9;
  --primary-soft: #e8f1ff;
  --focus: rgba(0, 82, 217, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.entry {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), transparent 38%),
    linear-gradient(315deg, rgba(15, 118, 110, 0.12), transparent 42%),
    var(--bg);
}

.entry section {
  width: min(760px, 100%);
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.entry h1,
.topbar h1 {
  margin: 0;
  letter-spacing: 0;
}

.entry h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
}

.entry p {
  color: var(--muted);
  font-size: 17px;
  max-width: 660px;
}

.entry-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--border);
  padding: 0 8px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 200px;
  align-self: stretch;
  min-height: 56px;
  padding: 0 22px;
  border-right: 1px solid var(--border);
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 124px;
  height: 30px;
  object-fit: contain;
}

.nav {
  display: grid;
  gap: 2px;
}

.grouped-nav {
  gap: 0;
}

.nav-section {
  display: grid;
  gap: 0;
}

.nav-section-toggle {
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-section-toggle:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.nav-section.has-active-item > .nav-section-toggle {
  color: var(--primary);
}

.nav-icon,
.nav-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-chevron {
  width: 14px;
  height: 14px;
  justify-self: end;
  transition: transform 160ms ease;
}

.nav-section:not(.is-collapsed) .nav-chevron {
  transform: rotate(180deg);
}

.nav-section-items {
  display: grid;
  gap: 0;
}

.nav-section.is-collapsed .nav-section-items {
  display: none;
}

.nav-item {
  width: 100%;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  padding: 7px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.nav-item.active {
  color: var(--primary);
  background: #e7eef8;
  font-weight: 700;
  box-shadow: none;
}

.client-shell .nav-item.active {
  color: var(--muted-strong);
  background: var(--primary-soft);
  font-weight: 400;
  box-shadow: none;
}

.client-shell .nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.client-shell .nav-item:not(.active):hover {
  color: var(--muted-strong);
  background: transparent;
}

.client-shell .nav-item.active:hover {
  color: var(--muted-strong);
  background: var(--primary-soft);
}

.client-shell .nav-item.is-iconless {
  grid-template-columns: minmax(0, 1fr);
}

.client-shell .nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-nav-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.client-shell .client-nav-child {
  min-height: 32px;
  padding: 6px 10px 6px 40px;
  font-size: 13px;
  line-height: 1.4;
}

.client-shell .client-nav-group {
  display: grid;
  gap: 0;
}

.client-shell .client-nav-group .nav-section-toggle {
  font-weight: 400;
}

.client-shell .client-nav-group.is-iconless .nav-section-toggle {
  grid-template-columns: minmax(0, 1fr) 16px;
}

.client-shell .client-nav-children {
  display: grid;
  gap: 0;
}

.client-shell .client-nav-child {
  min-height: 32px;
}

.grouped-nav .nav-item.active {
  background: var(--surface-strong);
  color: var(--primary);
  box-shadow: none;
}

.nav-plugin-item {
  overflow-wrap: anywhere;
}

.client-shell .plugin-nav-item {
  color: var(--muted-strong);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 14px;
}

.sidebar-footer a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: 18px 22px 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 38px;
  margin-bottom: 12px;
}

.topbar.compact {
  justify-content: flex-end;
}

.topbar h1 {
  color: var(--text);
  font-size: 22px;
  line-height: 1.16;
}

.topbar-spacer {
  flex: 1 1 auto;
}

.admin-menu {
  position: relative;
}

.admin-menu summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.admin-menu summary::-webkit-details-marker {
  display: none;
}

.admin-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted-strong);
  border-bottom: 1.5px solid var(--muted-strong);
  transform: rotate(45deg) translateY(-2px);
}

.admin-menu[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.admin-avatar {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.admin-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 5;
  width: 180px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.admin-menu-panel span {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.inline-form,
.form-grid {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: minmax(160px, 220px) minmax(140px, 180px) auto auto;
  align-items: center;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus);
  outline: 0;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-settings-page {
  display: grid;
  gap: 16px;
}

.settings-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0 4px;
}

.settings-page-head h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.settings-page-head p {
  margin: 6px 0 0;
  color: var(--muted-strong);
}

.admin-settings-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.settings-stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-stat-strip div {
  min-height: 70px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
  border-right: 1px solid var(--border-soft);
}

.settings-stat-strip div:last-child {
  border-right: 0;
}

.settings-stat-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-stat-strip strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.admin-management-grid,
.role-permission-matrix {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(300px, 360px);
  gap: 14px;
  align-items: start;
}

.role-permission-matrix {
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
}

.admin-editor-panel,
.role-editor-panel {
  position: sticky;
  top: 18px;
}

.admin-directory-panel table {
  min-width: 560px;
}

.role-directory-panel table {
  min-width: 520px;
}

.panel-header.vertical,
.panel-header > div {
  min-width: 0;
}

.panel-header.vertical {
  align-items: flex-start;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-form {
  gap: 12px;
}

.role-editor-form {
  gap: 14px;
}

.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.cell-id {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.system-settings-panel {
  width: 100%;
  max-width: none;
}

.system-settings-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.system-settings-form .form-actions,
.system-logo-preview {
  grid-column: 1 / -1;
}

.system-logo-preview {
  display: flex;
  align-items: center;
  min-height: 82px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-subtle);
}

.system-logo-preview img {
  max-width: 220px;
  max-height: 64px;
  object-fit: contain;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.permission-matrix {
  display: grid;
  gap: 10px;
}

.permission-module {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.permission-module-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-muted);
}

.permission-module-head strong,
.permission-check strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.permission-module-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.permission-module-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
}

.permission-module-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.permission-check {
  min-width: 0;
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.permission-check:nth-child(2n) {
  border-right: 0;
}

.permission-check input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

.permission-check span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.permission-check small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.btn,
.text-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.btn.compact {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.btn:hover,
.text-button:hover {
  border-color: #b8c4d5;
  background: var(--surface-muted);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
  box-shadow: none;
}

.btn.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn.success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  box-shadow: none;
}

.btn.success:hover {
  background: #0f6b64;
  border-color: #0f6b64;
}

.btn.warn {
  background: var(--warning-soft);
  border-color: #fed7aa;
  color: var(--warning);
}

.btn.danger {
  background: var(--danger-soft);
  border-color: #fecdd3;
  color: var(--danger);
}

.text-button {
  text-align: left;
  background: transparent;
  color: inherit;
  border-color: var(--border);
}

.text-link {
  min-height: 30px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.text-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-service-name {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.client-service-name:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice {
  margin-bottom: 16px;
  padding: 13px 15px;
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  color: var(--success);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.notice.error {
  background: var(--danger-soft);
  border-color: #fecdd3;
  color: var(--danger);
}

.client-message-toast {
  position: fixed;
  z-index: 120;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 94px;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid #8fd7b1;
  border-radius: 4px;
  background: #eefbf4;
  color: var(--success);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.client-message-toast.success {
  border-color: #8fd7b1;
  background: #eefbf4;
  color: var(--success);
}

.client-message-toast.error {
  border-color: #fecdd3;
  background: var(--danger-soft);
  color: var(--danger);
}

.client-message-layer {
  position: fixed;
  inset: 0;
  z-index: 121;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.34);
}

.client-message-modal {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 30px 32px 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.client-message-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.client-message-icon.success {
  background: var(--success);
}

.client-message-icon.error {
  background: var(--danger);
}

.client-message-icon.warning {
  background: var(--warning);
}

.client-message-body {
  display: grid;
  gap: 6px;
}

.client-message-body h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.client-message-body p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.client-message-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 4px;
}

.client-message-actions .btn {
  min-width: 92px;
}

.view {
  display: grid;
  gap: 14px;
}

.view[tabindex="-1"]:focus {
  outline: 0;
}

.install-page {
  background: var(--bg);
}

.install-workspace {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.install-workspace .topbar {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.install-workspace .notice {
  margin-bottom: 12px;
}

.install-workspace .view {
  gap: 12px;
}

.install-workspace .panel {
  border-radius: 6px;
}

.install-panel-header {
  align-items: flex-start;
}

.install-panel-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.install-table table {
  min-width: 680px;
}

.install-table th:nth-child(1),
.install-table td:nth-child(1) {
  width: 170px;
}

.install-table th:nth-child(2),
.install-table td:nth-child(2) {
  width: 96px;
}

.install-form {
  gap: 0;
}

.install-field {
  display: grid;
  grid-template-columns: 132px minmax(240px, 1fr) minmax(220px, 0.85fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.install-field:first-child {
  padding-top: 0;
}

.install-field-label {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.install-field-label em {
  margin-left: 3px;
  color: var(--danger);
  font-style: normal;
}

.install-field-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.install-check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  color: var(--muted-strong);
  border-bottom: 1px solid var(--border-soft);
}

.install-check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
  padding: 0;
  box-shadow: none;
}

.install-check-row strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.install-check-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.install-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
}

.install-installed-panel {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 24px;
}

.install-installed-state {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.install-installed-actions {
  padding-top: 6px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.panel,
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.metric {
  min-height: 92px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric span,
.muted {
  color: var(--muted);
}

.panel {
  padding: 18px 20px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.panel-header h4 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.todo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.todo-item {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
}

.todo-item span {
  color: var(--muted-strong);
}

.todo-item strong {
  color: var(--text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: var(--surface);
}

th,
td {
  padding: 12px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

tbody tr:hover {
  background: var(--surface-muted);
}

tr:last-child td {
  border-bottom: 0;
}

.client-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted-strong);
  font-size: 13px;
}

.client-pager-total {
  margin-right: auto;
  color: var(--muted);
}

.client-page-size {
  width: auto;
}

.client-page-size select,
.client-page-jump input {
  width: auto;
  min-height: 30px;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
}

.client-page-size select {
  min-width: 94px;
}

.client-page-nav,
.client-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.client-page-btn {
  min-width: 30px;
  min-height: 30px;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0 8px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.client-page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.client-page-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.client-page-btn:disabled {
  cursor: not-allowed;
  border-color: var(--border-soft);
  color: #b6c0cc;
  background: var(--surface-muted);
}

.client-page-jump input {
  max-width: 58px;
  text-align: center;
}

.client-page-btn:focus,
.client-page-btn:focus-visible,
.client-page-size select:focus,
.client-page-size select:focus-visible,
.client-page-jump input:focus,
.client-page-jump input:focus-visible {
  border-color: var(--border-soft);
  box-shadow: none;
  outline: 0;
}

th {
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.active,
.status.paid,
.status.answered,
.status.enabled,
.status.visible,
.status.approved {
  background: var(--success-soft);
  color: var(--success);
}

.status.unpaid,
.status.open,
.status.customer-reply,
.status.pending,
.status.processing,
.status.unsubmitted,
.status.hidden,
.status.disabled {
  background: var(--warning-soft);
  color: var(--warning);
}

.status.suspended,
.status.terminated,
.status.rejected,
.status.failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.product-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.product-card__meta {
  display: grid;
  gap: 8px;
}

.product-card__description {
  max-height: 142px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
}

.product-card__description p,
.product-card__description ul,
.product-card__description ol,
.product-card__description blockquote {
  margin: 0 0 6px;
}

.product-card__description ul,
.product-card__description ol {
  padding-left: 18px;
}

.product-card__description img {
  max-width: 100%;
  height: auto;
}

.product-card__description table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.product-card__description th,
.product-card__description td {
  border: 1px solid var(--border-soft);
  padding: 5px 7px;
}

.product-card__footer {
  justify-content: space-between;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.product-card__price {
  color: var(--text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.shop-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.shop-config-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.shop-region-panel,
.shop-config-panel,
.shop-summary-panel {
  border-radius: 6px;
}

.shop-region-panel {
  display: grid;
  gap: 16px;
}

.shop-region-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.shop-row-label {
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 38px;
}

.shop-region-options,
.shop-option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-choice,
.shop-option,
.shop-route-card,
.shop-zone-card {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.shop-choice {
  position: relative;
  min-width: 124px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.shop-choice strong,
.shop-route-card strong {
  font-weight: 500;
}

.shop-choice em {
  position: absolute;
  top: 0;
  right: 0;
  padding: 1px 7px;
  background: var(--danger);
  color: var(--primary-ink);
  font-size: 12px;
  font-style: normal;
  line-height: 18px;
}

.shop-choice.active,
.shop-option.active,
.shop-route-card.active,
.shop-zone-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(11, 91, 211, 0.18);
}

.shop-route-card {
  width: min(360px, 100%);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 8px;
}

.shop-route-card small {
  grid-column: 2;
  color: var(--success);
  font-size: 12px;
}

.shop-zone-card {
  width: 96px;
  padding: 0 12px;
}

.shop-auto-zone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 42px;
}

.shop-auto-zone input {
  width: 14px;
  min-height: 14px;
  padding: 0;
}

.shop-config-panel {
  display: grid;
  gap: 14px;
}

.shop-filter-bar {
  display: grid;
  grid-template-columns: auto minmax(120px, 150px) minmax(120px, 150px) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  color: var(--muted-strong);
  font-size: 13px;
}

.shop-filter-bar input,
.shop-filter-bar select {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.shop-spec-table table {
  min-width: 920px;
}

.shop-spec-table th,
.shop-spec-table td {
  padding: 11px 12px;
  font-size: 13px;
  vertical-align: middle;
}

.shop-spec-row {
  cursor: pointer;
}

.shop-spec-row.active {
  background: #e8f2ff;
}

.shop-radio-dot {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.shop-spec-row.active .shop-radio-dot {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 4px var(--primary);
}

.shop-cart-icon {
  margin-right: 6px;
  color: var(--warning);
}

.shop-spec-table strong {
  color: #e7472e;
  font-weight: 500;
}

.shop-section-block {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.shop-section-block h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.shop-option {
  padding: 9px 14px;
  font-size: 13px;
}

.shop-buy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 220px));
  gap: 12px;
}

.shop-buy-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 13px;
}

.shop-product-description {
  max-height: 72px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.shop-product-description p,
.shop-product-description ul,
.shop-product-description ol {
  margin: 0 0 6px;
}

.shop-summary-panel {
  position: sticky;
  top: 74px;
  padding: 0;
  overflow: hidden;
}

.shop-summary-head {
  min-height: 56px;
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-muted);
}

.shop-summary-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.shop-summary-head span {
  color: var(--warning);
  font-size: 13px;
}

.shop-summary-list {
  margin: 0;
}

.shop-summary-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.shop-summary-list dt {
  color: var(--muted);
  font-size: 13px;
}

.shop-summary-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.shop-summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 8px;
}

.shop-summary-total span {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.shop-summary-total strong {
  color: #e7472e;
  font-size: 26px;
  line-height: 1;
}

.shop-summary-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  padding: 12px 18px 18px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.config-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.client-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.client-overview-products {
  height: 260px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.client-overview-products .table-wrap {
  min-height: 0;
  overflow: auto;
}

.client-overview-profile {
  min-height: 260px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.overview-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.overview-profile-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #9b1b5a;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.overview-profile-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.overview-profile-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-profile-main .overview-profile-account-id,
.overview-profile-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.overview-profile-account-id {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  line-height: 1.4;
}

.overview-profile-account-value {
  color: var(--text);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-profile-copy {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.overview-profile-copy svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: miter;
}

.overview-profile-facts {
  display: grid;
  gap: 9px;
  margin: 0;
}

.overview-profile-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.overview-profile-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  text-align: right;
  overflow-wrap: anywhere;
}

.overview-profile-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: auto;
}

.overview-profile-action {
  min-width: 0;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid #1d5cff;
  border-radius: 2px;
  background: #fff;
  color: #0750d8;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.overview-profile-action svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.overview-profile-action:hover {
  background: #f4f8ff;
}

.overview-profile-action:disabled {
  border-color: var(--border);
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}

.quick-action-grid {
  display: grid;
  gap: 10px;
}

.notice-list {
  display: grid;
  gap: 10px;
}

.notice-list article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: var(--surface-muted);
}

.notice-list strong,
.notice-list span,
.notice-list small {
  overflow-wrap: anywhere;
}

.notice-list strong {
  color: var(--text);
}

.notice-list span {
  color: var(--muted-strong);
}

.notice-list small {
  color: var(--muted);
  font-size: 12px;
}

.compact-notice-list article {
  padding: 10px 12px;
}

.ticket-detail-panel {
  display: grid;
  gap: 14px;
}

.ticket-detail-panel[hidden] {
  display: none;
}

.ticket-thread {
  display: grid;
  gap: 10px;
}

.ticket-thread article {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}

.ticket-thread article div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.ticket-thread strong {
  color: var(--heading);
}

.ticket-thread p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.7;
}

.ticket-reply-form {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.payment-output,
.api-key-output {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: var(--surface-muted);
}

.payment-output[hidden] {
  display: none;
}

.payment-output strong,
.api-key-output strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.client-security-workspace {
  display: grid;
  gap: 14px;
}

.client-security-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 40px;
  border-bottom: 1px solid var(--border-soft);
}

.client-security-tab {
  min-height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 0 10px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 14px;
  cursor: pointer;
}

.client-security-tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.client-security-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

.api-key-create-form[hidden],
.api-key-output[hidden] {
  display: none;
}

.api-white-list-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-size: 12px;
}

.api-white-list-status.enabled {
  background: var(--primary-soft);
  color: var(--primary);
}

.api-delete-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background-color 160ms ease, color 160ms ease;
}

.api-delete-button:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.api-delete-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.58);
}

.client-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}

.client-modal form {
  display: grid;
  gap: 22px;
  padding: 56px 80px 30px;
}

.client-modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
}

.client-modal-alert {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 4px;
  background: #dbeafe;
  color: var(--primary);
  font-size: 14px;
}

.client-modal-alert button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.client-switch-row {
  display: grid;
  grid-template-columns: 88px auto;
  align-items: center;
  gap: 16px;
  color: var(--text);
}

.client-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-flex;
}

.client-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.client-switch i {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 160ms ease;
}

.client-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: transform 160ms ease;
}

.client-switch input:checked + i {
  background: var(--primary);
}

.client-switch input:checked + i::after {
  transform: translateX(18px);
}

.client-modal-help {
  margin: -8px 0 0 104px;
  color: var(--muted);
  font-size: 14px;
}

.client-modal-field {
  display: grid;
  gap: 10px;
  color: var(--text);
}

.client-modal-field textarea {
  width: 100%;
  min-height: 106px;
  resize: vertical;
}

.client-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 6px;
}

.client-modal-actions .btn {
  min-width: 112px;
}

.api-create-modal {
  width: min(600px, 100%);
}

.api-created-content {
  display: grid;
  gap: 16px;
  padding: 36px 42px 24px;
  text-align: left;
}

.api-created-result {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 22px;
  background: var(--surface);
}

.api-created-result dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.api-created-result dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.api-created-result dt,
.api-created-result dd {
  margin: 0;
  color: var(--muted-strong);
}

.api-created-result dd {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.api-created-result code {
  min-width: 0;
  max-width: 100%;
  color: var(--muted-strong);
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-created-result .text-link {
  flex: 0 0 auto;
  min-width: 36px;
  text-align: center;
  white-space: nowrap;
}

.api-created-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 14px;
}

.api-created-confirm input {
  width: 16px;
  min-height: 16px;
  margin-top: 3px;
}

.api-created-confirm strong {
  color: var(--warning);
  font-weight: 500;
}

.api-created-actions {
  justify-content: flex-end;
}

.service-detail-panel {
  max-width: none;
}

.service-detail-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-detail-facts dt,
.service-detail-facts dd {
  font-weight: 400;
}

.service-task-block {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.service-task-block h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.empty-state {
  color: var(--muted);
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 16px;
}

.client-empty-state {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
}

.client-empty-state span {
  color: var(--muted-strong);
  font-size: 14px;
}

.client-empty-state small {
  color: var(--muted);
  font-size: 12px;
}

.table-empty-row td {
  padding: 8px;
  background: var(--surface);
  text-align: center;
}

.table-empty-row .client-empty-state {
  margin: 0;
}

.client-inline-error {
  grid-column: 1 / -1;
  min-height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(180, 35, 47, 0.2);
  border-radius: 4px;
  padding: 7px 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
}

.client-inline-error[hidden] {
  display: none;
}

.theme-layout {
  min-height: 620px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.theme-sidebar {
  padding: 18px 0;
  border-right: 1px solid var(--border);
  background: var(--surface-muted);
}

.theme-sidebar-title,
.theme-area {
  min-height: 44px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 26px;
}

.theme-sidebar-title {
  color: var(--text);
  font-weight: 700;
}

.theme-area {
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  cursor: pointer;
}

.theme-area:hover,
.theme-area.active {
  color: var(--primary);
  background: #e7eef8;
  font-weight: 700;
}

.theme-board {
  min-width: 0;
  padding: 30px 32px;
}

.theme-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.theme-tabs {
  display: inline-flex;
  padding: 0;
  background: var(--surface-strong);
  border-radius: 6px;
  overflow: hidden;
}

.theme-tab {
  min-width: 86px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
}

.theme-tab.active {
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 28px;
  align-items: start;
}

.theme-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.theme-card.is-current {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(11, 91, 211, 0.12), var(--shadow-sm);
}

.theme-preview {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(11, 91, 211, 0.12), transparent 44%),
    var(--surface-muted);
  border-bottom: 1px solid var(--border-soft);
}

.theme-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.theme-preview-fallback {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--text);
  text-align: center;
}

.theme-preview-fallback strong {
  font-size: 28px;
  line-height: 1.1;
}

.theme-preview-fallback span {
  color: var(--muted);
}

.theme-card-footer {
  min-height: 94px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
}

.theme-card-footer h3 {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 18px;
}

.theme-card-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.theme-card-footer .theme-path {
  margin-top: 6px;
  color: var(--text);
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.btn:disabled {
  cursor: default;
  opacity: 0.78;
}

.btn.primary:disabled {
  border-color: #cbd5e1;
  background: #cbd5e1;
  color: #ffffff;
  box-shadow: none;
}

.client-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: 48px;
  padding: 48px max(28px, calc((100vw - 1120px) / 2));
  background:
    linear-gradient(135deg, rgba(0, 82, 217, 0.1), transparent 36%),
    linear-gradient(315deg, rgba(15, 118, 110, 0.1), transparent 42%),
    var(--bg);
}

.client-auth-copy {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.client-auth-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
}

.client-auth-logo {
  display: block;
  width: auto;
  max-width: 188px;
  height: 36px;
  object-fit: contain;
}

.client-auth-copy h1 {
  max-width: 680px;
  margin: 0;
  color: var(--text);
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.client-auth-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.75;
}

.client-auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-auth-points span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted-strong);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.client-auth-panel {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.client-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.client-auth-tabs span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--surface-muted);
}

.auth-form,
.field {
  display: grid;
  gap: 10px;
}

.compact-auth-form {
  padding-top: 2px;
}

.field label,
.field > span > label,
.client-inline-form label,
.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.field.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field.two-col span {
  display: grid;
  gap: 7px;
}

.install-form .install-field {
  gap: 12px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.install-form .install-check-row {
  gap: 10px;
  color: var(--muted-strong);
  font-size: inherit;
  font-weight: inherit;
}

.auth-submit {
  width: 100%;
  justify-content: center;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--border-soft);
}

.client-shell > .client-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  min-height: 56px;
  margin: 0;
  padding: 0 14px 0 0;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
}

.client-console-home {
  min-height: 38px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
}

.client-console-home:hover,
.client-console-home:focus-visible {
  background: var(--surface-muted);
  color: var(--primary);
}

.client-console-home svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-session {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.client-notice-button {
  position: relative;
  width: 46px;
  height: 48px;
  border: 0;
  border-left: 1px solid var(--border-soft);
  border-radius: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
}

.client-notice-button:hover,
.client-notice-button:focus-visible {
  color: var(--primary);
  background: var(--surface-muted);
}

.client-notice-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-notice-button span {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 4;
  min-width: 68px;
  min-height: 44px;
  display: none;
  place-items: center;
  padding: 0 12px;
  transform: translateX(-50%);
  background: #fff;
  color: #1f2937;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  white-space: nowrap;
}

.client-notice-button span::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
}

.client-notice-button:hover span,
.client-notice-button:focus-visible span {
  display: grid;
}

.client-account-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.client-account-trigger {
  min-height: 48px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.client-account-trigger:hover,
.client-account-trigger:focus-visible,
.client-account-trigger[aria-expanded="true"] {
  background: var(--surface-muted);
}

.client-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #bd2d6b;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.client-session-meta {
  min-height: 38px;
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 1px;
  padding: 0 4px 0 10px;
}

.client-session-meta span,
.client-session-meta strong {
  display: block;
  line-height: 1.2;
}

.client-session-meta span {
  max-width: 112px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-session-meta strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.client-account-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 20;
  width: 224px;
  padding: 8px 0;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.client-account-dropdown[hidden] {
  display: none;
}

.client-account-dropdown::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 22px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--border-soft);
  border-left: 1px solid var(--border-soft);
  background: var(--surface);
  transform: rotate(45deg);
}

.client-account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.client-account-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-account-summary span {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid #16a34a;
  border-radius: 999px;
  color: #15803d;
  background: #f0fdf4;
  font-size: 12px;
  line-height: 1.4;
}

.client-account-actions {
  display: grid;
  padding: 6px;
}

.client-account-action {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.client-account-action:hover,
.client-account-action:focus-visible {
  background: var(--surface-muted);
  color: var(--text);
}

.client-account-action.danger {
  color: var(--danger);
}

.client-inline-form {
  grid-template-columns: minmax(180px, 260px) auto;
  align-items: end;
}

.profile-enterprise-page {
  display: grid;
  gap: 8px;
}

.profile-enterprise-head {
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0;
}

.client-page-head h4,
.profile-enterprise-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.client-page-head {
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  padding: 0;
}

.profile-enterprise-tabs {
  width: 100%;
  min-height: 34px;
  border-bottom: 1px solid var(--border-soft);
  display: inline-flex;
  gap: 26px;
  margin-top: 0;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.profile-enterprise-tabs span,
.profile-enterprise-tabs button {
  position: relative;
  min-height: 34px;
  border: 0;
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.profile-enterprise-tabs span.active,
.profile-enterprise-tabs button.active {
  color: var(--primary);
}

.profile-enterprise-tabs span.active::after,
.profile-enterprise-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
}

.profile-info-card {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.profile-tab-panel[data-profile-panel="basic"] {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 14px;
}

.profile-tab-panel[hidden] {
  display: none !important;
}

.profile-audit-panel {
  width: 100%;
  max-width: none;
}

.profile-identity-banner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 0 16px;
}

.profile-identity-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-identity-main > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 8px;
}

.profile-identity-main strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-identity-main span:not(.profile-avatar) {
  color: #d46b6b;
  font-size: 20px;
  font-weight: 800;
}

.profile-identity-main small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
}

.profile-realname-link {
  min-height: 34px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.profile-realname-link:hover,
.profile-realname-link:focus-visible {
  color: var(--primary);
}

.profile-realname-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  padding: 4px;
  background: #10b981;
  color: #fff;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: none;
}

.profile-overview-panel {
  position: static;
}

.profile-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.profile-main-column {
  min-width: 0;
}

.profile-facts {
  margin: 0;
  display: grid;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
}

.profile-facts div {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.profile-facts div:last-child {
  border-bottom: 0;
}

.profile-facts dt,
.profile-facts dd {
  margin: 0;
}

.profile-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-facts dd {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sub-account-panel {
  max-width: 1180px;
}

.sub-account-form {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.sub-account-form[hidden],
.sub-account-password-form[hidden] {
  display: none;
}

.sub-account-permissions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.sub-account-permission-group {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
}

.sub-account-permission-group legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sub-account-permission-group label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 13px;
}

.sub-account-permission-group input {
  width: 15px;
  height: 15px;
}

.sub-account-password-form {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.sub-account-permission-summary {
  max-width: 320px;
  white-space: normal;
}

.client-plugin-panel {
  max-width: 760px;
}

.client-plugin-widgets {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-plugin-widgets span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 5px 10px;
  color: var(--muted-strong);
  background: var(--surface-muted);
  font-size: 13px;
  font-weight: 700;
}

.realname-workspace {
  display: grid;
  gap: 14px;
}

.realname-client-panel {
  display: grid;
  justify-items: center;
  gap: 26px;
  min-height: 470px;
  max-width: none;
  padding: 42px 28px 38px;
}

.realname-intro {
  max-width: 820px;
  text-align: center;
}

.realname-intro h3 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
}

.realname-intro p {
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.8;
}

.realname-method-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 440px));
  justify-content: center;
  gap: 40px;
}

.realname-method-card {
  min-height: 258px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 28px 28px 22px;
  background: var(--surface);
}

.realname-method-card.disabled {
  opacity: 0.55;
}

.realname-method-icon {
  width: 40px;
  height: 40px;
  color: #1f2937;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.realname-method-card h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.realname-method-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.realname-method-card ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 2px;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.realname-method-card li {
  position: relative;
  padding-left: 18px;
}

.realname-method-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
}

.realname-method-card li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 3px;
  height: 5px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg);
}

.realname-method-card .btn {
  min-width: 128px;
  min-height: 34px;
  justify-content: center;
  margin-top: 4px;
  padding: 6px 18px;
}

.realname-status-facts {
  width: min(780px, 100%);
  margin: 0;
}

.realname-client-actions {
  margin-top: -8px;
}

.realname-submit-panel {
  max-width: 1180px;
}

.realname-submit-panel[hidden] {
  display: none;
}

.realname-provider-note {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 7px 10px;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.realname-provider-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--surface);
}

.realname-provider-status-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 28px;
}

.realname-provider-status-content {
  display: grid;
  min-width: 0;
  justify-items: start;
  gap: 6px;
}

.realname-provider-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.realname-provider-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.realname-provider-badge.warning {
  border-color: rgba(223, 124, 23, 0.28);
  background: rgba(223, 124, 23, 0.1);
  color: #9a4b00;
}

.realname-provider-status small {
  color: var(--muted);
  line-height: 1.5;
}

.realname-provider-select {
  grid-column: 1 / -1;
  max-width: 420px;
}

.profile-main-column {
  display: grid;
  gap: 12px;
}

.profile-section-title {
  margin-bottom: 12px;
  padding-left: 9px;
  border-left: 3px solid var(--primary);
}

.profile-section-title h2 {
  font-size: 15px;
  line-height: 1.35;
}

.profile-section-title p {
  margin-top: 3px;
  font-size: 12px;
}

.profile-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.profile-form-grid.profile-compact-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px 28px;
}

.profile-compact-form label {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-compact-form input {
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.profile-compact-form input:focus {
  border-bottom-color: var(--primary);
  box-shadow: 0 1px 0 var(--primary);
}

.profile-compact-form input:disabled {
  background: transparent;
}

.profile-form-grid .form-actions {
  grid-column: 1 / -1;
}

.profile-compact-form .form-actions {
  align-self: end;
}

.profile-edit-button {
  min-width: 78px;
  min-height: 34px;
  padding: 6px 16px;
}

.profile-security-panel {
  box-shadow: none;
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  background: var(--surface-muted);
  color: var(--muted-strong);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .client-shell > .client-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 3;
    flex-wrap: wrap;
    min-height: 56px;
    margin: 0;
    padding: 0 14px;
  }

  .brand {
    flex: 0 0 auto;
    width: 180px;
    padding: 0;
    border-right: 0;
  }

  .sidebar {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 56px;
    z-index: 2;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 16px 18px;
  }

  .workspace {
    grid-column: 1;
    grid-row: 3;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grouped-nav {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .grouped-nav .nav-section {
    flex: 0 0 178px;
  }

  .grouped-nav .nav-section-toggle {
    background: var(--surface-muted);
  }

  .nav-item {
    text-align: center;
  }

  .client-shell .client-nav-child {
    text-align: left;
    padding-left: 40px;
    white-space: nowrap;
  }

  .client-shell .client-nav-child.active {
    box-shadow: none;
  }

  .topbar,
  .inline-form,
  .client-auth-shell,
  .client-overview-grid,
  .split,
  .profile-layout,
  .settings-page-head,
  .admin-management-grid,
  .role-permission-matrix,
  .system-settings-form,
  .theme-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .settings-page-head {
    align-items: start;
  }

  .profile-enterprise-head,
  .profile-identity-banner {
    align-items: flex-start;
  }

  .profile-identity-banner {
    display: grid;
  }

  .realname-client-panel {
    padding: 30px 18px 28px;
  }

  .realname-method-grid {
    grid-template-columns: minmax(260px, 440px);
    gap: 16px;
  }

  .admin-settings-toolbar {
    justify-content: flex-start;
  }

  .settings-stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-stat-strip div:nth-child(3n) {
    border-right: 0;
  }

  .admin-editor-panel,
  .role-editor-panel,
  .profile-overview-panel {
    position: static;
  }

  .client-auth-shell {
    align-items: start;
    gap: 28px;
    padding-top: 30px;
  }

  .client-auth-panel {
    max-width: 560px;
  }

  .theme-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    padding: 10px;
  }

  .theme-sidebar-title,
  .theme-area {
    width: auto;
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .theme-board {
    padding: 22px;
  }

  .metrics,
  .product-grid,
  .shop-order-layout,
  .todo-grid,
  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-order-layout {
    grid-template-columns: 1fr;
  }

  .shop-summary-panel {
    position: static;
  }

  .client-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .install-workspace {
    width: calc(100% - 24px);
    padding: 16px 0 28px;
  }

  .install-workspace .topbar {
    display: grid;
    gap: 10px;
    align-items: start;
  }

  .install-field {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }

  .install-field-help {
    margin-top: -1px;
  }

  .install-form-actions {
    justify-content: stretch;
  }

  .install-form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 620px) {
  .workspace {
    grid-column: 1;
    grid-row: 3;
    padding: 18px;
  }

  .client-shell > .client-topbar {
    gap: 8px;
    margin: 0;
    padding: 0 12px;
  }

  .install-workspace {
    padding: 14px 0 24px;
  }

  .sidebar {
    gap: 14px;
  }

  .brand {
    font-size: 17px;
  }

  .entry {
    padding: 18px;
  }

  .entry section {
    padding: 28px;
  }

  .metrics,
  .product-grid,
  .config-grid,
  .shop-filter-bar,
  .shop-region-row,
  .shop-buy-grid,
  .shop-summary-actions,
  .todo-grid,
  .settings-stat-strip,
  .permission-module-items,
  .theme-grid {
    grid-template-columns: 1fr;
  }

  .shop-row-label {
    line-height: 1.4;
  }

  .shop-choice,
  .shop-route-card,
  .shop-zone-card,
  .shop-option {
    width: 100%;
  }

  .shop-summary-list div {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .settings-stat-strip div,
  .settings-stat-strip div:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .settings-stat-strip div:last-child {
    border-bottom: 0;
  }

  .permission-check,
  .permission-check:nth-child(2n) {
    border-right: 0;
  }

  .theme-toolbar,
  .theme-card-footer {
    display: grid;
    justify-items: start;
  }

  .theme-tabs {
    width: 100%;
  }

  .theme-tab {
    flex: 1 1 0;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .grouped-nav {
    gap: 0;
  }

  .grouped-nav .nav-section {
    flex-basis: 164px;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 92px;
    text-align: center;
  }

  .client-shell .nav-item {
    width: auto;
    grid-template-columns: 20px max-content;
  }

  .client-shell .nav-item span {
    max-width: 96px;
  }

  .client-shell .client-nav-child {
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .sidebar-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .topbar {
    margin-bottom: 14px;
  }

  .client-auth-shell {
    padding: 22px 18px 36px;
  }

  .client-auth-copy {
    gap: 16px;
  }

  .client-auth-copy h1 {
    font-size: 40px;
  }

  .client-auth-copy p {
    font-size: 16px;
  }

  .client-auth-panel {
    padding: 18px;
  }

  .field.two-col,
  .client-inline-form,
  .profile-form-grid.profile-compact-form,
  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .realname-provider-status {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .realname-provider-status-label {
    line-height: 1.4;
  }

  .client-topbar,
  .client-session {
    justify-content: flex-start;
  }

  table {
    min-width: 620px;
  }

  .table-wrap::before {
    content: "可横向滑动查看完整表格";
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
    background: var(--surface-muted);
    font-size: 12px;
  }

  .client-pager {
    justify-content: flex-start;
  }

  .client-pager-total {
    flex-basis: 100%;
    margin-right: 0;
  }
}
