:root {
  --bg: #f5f4fb;
  --panel: #ffffff;
  --panel-soft: #f8f9fd;
  --line: #e4e7ef;
  --line-strong: #d5d9e6;
  --text: #252b36;
  --muted: #788194;
  --primary: #4d57ff;
  --primary-soft: #eef0ff;
  --green: #18a06f;
  --orange: #df7c25;
  --red: #dc4d5d;
  --blue: #1677ff;
  --shadow: 0 18px 45px rgba(42, 48, 72, 0.08);
  --radius: 8px;
}

.store-bulk-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(280px, 420px) auto;
  gap: 12px;
  align-items: center;
}

.store-bulk-toolbar > div {
  display: grid;
  gap: 4px;
}

.store-bulk-toolbar > div span {
  color: var(--muted, #747b86);
  font-size: 12px;
}

.store-bulk-toolbar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.store-select-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #656d78;
  font-size: 12px;
  white-space: nowrap;
}

.store-select-control input {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px) {
  .store-bulk-toolbar { grid-template-columns: 1fr; }
}

/* 朗斯国际高端视觉主题：总部 / 中控 */
:root {
  --lance-ink: #111827;
  --lance-navy: #172033;
  --lance-navy-2: #24314a;
  --lance-pearl: #fbfaf7;
  --lance-porcelain: #f7f3ec;
  --lance-gold: #b99a5f;
  --lance-gold-soft: #eadcc1;
  --lance-jade: #1f8f7a;
  --primary: #24314a;
  --primary-soft: #eef1f6;
  --bg: #f6f2eb;
  --panel-soft: #fbfaf7;
  --line: #e5dccd;
  --line-strong: #cdbb9f;
  --shadow: 0 22px 52px rgba(23, 32, 51, 0.12);
}

body {
  background: var(--lance-porcelain);
}

.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(246, 242, 235, 0.96) 360px),
    linear-gradient(115deg, rgba(36, 49, 74, 0.06), transparent 52%),
    var(--lance-porcelain);
}

.sidebar {
  color: #f7f3ec;
  border-right: 1px solid rgba(185, 154, 95, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(36, 49, 74, 0.96)),
    var(--lance-navy);
  box-shadow: 18px 0 44px rgba(17, 24, 39, 0.1);
}

.brand {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(234, 220, 193, 0.2);
}

.brand-mark,
.customer-avatar,
.avatar {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(135deg, #f0dcc0, #b99a5f 46%, #172033);
  box-shadow: 0 10px 24px rgba(185, 154, 95, 0.28);
}

.brand strong,
.brand span {
  color: #fbfaf7;
}

.brand span {
  color: rgba(251, 250, 247, 0.68);
}

.nav-item,
.utility-button {
  color: rgba(251, 250, 247, 0.76);
}

.nav-item:hover,
.utility-button:hover {
  color: #fff;
  border-color: rgba(234, 220, 193, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.is-active,
.utility-button.is-active {
  color: #172033;
  border-color: var(--lance-gold-soft);
  background: linear-gradient(135deg, #fffaf1, #eadcc1);
}

.utility-button {
  background: rgba(255, 255, 255, 0.06);
}

.topbar,
.workspace-tabs {
  border-color: rgba(229, 220, 205, 0.74);
  background: rgba(251, 250, 247, 0.84);
}

.subscription-button,
.action-button.primary,
.chat-composer button,
.chat-input button,
.auth-form button {
  color: #fff;
  border-color: var(--lance-navy);
  background:
    linear-gradient(135deg, var(--lance-navy), #2d3b58 64%, #705c37);
  box-shadow: 0 10px 22px rgba(23, 32, 51, 0.16);
}

.action-button.primary:hover,
.subscription-button:hover {
  color: #fff;
  border-color: var(--lance-gold);
  background:
    linear-gradient(135deg, #101827, #263650 58%, var(--lance-gold));
}

.module-button.is-active {
  color: #172033;
  background: linear-gradient(135deg, #fff8e8, #dfc693);
  box-shadow: inset 0 0 0 1px rgba(185, 154, 95, 0.45);
}

.page-panel,
.auth-card,
.store-metrics div,
.metric-card,
.account-card,
.content-card,
.table-panel,
.ops-panel {
  border-color: rgba(205, 187, 159, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 247, 0.96));
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
}

.page-panel {
  position: relative;
  overflow: hidden;
}

.page-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lance-navy), var(--lance-gold), var(--lance-jade));
  pointer-events: none;
}

.store-head {
  background:
    linear-gradient(135deg, rgba(23, 32, 51, 0.96), rgba(42, 54, 79, 0.92)),
    var(--lance-navy);
  color: #fff;
}

.store-head h1,
.store-head .eyebrow {
  color: #fff;
}

.store-head span {
  color: rgba(255, 255, 255, 0.72);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(31, 120, 89, 0.28);
  border-radius: 6px;
  color: #176e52;
  background: #edf8f3;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.flywheel-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  overflow: visible;
}

.flywheel-page > * {
  min-width: 0;
}

.flywheel-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 142px;
  padding: 24px 28px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(120deg, #172033 0%, #2f3d58 68%, #665638 100%);
}

.flywheel-hero .eyebrow,
.flywheel-hero h1,
.flywheel-hero span {
  margin: 0;
  color: inherit;
}

.flywheel-hero h1 {
  margin-top: 7px;
  font-size: 30px;
  letter-spacing: 0;
}

.flywheel-hero span {
  display: block;
  max-width: 760px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.flywheel-hero-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.flywheel-hero-actions .action-button:not(.primary) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.flywheel-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(205, 187, 159, 0.72);
  border-radius: 8px;
  background: #fff;
}

.flywheel-metrics article {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid #ece7df;
}

.flywheel-metrics article:last-child {
  border-right: 0;
}

.flywheel-metrics span,
.flywheel-metrics small {
  display: block;
  color: #77736c;
}

.flywheel-metrics strong {
  display: block;
  margin: 8px 0 5px;
  color: #172033;
  font-size: 30px;
}

.flywheel-feishu-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, auto) auto;
  align-items: center;
  gap: 18px;
  padding: 17px 19px;
  border: 1px solid #d9dfe8;
  border-left: 4px solid #8a94a5;
  border-radius: 8px;
  background: #f8fafc;
}

.flywheel-feishu-panel.is-ready {
  border-left-color: #176e52;
  background: #f5faf8;
}

.flywheel-feishu-heading,
.flywheel-feishu-actions,
.flywheel-source-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.flywheel-source-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 7px;
  color: #fff;
  background: #3370ff;
  font-size: 12px;
  font-weight: 800;
}

.flywheel-feishu-heading p,
.flywheel-feishu-status span,
.flywheel-feishu-status small {
  display: block;
  margin: 3px 0 0;
  color: #697181;
  font-size: 12px;
}

.flywheel-feishu-status {
  min-width: 0;
  text-align: right;
}

.flywheel-feishu-status span {
  color: #303746;
  font-weight: 700;
}

.flywheel-feishu-actions {
  justify-content: flex-end;
}

.flywheel-feishu-actions .tiny-button,
.flywheel-settings-form > .tiny-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 96px;
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d9dfe8;
  white-space: nowrap;
  color: #303746;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.flywheel-feishu-actions .tiny-button.primary,
.flywheel-settings-form > .tiny-button.primary {
  color: #fff;
  border-color: #172033;
  background: #172033;
}

.flywheel-feishu-actions .tiny-button:disabled,
.flywheel-settings-form > .tiny-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.flywheel-settings-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 20px;
  border-block: 1px solid #e6dfd3;
  background: #fbfaf7;
}

.flywheel-settings-band p {
  max-width: 720px;
  margin: 6px 0 0;
  color: #77736c;
  line-height: 1.65;
}

.flywheel-settings-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex: 0 0 auto;
}

.flywheel-settings-form label {
  display: grid;
  gap: 5px;
  color: #66625b;
  font-size: 12px;
}

.flywheel-settings-form input[type="number"] {
  width: 76px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #d9d2c7;
  border-radius: 6px;
  background: #fff;
}

.flywheel-settings-form .toggle-row {
  display: flex;
  align-items: center;
  min-height: 36px;
  gap: 7px;
  white-space: nowrap;
}

.flywheel-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 0 2px;
}

.flywheel-toolbar > div {
  min-width: 0;
  margin-right: auto;
}

.flywheel-toolbar > div span {
  display: block;
  margin-top: 4px;
  color: #77736c;
  font-size: 13px;
}

.flywheel-toolbar label {
  display: grid;
  gap: 5px;
  color: #66625b;
  font-size: 12px;
}

.flywheel-toolbar select {
  min-width: 140px;
  min-height: 38px;
  padding: 7px 32px 7px 10px;
  border: 1px solid #d9d2c7;
  border-radius: 6px;
  background: #fff;
}

.flywheel-candidate-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 14px;
}

.flywheel-candidate {
  min-width: 0;
  padding: 18px;
  border: 1px solid #ddd6cb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}

.flywheel-candidate > header,
.flywheel-candidate > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.flywheel-candidate > header > div:first-child {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.flywheel-brand,
.flywheel-candidate-status,
.flywheel-risk span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.flywheel-brand {
  color: #705c37;
  border: 1px solid #e2d2b2;
  background: #fff9ed;
}

.flywheel-brand.unassigned {
  color: #934139;
  border-color: #efc9c2;
  background: #fff3f1;
}

.flywheel-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #2458c6;
  border: 1px solid #c8d7ff;
  background: #eef3ff;
  font-size: 12px;
  font-weight: 700;
}

.flywheel-candidate-status {
  color: #5b6474;
  background: #f0f2f5;
}

.flywheel-candidate-status.status-approved {
  color: #176e52;
  background: #eaf7f1;
}

.flywheel-candidate-status.status-published {
  color: #244b91;
  background: #edf3ff;
}

.flywheel-candidate-status.status-rejected {
  color: #9a4038;
  background: #fff0ed;
}

.flywheel-candidate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 13px;
  color: #817d76;
  font-size: 12px;
}

.flywheel-question {
  margin: 12px 0;
  color: #242a35;
  font-weight: 700;
  line-height: 1.6;
}

.flywheel-source-row {
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #dbe4f6;
  border-radius: 6px;
  background: #f6f9ff;
}

.flywheel-source-row > div {
  min-width: 0;
}

.flywheel-source-row b,
.flywheel-source-row span {
  display: block;
}

.flywheel-source-row b {
  overflow: hidden;
  color: #293345;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flywheel-source-row span {
  margin-top: 3px;
  color: #747d8d;
  font-size: 12px;
}

.flywheel-source-row a {
  flex: 0 0 auto;
  color: #2458c6;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.flywheel-brand-field {
  display: grid;
  grid-template-columns: 78px minmax(160px, 280px);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: #5f6673;
  font-size: 13px;
  font-weight: 700;
}

.flywheel-brand-field select {
  min-height: 38px;
  padding: 7px 30px 7px 10px;
  border: 1px solid #d9d2c7;
  border-radius: 6px;
  color: #282d37;
  background: #fff;
}

.flywheel-risk {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 10px;
}

.flywheel-risk span {
  color: #934139;
  border: 1px solid #f0c7c1;
  background: #fff4f2;
}

.flywheel-candidate textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 196px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #d9d2c7;
  border-radius: 6px;
  color: #282d37;
  background: #fbfaf7;
  font: inherit;
  line-height: 1.7;
}

.flywheel-candidate textarea:focus {
  outline: 2px solid rgba(185, 154, 95, 0.22);
  border-color: #b99a5f;
}

.flywheel-prompt-suggestion {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #b99a5f;
  color: #66625b;
  background: #faf6ee;
  font-size: 13px;
  line-height: 1.6;
}

.flywheel-candidate > footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ece7df;
}

.flywheel-targets,
.flywheel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.flywheel-targets label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #525862;
  font-size: 13px;
}

.flywheel-actions button,
.flywheel-log-panel button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #d5cec2;
  border-radius: 6px;
  color: #313844;
  background: #fff;
  cursor: pointer;
}

.flywheel-actions button.primary {
  color: #fff;
  border-color: #172033;
  background: #172033;
}

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

.flywheel-log-panel {
  min-width: 0;
  border: 1px solid #ddd6cb;
  border-radius: 8px;
  background: #fff;
}

.flywheel-log-panel > header,
.flywheel-log-panel > div,
.flywheel-log-panel > p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid #eee9e1;
}

.flywheel-log-panel > header {
  display: grid;
  background: #fbfaf7;
}

.flywheel-log-panel > header span,
.flywheel-log-panel > div span,
.flywheel-log-panel > p {
  color: #817d76;
  font-size: 12px;
}

.flywheel-log-panel > div:last-child,
.flywheel-log-panel > p:last-child {
  border-bottom: 0;
}

@media (max-width: 1120px) {
  .flywheel-feishu-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .flywheel-feishu-status {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }

  .flywheel-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flywheel-metrics article:nth-child(2) {
    border-right: 0;
  }

  .flywheel-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid #ece7df;
  }

  .flywheel-settings-band,
  .flywheel-settings-form {
    align-items: stretch;
  }

  .flywheel-settings-band {
    flex-direction: column;
  }

  .flywheel-settings-form {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .flywheel-page {
    gap: 14px;
    padding: 14px;
  }

  .flywheel-hero,
  .flywheel-toolbar,
  .flywheel-candidate > header,
  .flywheel-candidate > footer {
    align-items: stretch;
    flex-direction: column;
  }

  .flywheel-feishu-panel {
    grid-template-columns: 1fr;
  }

  .flywheel-feishu-status {
    grid-column: auto;
    grid-row: auto;
  }

  .flywheel-feishu-actions,
  .flywheel-feishu-actions .tiny-button {
    width: 100%;
  }

  .flywheel-feishu-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flywheel-hero {
    min-height: 0;
    padding: 20px;
  }

  .flywheel-hero h1 {
    font-size: 25px;
  }

  .flywheel-hero-actions,
  .flywheel-hero-actions .action-button,
  .flywheel-toolbar label,
  .flywheel-toolbar select {
    width: 100%;
  }

  .flywheel-metrics,
  .flywheel-bottom-grid {
    grid-template-columns: 1fr;
  }

  .flywheel-metrics article {
    border-right: 0;
    border-bottom: 1px solid #ece7df;
  }

  .flywheel-metrics article:last-child {
    border-bottom: 0;
  }

  .flywheel-settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flywheel-settings-form .toggle-row,
  .flywheel-settings-form button {
    grid-column: 1 / -1;
  }

  .flywheel-settings-form input[type="number"] {
    width: 100%;
  }

  .flywheel-candidate {
    padding: 14px;
  }

  .flywheel-source-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .flywheel-brand-field {
    grid-template-columns: 1fr;
  }

  .flywheel-candidate > header > div:first-child,
  .flywheel-actions,
  .flywheel-targets {
    align-items: stretch;
    flex-direction: column;
  }

  .flywheel-prompt-suggestion {
    grid-template-columns: 1fr;
  }

  .flywheel-actions button {
    width: 100%;
  }

  .flywheel-log-panel > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* 门店名录：筛选表格 + 右侧详情抽屉 */
.store-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.45fr) minmax(150px, 0.75fr) minmax(240px, 1.2fr) minmax(150px, 0.7fr);
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.store-directory-toolbar label,
.store-create-drawer-form label,
.store-directory-drawer .store-admin-edit-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #4d5666;
  font-size: 12px;
  font-weight: 700;
}

.store-directory-toolbar input,
.store-directory-toolbar select,
.store-create-drawer-form input,
.store-create-drawer-form select,
.store-directory-drawer .store-admin-edit-form input,
.store-directory-drawer .store-admin-edit-form select,
.store-directory-drawer .store-admin-edit-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.store-directory-toolbar-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.store-directory-bulk-toolbar {
  margin-top: 12px;
}

.store-directory {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.store-directory > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.store-directory > header > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.store-directory > header strong {
  color: var(--text);
  font-size: 16px;
}

.store-directory > header span {
  color: var(--muted);
  font-size: 12px;
}

.store-directory-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.store-directory-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  table-layout: auto;
}

.store-directory-table th,
.store-directory-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf0f4;
  color: #3b4452;
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.store-directory-table th {
  color: #555e6d;
  background: #f7f8fb;
  font-weight: 800;
  white-space: nowrap;
}

.store-directory-table tbody tr:hover {
  background: #fafbff;
}

.store-directory-table td strong,
.store-directory-table td small,
.store-directory-table td span {
  display: block;
}

.store-directory-table td small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.store-table-check {
  width: 52px;
}

.store-table-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.store-table-name {
  max-width: 220px;
  padding: 0;
  border: 0;
  color: #2f48c8;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.store-table-name:hover {
  text-decoration: underline;
}

.store-brand-badge,
.store-directory-status {
  display: inline-flex !important;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.store-brand-badge {
  color: #7a5b1c;
  background: #fff6df;
}

.store-directory-status.is-active {
  color: #136448;
  background: #e8f7f0;
}

.store-directory-status.is-disabled {
  color: #8a3a3a;
  background: #fff0ef;
}

.store-table-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.store-table-actions button {
  min-height: 32px;
  border: 1px solid #dce1ea;
  border-radius: 6px;
  padding: 0 10px;
  color: #34415a;
  background: #fff;
  cursor: pointer;
}

.store-table-actions button:first-child {
  color: #2f48c8;
  border-color: #cfd5ff;
  background: #f4f5ff;
}

.store-directory-empty td {
  padding: 44px 18px;
  color: var(--muted);
  text-align: center;
}

.store-directory-drawer-backdrop {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 24, 39, 0.38);
  backdrop-filter: blur(2px);
}

.store-directory-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, calc(100vw - 48px));
  height: 100%;
  border-left: 1px solid #dfe3eb;
  background: #fff;
  box-shadow: -18px 0 48px rgba(20, 28, 45, 0.18);
}

.store-directory-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfd;
}

.store-directory-drawer > header span,
.store-directory-drawer > header p {
  color: var(--muted);
  font-size: 12px;
}

.store-directory-drawer > header h2 {
  margin: 4px 0 5px;
  color: var(--text);
  font-size: 21px;
}

.store-directory-drawer > header p {
  margin: 0;
}

.store-drawer-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #576071;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.store-directory-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 32px;
}

.store-directory-drawer .store-admin-edit-form,
.store-create-drawer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.store-admin-field-wide {
  grid-column: 1 / -1;
}

.store-directory-drawer .store-admin-edit-form textarea {
  min-height: 100px;
  resize: vertical;
}

.store-registration-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 0;
}

.store-registration-summary > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e7eaf0;
  background: #fafbfc;
}

.store-registration-summary dt {
  color: var(--muted);
  font-size: 11px;
}

.store-registration-summary dd {
  margin: 5px 0 0;
  color: #3e4756;
  font-size: 12px;
  word-break: break-word;
}

.store-drawer-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 1080px) {
  .store-directory-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-directory-drawer .store-admin-edit-form,
  .store-create-drawer-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .store-directory-toolbar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .store-directory-toolbar-actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-directory-toolbar-actions .action-button {
    justify-content: center;
  }

  .store-directory > header > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .store-directory-table-wrap {
    overflow: visible;
  }

  .store-directory-table,
  .store-directory-table tbody {
    display: block;
    min-width: 0;
  }

  .store-directory-table thead {
    display: none;
  }

  .store-directory-table tr {
    display: grid;
    margin: 12px;
    border: 1px solid var(--line);
    background: #fff;
  }

  .store-directory-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f4;
  }

  .store-directory-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  .store-directory-table td:last-child {
    border-bottom: 0;
  }

  .store-directory-table .store-directory-empty {
    display: block;
  }

  .store-directory-empty td {
    display: block;
    text-align: center;
  }

  .store-directory-empty td::before {
    display: none;
  }

  .store-table-actions {
    flex-wrap: wrap;
    white-space: normal;
  }

  .store-directory-drawer {
    width: 100%;
  }

  .store-directory-drawer > header,
  .store-directory-drawer-body {
    padding-inline: 16px;
  }

  .store-directory-drawer .store-admin-edit-form,
  .store-create-drawer-form,
  .store-registration-summary {
    grid-template-columns: 1fr;
  }

  .store-admin-field-wide,
  .store-admin-edit-actions {
    grid-column: auto;
  }

  .store-admin-edit-actions,
  .store-drawer-link-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .store-admin-edit-actions .action-button,
  .store-drawer-link-actions .action-button {
    justify-content: center;
    width: 100%;
  }
}

/* Brand agent console */
.brand-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 760px;
}

.brand-config-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  padding: 24px;
}

.brand-config-main > * {
  min-width: 0;
}

.brand-config-head {
  margin-bottom: 0;
}

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

.brand-agent-tabs button {
  min-width: 0;
  min-height: 96px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas:
    "mark name"
    "mark meta";
  align-items: center;
  gap: 4px 12px;
  padding: 14px;
  border: 1px solid rgba(205, 187, 159, 0.76);
  border-radius: 8px;
  color: #263044;
  background: linear-gradient(180deg, #fff, #fbfaf7);
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
  text-align: left;
  cursor: pointer;
}

.brand-agent-tabs button:hover,
.brand-agent-tabs button.is-active {
  border-color: var(--brand-color, var(--lance-gold));
  background: linear-gradient(135deg, rgba(255, 250, 241, 0.96), rgba(236, 224, 200, 0.76));
}

.brand-agent-tabs button.is-active {
  box-shadow: 0 0 0 3px rgba(185, 154, 95, 0.16), 0 16px 34px rgba(23, 32, 51, 0.1);
}

.brand-dot {
  grid-area: mark;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(135deg, var(--brand-color, var(--lance-gold)), #172033);
  box-shadow: 0 10px 22px rgba(23, 32, 51, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.brand-agent-tabs b {
  grid-area: name;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #172033;
  font-size: 17px;
}

.brand-agent-tabs small {
  grid-area: meta;
  color: var(--muted);
  line-height: 1.45;
}

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

.brand-agent-summary article {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(205, 187, 159, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfaf7);
}

.brand-agent-summary span,
.brand-agent-summary small {
  display: block;
  color: var(--muted);
}

.brand-agent-summary strong {
  display: block;
  margin: 7px 0;
  overflow: hidden;
  color: #172033;
  font-size: 22px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ingredient-coverage-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #cfdad7;
  border-left: 4px solid #2f7468;
  border-radius: 8px;
  background: #f7fbfa;
}

.ingredient-coverage-panel.is-missing {
  border-color: #ead8b7;
  border-left-color: #ad772d;
  background: #fffaf0;
}

.ingredient-coverage-panel > header,
.ingredient-coverage-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ingredient-coverage-panel h3,
.ingredient-coverage-panel p {
  margin: 0;
}

.ingredient-coverage-panel h3 {
  color: #172033;
  font-size: 20px;
}

.ingredient-coverage-panel p,
.ingredient-coverage-panel footer > span {
  color: #586274;
  line-height: 1.6;
}

.ingredient-coverage-panel footer > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ingredient-coverage-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dceee9;
  color: #1f594f;
  font-size: 13px;
  font-weight: 700;
}

.ingredient-coverage-panel.is-missing .ingredient-coverage-status {
  background: #f5e6c9;
  color: #7a571c;
}

.ingredient-coverage-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(47, 116, 104, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.ingredient-coverage-metrics span {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-right: 1px solid rgba(47, 116, 104, 0.15);
}

.ingredient-coverage-metrics span:last-child {
  border-right: 0;
}

.ingredient-coverage-metrics small {
  color: var(--muted);
}

.ingredient-coverage-metrics strong {
  color: #172033;
  font-size: 22px;
}

.knowledge-asset-manager {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(23, 32, 51, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.06);
}

.knowledge-asset-manager-head,
.knowledge-asset-batchbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.knowledge-asset-manager-head h3 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.knowledge-asset-manager-head > div:first-child > span {
  display: block;
  max-width: 760px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.knowledge-asset-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(66px, 1fr));
  min-width: 330px;
  border: 1px solid rgba(205, 187, 159, 0.68);
  border-radius: 6px;
  overflow: hidden;
}

.knowledge-asset-metrics span {
  padding: 9px 10px;
  border-right: 1px solid rgba(205, 187, 159, 0.48);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.knowledge-asset-metrics span:last-child {
  border-right: 0;
}

.knowledge-asset-metrics b {
  display: block;
  margin-bottom: 2px;
  color: #172033;
  font-size: 18px;
}

.knowledge-asset-filter {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(220px, 1.5fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(205, 187, 159, 0.58);
  background: #fafbfc;
}

.knowledge-asset-filter label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.knowledge-asset-filter label > span {
  color: #5f6978;
  font-size: 12px;
  font-weight: 700;
}

.knowledge-asset-filter input,
.knowledge-asset-filter select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #d7dce4;
  border-radius: 5px;
  background: #fff;
  color: #172033;
}

.knowledge-asset-batchbar {
  align-items: center;
  padding: 10px 12px;
  border-left: 3px solid #2c5984;
  background: #f3f7fb;
}

.knowledge-asset-batchbar > div,
.knowledge-asset-select-all {
  display: flex;
  align-items: center;
  gap: 10px;
}

.knowledge-asset-select-all {
  color: #172033;
  font-weight: 700;
}

.knowledge-asset-select-all input,
.knowledge-asset-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2c5984;
}

.knowledge-selected-count {
  color: #2c5984;
  font-weight: 800;
  white-space: nowrap;
}

.knowledge-asset-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e1e4e9;
}

.knowledge-asset-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

.knowledge-asset-table th,
.knowledge-asset-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7e9ed;
  color: #303948;
  text-align: left;
  vertical-align: middle;
}

.knowledge-asset-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f7f9;
  color: #536071;
  font-size: 12px;
}

.knowledge-asset-table tr:last-child td {
  border-bottom: 0;
}

.knowledge-asset-table tr.is-selected td {
  background: #eef5fc;
}

.knowledge-asset-table th:nth-child(2) {
  width: 34%;
}

.knowledge-asset-table strong,
.knowledge-asset-table small {
  display: block;
  overflow-wrap: anywhere;
}

.knowledge-asset-table strong {
  color: #172033;
}

.knowledge-asset-table small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-asset-check-column {
  width: 60px;
  text-align: center !important;
}

.knowledge-scope-tag,
.knowledge-status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #eef1f5;
  color: #475466;
  font-size: 12px;
  font-weight: 700;
}

.knowledge-status-tag.is-published {
  background: #e2f5eb;
  color: #187a4a;
}

.knowledge-status-tag.is-draft {
  background: #fff2d5;
  color: #8a5a00;
}

.knowledge-status-tag.is-disabled {
  background: #eceef1;
  color: #707986;
}

.knowledge-status-tag.is-uploaded {
  background: #e6effc;
  color: #285b95;
}

.knowledge-asset-empty {
  padding: 28px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

.knowledge-asset-delete-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ead8b7;
  background: #fffaf0;
  color: #6d5732;
  font-size: 13px;
  line-height: 1.6;
}

.customer-source-studio {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(185, 154, 95, 0.48);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #faf7f0);
  box-shadow: 0 14px 32px rgba(23, 32, 51, 0.06);
}

.customer-source-studio-head,
.customer-source-item > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.customer-source-studio-head h3 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.customer-source-studio-head span {
  display: block;
  max-width: 760px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.customer-source-progress {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #e8ddca;
  border-radius: 8px;
  background: #fff;
}

.customer-source-progress > span {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #eee8de;
}

.customer-source-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #173a48, #b99a5f);
}

.customer-source-progress b {
  color: #172033;
  font-size: 13px;
}

.customer-source-progress small {
  color: var(--muted);
}

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

.customer-source-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e8ddca;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.customer-source-item.is-missing {
  border-style: dashed;
  background: rgba(255, 249, 242, 0.78);
}

.customer-source-title,
.customer-source-actions,
.customer-source-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-source-title {
  min-width: 0;
  align-items: flex-start;
}

.customer-source-title strong,
.customer-source-title small {
  display: block;
}

.customer-source-title strong {
  color: #172033;
  font-size: 15px;
}

.customer-source-title small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.source-kind,
.source-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.source-kind.is-prompt {
  color: #f7f3e8;
  background: #172033;
}

.source-kind.is-knowledge {
  color: #173a48;
  background: #e5f0ee;
}

.source-status {
  color: #735a2f;
  background: #f5eddd;
}

.source-status.is-published {
  color: #155e52;
  background: #e2f2ed;
}

.source-status.is-missing {
  color: #9b352c;
  background: #fff0eb;
}

.customer-source-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.customer-source-actions label {
  cursor: pointer;
}

.customer-source-actions .tiny-button,
.customer-source-actions label.tiny-button {
  flex: 0 0 auto;
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
}

.customer-source-meta {
  flex-wrap: wrap;
  margin-top: 11px;
  color: var(--muted);
  font-size: 12px;
}

.customer-source-meta span {
  padding-right: 10px;
  border-right: 1px solid #ece4d8;
}

.customer-source-meta span:last-child {
  border-right: 0;
}

.customer-source-warning {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #bd783b;
  color: #7c4b22;
  background: #fff7eb;
  font-size: 12px;
  line-height: 1.55;
}

.customer-source-item details {
  margin-top: 11px;
  border-top: 1px solid #eee5d8;
}

.customer-source-item summary {
  padding: 11px 2px 6px;
  color: #354055;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.customer-source-item textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 13px;
  border: 1px solid #ddd2c1;
  border-radius: 6px;
  color: #263044;
  background: #fcfbf8;
  font: 13px/1.65 "Microsoft YaHei", sans-serif;
}

.customer-source-item.is-prompt textarea {
  min-height: 360px;
}

.customer-knowledge-folder {
  padding-bottom: 0;
}

.customer-knowledge-record-list {
  margin: 12px -14px 0;
  border-top: 1px solid #e8ddca;
}

.customer-knowledge-record {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #eee5d8;
  background: rgba(255, 255, 255, 0.72);
}

.customer-knowledge-record:last-child {
  border-bottom: 0;
}

.customer-knowledge-record > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.customer-knowledge-record > header strong,
.customer-knowledge-record > header small {
  display: block;
}

.customer-knowledge-record > header strong {
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 14px;
}

.customer-knowledge-record > header small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.customer-knowledge-controls {
  display: grid;
  grid-template-columns: 140px minmax(220px, auto) minmax(200px, 1fr);
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dce8e5;
  border-radius: 6px;
  background: #f7faf9;
}

.customer-knowledge-controls label,
.customer-knowledge-controls span {
  color: #5d6777;
  font-size: 12px;
}

.customer-knowledge-controls input[type="number"] {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 5px;
  padding: 6px 8px;
  border: 1px solid #ccd9d6;
  border-radius: 5px;
  color: #263044;
  background: #fff;
}

.customer-knowledge-controls .sales-source-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #ccd9d6;
  border-radius: 5px;
  color: #173a48;
  background: #fff;
  font-weight: 700;
}

.customer-knowledge-controls .sales-source-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #2f7468;
}

.customer-knowledge-record details {
  border-top: 1px solid #eee5d8;
}

.customer-knowledge-record textarea {
  min-height: 190px;
}

.customer-knowledge-record.is-disabled-source {
  opacity: 0.72;
  background: #f8f8f6;
}

.customer-knowledge-empty {
  display: grid;
  gap: 5px;
  padding: 20px 14px;
  color: var(--muted);
}

.customer-knowledge-empty strong {
  color: #354055;
}

.tiny-button.danger {
  color: #9b352c;
  border-color: #e4b8ae;
  background: #fff7f4;
}

.sales-source-studio {
  border-color: rgba(31, 89, 82, 0.36);
  background: linear-gradient(180deg, #ffffff, #f1f6f5);
}

.sales-source-studio .customer-source-progress {
  border-color: #d5e3e0;
}

.sales-source-studio .customer-source-progress i {
  background: linear-gradient(90deg, #173a48, #2f7468);
}

.sales-knowledge-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 2px;
}

.sales-knowledge-heading strong,
.sales-knowledge-heading span,
.sales-knowledge-heading small {
  display: block;
}

.sales-knowledge-heading strong {
  color: #172033;
  font-size: 16px;
}

.sales-knowledge-heading span,
.sales-knowledge-heading small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.sales-source-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 130px minmax(190px, auto) minmax(180px, 1fr);
  align-items: end;
  gap: 10px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #dce8e5;
  border-radius: 6px;
  background: #f7faf9;
}

.sales-source-controls label,
.sales-source-controls span {
  color: #5d6777;
  font-size: 12px;
}

.sales-source-controls select,
.sales-source-controls input[type="number"] {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 5px;
  padding: 6px 8px;
  border: 1px solid #ccd9d6;
  border-radius: 5px;
  color: #263044;
  background: #fff;
}

.sales-source-controls .sales-source-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #ccd9d6;
  border-radius: 5px;
  color: #173a48;
  background: #fff;
  font-weight: 700;
}

.sales-source-controls .sales-source-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #2f7468;
}

.customer-source-item.is-disabled-source {
  border-style: dashed;
  opacity: 0.78;
}

.sales-source-empty p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.brand-scene-console {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(205, 187, 159, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.94), transparent 34%),
    linear-gradient(135deg, #fffdf8, #f4ecdd);
  box-shadow: 0 14px 30px rgba(23, 32, 51, 0.06);
}

.brand-scene-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.brand-scene-head h3 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.brand-scene-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

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

.brand-scene-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(205, 187, 159, 0.72);
  border-radius: 8px;
  color: #172033;
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
}

.brand-scene-card:hover,
.brand-scene-card.is-active {
  border-color: var(--lance-gold);
  background: linear-gradient(135deg, #fff, #fff5df);
  box-shadow: 0 0 0 3px rgba(185, 154, 95, 0.14), 0 16px 34px rgba(23, 32, 51, 0.09);
}

.brand-scene-card .scene-role {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #715f35;
  background: rgba(185, 154, 95, 0.14);
  font-size: 12px;
  font-weight: 900;
}

.brand-scene-card strong,
.brand-scene-detail b {
  color: #172033;
  font-size: 18px;
}

.brand-scene-card small,
.brand-scene-card i,
.brand-scene-detail span,
.scene-call-note,
.scene-missing-warning {
  color: var(--muted);
  line-height: 1.52;
}

.brand-scene-card i {
  font-style: normal;
  font-size: 12px;
}

.brand-scene-card em {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.brand-scene-card em.is-published {
  color: #16724b;
  background: rgba(31, 166, 103, 0.12);
}

.brand-scene-card em.is-warning {
  color: #9a5a00;
  background: rgba(255, 170, 52, 0.16);
}

.brand-scene-detail {
  display: grid;
  gap: 13px;
  padding: 14px;
  border: 1px solid #e8ddca;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.brand-scene-detail header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.brand-scene-detail b,
.brand-scene-detail span {
  display: block;
}

.scene-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.scene-detail-actions a.tiny-button {
  text-decoration: none;
}

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

.scene-binding-grid h4 {
  margin: 0 0 9px;
  color: #172033;
}

.scene-file-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-file-pill {
  max-width: 100%;
  display: inline-grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(205, 187, 159, 0.72);
  border-radius: 8px;
  background: #fffdf8;
}

.scene-file-pill b,
.scene-file-pill small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-file-pill b {
  color: #263044;
  font-size: 12px;
}

.scene-file-pill small {
  color: var(--muted);
  font-size: 11px;
}

.scene-file-pill.is-missing {
  border-color: rgba(202, 85, 85, 0.34);
  background: rgba(255, 241, 237, 0.82);
}

.scene-file-pill.is-missing b,
.scene-missing-warning {
  color: #9b352c;
}

.knowledge-package-importer {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(205, 187, 159, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #f8f3e9);
}

.package-import-head,
.package-brand-card header,
.package-preview-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.package-import-head h3,
.package-brand-card h4,
.package-preview-panel h4 {
  margin: 0;
  color: #172033;
}

.package-import-head span,
.package-brand-card small,
.package-preview-panel small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.package-import-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.package-import-actions label {
  cursor: pointer;
}

.package-import-actions input[type="file"] {
  display: none;
}

.action-button.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.package-import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.package-import-summary article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e8ddca;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.package-import-summary span,
.package-import-summary small {
  display: block;
  color: var(--muted);
}

.package-import-summary strong {
  display: block;
  margin: 6px 0;
  color: #172033;
  font-size: 21px;
}

.package-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.package-brand-list,
.package-import-log-list {
  display: grid;
  gap: 12px;
}

.package-brand-card,
.package-preview-panel,
.package-empty-state {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e5d8c3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.package-empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.package-empty-state strong {
  display: block;
  color: #172033;
  font-size: 16px;
}

.package-file-table-wrap {
  width: 100%;
  margin-top: 12px;
  overflow: auto;
  border: 1px solid #eee2cf;
  border-radius: 8px;
}

.package-file-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.package-file-table th,
.package-file-table td {
  padding: 10px;
  border-bottom: 1px solid #f0e6d6;
  text-align: left;
  vertical-align: top;
}

.package-file-table th {
  color: #172033;
  background: #fff8e8;
  font-weight: 900;
}

.package-file-table td strong,
.package-file-table td small {
  display: block;
  max-width: 230px;
  overflow-wrap: anywhere;
}

.package-issue-row td {
  color: #8b3340;
  background: #fff8f8;
  line-height: 1.5;
}

.package-warning-text,
.package-extra-files {
  margin: 8px 0 0;
  color: #8a5a12 !important;
  line-height: 1.55;
}

.package-global-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.package-preview-panel {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
}

.package-preview-panel textarea {
  width: 100%;
  min-height: 520px;
  max-height: 760px;
  padding: 12px;
  resize: vertical;
  border: 1px solid #dfd4c3;
  border-radius: 8px;
  color: #1f2937;
  background: #fff;
  font: 13px/1.7 Consolas, "Microsoft YaHei", monospace;
}

.package-import-log-list article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #eee2cf;
  border-radius: 8px;
  background: #fffdf7;
}

.package-import-log-list strong,
.package-import-log-list span,
.package-import-log-list small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.package-import-log-list span,
.package-import-log-list small {
  color: var(--muted);
  line-height: 1.45;
}

.brand-editor-grid .knowledge-editor-card textarea {
  min-height: 520px;
}

.brand-config-side {
  border-left: 1px solid rgba(205, 187, 159, 0.72);
  background: linear-gradient(180deg, #fbfaf7, #f7f3ec);
}

.brand-config-side .h5-debug-phone.compact {
  min-height: 430px;
  border-width: 8px;
  border-radius: 22px;
}

.brand-config-side .h5-debug-phone.compact iframe {
  height: 430px;
  border-radius: 13px;
}

.brand-config-side .source-list {
  max-height: 180px;
  overflow: auto;
}

@media (max-width: 1240px) {
  .brand-config-layout {
    grid-template-columns: 1fr;
  }

  .brand-config-side {
    border-left: 0;
    border-top: 1px solid rgba(205, 187, 159, 0.72);
  }
}

@media (max-width: 760px) {
  .brand-config-main,
  .brand-config-side {
    padding: 16px;
  }

  .knowledge-asset-manager {
    padding: 14px;
  }

  .knowledge-asset-manager-head,
  .knowledge-asset-batchbar {
    display: grid;
  }

  .knowledge-asset-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .knowledge-asset-metrics span:nth-child(2) {
    border-right: 0;
  }

  .knowledge-asset-metrics span:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(205, 187, 159, 0.48);
  }

  .knowledge-asset-filter {
    grid-template-columns: 1fr;
  }

  .knowledge-asset-batchbar > div {
    flex-wrap: wrap;
  }

  .brand-agent-tabs,
  .brand-agent-summary,
  .ingredient-coverage-metrics,
  .brand-scene-grid,
  .scene-binding-grid,
  .package-import-summary,
  .package-import-grid,
  .brand-editor-grid {
    grid-template-columns: 1fr;
  }

  .package-import-head,
  .ingredient-coverage-panel > header,
  .ingredient-coverage-panel > footer,
  .customer-source-studio-head,
  .customer-source-item > header,
  .brand-scene-detail header,
  .package-brand-card header,
  .package-preview-panel header {
    display: grid;
  }

  .package-import-actions,
  .customer-source-actions,
  .scene-detail-actions {
    justify-content: flex-start;
  }

  .customer-source-progress {
    grid-template-columns: 1fr;
  }

  .sales-knowledge-heading,
  .sales-source-controls,
  .customer-knowledge-controls,
  .customer-knowledge-record > header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .package-preview-panel {
    position: static;
  }

  .package-preview-panel textarea {
    min-height: 360px;
  }

  .brand-agent-tabs button {
    min-height: 82px;
  }

  .knowledge-upload-row {
    grid-template-columns: 1fr;
  }

  .knowledge-file-record {
    grid-template-columns: 1fr;
  }

  .knowledge-file-record-actions {
    justify-items: start;
  }

  .knowledge-file-detail header {
    display: grid;
  }

  .import-layout {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .import-preview-panel > header {
    display: grid;
  }
}

.store-metrics {
  background: rgba(251, 250, 247, 0.76);
}

@media (min-width: 1101px) {
  .store-metrics.account-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.store-metrics div strong,
.metric-card strong {
  color: var(--lance-navy);
}

.connection-pill.is-online {
  color: #0d684f;
  background: #eaf6ef;
  border: 1px solid rgba(31, 143, 122, 0.18);
}

.connection-pill.is-offline {
  color: #7a4d1e;
  background: #fff7ea;
  border: 1px solid rgba(185, 154, 95, 0.24);
}

.auth-page {
  background:
    linear-gradient(135deg, rgba(23, 32, 51, 0.08), transparent 45%),
    linear-gradient(180deg, #fbfaf7, #f3eadc);
}

.auth-card {
  border-top: 4px solid var(--lance-gold);
}

.chat-composer,
.chat-input,
.store-chat-panel,
.demo-chat-panel {
  border-color: rgba(205, 187, 159, 0.72);
  background: rgba(251, 250, 247, 0.96);
}

.message-bubble,
.ai-work-result {
  border-color: rgba(205, 187, 159, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(246, 244, 255, 0.82), rgba(248, 249, 252, 0.92) 280px),
    var(--bg);
}

body.is-auth-screen .app-shell {
  grid-template-columns: 1fr;
}

body.is-auth-screen .sidebar,
body.is-auth-screen .topbar,
body.is-auth-screen .workspace-tabs {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  padding: 24px 18px;
  border-right: 1px solid rgba(228, 231, 239, 0.7);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background:
    radial-gradient(circle at 35% 30%, #87f7d5, transparent 30%),
    linear-gradient(135deg, #2a66ff, #6e3df2 58%, #151a35);
  box-shadow: 0 8px 18px rgba(77, 87, 255, 0.26);
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.nav-item,
.utility-button {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #384052;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.utility-button:hover {
  background: #fff;
  border-color: var(--line);
}

.nav-item.is-active,
.utility-button.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-icon {
  width: 20px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.utility-button {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.78);
}

.main-area {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.topbar {
  min-height: 86px;
  min-width: 0;
  padding: 20px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid rgba(228, 231, 239, 0.74);
  backdrop-filter: blur(18px);
}

.module-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.module-switcher::-webkit-scrollbar {
  display: none;
}

.module-button {
  min-width: 64px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #313847;
  background: transparent;
  white-space: nowrap;
}

.module-button:hover {
  background: var(--panel-soft);
}

.module-button.is-active {
  color: #fff;
  background: var(--primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}

.subscription-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #8b4d12;
  background: #fff6e9;
  font-weight: 700;
}

.search-box {
  width: min(340px, 32vw);
  min-height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}

.search-box:focus-within {
  border-color: rgba(77, 87, 255, 0.35);
  box-shadow: 0 0 0 4px rgba(77, 87, 255, 0.08);
}

.search-box input {
  width: 100%;
  min-width: 90px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.icon-button,
.square-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #343c4d;
  background: #fff;
}

.icon-button:hover,
.square-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.workspace-tabs {
  min-height: 68px;
  padding: 14px 28px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
}

.workspace-tab {
  min-height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #2f3746;
  background: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.workspace-tab.is-active {
  color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow);
}

.workspace-tab span {
  color: var(--muted);
}

.content-shell {
  min-width: 0;
  padding: 0 28px 28px;
}

.page-panel {
  min-height: calc(100vh - 182px);
  border: 1px solid rgba(228, 231, 239, 0.86);
  border-radius: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.agent-head {
  min-height: 96px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.agent-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background:
    radial-gradient(circle at 42% 38%, #bff8ff 0 8%, transparent 9%),
    radial-gradient(circle at 62% 64%, #52f3b8 0 8%, transparent 9%),
    linear-gradient(135deg, #2c67ff, #11172f 70%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.72);
}

.agent-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.28;
}

.agent-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.status-pill {
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid #d7eadb;
  border-radius: 6px;
  color: var(--green);
  background: #f1fbf5;
  font-size: 12px;
  vertical-align: middle;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.connection-pill {
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.connection-pill.is-online {
  color: #0b7a53;
  background: #eaf8f2;
}

.connection-pill.is-offline {
  color: #a9441f;
  background: #fff1e9;
}

.action-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #313847;
  background: #fff;
}

.action-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.action-button.primary {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.page-tabs {
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: flex-end;
  gap: 36px;
  border-bottom: 1px solid var(--line);
}

.page-tab {
  height: 64px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #333b4a;
  background: transparent;
  font-weight: 700;
}

.page-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.agent-config-grid {
  display: grid;
  grid-template-columns: minmax(310px, 32%) minmax(360px, 1fr) minmax(320px, 34%);
  min-height: 680px;
}

.config-column,
.designer-column,
.preview-column {
  min-width: 0;
  padding: 22px;
}

.designer-column,
.preview-column {
  border-left: 1px solid var(--line);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(80px, 130px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.field-row label,
.section-label {
  font-weight: 800;
  color: #222936;
}

.select-like,
.text-input,
.metric-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #3b4353;
  background: #fff;
}

.select-like {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.textarea-card {
  position: relative;
}

.prompt-box {
  width: 100%;
  min-height: 590px;
  padding: 18px 18px 40px;
  resize: vertical;
  border: 0;
  border-radius: var(--radius);
  outline: 0;
  color: #343b4c;
  background: #f3f5fa;
  line-height: 1.76;
}

.char-count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #abb1bd;
  font-size: 13px;
}

.knowledge-empty-panel {
  min-height: 520px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}

.knowledge-empty-panel h2 {
  margin: 0;
  font-size: 24px;
}

.knowledge-empty-panel p {
  margin: 0;
  color: var(--muted);
}

.knowledge-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 700px;
}

.knowledge-workspace {
  min-width: 0;
  padding: 22px;
}

.knowledge-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.knowledge-config-head h2 {
  margin: 5px 0 6px;
  font-size: 24px;
}

.knowledge-config-head span {
  color: var(--muted);
  line-height: 1.6;
}

.agent-builder-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.builder-flow-card {
  padding: 16px;
  border: 1px solid #d9c28b;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffdf8 0%, #f6efe3 100%);
}

.builder-flow-card strong {
  display: block;
  margin-bottom: 12px;
  color: #172033;
  font-size: 16px;
}

.builder-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.builder-flow span {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(185, 150, 76, 0.36);
  border-radius: 999px;
  color: #453817;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.builder-flow i {
  color: #9f7a27;
  font-style: normal;
  font-weight: 900;
}

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

.builder-agent-card {
  min-height: 104px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.builder-agent-card b {
  color: #172033;
}

.builder-agent-card small {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  color: #856016;
  background: #fff4d8;
  font-weight: 800;
}

.builder-agent-card span {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.builder-knowledge-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.builder-knowledge-lanes span {
  min-height: 82px;
  padding: 12px;
  border: 1px solid #e6e1d4;
  border-radius: 8px;
  background: #fcfbf8;
}

.builder-knowledge-lanes b,
.builder-knowledge-lanes small {
  display: block;
}

.builder-knowledge-lanes b {
  margin-bottom: 6px;
  color: #172033;
}

.builder-knowledge-lanes small {
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
}

.knowledge-editor-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.knowledge-editor-card .editor-title {
  color: #182033;
  font-size: 17px;
  font-weight: 900;
}

.knowledge-editor-card small {
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-upload-row {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #d9c28b;
  border-radius: 8px;
  background: #fffdf8;
}

.knowledge-file-input {
  width: 100%;
  min-width: 0;
  color: #334155;
  font-size: 12px;
}

.knowledge-file-input::file-selector-button {
  height: 32px;
  margin-right: 8px;
  padding: 0 10px;
  border: 1px solid #c9a85e;
  border-radius: 6px;
  color: #5f4310;
  background: #fff7e3;
  font-weight: 800;
}

.knowledge-file-records {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(205, 187, 159, 0.76);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf8, #fbfaf7);
}

.knowledge-file-records header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.knowledge-file-records b,
.knowledge-file-records small {
  display: block;
}

.knowledge-file-records b {
  color: #172033;
  font-size: 15px;
}

.knowledge-file-record-list {
  max-height: 220px;
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.knowledge-file-record {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid #ebe2d1;
  border-radius: 8px;
  background: #fff;
}

.knowledge-file-record.is-active {
  border-color: #b99a5f;
  background: #fffaf0;
  box-shadow: 0 0 0 2px rgba(185, 154, 95, 0.12);
}

.knowledge-file-record strong,
.knowledge-file-record span,
.knowledge-file-record p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.knowledge-file-record strong {
  display: block;
  color: #172033;
  font-size: 14px;
  line-height: 1.35;
}

.knowledge-file-record span,
.knowledge-file-record small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.knowledge-file-record-actions {
  min-width: 96px;
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 8px;
}

.knowledge-file-record p,
.knowledge-file-empty {
  margin: 8px 0 0;
  color: #556070;
  font-size: 12px;
  line-height: 1.55;
}

.knowledge-file-detail {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7bd82;
  border-radius: 8px;
  background: #fffaf0;
}

.knowledge-file-detail header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-file-detail b,
.knowledge-file-detail small {
  display: block;
}

.knowledge-file-detail b {
  color: #172033;
  font-size: 15px;
}

.knowledge-file-detail small,
.knowledge-file-warning {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.knowledge-file-detail textarea {
  width: 100%;
  min-height: 260px;
  max-height: 520px;
  padding: 12px;
  resize: vertical;
  border: 1px solid #e4d4b6;
  border-radius: 8px;
  color: #1f2937;
  background: #fff;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.75;
}

.knowledge-editor-card textarea {
  width: 100%;
  min-height: 560px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  color: var(--text);
  background: #f8fafc;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

.knowledge-editor-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(68, 77, 255, 0.1);
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
}

.import-help {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #eadcc1;
  border-radius: 8px;
  background: #fffaf0;
}

.import-help strong {
  color: #172033;
  font-size: 13px;
}

.import-help p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.import-preview-panel {
  display: grid;
  gap: 14px;
}

.import-preview-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.import-preview-panel h2,
.import-preview-panel h3 {
  margin: 0;
  color: #172033;
}

.import-preview-panel header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.import-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e7dcc9;
  border-radius: 8px;
  background: #fff;
}

.import-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.import-table th,
.import-table td {
  padding: 10px;
  border-bottom: 1px solid #eee5d7;
  text-align: left;
  vertical-align: top;
}

.import-table th {
  color: #172033;
  background: #fff8e8;
  font-weight: 900;
}

.import-row-notes td {
  padding-top: 0;
  background: #fffdf8;
}

.import-status {
  display: inline-grid;
  min-width: 52px;
  min-height: 26px;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.import-status.ok {
  color: #0d684f;
  background: #e9f7ef;
}

.import-status.warning {
  color: #8a5a12;
  background: #fff2cf;
}

.import-status.error {
  color: #9f1d2d;
  background: #ffe6ea;
}

.import-issues {
  margin: 0;
  padding-left: 18px;
  color: #8b3340;
  line-height: 1.6;
}

.import-warning-box,
.import-success-box {
  padding: 12px;
  border-radius: 8px;
  line-height: 1.6;
}

.import-warning-box {
  color: #7a4d1e;
  background: #fff7ea;
  border: 1px solid #f0d29d;
}

.import-success-box {
  color: #0d684f;
  background: #eaf6ef;
  border: 1px solid #bfe6d2;
  font-weight: 900;
}

.import-confirm-actions {
  justify-content: flex-end;
}

.knowledge-side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #fbfcff;
}

.knowledge-side-panel section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.knowledge-side-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.knowledge-side-panel dl {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
}

.knowledge-side-panel dt {
  color: var(--muted);
}

.knowledge-side-panel dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

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

.knowledge-version-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5e8f2;
  border-radius: 8px;
  background: #fbfcff;
}

.knowledge-version-card header {
  display: grid;
  gap: 7px;
}

.knowledge-version-card strong {
  color: #1c2536;
  line-height: 1.45;
}

.knowledge-version-card p,
.knowledge-version-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.version-pill {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #7a5a00;
  background: #fff4d6;
  font-size: 12px;
  font-weight: 800;
}

.version-pill.is-published {
  color: #137252;
  background: #e8f8f2;
}

.version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.version-actions .tiny-button {
  width: auto;
  min-width: 84px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}

.version-actions .tiny-button:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.version-actions .tiny-button.primary {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.tiny-button.wide {
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
}

.version-actions .tiny-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.h5-debug-panel {
  display: grid;
  gap: 12px;
}

.h5-debug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.h5-debug-actions .tiny-button {
  width: auto;
  min-width: 96px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}

.h5-debug-actions .tiny-button:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.h5-debug-phone {
  width: 100%;
  min-height: 560px;
  overflow: hidden;
  border: 10px solid #202636;
  border-radius: 24px;
  background: #202636;
  box-shadow: 0 18px 42px rgba(25, 31, 48, 0.18);
}

.h5-debug-phone iframe {
  width: 100%;
  height: 560px;
  display: block;
  border: 0;
  border-radius: 14px;
  background: #fff;
}

.knowledge-warning {
  display: grid;
  gap: 8px;
  color: #7a5a00;
  background: #fff8e8 !important;
}

.knowledge-warning span {
  line-height: 1.6;
}

.ai-trace-card {
  display: grid;
  gap: 12px;
}

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

.ai-trace-row {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.ai-trace-row b,
.ai-trace-row small,
.ai-trace-row span {
  display: block;
}

.ai-trace-row small {
  color: var(--muted);
}

.ai-trace-row p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  word-break: break-word;
}

.ai-trace-row span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #24314a;
  background: #eef1f6;
  font-size: 12px;
  font-weight: 800;
}

.ai-trace-row span.trace-risk {
  color: #7b241c;
  background: #fff0ef;
}

.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.column-head h2,
.preview-column h2 {
  margin: 0;
  font-size: 20px;
}

.link-button {
  border: 0;
  color: var(--primary);
  background: transparent;
  font-weight: 700;
}

.inner-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.inner-tab {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #333b4a;
  background: transparent;
  font-weight: 700;
}

.inner-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.config-section {
  border-bottom: 1px solid var(--line);
  padding: 12px 0 18px;
}

.config-section summary {
  cursor: pointer;
  font-weight: 800;
  color: #242b38;
  list-style: none;
}

.config-section summary::-webkit-details-marker {
  display: none;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-help {
  margin: 10px 0 12px;
  color: var(--muted);
}

.opening-copy {
  margin-top: 12px;
  padding: 16px;
  min-height: 118px;
  border-radius: var(--radius);
  color: #303849;
  background: #f5f6fb;
  line-height: 1.6;
}

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

.question-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.question-item input {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #384052;
  background: #f5f6fb;
}

.tiny-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.tiny-button:hover {
  color: var(--red);
  background: #fff0f2;
}

.add-line-button {
  width: fit-content;
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  color: var(--primary);
  background: transparent;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.switch-row strong {
  display: block;
}

.switch-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 56px;
  height: 30px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d6dae4;
}

.slider::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
  box-shadow: 0 2px 5px rgba(26, 31, 44, 0.18);
}

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

.switch input:checked + .slider::after {
  transform: translateX(26px);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.skill-chip {
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.skill-chip span {
  color: var(--muted);
}

.preview-column {
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.phone-frame {
  max-width: 390px;
  margin: 16px auto 0;
  padding: 14px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #f4f6fb;
}

.phone-screen {
  overflow: hidden;
  min-height: 575px;
  border-radius: 24px;
  background:
    linear-gradient(rgba(32, 36, 48, 0.5), rgba(32, 36, 48, 0.5)),
    repeating-linear-gradient(135deg, #b8bfce 0 12px, #aeb5c4 12px 24px);
}

.phone-head {
  height: 58px;
  display: grid;
  place-items: center;
  color: #242936;
  background: rgba(255, 255, 255, 0.58);
  font-weight: 800;
}

.preview-message {
  margin: 18px;
  padding: 18px;
  border-radius: 4px;
  background: #fff;
  color: #303746;
  line-height: 1.62;
}

.preview-message strong {
  color: #222936;
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.quick-button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #3a4150;
  background: #fff;
}

.chat-input {
  min-height: 52px;
  margin: 0 18px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: #fff;
}

.chat-input input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.chat-input button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
}

.data-layout {
  display: grid;
  grid-template-columns: minmax(280px, 31%) minmax(0, 1fr);
  min-height: 720px;
  padding: 28px;
  gap: 28px;
}

.conversation-list,
.conversation-detail {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.conversation-list {
  overflow: hidden;
}

.list-tools {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(100px, 136px) minmax(0, 1fr) 46px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.new-conversation-form {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.new-conversation-form input,
.new-conversation-form select {
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
}

.new-conversation-form button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.api-status {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  background: #fff;
}

.text-input {
  padding: 0 12px;
}

.conversation-cards {
  max-height: 620px;
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.conversation-card {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.conversation-card.is-active {
  border-color: var(--primary);
  background: #f2f5ff;
}

.conversation-card strong {
  display: block;
  font-size: 17px;
}

.conversation-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.detail-tools {
  padding: 20px 24px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: min(470px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}

.segmented button {
  min-height: 40px;
  border: 0;
  background: #fff;
}

.segmented button.is-active {
  color: #fff;
  background: var(--primary);
}

.timeline {
  padding: 26px 28px 34px;
  max-height: 590px;
  overflow: auto;
}

.timeline-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.timeline-row.user {
  justify-content: flex-end;
}

.timeline-row .bubble {
  max-width: min(620px, 82%);
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.66;
  background: #f4f6fb;
}

.timeline-row.user .bubble {
  color: #fff;
  background: var(--primary);
  border-bottom-right-radius: 6px;
}

.timeline-row.agent .bubble {
  border-bottom-left-radius: 6px;
}

.timeline-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: #222936;
}

.message-name {
  margin: 2px 0 8px;
  color: #343b4c;
  font-weight: 700;
}

.chat-composer {
  min-height: 76px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-composer input {
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
}

.chat-composer input:focus {
  border-color: rgba(77, 87, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(77, 87, 255, 0.08);
}

.chat-composer button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.chat-composer button:disabled,
.chat-composer input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.media-composer {
  padding: 0 18px 18px;
  display: grid;
  gap: 10px;
  background: #fff;
}

#imageGenerateForm {
  display: none;
}

.media-tool-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
}

.media-tool-row input[type="text"],
.media-tool-row > input {
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
}

.media-tool-row button,
.media-file-button {
  min-height: 40px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  background: #fff;
  font-weight: 700;
}

.media-tool-row button:hover,
.media-file-button:hover {
  background: var(--primary-soft);
}

.media-tool-row button:disabled,
.media-tool-row input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.media-file-button {
  display: grid;
  place-items: center;
  padding: 0 14px;
  position: relative;
  overflow: hidden;
}

.media-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.message-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  min-width: min(360px, 70vw);
}

.message-images a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.message-images img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.store-staff-message-form {
  margin-top: 14px;
  padding-top: 12px;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(220, 224, 232, 0.9);
}

.store-staff-message-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid rgba(202, 208, 218, 0.95);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
  line-height: 1.55;
}

.store-staff-message-form button {
  justify-self: end;
}

.store-voice-panel {
  margin-top: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(185, 154, 95, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf8, #f8f1e6);
}

.store-voice-panel strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.store-voice-panel span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.store-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.store-voice-upload {
  position: relative;
  overflow: hidden;
}

.store-voice-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-caption {
  margin: 0 0 10px;
}

.empty-state {
  min-height: 420px;
  padding: 28px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

.empty-state strong {
  font-size: 18px;
}

.empty-state span {
  color: var(--muted);
}

.image-strip {
  display: grid;
  grid-template-columns: repeat(6, 74px);
  gap: 10px;
}

.image-thumb {
  height: 74px;
  border: 3px solid rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(35, 165, 117, 0.9) 0 16px, #fff 16px 100%),
    repeating-linear-gradient(0deg, transparent 0 9px, rgba(77, 87, 255, 0.14) 9px 10px);
}

.module-page {
  padding: 28px;
}

.module-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.summary-panel,
.ops-panel,
.metric-card,
.table-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.summary-panel,
.ops-panel {
  padding: 22px;
}

.summary-panel h1 {
  margin: 0 0 10px;
  font-size: 26px;
}

.summary-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ops-panel {
  display: grid;
  align-content: center;
  gap: 12px;
}

.ops-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #edf0f6;
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--color);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card {
  padding: 18px;
}

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

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--green);
}

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

.module-card {
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.module-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.module-card footer {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  color: #6f5528;
  background: #f8efd9;
  font-size: 13px;
  font-weight: 800;
}

.training-page {
  background:
    linear-gradient(180deg, rgba(250, 247, 240, 0.94), rgba(255, 255, 255, 0.98)),
    #fff;
}

.training-status-panel .section-help {
  margin: 4px 0 0;
}

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

.training-card {
  min-height: 196px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(22, 27, 38, 0.06);
}

.training-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.training-card strong {
  color: var(--lance-navy);
  font-size: 18px;
}

.training-card i {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #8b4d12;
  background: #fff2df;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.training-card p {
  margin: 14px 0;
  color: #465066;
  line-height: 1.7;
}

.training-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-page {
  min-height: 620px;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 8px 0 10px;
  font-size: 28px;
}

.auth-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #3d4658;
  font-weight: 700;
}

.auth-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.auth-form button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.auth-card small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

.demo-entry-grid {
  width: 100%;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.demo-entry-card {
  min-height: 118px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(205, 187, 159, 0.78);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf8, #f8f1e5);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.demo-entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--lance-gold);
  box-shadow: 0 12px 26px rgba(23, 32, 51, 0.12);
}

.demo-entry-card b {
  color: var(--lance-navy);
}

.demo-entry-card span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #604616;
  background: #fff4d8;
  font-size: 12px;
  font-weight: 800;
}

.demo-entry-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.accounts-page {
  padding: 0;
  overflow: hidden;
}

.accounts-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 0;
  min-height: 660px;
}

.account-create-panel,
.account-list-panel {
  min-width: 0;
  background: #fff;
}

.account-create-panel {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.account-create-panel h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.account-create-form,
.account-edit-form,
.business-agent-edit-form,
.account-search-form {
  display: grid;
  gap: 12px;
}

.account-create-form label,
.account-edit-form label,
.business-agent-edit-form label {
  display: grid;
  gap: 6px;
  color: #3d4658;
  font-weight: 700;
}

.account-create-form input,
.account-create-form select,
.account-edit-form input,
.account-edit-form select,
.business-agent-edit-form input,
.business-agent-edit-form select,
.account-search-form input {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  outline: 0;
}

.account-create-form input:focus,
.account-create-form select:focus,
.account-edit-form input:focus,
.account-edit-form select:focus,
.business-agent-edit-form input:focus,
.business-agent-edit-form select:focus,
.account-search-form input:focus {
  border-color: rgba(77, 87, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(77, 87, 255, 0.08);
}

.provider-config-block {
  min-width: 0;
  margin: 4px 0;
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid #d8deea;
  border-radius: 6px;
  background: #f8fafc;
}

.provider-config-block legend {
  padding: 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.provider-config-head,
.provider-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.provider-config-head .section-help {
  flex: 1 1 220px;
  margin: 0;
}

.provider-config-actions {
  justify-content: flex-start;
}

.provider-model-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d8deea;
  border-radius: 6px;
  color: #536174;
  background: #ffffff;
  line-height: 1.55;
}

.provider-model-status.is-loading {
  border-color: #b9c8dd;
  color: #31567c;
  background: #eef5fc;
}

.provider-model-status.is-success {
  border-color: #aad8c8;
  color: #17664e;
  background: #edf9f4;
}

.provider-model-status.is-error {
  border-color: #efb4ad;
  color: #9a352b;
  background: #fff4f2;
}

.checkbox-line,
.inline-check {
  grid-template-columns: auto 1fr;
  align-items: center;
  font-weight: 500;
}

.checkbox-line input,
.inline-check input {
  width: 16px;
  min-height: 16px;
}

.account-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.account-search {
  padding: 18px;
}

.account-list {
  max-height: 680px;
  overflow: auto;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-content: start;
  gap: 14px;
  background: #fbfcff;
}

.account-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.account-card.is-disabled {
  opacity: 0.62;
}

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

.account-card strong,
.account-card span {
  display: block;
  min-width: 0;
}

.account-card strong {
  font-size: 17px;
}

.account-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.role-pill {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #33405a;
  background: #eef1f7;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.role-admin {
  color: #fff;
  background: var(--primary);
}

.role-teacher {
  color: #0a6c4c;
  background: #e6f7ef;
}

.role-customer {
  color: #8b4d12;
  background: #fff2df;
}

.role-agent {
  color: #24314a;
  background: #eef1f6;
}

.partner-mini-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.partner-mini-metrics div {
  min-height: 64px;
  padding: 10px;
}

.partner-mini-metrics strong {
  font-size: 20px;
}

.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.account-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.content-page {
  padding: 0;
  overflow: hidden;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  min-height: 700px;
}

.content-create-panel,
.content-list-panel {
  min-width: 0;
  background: #fff;
}

.content-create-panel {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.content-create-panel h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.content-create-form {
  display: grid;
  gap: 12px;
}

.content-create-form label {
  display: grid;
  gap: 6px;
  color: #3d4658;
  font-weight: 700;
}

.content-create-form input,
.content-create-form textarea,
.content-create-form select,
.content-search select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  outline: 0;
}

.content-create-form input,
.content-create-form select,
.content-search select {
  min-height: 40px;
  padding: 0 12px;
}

.content-create-form textarea {
  padding: 10px 12px;
  resize: vertical;
}

.content-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.content-search {
  grid-template-columns: minmax(0, 1fr) 136px 72px;
}

.content-list {
  max-height: 720px;
  overflow: auto;
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
  background: #fbfcff;
}

.content-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.content-card header,
.content-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.content-card strong,
.content-card span {
  display: block;
}

.content-card strong {
  font-size: 18px;
}

.content-card span,
.content-card footer {
  color: var(--muted);
  font-size: 13px;
}

.content-card p {
  margin: 12px 0;
  color: #465066;
  line-height: 1.65;
}

.content-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  color: #33405a;
  background: #eef1f7;
}

.content-status.published {
  color: #0a6c4c;
  background: #e6f7ef;
}

.content-status.draft {
  color: #8b4d12;
  background: #fff2df;
}

.content-status.archived {
  color: #7b3440;
  background: #ffecef;
}

.content-media-strip {
  margin: 12px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.content-media-strip img,
.content-media-strip video {
  width: 100%;
  height: 128px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f4f8;
}

.content-media-strip audio {
  width: 100%;
  grid-column: 1 / -1;
}

.content-card footer div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  padding: 4px 8px;
  border-radius: 6px;
  color: #465066;
  background: #f2f4f8;
  font-size: 12px;
}

.store-page {
  padding: 0;
  overflow: hidden;
}

.store-head {
  min-height: 112px;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.store-head h1 {
  margin: 4px 0 8px;
  font-size: 26px;
  line-height: 1.25;
}

.store-head span {
  color: var(--muted);
}

.store-metrics {
  padding: 18px 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.store-entry-bar {
  padding: 12px 28px;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.store-entry-bar span {
  color: #3d4658;
  font-weight: 700;
}

.store-entry-bar code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #35405a;
  background: #f7f8fb;
}

.store-entry-bar small {
  color: var(--muted);
  white-space: nowrap;
}

.store-metrics div {
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.store-metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.store-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.store-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 27%) minmax(360px, 38%) minmax(320px, 1fr);
  min-height: 720px;
}

.store-customer-panel,
.store-customer-detail,
.store-chat-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #fff;
}

.store-chat-panel {
  border-right: 0;
}

.store-search {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.store-search input,
.store-follow-form input,
.store-follow-form textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  outline: 0;
}

.store-search input {
  min-height: 40px;
  padding: 0 12px;
}

.store-search button {
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.store-customer-list {
  max-height: 670px;
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.store-customer-card {
  position: relative;
  width: 100%;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.store-customer-card.is-active {
  border-color: var(--primary);
  background: #f2f5ff;
}

.store-customer-card strong,
.store-customer-card span,
.store-customer-card small {
  display: block;
  min-width: 0;
}

.store-customer-card strong {
  padding-right: 76px;
  font-size: 17px;
}

.store-customer-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.store-customer-card small {
  margin-top: 10px;
  color: #4a5162;
  line-height: 1.45;
}

.store-customer-card i {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.store-customer-detail {
  padding: 22px;
  overflow: auto;
}

.store-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.store-detail-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.store-detail-head span {
  color: var(--muted);
  line-height: 1.5;
}

.store-detail-head strong {
  align-self: flex-start;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
}

.conversion-buttons {
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.conversion-buttons button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #4b5262;
  background: #fff;
}

.conversion-buttons button.is-active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

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

.store-profile-grid section,
.store-memory {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.store-profile-grid span {
  color: var(--muted);
  font-size: 13px;
}

.store-profile-grid p {
  margin: 8px 0 0;
  line-height: 1.6;
}

.store-memory {
  margin-top: 14px;
}

.store-memory h3,
.store-chat-panel h2 {
  margin: 0;
  font-size: 17px;
}

.store-memory dl {
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.store-memory div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

.store-memory dt {
  color: var(--muted);
}

.store-memory dd {
  margin: 0;
  line-height: 1.55;
}

.ai-work-result {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(73, 90, 255, 0.22);
  border-radius: 8px;
  background: #fff;
}

.ai-work-result strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
}

.ai-work-result p {
  margin: 0;
  line-height: 1.65;
  color: #303747;
}

.store-follow-form {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.store-follow-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.store-follow-form input {
  min-height: 38px;
  padding: 0 11px;
}

.store-follow-form textarea {
  resize: vertical;
  padding: 10px 11px;
  line-height: 1.55;
}

.store-follow-form button {
  justify-self: start;
}

.store-chat-panel header {
  min-height: 74px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.store-chat-panel header span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.store-chat-timeline {
  max-height: 706px;
  overflow: auto;
}

.store-chat-timeline .timeline-row {
  padding: 0 22px;
}

.store-chat-timeline .timeline-row:first-child {
  margin-top: 24px;
}

.table-panel {
  overflow: hidden;
}

.table-panel table {
  width: 100%;
  border-collapse: collapse;
}

.table-panel th,
.table-panel td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.table-panel th {
  color: #5e6678;
  background: #f7f8fb;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(25, 31, 44, 0.92);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.beauty-os-page {
  display: grid;
  gap: 18px;
}

.beauty-os-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 24px;
  border: 1px solid rgba(185, 154, 95, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 9% 5%, rgba(185, 154, 95, 0.24), transparent 30%),
    linear-gradient(135deg, #172033 0%, #26324b 58%, #b99a5f 140%);
  color: #fff;
  box-shadow: 0 20px 48px rgba(23, 32, 51, 0.16);
}

.beauty-os-hero .eyebrow,
.beauty-os-hero h1,
.beauty-os-hero span {
  color: inherit;
}

.beauty-os-hero h1 {
  margin: 8px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.beauty-os-hero span {
  display: block;
  max-width: 760px;
  opacity: 0.82;
  line-height: 1.7;
}

.beauty-os-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.beauty-os-metric,
.beauty-os-card {
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
}

.beauty-os-metric {
  min-height: 112px;
  padding: 15px;
}

.beauty-os-metric span,
.beauty-os-metric small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.beauty-os-metric span {
  font-size: 12px;
  font-weight: 900;
}

.beauty-os-metric strong {
  display: block;
  margin: 10px 0 8px;
  color: #172033;
  font-size: 24px;
  line-height: 1.1;
}

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

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

.beauty-os-card.is-wide {
  grid-column: 1 / -1;
}

.beauty-os-card.is-planned-feature {
  border-style: dashed;
  background: #f4f5f7;
  box-shadow: none;
}

.planned-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 5px;
  color: #6f7783;
  background: #e4e7eb;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.beauty-os-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.beauty-os-card h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
}

.beauty-os-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.beauty-agent-row,
.beauty-prompt-list,
.token-wallet-preview,
.followup-policy,
.flywheel-steps {
  display: grid;
  gap: 10px;
}

.beauty-agent-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.beauty-agent-row div,
.beauty-prompt-list div,
.token-wallet-preview div {
  padding: 12px;
  border-radius: 10px;
  background: #f7f8fc;
}

.beauty-agent-row b,
.beauty-agent-row span,
.beauty-prompt-list b,
.beauty-prompt-list span,
.token-wallet-preview span,
.token-wallet-preview strong {
  display: block;
}

.beauty-agent-row b,
.beauty-prompt-list b,
.token-wallet-preview strong {
  color: #172033;
}

.beauty-agent-row span,
.beauty-prompt-list span,
.token-wallet-preview span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.commerce-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  padding: 24px;
  background: #f6f7f9;
}

.commerce-page > *,
.commerce-page-head,
.commerce-status-row {
  min-width: 0;
}

.commerce-page-head,
.commerce-section-head,
.commerce-save-bar,
.commerce-status-row,
.commerce-grant-form,
.demo-cleanup-form {
  display: flex;
  align-items: center;
}

.commerce-page-head,
.commerce-section-head,
.commerce-save-bar {
  justify-content: space-between;
  gap: 16px;
}

.commerce-page-head {
  width: 100%;
}

.commerce-page-head h1,
.commerce-section h2 {
  margin: 0;
  color: #172033;
}

.commerce-page-head h1 {
  margin-top: 4px;
  font-size: 28px;
}

.commerce-status-row,
.commerce-grant-form,
.demo-cleanup-form {
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 7px 10px;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  color: #515967;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.commerce-status-row .tiny-button {
  min-width: 72px;
  white-space: nowrap;
}

.status-pill.is-ready {
  border-color: #acd8c4;
  color: #176a49;
  background: #eef9f3;
}

.status-pill.is-warning {
  border-color: #e7cb9e;
  color: #855b18;
  background: #fff9ed;
}

.commerce-settings-form {
  display: contents;
}

.commerce-section {
  padding: 20px;
  border: 1px solid #e0e3e9;
  border-radius: 6px;
  background: #fff;
}

.commerce-section-head {
  margin-bottom: 16px;
}

.commerce-section-head h2 {
  font-size: 18px;
}

.commerce-section-head span,
.commerce-save-bar span {
  display: block;
  margin-top: 4px;
  color: #7a818d;
  font-size: 12px;
}

.commerce-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.commerce-field-grid + .commerce-field-grid {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf0f4;
}

.commerce-field-grid label,
.commerce-readonly {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.commerce-field-grid label > span,
.commerce-readonly span {
  color: #515967;
  font-size: 12px;
}

.commerce-field-grid input,
.commerce-field-grid select,
.commerce-grant-form input,
.commerce-grant-form select,
.demo-cleanup-form input,
.commerce-table input {
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.commerce-field-grid label small {
  position: absolute;
  right: 10px;
  bottom: 11px;
  color: #8a919c;
  font-size: 11px;
}

.commerce-readonly {
  padding: 10px 12px;
  border: 1px solid #d9dde5;
  border-radius: 5px;
  background: #f7f8fa;
}

.commerce-readonly strong {
  font-size: 19px;
}

.commerce-toggle {
  grid-template-columns: 20px 1fr;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid #d9dde5;
  border-radius: 5px;
}

.commerce-toggle input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.commerce-env-note {
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid #b99a5f;
  background: #f7f7f5;
  color: #626975;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.commerce-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.commerce-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.commerce-table th,
.commerce-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  color: #515967;
  font-size: 12px;
  vertical-align: middle;
}

.commerce-table th {
  color: #7a818d;
  font-weight: 600;
  background: #fafbfc;
}

.commerce-table td strong,
.commerce-table td small {
  display: block;
}

.commerce-table td strong {
  color: #172033;
}

.commerce-table td small {
  margin-top: 3px;
  color: #8a919c;
}

.commerce-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
}

.commerce-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 4;
  padding: 12px 14px;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.1);
}

.commerce-grant-form {
  margin-bottom: 14px;
}

.commerce-grant-form select {
  min-width: 260px;
}

.commerce-grant-form input {
  flex: 1 1 160px;
}

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

.cleanup-metrics div {
  padding: 13px;
  border: 1px solid #e0e3e9;
  border-radius: 5px;
  background: #fafbfc;
}

.cleanup-metrics span,
.cleanup-metrics strong {
  display: block;
}

.cleanup-metrics span {
  color: #7a818d;
  font-size: 12px;
}

.cleanup-metrics strong {
  margin-top: 5px;
  color: #172033;
  font-size: 22px;
}

.demo-cleanup-form {
  margin-top: 14px;
}

.demo-cleanup-form input {
  flex: 1 1 260px;
}

.danger-button {
  height: 38px;
  padding: 0 15px;
  border: 1px solid #b43a3a;
  border-radius: 5px;
  background: #b43a3a;
  color: #fff;
  cursor: pointer;
}

.danger-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 900px) {
  .commerce-page {
    padding: 14px;
  }

  .commerce-page-head,
  .commerce-section-head,
  .commerce-save-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .commerce-status-row {
    width: 100%;
  }

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

  .cleanup-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .commerce-field-grid {
    grid-template-columns: 1fr;
  }

  .commerce-status-row,
  .commerce-grant-form,
  .demo-cleanup-form {
    align-items: stretch;
  }

  .commerce-status-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .commerce-status-row > * {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .commerce-grant-form,
  .demo-cleanup-form {
    flex-direction: column;
  }

  .commerce-grant-form select,
  .commerce-grant-form input,
  .demo-cleanup-form input {
    width: 100%;
    min-width: 0;
  }
}

.knowledge-tower-grid,
.followup-policy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-tower-grid span,
.followup-policy span {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #5f4a20;
  background: rgba(185, 154, 95, 0.14);
  font-size: 12px;
  font-weight: 900;
}

.flywheel-steps {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: flywheel;
}

.flywheel-steps li {
  position: relative;
  min-height: 76px;
  padding: 34px 10px 10px;
  border-radius: 10px;
  background: #f7f8fc;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.flywheel-steps li::before {
  counter-increment: flywheel;
  content: counter(flywheel);
  position: absolute;
  top: 9px;
  left: 10px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  font-size: 11px;
}

@media (max-width: 1180px) {
  .beauty-os-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .flywheel-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .beauty-os-hero,
  .beauty-os-grid,
  .beauty-agent-row {
    grid-template-columns: 1fr;
  }

  .beauty-os-actions {
    flex-wrap: wrap;
  }

  .beauty-os-metrics,
  .flywheel-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .beauty-os-metrics,
  .flywheel-steps {
    grid-template-columns: 1fr;
  }
}

.agent-list-page {
  padding: 28px;
}

.agent-list-head {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.agent-list-head h1 {
  margin: 4px 0 8px;
  font-size: 28px;
}

.agent-list-head span,
.demo-chat-head span {
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-weight: 800;
}

.agent-toolbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.agent-config-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.agent-config-shortcuts article {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.agent-config-shortcuts b,
.agent-config-shortcuts span {
  display: block;
}

.agent-config-shortcuts b {
  color: var(--text);
  font-size: 16px;
}

.agent-config-shortcuts span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.agent-toolbar-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.agent-toolbar-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #374151;
  background: #fff;
  white-space: nowrap;
}

.agent-toolbar-tabs button.is-active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.agent-search {
  width: min(320px, 100%);
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}

.agent-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
}

.agent-card-grid {
  padding-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.agent-list-card {
  min-height: 260px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.agent-list-card header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.agent-list-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.agent-list-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.agent-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-card-tags span {
  padding: 5px 8px;
  border-radius: 6px;
  color: #455065;
  background: #f2f4f8;
  font-size: 12px;
}

.agent-list-card footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-list-card footer span {
  color: var(--muted);
  font-size: 13px;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: 720px;
}

.demo-chat-panel,
.demo-side-panel {
  min-width: 0;
  padding: 22px;
}

.demo-side-panel {
  border-left: 1px solid var(--line);
  background: #fbfcff;
}

.demo-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.demo-chat-head h2,
.demo-side-panel h3 {
  margin: 0 0 8px;
}

.hq-ai-workbench {
  margin-bottom: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d5b56b;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffdf7 0%, #f7efe0 100%);
}

.hq-ai-workbench strong {
  display: block;
  margin-bottom: 6px;
  color: #182236;
}

.hq-ai-workbench span {
  display: block;
  color: #667085;
  line-height: 1.6;
}

.hq-chat-empty {
  align-items: stretch;
}

.hq-chat-empty .chat-composer {
  width: min(760px, 100%);
  margin: 18px auto 0;
}

.quick-question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.quick-question-row button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  background: #fff;
}

.quick-question-row button:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.demo-side-panel section {
  padding: 0 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.demo-side-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px 12px;
}

.demo-side-panel dt {
  color: var(--muted);
}

.demo-side-panel dd {
  margin: 0;
  color: #2f3746;
  word-break: break-word;
}

.source-list {
  margin: 0;
  padding-left: 18px;
  color: #4b5565;
  line-height: 1.8;
}

@media (max-width: 1240px) {
  .agent-config-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-config-layout,
  .knowledge-editor-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-side-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .designer-column,
  .preview-column {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .preview-column {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 390px);
    gap: 20px;
    align-items: start;
  }

  .phone-frame {
    margin: 0;
  }

  .module-hero {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .module-grid,
  .training-grid,
  .agent-config-shortcuts,
  .agent-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .demo-side-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    overflow-x: hidden;
  }

  .sidebar {
    position: static;
    height: auto;
    max-width: 100vw;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
  }

  .side-nav {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item,
  .utility-button {
    flex: 0 0 auto;
    width: auto;
  }

  .utility-button {
    margin-top: 0;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .search-box {
    width: 100%;
    flex: 1 1 220px;
  }

  .workspace-tabs,
  .content-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .agent-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .agent-list-head,
  .agent-toolbar,
  .demo-chat-head,
  .store-head,
  .knowledge-config-head {
    align-items: stretch;
    flex-direction: column;
  }

  .store-head,
  .store-entry-bar,
  .store-metrics {
    padding-left: 18px;
    padding-right: 18px;
  }

  .store-entry-bar {
    grid-template-columns: 1fr;
  }

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

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

  .account-create-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content-create-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content-search {
    grid-template-columns: 1fr;
  }

  .account-list {
    grid-template-columns: 1fr;
  }

  .store-entry-bar small {
    white-space: normal;
  }

  .store-workbench {
    grid-template-columns: 1fr;
  }

  .store-customer-panel,
  .store-customer-detail,
  .store-chat-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .store-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-layout {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .preview-column {
    grid-template-columns: 1fr;
  }

  .knowledge-workspace,
  .knowledge-side-panel {
    padding: 16px;
  }

  .knowledge-editor-card textarea {
    min-height: 420px;
  }

  .metric-grid,
  .module-grid,
  .training-grid,
  .agent-config-shortcuts,
  .agent-card-grid,
  .demo-entry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-page {
    min-height: 100vh;
    padding: 16px;
  }

  .auth-card {
    padding: 22px 18px;
  }

  .auth-card h1 {
    font-size: 24px;
  }

  .store-metrics,
  .store-profile-grid,
  .account-metrics,
  .content-metrics {
    grid-template-columns: 1fr;
  }

  .account-list {
    padding: 14px;
  }

  .account-card header,
  .account-actions,
  .content-card header,
  .content-card footer {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-title {
    align-items: flex-start;
  }

  .agent-title h1 {
    font-size: 18px;
  }

  .agent-avatar {
    width: 46px;
    height: 46px;
  }

  .page-tabs {
    gap: 20px;
    overflow-x: auto;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .list-tools {
    grid-template-columns: 1fr;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  .image-strip {
    grid-template-columns: repeat(3, 74px);
  }

  .timeline-row .bubble {
    max-width: 100%;
  }
}

/* 朗斯国际高端视觉主题：最终覆盖 */
.app-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(246, 242, 235, 0.96) 360px),
    linear-gradient(115deg, rgba(36, 49, 74, 0.06), transparent 52%),
    var(--lance-porcelain);
}

.sidebar {
  color: #f7f3ec;
  border-right: 1px solid rgba(185, 154, 95, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(36, 49, 74, 0.96)),
    var(--lance-navy);
  box-shadow: 18px 0 44px rgba(17, 24, 39, 0.1);
}

.brand {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(234, 220, 193, 0.2);
}

.brand-mark,
.customer-avatar,
.avatar {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(135deg, #f0dcc0, #b99a5f 46%, #172033);
  box-shadow: 0 10px 24px rgba(185, 154, 95, 0.28);
}

.brand strong,
.brand span {
  color: #fbfaf7;
}

.brand span {
  color: rgba(251, 250, 247, 0.68);
}

.nav-item,
.utility-button {
  color: rgba(251, 250, 247, 0.76);
}

.nav-item:hover,
.utility-button:hover {
  color: #fff;
  border-color: rgba(234, 220, 193, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.is-active,
.utility-button.is-active {
  color: #172033;
  border-color: var(--lance-gold-soft);
  background: linear-gradient(135deg, #fffaf1, #eadcc1);
}

.topbar,
.workspace-tabs {
  border-color: rgba(229, 220, 205, 0.74);
  background: rgba(251, 250, 247, 0.84);
}

.subscription-button,
.action-button.primary,
.chat-composer button,
.chat-input button,
.auth-form button {
  color: #fff;
  border-color: var(--lance-navy);
  background:
    linear-gradient(135deg, var(--lance-navy), #2d3b58 64%, #705c37);
  box-shadow: 0 10px 22px rgba(23, 32, 51, 0.16);
}

.module-button.is-active {
  color: #172033;
  background: linear-gradient(135deg, #fff8e8, #dfc693);
  box-shadow: inset 0 0 0 1px rgba(185, 154, 95, 0.45);
}

.page-panel,
.auth-card,
.store-metrics div,
.metric-card,
.account-card,
.content-card,
.table-panel,
.ops-panel {
  border-color: rgba(205, 187, 159, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 247, 0.96));
  box-shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
}

.page-panel {
  position: relative;
  overflow: hidden;
}

.page-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lance-navy), var(--lance-gold), var(--lance-jade));
  pointer-events: none;
}

.store-head {
  background:
    linear-gradient(135deg, rgba(23, 32, 51, 0.96), rgba(42, 54, 79, 0.92)),
    var(--lance-navy);
  color: #fff;
}

.store-head h1,
.store-head .eyebrow {
  color: #fff;
}

.store-head span {
  color: rgba(255, 255, 255, 0.72);
}
.chairman-control-demo {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.knowledge-config-layout.is-chairman-clone .knowledge-editor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.knowledge-config-layout.is-chairman-clone .knowledge-editor-card textarea {
  min-height: 430px;
}

.chairman-control-demo > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.chairman-control-demo h2 {
  margin: 4px 0 8px;
}

.chairman-control-demo header span,
.chairman-control-grid span {
  color: var(--muted-text, #68706c);
  line-height: 1.65;
}

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

.chairman-control-grid article {
  border: 1px solid var(--border-color, #e0ddd5);
  border-radius: 8px;
  padding: 15px;
  background: #fffdf8;
}

.chairman-control-grid strong,
.chairman-control-grid span {
  display: block;
}

.chairman-control-grid span {
  margin-top: 6px;
}

.chairman-control-frame {
  height: min(760px, 74vh);
  overflow: hidden;
  border: 1px solid var(--border-color, #e0ddd5);
  border-radius: 8px;
  background: #f5f2eb;
}

.chairman-control-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 820px) {
  .chairman-control-demo > header {
    align-items: stretch;
    flex-direction: column;
  }

  .chairman-control-grid {
    grid-template-columns: 1fr;
  }
}

.launch-readiness {
  border-left: 4px solid #b54a3d;
}

.launch-readiness.is-ready {
  border-left-color: #257a5a;
}

.launch-readiness-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 6px;
  color: #8b2f26;
  background: #fff0ed;
  font-size: 13px;
}

.launch-readiness.is-ready .launch-readiness-badge {
  color: #176244;
  background: #e8f7ef;
}

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

.launch-check-item {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e2dfd8;
  border-radius: 6px;
  background: #fff;
}

.launch-check-item > span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  color: #6a6256;
  background: #f2f0eb;
  font-size: 11px;
}

.launch-check-item > strong,
.launch-check-item > p {
  display: block;
}

.launch-check-item > p {
  margin: 6px 0 0;
  color: #6d6a63;
  font-size: 12px;
  line-height: 1.55;
}

.launch-check-item.is-blocker {
  border-color: #eac0ba;
  background: #fff9f7;
}

.launch-check-item.is-blocker > span {
  color: #912f25;
  background: #ffe9e5;
}

.launch-check-item.is-ok {
  border-color: #bcdcca;
  background: #fbfffc;
}

.launch-check-item.is-ok > span {
  color: #176244;
  background: #e8f7ef;
}

@media (max-width: 1000px) {
  .launch-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .launch-check-grid {
    grid-template-columns: 1fr;
  }
}

.registration-page {
  padding: 22px;
  background: #f6f7f9;
}

.registration-section {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #e2e5eb;
  background: #fff;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title-row h2,
.registration-field-panel header strong {
  margin: 0;
  color: #172033;
}

.section-title-row h2 {
  font-size: 20px;
}

.section-title-row span,
.registration-field-panel header span,
.registration-qr-card span,
.registration-result span {
  display: block;
  margin-top: 5px;
  color: #707887;
  font-size: 13px;
  line-height: 1.55;
}

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

.registration-qr-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dde2ea;
  border-top: 3px solid #1c4a49;
  border-radius: 7px;
  background: #fff;
}

.registration-qr-card.brand-taimei {
  border-top-color: #ad8b43;
}

.registration-qr-card.brand-beimanzi {
  border-top-color: #8d7043;
}

.registration-qr-preview {
  grid-row: 1;
  display: grid;
  gap: 5px;
  width: 140px;
  min-height: 164px;
  padding: 6px;
  border: 1px solid #e3e6eb;
  border-radius: 6px;
  background: #fff;
  cursor: zoom-in;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.registration-qr-preview:hover,
.registration-qr-preview:focus-visible {
  border-color: #b99a5f;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.13);
  transform: translateY(-1px);
  outline: none;
}

.registration-qr-preview > img {
  display: block;
  width: 126px;
  height: 126px;
  object-fit: contain;
  image-rendering: pixelated;
}

.registration-qr-preview .registration-qr-zoom-label {
  margin: 0;
  color: #536075;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.registration-qr-unavailable {
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  color: #8a909b;
  background: #f5f6f8;
}

.registration-qr-copy {
  min-width: 0;
}

.registration-qr-card strong {
  color: #172033;
  font-size: 16px;
}

.registration-qr-actions,
.registration-review-actions,
.registration-record-actions,
.store-admin-edit-actions,
.store-follow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.registration-qr-actions .action-button {
  min-width: 0;
  min-height: 34px;
  padding-inline: 9px;
  text-decoration: none;
  white-space: nowrap;
}

.registration-qr-card .registration-qr-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.registration-qr-card .registration-qr-actions .action-button {
  justify-content: center;
  font-size: 12px;
}

.headquarters-store-invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.headquarters-store-invite-form label,
.headquarters-store-invite-copy {
  display: grid;
  gap: 8px;
}

.headquarters-store-invite-form select,
.headquarters-store-invite-copy input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8dce7;
  border-radius: 8px;
  background: #fff;
  color: #20283d;
  padding: 0 12px;
  font: inherit;
}

.headquarters-store-invite-result {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dce2ec;
  border-left: 4px solid #253553;
  border-radius: 8px;
  background: #f9fafc;
}

.headquarters-store-invite-result.brand-taimei {
  border-left-color: #aa8241;
}

.headquarters-store-invite-result.brand-beimanzi {
  border-left-color: #1f5c50;
}

.headquarters-store-invite-result .registration-qr-preview {
  min-height: 160px;
}

.headquarters-store-invite-copy strong {
  font-size: 18px;
}

.headquarters-store-invite-copy > span {
  color: #667085;
}

.headquarters-store-invite-copy .registration-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .headquarters-store-invite-form,
  .headquarters-store-invite-result {
    grid-template-columns: 1fr;
  }

  .headquarters-store-invite-result .registration-qr-preview {
    width: min(100%, 220px);
    justify-self: center;
  }
}

body.has-registration-qr-dialog {
  overflow: hidden;
}

.registration-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 18, 31, 0.76);
  backdrop-filter: blur(5px);
}

.registration-qr-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(205, 187, 159, 0.9);
  border-radius: 8px;
  color: #172033;
  background: #fbfaf7;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.registration-qr-dialog > header {
  padding-right: 42px;
  text-align: center;
}

.registration-qr-dialog h2,
.registration-qr-dialog p {
  margin: 0;
}

.registration-qr-dialog h2 {
  margin-top: 5px;
  font-size: 24px;
}

.registration-qr-dialog > header > span {
  display: block;
  margin-top: 7px;
  color: #687184;
  font-size: 13px;
  line-height: 1.6;
}

.registration-qr-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #d8dce4;
  border-radius: 50%;
  color: #273147;
  background: #fff;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.registration-qr-dialog-close:hover,
.registration-qr-dialog-close:focus-visible {
  border-color: #b99a5f;
  color: #111827;
  outline: 2px solid rgba(185, 154, 95, 0.25);
  outline-offset: 2px;
}

.registration-qr-dialog-visual {
  width: min(420px, 100%);
  margin: 18px auto 14px;
  padding: 16px;
  border: 1px solid #dfe3ea;
  background: #fff;
}

.registration-qr-dialog-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: pixelated;
}

.registration-qr-dialog-link {
  padding: 10px 12px;
  border: 1px solid #e2e5eb;
  color: #596273;
  background: #f5f6f8;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-align: center;
}

.registration-qr-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.registration-qr-dialog-actions .action-button {
  min-height: 42px;
  text-decoration: none;
}

.registration-general-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr) repeat(3, auto);
  align-items: end;
  gap: 12px;
}

.registration-general-settings label,
.registration-review-form label,
.registration-filter,
.store-admin-edit-form label {
  display: grid;
  gap: 6px;
  color: #3d4658;
  font-size: 13px;
  font-weight: 700;
}

.registration-general-settings input,
.registration-review-form input,
.registration-review-form select,
.registration-filter select,
.store-admin-edit-form input,
.store-admin-edit-form select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #d9dee7;
  border-radius: 6px;
  color: #172033;
  background: #fff;
}

.registration-general-settings .inline-check {
  display: flex;
  min-height: 40px;
  white-space: nowrap;
}

.registration-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.registration-field-panel {
  border: 1px solid #e1e5eb;
  border-radius: 7px;
  overflow: hidden;
}

.registration-field-panel > header {
  padding: 14px;
  background: #f7f8fa;
}

.registration-field-list {
  display: grid;
}

.registration-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 74px;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 14px;
  border-top: 1px solid #edf0f4;
}

.registration-field-row > div span {
  display: block;
  margin-top: 2px;
  color: #8a909b;
  font-size: 11px;
}

.registration-field-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #596273;
  font-size: 12px;
}

.registration-field-row.is-core {
  background: #fbfcfd;
}

.registration-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: #687181;
  font-size: 13px;
}

.registration-application-list {
  display: grid;
  gap: 12px;
}

.registration-application-card {
  padding: 16px;
  border: 1px solid #dfe3ea;
  border-left: 4px solid #d49a34;
  border-radius: 7px;
  background: #fff;
}

.registration-application-card.status-approved {
  border-left-color: #278262;
}

.registration-application-card.status-rejected {
  border-left-color: #a44c49;
}

.registration-application-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.registration-application-card > header span,
.registration-application-time {
  display: block;
  margin-top: 4px;
  color: #78808e;
  font-size: 12px;
}

.registration-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 4px;
  color: #7d5211;
  background: #fff3d5;
  font-size: 12px;
  font-style: normal;
}

.registration-status.approved {
  color: #176244;
  background: #e8f7ef;
}

.registration-status.rejected {
  color: #8b2f26;
  background: #fff0ed;
}

.registration-application-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.registration-application-details div {
  min-width: 0;
}

.registration-application-details dt {
  color: #8a909b;
  font-size: 11px;
}

.registration-application-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: #2d3544;
  font-size: 13px;
}

.phone-verification {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #8b342d;
  background: #fff0ed;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.phone-verification.verified {
  color: #176244;
  background: #e8f7ef;
}

.phone-verification.manual {
  color: #5d4a15;
  background: #fff5d9;
}

.phone-verification.neutral {
  color: #5f6877;
  background: #eef1f4;
}

.registration-business-scope {
  margin: 10px 0;
  padding: 10px;
  color: #555f70;
  background: #f7f8fa;
  font-size: 13px;
  line-height: 1.6;
}

.registration-review-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e8ebef;
}

.registration-review-note,
.registration-warning,
.registration-manual-verification,
.registration-review-actions {
  grid-column: 1 / -1;
}

.registration-warning {
  margin: 0;
  padding: 9px 11px;
  color: #8a4d1d;
  background: #fff6e9;
  font-size: 12px;
}

.registration-phone-warning {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #f0c794;
  color: #7b4319;
  background: #fff6e9;
  font-size: 12px;
  line-height: 1.6;
}

.registration-review-form .registration-manual-verification {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #f0c794;
  color: #714018;
  background: #fff8ed;
  line-height: 1.5;
}

.registration-review-form .registration-manual-verification input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: #8a571c;
}

.registration-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 12px;
  background: #f6f8fa;
}

.registration-record-actions {
  margin-top: 10px;
}

.store-admin-edit-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e2e5eb;
  background: #f8f9fb;
}

.store-admin-edit-actions {
  grid-column: 1 / -1;
}

.store-link-grid {
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .registration-qr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .registration-general-settings,
  .registration-application-details,
  .store-admin-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .registration-page {
    padding: 12px;
  }

  .registration-section {
    padding: 14px;
  }

  .registration-qr-grid,
  .registration-field-grid,
  .registration-general-settings,
  .registration-application-details,
  .registration-review-form,
  .store-admin-edit-form {
    grid-template-columns: 1fr;
  }

  .registration-qr-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .registration-qr-preview {
    width: 112px;
    min-height: 136px;
  }

  .registration-qr-preview > img,
  .registration-qr-unavailable {
    width: 98px;
    height: 98px;
  }

  .registration-qr-actions {
    grid-column: 1 / -1;
  }

  .registration-qr-modal {
    padding: 10px;
  }

  .registration-qr-dialog {
    max-height: calc(100vh - 20px);
    padding: 20px 14px 16px;
  }

  .registration-qr-dialog > header {
    padding: 0 42px;
  }

  .registration-qr-dialog h2 {
    font-size: 21px;
  }

  .registration-qr-dialog-close {
    top: 8px;
    right: 8px;
  }

  .registration-qr-dialog-visual {
    width: min(78vw, 360px);
    padding: 10px;
  }

  .registration-qr-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .registration-qr-dialog-actions .action-button {
    justify-content: center;
  }

  .section-title-row,
  .registration-config-actions,
  .registration-result {
    align-items: stretch;
    flex-direction: column;
  }

  .registration-field-row {
    grid-template-columns: minmax(0, 1fr) 66px 66px;
    padding-inline: 10px;
  }

  .registration-review-note,
  .registration-warning,
  .registration-review-actions,
  .store-admin-edit-actions {
    grid-column: auto;
  }
}

/* Unified management directories: filter, table and detail drawer. */
.management-directory-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.management-directory-toolbar label,
.management-form-grid label,
.management-link-box label,
.management-review-form label:not(.registration-manual-verification) {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #4d5666;
  font-size: 12px;
  font-weight: 700;
}

.management-directory-toolbar input,
.management-directory-toolbar select,
.management-form-grid input,
.management-form-grid select,
.management-form-grid textarea,
.management-link-box input,
.management-review-form input,
.management-review-form select,
.management-review-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.management-directory-toolbar-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.management-directory {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.management-directory > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.management-directory > header > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.management-directory > header strong {
  color: var(--text);
  font-size: 16px;
}

.management-directory > header span {
  color: var(--muted);
  font-size: 12px;
}

.management-directory-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.management-directory-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

.registration-directory .management-directory-table {
  min-width: 1240px;
}

.management-directory-table th,
.management-directory-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf0f4;
  color: #3b4452;
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.management-directory-table th {
  color: #555e6d;
  background: #f7f8fb;
  font-weight: 800;
  white-space: nowrap;
}

.management-directory-table tbody tr:hover {
  background: #fafbff;
}

.management-directory-table td strong,
.management-directory-table td small,
.management-directory-table td span {
  display: block;
}

.management-directory-table td small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.management-table-primary {
  max-width: 230px;
  padding: 0;
  border: 0;
  color: #2f48c8;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.management-table-primary:hover {
  text-decoration: underline;
}

.management-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

.management-table-actions button {
  min-height: 32px;
  border: 1px solid #dce1ea;
  border-radius: 6px;
  padding: 0 10px;
  color: #34415a;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.management-table-actions button:first-child {
  color: #2f48c8;
  border-color: #cfd5ff;
  background: #f4f5ff;
}

.management-status {
  display: inline-flex !important;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.management-status.is-active,
.management-status.status-approved {
  color: #136448;
  background: #e8f7f0;
}

.management-status.is-disabled,
.management-status.status-rejected {
  color: #8a3a3a;
  background: #fff0ef;
}

.management-status.status-pending {
  color: #825817;
  background: #fff5d9;
}

.management-directory-empty td {
  padding: 44px 18px;
  color: var(--muted);
  text-align: center;
}

.management-drawer-backdrop {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(2px);
}

.management-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, calc(100vw - 48px));
  height: 100%;
  border-left: 1px solid #dfe3eb;
  background: #fff;
  box-shadow: -18px 0 48px rgba(20, 28, 45, 0.2);
}

.management-drawer-narrow {
  width: min(620px, calc(100vw - 48px));
}

.management-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfd;
}

.management-drawer > header span,
.management-drawer > header p {
  color: var(--muted);
  font-size: 12px;
}

.management-drawer > header h2 {
  margin: 4px 0 5px;
  color: var(--text);
  font-size: 21px;
}

.management-drawer > header p {
  margin: 0;
}

.management-drawer-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #576071;
  background: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.management-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 32px;
}

.management-drawer-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.management-drawer-metrics > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e7eaf0;
  background: #fafbfc;
}

.management-drawer-metrics span,
.management-summary-list dt,
.management-application-details dt {
  color: var(--muted);
  font-size: 11px;
}

.management-drawer-metrics strong {
  color: var(--text);
  font-size: 20px;
}

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

.management-field-wide,
.management-form-actions {
  grid-column: 1 / -1;
}

.management-form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.management-form-actions,
.registration-record-actions,
.management-review-form .registration-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.management-summary-list,
.management-application-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
}

.management-summary-list > div,
.management-application-details > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e7eaf0;
  background: #fafbfc;
}

.management-summary-list dd,
.management-application-details dd {
  margin: 5px 0 0;
  color: #3e4756;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.management-drawer-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
}

.management-review-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.management-related-box,
.management-link-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #e7eaf0;
  background: #fafbfc;
}

.management-related-box p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.management-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

@media (max-width: 1080px) {
  .management-directory-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .management-directory-toolbar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .management-directory-toolbar-actions {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .management-directory-toolbar-actions .action-button {
    justify-content: center;
  }

  .management-directory > header > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .management-directory-table-wrap {
    overflow: visible;
  }

  .management-directory-table,
  .management-directory-table tbody,
  .registration-directory .management-directory-table {
    display: block;
    min-width: 0;
  }

  .management-directory-table thead {
    display: none;
  }

  .management-directory-table tr {
    display: grid;
    margin: 12px;
    border: 1px solid var(--line);
    background: #fff;
  }

  .management-directory-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f4;
  }

  .management-directory-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }

  .management-directory-table td:last-child {
    border-bottom: 0;
  }

  .management-directory-table .management-directory-empty {
    display: block;
  }

  .management-directory-empty td {
    display: block;
    text-align: center;
  }

  .management-directory-empty td::before {
    display: none;
  }

  .management-table-actions {
    white-space: normal;
  }

  .management-drawer,
  .management-drawer-narrow {
    width: 100%;
  }

  .management-drawer > header,
  .management-drawer-body {
    padding-inline: 16px;
  }

  .management-drawer-metrics,
  .management-form-grid,
  .management-summary-list,
  .management-application-details,
  .management-review-form,
  .management-link-box {
    grid-template-columns: 1fr;
  }

  .management-field-wide,
  .management-form-actions,
  .management-review-form .registration-review-actions,
  .management-review-form .registration-review-note,
  .management-review-form .registration-manual-verification {
    grid-column: auto;
  }

  .management-form-actions,
  .management-review-form .registration-review-actions,
  .registration-record-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .management-form-actions .action-button,
  .management-review-form .action-button,
  .registration-record-actions .action-button,
  .management-link-box .action-button {
    justify-content: center;
    width: 100%;
  }

  .management-drawer-status-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* Business role management */
.role-management-page { display: grid; gap: 20px; }
.role-page-head,
.role-create-band,
.role-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.role-page-head { padding-bottom: 18px; border-bottom: 1px solid var(--line, #e3e7ee); }
.role-page-head h1,
.role-create-band h2,
.role-list-head h2 { margin: 0; }
.role-page-head p,
.role-create-band p,
.role-list-head p { margin: 6px 0 0; color: var(--muted, #667085); }
.role-create-band,
.role-list-section { padding: 20px 0; border-bottom: 1px solid var(--line, #e3e7ee); }
.role-create-form { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(240px, 1.7fr) minmax(150px, 1fr) 82px minmax(96px, auto); align-items: end; gap: 12px; min-width: min(100%, 760px); }
.role-create-form > .action-button { min-width: 96px; white-space: nowrap; }
.role-create-form label,
.business-role-row label { display: grid; gap: 6px; font-size: 13px; color: var(--muted, #667085); }
.role-create-form input,
.role-create-form select,
.business-role-row input { width: 100%; min-height: 42px; border: 1px solid var(--line, #d9dee8); border-radius: 6px; padding: 8px 10px; background: #fff; color: var(--text, #182230); }
.business-role-list { margin-top: 14px; border-top: 1px solid var(--line, #e3e7ee); }
.business-role-row { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(200px, 1.5fr) 90px 84px minmax(128px, auto); align-items: end; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line, #e3e7ee); }
.role-scope-cell { display: grid; gap: 4px; align-self: center; }
.role-scope-cell span { color: var(--muted, #667085); font-size: 12px; }
.role-enabled-field { display: flex !important; align-items: center; min-height: 42px; gap: 8px !important; }
.role-enabled-field input { width: 18px; min-height: 18px; }
.role-row-actions { display: flex; gap: 8px; align-items: center; min-width: 128px; min-height: 42px; }
.role-row-actions .tiny-button { min-width: 56px; white-space: nowrap; }
.role-empty { padding: 24px 0; color: var(--muted, #667085); }
@media (max-width: 1100px) {
  .role-create-band { display: grid; }
  .role-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
  .role-scope-select { grid-column: span 2; }
  .business-role-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-scope-cell { grid-column: span 2; }
}
@media (max-width: 640px) {
  .role-page-head,
  .role-list-head { display: grid; }
  .role-create-form,
  .business-role-row { grid-template-columns: 1fr; }
  .role-scope-select,
  .role-scope-cell { grid-column: auto; }
}
