/* CCPOK Console — Lumen dark design system.
   Tokens are the single source of truth for color, type, radius, spacing and motion. */
:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --surface: #141518;
  --surface-strong: #191a1f;
  --surface-soft: #191a1f;
  --surface-input: #0f1013;
  --line: #24252b;
  --line-strong: #32343c;
  --text: #f4f5f7;
  --muted: #8b8f99;
  --muted-2: #63666f;
  --brand: #4d8dff;
  --brand-2: #3f7df0;
  --brand-soft: rgba(77, 141, 255, 0.14);
  --brand-text: #a9c8ff;
  --hover: rgba(255, 255, 255, 0.045);
  --danger: #f07167;
  --warning: #e2b15c;
  --success: #4cc38a;
  --danger-soft: rgba(240, 113, 103, 0.12);
  --warning-soft: rgba(226, 177, 92, 0.12);
  --success-soft: rgba(76, 195, 138, 0.12);
  --font-body: 14px;
  --font-small: 12px;
  --font-section: 16px;
  --font-title: 24px;
  --font-stat: 32px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --control-height: 38px;
  --radius: 18px;
  --radius-control: 12px;
  --radius-inner: 14px;
  --sidebar-width: 240px;
  --sidebar-collapsed: 76px;
  --content-max: 1216px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 10px 32px rgba(0, 0, 0, 0.24);
  --motion: 180ms cubic-bezier(0.2, 0.7, 0.3, 1);
  font-family: Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: var(--font-body);
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
}
* { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: #2e3037 transparent; }
::selection { background: rgba(77, 141, 255, 0.35); color: #fff; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea { border: 1px solid var(--line-strong); background: var(--surface); }
button { cursor: pointer; }
button:disabled, [aria-busy="true"] { cursor: wait; opacity: 0.55; }
button:disabled { cursor: default; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid rgba(77, 141, 255, 0.7); outline-offset: 2px; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--surface-input);
  color: var(--text);
  transition: border-color var(--motion), box-shadow var(--motion), background var(--motion);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:hover, select:hover, textarea:hover { border-color: #3d404a; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
input[type="checkbox"], input[type="radio"] { width: 16px; min-height: 16px; accent-color: var(--brand); }
input[type="file"] { padding: 6px 10px; color: var(--muted); }
input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: #24262d; }
select option { background: var(--surface-strong); color: var(--text); }
textarea { min-height: 100px; resize: vertical; }
label { display: grid; gap: var(--space-2); min-width: 0; font-size: var(--font-small); color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: var(--font-title); line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; }
h2, h3 { font-size: var(--font-section); line-height: 1.45; font-weight: 600; letter-spacing: -0.005em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-text); }
.hidden { display: none !important; }
svg { display: block; flex-shrink: 0; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.button, .btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-strong);
  color: var(--text);
  font-size: var(--font-body);
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
  transition: background var(--motion), border-color var(--motion), color var(--motion),
    transform var(--motion), box-shadow var(--motion);
}
.button:hover, .btn-sm:hover { background: #21232a; border-color: #3d404a; }
.button:active, .btn-sm:active { transform: scale(0.985); }
.button.primary {
  background: var(--brand);
  border-color: transparent;
  border-radius: 999px;
  padding-inline: 18px;
  color: #08111f;
  font-weight: 600;
}
.button.primary:hover { background: #6ba1ff; border-color: transparent; }
.button.primary:active { background: var(--brand-2); }
.button.danger, .btn-sm.danger {
  color: var(--danger);
  border-color: rgba(240, 113, 103, 0.32);
  background: transparent;
}
.button.danger:hover, .btn-sm.danger:hover { background: var(--danger-soft); border-color: rgba(240, 113, 103, 0.5); }
.button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button.ghost:hover { background: var(--hover); color: var(--text); }
.icon-button { width: var(--control-height); padding: 0; }

/* ---------- Login ---------- */
.login-view {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: var(--space-6);
  background:
    radial-gradient(680px 420px at 50% 12%, rgba(77, 141, 255, 0.12), transparent 70%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  padding: var(--space-8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.login-card .brand-row { margin-bottom: 16px; }
.login-card .button.primary { width: 100%; margin-top: var(--space-2); }
.login-meta { margin: var(--space-4) 0 0; font-size: var(--font-small); color: var(--muted-2); text-align: center; }
.login-card > .login-meta:first-of-type { margin: 0 0 24px; font-size: 13px; color: var(--muted); text-align: left; }
.brand-row { display: flex; align-items: center; gap: var(--space-3); }
.brand-row strong { display: block; font-size: var(--font-section); font-weight: 600; letter-spacing: -0.01em; }
.brand-row span:not(.brand-mark) { display: block; margin-top: 2px; font-size: var(--font-small); color: var(--muted); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #6aa2ff, #3f7df0);
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* ---------- App shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100dvh;
  transition: grid-template-columns var(--motion);
}
.sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  min-width: 0;
  padding: 20px 12px 12px;
  background: #0c0d10;
  border-right: 1px solid var(--line);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 8px 20px;
}
.sidebar .brand-row { padding: 0; margin: 0; min-width: 0; }
.brand-copy { min-width: 0; }
.brand-copy strong { white-space: nowrap; }
.brand-copy span { white-space: nowrap; }
.sidebar-collapse { color: var(--muted-2); }
.sidebar-collapse:hover { color: var(--text); }
.sidebar-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.nav { display: grid; gap: 18px; padding-bottom: 16px; }
.nav-section { display: grid; gap: 2px; }
.nav-label {
  padding: 0 12px 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: var(--font-body);
  line-height: 22px;
  text-align: left;
  transition: background var(--motion), color var(--motion);
}
.nav-button:hover { background: var(--hover); color: var(--text); }
.nav-button:active { transform: none; }
.nav-button.active { background: var(--brand-soft); color: var(--brand-text); font-weight: 500; }
.nav-button.active .nav-icon { color: var(--brand); }
.nav-icon { width: 20px; height: 20px; color: inherit; }
.nav-icon svg { width: 20px; height: 20px; }
.sidebar-footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 2px 2px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.account-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  transition: background var(--motion);
}
.account-button:hover, .account-button[aria-expanded="true"] { background: var(--hover); }
.account-copy { display: grid; gap: 1px; min-width: 0; flex: 1; }
.account-copy strong { font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-copy small { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-chevron { width: 16px; height: 16px; color: var(--muted-2); transition: transform var(--motion); }
.account-chevron svg { width: 16px; height: 16px; }
.account-button[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.admin-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #262a33, #1a1c22);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

/* ---------- Menus ---------- */
.menu {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 6px);
  z-index: 60;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  animation: menu-in 160ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.menu[hidden] { display: none; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}
.menu-item:hover { background: var(--hover); }
.menu-item svg { width: 16px; height: 16px; color: var(--muted); }
.menu-static { color: var(--muted); cursor: default; justify-content: space-between; }
.menu-static:hover { background: transparent; }
.menu-static strong { color: var(--text); font-weight: 500; font-size: 12px; }
.menu-sep { height: 1px; margin: 5px 6px; background: var(--line); }
@keyframes menu-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Collapsed sidebar (desktop only) */
@media (min-width: 901px) {
  .app-shell:has(.sidebar) { transition: grid-template-columns var(--motion); }
  body.sidebar-collapsed .app-shell { grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr); }
  body.sidebar-collapsed .sidebar { padding-inline: 10px; }
  body.sidebar-collapsed .sidebar-head { flex-direction: column; gap: 10px; padding: 0 0 16px; }
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .account-copy,
  body.sidebar-collapsed .account-chevron { display: none; }
  body.sidebar-collapsed .nav { gap: 12px; }
  body.sidebar-collapsed .nav-button { justify-content: center; gap: 0; padding: 8px; font-size: 0; }
  body.sidebar-collapsed .nav-button .nav-icon { font-size: 0; }
  body.sidebar-collapsed .account-button { justify-content: center; padding: 8px 4px; }
  body.sidebar-collapsed .menu { left: 0; right: auto; width: 216px; }
}

/* ---------- Workspace ---------- */
.workspace { min-width: 0; padding: 0 32px 48px; }
.topbar, .panel { width: 100%; max-width: var(--content-max); margin-inline: auto; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.page-heading { min-width: 0; margin-right: auto; }
.topbar p { margin: 0 0 4px; font-size: var(--font-small); color: var(--muted-2); letter-spacing: 0.02em; }
.topbar h1 { margin: 0; }
.topbar-tools, .topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-tools { justify-content: flex-end; }
#refreshStatus { color: var(--muted-2); font-size: var(--font-small); }
#globalMessage { width: 100%; max-width: var(--content-max); margin-inline: auto; }
#globalMessage:not(:empty) { margin-bottom: 20px; }
.panel { display: none; }
.panel.active { display: grid; gap: 24px; }
.grid, .stack, .compact-list, .ledger-list { display: grid; gap: 16px; min-width: 0; }
.ledger-list { gap: 0; }

/* ---------- Dashboard ---------- */
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card, .card, .table-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.metric-card, .card { padding: 24px; }
.metric-card {
  display: grid;
  align-content: start;
  gap: 2px;
  transition: border-color var(--motion), background var(--motion);
}
.metric-card:hover { border-color: var(--line-strong); }
.metric-card span, .metric-label { display: block; font-size: var(--font-small); color: var(--muted); }
.metric-value {
  display: block;
  margin: 8px 0 4px;
  font-size: var(--font-stat);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.metric-hint { display: block; font-size: var(--font-small); color: var(--muted-2); line-height: 1.5; }
.dash-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.quick-card { display: flex; flex-direction: column; }
.quick-card .card-head { margin-bottom: 14px; }
.quick-list { display: grid; gap: 2px; margin: 0 -8px -6px; }
.quick-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 0;
  padding: 12px 10px;
  border: 0;
  border-radius: var(--radius-inner);
  background: transparent;
  text-align: left;
  transition: background var(--motion), transform var(--motion);
}
.quick-row:hover { background: var(--hover); }
.quick-row:active { transform: scale(0.99); }
.quick-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: rgba(77, 141, 255, 0.1);
  color: #8fb9ff;
  transition: background var(--motion), color var(--motion);
}
.quick-icon svg { width: 19px; height: 19px; }
.quick-row:hover .quick-icon { background: var(--brand-soft); color: var(--brand); }
.quick-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.quick-copy strong { font-size: var(--font-body); font-weight: 500; line-height: 1.4; color: var(--text); }
.quick-copy small { font-size: var(--font-small); color: var(--muted); line-height: 1.45; }
.quick-arrow { width: 18px; height: 18px; color: var(--muted-2); transition: transform var(--motion), color var(--motion); }
.quick-arrow svg { width: 18px; height: 18px; }
.quick-row:hover .quick-arrow { transform: translateX(2px); color: var(--text); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.commerce-layout { display: grid; gap: 24px; }
.content-wide { grid-column: 1 / -1; }
.card-head, .drawer-head, .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.card-head > div, .drawer-head > div, .modal-head > div { min-width: 0; }
.card-head h2, .card-head h3, .drawer-head h2, .modal-head h2 {
  margin: 0;
  font-size: var(--font-section);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-head p, .drawer-head p, .modal-head p { margin: 4px 0 0; font-size: var(--font-small); line-height: 1.6; color: var(--muted); }
.card-head select { width: auto; max-width: 200px; }

/* Stat lists */
.stat-list { display: grid; gap: 0; }
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.stat-row:first-child { padding-top: 2px; }
.stat-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.stat-row-main { display: grid; gap: 3px; min-width: 0; }
.stat-row-main span { font-size: var(--font-small); color: var(--muted); }
.stat-row-main strong {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* ---------- Collections ---------- */
.toolbar, .collection-toolbar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input, .toolbar select { max-width: 240px; }
.collection-toolbar input { max-width: 360px; flex: 1; min-width: 180px; }
.collection-toolbar select { width: auto; min-width: 120px; }
.table-card { overflow-x: auto; overscroll-behavior-inline: contain; }
.card > .table-card { border-radius: var(--radius-inner); background: var(--surface-input); }
table, .policy-table { width: 100%; border-collapse: collapse; font-size: var(--font-body); }
th, td, .policy-table th, .policy-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: var(--font-body);
  line-height: 1.5;
}
th, .policy-table th {
  color: var(--muted);
  font-size: var(--font-small);
  font-weight: 500;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.02);
}
td { max-width: 360px; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 140ms ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tr.clickable { cursor: pointer; }
td strong { font-weight: 500; }
td input { min-width: 130px; }
.cell-actions, th.cell-actions, td.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions-inner, .list-actions, .card-actions, .split-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.cell-actions-inner { display: inline-flex; flex-wrap: nowrap; }
.card-actions, .split-actions { margin-top: 16px; }
.collection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--font-small);
  flex-wrap: wrap;
}
.collection-pagination { display: flex; align-items: center; gap: 8px; }
.collection-pagination select { width: auto; font-size: var(--font-small); }
.collection-footer button { min-width: 38px; }
.filter-count { font-size: var(--font-small); color: var(--muted); }

/* ---------- Text, tags, notices ---------- */
.muted { color: var(--muted); }
.small, .field-note { font-size: var(--font-small); line-height: 1.5; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field-note { display: block; color: var(--muted-2); line-height: 1.6; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: var(--font-small);
  white-space: nowrap;
}
.pill.green { background: var(--success-soft); color: #7adba9; }
.pill.yellow { background: var(--warning-soft); color: #ecc682; }
.pill.red, .tag-danger { background: var(--danger-soft); color: #f59a93; }
.tag-brand { background: var(--brand-soft); color: var(--brand-text); }
.message { margin: 12px 0 0; font-size: var(--font-body); line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.message:empty { display: none; }
.message.error { color: var(--danger); }
.message.ok, .message.success { color: var(--success); }
.load-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(226, 177, 92, 0.28);
  border-radius: var(--radius-inner);
  background: var(--warning-soft);
  color: #ecc682;
}
.load-notice span { min-width: 0; overflow-wrap: anywhere; }
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.list-item:last-child { border-bottom: 0; }
.list-item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.list-item strong { display: block; margin-bottom: 3px; font-weight: 500; }
.list-item .small { display: block; color: var(--muted-2); }
.secret-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.secret-toggle { width: var(--control-height); min-width: var(--control-height); padding: 0; }

/* ---------- States ---------- */
.state-block {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 180px;
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
}
.state-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}
.state-icon svg { width: 22px; height: 22px; }
.state-title { font-size: var(--font-body); font-weight: 500; color: var(--text); }
.state-desc { max-width: 340px; margin: 0; font-size: var(--font-small); line-height: 1.65; color: var(--muted); }
.state-action { margin-top: 12px; }
.state-block.is-loading .state-icon svg { animation: spin 1s linear infinite; }
.state-block.is-locked .state-icon { color: var(--warning); background: var(--warning-soft); border-color: rgba(226, 177, 92, 0.24); }
.state-block.is-error .state-icon { color: var(--danger); background: var(--danger-soft); border-color: rgba(240, 113, 103, 0.24); }
.state-block.is-success .state-icon { color: var(--success); background: var(--success-soft); border-color: rgba(76, 195, 138, 0.24); }
.empty-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-inner);
  color: var(--muted);
  font-size: var(--font-body);
  text-align: center;
}
.empty-state::before {
  content: "";
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2363666f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.empty-state .button { margin-top: 12px; }
.spinner {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, #1b1c21 25%, #24262c 37%, #1b1c21 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- Overlays ---------- */
.drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  animation: fade-in 160ms ease;
}
.modal-backdrop { z-index: 50; }
.drawer {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(860px, 100%);
  overflow: auto;
  padding: 28px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  border-radius: 20px 0 0 20px;
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
  animation: drawer-in 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.drawer-head {
  position: sticky;
  top: -28px;
  z-index: 2;
  padding: 20px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.drawer .split-actions {
  position: sticky;
  bottom: -28px;
  z-index: 2;
  padding: 16px 0 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: modal-in 180ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.dialog-open { overflow: hidden; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -48%) scale(0.985); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.code-editor { font-family: ui-monospace, SFMono-Regular, monospace; font-size: var(--font-small); }
.mobile-nav-toggle, .mobile-nav-backdrop { display: none; }

/* ---------- Feature layouts ---------- */
#redeemCodesPanel .two-col { grid-template-columns: 1fr; }
#redeemBatchOutput { margin-top: 16px; }
#memberRows td:nth-child(3),
#memberRows td:nth-child(4),
#memberRows td:nth-child(5) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.detail-sections { display: grid; gap: 16px; }
.detail-section {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface-soft);
}
.detail-section h3 { margin: 0; font-size: var(--font-body); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.detail-grid div, .detail-stack { display: grid; gap: 4px; }
.detail-grid strong, .detail-stack strong { font-size: var(--font-small); color: var(--muted); font-weight: 500; }
.detail-grid span, .detail-stack span { font-size: var(--font-body); color: var(--text); word-break: break-word; }
.detail-json {
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #0c0d10;
  color: #c9cdd6;
  font-size: var(--font-small);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-output-list { display: grid; gap: 8px; }
.detail-output-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.02);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.cover-preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface-soft);
}
.cover-preview img, .cover-preview video { width: 100%; height: 100%; min-height: 230px; object-fit: cover; display: block; }
.cover-preview .empty-cover { display: grid; min-height: 230px; place-items: center; color: var(--muted); }
.supplier-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: var(--surface);
}
.supplier-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.supplier-group-head > div:first-child, .supplier-summary-meta { min-width: 0; }
.supplier-summary-meta { display: grid; gap: 8px; }
.supplier-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.supplier-title-row strong { display: block; }
.supplier-inline-url { word-break: break-all; overflow-wrap: anywhere; }
.generation-text { max-width: 320px; line-height: 1.6; word-break: break-word; white-space: normal; }
.generation-stack { display: grid; gap: 4px; }
.generation-cost { display: grid; gap: 4px; min-width: 132px; }
.generation-preview { display: grid; gap: 8px; }
.generation-preview-frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 84px;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}
.generation-preview-frame img, .generation-preview-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.generation-preview audio { width: min(220px, 100%); }

/* ---------- Switches ---------- */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-height);
  color: var(--muted);
  font-size: var(--font-small);
  cursor: pointer;
  user-select: none;
}
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #2a2c33;
  transition: background var(--motion), border-color var(--motion);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d8dae0;
  transition: transform var(--motion), background var(--motion);
}
.switch input:checked + .switch-track { border-color: transparent; background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: #08111f; }
.switch:has(input:focus-visible), .front-model-parameter-chip:has(input:focus-visible) {
  outline: 2px solid rgba(77, 141, 255, 0.7);
  outline-offset: 2px;
  border-radius: 999px;
}

/* ---------- Model editor blocks ---------- */
.supplier-model-list, .front-model-candidate-list, .supplier-connection-list,
.supplier-bundle-rows, .pricing-rule-editor, .pricing-rule-list, .front-model-parameter-editor,
.front-model-ratio-res-list, .model-routing-list, .model-stage-grid, .model-policy-sections,
.model-policy-list, .model-tree-list, .detail-layout > div { display: grid; gap: 8px; min-width: 0; }
.front-model-candidate {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.025);
}
.front-model-candidate strong { display: block; margin-bottom: 4px; font-weight: 500; }
.front-model-candidate-meta { display: grid; gap: 8px; }
.supplier-test-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.025);
}
.supplier-test-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.supplier-test-dot.green { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.supplier-test-dot.yellow { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.supplier-test-dot.red { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.supplier-model-row, .pricing-rule-row, .front-model-parameter-group, .model-routing-item,
.model-stage-card, .model-policy-list-row, .model-tree-item, .guide-card,
.model-routing-cell, .hint-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}
.supplier-model-row { display: grid; gap: 8px; padding: 14px; }
.supplier-model-row-head, .pricing-rule-row-head, .front-model-parameter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.supplier-model-row-title, .pricing-rule-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.supplier-model-row-title strong { font-size: var(--font-body); font-weight: 500; }
.supplier-model-row-title .muted { white-space: nowrap; }
.supplier-model-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.supplier-model-row-grid,
.pricing-rule-row-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.pricing-rule-row-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.supplier-model-row-grid > label.is-wide { grid-column: 1 / -1; }
.supplier-model-row-grid > label,
.pricing-rule-row-grid > label { min-width: 0; gap: 6px; font-size: var(--font-small); }
.supplier-model-row-grid > label.is-compact input,
.supplier-model-row-grid > label.is-compact select { max-width: 96px; }
.supplier-model-row-note, .pricing-rule-row-note, .front-model-parameter-note {
  color: var(--muted-2);
  font-size: var(--font-small);
  line-height: 1.5;
}
.pricing-rule-row { display: grid; gap: 8px; padding: 14px; }
.front-model-parameter-editor { display: grid; gap: 12px; }
.front-model-parameter-group { display: grid; gap: 8px; padding: 14px; }
.front-model-parameter-head strong { font-size: var(--font-body); font-weight: 500; }
.front-model-parameter-grid, .candidate-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.front-model-parameter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: var(--font-body);
  cursor: pointer;
  transition: border-color var(--motion), background var(--motion), color var(--motion);
}
.front-model-parameter-chip:hover { border-color: #41444e; color: var(--text); }
.front-model-parameter-chip.active { border-color: rgba(77, 141, 255, 0.45); background: var(--brand-soft); color: var(--brand-text); }
.front-model-parameter-chip input { position: absolute; opacity: 0; pointer-events: none; }
.front-model-ratio-res-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.015);
}
.front-model-ratio-res-key { font-weight: 500; font-size: var(--font-body); color: var(--text); }
.front-model-ratio-res-row .front-model-parameter-chip { min-height: 30px; padding: 0 10px; font-size: var(--font-small); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide-card { padding: 16px; }
.guide-card strong { display: block; margin-bottom: 8px; font-weight: 500; }
.guide-card p { margin: 0; color: var(--muted); font-size: var(--font-small); line-height: 1.7; }
.model-routing-item { padding: 16px; }
.model-routing-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.model-routing-title { display: grid; gap: 8px; }
.model-routing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.model-routing-cell { padding: 12px; }
.model-routing-cell span { display: block; margin-bottom: 4px; color: var(--muted-2); font-size: var(--font-small); }
.model-routing-cell strong { display: block; font-size: var(--font-body); line-height: 1.5; font-weight: 500; }
.model-routing-cell .muted.small { margin-top: 4px; }
.mapping-note { margin-top: 12px; }
.model-kind-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.model-kind-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-height);
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: var(--font-body);
  cursor: pointer;
  transition: background var(--motion), border-color var(--motion), color var(--motion);
}
.model-kind-button:hover { color: var(--text); border-color: #41444e; }
.model-kind-button.active { border-color: rgba(77, 141, 255, 0.45); background: var(--brand-soft); color: var(--brand-text); }
.model-stage-grid { display: grid; gap: 16px; }
.model-stage-card { padding: 16px; }
.model-stage-card h3 { margin: 0; font-size: var(--font-section); }
.model-stage-card p { margin: 6px 0 0; color: var(--muted); font-size: var(--font-small); line-height: 1.7; }
.model-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.model-policy-sections { display: grid; gap: 24px; }
.model-policy-section { display: grid; gap: 16px; }
.model-policy-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}
.model-policy-section-head p { display: none; }
.model-policy-section-head h3 { font-size: var(--font-section); }
.model-policy-section-head .section-label { display: none; }
.model-policy-section-head .button { white-space: nowrap; }
.model-policy-list { display: grid; gap: 8px; }
.model-policy-list-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(180px, 1fr) 140px auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.model-policy-list-row strong { display: block; font-weight: 500; }
.model-policy-col { display: grid; gap: 4px; min-width: 0; }
.model-policy-col-label {
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.model-policy-col-value { color: var(--text); font-size: var(--font-body); line-height: 1.5; min-width: 0; }
.candidate-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: var(--font-small);
}
.candidate-chip.disabled { opacity: 0.55; }
.model-policy-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.model-tree-list { display: grid; gap: 12px; }
.model-tree-item { overflow: hidden; }
.model-tree-item > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}
.model-tree-item > summary::-webkit-details-marker { display: none; }
.model-tree-meta { display: grid; gap: 8px; }
.model-tree-body { display: grid; gap: 12px; padding: 0 16px 16px; }
.hint-box { padding: 12px 14px; color: var(--muted); font-size: var(--font-small); line-height: 1.7; }
.select-readonly { opacity: 0.6; }
.cell-strong { font-weight: 500; color: var(--text); }
.cell-sub {
  margin-top: 3px;
  max-width: 260px;
  color: var(--muted-2);
  font-size: var(--font-small);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gen-content { display: grid; gap: 8px; max-width: 280px; min-width: 200px; }
.gen-prompt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#generationRecordsPanel .generation-stack span:first-child,
#generationRecordsPanel td { white-space: nowrap; }
#generationRecordsPanel .gen-content,
#generationRecordsPanel .gen-content * { white-space: normal; }
#generationRecordsPanel .gen-prompt { white-space: nowrap; }
.gen-thumb {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--motion), box-shadow var(--motion);
}
.gen-thumb:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gen-thumb img, .gen-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gen-thumb-audio { font-size: var(--font-section); color: var(--brand); }
.gen-thumb-more {
  position: absolute;
  right: 3px;
  bottom: 3px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: var(--font-small);
  line-height: 16px;
}
.gen-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--font-section);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.supplier-model-row-grid > label input,
.supplier-model-row-grid > label select,
.pricing-rule-row-grid > label input,
.pricing-rule-row-grid > label select {
  min-height: var(--control-height);
  padding: 7px 10px;
  font-size: var(--font-body);
}
.settings-disclosure { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.settings-disclosure > summary { cursor: pointer; font-size: var(--font-section); font-weight: 600; padding: 8px 0; }
.settings-disclosure > summary span { font-size: var(--font-small); color: var(--muted); font-weight: 400; margin-left: 12px; }
.settings-disclosure[open] > summary { margin-bottom: 16px; }
.settings-disclosure .model-policy-section-head { display: none; }
.model-policy-section + .model-policy-section { border-top: 1px solid var(--line); padding-top: 24px; }
.panel.active > .collection-toolbar { margin-bottom: -8px; }
.panel.active > .collection-footer { margin-top: -8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .two-col, .detail-layout { grid-template-columns: 1fr; }
  .supplier-group-head { align-items: flex-start; flex-wrap: wrap; }
  .pricing-rule-row-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-policy-list-row { grid-template-columns: minmax(160px, 200px) minmax(160px, 1fr) 120px auto; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  body.sidebar-collapsed .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 35;
    width: 264px;
    transform: translateX(-100%);
    transition: transform var(--motion);
    border-right: 1px solid var(--line-strong);
    box-shadow: var(--shadow);
  }
  .nav-open .sidebar { transform: translateX(0); }
  .sidebar-collapse { display: none; }
  .mobile-nav-toggle { display: inline-flex; }
  .mobile-nav-backdrop:not(.hidden) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 34;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
  }
  .workspace { padding: 0 20px 40px; }
  .topbar { min-height: 72px; gap: 12px; margin-bottom: 24px; }
  #refreshStatus { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-shortcuts, .two-col { gap: 16px; }
  .form-grid, .supplier-model-row-grid, .model-routing-grid, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-card table { min-width: 720px; }
  .table-card th, .table-card td { white-space: nowrap; }
  .table-card td .cell-sub { max-width: 220px; }
  .supplier-model-row-grid > label.is-wide { grid-column: 1 / -1; }
  .model-policy-list-row { grid-template-columns: 1fr; }
  .supplier-model-row-head { flex-wrap: wrap; }
  .drawer { border-radius: 18px 0 0 18px; }
}
@media (max-width: 560px) {
  :root { --control-height: 42px; --font-title: 21px; }
  input, select, textarea { font-size: 16px; }
  .button, .btn-sm { min-height: 42px; }
  .nav-button { min-height: 44px; }
  .workspace { padding: 0 16px 32px; }
  .topbar { flex-wrap: wrap; padding: 14px 0; }
  .topbar-tools { width: auto; margin-left: auto; }
  #pageActions:not(:empty) { width: 100%; justify-content: flex-end; padding-top: 4px; }
  .metric-grid, .dash-shortcuts, .form-grid, .pricing-rule-row-grid,
  .supplier-model-row-grid, .model-routing-grid, .guide-grid, .detail-grid { grid-template-columns: 1fr; }
  .metric-card { padding: 20px; }
  .card, .metric-card { padding: 18px; }
  .card-head { flex-wrap: wrap; gap: 12px; }
  .toolbar > *, .toolbar input, .toolbar select { max-width: none; flex: 1 1 140px; }
  .toolbar input { flex-basis: 100%; }
  .collection-toolbar input { min-width: 0; width: 100%; flex-basis: 100%; }
  .collection-toolbar select { flex: 1; min-width: 0; }
  .collection-pagination { flex-wrap: wrap; }
  .quick-row { padding: 12px 8px; }
  .drawer { padding: 18px; border-radius: 0; }
  .drawer-head { top: -18px; }
  .drawer .split-actions { bottom: -18px; padding-bottom: 18px; }
  .supplier-model-row-title { flex-wrap: wrap; }
  .list-item { flex-wrap: wrap; }
  .load-notice { align-items: flex-start; flex-wrap: wrap; }
  .modal { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
