/* ==========================================================================
   聚多折浅色运营后台 · 统一视觉系统
   与微信小程序共用品牌色、语义色和信息层级。
   ========================================================================== */

:root {
  color-scheme: light;
  --ui-color-primary: #3569b9;
  --ui-color-primary-strong: #285ca7;
  --ui-color-primary-soft: #e8f1fe;
  --ui-color-success: #2a8a69;
  --ui-color-success-soft: #e5f4ef;
  --ui-color-warning: #93600d;
  --ui-color-warning-soft: #fff2d9;
  --ui-color-danger: #b65550;
  --ui-color-danger-soft: #fbecea;
  --ui-color-text: #17243a;
  --ui-color-text-secondary: #52647b;
  --ui-color-text-muted: #65758b;
  --ui-color-background: #f5f8fc;
  --ui-color-surface: #ffffff;
  --ui-color-surface-soft: #f7f9fc;
  --ui-color-border: #e3e9f2;
  --ui-color-disabled-background: #e7ecf3;
  --ui-color-disabled-text: #93a0b2;
  --ui-radius-small: 8px;
  --ui-radius-control: 10px;
  --ui-radius-card: 14px;
  --ui-radius-dialog: 18px;
  --ui-radius-pill: 999px;
  --ui-shadow-card: 0 8px 24px rgba(28, 49, 89, .05);
  --ui-shadow-focus: 0 0 0 3px rgba(53, 105, 185, .14);
  --ui-shadow-float: 0 24px 64px rgba(28, 49, 89, .16);

  /* Existing templates still use these aliases. */
  --ink: var(--ui-color-text);
  --forest: var(--ui-color-primary);
  --forest-deep: var(--ui-color-primary-strong);
  --paper: var(--ui-color-background);
  --paper-light: var(--ui-color-surface);
  --line: var(--ui-color-border);
  --muted: var(--ui-color-text-secondary);
  --orange: var(--ui-color-warning);
  --lime: var(--ui-color-success);
  --red: var(--ui-color-danger);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  overflow-x: clip;
  background: var(--ui-color-background);
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  color: var(--ui-color-text);
  background: var(--ui-color-background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before { display: none; }
body.menu-open { overflow: hidden; }

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

button { color: inherit; }

button,
a,
input,
select,
textarea { -webkit-tap-highlight-color: transparent; }

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus { outline: none; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ui-color-primary);
  outline-offset: 2px;
}

summary:focus-visible {
  outline: 2px solid var(--ui-color-primary);
  outline-offset: -2px;
}

img,
svg { display: block; }

h1,
h2,
h3,
strong,
b { font-weight: 600; }

code,
.number-cell,
.summary-strip strong,
.nav-count,
time { font-variant-numeric: tabular-nums; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.muted { color: var(--ui-color-text-muted); }

/* Shell and navigation */
.app-shell,
.app-shell.ready {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  filter: none;
  background: var(--ui-color-background);
}

.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  padding: 24px 16px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--ui-color-border);
  color: var(--ui-color-text);
  background: var(--ui-color-surface);
}

.brand,
.login-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-button {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand > span:last-child,
.login-brand > span:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--ui-color-primary-strong), var(--ui-color-primary));
  box-shadow: 0 8px 18px rgba(53, 105, 185, .2);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
}

.brand strong,
.login-brand > span:last-child {
  display: block;
  font-size: 16px;
  letter-spacing: .04em;
}

.brand small,
.login-brand small {
  display: block;
  margin-top: 0;
  color: var(--ui-color-text-muted);
  font-size: 11px;
  letter-spacing: .08em;
}

.nav-list {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.nav-group {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.nav-group-label {
  margin: 17px 11px 5px;
  color: var(--ui-color-text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
}

.nav-group-label:first-child { margin-top: 2px; }

.nav-item,
.nav-item:not(.active),
.nav-item.active {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 9px 11px;
  align-items: center;
  justify-content: initial;
  gap: 10px;
  border: 0;
  border-radius: var(--ui-radius-control);
  color: var(--ui-color-text-secondary);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}

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

.nav-item.active {
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
}

.nav-item > span:first-child,
.nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: currentColor;
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  opacity: .82;
}

img.nav-icon { object-fit: contain; }

.nav-count {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  margin-left: auto;
  padding: 1px 6px;
  place-items: center;
  border-radius: var(--ui-radius-pill);
  color: var(--ui-color-warning);
  background: var(--ui-color-warning-soft);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.nav-count:empty { display: none; }

.sidebar-foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}

.env-card {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 11px;
  border: 0;
  border-radius: 11px;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface-soft);
  font-size: 12px;
}

.env-card i,
.live i,
.order-sync-status::before,
.login-card footer i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--ui-color-success);
  box-shadow: 0 0 0 4px rgba(42, 138, 105, .12);
}

.env-card i { grid-row: span 2; }
.env-card > span { display: grid; min-width: 0; gap: 1px; }
.env-card small {
  color: var(--ui-color-text-muted);
  font-size: 12px;
}

[data-service-status="unknown"] i,
.login-card footer[data-service-status="unknown"] i {
  background: var(--ui-color-text-muted);
  box-shadow: 0 0 0 4px rgba(124, 137, 155, .12);
}

[data-service-status="connected"] i,
.login-card footer[data-service-status="connected"] i {
  background: var(--ui-color-success);
  box-shadow: 0 0 0 4px rgba(42, 138, 105, .12);
}

[data-service-status="error"] i,
.login-card footer[data-service-status="error"] i {
  background: var(--ui-color-danger);
  box-shadow: 0 0 0 4px rgba(182, 85, 80, .12);
}

[data-service-status="error"] [data-service-message] { color: var(--ui-color-danger); }
[data-service-message] { overflow-wrap: anywhere; }

.logout-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 11px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--ui-radius-control);
  color: var(--ui-color-text-secondary);
  background: transparent;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.logout-button:hover {
  color: var(--ui-color-danger);
  background: var(--ui-color-danger-soft);
}

.logout-button img { width: 20px; height: 20px; flex: 0 0 20px; }

.workspace {
  --content-width: 1920px;
  --content-gutter: clamp(20px, 2vw, 36px);
  min-width: 0;
  padding: 0;
  background: var(--ui-color-background);
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 78px;
  padding: 14px max(var(--content-gutter), calc((100% - var(--content-width)) / 2 + var(--content-gutter)));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--ui-color-border);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}

.header-copy,
.topbar > div:first-of-type { min-width: 0; }

.eyebrow,
.edition {
  display: block;
  color: var(--ui-color-primary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.topbar h1 {
  max-width: min(70vw, 760px);
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ui-color-text);
  font-family: inherit;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ui-color-text-secondary);
  font-size: 12px;
}

.operator-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  text-align: right;
}

.operator-copy { display: grid; max-width: 160px; min-width: 0; text-align: right; }
.operator-copy strong,
.operator-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-copy strong { color: var(--ui-color-text); font-size: 12px; }
.operator-copy small { color: var(--ui-color-text-muted); font-size: 10px; }

.operator b,
.operator-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
  font-weight: 600;
}

.mobile-menu,
.icon-button {
  display: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-control);
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-surface);
  cursor: pointer;
}

.icon-button { display: inline-grid; }
.icon-button img,
.icon-button svg,
.mobile-menu img,
.mobile-menu svg { width: 18px; height: 18px; }

.view-root {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 28px var(--content-gutter) 48px;
}

/* Page headings and cards */
.section-stack {
  display: grid;
  min-width: 0;
  gap: 16px;
  animation: rise .24s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(5px); }
}

.section-intro,
.panel-head,
.pagination,
.dialog-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-intro {
  align-items: flex-end;
  margin-bottom: 2px;
}

.section-intro > div,
.panel-copy,
.panel-head > div { min-width: 0; }

.section-intro strong {
  display: block;
  color: var(--ui-color-text);
  font-size: 20px;
  line-height: 1.35;
}

.section-intro p {
  max-width: 900px;
  margin: 5px 0 0;
  color: var(--ui-color-text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.fresh-status,
.security-note,
.table-caption {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 7px 10px;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  color: var(--ui-color-success);
  background: var(--ui-color-success-soft);
  font-size: 11px;
  line-height: 1.35;
}

.security-note {
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
}

.processing-date {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 7px 10px;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
  font-size: 11px;
  line-height: 1.35;
}

.fresh-status img,
.security-note img,
.processing-date img,
.table-caption img { width: 16px; height: 16px; flex: 0 0 16px; }

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-card);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
}

.panel h2 {
  margin: 0;
  color: var(--ui-color-text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.panel-copy p,
.panel-head p {
  margin: 4px 0 0;
  color: var(--ui-color-text-secondary);
  font-size: 12px;
}

.panel-head > button { flex: 0 0 auto; }

.tag {
  display: inline-flex;
  width: max-content;
  min-height: 26px;
  padding: 5px 9px;
  align-items: center;
  border-radius: var(--ui-radius-pill);
  color: var(--ui-color-text-secondary);
  background: #f2f4f7;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.tag.attention-total { color: var(--ui-color-warning); background: var(--ui-color-warning-soft); }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.summary-strip > div {
  display: grid;
  min-width: 0;
  padding: 16px 18px;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--ui-color-border);
  border-radius: 12px;
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
}

.summary-strip span,
.summary-strip strong,
.summary-strip small { display: block; min-width: 0; }

.summary-strip span,
.summary-strip small { color: var(--ui-color-text-secondary); font-size: 12px; }

.summary-strip strong {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ui-color-text);
  font-family: inherit;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.25;
}

/* Controls */
.toolbar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  padding: 12px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--ui-color-border);
  border-radius: 12px;
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
}

.compact-toolbar { justify-content: flex-start; }
.compact-toolbar > strong { margin-left: auto; color: var(--ui-color-text-secondary); font-size: 12px; }

.field { position: relative; min-width: 220px; flex: 1 1 320px; }
.select-field { display: inline-flex; min-width: 0; }

.search-field > img {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-field input { padding-left: 38px; }

.field input,
.toolbar select,
.dialog-field input,
.dialog-field select,
.dialog-field textarea,
.login-card input {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #d8e0ea;
  border-radius: 9px;
  outline: none;
  color: var(--ui-color-text);
  background: var(--ui-color-surface);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field input::placeholder,
.dialog-field input::placeholder,
.dialog-field textarea::placeholder,
.login-card input::placeholder { color: var(--ui-color-disabled-text); }

.field input:focus,
.toolbar select:focus,
.dialog-field input:focus,
.dialog-field select:focus,
.dialog-field textarea:focus,
.login-card input:focus {
  border-color: var(--ui-color-primary);
  box-shadow: var(--ui-shadow-focus);
}

.toolbar select { width: auto; min-width: 148px; cursor: pointer; }

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--ui-color-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.button,
.login-button {
  display: inline-flex;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 9px 15px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.button:hover,
.login-button:hover { transform: translateY(-1px); }
.button:active,
.login-button:active { transform: translateY(0); }

.button:disabled,
.login-button:disabled {
  color: var(--ui-color-disabled-text);
  border-color: transparent;
  background: var(--ui-color-disabled-background);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.button.primary,
.login-button {
  color: #fff;
  background: var(--ui-color-primary);
  box-shadow: 0 7px 15px rgba(53, 105, 185, .16);
}

.button.primary:hover,
.login-button:hover { background: var(--ui-color-primary-strong); }

.button.secondary {
  border-color: #d8e0ea;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface);
}

.button.secondary:hover {
  border-color: #8baad7;
  color: var(--ui-color-primary-strong);
  background: #f7faff;
}

.button.danger {
  color: #fff;
  background: var(--ui-color-danger);
  box-shadow: 0 7px 15px rgba(182, 85, 80, .14);
}

.button.danger:hover { background: #a54a46; }

.button.danger-quiet {
  border-color: #f1c9c6;
  color: var(--ui-color-danger);
  background: #fffafa;
  box-shadow: none;
}

.button.danger-quiet:hover {
  border-color: #dda8a4;
  color: #9f4642;
  background: var(--ui-color-danger-soft);
}

.button.compact {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.button.link {
  min-height: 32px;
  padding: 6px 0;
  border-color: transparent;
  color: var(--ui-color-primary);
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

.button.link:hover {
  color: var(--ui-color-primary-strong);
  background: transparent;
  transform: none;
}

.button:disabled,
.button:disabled:hover,
.login-button:disabled,
.login-button:disabled:hover {
  color: var(--ui-color-disabled-text);
  border-color: transparent;
  background: var(--ui-color-disabled-background);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.button.loading::before {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin .8s linear infinite;
}

.button-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.button.primary .button-icon,
.button.danger .button-icon,
.login-button .button-icon { filter: brightness(0) invert(1); }

/* Tables, tags and operational states */
.data-panel { overflow: hidden; padding: 0; }
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #c8d2df transparent;
}

.data-table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table caption.table-caption {
  width: auto;
  margin: 12px 14px 0;
  text-align: left;
}

.data-table th {
  padding: 12px 14px;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .02em;
  text-align: left;
}

.data-table td {
  max-width: 360px;
  padding: 12px 14px;
  border-top: 1px solid #eef2f7;
  color: var(--ui-color-text);
  font-size: 14px;
  line-height: 1.55;
  vertical-align: middle;
}

.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover td { background: #fafcff; }
.data-table strong,
.data-table small { display: block; min-width: 0; }

.data-table td > strong {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table small {
  max-width: 300px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ui-color-text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
}

.data-table code {
  padding: 3px 6px;
  border-radius: 6px;
  color: #344054;
  background: #f2f4f7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.number-cell { text-align: right !important; }

.long-cell {
  display: block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.error-text { color: var(--ui-color-danger); }
.cell-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

.status {
  display: inline-flex;
  width: max-content;
  min-height: 26px;
  padding: 5px 9px;
  align-items: center;
  gap: 6px;
  border-radius: var(--ui-radius-pill);
  color: var(--ui-color-text-secondary);
  background: #f2f4f7;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.status::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status.pending,
.status.open,
.status.review,
.status.approved { color: var(--ui-color-warning); background: var(--ui-color-warning-soft); }

.status.verified,
.status.published,
.status.confirmed,
.status.paid,
.status.resolved { color: var(--ui-color-success); background: var(--ui-color-success-soft); }

.status.rejected,
.status.disabled,
.status.canceled,
.status.dismissed { color: var(--ui-color-danger); background: var(--ui-color-danger-soft); }

.status.unverified,
.status.draft { color: var(--ui-color-text-secondary); background: #f2f4f7; }

.role-tags { display: flex; max-width: 210px; flex-wrap: wrap; gap: 4px; }

.role-tag {
  display: inline-flex;
  width: max-content;
  min-height: 24px;
  padding: 4px 8px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ui-color-border);
  border-radius: 7px;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface);
  font-size: 12px;
  line-height: 1.2;
}


.pagination {
  padding: 12px 14px;
  border-top: 1px solid var(--ui-color-border);
  color: var(--ui-color-text-secondary);
  font-size: 12px;
}

.pagination > div,
.pagination div { display: flex; gap: 7px; }

.order-sync-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.order-sync-status {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  max-width: 330px;
  padding: 8px 10px;
  align-items: center;
  gap: 2px 8px;
  border: 0;
  border-radius: 9px;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface-soft);
  font-size: 10px;
}

.order-sync-status::before { grid-row: span 2; margin: 0; content: ""; }
.order-sync-status b,
.order-sync-status small { grid-column: 2; min-width: 0; }
.order-sync-status b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.order-sync-status small { overflow-wrap: anywhere; color: var(--ui-color-text-muted); font-size: 9px; line-height: 1.4; }

.order-sync-status.running { color: var(--ui-color-warning); background: var(--ui-color-warning-soft); }
.order-sync-status.running::before { background: var(--ui-color-warning); box-shadow: 0 0 0 4px rgba(147, 96, 13, .12); }
.order-sync-status.idle::before { background: var(--ui-color-text-muted); box-shadow: 0 0 0 4px rgba(124, 137, 155, .12); }
.order-sync-status.succeeded { color: var(--ui-color-success); background: var(--ui-color-success-soft); }
.order-sync-status.failed { color: var(--ui-color-danger); background: var(--ui-color-danger-soft); }
.order-sync-status.failed::before { background: var(--ui-color-danger); box-shadow: 0 0 0 4px rgba(182, 85, 80, .12); }

.review-evidence {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.review-evidence h3 {
  margin: 8px 0 0;
  color: var(--ui-color-text);
  font-size: 12px;
  font-weight: 600;
}

.review-cause,
.review-earnings p,
.review-history p {
  display: grid;
  margin: 0;
  padding: 10px 11px;
  gap: 3px;
  border-radius: 9px;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface-soft);
  font-size: 10px;
  line-height: 1.55;
}

.review-cause { color: var(--ui-color-danger); background: var(--ui-color-danger-soft); }
.review-cause strong,
.review-earnings strong,
.review-history strong { color: var(--ui-color-text); font-size: 10px; }
.review-cause span,
.review-earnings span,
.review-history span { overflow-wrap: anywhere; }

.review-evidence dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: 9px;
}

.review-evidence dl > div { min-width: 0; padding: 9px 10px; border-bottom: 1px solid var(--ui-color-border); }
.review-evidence dl > div:nth-child(even) { border-left: 1px solid var(--ui-color-border); }
.review-evidence dl > div:nth-last-child(-n + 2) { border-bottom: 0; }
.review-evidence dt { color: var(--ui-color-text-muted); font-size: 9px; }
.review-evidence dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--ui-color-text); font-size: 10px; }
.review-earnings,
.review-history { display: grid; gap: 6px; }

/* Jutuike administrator endpoint catalog and safe request runner */
.jutuike-gateway-page .summary-strip {
  grid-template-columns: repeat(5, minmax(132px, 1fr));
}

.jutuike-gateway-layout {
  display: grid;
  grid-template-columns: minmax(310px, .78fr) minmax(460px, 1.22fr);
  min-width: 0;
  align-items: start;
  gap: 14px;
}

.jutuike-catalog {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.jutuike-capability {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-card);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
}

.jutuike-capability > summary {
  display: flex;
  min-height: 46px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ui-color-text);
  background: var(--ui-color-surface-soft);
  cursor: pointer;
  list-style: none;
}

.jutuike-capability > summary::-webkit-details-marker { display: none; }
.jutuike-capability > summary::after {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}

.jutuike-capability:not([open]) > summary::after { transform: rotate(-45deg); }
.jutuike-capability > summary span { flex: 1 1 auto; font-size: 12px; font-weight: 600; }
.jutuike-capability > summary small { color: var(--ui-color-text-muted); font-size: 10px; }

.jutuike-endpoint-list {
  display: grid;
  min-width: 0;
  padding: 6px;
  gap: 3px;
}

.jutuike-endpoint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 9px 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ui-color-text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.jutuike-endpoint:hover { background: var(--ui-color-surface-soft); }
.jutuike-endpoint.selected {
  border-color: #c6d8f2;
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
}

.jutuike-endpoint > span:first-child { display: grid; min-width: 0; gap: 2px; }
.jutuike-endpoint strong,
.jutuike-endpoint small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jutuike-endpoint strong { font-size: 11px; }
.jutuike-endpoint small { color: var(--ui-color-text-muted); font-size: 9px; }

.jutuike-endpoint-state {
  min-width: 46px;
  padding: 4px 6px;
  border-radius: var(--ui-radius-pill);
  color: var(--ui-color-text-muted);
  background: #f2f4f7;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.jutuike-endpoint-state.available { color: var(--ui-color-success); background: var(--ui-color-success-soft); }

.jutuike-endpoint-states {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.jutuike-integration-state {
  min-width: 64px;
  padding: 4px 6px;
  border-radius: var(--ui-radius-pill);
  color: var(--ui-color-text-muted);
  background: #f2f4f7;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.jutuike-integration-state.active { color: var(--ui-color-success); background: var(--ui-color-success-soft); }
.jutuike-integration-state.disabled { color: var(--ui-color-warning); background: var(--ui-color-warning-soft); }
.jutuike-integration-state.backend_only { color: var(--ui-color-primary-strong); background: var(--ui-color-primary-soft); }

.jutuike-runner {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  max-height: calc(100dvh - 116px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #c8d2df transparent;
}

.jutuike-runner-head { align-items: flex-start; }
.jutuike-runner-head .eyebrow { margin-bottom: 5px; font-size: 9px; }
.jutuike-runner-head h2 { margin-top: 2px; }
.jutuike-runner-head p code,
.jutuike-requirements code,
.jutuike-parameter code {
  padding: 2px 5px;
  border-radius: 5px;
  color: #344054;
  background: #f2f4f7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

.jutuike-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 14px;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: 10px;
  background: var(--ui-color-surface-soft);
}

.jutuike-meta > span { display: grid; min-width: 0; padding: 10px 11px; gap: 2px; }
.jutuike-meta > span:nth-child(n + 4) { border-top: 1px solid var(--ui-color-border); }
.jutuike-meta > span:not(:nth-child(3n + 1)) { border-left: 1px solid var(--ui-color-border); }
.jutuike-meta small { color: var(--ui-color-text-muted); font-size: 9px; }
.jutuike-meta strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.jutuike-integration-meta strong { overflow: visible; line-height: 1.35; text-overflow: clip; white-space: normal; }

.jutuike-security-copy {
  display: flex;
  margin: 0 0 14px;
  padding: 10px 11px;
  align-items: flex-start;
  gap: 8px;
  border-radius: 9px;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-warning-soft);
  font-size: 10px;
  line-height: 1.6;
}

.jutuike-security-copy img { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.jutuike-unavailable {
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid #efd6ad;
  border-radius: 9px;
  color: var(--ui-color-warning);
  background: #fffaf0;
  font-size: 10px;
}

.jutuike-form { min-width: 0; }
.jutuike-parameters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  align-items: end;
  gap: 11px;
}

.jutuike-parameter { display: grid; min-width: 0; gap: 6px; }
.jutuike-parameter > span { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 6px; }
.jutuike-parameter code { min-width: 0; overflow-wrap: anywhere; }
.jutuike-parameter em,
.jutuike-parameter small { flex: 0 0 auto; font-size: 9px; font-style: normal; }
.jutuike-parameter em { color: var(--ui-color-danger); }
.jutuike-parameter small { color: var(--ui-color-text-muted); }
.jutuike-parameter input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d8e0ea;
  border-radius: 9px;
  color: var(--ui-color-text);
  background: var(--ui-color-surface);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.jutuike-parameter input:focus { border-color: var(--ui-color-primary); box-shadow: var(--ui-shadow-focus); }
.jutuike-no-parameters { margin: 0; color: var(--ui-color-text-muted); font-size: 11px; }
.jutuike-requirements { display: grid; margin-top: 12px; padding: 10px 11px; gap: 5px; border-radius: 9px; color: var(--ui-color-text-secondary); background: var(--ui-color-primary-soft); font-size: 10px; }
.jutuike-requirements strong { color: var(--ui-color-primary-strong); font-size: 10px; }
.jutuike-form-error { margin: 10px 0 0; }

.jutuike-form-actions {
  display: flex;
  margin-top: 15px;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--ui-color-border);
}

.jutuike-form-actions > span { max-width: 330px; color: var(--ui-color-text-muted); font-size: 9px; line-height: 1.5; }
.jutuike-form-actions .button { flex: 0 0 auto; }

.jutuike-result { min-width: 0; margin-top: 18px; }
.jutuike-result > div { display: flex; margin-bottom: 7px; align-items: center; justify-content: space-between; gap: 10px; }
.jutuike-result > div strong { font-size: 11px; }
.jutuike-result > div small { color: var(--ui-color-text-muted); font-size: 9px; }
.jutuike-result pre {
  max-height: 420px;
  margin: 0;
  padding: 13px;
  overflow: auto;
  border: 1px solid #dce4ee;
  border-radius: 10px;
  color: #344054;
  background: #f7f9fc;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.jutuike-result pre.error { border-color: #efc7c4; color: var(--ui-color-danger); background: var(--ui-color-danger-soft); }
.jutuike-runner-empty { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 6px; text-align: center; }
.jutuike-runner-empty strong { font-size: 16px; }
.jutuike-runner-empty p { margin: 0; color: var(--ui-color-text-muted); font-size: 11px; }

@media (max-width: 1100px) {
  .jutuike-gateway-layout { grid-template-columns: minmax(270px, .7fr) minmax(390px, 1.3fr); }
  .jutuike-parameters { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .jutuike-gateway-page .summary-strip { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .jutuike-gateway-layout { grid-template-columns: 1fr; }
  .jutuike-runner { position: static; max-height: none; }
}

@media (max-width: 520px) {
  .jutuike-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jutuike-meta > span:nth-child(n + 3) { border-top: 1px solid var(--ui-color-border); }
  .jutuike-meta > span:not(:nth-child(3n + 1)) { border-left: 0; }
  .jutuike-meta > span:nth-child(even) { border-left: 1px solid var(--ui-color-border); }
  .jutuike-form-actions { align-items: stretch; flex-direction: column; }
  .jutuike-form-actions .button { width: 100%; }
}

/* Loading, empty and error states */
.loading-state,
.empty-state,
.error-state {
  display: grid;
  min-height: 340px;
  padding: 40px 24px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-card);
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-card);
  text-align: center;
}

.loading-mark {
  width: 42px;
  height: 42px;
  border: 3px solid var(--ui-color-primary-soft);
  border-top-color: var(--ui-color-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-icon,
.state-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
}

.error-state .state-icon { color: var(--ui-color-danger); background: var(--ui-color-danger-soft); }
.empty-icon img,
.state-icon img,
.empty-icon svg,
.state-icon svg { width: 24px; height: 24px; }

.empty-state b,
.error-state b,
.empty-state h2,
.error-state h2 {
  margin: 0;
  color: var(--ui-color-text);
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.empty-state p,
.error-state p {
  max-width: 480px;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ui-color-text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

/* Dialogs and notifications */
.action-dialog {
  width: min(480px, calc(100% - 28px));
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--ui-radius-dialog);
  color: var(--ui-color-text);
  background: var(--ui-color-surface);
  box-shadow: 0 28px 80px rgba(15, 35, 71, .28);
}

.action-dialog::backdrop { background: rgba(16, 24, 40, .55); backdrop-filter: blur(3px); }
.action-dialog form { position: relative; padding: 28px; }

.dialog-header {
  min-width: 0;
}

.dialog-header > p {
  margin: 0 0 20px;
  overflow-wrap: anywhere;
  color: var(--ui-color-text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 12px;
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
}

.dialog-icon img { width: 21px; height: 21px; }
.dialog-eyebrow { margin-bottom: 4px; }
.dialog-body { min-width: 0; }
.dialog-fields { min-width: 0; }

.action-dialog h2 {
  margin: 8px 44px 8px 0;
  overflow-wrap: anywhere;
  color: var(--ui-color-text);
  font-family: inherit;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.35;
}

.action-dialog form > p {
  margin: 0 0 20px;
  overflow-wrap: anywhere;
  color: var(--ui-color-text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--ui-color-text-secondary);
  background: #f2f4f7;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover { color: var(--ui-color-text); background: var(--ui-color-disabled-background); }

.dialog-object,
.dialog-warning {
  display: flex;
  margin: -5px 0 18px;
  padding: 10px 12px;
  align-items: flex-start;
  gap: 8px;
  overflow-wrap: anywhere;
  border-radius: 9px;
  color: #344054;
  background: var(--ui-color-surface-soft);
  font-size: 11px;
  line-height: 1.55;
}

.dialog-object::before,
.dialog-warning::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ui-color-primary);
  content: "";
}

.dialog-warning { color: var(--ui-color-warning); background: var(--ui-color-warning-soft); }
.dialog-warning::before { background: var(--ui-color-warning); }

.dialog-field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: var(--ui-color-text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.dialog-field textarea { min-height: 96px; resize: vertical; }
.dialog-field > span:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ui-color-text-secondary);
}

.dialog-field > span:first-child em {
  color: var(--ui-color-danger);
  font-size: 10px;
  font-style: normal;
}

.dialog-field > span:first-child small {
  color: var(--ui-color-text-muted);
  font-size: 10px;
}
.payment-review-note { color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.payment-review-confirm { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0; color: var(--ui-color-text); font-size: 12px; line-height: 1.7; }
.payment-review-confirm input { width: 16px; height: 16px; flex: 0 0 16px; margin: 3px 0 0; accent-color: var(--ui-color-primary); }
.dialog-actions { justify-content: flex-end; margin-top: 24px; }
.dialog-actions .button { min-width: 88px; }

.form-error {
  min-height: 18px;
  margin: -4px 0 0 !important;
  overflow-wrap: anywhere;
  color: var(--ui-color-danger) !important;
  font-size: 11px !important;
  line-height: 1.5 !important;
}

.toast-region {
  position: fixed;
  z-index: 60;
  right: 22px;
  bottom: 22px;
  display: grid;
  max-width: min(380px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  min-width: 260px;
  padding: 12px 15px;
  align-items: center;
  gap: 9px;
  overflow-wrap: anywhere;
  border-radius: 10px;
  color: #fff;
  background: var(--ui-color-success);
  box-shadow: 0 12px 35px rgba(18, 76, 55, .22);
  font-size: 12px;
}

.toast img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  filter: brightness(0) invert(1);
}

.toast.error { background: var(--ui-color-danger); }
.toast.warning { background: var(--ui-color-warning); }

/* Session recovery must be visible before scripts finish checking authentication. */
.session-layer {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
  background: var(--ui-color-background);
}

.session-card {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.session-card h1 { margin: 0 0 10px; font-size: 20px; }
.session-card p { margin: 0; color: var(--ui-color-text-secondary); font-size: 13px; }

/* Login */
.login-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(420px, .8fr);
  overflow: auto;
  color: var(--ui-color-text);
  background: var(--ui-color-surface);
}

.login-layer.hidden { display: none; }
.login-layer::before { display: none; }
.login-copy,
.login-card { position: relative; z-index: 1; }

.login-copy {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(44px, 6vw, 88px);
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, .12), transparent 26%), linear-gradient(145deg, #0b3ea8, var(--ui-color-primary) 62%, #5b92ff);
}

.login-copy .edition { color: #d7e5ff; }
.login-copy .login-brand-light { color: #fff; }
.login-brand-light small { color: rgba(255, 255, 255, .7); }
.login-brand-light .brand-mark {
  color: var(--ui-color-primary-strong);
  background: #fff;
  box-shadow: 0 8px 18px rgba(13, 44, 105, .18);
}

.login-message { margin-block: auto; padding-block: 48px; }

.login-copy h2 {
  margin: 34px 0 18px;
  font-family: inherit;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.login-copy h2 strong { color: #fff; font-weight: inherit; }

.login-message > p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  line-height: 1.9;
}

.login-proof {
  display: flex;
  margin-top: 50px;
  flex-wrap: wrap;
  gap: 30px;
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
}

.login-proof span {
  display: inline-flex;
  min-width: 150px;
  align-items: center;
  gap: 8px;
}
.login-proof img { width: 18px; height: 18px; flex: 0 0 18px; filter: brightness(0) invert(1); opacity: .9; }
.login-proof b {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.login-card {
  align-self: center;
  width: min(410px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--ui-color-border);
  border-radius: var(--ui-radius-dialog);
  color: var(--ui-color-text);
  background: var(--ui-color-surface);
  box-shadow: var(--ui-shadow-float);
}

.login-panel {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px;
  place-items: center;
  background: var(--ui-color-surface-soft);
}

.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--ui-color-text);
  font-size: 15px;
  font-weight: 600;
}
.login-mobile-brand .brand-mark { width: 36px; height: 36px; flex-basis: 36px; font-size: 16px; }
.login-heading h1 { margin-bottom: 7px; }
.login-heading p { margin: 0; color: var(--ui-color-text-secondary); font-size: 12px; }

.login-brand { margin-bottom: 54px; color: var(--ui-color-text); }
.login-brand .brand-mark { width: 38px; height: 38px; flex-basis: 38px; font-size: 17px; }

.login-card h1 {
  margin: 8px 0 7px;
  color: var(--ui-color-text);
  font-family: inherit;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
}

.login-card > div > p { margin: 0 0 28px; color: var(--ui-color-text-secondary); font-size: 12px; }
.login-card form { display: grid; gap: 17px; }

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--ui-color-text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.login-button { width: 100%; min-height: 44px; margin-top: 2px; justify-content: center; }
.login-button b { margin-left: auto; font-size: 18px; font-weight: 400; }
.login-button > img { width: 17px; height: 17px; filter: brightness(0) invert(1); }

.login-card footer {
  display: flex;
  margin-top: 30px;
  padding-top: 16px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-top: 1px solid #eef2f7;
  color: var(--ui-color-text-secondary);
  font-size: 12px;
}

.login-card footer i { display: inline-block; margin: 0; }
.login-card code { color: var(--ui-color-primary-strong); }

.mobile-overlay { display: none; }

@media (max-width: 1100px) {
  .app-shell,
  .app-shell.ready { grid-template-columns: 208px minmax(0, 1fr); }
  .login-layer { grid-template-columns: minmax(340px, 1fr) minmax(380px, .8fr); }
}

/* 601–900 px: keep every navigation destination visible and readable. */
@media (min-width: 701px) and (max-width: 900px) {
  .app-shell,
  .app-shell.ready { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand > span:last-child,
  .nav-item,
  .nav-item:not(.active),
  .nav-item.active,
  .env-card { display: grid; }
  .nav-item,
  .nav-item:not(.active),
  .nav-item.active { justify-content: initial; padding-inline: 11px; font-size: 13px; }
  .topbar,
  .view-root { padding-left: 20px; padding-right: 20px; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .order-sync-actions { width: 100%; justify-content: flex-start; }
  .summary-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 900px) {
  .login-layer {
    grid-template-columns: 1fr;
    align-content: center;
    background: var(--ui-color-surface-soft);
  }
  .login-copy { display: none; }
  .login-card { align-self: center; }
  .login-mobile-brand { display: flex; margin-bottom: 24px; }
}

@media (max-width: 700px) {
  .app-shell,
  .app-shell.ready { display: block; }

  .sidebar {
    position: fixed;
    z-index: 45;
    inset: 0 auto 0 0;
    display: flex;
    width: min(286px, calc(100vw - 48px));
    height: 100vh;
    height: 100dvh;
    padding: 22px 16px 18px;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 20px 0 50px rgba(15, 35, 71, .18);
  }

  .sidebar.open { transform: translateX(0); }

  .brand > span:last-child,
  .nav-item,
  .nav-item:not(.active),
  .nav-item.active,
  .env-card { display: grid; }

  .nav-item,
  .nav-item:not(.active),
  .nav-item.active { justify-content: initial; padding-inline: 11px; font-size: 13px; }

  .mobile-overlay {
    position: fixed;
    z-index: 40;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(16, 24, 40, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .mobile-overlay.open,
  .mobile-overlay.is-open,
  .sidebar.open + .mobile-overlay { opacity: 1; pointer-events: auto; }

  .workspace { min-height: 100vh; min-height: 100dvh; padding: 0; }

  .topbar {
    min-height: 70px;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 11px;
  }

  .mobile-menu {
    display: grid;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ui-color-border);
    border-radius: var(--ui-radius-control);
    background: var(--ui-color-surface);
    font-size: 10px;
  }

  .topbar h1 { max-width: calc(100vw - 154px); font-size: 19px; }
  .topbar-copy { flex: 1 1 0; }
  .operator { margin-left: auto; }
  .operator > span,
  .operator-copy { display: none; }
  .operator b,
  .operator-avatar { width: 36px; height: 36px; flex-basis: 36px; }

  .view-root { padding: 20px 16px 36px; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .section-intro > :last-child:not(:first-child),
  .fresh-status,
  .security-note { max-width: 100%; }
  .summary-strip { grid-template-columns: 1fr; }
  .jutuike-gateway-page .summary-strip { grid-template-columns: 1fr; overflow-x: visible; padding-bottom: 0; }

  .toolbar { align-items: stretch; flex-direction: column; }
  .field { min-width: 0; flex-basis: auto; }
  .toolbar select,
  .select-field,
  .toolbar .button { width: 100%; }
  .compact-toolbar > strong { margin-left: 0; }

  .order-sync-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .order-sync-status { width: 100%; max-width: none; }
  .order-sync-actions .button { width: 100%; }

  .pagination { align-items: flex-start; flex-direction: column; }
  .pagination > div,
  .pagination div { width: 100%; }
  .pagination .button { flex: 1 1 0; }

  .loading-state,
  .empty-state,
  .error-state { min-height: 300px; }

  .action-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 16px;
  }
  .action-dialog form { padding: 25px 20px 20px; }
  .action-dialog h2 { font-size: 21px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dialog-actions .button { width: 100%; }

  .login-card { width: calc(100% - 28px); margin: 0 auto; padding: 28px 24px; }
  .login-brand { margin-bottom: 42px; }

  .toast-region { right: 16px; bottom: 16px; left: 16px; max-width: none; }
  .toast { width: 100%; min-width: 0; }
}

@media (max-width: 420px) {
  .topbar,
  .view-root { padding-left: 14px; padding-right: 14px; }
  .eyebrow { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cell-actions { flex-wrap: wrap; }
  .summary-strip strong { font-size: 19px; }
  .login-card { padding: 24px 20px; }
}

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

@media (forced-colors: active) {
  .nav-item.active,
  .button,
  .status,
  .role-tag,
  .panel,
  .toolbar { border: 1px solid CanvasText; }
}

.archive-panel > .panel-head { padding: 18px 20px; }
.business-sections { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 901px) {
  .compact-archive-toolbar > label:has(input[name="startDate"]) { grid-column: 1; grid-row: 2; }
  .compact-archive-toolbar > label:has(input[name="endDate"]) { grid-column: 2; grid-row: 2; }
}
.archive-panel > .panel-head { flex-wrap: wrap; gap: 12px; }
.reconciliation-summary { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 16px 20px; background: var(--ui-color-primary-soft); border-radius: 12px; font-size: 13px; }
.reconciliation-summary strong { margin-left: 8px; }
.reconciliation-notes { padding: 18px 24px; font-size: 13px; line-height: 1.8; color: var(--ui-color-text-secondary); }
.reconciliation-notes summary { cursor: pointer; color: var(--ui-color-primary-strong); }
.archive-details { border-top: 1px solid var(--ui-color-border); }
.archive-details summary { display: flex; align-items: center; gap: 20px; cursor: pointer; padding: 16px 20px; list-style: none; }
.archive-details summary::-webkit-details-marker { display: none; }
.archive-details summary:hover { background: var(--ui-color-primary-soft); }
.archive-overview { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 20px; flex: 1; min-width: 0; }
.archive-overview > span, .archive-details dl > div { min-width: 0; }
.archive-overview small, .archive-details dt { display: block; color: var(--ui-color-text-secondary); font-size: 12px; }
.archive-overview strong { display: block; margin-top: 6px; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.archive-toggle { flex: 0 0 auto; color: var(--ui-color-primary-strong); font-size: 12px; }
.archive-collapse, .archive-details[open] .archive-expand { display: none; }
.archive-details[open] .archive-collapse { display: inline; }
.archive-details dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; margin: 0; padding: 24px; border-top: 1px solid var(--ui-color-border); }
.archive-details dd { margin: 6px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Wide lists share one column header; smaller screens retain each field label. */
.archive-list-head,
.archive-compact-row > summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) 80px;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
}
.archive-list-head {
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-surface-soft);
  font-size: 13px;
  font-weight: 600;
}
.archive-list-head > * { min-width: 0; overflow-wrap: anywhere; }
.archive-list-head > :last-child,
.archive-compact-row > summary > .archive-toggle { text-align: right; }
.archive-compact-row > summary { min-height: 64px; }
.archive-compact-row > summary > .archive-overview { display: contents; }
.archive-compact-row > summary > .archive-overview > span > small { display: none; }
.archive-compact-row > summary > .archive-overview strong { margin-top: 0; line-height: 1.55; }
.archive-compact-row > summary > .archive-overview > span:first-child > strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.archive-compact-row .archive-overview .number-cell { font-variant-numeric: tabular-nums; }
.archive-compact-row .archive-overview .number-cell strong { font-weight: 600; }
.archive-compact-row[open] > summary { background: var(--ui-color-primary-soft); }
.order-link-account { margin: 0 24px 24px; padding: 16px 20px; background: var(--ui-color-surface, white); border: 1px solid var(--ui-color-border); border-radius: 12px; }
.order-link-account h3 { margin: 0 0 10px; font-size: 14px; }
.order-link-account > div { font-size: 13px; }
.order-link-account small { display: block; margin-top: 4px; }
.order-link-account p { margin: 10px 0 0; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.7; }
.order-technical { margin: 0 24px 24px; border: 1px solid var(--ui-color-border); border-radius: 10px; overflow: hidden; }
.order-technical > summary { justify-content: space-between; padding: 14px 18px; color: var(--ui-color-primary-strong); font-size: 13px; }
.order-technical > summary > span { color: var(--ui-color-text-secondary); font-size: 12px; }
.order-technical > summary::after { content: '+'; font-size: 18px; }
.order-technical[open] > summary::after { content: '−'; }
.order-technical > dl { padding: 18px; }
/* Dashboard: earnings first, actionable queues second, compact business context. */
.dashboard-page { --ui-color-text-secondary: #52647b; gap: 24px; }
.dashboard-page h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.dashboard-page .record-link { font-size: 13px; }
.dashboard-page .operations-section { display: grid; min-width: 0; gap: 12px; }
.dashboard-page .operations-heading { display: flex; min-width: 0; justify-content: space-between; align-items: center; gap: 16px; }
.dashboard-page .operations-heading > div:first-child { min-width: 0; }
.dashboard-page .operations-heading h2 { font-size: 21px; }
.dashboard-page .operations-heading p { margin: 6px 0 0; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.6; }
.dashboard-period-switch { display: inline-flex; flex: 0 0 auto; gap: 3px; padding: 4px; border: 1px solid var(--ui-color-border); border-radius: var(--ui-radius-control); background: var(--ui-color-surface); }
.dashboard-period-switch button { min-width: 64px; min-height: 34px; padding: 6px 16px; border: 0; border-radius: 7px; color: var(--ui-color-text-secondary); background: transparent; font-size: 14px; cursor: pointer; }
.dashboard-period-switch button:hover { color: var(--ui-color-primary-strong); background: var(--ui-color-primary-soft); }
.dashboard-period-switch button[aria-pressed="true"] { color: white; background: var(--ui-color-primary); font-weight: 600; }
.dashboard-kpis { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dashboard-kpi { display: flex; min-width: 0; min-height: 144px; container-type: inline-size; flex-direction: column; padding: 20px; border: 1px solid var(--ui-color-border); border-radius: var(--ui-radius-card); background: var(--ui-color-surface); }
.dashboard-kpi > span { color: var(--ui-color-text-secondary); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.dashboard-kpi > strong { display: block; margin: 10px 0 10px; color: var(--ui-color-text); font-size: clamp(16px, 12cqi, 38px); font-weight: 600; line-height: 1.2; letter-spacing: -.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-kpi > small { display: block; margin-top: auto; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.dashboard-kpi-platform { border-color: var(--ui-color-primary-strong); background: var(--ui-color-primary-strong); box-shadow: 0 6px 16px rgba(40, 92, 167, .12); }
.dashboard-kpi-platform > span, .dashboard-kpi-platform > strong { color: white; }
.dashboard-kpi-platform > small { color: #e6efff; }
.dashboard-kpi > .dashboard-kpi-unknown { font-size: 22px; line-height: 1.65; letter-spacing: 0; }
.dashboard-metric-context { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 20px; padding: 16px 18px; border-radius: var(--ui-radius-control); background: #edf2f9; }
.dashboard-platform-breakdown { display: flex; grid-column: 1 / -1; min-width: 0; align-items: center; flex-wrap: wrap; gap: 10px 20px; font-size: 13px; }
.dashboard-breakdown-title { color: var(--ui-color-text); font-weight: 600; }
.dashboard-equation { display: flex; min-width: 0; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; color: var(--ui-color-text-secondary); }
.dashboard-equation > span { overflow-wrap: anywhere; }
.dashboard-equation strong { margin-left: 4px; color: var(--ui-color-text); font-size: 15px; font-variant-numeric: tabular-nums; }
.dashboard-equation-sign { color: var(--ui-color-text-secondary); }
.dashboard-equation-total, .dashboard-equation-total strong { color: var(--ui-color-primary-strong); }
.dashboard-platform-breakdown > .record-link { margin-left: auto; flex: 0 0 auto; }
.dashboard-metric-footnote { display: flex; grid-column: 2; grid-row: 2; min-width: 0; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.7; }
.dashboard-metric-footnote .record-link { flex: 0 0 auto; }
.dashboard-page .operations-note { margin: 0; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.dashboard-statistics-help { grid-column: 1; grid-row: 2; min-width: 0; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.7; }
.dashboard-statistics-help[open] { grid-column: 1 / -1; }
.dashboard-statistics-help[open] + .dashboard-metric-footnote { grid-column: 1 / -1; grid-row: 3; }
.dashboard-statistics-help > summary { width: fit-content; color: var(--ui-color-primary-strong); cursor: pointer; }
.dashboard-statistics-help > summary:focus-visible { border-radius: 4px; outline: 2px solid var(--ui-color-primary); outline-offset: 3px; }
.dashboard-statistics-help > div { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #d7e1ed; }
.dashboard-statistics-help p { margin: 0; overflow-wrap: anywhere; }
.dashboard-page .dashboard-tasks { padding: 20px; box-shadow: 0 4px 16px rgba(28, 49, 89, .035); }
.dashboard-tasks-heading, .dashboard-funds-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-tasks-heading .tag { font-size: 13px; }
.dashboard-task-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 14px; }
.dashboard-task-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.dashboard-task-row:nth-child(even) { border-left: 1px solid var(--ui-color-border); }
.dashboard-task-row:nth-child(n+3) { border-top: 1px solid var(--ui-color-border); }
.dashboard-task-row:hover { background: var(--ui-color-surface-soft); }
.dashboard-task-row:focus-visible { outline-offset: -3px; }
.dashboard-task-row > span:first-child { min-width: 0; }
.dashboard-task-row strong { font-size: 15px; font-weight: 600; }
.dashboard-task-row small { display: block; margin-top: 5px; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.dashboard-task-row > b { color: var(--ui-color-warning); font-size: 24px; font-variant-numeric: tabular-nums; }
.dashboard-task-row > b small { display: inline; margin: 0; color: inherit; font-weight: 400; }
.dashboard-task-row > span:last-child { color: var(--ui-color-primary); font-size: 18px; }
.dashboard-clear { display: flex; min-width: 0; align-items: center; gap: 10px; }
.dashboard-clear > img { width: 22px; height: 22px; flex: 0 0 22px; }
.dashboard-clear > div { display: flex; min-width: 0; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.dashboard-page .dashboard-clear h2 { font-size: 16px; }
.dashboard-clear.all-clear h2 { color: var(--ui-color-success); }
.dashboard-clear p { margin: 0; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.5; }
.dashboard-sync { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--ui-color-border); color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.6; }
.dashboard-sync > strong { color: var(--ui-color-success); font-size: 13px; }
.dashboard-sync > span:not(.dashboard-sync-dot) { overflow-wrap: anywhere; }
.dashboard-sync .record-link { margin-left: auto; flex: 0 0 auto; }
.dashboard-sync > small { width: 100%; font-size: 13px; }
.dashboard-sync-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--ui-color-success); }
.dashboard-sync-warning { padding: 11px 12px; border: 1px solid var(--ui-color-warning-soft); border-radius: var(--ui-radius-small); background: var(--ui-color-warning-soft); }
.dashboard-sync-warning > strong { color: var(--ui-color-warning); }
.dashboard-sync-warning .dashboard-sync-dot { background: var(--ui-color-warning); }
.dashboard-warning { margin: 0; padding: 10px 12px; border-radius: var(--ui-radius-small); color: var(--ui-color-warning); background: var(--ui-color-warning-soft); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.dashboard-warning .record-link { margin-left: 10px; }
.dashboard-transfer-notice { display: flex; min-width: 0; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; border-left: 3px solid #d9a34a; }
.dashboard-transfer-notice > div { flex: 1 1 360px; min-width: 0; }
.dashboard-transfer-notice strong { font-size: 14px; font-weight: 600; }
.dashboard-transfer-notice p { margin: 2px 0 0; }
.dashboard-transfer-notice > .record-link { flex: 0 0 auto; margin-left: 0; }
.dashboard-tasks > .dashboard-warning { margin-top: 12px; }
.dashboard-business { display: grid; min-width: 0; gap: 12px; }
.dashboard-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 6px 0; border: 1px solid var(--ui-color-border); border-radius: var(--ui-radius-control); background: var(--ui-color-surface); overflow: hidden; }
.dashboard-overview-card { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 12px; padding: 14px 20px; border: 0; border-radius: 0; background: transparent; text-align: left; cursor: pointer; }
.dashboard-overview-card + .dashboard-overview-card { border-left: 1px solid var(--ui-color-border); }
.dashboard-overview-card:hover { background: var(--ui-color-surface-soft); }
.dashboard-overview-card:focus-visible { outline-offset: -3px; }
.dashboard-overview-card > span:first-child { display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; color: var(--ui-color-text-secondary); font-size: 14px; }
.dashboard-overview-card img { width: 18px; height: 18px; flex: 0 0 18px; }
.dashboard-overview-card > strong { grid-column: 1; grid-row: 2; font-size: 28px; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-overview-card > small { grid-column: 1 / -1; grid-row: 3; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.dashboard-overview-card .dashboard-card-link { grid-column: 2; grid-row: 2; color: var(--ui-color-primary-strong); font-size: 13px; }
.dashboard-page .dashboard-funds { padding: 20px; box-shadow: none; }
.dashboard-funds-values { display: grid; container-type: inline-size; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.dashboard-funds-values > div { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 10px; }
.dashboard-funds-values > div + div { padding-left: 20px; border-left: 1px solid var(--ui-color-border); }
.dashboard-funds-values span { color: var(--ui-color-text-secondary); font-size: 14px; }
.dashboard-funds-values strong { min-width: 0; font-size: clamp(16px, 6cqi, 24px); line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dashboard-funds > p { margin: 12px 0 0; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.6; }
.dashboard-accounting-note { display: flex; min-width: 0; align-items: baseline; flex-wrap: wrap; gap: 5px 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ui-color-border); color: var(--ui-color-text-secondary); font-size: 13px; }
.dashboard-accounting-note > strong { color: var(--ui-color-text); font-size: 13px; }
.dashboard-accounting-note > small { font-size: 13px; overflow-wrap: anywhere; }
.dashboard-updated { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 12px; margin: 0; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.6; text-align: right; }
@media (min-width: 1200px) {
  .dashboard-task-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .dashboard-task-row:nth-child(n+3) { border-top: 0; }
  .dashboard-task-row + .dashboard-task-row { border-left: 1px solid var(--ui-color-border); }
}
@media (max-width: 1100px) {
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpi { min-height: 126px; }
  .dashboard-task-list { grid-template-columns: minmax(0, 1fr); }
  .dashboard-task-row:nth-child(even) { border-left: 0; }
  .dashboard-task-row + .dashboard-task-row { border-top: 1px solid var(--ui-color-border); }
  .dashboard-metric-context { grid-template-columns: minmax(0, 1fr); }
  .dashboard-statistics-help { grid-column: 1 / -1; }
  .dashboard-metric-footnote { grid-column: 1 / -1; grid-row: 3; }
  .dashboard-funds-values > div { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 900px) {
  .dashboard-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-overview-card { padding: 12px 16px; }
  .dashboard-overview-card + .dashboard-overview-card { border-left: 0; border-top: 1px solid var(--ui-color-border); }
  .dashboard-overview-card > span:first-child { grid-column: 1; }
  .dashboard-overview-card > strong { grid-column: 2; grid-row: 1 / 3; text-align: right; }
  .dashboard-overview-card > small { grid-column: 1; grid-row: 2; }
  .dashboard-overview-card .dashboard-card-link { grid-column: 1 / -1; grid-row: 3; }
  .dashboard-sync { align-items: baseline; }
  .dashboard-sync .record-link { margin-left: 0; }
}
@media (max-width: 600px) {
  .dashboard-page { gap: 20px; }
  .dashboard-page .operations-heading { align-items: flex-start; gap: 12px; }
  .dashboard-page .operations-heading h2 { font-size: 19px; }
  .dashboard-page .operations-heading p { font-size: 13px; }
  .dashboard-period-switch button { min-width: 48px; padding: 6px 10px; }
  .dashboard-kpis { gap: 10px; }
  .dashboard-kpi { min-height: 140px; padding: 14px; }
  .dashboard-kpi > span { font-size: 13px; }
  .dashboard-kpi > .dashboard-kpi-unknown { font-size: 20px; }
  .dashboard-kpi > small { font-size: 13px; }
  .dashboard-metric-context { padding: 14px; }
  .dashboard-platform-breakdown { gap: 8px; }
  .dashboard-breakdown-title { flex-basis: 100%; }
  .dashboard-equation { gap: 4px 8px; }
  .dashboard-equation strong { margin-left: 0; font-size: 14px; }
  .dashboard-platform-breakdown > .record-link { margin-left: 0; }
  .dashboard-page .dashboard-tasks, .dashboard-page .dashboard-funds { padding: 16px; }
  .dashboard-task-row { padding: 12px 0; }
  .dashboard-clear { align-items: flex-start; }
  .dashboard-clear > div { display: block; }
  .dashboard-clear p { margin-top: 4px; font-size: 13px; }
  .dashboard-sync > span:not(.dashboard-sync-dot) { flex-basis: calc(100% - 18px); margin-left: 17px; }
  .dashboard-sync > .record-link { margin-left: 17px; }
  .dashboard-funds-values { gap: 12px; }
  .dashboard-funds-values > div + div { padding-left: 12px; }
  .dashboard-funds-heading { align-items: baseline; flex-wrap: wrap; }
}
.promoter-performance-panel .panel-head { padding: 18px 20px; }
.promoter-performance-panel .data-table { min-width: 780px; }
.promoter-applications-panel .data-table { min-width: 760px; }
.promoter-applications-panel .application-review-note { min-width: 180px; max-width: 380px; white-space: normal; overflow-wrap: anywhere; }
.promoter-applications-panel .table-actions { display: flex; gap: 6px; }
.application-settings-panel { padding: 20px 24px; }
.application-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.application-settings-heading h2 { margin: 0 0 8px; font-size: 16px; }
.application-settings-heading p { margin: 0; color: var(--ui-color-text-secondary); font-size: 13px; line-height: 1.7; }
.application-settings-switch { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px; border: 1px solid var(--ui-color-border); border-radius: 20px; background: var(--ui-color-surface-soft); color: var(--ui-color-text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
.application-settings-switch > span { position: relative; width: 32px; height: 20px; border-radius: 12px; background: var(--ui-color-text-secondary); }
.application-settings-switch > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; }
.application-settings-switch.is-on > span { background: var(--ui-color-primary); }
.application-settings-switch.is-on > span::after { left: 15px; }
.application-settings-switch.is-on { color: var(--ui-color-primary-strong); background: var(--ui-color-primary-soft); border-color: var(--ui-color-primary); }
.application-settings-switch:focus-visible { outline: 2px solid var(--ui-color-primary); outline-offset: 3px; }
.application-settings-status { margin: 14px 0 6px; font-size: 13px; }
.application-settings-note { margin: 4px 0; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.7; }
.application-settings-error { margin: 12px 0; color: var(--ui-color-danger, #b42318); font-size: 13px; line-height: 1.7; }
.application-history { max-width: 380px; margin-top: 4px; font-size: 12px; white-space: normal; }
.application-history > summary { width: fit-content; padding: 5px 0; color: var(--ui-color-primary-strong); cursor: pointer; }
.application-history[open] > summary { margin-bottom: 5px; }
.application-history > div { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--ui-radius-small); background: var(--ui-color-surface-soft); }
.application-history p { margin: 0; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.application-history small { margin-top: 0; overflow: visible; white-space: normal; }
.application-result { display: -webkit-box; max-width: 380px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.performance-breakdown { margin-top: 4px; white-space: normal; }
.performance-breakdown > summary { width: fit-content; padding: 4px 0; color: var(--ui-color-primary-strong); font-size: 12px; cursor: pointer; }
.performance-breakdown small { max-width: none; overflow: visible; white-space: normal; }
.qualified-status { display: block; margin-top: 5px; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.45; }
.order-split { margin: 0 24px 24px; padding: 18px 20px; border: 1px solid var(--ui-color-border); border-radius: 12px; background: var(--ui-color-primary-soft); font-size: 13px; }
.order-split-heading, .order-split-basis { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.order-split h3 { margin: 0; font-size: 15px; }
.order-split-source { color: var(--ui-color-primary-strong); font-size: 12px; }
.order-split-explanation, .order-split-note { margin: 10px 0 0; line-height: 1.7; overflow-wrap: anywhere; }
.order-split-basis { margin: 14px 0 10px; color: var(--ui-color-text-secondary); font-size: 12px; }
.order-split-basis strong { margin-left: 6px; color: var(--ui-color-text); font-size: 14px; }
.order-split-table { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--ui-color-surface, white); }
.order-split-table th, .order-split-table td { padding: 12px; border-bottom: 1px solid var(--ui-color-border); text-align: right; font-size: 13px; }
.order-split-table th:first-child { width: 52%; text-align: left; }
.order-split-table thead th { color: var(--ui-color-text-secondary); font-size: 12px; font-weight: 400; }
.order-split-table tbody th { font-weight: 400; overflow-wrap: anywhere; }
.order-split-table tbody th > strong { display: block; margin-bottom: 5px; font-weight: 500; }
.order-split-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-split-table .record-link small, .order-split-recipient { display: block; color: var(--ui-color-text-secondary); font-size: 12px; }
.order-split-table .record-link small { margin-top: 3px; }
.order-split-note { color: var(--ui-color-text-secondary); font-size: 12px; }
.archive-empty { padding: 28px; color: var(--ui-color-text-secondary); }
.record-link { border: 0; background: none; padding: 0; color: var(--ui-color-primary-strong); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.record-link:hover { text-decoration: underline; }
.copy-value { display: inline-flex; min-height: 28px; margin-left: 8px; padding: 3px 7px; align-items: center; border: 1px solid var(--ui-color-border); border-radius: 6px; font-size: 12px; white-space: nowrap; vertical-align: baseline; }
.archive-relations, .archive-scope { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.archive-relations { padding: 0 24px 22px; }
.archive-scope { overflow-wrap: anywhere; }
.archive-toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; }
.archive-toolbar > .field, .archive-toolbar > .select-field { display: block; min-width: 0; }
.archive-toolbar > .button { grid-column: 4; grid-row: 1; justify-self: start; }
.archive-toolbar .search-field input { padding-left: 38px; }
.filter-toolbar { display: block; padding: 16px; }
.filter-main { display: flex; min-width: 0; align-items: end; flex-wrap: wrap; gap: 12px 16px; }
.filter-main > .field { flex: 2 1 280px; }
.filter-main > .select-field { flex: 0 1 220px; }
.filter-main > .filter-search { flex: 2 1 320px; }
.filter-toolbar .select-field { display: block; min-width: 0; }
.filter-toolbar .select-field > span:not(.sr-only) { margin-bottom: 6px; font-size: 12px; }
.filter-toolbar .select-field select,
.filter-toolbar .select-field input { width: 100%; min-width: 0; min-height: 42px; }
.filter-toolbar .search-field input { padding-left: 38px; }
.filter-actions { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.filter-toolbar .filter-actions .button { width: auto; min-width: 72px; flex: 0 0 auto; }
.filter-advanced { margin-top: 12px; border-top: 1px solid var(--ui-color-border); }
.filter-advanced > summary { width: fit-content; margin-top: 10px; padding: 3px 0; color: var(--ui-color-primary-strong); font-size: 13px; cursor: pointer; }
.filter-active-note { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 5px; background: var(--ui-color-primary-soft); font-size: 12px; }
.filter-advanced-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px 16px; padding-top: 12px; }
.filter-advanced-fields > * { min-width: 0; }
.status-tabs { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.status-tabs > button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--ui-color-border); border-radius: var(--ui-radius-small); color: var(--ui-color-text-secondary); background: var(--ui-color-surface); font-size: 13px; cursor: pointer; }
.status-tabs > button:hover { color: var(--ui-color-primary-strong); border-color: #bfd1ec; }
.status-tabs > button[aria-pressed="true"],
.status-tabs > button.active { border-color: #bfd1ec; color: var(--ui-color-primary-strong); background: var(--ui-color-primary-soft); font-weight: 600; }
.status-tabs > button small { display: inline-grid; min-width: 21px; min-height: 21px; padding: 1px 5px; place-items: center; border-radius: var(--ui-radius-pill); color: inherit; background: rgba(53, 105, 185, .08); font-size: 12px; font-variant-numeric: tabular-nums; }
.user-section-links { display: flex; flex-wrap: wrap; gap: 10px; }
.user-section-links a { padding: 8px 12px; border: 1px solid var(--ui-color-border); border-radius: 8px; color: var(--ui-color-primary-strong); background: white; font-size: 12px; }
.user-section-links strong { margin-left: 6px; }
.user-related-section { scroll-margin-top: 130px; }
.toolbar .select-field > span:not(.sr-only) { display: block; margin-bottom: 6px; color: var(--ui-color-text-secondary); font-size: 12px; }
.toolbar .select-field input { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--ui-color-border); border-radius: 8px; font: inherit; background: white; }
.runtime-identity { padding: 6px 10px; border-radius: 8px; background: #f1f3f6; color: #5c6572; font-size: 11px; }
.runtime-identity.development, .runtime-identity.test { background: #fff3d6; color: #795215; }
.runtime-identity.production { background: #e2f4e9; color: #216442; }
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; }
  .operator { flex-wrap: wrap; }
  .operator > .runtime-identity { display: block; max-width: 165px; font-size: 10px; }
}
@media (max-width: 900px) {
  .archive-overview, .archive-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-toolbar > .button { grid-column: auto; grid-row: auto; }
  .archive-list-head { display: none; }
  .archive-compact-row > summary { display: flex; align-items: center; padding: 16px; }
  .archive-compact-row > summary > .archive-overview { display: grid; gap: 12px 20px; }
  .archive-compact-row > summary > .archive-overview > span > small { display: block; margin-bottom: 5px; }
  .archive-compact-row .archive-overview .number-cell { text-align: left !important; }
  .filter-advanced-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .order-link-account, .order-technical { margin: 0 16px 20px; }
  .order-link-account { padding: 14px; }
  .order-technical > summary { flex-direction: row; align-items: center; }
  .order-technical > summary > span { display: none; }
  .order-split { margin: 0 16px 20px; padding: 14px 12px; }
  .order-split-table { table-layout: auto; }
  .order-split-table th, .order-split-table td { padding: 10px 7px; }
  .order-split-table th:first-child { width: auto; }
  .archive-details summary { align-items: stretch; flex-direction: column; gap: 14px; }
  .archive-details dl { grid-template-columns: minmax(0, 1fr); }
  .archive-toolbar { grid-template-columns: minmax(0, 1fr); }
  .archive-compact-row > summary { align-items: stretch; }
  .archive-compact-row > summary > .archive-toggle { align-self: flex-end; }
  .filter-main { align-items: stretch; flex-direction: column; }
  .filter-main > .field,
  .filter-main > .select-field { flex-basis: auto; width: 100%; }
  .filter-actions { margin-left: 0; }
  .filter-advanced-fields { grid-template-columns: minmax(0, 1fr); }
  .status-tabs > button { min-height: 42px; }
}

/* Users: readable identities and current ownership. */
.users-page .section-intro p { font-size: 13px; }
.users-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 14px 16px;
  padding: 18px;
}
.users-toolbar > .select-field { display: block; min-width: 0; }
.users-toolbar > .users-search { grid-column: span 2; }
.users-toolbar .select-field > span:not(.sr-only) { margin-bottom: 7px; font-size: 12px; }
.users-toolbar .select-field input,
.users-toolbar .select-field select { width: 100%; min-width: 0; min-height: 44px; font-size: 14px; }
.users-filter-actions { display: flex; min-width: 0; align-items: center; gap: 8px; }
.users-filter-actions .button { min-height: 44px; flex: 0 0 auto; padding-inline: 16px; white-space: nowrap; }
.users-results-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 16px 18px; }
.users-results-heading h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.users-results-heading h2 small { color: var(--ui-color-text-secondary); font-size: 13px; font-weight: 400; }
.users-results-heading p { margin: 0; color: var(--ui-color-text-secondary); font-size: 12px; }
.users-table { min-width: 960px; table-layout: fixed; white-space: normal; }
.users-table th { padding: 12px 14px; font-size: 13px; }
.users-table td { padding: 12px 14px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.users-table th:nth-child(1) { width: 20%; }
.users-table th:nth-child(2) { width: 14%; }
.users-table th:nth-child(3) { width: 22%; }
.users-table th:nth-child(4) { width: 16%; }
.users-table th:nth-child(5) { width: 16%; }
.users-table th:nth-child(6) { width: 12%; }
.users-table small { max-width: none; margin-top: 4px; overflow: visible; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.users-table .role-tags { margin-bottom: 7px; }
.users-page .role-tag { max-width: 100%; min-height: 26px; padding: 5px 8px; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.users-page .role-tag.promotion { border-color: #c9daf4; color: var(--ui-color-primary-strong); background: var(--ui-color-primary-soft); font-weight: 600; }
.users-page .status { font-size: 12px; }
.users-table .button.compact { min-height: 36px; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.users-page .pagination { padding: 14px 18px; font-size: 12px; }
.users-page .user-identity,
.users-page .user-owner { min-width: 0; }
.users-page .user-name { display: block; max-width: 100%; color: var(--ui-color-primary-strong); font-size: 14px; font-weight: 600; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.users-page .user-identity > small,
.users-page .user-owner > small { display: block; margin-top: 4px; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.users-page .user-owner > strong { display: block; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.users-page .user-summary { padding: 24px; }
.user-summary-header { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.user-summary-header > div { min-width: 0; }
.user-summary-header .user-identity { flex: 1 1 220px; }
.user-summary-header .user-name { margin: 0 0 6px; color: var(--ui-color-text); font-size: 23px; line-height: 1.35; }
.user-summary-header .user-identity > small { font-size: 13px; }
.user-summary-header .role-tags { margin-bottom: 8px; }
.user-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--ui-color-border); }
.user-summary-item { min-width: 0; }
.user-summary-item > h3,
.user-summary-item > dt { display: block; margin: 0 0 8px; color: var(--ui-color-text-secondary); font-size: 12px; font-weight: 500; }
.user-summary-item > span,
.user-summary-item > strong,
.user-summary-item > dd { display: block; margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.user-summary-item > small { display: block; margin-top: 4px; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.5; }
@media (max-width: 1100px) {
  .users-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .users-toolbar { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  .users-toolbar > .users-search { grid-column: auto; }
  .users-results-heading { align-items: flex-start; flex-direction: column; padding: 18px 16px; }
  .users-page .user-summary { padding: 18px 16px; }
  .user-summary-header .user-name { font-size: 21px; }
  .user-summary-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* Operational lists keep explanations readable and actions easy to reach. */
.networks-table { table-layout: fixed; }
.networks-table { min-width: 1050px; }
.networks-table th:nth-child(1) { width: 14%; }
.networks-table th:nth-child(2) { width: 18%; }
.networks-table th:nth-child(3) { width: 17%; }
.networks-table th:nth-child(4) { width: 13%; }
.networks-table th:nth-child(5) { width: 14%; }
.networks-table th:nth-child(6) { width: 9%; }
.networks-table th:nth-child(7) { width: 15%; }
.network-location small { display: block; margin-top: 4px; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.network-location .record-link { display: inline-flex; align-items: center; min-height: 32px; }
.networks-table td:nth-child(1),
.networks-table td:nth-child(2),
.networks-table td:nth-child(4) { white-space: normal; overflow-wrap: anywhere; }
.networks-table td > strong,
.networks-table small { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.networks-table .record-link { max-width: 100%; white-space: normal; }
.networks-table .status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

.pagination { flex-wrap: wrap; gap: 12px 18px; }
.pagination .pagination-controls { width: auto; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; }
.pagination-size,
.pagination-jump,
.pagination-jump label { display: inline-flex; min-width: 0; margin: 0; align-items: center; gap: 7px; white-space: nowrap; }
.pagination-size select,
.pagination-jump input { min-height: 36px; padding: 6px 9px; border: 1px solid #d8e0ea; border-radius: var(--ui-radius-small); color: var(--ui-color-text); background: var(--ui-color-surface); font-size: 12px; }
.pagination-size select { width: 84px; cursor: pointer; }
.pagination-jump input { width: 64px; }
.pagination-size select:focus,
.pagination-jump input:focus { border-color: var(--ui-color-primary); box-shadow: var(--ui-shadow-focus); }

.dialog-progress { margin: 14px 0; padding: 12px 14px; border-radius: var(--ui-radius-small); color: var(--ui-color-primary-strong); background: var(--ui-color-primary-soft); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.dialog-actions .button { line-height: 1.5; }
.operation-status {
  position: sticky;
  z-index: 9;
  top: 78px;
  display: flex;
  max-height: 40vh;
  max-height: 40dvh;
  margin: 16px max(var(--content-gutter), calc((100% - var(--content-width)) / 2 + var(--content-gutter))) 0;
  padding: 14px 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  overflow: auto;
  border: 1px solid var(--ui-color-border);
  border-left: 4px solid var(--ui-color-primary);
  border-radius: var(--ui-radius-control);
  color: var(--ui-color-primary-strong);
  background: var(--ui-color-primary-soft);
  box-shadow: var(--ui-shadow-card);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.operation-status > div:first-child { min-width: 0; flex: 1 1 320px; }
.operation-status strong,
.operation-status span { display: block; }
.operation-status span { margin-top: 3px; color: var(--ui-color-text-secondary); font-size: 12px; }
.operation-status p { margin: 6px 0 0; }
.operation-status.success { border-left-color: var(--ui-color-success); color: var(--ui-color-success); background: var(--ui-color-success-soft); }
.operation-status.error { border-left-color: var(--ui-color-danger); color: var(--ui-color-danger); background: var(--ui-color-danger-soft); }
.operation-status.warning { border-left-color: var(--ui-color-warning); color: var(--ui-color-warning); background: var(--ui-color-warning-soft); }
.operation-status-actions { display: flex; flex: 0 1 auto; align-items: center; flex-wrap: wrap; gap: 8px; }

@media (min-width: 701px) {
  .data-table tbody tr:hover td:last-child { background: #fafcff; }
}

@media (max-width: 700px) {
  .toolbar:not(.archive-toolbar):not(.users-toolbar):not(.filter-toolbar) .select-field { align-items: center; gap: 10px; }
  .toolbar:not(.archive-toolbar):not(.users-toolbar):not(.filter-toolbar) .select-field > span:not(.sr-only) { flex: 0 0 auto; margin-bottom: 0; white-space: nowrap; }
  .toolbar:not(.archive-toolbar):not(.users-toolbar):not(.filter-toolbar) .select-field select { width: auto; min-width: 0; flex: 1 1 0; }
  .networks-table { display: block; width: 100%; min-width: 0; white-space: normal; }
  .networks-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .networks-table tbody { display: block; width: 100%; }
  .networks-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 18px 16px; border-bottom: 1px solid var(--ui-color-border); }
  .networks-table tbody tr:last-child { border-bottom: 0; }
  .networks-table tbody td { display: block; min-width: 0; max-width: none; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .networks-table tbody tr:hover { background: #fafcff; }
  .networks-table tbody tr:hover td { background: transparent; }
  .networks-table td::before { display: block; margin-bottom: 5px; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.5; }
  .networks-table td:nth-child(1),
  .networks-table td:nth-child(2),
  .networks-table td:nth-child(3),
  .networks-table td:last-child { grid-column: 1 / -1; }
  .networks-table td:nth-child(1)::before { content: "分享网络"; }
  .networks-table td:nth-child(6)::before { content: "状态"; }
  .networks-table td:nth-child(2)::before { content: "Wi-Fi 信息"; }
  .networks-table td:nth-child(3)::before { content: "网络位置"; }
  .networks-table td:nth-child(4)::before { content: "所有者"; }
  .networks-table td:nth-child(5)::before { content: "连接码"; }
  .networks-table td:nth-child(7)::before { content: "更新时间"; }
  .network-location .record-link { min-height: 44px; }
  .pagination .pagination-controls { width: 100%; gap: 10px 8px; }
  .pagination .pagination-size { flex: 1 1 100%; }
  .pagination .pagination-jump { flex: 1 1 100%; flex-wrap: wrap; }
  .pagination .pagination-jump .button { flex: 0 0 auto; }
  .pagination .button { min-height: 40px; }
  .dialog-actions { display: flex; flex-wrap: wrap; }
  .dialog-actions .button { width: auto; flex: 1 1 140px; }
  .operation-status { top: 70px; margin: 12px 16px 0; padding: 12px; }
  .operation-status-actions { width: 100%; }
  .operation-status-actions .button { min-height: 40px; flex: 1 1 120px; }
}

@media (max-width: 420px) {
  .operation-status { margin-inline: 14px; }
}

.followup-row { padding: 20px 24px; border-top: 1px solid var(--ui-color-border); }
.followup-row-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.followup-row-heading > strong { min-width: 0; overflow-wrap: anywhere; }
.followup-row-heading > div, .followup-actions, .recheck-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.followup-row > p { margin: 10px 0; line-height: 1.7; overflow-wrap: anywhere; }
.followup-reason { color: var(--ui-color-warning); }
.followup-overdue { color: var(--ui-color-danger); background: var(--ui-color-danger-soft); }
.followup-note { padding: 12px; border-radius: var(--ui-radius-small); background: var(--ui-color-background); white-space: pre-wrap; }
.followup-metadata, .diagnostics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; margin: 16px 0; }
.followup-metadata > div, .diagnostics-grid > div { min-width: 0; }
.followup-metadata dt, .diagnostics-grid dt { margin-bottom: 6px; color: var(--ui-color-text-secondary); font-size: 12px; }
.followup-metadata dd, .diagnostics-grid dd { margin: 0; line-height: 1.6; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.withdrawal-diagnostics, .order-recheck-panel, .order-recheck-results { padding: 20px 24px; }
.withdrawal-diagnostics .panel-head, .order-recheck-results .panel-head { padding: 0 0 14px; }
.diagnostics-conclusion { padding: 12px; border-radius: var(--ui-radius-small); line-height: 1.7; }
.diagnostics-conclusion.ready { color: var(--ui-color-success); background: var(--ui-color-success-soft); }
.diagnostics-conclusion.blocked { color: var(--ui-color-warning); background: var(--ui-color-warning-soft); }
.diagnostics-account { padding-top: 16px; border-top: 1px solid var(--ui-color-border); }
.diagnostics-reasons { margin-top: 16px; padding: 16px; border: 1px solid var(--ui-color-border); border-radius: var(--ui-radius-small); }
.diagnostics-reasons.blocking { background: var(--ui-color-warning-soft); }
.diagnostics-reasons h3 { margin: 0; font-size: 14px; }
.diagnostics-reasons ul { margin: 10px 0 0; padding-left: 20px; }
.diagnostics-reasons li { margin-top: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.diagnostics-reasons p { margin: 4px 0 0; }
.diagnostics-note { margin: 12px 0; color: var(--ui-color-text-secondary); line-height: 1.7; overflow-wrap: anywhere; }
.diagnostics-updated { margin: 16px 0 0; color: var(--ui-color-text-secondary); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.error-copy { color: var(--ui-color-danger); }
.recheck-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.recheck-form-grid > label { min-width: 0; }
.recheck-form-grid input { width: 100%; min-width: 0; }
.recheck-table { min-width: 620px; }
.recheck-table td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .recheck-form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .followup-row, .withdrawal-diagnostics, .order-recheck-panel, .order-recheck-results { padding: 16px; }
  .followup-row-heading { flex-direction: column; }
  .followup-metadata, .diagnostics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 420px) {
  .followup-metadata, .diagnostics-grid { grid-template-columns: minmax(0, 1fr); }
}
