:root {
  --bm-ink: #17212b;
  --bm-muted: #64748b;
  --bm-line: #dbe4ee;
  --bm-bg: #f4f7fb;
  --bm-panel: #ffffff;
  --bm-primary: #1769e0;
  --bm-teal: #0f8b8d;
  --bm-coral: #f26d5b;
  --bm-gold: #c28b1d;
  --bm-green: #16815f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--bm-ink);
  background: var(--bm-bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  min-width: 0;
  overflow-x: hidden;
}

.baoming-wrap {
  min-height: 100vh;
}

.bm-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(23, 105, 224, .16), transparent 34%),
    linear-gradient(315deg, rgba(15, 139, 141, .18), transparent 38%),
    #f6f9fd;
}

.bm-login-box {
  width: min(420px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(32, 53, 84, .12);
}

.bm-login-title {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: 0;
}

.bm-login-sub {
  margin: 0 0 24px;
  color: var(--bm-muted);
  font-size: 14px;
}

.bm-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.bm-field span {
  font-size: 13px;
  color: #334155;
}

.bm-field input,
.bm-field textarea,
.bm-field select,
.bm-field .bm-input {
  width: 100%;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 40px;
  background: #fff;
  color: var(--bm-ink);
  font: inherit;
}

.bm-field textarea {
  min-height: 84px;
  resize: vertical;
}

.bm-field-multiline-prop textarea {
  min-height: 112px;
  line-height: 1.55;
}

.bm-help-line {
  margin: 8px 0 0;
  color: var(--bm-muted);
  font-size: 13px;
  line-height: 1.6;
}

.bm-rich-description-field {
  min-width: 0;
}

.bm-rich-editor-shell {
  min-width: 0;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.bm-rich-import-panel {
  padding: 10px;
  border-bottom: 1px solid var(--bm-line);
  background: #f8fbff;
}

.bm-rich-import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.bm-rich-import-row input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--bm-ink);
  font: inherit;
}

.bm-rich-import-status {
  min-height: 18px;
  margin-top: 6px;
  color: var(--bm-muted);
  font-size: 12px;
  line-height: 1.5;
}

.bm-rich-editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border-bottom: 1px solid var(--bm-line);
  background: #f8fbff;
}

.bm-rich-editor-status {
  padding: 8px 10px;
  color: var(--bm-muted);
  font-size: 12px;
  line-height: 1.5;
  border-top: 1px solid var(--bm-line);
  background: #fbfdff;
}

.bm-description-source {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 0;
  padding: 12px;
  font: 13px/1.6 Consolas, "Microsoft YaHei", monospace;
}

.bm-rich-editor-shell .edui-default .edui-editor,
.bm-rich-editor-shell .edui-default .edui-editor-iframeholder {
  max-width: 100% !important;
}

.bm-rich-editor-shell .edui-default .edui-editor-toolbarbox {
  white-space: normal;
}

.bm-btn {
  border: 1px solid transparent;
  background: var(--bm-primary);
  color: #fff;
  border-radius: 6px;
  min-height: 38px;
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}

.bm-btn:hover {
  filter: brightness(.96);
}

.bm-btn.ghost {
  color: var(--bm-ink);
  background: #fff;
  border-color: var(--bm-line);
}

.bm-btn.warn {
  background: var(--bm-coral);
}

.bm-btn.teal {
  background: var(--bm-teal);
}

.bm-btn.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.bm-app {
  min-height: 100vh;
  min-width: 0;
  display: grid;
  grid-template-rows: 58px 1fr;
  overflow-x: hidden;
}

.bm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--bm-line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.bm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bm-mark {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--bm-primary), var(--bm-teal));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.bm-brand strong {
  font-size: 17px;
}

.bm-app.is-embedded {
  min-height: auto;
  grid-template-rows: auto 1fr;
}

.bm-app.is-embedded .bm-topbar {
  position: sticky;
  top: 0;
  min-height: 52px;
  box-shadow: none;
}

.bm-app.is-embedded .bm-shell-actions {
  display: none !important;
}

.bm-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.bm-topbar .bm-actions.compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-shrink: 0;
}

.bm-total-admin-link {
  color: #fff;
  background: var(--bm-primary);
  border-color: var(--bm-primary);
  text-decoration: none;
}

.bm-tab {
  border: 0;
  background: transparent;
  color: #475569;
  border-radius: 6px;
  padding: 9px 11px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
}

.bm-tab.active {
  color: var(--bm-primary);
  background: #eaf2ff;
}

.bm-main {
  padding: 16px;
  min-width: 0;
  overflow-x: hidden;
}

.bm-workbench {
  display: grid;
  grid-template-columns: 280px minmax(420px, 1fr) minmax(390px, 430px);
  gap: 14px;
  align-items: start;
}

.bm-panel {
  background: var(--bm-panel);
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  min-width: 0;
  box-shadow: 0 12px 30px rgba(26, 42, 68, .05);
}

.bm-panel-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bm-line);
}

.bm-panel-head h2,
.bm-panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.bm-panel-body {
  padding: 14px;
  min-width: 0;
}

.bm-library {
  max-height: none;
  overflow: visible;
}

.bm-category + .bm-category {
  margin-top: 16px;
}

.bm-category-title {
  font-size: 13px;
  color: #334155;
  font-weight: 700;
  margin: 0 0 8px;
}

.bm-component-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bm-component {
  min-height: 64px;
  border: 1px solid #d9e5f4;
  border-radius: 6px;
  background: #fbfdff;
  padding: 9px;
  cursor: grab;
}

.bm-component b {
  display: block;
  font-size: 13px;
}

.bm-component span {
  display: block;
  margin-top: 4px;
  color: var(--bm-muted);
  font-size: 12px;
  line-height: 1.35;
}

.bm-canvas-wrap {
  min-height: calc(100vh - 92px);
}

.bm-form-stage {
  margin: 0 auto;
  max-width: 760px;
  min-height: 680px;
  padding: 22px;
  background: var(--stage-bg, #f3f7fb);
}

.bm-builder-tabs {
  display: inline-flex;
  gap: 6px;
  margin-top: 8px;
  padding: 3px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  background: #f8fafc;
}

.bm-builder-tabs button {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475569;
  cursor: pointer;
}

.bm-builder-tabs button.active {
  background: var(--bm-primary);
  color: #fff;
  font-weight: 700;
}

.bm-paper {
  background: var(--paper-bg, #fff);
  border-radius: var(--paper-radius, 6px);
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: var(--paper-shadow, 0 18px 48px rgba(15, 23, 42, .10));
  padding: 22px;
}

.bm-form-title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.bm-form-desc {
  margin: 0 0 18px;
  color: var(--bm-muted);
  line-height: 1.7;
}

.bm-form-desc.collapsed {
  max-height: 92px;
  overflow: hidden;
  position: relative;
}

.bm-form-desc.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--paper-bg, #fff));
}

.bm-title-style-panel {
  display: grid;
  gap: 12px;
  margin: -4px 0 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 6px;
  background: #f8fafc;
}

.bm-subtitle {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.bm-title-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 13px;
}

.bm-title-color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bm-title-color input[type="color"] {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  background: #fff;
}

.bm-title-color code {
  color: #64748b;
  font-size: 12px;
}

.bm-icon-toggle,
.bm-segment button {
  height: 34px;
  min-width: 36px;
  border: 1px solid var(--bm-line);
  background: #fff;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
}

.bm-icon-toggle {
  font-weight: 800;
}

.bm-icon-toggle.active,
.bm-segment button.active {
  border-color: var(--bm-primary);
  background: var(--bm-primary);
  color: #fff;
}

.bm-segment {
  display: inline-flex;
  gap: 6px;
}

.bm-switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
  font-size: 13px;
}

.bm-switch-line input {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--bm-line);
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background .18s ease;
}

.bm-switch-line input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
  transition: transform .18s ease;
}

.bm-switch-line input:checked {
  background: var(--bm-primary);
}

.bm-switch-line input:checked::after {
  transform: translateX(18px);
}

.bm-rich-content {
  color: inherit;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.bm-rich-content,
.bm-rich-content * {
  max-width: 100%;
  box-sizing: border-box;
}

.bm-rich-content p {
  margin: 0 0 10px;
}

.bm-rich-content img,
.bm-rich-content video,
.bm-rich-content audio,
.bm-rich-content iframe {
  max-width: 100% !important;
}

.bm-rich-content img,
.bm-rich-content video {
  height: auto !important;
}

.bm-rich-content table {
  width: 100% !important;
  max-width: 100%;
  border-collapse: collapse;
}

.bm-end-page-guide {
  display: grid;
  gap: 10px;
}

.bm-end-type-card {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  background: #fff;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.bm-end-type-card b,
.bm-end-type-card span {
  display: block;
}

.bm-end-type-card span {
  margin-top: 4px;
  color: var(--bm-muted);
  font-size: 12px;
  line-height: 1.5;
}

.bm-end-type-card.active {
  border-color: var(--bm-primary);
  box-shadow: 0 0 0 2px rgba(23, 105, 224, .12);
}

.bm-end-preview {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 520px;
  align-content: center;
  text-align: center;
}

.bm-end-preview h1 {
  margin: 0;
  color: #17212b;
  font-size: 30px;
  line-height: 1.3;
}

.bm-end-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(23, 105, 224, .12);
  color: var(--bm-primary);
  font-size: 30px;
  font-weight: 800;
}

.bm-end-content {
  max-width: 560px;
  color: #475569;
  text-align: left;
}

.bm-end-muted {
  color: var(--bm-muted);
}

.bm-submitted-preview {
  width: min(520px, 100%);
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 6px;
  background: #f8fafc;
}

.bm-submitted-preview div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  font-size: 13px;
}

.bm-submitted-preview b {
  color: #17212b;
}

.bm-end-page-panel {
  display: grid;
  gap: 12px;
}

.bm-ad-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, .22);
}

.bm-ad-media-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.bm-ad-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: #0f172a;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, .22);
}

.bm-preview-field {
  position: relative;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
  cursor: grab;
}

.bm-preview-field.active {
  border-color: var(--bm-primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .12);
}

.bm-preview-field:hover {
  border-color: #bad0ee;
}

.bm-preview-field.drag-over {
  border-color: var(--bm-teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, .13);
}

.bm-drag-handle {
  position: absolute;
  right: 10px;
  top: 8px;
  color: #64748b;
  border: 1px solid var(--bm-line);
  background: #f8fafc;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 12px;
}

.bm-preview-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
}

.bm-preview-label em {
  color: var(--bm-coral);
  font-style: normal;
}

.bm-preview-control {
  min-height: 40px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  padding: 10px;
  color: #64748b;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.bm-field-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.bm-side-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--bm-line);
}

.bm-side-tabs button {
  border: 1px solid var(--bm-line);
  background: #fff;
  border-radius: 6px;
  min-height: 34px;
  cursor: pointer;
}

.bm-side-tabs button.active {
  color: #fff;
  background: var(--bm-primary);
  border-color: var(--bm-primary);
}

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

.bm-dashboard,
.bm-template-page {
  display: grid;
  gap: 14px;
}

.bm-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(26, 42, 68, .05);
}

.bm-dashboard-head h2 {
  margin: 0;
  font-size: 22px;
}

.bm-dashboard-head p {
  margin: 6px 0 0;
  color: var(--bm-muted);
  line-height: 1.6;
}

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

.bm-form-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(26, 42, 68, .04);
}

.bm-form-cover {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #edf4fc;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--bm-primary);
  font-weight: 700;
}

.bm-form-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.bm-form-info {
  min-width: 0;
}

.bm-form-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bm-form-title-line h3 {
  margin: 0;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-form-info p {
  margin: 7px 0 0;
  color: var(--bm-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-form-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
}

.bm-form-meta span,
.bm-status {
  border: 1px solid #dbe8f5;
  background: #f8fbff;
  border-radius: 99px;
  padding: 3px 8px;
}

.bm-status {
  color: var(--bm-primary);
  font-size: 12px;
  white-space: nowrap;
}

.bm-form-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.bm-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
}

.bm-row strong {
  display: block;
}

.bm-row small {
  display: block;
  color: var(--bm-muted);
  margin-top: 5px;
}

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

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

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

.bm-time-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.bm-time-grid input[type="datetime-local"],
.bm-settings-panel input[type="datetime-local"] {
  min-width: 0;
}

.bm-media-editor {
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  background: #f8fbff;
}

.bm-payment-editor {
  border: 1px solid #cfe0f4;
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0 14px;
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.bm-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 700;
}

.bm-upload-line {
  margin-bottom: 10px;
}

.bm-media-list {
  display: grid;
  gap: 8px;
}

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

.bm-media-item select,
.bm-media-item input {
  min-width: 0;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  min-height: 36px;
  padding: 8px 9px;
  background: #fff;
  font: inherit;
}

.bm-home-media-editor .bm-media-head {
  align-items: flex-start;
}

.bm-home-media-editor .bm-help-line {
  margin: 4px 0 0;
}

.bm-home-media-item {
  display: grid;
  grid-template-columns: 82px minmax(220px, 1.4fr) minmax(120px, .7fr) auto;
  gap: 8px;
  align-items: center;
}

.bm-home-media-item select,
.bm-home-media-item input {
  min-width: 0;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  min-height: 36px;
  padding: 8px 9px;
  background: #fff;
  font: inherit;
}

.bm-home-media-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.bm-home-media-strip > em {
  color: #667085;
  font-size: 13px;
}

.bm-home-media-preview-card {
  overflow: hidden;
  border: 1px solid #d9e4f0;
  border-radius: 8px;
  background: #fff;
}

.bm-home-media-preview-card img,
.bm-home-media-preview-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0f172a;
}

.bm-home-media-preview-card span {
  display: block;
  padding: 7px 9px;
  color: #667085;
  font-size: 12px;
}

.bm-empty.compact {
  padding: 14px;
  font-size: 13px;
}

.bm-submit-preview {
  display: flex;
  padding: 20px 0 2px;
}

.bm-submit-preview.align-left {
  justify-content: flex-start;
}

.bm-submit-preview.align-center {
  justify-content: center;
}

.bm-submit-preview.align-right {
  justify-content: flex-end;
}

.bm-submit-preview button {
  min-width: 168px;
  min-height: 44px;
  padding: 0 24px;
  font: inherit;
  font-weight: 700;
  cursor: default;
}

.bm-map-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.bm-qr-panel {
  width: min(420px, calc(100vw - 28px));
}

.bm-qr-body {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 18px;
}

.bm-qr-svg {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
}

.bm-qr-svg svg {
  width: 190px;
  height: 190px;
}

.bm-qr-svg img {
  width: 190px;
  height: 190px;
  display: block;
}

.bm-qr-link {
  width: 100%;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  min-height: 40px;
  padding: 8px 10px;
  font: inherit;
  background: #f8fafc;
}

.bm-empty-hero {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.bm-empty-hero h3,
.bm-empty-hero p {
  margin: 0;
}

.bm-template-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
}

.bm-template-toolbar .bm-field {
  max-width: none;
}

.bm-template-directory {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.bm-template-directory button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #dbe8f5;
  border-radius: 8px;
  background: #fff;
  color: #25364d;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bm-template-directory button.active {
  border-color: var(--bm-primary);
  background: #eef5ff;
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .10);
}

.bm-template-directory strong,
.bm-template-directory span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-template-directory strong {
  font-size: 13px;
}

.bm-template-directory span {
  color: var(--bm-primary);
  font-size: 12px;
  font-weight: 800;
}

.bm-template-summary {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 86px;
  color: var(--bm-muted);
}

.bm-template-summary strong {
  font-size: 24px;
  color: var(--bm-primary);
}

.bm-template-summary span {
  font-size: 12px;
}

.bm-template-harvest {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(260px, 1.6fr) minmax(150px, .7fr) auto minmax(90px, .4fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
}

.bm-template-harvest-title {
  display: grid;
  gap: 4px;
  align-self: center;
}

.bm-template-harvest-title strong {
  font-size: 16px;
}

.bm-template-harvest-title p {
  margin: 0;
  color: var(--bm-muted);
  line-height: 1.55;
}

.bm-harvest-url input {
  min-width: 0;
}

.bm-harvest-limit input {
  min-width: 74px;
}

.bm-template-harvest-status,
.bm-template-harvest-results {
  grid-column: 1 / -1;
}

.bm-template-harvest-status {
  color: var(--bm-primary);
  font-weight: 700;
}

.bm-template-harvest-results {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bm-template-harvest-results span {
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid #dbe8f5;
  border-radius: 999px;
  background: #f8fbff;
  color: #43556f;
  font-size: 12px;
  overflow-wrap: anywhere;
}

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

.bm-template-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 250px);
  min-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.bm-template-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 7px;
  text-align: left;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  min-height: 156px;
}

.bm-template-card.active {
  border-color: var(--bm-primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .12);
}

.bm-template-card-copy {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.bm-template-card span,
.bm-template-title span {
  color: var(--bm-teal);
  font-size: 12px;
  font-weight: 700;
}

.bm-template-card strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.bm-template-card small,
.bm-template-title p {
  color: var(--bm-muted);
  line-height: 1.6;
}

.bm-template-card small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bm-template-card-meta,
.bm-template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bm-template-card-meta b,
.bm-template-card-meta em,
.bm-template-tags span {
  border: 1px solid #dbe8f5;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8fbff;
  color: #43556f;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
}

.bm-template-card-meta b {
  color: var(--bm-primary);
}

.bm-template-preview {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(26, 42, 68, .05);
}

.bm-template-cover {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
}

.bm-template-thumb {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 8px;
  background: var(--tpl-bg);
  color: var(--tpl-title);
}

.bm-template-thumb.small {
  width: 118px;
  height: 136px;
}

.bm-template-thumb.large {
  min-height: 330px;
}

.bm-template-thumb-band {
  display: grid;
  gap: 3px;
  padding: 10px;
  color: #fff;
  background: var(--tpl-primary);
}

.bm-template-thumb-band span,
.bm-template-thumb-band b {
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-template-thumb-band span {
  font-size: 11px;
  opacity: .9;
}

.bm-template-thumb-band b {
  font-size: 13px;
}

.bm-template-thumb-paper {
  display: grid;
  align-content: start;
  gap: 7px;
  margin: 9px;
  padding: 10px;
  border-radius: var(--tpl-radius);
  background: var(--tpl-paper);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
}

.bm-template-thumb.small .bm-template-thumb-paper {
  gap: 5px;
  margin: 7px;
  padding: 8px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}

.bm-template-thumb-paper strong {
  color: var(--tpl-title);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.bm-template-thumb.small .bm-template-thumb-paper strong {
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bm-template-thumb-paper p {
  margin: 0;
  color: #66758c;
  font-size: 12px;
  line-height: 1.45;
}

.bm-template-thumb.small .bm-template-thumb-paper p {
  display: none;
}

.bm-template-thumb-lines {
  display: grid;
  gap: 5px;
}

.bm-template-thumb-lines i {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 20px;
  font-style: normal;
}

.bm-template-thumb-lines span {
  color: var(--tpl-primary);
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-template-thumb-lines em {
  height: 8px;
  border-radius: 999px;
  background: #e7edf5;
  color: transparent;
  overflow: hidden;
}

.bm-template-thumb-paper small {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 6px 12px;
  border-radius: var(--tpl-button-radius);
  background: var(--tpl-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.bm-template-thumb.small .bm-template-thumb-paper small {
  display: none;
}

.bm-template-title h3 {
  margin: 5px 0 0;
  font-size: 22px;
}

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

.bm-template-fields div {
  border: 1px solid #dbe8f5;
  border-radius: 6px;
  padding: 10px;
  background: #f8fbff;
}

.bm-template-fields span,
.bm-template-fields strong {
  display: block;
}

.bm-template-fields span {
  color: var(--bm-muted);
  font-size: 12px;
}

.bm-template-fields strong {
  margin-top: 4px;
  font-size: 13px;
}

.bm-template-source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe8f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #43556f;
}

.bm-template-source-note strong {
  color: var(--bm-primary);
}

.bm-template-source-note span {
  overflow-wrap: anywhere;
}

.bm-source-snapshot {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 8px;
  background: var(--src-bg);
  color: #243143;
}

.bm-source-snapshot.small {
  width: 118px;
  height: 136px;
}

.bm-source-snapshot.large {
  min-height: 420px;
}

.bm-source-snapshot span,
.bm-source-snapshot label,
.bm-source-snapshot h4,
.bm-source-snapshot p,
.bm-source-snapshot small,
.bm-source-snapshot i {
  color: inherit;
}

.bm-source-page {
  min-height: 100%;
  display: grid;
  place-items: start center;
  padding: 18px;
  background-color: var(--src-bg);
  background-image:
    var(--src-bg-image),
    linear-gradient(135deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0));
  background-size: cover, auto;
  background-position: center;
}

.bm-source-snapshot.small .bm-source-page {
  padding: 6px;
}

.bm-source-paper {
  width: min(100%, var(--src-max-width, 700px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: var(--src-radius, 8px);
  background: var(--src-paper);
  box-shadow: var(--src-shadow);
}

.bm-source-snapshot.small .bm-source-paper {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}

.bm-source-snapshot.large .bm-source-paper {
  min-height: 380px;
}

.bm-source-header-image {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: cover;
}

.bm-source-snapshot.small .bm-source-header-image {
  height: 34px;
  max-height: 34px;
}

.bm-source-content {
  display: grid;
  gap: 14px;
  padding: var(--src-padding, 30px);
}

.bm-source-snapshot.small .bm-source-content {
  gap: 5px;
  padding: 7px;
}

.bm-source-content h4 {
  margin: 0;
  color: var(--src-title);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.bm-source-snapshot.small .bm-source-content h4 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bm-source-desc {
  color: #5e6f86;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.bm-source-desc p {
  margin: 0 0 8px;
}

.bm-source-fields {
  display: grid;
  gap: 12px;
}

.bm-source-snapshot.small .bm-source-fields {
  gap: 5px;
}

.bm-source-field {
  display: grid;
  gap: 6px;
}

.bm-source-field label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bm-source-field label em {
  margin-left: 2px;
  color: #ef4444;
  font-style: normal;
}

.bm-source-field small {
  color: #7a8799;
  font-size: 12px;
}

.bm-source-field.compact {
  gap: 3px;
}

.bm-source-field.compact label {
  overflow: hidden;
  color: #55657a;
  font-size: 9px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-source-input,
.bm-source-select,
.bm-source-upload {
  display: block;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 6px;
  background: #fff;
  color: #7b8794;
  font-size: 13px;
  line-height: 1.35;
}

.bm-source-field.compact .bm-source-input {
  min-height: 7px;
  padding: 0;
  border-radius: 999px;
  background: #e8edf4;
  color: transparent;
}

.bm-source-input.textarea {
  min-height: 72px;
}

.bm-source-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bm-source-options i {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 999px;
  background: #fff;
  color: #45566c;
  font-style: normal;
  font-size: 12px;
}

.bm-source-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 38px;
  padding: 0 18px;
  border-radius: var(--src-button-radius, 8px);
  background: var(--src-button-bg);
  color: var(--src-button-color) !important;
  font-size: 14px;
  font-weight: 800;
}

.bm-source-snapshot.small .bm-source-submit {
  min-height: 14px;
  max-width: 70px;
  padding: 0 8px;
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-source-host {
  color: #7b8794 !important;
  font-size: 12px;
}

.bm-source-empty {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  color: #64748b;
  text-align: center;
}

.bm-stat-card {
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.bm-stat-card span {
  display: block;
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-stat-card b {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.bm-mini-stat {
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.bm-mini-stat h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--bm-text);
}

.bm-mini-stat div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid #eef2f7;
}

.bm-mini-stat span {
  color: var(--bm-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.bm-mini-stat b {
  color: var(--bm-text);
  white-space: nowrap;
}

.bm-data-page {
  position: relative;
}

.bm-data-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bm-data-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bm-icon-btn {
  position: relative;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  background: #fff;
  color: #24364f;
  font: inherit;
  cursor: pointer;
}

.bm-icon-btn.active {
  border-color: rgba(23, 105, 224, .45);
  background: #eef5ff;
  color: var(--bm-primary);
}

.bm-icon-btn b {
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--bm-primary);
  color: #fff;
  font-size: 11px;
}

.bm-data-search,
.bm-data-sort {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  background: #fff;
}

.bm-data-search span,
.bm-data-sort span {
  color: var(--bm-muted);
  font-size: 12px;
  padding-left: 6px;
}

.bm-data-search input,
.bm-data-sort select {
  min-height: 26px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.bm-data-search input {
  width: min(320px, 40vw);
}

.bm-data-search button {
  min-height: 26px;
  border: 0;
  border-radius: 5px;
  padding: 0 9px;
  color: #fff;
  background: var(--bm-primary);
  cursor: pointer;
}

.bm-data-add {
  position: relative;
}

.bm-data-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 12;
  width: 138px;
  padding: 6px;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(24, 39, 70, .15);
}

.bm-data-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.bm-data-menu button:hover {
  background: #f3f6fb;
}

.bm-data-popover {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(26, 42, 68, .07);
}

.bm-filter-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bm-line);
  margin-bottom: 10px;
}

.bm-quick-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
}

.bm-quick-filter span {
  min-width: 70px;
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-quick-filter button {
  min-height: 28px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
  cursor: pointer;
}

.bm-quick-filter button.active {
  border-color: rgba(23, 105, 224, .45);
  background: #eef5ff;
  color: var(--bm-primary);
}

.bm-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.bm-field-filter-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, .7fr) minmax(200px, 1.5fr);
}

.bm-data-column-panel {
  max-width: 680px;
}

.bm-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.bm-column-grid label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #24364f;
}

.bm-column-extra {
  margin-top: 10px;
  border-top: 1px solid var(--bm-line);
  padding-top: 10px;
}

.bm-column-extra summary {
  cursor: pointer;
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-data-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 10px;
}

.bm-data-chips span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf4ff;
  color: #1e4f9e;
  font-size: 12px;
}

.bm-data-chips button {
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  background: #f3f6fb;
  color: #4c5f78;
  padding: 0 9px;
  cursor: pointer;
}

.bm-data-review-actions {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.bm-data-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
}

.bm-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  overflow: hidden;
}

.bm-table th,
.bm-table td {
  text-align: left;
  border-bottom: 1px solid var(--bm-line);
  padding: 10px;
  font-size: 13px;
  vertical-align: top;
}

.bm-table th {
  color: #334155;
  background: #f8fafc;
}

.bm-data-table {
  min-width: 980px;
  border: 0;
}

.bm-data-table th,
.bm-data-table td {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.bm-data-table th.sortable:hover {
  color: var(--bm-primary);
}

.bm-data-check {
  width: 42px;
  text-align: center !important;
}

.bm-data-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.bm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 38, .42);
}

.bm-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--bm-line);
  background: #fff;
  box-shadow: 0 24px 60px rgba(10, 24, 48, .25);
  padding: 16px;
}

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

.bm-modal-card h3 {
  margin: 0;
  font-size: 18px;
}

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

.bm-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bm-check-list label {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
}

.bm-import-card {
  width: min(860px, 100%);
}

.bm-import-template {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.bm-import-template code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f3554;
}

.bm-muted {
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-chart {
  min-height: 280px;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.bm-bars {
  display: grid;
  gap: 9px;
}

.bm-bar {
  display: grid;
  grid-template-columns: 96px 1fr 44px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.bm-bar-track {
  height: 9px;
  border-radius: 99px;
  background: #e7eef7;
  overflow: hidden;
}

.bm-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bm-primary), var(--bm-teal));
}

.bm-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #17212b;
  color: #fff;
  padding: 12px 14px;
  border-radius: 6px;
  box-shadow: 0 16px 50px rgba(0,0,0,.18);
  z-index: 100;
}

.bm-empty {
  border: 1px dashed #b7c5d6;
  border-radius: 8px;
  padding: 26px;
  text-align: center;
  color: var(--bm-muted);
}

.bm-editor-box {
  border: 1px solid #cddbeb;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.bm-editor-box h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.bm-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.bm-admin-list,
.bm-admin-detail {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.bm-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.bm-account-row.active {
  border-color: var(--bm-primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .10);
}

.bm-account-row strong,
.bm-admin-title h3 {
  display: block;
  margin: 0;
  word-break: break-word;
}

.bm-account-row small,
.bm-admin-title p {
  display: block;
  color: var(--bm-muted);
  margin: 5px 0 0;
  line-height: 1.5;
}

.bm-admin-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

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

.bm-admin-summary .bm-stat-card b {
  font-size: 16px;
  line-height: 1.45;
  word-break: break-word;
}

.bm-setting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bm-setting-grid div {
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
}

.bm-setting-grid span,
.bm-section-title span {
  display: block;
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-setting-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.bm-section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-top: 4px;
}

.bm-section-title h3 {
  margin: 0;
  font-size: 16px;
}

.bm-style-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}

.bm-style-modal.open {
  display: block;
}

.bm-style-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
}

.bm-style-panel {
  position: relative;
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  margin: 18px auto;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(203, 213, 225, .9);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.bm-style-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bm-line);
}

.bm-style-head strong {
  font-size: 18px;
}

.bm-style-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bm-line);
  background: #f8fbff;
}

.bm-style-toolbar input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.bm-style-scopes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bm-style-scopes button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--bm-line);
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.bm-style-scopes button.active {
  color: #fff;
  background: var(--bm-primary);
  border-color: var(--bm-primary);
}

.bm-style-status {
  min-height: 36px;
  padding: 9px 16px;
  color: var(--bm-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--bm-line);
}

.bm-style-grid {
  min-height: 0;
  padding: 16px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bm-style-card {
  display: grid;
  grid-template-rows: minmax(150px, 1fr) auto auto;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.bm-style-preview {
  min-height: 150px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid rgba(219, 228, 238, .72);
}

.bm-style-preview,
.bm-style-preview * {
  max-width: 100%;
  box-sizing: border-box;
}

.bm-style-preview img,
.bm-style-preview video {
  max-width: 100% !important;
  height: auto !important;
}

.bm-style-meta {
  display: grid;
  gap: 4px;
}

.bm-style-meta strong {
  font-size: 14px;
  line-height: 1.45;
}

.bm-style-meta span {
  color: var(--bm-muted);
  font-size: 12px;
}

.bm-style-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--bm-line);
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-style-pager > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.bm-picker-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1001;
}

.bm-picker-modal.open {
  display: block;
}

.bm-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
}

.bm-picker-panel {
  position: relative;
  width: min(1100px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  margin: 18px auto;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  background: #fff;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.bm-emoticon-modal .bm-picker-panel {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.bm-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bm-line);
}

.bm-picker-head strong {
  font-size: 18px;
}

.bm-picker-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bm-picker-toolbar,
.bm-picker-upload {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bm-line);
  background: #f8fbff;
}

.bm-picker-upload {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px) auto;
}

.bm-picker-toolbar input,
.bm-picker-upload input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.bm-picker-scopes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bm-picker-scopes button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.bm-picker-scopes button.active {
  color: #fff;
  background: var(--bm-primary);
  border-color: var(--bm-primary);
}

.bm-picker-status {
  min-height: 36px;
  padding: 9px 16px;
  color: var(--bm-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--bm-line);
}

.bm-picker-grid {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.bm-picker-grid.material {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bm-picker-grid.emoticon {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bm-picker-item,
.bm-emoticon-item {
  min-width: 0;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
}

.bm-picker-item {
  display: grid;
  grid-template-rows: 118px auto auto;
  gap: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--bm-ink);
  text-align: left;
  font: inherit;
}

.bm-picker-item img {
  width: 100%;
  height: 118px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 6px;
}

.bm-picker-item span,
.bm-emoticon-insert span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.bm-picker-item small {
  color: var(--bm-muted);
  font-size: 12px;
}

.bm-emoticon-item {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.bm-emoticon-insert {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--bm-ink);
  font: inherit;
}

.bm-emoticon-insert img {
  width: 100%;
  height: 76px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: 6px;
}

.bm-emoticon-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--bm-muted);
  font-size: 12px;
}

.bm-emoticon-item > div button {
  border: 0;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
  font: inherit;
}

.bm-style-pager .active {
  color: #fff;
  background: var(--bm-primary);
  border-color: var(--bm-primary);
}

.bm-upload-line input[type="file"] {
  padding: 8px;
  min-height: 40px;
}

@media (max-width: 1180px) {
  .bm-workbench {
    grid-template-columns: 240px minmax(360px, 1fr);
  }
  .bm-template-layout {
    grid-template-columns: 1fr;
  }
  .bm-template-harvest {
    grid-template-columns: 1fr 1fr;
  }
  .bm-template-harvest-title,
  .bm-harvest-url,
  .bm-template-harvest-results,
  .bm-template-harvest-status {
    grid-column: 1 / -1;
  }
  .bm-template-list {
    max-height: none;
  }
  .bm-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bm-settings-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body {
    background: #eef3f8;
  }
  .baoming-wrap,
  .bm-app {
    width: 100%;
    min-width: 0;
  }
  .bm-login {
    padding: 14px;
    align-items: start;
  }
  .bm-login-box {
    padding: 22px 18px;
  }
  .bm-login-title {
    font-size: 22px;
    line-height: 1.25;
  }
  .bm-app {
    grid-template-rows: auto 1fr;
  }
  .bm-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: auto;
    gap: 8px;
    padding: 8px 10px 9px;
  }
  .bm-brand {
    gap: 8px;
  }
  .bm-mark {
    width: 30px;
    height: 30px;
  }
  .bm-brand strong {
    display: block;
    max-width: calc(100vw - 122px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }
  .bm-tabs {
    grid-column: 1 / -1;
    width: 100%;
    gap: 6px;
    margin: 0 -10px;
    padding: 4px 10px 0;
    scrollbar-width: none;
  }
  .bm-tabs::-webkit-scrollbar {
    display: none;
  }
  .bm-tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
    background: #f8fafc;
  }
  .bm-topbar .bm-actions.compact {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 6px;
  }
  .bm-topbar .bm-actions.compact .bm-btn {
    min-height: 34px;
    padding: 0 11px;
  }
  .bm-main {
    padding: 10px 8px 16px;
  }
  .bm-workbench,
  .bm-grid-2,
  .bm-grid-3,
  .bm-admin-layout,
  .bm-admin-summary,
  .bm-setting-grid,
  .bm-template-toolbar,
  .bm-template-harvest,
  .bm-template-fields {
    grid-template-columns: 1fr;
  }
  .bm-workbench {
    gap: 10px;
  }
  .bm-panel {
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(26, 42, 68, .045);
  }
  .bm-panel-head {
    min-height: 44px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .bm-panel-head h2,
  .bm-panel-head h3 {
    font-size: 15px;
    line-height: 1.35;
  }
  .bm-panel-body {
    padding: 12px;
  }
  .bm-library {
    order: 1;
    max-height: 52vh;
    overflow: hidden;
  }
  .bm-canvas-wrap {
    order: 2;
    min-height: 0;
  }
  .bm-settings-panel {
    order: 3;
    position: sticky;
    bottom: 8px;
    z-index: 8;
    max-height: 74vh;
    overflow: hidden;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, .12);
  }
  .bm-settings-panel .bm-panel-body {
    max-height: calc(74vh - 55px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bm-side-tabs {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    background: #fff;
    padding: 8px;
    scrollbar-width: none;
  }
  .bm-side-tabs::-webkit-scrollbar {
    display: none;
  }
  .bm-side-tabs button {
    flex: 0 0 76px;
    min-height: 36px;
  }
  .bm-library .bm-panel-body {
    display: flex;
    gap: 12px;
    max-height: calc(52vh - 45px);
    overflow: auto;
    padding: 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .bm-category {
    flex: 0 0 min(254px, 82vw);
    scroll-snap-align: start;
  }
  .bm-category + .bm-category {
    margin-top: 0;
  }
  .bm-category-title {
    position: sticky;
    left: 0;
    margin-bottom: 7px;
  }
  .bm-component-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .bm-component {
    min-height: 58px;
    padding: 8px;
  }
  .bm-component b {
    font-size: 13px;
  }
  .bm-component span {
    font-size: 11px;
    line-height: 1.3;
  }
  .bm-form-stage {
    width: 100%;
    min-height: 0;
    padding: 10px;
    border-radius: 0 0 8px 8px;
  }
  .bm-paper {
    padding: 14px;
  }
  .bm-form-title {
    font-size: 22px;
  }
  .bm-preview-field {
    padding: 10px;
  }
  .bm-preview-label {
    display: grid;
    gap: 4px;
    padding-right: 70px;
  }
  .bm-drag-handle {
    right: 8px;
    top: 8px;
  }
  .bm-field-actions {
    justify-content: stretch;
  }
  .bm-field-actions .bm-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 8px;
  }
  .bm-title-control-row,
  .bm-switch-line,
  .bm-media-head {
    align-items: flex-start;
    display: grid;
  }
  .bm-rich-editor-shell .edui-default .edui-editor-iframeholder {
    min-height: 220px !important;
  }
  .bm-template-harvest-title,
  .bm-harvest-url,
  .bm-template-harvest-results,
  .bm-template-harvest-status {
    grid-column: auto;
  }
  .bm-template-summary {
    justify-items: start;
  }
  .bm-template-toolbar,
  .bm-template-harvest {
    padding: 12px;
  }
  .bm-template-directory {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    grid-template-columns: none;
  }
  .bm-template-directory button {
    flex: 0 0 136px;
  }
  .bm-template-layout {
    grid-template-columns: 1fr;
  }
  .bm-template-list {
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }
  .bm-template-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 136px;
  }
  .bm-template-thumb.small {
    width: 96px;
    height: 126px;
  }
  .bm-source-snapshot.small {
    width: 96px;
    height: 126px;
  }
  .bm-template-thumb.large {
    min-height: 290px;
  }
  .bm-dashboard-head,
  .bm-form-card,
  .bm-media-item {
    grid-template-columns: 1fr;
  }
  .bm-dashboard-head {
    display: grid;
  }
  .bm-form-cover {
    width: 100%;
  }
  .bm-form-card-actions {
    justify-content: flex-start;
  }
  .bm-form-card-actions .bm-btn,
  .bm-actions .bm-btn,
  .bm-dashboard-head .bm-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
  .bm-form-title-line {
    align-items: flex-start;
    display: grid;
    gap: 6px;
  }
  .bm-form-title-line h3,
  .bm-form-info p {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .bm-form-meta {
    gap: 6px;
  }
  .bm-row {
    grid-template-columns: 1fr;
  }
  .bm-actions {
    justify-content: flex-start;
  }
  .bm-btn {
    min-height: 40px;
  }
  .bm-btn.small {
    min-height: 34px;
  }
  .bm-field input,
  .bm-field textarea,
  .bm-field select,
  .bm-field .bm-input {
    min-height: 42px;
    font-size: 15px;
  }
  .bm-grid-2,
  .bm-grid-3 {
    gap: 10px;
  }
  .bm-media-item {
    align-items: stretch;
  }
  .bm-submit-preview button {
    width: 100%;
    min-width: 0;
  }
  .bm-data-toolbar,
  .bm-data-tools,
  .bm-data-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .bm-data-search,
  .bm-data-sort {
    width: 100%;
  }
  .bm-data-search input {
    width: 100%;
  }
  .bm-data-table-wrap,
  .bm-table-wrap,
  .bm-report-table-wrap {
    max-width: calc(100vw - 16px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bm-data-table {
    min-width: 840px;
  }
  .bm-filter-grid,
  .bm-field-filter-row,
  .bm-submission-form-grid,
  .bm-import-template {
    grid-template-columns: 1fr;
  }
  .bm-modal {
    padding: 10px;
    align-items: start;
  }
  .bm-modal-card {
    max-height: calc(100vh - 20px);
  }
  .bm-import-template code {
    white-space: normal;
  }
  .bm-account-row,
  .bm-admin-title {
    grid-template-columns: 1fr;
    display: grid;
  }
  .bm-section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .bm-style-panel {
    width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }
  .bm-style-toolbar {
    grid-template-columns: 1fr;
  }
  .bm-rich-import-row {
    grid-template-columns: 1fr;
  }
  .bm-style-scopes {
    flex-wrap: wrap;
  }
  .bm-style-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .bm-style-pager {
    align-items: flex-start;
    display: grid;
  }
  .bm-rich-editor-actions {
    align-items: stretch;
  }
  .bm-rich-editor-actions .bm-btn {
    flex: 1 1 120px;
  }
  .bm-picker-panel {
    width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }
  .bm-picker-toolbar,
  .bm-picker-upload {
    grid-template-columns: 1fr;
  }
  .bm-picker-scopes {
    flex-wrap: wrap;
  }
  .bm-picker-grid.material,
  .bm-picker-grid.emoticon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }
  .bm-rich-content table {
    display: block;
    overflow-x: auto;
  }
  .bm-rich-content td,
  .bm-rich-content th {
    word-break: break-word;
  }
}

@media (max-width: 430px) {
  .bm-main {
    padding-left: 6px;
    padding-right: 6px;
  }
  .bm-panel-body {
    padding: 10px;
  }
  .bm-library .bm-panel-body {
    padding: 10px;
  }
  .bm-category {
    flex-basis: min(238px, 86vw);
  }
  .bm-component-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bm-form-stage {
    padding: 8px;
  }
  .bm-paper {
    padding: 12px;
  }
  .bm-preview-label {
    padding-right: 0;
  }
  .bm-drag-handle {
    position: static;
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
  }
  .bm-field-actions,
  .bm-form-card-actions,
  .bm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bm-field-actions .bm-btn,
  .bm-form-card-actions .bm-btn,
  .bm-actions .bm-btn {
    width: 100%;
  }
  .bm-dashboard-head .bm-btn {
    width: 100%;
  }
  .bm-template-card {
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 9px;
  }
  .bm-template-thumb.small,
  .bm-source-snapshot.small {
    width: 86px;
    height: 116px;
  }
  .bm-template-card strong {
    font-size: 15px;
  }
  .bm-template-fields {
    grid-template-columns: 1fr;
  }
  .bm-settings-panel {
    bottom: 6px;
    max-height: 78vh;
  }
  .bm-settings-panel .bm-panel-body {
    max-height: calc(78vh - 55px);
  }
}

.bm-subpanel {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0;
  background: #fbfdff;
}
.bm-subpanel-head,
.bm-home-upload-preview,
.bm-lottery-prize-head,
.bm-lottery-prize-row,
.bm-option-head,
.bm-option-row,
.bm-product-head,
.bm-product-row {
  display: grid;
  gap: 10px;
  align-items: center;
}
.bm-subpanel-head {
  grid-template-columns: 1fr auto;
  margin-bottom: 8px;
}
.bm-home-upload-preview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 10px 0 14px;
}
.bm-home-upload-preview > div,
.bm-upload-preview {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.bm-home-upload-preview span {
  display: block;
  color: #667085;
  font-size: 12px;
  margin-bottom: 8px;
}
.bm-home-upload-preview img,
.bm-upload-preview img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 6px;
  object-fit: contain;
}
.bm-home-capability-ad-preview {
  display: grid;
  place-items: center;
  min-height: 118px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fff;
}
.bm-home-capability-ad-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}
.bm-home-capability-ad-preview em {
  color: #94a3b8;
  font-style: normal;
}
.bm-home-config-editor {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0;
  background: #fbfdff;
}
.bm-home-config-list {
  display: grid;
  gap: 10px;
}
.bm-home-config-row {
  display: grid;
  grid-template-columns: 76px minmax(140px, .7fr) minmax(220px, 1.5fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fff;
}
.bm-home-config-row.capability {
  grid-template-columns: minmax(130px, .8fr) 82px 82px minmax(180px, 1.3fr) auto;
}
.bm-home-config-row .bm-field {
  margin-bottom: 0;
}

.bm-home-module-builder {
  margin: 18px 0;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.bm-home-module-list {
  display: grid;
  gap: 10px;
}

.bm-home-module-row {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1fr) auto 58px auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.bm-home-module-row.drag-over {
  border-color: var(--bm-primary);
  background: #f0f6ff;
}

.bm-home-module-row.disabled {
  opacity: .62;
  background: #f8fafc;
}

.bm-home-module-drag {
  width: 32px;
  height: 32px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f4f8fd;
  color: #64748b;
  cursor: grab;
  font-weight: 900;
}

.bm-home-module-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bm-home-module-main strong {
  color: #17212b;
}

.bm-home-module-main span {
  color: var(--bm-muted);
  font-size: 12px;
}

.bm-home-module-row code {
  border-radius: 6px;
  padding: 4px 7px;
  background: #eef4fb;
  color: #315d92;
  font-size: 12px;
}

.bm-switch.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bm-switch.mini input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bm-switch.mini span {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}

.bm-switch.mini span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .2);
  transition: transform .18s ease;
}

.bm-switch.mini input:checked + span {
  background: var(--bm-primary);
}

.bm-switch.mini input:checked + span::after {
  transform: translateX(18px);
}
.bm-lottery-prize-editor,
.bm-option-editor,
.bm-product-editor,
.bm-table-config {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  margin: 12px 0;
}
.bm-lottery-prize-head,
.bm-lottery-prize-row {
  grid-template-columns: minmax(90px, 1fr) minmax(140px, 1.2fr) 78px 72px minmax(120px, 1fr) 58px;
}
.bm-option-head,
.bm-option-row {
  grid-template-columns: minmax(110px, 1fr) minmax(140px, 1fr) 58px;
}
.bm-option-head.with-image,
.bm-option-row.with-image {
  grid-template-columns: minmax(90px, 1fr) minmax(150px, 1.2fr) minmax(110px, 1fr) 58px;
}
.bm-option-head.paid,
.bm-option-row.paid {
  grid-template-columns: minmax(90px, 1fr) 78px minmax(110px, 1fr) 58px;
}
.bm-product-head,
.bm-product-row {
  grid-template-columns: minmax(110px, 1fr) 86px 72px 58px;
}
.bm-product-head.with-image,
.bm-product-row.with-image {
  grid-template-columns: minmax(90px, 1fr) minmax(150px, 1.2fr) 86px 72px 58px;
}
.bm-lottery-prize-head,
.bm-option-head,
.bm-product-head {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 0;
}
.bm-lottery-prize-row,
.bm-option-row,
.bm-product-row {
  padding: 8px 0;
  border-top: 1px solid #edf1f7;
}
.bm-lottery-prize-row input,
.bm-option-row input,
.bm-product-row input {
  width: 100%;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  padding: 8px;
}
.bm-lottery-image-cell,
.bm-option-image-cell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.bm-lottery-image-cell img,
.bm-option-image-cell img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5eaf2;
}
.bm-lottery-image-cell em,
.bm-option-image-cell em {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px dashed #c8d2df;
  border-radius: 6px;
  color: #98a2b3;
  font-size: 12px;
}
.bm-mini-upload {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #1769e0;
  color: #1769e0;
  border-radius: 6px;
  padding: 7px 9px;
  cursor: pointer;
  background: #fff;
  font-size: 12px;
}
.bm-mini-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.bm-material-inline-btn {
  justify-self: start;
  margin-top: 4px;
}

.bm-lottery-image-cell .bm-material-inline-btn,
.bm-option-image-cell .bm-material-inline-btn {
  margin-top: 0;
  white-space: nowrap;
}

.bm-material-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
}

.bm-material-card {
  width: min(980px, 100%);
  max-height: min(88vh, 820px);
}

.bm-material-tools,
.bm-material-upload {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 180px) minmax(160px, 220px);
  gap: 10px;
  margin-bottom: 12px;
}

.bm-material-upload {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  align-items: center;
}

.bm-material-upload input[type="file"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--bm-line);
  border-radius: 6px;
  padding: 7px;
  background: #fff;
}

.bm-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 2px;
}

.bm-material-item {
  display: grid;
  gap: 7px;
  text-align: left;
  border: 1px solid var(--bm-line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
}

.bm-material-item:hover {
  border-color: var(--bm-primary);
  box-shadow: 0 10px 26px rgba(23, 105, 224, .12);
}

.bm-material-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--bm-ink);
  font-size: 13px;
}

.bm-material-item span {
  color: var(--bm-muted);
  font-size: 12px;
}

.bm-material-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #f1f5f9;
}

.bm-material-preview img,
.bm-material-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bm-material-file-preview {
  color: var(--bm-muted);
  font-size: 13px;
}

.bm-notify-center .bm-panel-head {
  align-items: flex-start;
}

.bm-notify-stats {
  margin-bottom: 14px;
}

.bm-notify-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 14px;
  margin-bottom: 14px;
}

.bm-subpanel {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin-bottom: 14px;
}

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

.bm-subpanel-head h3,
.bm-channel-box h4,
.bm-mini-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.bm-subpanel-head small {
  color: var(--bm-muted);
}

.bm-channel-box {
  border: 1px solid #edf1f7;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.bm-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 12px;
  color: #334155;
  font-size: 14px;
}

.bm-checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bm-template-editor {
  background: #fbfdff;
}

.bm-checkin-box {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(220px, .8fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.bm-checkin-box .bm-field {
  margin-bottom: 0;
}

.bm-checkin-result {
  min-height: 42px;
  border: 1px solid #f0d5d5;
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff7f7;
  color: #9f1d1d;
  display: grid;
  gap: 2px;
}

.bm-checkin-result.ok {
  border-color: #bfe6d6;
  background: #f0fdf7;
  color: #116047;
}

.bm-checkin-result span {
  color: inherit;
  font-size: 12px;
}

.bm-status.ok {
  background: #e9f8f1;
  color: #116047;
}

.bm-status.warn {
  background: #fff7e6;
  color: #9a5b00;
}

.bm-status.bad {
  background: #fff1f1;
  color: #b42318;
}

@media (max-width: 900px) {
  .bm-home-upload-preview,
  .bm-lottery-prize-head,
  .bm-lottery-prize-row,
  .bm-option-head,
  .bm-option-row,
  .bm-option-head.with-image,
  .bm-option-row.with-image,
  .bm-option-head.paid,
  .bm-option-row.paid,
  .bm-product-head,
  .bm-product-row,
  .bm-product-head.with-image,
  .bm-product-row.with-image,
  .bm-home-media-item,
  .bm-home-config-row,
  .bm-home-config-row.capability,
  .bm-home-module-row,
  .bm-notify-layout,
  .bm-checkin-box {
    grid-template-columns: 1fr;
  }

  .bm-home-module-row {
    align-items: stretch;
  }

  .bm-home-module-drag {
    width: 100%;
  }
}
